diff --git a/.changeset/README.md b/.changeset/README.md new file mode 100644 index 00000000000..e5b6d8d6a67 --- /dev/null +++ b/.changeset/README.md @@ -0,0 +1,8 @@ +# Changesets + +Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works +with multi-package repos, or single-package repos to help you version and publish your code. You can +find the full documentation for it [in our repository](https://github.com/changesets/changesets) + +We have a quick list of common questions to get you started engaging with this project in +[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md) diff --git a/.changeset/config.json b/.changeset/config.json new file mode 100644 index 00000000000..4bdbe5141fb --- /dev/null +++ b/.changeset/config.json @@ -0,0 +1,20 @@ +{ + "$schema": "https://unpkg.com/@changesets/config@2.3.1/schema.json", + "changelog": [ + "@changesets/changelog-github", + { + "repo": "smartcontractkit/chainlink" + } + ], + "commit": false, + "fixed": [], + "linked": [], + "privatePackages": { + "version": true, + "tag": true + }, + "access": "restricted", + "baseBranch": "develop", + "updateInternalDependencies": "patch", + "ignore": [] +} diff --git a/.changeset/dirty-weeks-shave.md b/.changeset/dirty-weeks-shave.md new file mode 100644 index 00000000000..9fcb0c39ab1 --- /dev/null +++ b/.changeset/dirty-weeks-shave.md @@ -0,0 +1,5 @@ +--- +"chainlink": minor +--- + +update AutomationBase interface to check for ready only address on polygon zkEVM diff --git a/.changeset/dull-pugs-wonder.md b/.changeset/dull-pugs-wonder.md new file mode 100644 index 00000000000..f750db9f62c --- /dev/null +++ b/.changeset/dull-pugs-wonder.md @@ -0,0 +1,5 @@ +--- +"chainlink": minor +--- + +Update config for zkevm polygon chains diff --git a/.changeset/fresh-spies-melt.md b/.changeset/fresh-spies-melt.md new file mode 100644 index 00000000000..ad341d1db91 --- /dev/null +++ b/.changeset/fresh-spies-melt.md @@ -0,0 +1,5 @@ +--- +"chainlink": patch +--- + +Update automation smoke test to use UpkeepCounter with time based counter diff --git a/.changeset/gentle-cups-carry.md b/.changeset/gentle-cups-carry.md new file mode 100644 index 00000000000..1b204dfee31 --- /dev/null +++ b/.changeset/gentle-cups-carry.md @@ -0,0 +1,5 @@ +--- +"chainlink": patch +--- + +added logic C contract to automation 2.3 diff --git a/.changeset/giant-hotels-sparkle.md b/.changeset/giant-hotels-sparkle.md new file mode 100644 index 00000000000..817078ae3cc --- /dev/null +++ b/.changeset/giant-hotels-sparkle.md @@ -0,0 +1,5 @@ +--- +"chainlink": minor +--- + +remove registerUpkeep from auto v21 common diff --git a/.changeset/gold-rats-hide.md b/.changeset/gold-rats-hide.md new file mode 100644 index 00000000000..b290847556a --- /dev/null +++ b/.changeset/gold-rats-hide.md @@ -0,0 +1,5 @@ +--- +"chainlink": patch +--- + +External peering core service diff --git a/.changeset/gorgeous-crabs-repeat.md b/.changeset/gorgeous-crabs-repeat.md new file mode 100644 index 00000000000..a74f36ec3a9 --- /dev/null +++ b/.changeset/gorgeous-crabs-repeat.md @@ -0,0 +1,5 @@ +--- +"chainlink": patch +--- + +Soft delete consumer nonce in VRF coordinator v2.5 diff --git a/.changeset/healthy-toes-destroy.md b/.changeset/healthy-toes-destroy.md new file mode 100644 index 00000000000..1c027fdcd01 --- /dev/null +++ b/.changeset/healthy-toes-destroy.md @@ -0,0 +1,5 @@ +--- +"chainlink": minor +--- + +HeadTracker now respects the `FinalityTagEnabled` config option. If the flag is enabled, HeadTracker backfills blocks up to the latest finalized block provided by the corresponding RPC call. To address potential misconfigurations, `HistoryDepth` is now calculated from the latest finalized block instead of the head. NOTE: Consumers (e.g. TXM and LogPoller) do not fully utilize Finality Tag yet. diff --git a/.changeset/hot-pets-sneeze.md b/.changeset/hot-pets-sneeze.md new file mode 100644 index 00000000000..b60e7d7cde8 --- /dev/null +++ b/.changeset/hot-pets-sneeze.md @@ -0,0 +1,12 @@ +--- +"chainlink": 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) +- Fix integration tests diff --git a/.changeset/hungry-cats-scream.md b/.changeset/hungry-cats-scream.md new file mode 100644 index 00000000000..2c9f66115f3 --- /dev/null +++ b/.changeset/hungry-cats-scream.md @@ -0,0 +1,5 @@ +--- +"chainlink": minor +--- + +The `xdai` `ChainType` has been renamed to `gnosis` to match the chain's new name. The old value is still supported but has been deprecated and will be removed in v2.13.0. diff --git a/.changeset/hungry-seas-attend.md b/.changeset/hungry-seas-attend.md new file mode 100644 index 00000000000..1b6af484f8f --- /dev/null +++ b/.changeset/hungry-seas-attend.md @@ -0,0 +1,5 @@ +--- +"chainlink": patch +--- + +refactor foundry tests for auto 2.3 diff --git a/.changeset/kind-crabs-begin.md b/.changeset/kind-crabs-begin.md new file mode 100644 index 00000000000..4718b21f126 --- /dev/null +++ b/.changeset/kind-crabs-begin.md @@ -0,0 +1,5 @@ +--- +"chainlink": minor +--- + +Helper VRF CLI command diff --git a/.changeset/lazy-cooks-agree.md b/.changeset/lazy-cooks-agree.md new file mode 100644 index 00000000000..923d2404428 --- /dev/null +++ b/.changeset/lazy-cooks-agree.md @@ -0,0 +1,5 @@ +--- +"chainlink": patch +--- + +Chainlink Functions contracts v1.3 audit findings diff --git a/.changeset/lemon-balloons-pretend.md b/.changeset/lemon-balloons-pretend.md new file mode 100644 index 00000000000..0cb7b41d3a2 --- /dev/null +++ b/.changeset/lemon-balloons-pretend.md @@ -0,0 +1,5 @@ +--- +"chainlink": patch +--- + +Added a RageP2P wrapper diff --git a/.changeset/lemon-ladybugs-doubt.md b/.changeset/lemon-ladybugs-doubt.md new file mode 100644 index 00000000000..d7d1c7a8492 --- /dev/null +++ b/.changeset/lemon-ladybugs-doubt.md @@ -0,0 +1,5 @@ +--- +"chainlink": patch +--- + +Add kv store tied to jobs and use it for juels fee per coin cache to store persisted values for backup diff --git a/.changeset/mighty-timers-travel.md b/.changeset/mighty-timers-travel.md new file mode 100644 index 00000000000..95dbb735b15 --- /dev/null +++ b/.changeset/mighty-timers-travel.md @@ -0,0 +1,5 @@ +--- +"chainlink": patch +--- + +make reserveAmounts to be a map diff --git a/.changeset/moody-ligers-walk.md b/.changeset/moody-ligers-walk.md new file mode 100644 index 00000000000..c93bf8517ee --- /dev/null +++ b/.changeset/moody-ligers-walk.md @@ -0,0 +1,5 @@ +--- +"chainlink": patch +--- + +Add new pipeline for testing EVM node compatibility on go-ethereum dependency bump diff --git a/.changeset/nasty-humans-promise.md b/.changeset/nasty-humans-promise.md new file mode 100644 index 00000000000..8a366df1bae --- /dev/null +++ b/.changeset/nasty-humans-promise.md @@ -0,0 +1,5 @@ +--- +"chainlink": patch +--- + +add pending request counter for vrf v2.5 coordinator diff --git a/.changeset/popular-buckets-hang.md b/.changeset/popular-buckets-hang.md new file mode 100644 index 00000000000..a80b4c90052 --- /dev/null +++ b/.changeset/popular-buckets-hang.md @@ -0,0 +1,18 @@ +--- +"chainlink": patch +--- + +Add new config option Pipeline.VerboseLogging + +VerboseLogging enables detailed logging of pipeline execution steps. This is +disabled by default because it increases log volume for pipeline runs, but can +be useful for debugging failed runs without relying on the UI or database. +Consider enabling this if you disabled run saving by setting MaxSuccessfulRuns +to zero. + +Set it like the following example: + +``` +[Pipeline] +VerboseLogging = true +``` diff --git a/.changeset/pretty-fishes-jam.md b/.changeset/pretty-fishes-jam.md new file mode 100644 index 00000000000..6026bb27971 --- /dev/null +++ b/.changeset/pretty-fishes-jam.md @@ -0,0 +1,5 @@ +--- +"chainlink": minor +--- + +VRF V2+ Coordinator msg.data len validation diff --git a/.changeset/shiny-forks-clap.md b/.changeset/shiny-forks-clap.md new file mode 100644 index 00000000000..4718b21f126 --- /dev/null +++ b/.changeset/shiny-forks-clap.md @@ -0,0 +1,5 @@ +--- +"chainlink": minor +--- + +Helper VRF CLI command diff --git a/.changeset/shy-jobs-speak.md b/.changeset/shy-jobs-speak.md new file mode 100644 index 00000000000..1b1c3b4c91b --- /dev/null +++ b/.changeset/shy-jobs-speak.md @@ -0,0 +1,5 @@ +--- +"chainlink": patch +--- + +use common interface for v2.3 diff --git a/.changeset/silver-months-glow.md b/.changeset/silver-months-glow.md new file mode 100644 index 00000000000..195525353fc --- /dev/null +++ b/.changeset/silver-months-glow.md @@ -0,0 +1,5 @@ +--- +"chainlink": patch +--- + +Fixed a race condition bug around EVM nonce management, which could cause the Node to skip a nonce and get stuck. diff --git a/.changeset/sixty-turtles-rest.md b/.changeset/sixty-turtles-rest.md new file mode 100644 index 00000000000..6fa4e551809 --- /dev/null +++ b/.changeset/sixty-turtles-rest.md @@ -0,0 +1,5 @@ +--- +"chainlink": patch +--- + +Add rebalancer support for feeds manager ocr2 plugins diff --git a/.changeset/strange-tables-occur.md b/.changeset/strange-tables-occur.md new file mode 100644 index 00000000000..68a39e43b54 --- /dev/null +++ b/.changeset/strange-tables-occur.md @@ -0,0 +1,21 @@ +--- +"chainlink": patch +--- + +Mercury jobs can now broadcast to multiple mercury servers. + +Previously, a single mercury server would be specified in a job spec as so: + +```toml +[pluginConfig] +serverURL = "example.com/foo" +serverPubKey = "724ff6eae9e900270edfff233e16322a70ec06e1a6e62a81ef13921f398f6c93" +``` + +You may now specify multiple mercury servers, as so: + +```toml +[pluginConfig] +servers = { "example.com/foo" = "724ff6eae9e900270edfff233e16322a70ec06e1a6e62a81ef13921f398f6c93", "mercury2.example:1234/bar" = "524ff6eae9e900270edfff233e16322a70ec06e1a6e62a81ef13921f398f6c93" } +``` + diff --git a/.changeset/strong-ears-heal.md b/.changeset/strong-ears-heal.md new file mode 100644 index 00000000000..b6332407ea5 --- /dev/null +++ b/.changeset/strong-ears-heal.md @@ -0,0 +1,5 @@ +--- +"chainlink": patch +--- + +Refactor EVM ORMs to remove pg dependency diff --git a/.changeset/swift-bobcats-punch.md b/.changeset/swift-bobcats-punch.md new file mode 100644 index 00000000000..80de89c87cc --- /dev/null +++ b/.changeset/swift-bobcats-punch.md @@ -0,0 +1,5 @@ +--- +"chainlink": patch +--- + +add liquidity pool for automation 2.3 diff --git a/.changeset/tasty-buckets-relate.md b/.changeset/tasty-buckets-relate.md new file mode 100644 index 00000000000..a627e392e82 --- /dev/null +++ b/.changeset/tasty-buckets-relate.md @@ -0,0 +1,5 @@ +--- +"chainlink": patch +--- + +Validation for premium limits added to VRFCoordinatorV2_5 contract diff --git a/.changeset/thirty-cheetahs-unite.md b/.changeset/thirty-cheetahs-unite.md new file mode 100644 index 00000000000..616f553c49d --- /dev/null +++ b/.changeset/thirty-cheetahs-unite.md @@ -0,0 +1,5 @@ +--- +"chainlink": patch +--- + +bump grafana to 1.1.1 diff --git a/.changeset/warm-chefs-fry.md b/.changeset/warm-chefs-fry.md new file mode 100644 index 00000000000..054dc56655c --- /dev/null +++ b/.changeset/warm-chefs-fry.md @@ -0,0 +1,5 @@ +--- +"chainlink": patch +--- + +add version support for automation registry 2.\* diff --git a/.changeset/warm-owls-act.md b/.changeset/warm-owls-act.md new file mode 100644 index 00000000000..22b674e7418 --- /dev/null +++ b/.changeset/warm-owls-act.md @@ -0,0 +1,5 @@ +--- +"chainlink": minor +--- + +Add support for eth_getLogs & finality tags in simulated_backend_client.go diff --git a/.changeset/wild-walls-suffer.md b/.changeset/wild-walls-suffer.md new file mode 100644 index 00000000000..7573d354806 --- /dev/null +++ b/.changeset/wild-walls-suffer.md @@ -0,0 +1,5 @@ +--- +"chainlink": minor +--- + +Validate if flat fee configs are configured correctly diff --git a/.dockerignore b/.dockerignore index 4bbd79b7a96..c7f58621aa2 100644 --- a/.dockerignore +++ b/.dockerignore @@ -30,3 +30,6 @@ codeship-*.yml dockercfg credentials.env gcr_creds.env + +go.work +go.work.sum \ No newline at end of file diff --git a/.github/actions/build-chainlink-image/action.yml b/.github/actions/build-chainlink-image/action.yml index 324a5353b24..75a5147248a 100644 --- a/.github/actions/build-chainlink-image/action.yml +++ b/.github/actions/build-chainlink-image/action.yml @@ -15,13 +15,16 @@ inputs: description: "AWS region to use for ECR" AWS_ROLE_TO_ASSUME: description: "AWS role to assume for ECR" + dep_evm_sha: + description: The chainlink-evm commit sha to use in go deps + required: false runs: using: composite steps: - name: Check if image exists id: check-image - uses: smartcontractkit/chainlink-github-actions/docker/image-exists@c67a09566412d153ff7640d99f96b43aa03abc04 # v2.3.6 + uses: smartcontractkit/chainlink-github-actions/docker/image-exists@5bee84d30d90295010bda68b0cd46be3a1eea917 # v2.3.8 with: repository: chainlink tag: ${{ inputs.git_commit_sha }}${{ inputs.tag_suffix }} @@ -29,7 +32,7 @@ runs: AWS_ROLE_TO_ASSUME: ${{ inputs.AWS_ROLE_TO_ASSUME }} - name: Build Image if: steps.check-image.outputs.exists == 'false' - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/build-image@c67a09566412d153ff7640d99f96b43aa03abc04 # v2.3.6 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/build-image@5bee84d30d90295010bda68b0cd46be3a1eea917 # v2.3.8 with: cl_repo: smartcontractkit/chainlink cl_ref: ${{ inputs.git_commit_sha }} @@ -37,6 +40,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 }} + dep_evm_sha: ${{ inputs.dep_evm_sha }} - name: Print Chainlink Image Built shell: sh run: | diff --git a/.github/actions/build-sign-publish-chainlink/action.yml b/.github/actions/build-sign-publish-chainlink/action.yml index 5bcbf205c1b..7ed0c911b83 100644 --- a/.github/actions/build-sign-publish-chainlink/action.yml +++ b/.github/actions/build-sign-publish-chainlink/action.yml @@ -105,7 +105,7 @@ runs: - if: inputs.publish == 'true' # Log in to AWS for publish to ECR name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@010d0da01d0b5a38af31e9c3470dbfdabdecca3a # v4.0.1 + uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2 with: role-to-assume: ${{ inputs.aws-role-to-assume }} role-duration-seconds: ${{ inputs.aws-role-duration-seconds }} @@ -113,16 +113,16 @@ runs: - if: inputs.publish == 'true' name: Login to ECR - uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0 + uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 # v3.1.0 with: registry: ${{ inputs.ecr-hostname }} - name: Setup Docker Buildx - uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0 + uses: docker/setup-buildx-action@2b51285047da1547ffb1b2203d8be4c0af6b1f20 # v3.2.0 - name: Generate docker metadata for root image id: meta-root - uses: docker/metadata-action@dbef88086f6cef02e264edb7dbf63250c17cef6c # v5.5.0 + uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5.5.1 env: DOCKER_METADATA_PR_HEAD_SHA: "true" with: @@ -137,14 +137,14 @@ runs: # To avoid rate limiting from Docker Hub, we login with a paid user account. - name: Login to Docker Hub if: inputs.dockerhub_username && inputs.dockerhub_password - uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0 + uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 # v3.1.0 with: username: ${{ inputs.dockerhub_username }} password: ${{ inputs.dockerhub_password }} - name: Build and push root docker image id: buildpush-root - uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0 + uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0 # v5.3.0 with: push: ${{ inputs.publish }} context: . @@ -166,7 +166,7 @@ runs: - name: Generate docker metadata for non-root image id: meta-nonroot - uses: docker/metadata-action@dbef88086f6cef02e264edb7dbf63250c17cef6c # v5.5.0 + uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5.5.1 env: DOCKER_METADATA_PR_HEAD_SHA: "true" with: @@ -180,14 +180,14 @@ runs: # To avoid rate limiting from Docker Hub, we login with a paid user account. - name: Login to Docker Hub if: inputs.dockerhub_username && inputs.dockerhub_password - uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0 + uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 # v3.1.0 with: username: ${{ inputs.dockerhub_username }} password: ${{ inputs.dockerhub_password }} - name: Build and push non-root docker image id: buildpush-nonroot - uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0 + uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0 # v5.3.0 with: push: ${{ inputs.publish }} context: . @@ -227,7 +227,7 @@ runs: - if: inputs.sign-images == 'true' name: Install cosign - uses: sigstore/cosign-installer@11086d25041f77fe8fe7b9ea4e48e3b9192b8f19 # v3.1.2 + uses: sigstore/cosign-installer@e1523de7571e31dbe865fd2e80c5c7c23ae71eb4 # v3.4.0 with: cosign-release: "v1.6.0" diff --git a/.github/actions/build-test-image/action.yml b/.github/actions/build-test-image/action.yml index 7fe002a82b2..fd964e140b3 100644 --- a/.github/actions/build-test-image/action.yml +++ b/.github/actions/build-test-image/action.yml @@ -34,7 +34,7 @@ runs: # Base Test Image Logic - name: Get CTF Version id: version - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/mod-version@c67a09566412d153ff7640d99f96b43aa03abc04 # v2.3.6 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/mod-version@5bee84d30d90295010bda68b0cd46be3a1eea917 # v2.3.9 with: go-project-path: ./integration-tests module-name: github.com/smartcontractkit/chainlink-testing-framework @@ -51,7 +51,7 @@ runs: echo "short_sha=${short_sha}" >> "$GITHUB_OUTPUT" - name: Checkout chainlink-testing-framework if: steps.version.outputs.is_semantic == 'false' - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 with: repository: smartcontractkit/chainlink-testing-framework ref: main @@ -71,7 +71,7 @@ runs: - name: Check if test base image exists if: steps.version.outputs.is_semantic == 'false' id: check-base-image - uses: smartcontractkit/chainlink-github-actions/docker/image-exists@c67a09566412d153ff7640d99f96b43aa03abc04 # v2.3.6 + uses: smartcontractkit/chainlink-github-actions/docker/image-exists@5bee84d30d90295010bda68b0cd46be3a1eea917 # v2.3.9 with: repository: ${{ inputs.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ inputs.QA_AWS_REGION }}.amazonaws.com/test-base-image tag: ${{ steps.long_sha.outputs.long_sha }} @@ -79,7 +79,7 @@ runs: AWS_ROLE_TO_ASSUME: ${{ inputs.QA_AWS_ROLE_TO_ASSUME }} - name: Build Base Image if: steps.version.outputs.is_semantic == 'false' && steps.check-base-image.outputs.exists == 'false' - uses: smartcontractkit/chainlink-github-actions/docker/build-push@c67a09566412d153ff7640d99f96b43aa03abc04 # v2.3.6 + uses: smartcontractkit/chainlink-github-actions/docker/build-push@5bee84d30d90295010bda68b0cd46be3a1eea917 # v2.3.9 env: BASE_IMAGE_NAME: ${{ inputs.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ inputs.QA_AWS_REGION }}.amazonaws.com/test-base-image:${{ steps.long_sha.outputs.long_sha }} with: @@ -92,7 +92,7 @@ runs: # Test Runner Logic - name: Check if image exists id: check-image - uses: smartcontractkit/chainlink-github-actions/docker/image-exists@c67a09566412d153ff7640d99f96b43aa03abc04 # v2.3.6 + uses: smartcontractkit/chainlink-github-actions/docker/image-exists@5bee84d30d90295010bda68b0cd46be3a1eea917 # v2.3.9 with: repository: ${{ inputs.repository }} tag: ${{ inputs.tag }} @@ -100,7 +100,7 @@ runs: AWS_ROLE_TO_ASSUME: ${{ inputs.QA_AWS_ROLE_TO_ASSUME }} - name: Build and Publish Test Runner if: steps.check-image.outputs.exists == 'false' - uses: smartcontractkit/chainlink-github-actions/docker/build-push@c67a09566412d153ff7640d99f96b43aa03abc04 # v2.3.6 + uses: smartcontractkit/chainlink-github-actions/docker/build-push@5bee84d30d90295010bda68b0cd46be3a1eea917 # v2.3.9 with: tags: | ${{ inputs.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ inputs.QA_AWS_REGION }}.amazonaws.com/${{ inputs.repository }}:${{ inputs.tag }} diff --git a/.github/actions/delete-deployments/action.yml b/.github/actions/delete-deployments/action.yml index f2595b41022..537e4498596 100644 --- a/.github/actions/delete-deployments/action.yml +++ b/.github/actions/delete-deployments/action.yml @@ -33,7 +33,7 @@ runs: with: version: ^8.0.0 - - uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0 + - uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 with: node-version: "18" cache: "pnpm" diff --git a/.github/actions/golangci-lint/action.yml b/.github/actions/golangci-lint/action.yml index d0fd87774cc..3030922c586 100644 --- a/.github/actions/golangci-lint/action.yml +++ b/.github/actions/golangci-lint/action.yml @@ -32,7 +32,7 @@ inputs: runs: using: composite steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 - name: Setup Go uses: ./.github/actions/setup-go with: @@ -48,7 +48,7 @@ runs: shell: bash run: go build ./... - name: golangci-lint - uses: golangci/golangci-lint-action@3a919529898de77ec3da873e3063ca4b10e7f5cc # v3.7.0 + uses: golangci/golangci-lint-action@3cfe3a4abbb849e10058ce4af15d205b6da42804 # v4.0.0 with: version: v1.55.2 # We already cache these directories in setup-go @@ -60,7 +60,7 @@ runs: working-directory: ${{ inputs.go-directory }} - name: Store lint report artifact if: always() - uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 + uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 with: name: golangci-lint-report path: ${{ inputs.go-directory }}/golangci-lint-report.xml diff --git a/.github/actions/goreleaser-build-sign-publish/action.yml b/.github/actions/goreleaser-build-sign-publish/action.yml index b8760e34dc1..f4b2111bea5 100644 --- a/.github/actions/goreleaser-build-sign-publish/action.yml +++ b/.github/actions/goreleaser-build-sign-publish/action.yml @@ -68,7 +68,7 @@ runs: using: composite steps: - name: Setup docker buildx - uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0 + uses: docker/setup-buildx-action@2b51285047da1547ffb1b2203d8be4c0af6b1f20 # v3.2.0 - name: Set up qemu uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0 - name: Setup go @@ -89,12 +89,12 @@ runs: version: ${{ inputs.zig-version }} - name: Setup cosign if: inputs.enable-cosign == 'true' - uses: sigstore/cosign-installer@9614fae9e5c5eddabb09f90a270fcb487c9f7149 # v3.3.0 + uses: sigstore/cosign-installer@e1523de7571e31dbe865fd2e80c5c7c23ae71eb4 # v3.4.0 with: cosign-release: ${{ inputs.cosign-version }} - name: Login to docker registry if: inputs.enable-docker-publish == 'true' - uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0 + uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 # v3.1.0 with: registry: ${{ inputs.docker-registry }} - name: Goreleaser release diff --git a/.github/actions/notify-slack-jobs-result/action.yml b/.github/actions/notify-slack-jobs-result/action.yml index 63840cfa393..f5df87bb909 100644 --- a/.github/actions/notify-slack-jobs-result/action.yml +++ b/.github/actions/notify-slack-jobs-result/action.yml @@ -36,9 +36,10 @@ runs: # I feel like there's some clever, fully jq way to do this, but I ain't got the motivation to figure it out echo "Querying test results at https://github.com/gitapi/repos/${{inputs.github_repository}}/actions/runs/${{ inputs.workflow_run_id }}/jobs" + # we can get a maximum of 100 jobs per page, after that we need to start using pagination PARSED_RESULTS=$(curl \ -H "Authorization: Bearer ${{ inputs.github_token }}" \ - 'https://github.com/gitapi/repos/${{inputs.github_repository}}/actions/runs/${{ inputs.workflow_run_id }}/jobs' \ + 'https://github.com/gitapi/repos/${{inputs.github_repository}}/actions/runs/${{ inputs.workflow_run_id }}/jobs?per_page=100' \ | jq -r --arg pattern "${{ inputs.github_job_name_regex }}" '.jobs[] | select(.name | test($pattern)) as $job | $job.steps[] @@ -59,9 +60,9 @@ runs: echo all_success=$ALL_SUCCESS >> $GITHUB_OUTPUT - FORMATTED_RESULTS=$(echo $PARSED_RESULTS | jq -s '[.[] - | { - conclusion: .conclusion, + FORMATTED_RESULTS=$(echo $PARSED_RESULTS | jq -s '[.[] + | { + conclusion: .conclusion, cap: .cap, html_url: .html_url } @@ -80,7 +81,7 @@ runs: echo results=$CLEAN_RESULTS >> $GITHUB_OUTPUT - name: Post Results - uses: slackapi/slack-github-action@e28cf165c92ffef168d23c5c9000cffc8a25e117 # v1.24.0 + uses: slackapi/slack-github-action@6c661ce58804a1a20f6dc5fbee7f0381b469e001 # v1.25.0 env: SLACK_BOT_TOKEN: ${{ inputs.slack_bot_token }} with: diff --git a/.github/actions/setup-create-base64-config/action.yml b/.github/actions/setup-create-base64-config/action.yml index d68d4f7b12f..447f5be42cb 100644 --- a/.github/actions/setup-create-base64-config/action.yml +++ b/.github/actions/setup-create-base64-config/action.yml @@ -35,6 +35,10 @@ inputs: description: Grafana URL grafanaDashboardUrl: description: Grafana dashboard URL + ethExecutionClient: + description: Ethereum execution client to use (geth, besu, nethermind or erigon) + customEthClientDockerImage: + description: custom docker image to use for eth client (e.g. hyperledger/besu:21.10.0) runs: using: composite @@ -58,6 +62,8 @@ runs: LOGSTREAM_LOG_TARGETS: ${{ inputs.logstreamLogTargets }} GRAFANA_URL: ${{ inputs.grafanaUrl }} GRAFANA_DASHBOARD_URL: ${{ inputs.grafanaDashboardUrl }} + ETH_EXECUTION_CLIENT: ${{ inputs.ethExecutionClient }} + CUSTOM_ETH_CLIENT_DOCKER_IMAGE: ${{ inputs.customEthClientDockerImage }} run: | echo ::add-mask::$CHAINLINK_IMAGE function convert_to_toml_array() { @@ -88,6 +94,21 @@ runs: test_log_collect=false fi + custom_images="" + ethereum_version="" + + if [ -n "$CUSTOM_ETH_CLIENT_DOCKER_IMAGE" ]; then + ethereum_version="ethereum_version=\"\"" + custom_images+="[PrivateEthereumNetwork.CustomDockerImages]" + custom_images+=$'\n'"execution_layer=\"$CUSTOM_ETH_CLIENT_DOCKER_IMAGE\"" + fi + + if [ -n "$ETH_EXECUTION_CLIENT" ]; then + execution_layer="$ETH_EXECUTION_CLIENT" + else + execution_layer="geth" + fi + cat << EOF > config.toml [Network] selected_networks=$selected_networks @@ -118,6 +139,12 @@ runs: [Logging.Grafana] base_url="$GRAFANA_URL" dashboard_url="$GRAFANA_DASHBOARD_URL" + + [PrivateEthereumNetwork] + execution_layer="$execution_layer" + $ethereum_version + + $custom_images EOF BASE64_CONFIG_OVERRIDE=$(cat config.toml | base64 -w 0) diff --git a/.github/actions/setup-go/action.yml b/.github/actions/setup-go/action.yml index 405a5dfe954..410e93144c6 100644 --- a/.github/actions/setup-go/action.yml +++ b/.github/actions/setup-go/action.yml @@ -26,7 +26,7 @@ runs: - name: Get branch name if: ${{ inputs.only-modules == 'false' }} id: branch-name - uses: tj-actions/branch-names@2e5354c6733793113f416314375826df030ada23 #v6.5 + uses: tj-actions/branch-names@6871f53176ad61624f978536bbf089c574dc19a2 # v8.0.1 - name: Set go cache keys shell: bash @@ -40,7 +40,7 @@ runs: shell: bash run: echo "path=./${{ inputs.go-module-file }}" >> $GITHUB_OUTPUT - - uses: actions/cache@v3 + - uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v4.0.1 name: Cache Go Modules with: path: | @@ -51,7 +51,7 @@ runs: restore-keys: | ${{ runner.os }}-gomod-${{ inputs.cache-version }}- - - uses: actions/cache@v3 + - uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v4.0.1 if: ${{ inputs.only-modules == 'false' }} name: Cache Go Build Outputs with: diff --git a/.github/actions/setup-hardhat/action.yaml b/.github/actions/setup-hardhat/action.yaml index 3b52a4b8c51..8609991b9c0 100644 --- a/.github/actions/setup-hardhat/action.yaml +++ b/.github/actions/setup-hardhat/action.yaml @@ -11,13 +11,13 @@ runs: using: composite steps: - name: Cache Compilers - uses: actions/cache@v3 + uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v4.0.1 with: path: ~/.cache/hardhat-nodejs/ key: contracts-compilers-${{ runner.os }}-${{ inputs.cache-version }}-${{ hashFiles('contracts/pnpm-lock.yaml', 'contracts/hardhat.config.ts') }} - name: Cache contracts build outputs - uses: actions/cache@v3 + uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v4.0.1 with: path: | contracts/cache/ diff --git a/.github/actions/setup-nodejs/action.yaml b/.github/actions/setup-nodejs/action.yaml index e0bdaebe99e..ed4c1d22e8b 100644 --- a/.github/actions/setup-nodejs/action.yaml +++ b/.github/actions/setup-nodejs/action.yaml @@ -11,7 +11,7 @@ runs: with: version: ^7.0.0 - - uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0 + - uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 with: node-version: "16" cache: "pnpm" diff --git a/.github/actions/setup-solana/action.yml b/.github/actions/setup-solana/action.yml index c50ccd58352..d33c5dfa8f6 100644 --- a/.github/actions/setup-solana/action.yml +++ b/.github/actions/setup-solana/action.yml @@ -3,7 +3,7 @@ description: Setup solana CLI runs: using: composite steps: - - uses: actions/cache@v3 + - uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v4.0.1 id: cache name: Cache solana CLI with: diff --git a/.github/actions/setup-wasmd/action.yml b/.github/actions/setup-wasmd/action.yml index 46fb84ba3ef..4ea013a6303 100644 --- a/.github/actions/setup-wasmd/action.yml +++ b/.github/actions/setup-wasmd/action.yml @@ -3,7 +3,7 @@ description: Setup Cosmos wasmd, used for integration tests runs: using: composite steps: - - uses: actions/cache@v3 + - uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v4.0.1 id: cache name: Cache wasmd-build with: diff --git a/.github/actions/split-tests/action.yaml b/.github/actions/split-tests/action.yaml index 684fd6a2bd7..633e897db54 100644 --- a/.github/actions/split-tests/action.yaml +++ b/.github/actions/split-tests/action.yaml @@ -11,11 +11,11 @@ outputs: runs: using: composite steps: - - uses: pnpm/action-setup@c3b53f6a16e57305370b4ae5a540c2077a1d50dd #v2.2.4 + - uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # v3.0.0 with: version: ^7.0.0 - - uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0 + - uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 with: node-version: "16" cache: "pnpm" diff --git a/.github/actions/version-file-bump/action.yml b/.github/actions/version-file-bump/action.yml index 2c9b95a6898..ad4656f43c8 100644 --- a/.github/actions/version-file-bump/action.yml +++ b/.github/actions/version-file-bump/action.yml @@ -8,7 +8,7 @@ inputs: outputs: result: value: ${{ steps.compare.outputs.result }} - description: 'Result of the comparison' + description: "Result of the comparison" runs: using: composite steps: @@ -31,12 +31,26 @@ runs: current_version=$(head -n1 ./VERSION) echo "current_version=${current_version}" | tee -a "$GITHUB_OUTPUT" - name: Compare semantic versions - uses: smartcontractkit/chainlink-github-actions/semver-compare@c67a09566412d153ff7640d99f96b43aa03abc04 # v2.3.6 + uses: smartcontractkit/chainlink-github-actions/semver-compare@5bee84d30d90295010bda68b0cd46be3a1eea917 # v2.3.9 id: compare with: version1: ${{ steps.get-current-version.outputs.current_version }} operator: eq version2: ${{ steps.get-latest-version.outputs.latest_version }} + # The follow two steps are temp until we migrate to use version from package.json as the source of truth + - name: Get package version + id: get-package-version + shell: bash + run: | + package_version=$(jq -r '.version' ./package.json) + echo "package_version=${package_version}" | tee -a "$GITHUB_OUTPUT" + - name: Diff versions + uses: smartcontractkit/chainlink-github-actions/semver-compare@c67a09566412d153ff7640d99f96b43aa03abc04 # v2.3.6 + id: diff + with: + version1: ${{ steps.get-current-version.outputs.current_version }} + operator: eq + version2: ${{ steps.get-package-version.outputs.package_version }} - name: Fail if version not bumped # XXX: The reason we are not checking if the current is greater than the # latest release is to account for hot fixes which may have been branched @@ -44,8 +58,13 @@ runs: shell: bash env: VERSION_NOT_BUMPED: ${{ steps.compare.outputs.result }} + VERSION_SAME: ${{ steps.diff.outputs.result }} run: | if [[ "${VERSION_NOT_BUMPED:-}" = "true" ]]; then echo "Version file not bumped since last release. Please bump the ./VERSION file in the root of the repo and commit the change." exit 1 fi + if [[ "${VERSION_SAME:-}" = "false" ]]; then + echo "The version in the VERSION file is not the same as the version in package.json file. Please fix by running `pnpm changeset version`." + exit 1 + fi diff --git a/.github/scripts/crib/lib/check-route53-records.js b/.github/scripts/crib/lib/check-route53-records.js new file mode 100644 index 00000000000..f35762ec88a --- /dev/null +++ b/.github/scripts/crib/lib/check-route53-records.js @@ -0,0 +1,91 @@ +import { setTimeout } from "node:timers/promises"; +import { + Route53Client, + ListResourceRecordSetsCommand, +} from "@aws-sdk/client-route-53"; + +// us-east-1 is the global region used by Route 53. +const route53Client = new Route53Client({ region: "us-east-1" }); + +async function paginateListResourceRecordSets(route53Client, params) { + let isTruncated = true; + let nextRecordName, nextRecordType; + let allRecordSets = []; + + while (isTruncated) { + const response = await route53Client.send( + new ListResourceRecordSetsCommand({ + ...params, + ...(nextRecordName && { StartRecordName: nextRecordName }), + ...(nextRecordType && { StartRecordType: nextRecordType }), + }) + ); + + allRecordSets = allRecordSets.concat(response.ResourceRecordSets); + isTruncated = response.IsTruncated; + if (isTruncated) { + nextRecordName = response.NextRecordName; + nextRecordType = response.NextRecordType; + } + } + + return allRecordSets; +} + +/** + * Check if Route 53 records exist for a given Route 53 zone. + * + * @param {string} hostedZoneId The ID of the hosted zone. + * @param {string[]} recordNames An array of record names to check. + * @param {number} maxRetries The maximum number of retries. + * @param {number} initialBackoffMs The initial backoff time in milliseconds. + * @returns {Promise} True if records exist, false otherwise. + */ +export async function route53RecordsExist( + hostedZoneId, + recordNames, + maxRetries = 8, + initialBackoffMs = 2000 +) { + let attempts = 0; + + // We try to gather all records within a specified time limit. + // We issue retries due to an indeterminate amount of time required + // for record propagation. + console.info("Checking DNS records in Route 53..."); + while (attempts < maxRetries) { + try { + const allRecordSets = await paginateListResourceRecordSets( + route53Client, + { + HostedZoneId: hostedZoneId, + MaxItems: "300", + } + ); + + const recordExists = recordNames.every((name) => + allRecordSets.some((r) => r.Name.includes(name)) + ); + + if (recordExists) { + console.info("All records found in Route 53."); + return true; + } + + // If any record is not found, throw an error to trigger a retry + throw new Error( + "One or more DNS records not found in Route 53, retrying..." + ); + } catch (error) { + console.error(`Attempt ${attempts + 1}:`, error.message); + if (attempts === maxRetries - 1) { + return false; // Return false after the last attempt + } + // Exponential backoff + await setTimeout(initialBackoffMs * 2 ** attempts); + attempts++; + } + } + // Should not reach here if retries are exhausted + return false; +} diff --git a/.github/scripts/crib/package-lock.json b/.github/scripts/crib/package-lock.json deleted file mode 100644 index cf3922a3fb0..00000000000 --- a/.github/scripts/crib/package-lock.json +++ /dev/null @@ -1,440 +0,0 @@ -{ - "name": "crib", - "version": "1.0.0", - "lockfileVersion": 2, - "requires": true, - "packages": { - "": { - "name": "crib", - "version": "1.0.0", - "license": "MIT", - "dependencies": { - "@actions/core": "^1.10.1", - "@actions/github": "^6.0.0", - "@octokit/rest": "^20.0.2" - } - }, - "node_modules/@actions/core": { - "version": "1.10.1", - "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.10.1.tgz", - "integrity": "sha512-3lBR9EDAY+iYIpTnTIXmWcNbX3T2kCkAEQGIQx4NVQ0575nk2k3GRZDTPQG+vVtS2izSLmINlxXf0uLtnrTP+g==", - "dependencies": { - "@actions/http-client": "^2.0.1", - "uuid": "^8.3.2" - } - }, - "node_modules/@actions/github": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/@actions/github/-/github-6.0.0.tgz", - "integrity": "sha512-alScpSVnYmjNEXboZjarjukQEzgCRmjMv6Xj47fsdnqGS73bjJNDpiiXmp8jr0UZLdUB6d9jW63IcmddUP+l0g==", - "dependencies": { - "@actions/http-client": "^2.2.0", - "@octokit/core": "^5.0.1", - "@octokit/plugin-paginate-rest": "^9.0.0", - "@octokit/plugin-rest-endpoint-methods": "^10.0.0" - } - }, - "node_modules/@actions/http-client": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.2.0.tgz", - "integrity": "sha512-q+epW0trjVUUHboliPb4UF9g2msf+w61b32tAkFEwL/IwP0DQWgbCMM0Hbe3e3WXSKz5VcUXbzJQgy8Hkra/Lg==", - "dependencies": { - "tunnel": "^0.0.6", - "undici": "^5.25.4" - } - }, - "node_modules/@fastify/busboy": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.1.tgz", - "integrity": "sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==", - "engines": { - "node": ">=14" - } - }, - "node_modules/@octokit/auth-token": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-4.0.0.tgz", - "integrity": "sha512-tY/msAuJo6ARbK6SPIxZrPBms3xPbfwBrulZe0Wtr/DIY9lje2HeV1uoebShn6mx7SjCHif6EjMvoREj+gZ+SA==", - "engines": { - "node": ">= 18" - } - }, - "node_modules/@octokit/core": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@octokit/core/-/core-5.1.0.tgz", - "integrity": "sha512-BDa2VAMLSh3otEiaMJ/3Y36GU4qf6GI+VivQ/P41NC6GHcdxpKlqV0ikSZ5gdQsmS3ojXeRx5vasgNTinF0Q4g==", - "dependencies": { - "@octokit/auth-token": "^4.0.0", - "@octokit/graphql": "^7.0.0", - "@octokit/request": "^8.0.2", - "@octokit/request-error": "^5.0.0", - "@octokit/types": "^12.0.0", - "before-after-hook": "^2.2.0", - "universal-user-agent": "^6.0.0" - }, - "engines": { - "node": ">= 18" - } - }, - "node_modules/@octokit/endpoint": { - "version": "9.0.4", - "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-9.0.4.tgz", - "integrity": "sha512-DWPLtr1Kz3tv8L0UvXTDP1fNwM0S+z6EJpRcvH66orY6Eld4XBMCSYsaWp4xIm61jTWxK68BrR7ibO+vSDnZqw==", - "dependencies": { - "@octokit/types": "^12.0.0", - "universal-user-agent": "^6.0.0" - }, - "engines": { - "node": ">= 18" - } - }, - "node_modules/@octokit/graphql": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-7.0.2.tgz", - "integrity": "sha512-OJ2iGMtj5Tg3s6RaXH22cJcxXRi7Y3EBqbHTBRq+PQAqfaS8f/236fUrWhfSn8P4jovyzqucxme7/vWSSZBX2Q==", - "dependencies": { - "@octokit/request": "^8.0.1", - "@octokit/types": "^12.0.0", - "universal-user-agent": "^6.0.0" - }, - "engines": { - "node": ">= 18" - } - }, - "node_modules/@octokit/openapi-types": { - "version": "20.0.0", - "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-20.0.0.tgz", - "integrity": "sha512-EtqRBEjp1dL/15V7WiX5LJMIxxkdiGJnabzYx5Apx4FkQIFgAfKumXeYAqqJCj1s+BMX4cPFIFC4OLCR6stlnA==" - }, - "node_modules/@octokit/plugin-paginate-rest": { - "version": "9.2.1", - "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-9.2.1.tgz", - "integrity": "sha512-wfGhE/TAkXZRLjksFXuDZdmGnJQHvtU/joFQdweXUgzo1XwvBCD4o4+75NtFfjfLK5IwLf9vHTfSiU3sLRYpRw==", - "dependencies": { - "@octokit/types": "^12.6.0" - }, - "engines": { - "node": ">= 18" - }, - "peerDependencies": { - "@octokit/core": "5" - } - }, - "node_modules/@octokit/plugin-request-log": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@octokit/plugin-request-log/-/plugin-request-log-4.0.1.tgz", - "integrity": "sha512-GihNqNpGHorUrO7Qa9JbAl0dbLnqJVrV8OXe2Zm5/Y4wFkZQDfTreBzVmiRfJVfE4mClXdihHnbpyyO9FSX4HA==", - "engines": { - "node": ">= 18" - }, - "peerDependencies": { - "@octokit/core": "5" - } - }, - "node_modules/@octokit/plugin-rest-endpoint-methods": { - "version": "10.4.1", - "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-10.4.1.tgz", - "integrity": "sha512-xV1b+ceKV9KytQe3zCVqjg+8GTGfDYwaT1ATU5isiUyVtlVAO3HNdzpS4sr4GBx4hxQ46s7ITtZrAsxG22+rVg==", - "dependencies": { - "@octokit/types": "^12.6.0" - }, - "engines": { - "node": ">= 18" - }, - "peerDependencies": { - "@octokit/core": "5" - } - }, - "node_modules/@octokit/request": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/@octokit/request/-/request-8.2.0.tgz", - "integrity": "sha512-exPif6x5uwLqv1N1irkLG1zZNJkOtj8bZxuVHd71U5Ftuxf2wGNvAJyNBcPbPC+EBzwYEbBDdSFb8EPcjpYxPQ==", - "dependencies": { - "@octokit/endpoint": "^9.0.0", - "@octokit/request-error": "^5.0.0", - "@octokit/types": "^12.0.0", - "universal-user-agent": "^6.0.0" - }, - "engines": { - "node": ">= 18" - } - }, - "node_modules/@octokit/request-error": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-5.0.1.tgz", - "integrity": "sha512-X7pnyTMV7MgtGmiXBwmO6M5kIPrntOXdyKZLigNfQWSEQzVxR4a4vo49vJjTWX70mPndj8KhfT4Dx+2Ng3vnBQ==", - "dependencies": { - "@octokit/types": "^12.0.0", - "deprecation": "^2.0.0", - "once": "^1.4.0" - }, - "engines": { - "node": ">= 18" - } - }, - "node_modules/@octokit/rest": { - "version": "20.0.2", - "resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-20.0.2.tgz", - "integrity": "sha512-Ux8NDgEraQ/DMAU1PlAohyfBBXDwhnX2j33Z1nJNziqAfHi70PuxkFYIcIt8aIAxtRE7KVuKp8lSR8pA0J5iOQ==", - "dependencies": { - "@octokit/core": "^5.0.0", - "@octokit/plugin-paginate-rest": "^9.0.0", - "@octokit/plugin-request-log": "^4.0.0", - "@octokit/plugin-rest-endpoint-methods": "^10.0.0" - }, - "engines": { - "node": ">= 18" - } - }, - "node_modules/@octokit/types": { - "version": "12.6.0", - "resolved": "https://registry.npmjs.org/@octokit/types/-/types-12.6.0.tgz", - "integrity": "sha512-1rhSOfRa6H9w4YwK0yrf5faDaDTb+yLyBUKOCV4xtCDB5VmIPqd/v9yr9o6SAzOAlRxMiRiCic6JVM1/kunVkw==", - "dependencies": { - "@octokit/openapi-types": "^20.0.0" - } - }, - "node_modules/before-after-hook": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.3.tgz", - "integrity": "sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ==" - }, - "node_modules/deprecation": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz", - "integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ==" - }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dependencies": { - "wrappy": "1" - } - }, - "node_modules/tunnel": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", - "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==", - "engines": { - "node": ">=0.6.11 <=0.7.0 || >=0.7.3" - } - }, - "node_modules/undici": { - "version": "5.28.3", - "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.3.tgz", - "integrity": "sha512-3ItfzbrhDlINjaP0duwnNsKpDQk3acHI3gVJ1z4fmwMK31k5G9OVIAMLSIaP6w4FaGkaAkN6zaQO9LUvZ1t7VA==", - "dependencies": { - "@fastify/busboy": "^2.0.0" - }, - "engines": { - "node": ">=14.0" - } - }, - "node_modules/universal-user-agent": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.1.tgz", - "integrity": "sha512-yCzhz6FN2wU1NiiQRogkTQszlQSlpWaw8SvVegAc+bDxbzHgh1vX8uIe8OYyMH6DwH+sdTJsgMl36+mSMdRJIQ==" - }, - "node_modules/uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", - "bin": { - "uuid": "dist/bin/uuid" - } - }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" - } - }, - "dependencies": { - "@actions/core": { - "version": "1.10.1", - "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.10.1.tgz", - "integrity": "sha512-3lBR9EDAY+iYIpTnTIXmWcNbX3T2kCkAEQGIQx4NVQ0575nk2k3GRZDTPQG+vVtS2izSLmINlxXf0uLtnrTP+g==", - "requires": { - "@actions/http-client": "^2.0.1", - "uuid": "^8.3.2" - } - }, - "@actions/github": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/@actions/github/-/github-6.0.0.tgz", - "integrity": "sha512-alScpSVnYmjNEXboZjarjukQEzgCRmjMv6Xj47fsdnqGS73bjJNDpiiXmp8jr0UZLdUB6d9jW63IcmddUP+l0g==", - "requires": { - "@actions/http-client": "^2.2.0", - "@octokit/core": "^5.0.1", - "@octokit/plugin-paginate-rest": "^9.0.0", - "@octokit/plugin-rest-endpoint-methods": "^10.0.0" - } - }, - "@actions/http-client": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.2.0.tgz", - "integrity": "sha512-q+epW0trjVUUHboliPb4UF9g2msf+w61b32tAkFEwL/IwP0DQWgbCMM0Hbe3e3WXSKz5VcUXbzJQgy8Hkra/Lg==", - "requires": { - "tunnel": "^0.0.6", - "undici": "^5.25.4" - } - }, - "@fastify/busboy": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.1.tgz", - "integrity": "sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==" - }, - "@octokit/auth-token": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-4.0.0.tgz", - "integrity": "sha512-tY/msAuJo6ARbK6SPIxZrPBms3xPbfwBrulZe0Wtr/DIY9lje2HeV1uoebShn6mx7SjCHif6EjMvoREj+gZ+SA==" - }, - "@octokit/core": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@octokit/core/-/core-5.1.0.tgz", - "integrity": "sha512-BDa2VAMLSh3otEiaMJ/3Y36GU4qf6GI+VivQ/P41NC6GHcdxpKlqV0ikSZ5gdQsmS3ojXeRx5vasgNTinF0Q4g==", - "requires": { - "@octokit/auth-token": "^4.0.0", - "@octokit/graphql": "^7.0.0", - "@octokit/request": "^8.0.2", - "@octokit/request-error": "^5.0.0", - "@octokit/types": "^12.0.0", - "before-after-hook": "^2.2.0", - "universal-user-agent": "^6.0.0" - } - }, - "@octokit/endpoint": { - "version": "9.0.4", - "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-9.0.4.tgz", - "integrity": "sha512-DWPLtr1Kz3tv8L0UvXTDP1fNwM0S+z6EJpRcvH66orY6Eld4XBMCSYsaWp4xIm61jTWxK68BrR7ibO+vSDnZqw==", - "requires": { - "@octokit/types": "^12.0.0", - "universal-user-agent": "^6.0.0" - } - }, - "@octokit/graphql": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-7.0.2.tgz", - "integrity": "sha512-OJ2iGMtj5Tg3s6RaXH22cJcxXRi7Y3EBqbHTBRq+PQAqfaS8f/236fUrWhfSn8P4jovyzqucxme7/vWSSZBX2Q==", - "requires": { - "@octokit/request": "^8.0.1", - "@octokit/types": "^12.0.0", - "universal-user-agent": "^6.0.0" - } - }, - "@octokit/openapi-types": { - "version": "20.0.0", - "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-20.0.0.tgz", - "integrity": "sha512-EtqRBEjp1dL/15V7WiX5LJMIxxkdiGJnabzYx5Apx4FkQIFgAfKumXeYAqqJCj1s+BMX4cPFIFC4OLCR6stlnA==" - }, - "@octokit/plugin-paginate-rest": { - "version": "9.2.1", - "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-9.2.1.tgz", - "integrity": "sha512-wfGhE/TAkXZRLjksFXuDZdmGnJQHvtU/joFQdweXUgzo1XwvBCD4o4+75NtFfjfLK5IwLf9vHTfSiU3sLRYpRw==", - "requires": { - "@octokit/types": "^12.6.0" - } - }, - "@octokit/plugin-request-log": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@octokit/plugin-request-log/-/plugin-request-log-4.0.1.tgz", - "integrity": "sha512-GihNqNpGHorUrO7Qa9JbAl0dbLnqJVrV8OXe2Zm5/Y4wFkZQDfTreBzVmiRfJVfE4mClXdihHnbpyyO9FSX4HA==", - "requires": {} - }, - "@octokit/plugin-rest-endpoint-methods": { - "version": "10.4.1", - "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-10.4.1.tgz", - "integrity": "sha512-xV1b+ceKV9KytQe3zCVqjg+8GTGfDYwaT1ATU5isiUyVtlVAO3HNdzpS4sr4GBx4hxQ46s7ITtZrAsxG22+rVg==", - "requires": { - "@octokit/types": "^12.6.0" - } - }, - "@octokit/request": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/@octokit/request/-/request-8.2.0.tgz", - "integrity": "sha512-exPif6x5uwLqv1N1irkLG1zZNJkOtj8bZxuVHd71U5Ftuxf2wGNvAJyNBcPbPC+EBzwYEbBDdSFb8EPcjpYxPQ==", - "requires": { - "@octokit/endpoint": "^9.0.0", - "@octokit/request-error": "^5.0.0", - "@octokit/types": "^12.0.0", - "universal-user-agent": "^6.0.0" - } - }, - "@octokit/request-error": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-5.0.1.tgz", - "integrity": "sha512-X7pnyTMV7MgtGmiXBwmO6M5kIPrntOXdyKZLigNfQWSEQzVxR4a4vo49vJjTWX70mPndj8KhfT4Dx+2Ng3vnBQ==", - "requires": { - "@octokit/types": "^12.0.0", - "deprecation": "^2.0.0", - "once": "^1.4.0" - } - }, - "@octokit/rest": { - "version": "20.0.2", - "resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-20.0.2.tgz", - "integrity": "sha512-Ux8NDgEraQ/DMAU1PlAohyfBBXDwhnX2j33Z1nJNziqAfHi70PuxkFYIcIt8aIAxtRE7KVuKp8lSR8pA0J5iOQ==", - "requires": { - "@octokit/core": "^5.0.0", - "@octokit/plugin-paginate-rest": "^9.0.0", - "@octokit/plugin-request-log": "^4.0.0", - "@octokit/plugin-rest-endpoint-methods": "^10.0.0" - } - }, - "@octokit/types": { - "version": "12.6.0", - "resolved": "https://registry.npmjs.org/@octokit/types/-/types-12.6.0.tgz", - "integrity": "sha512-1rhSOfRa6H9w4YwK0yrf5faDaDTb+yLyBUKOCV4xtCDB5VmIPqd/v9yr9o6SAzOAlRxMiRiCic6JVM1/kunVkw==", - "requires": { - "@octokit/openapi-types": "^20.0.0" - } - }, - "before-after-hook": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.3.tgz", - "integrity": "sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ==" - }, - "deprecation": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz", - "integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ==" - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "requires": { - "wrappy": "1" - } - }, - "tunnel": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", - "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==" - }, - "undici": { - "version": "5.28.3", - "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.3.tgz", - "integrity": "sha512-3ItfzbrhDlINjaP0duwnNsKpDQk3acHI3gVJ1z4fmwMK31k5G9OVIAMLSIaP6w4FaGkaAkN6zaQO9LUvZ1t7VA==", - "requires": { - "@fastify/busboy": "^2.0.0" - } - }, - "universal-user-agent": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.1.tgz", - "integrity": "sha512-yCzhz6FN2wU1NiiQRogkTQszlQSlpWaw8SvVegAc+bDxbzHgh1vX8uIe8OYyMH6DwH+sdTJsgMl36+mSMdRJIQ==" - }, - "uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==" - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" - } - } -} diff --git a/.github/scripts/crib/package.json b/.github/scripts/crib/package.json index 5382bff571e..8a935ecae32 100644 --- a/.github/scripts/crib/package.json +++ b/.github/scripts/crib/package.json @@ -3,15 +3,14 @@ "version": "1.0.0", "description": "", "main": "pr-comment-crib-env.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, + "type": "module", "keywords": [], "author": "", "license": "MIT", "dependencies": { "@actions/core": "^1.10.1", "@actions/github": "^6.0.0", + "@aws-sdk/client-route-53": "^3.525.0", "@octokit/rest": "^20.0.2" } } diff --git a/.github/scripts/crib/pnpm-lock.yaml b/.github/scripts/crib/pnpm-lock.yaml new file mode 100644 index 00000000000..c449716078f --- /dev/null +++ b/.github/scripts/crib/pnpm-lock.yaml @@ -0,0 +1,1099 @@ +lockfileVersion: '6.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +dependencies: + '@actions/core': + specifier: ^1.10.1 + version: 1.10.1 + '@actions/github': + specifier: ^6.0.0 + version: 6.0.0 + '@aws-sdk/client-route-53': + specifier: ^3.525.0 + version: 3.529.1 + '@octokit/rest': + specifier: ^20.0.2 + version: 20.0.2 + +packages: + + /@actions/core@1.10.1: + resolution: {integrity: sha512-3lBR9EDAY+iYIpTnTIXmWcNbX3T2kCkAEQGIQx4NVQ0575nk2k3GRZDTPQG+vVtS2izSLmINlxXf0uLtnrTP+g==} + dependencies: + '@actions/http-client': 2.2.1 + uuid: 8.3.2 + dev: false + + /@actions/github@6.0.0: + resolution: {integrity: sha512-alScpSVnYmjNEXboZjarjukQEzgCRmjMv6Xj47fsdnqGS73bjJNDpiiXmp8jr0UZLdUB6d9jW63IcmddUP+l0g==} + dependencies: + '@actions/http-client': 2.2.1 + '@octokit/core': 5.1.0 + '@octokit/plugin-paginate-rest': 9.2.1(@octokit/core@5.1.0) + '@octokit/plugin-rest-endpoint-methods': 10.4.1(@octokit/core@5.1.0) + dev: false + + /@actions/http-client@2.2.1: + resolution: {integrity: sha512-KhC/cZsq7f8I4LfZSJKgCvEwfkE8o1538VoBeoGzokVLLnbFDEAdFD3UhoMklxo2un9NJVBdANOresx7vTHlHw==} + dependencies: + tunnel: 0.0.6 + undici: 5.28.3 + dev: false + + /@aws-crypto/crc32@3.0.0: + resolution: {integrity: sha512-IzSgsrxUcsrejQbPVilIKy16kAT52EwB6zSaI+M3xxIhKh5+aldEyvI+z6erM7TCLB2BJsFrtHjp6/4/sr+3dA==} + dependencies: + '@aws-crypto/util': 3.0.0 + '@aws-sdk/types': 3.523.0 + tslib: 1.14.1 + dev: false + + /@aws-crypto/ie11-detection@3.0.0: + resolution: {integrity: sha512-341lBBkiY1DfDNKai/wXM3aujNBkXR7tq1URPQDL9wi3AUbI80NR74uF1TXHMm7po1AcnFk8iu2S2IeU/+/A+Q==} + dependencies: + tslib: 1.14.1 + dev: false + + /@aws-crypto/sha256-browser@3.0.0: + resolution: {integrity: sha512-8VLmW2B+gjFbU5uMeqtQM6Nj0/F1bro80xQXCW6CQBWgosFWXTx77aeOF5CAIAmbOK64SdMBJdNr6J41yP5mvQ==} + dependencies: + '@aws-crypto/ie11-detection': 3.0.0 + '@aws-crypto/sha256-js': 3.0.0 + '@aws-crypto/supports-web-crypto': 3.0.0 + '@aws-crypto/util': 3.0.0 + '@aws-sdk/types': 3.523.0 + '@aws-sdk/util-locate-window': 3.495.0 + '@aws-sdk/util-utf8-browser': 3.259.0 + tslib: 1.14.1 + dev: false + + /@aws-crypto/sha256-js@3.0.0: + resolution: {integrity: sha512-PnNN7os0+yd1XvXAy23CFOmTbMaDxgxXtTKHybrJ39Y8kGzBATgBFibWJKH6BhytLI/Zyszs87xCOBNyBig6vQ==} + dependencies: + '@aws-crypto/util': 3.0.0 + '@aws-sdk/types': 3.523.0 + tslib: 1.14.1 + dev: false + + /@aws-crypto/supports-web-crypto@3.0.0: + resolution: {integrity: sha512-06hBdMwUAb2WFTuGG73LSC0wfPu93xWwo5vL2et9eymgmu3Id5vFAHBbajVWiGhPO37qcsdCap/FqXvJGJWPIg==} + dependencies: + tslib: 1.14.1 + dev: false + + /@aws-crypto/util@3.0.0: + resolution: {integrity: sha512-2OJlpeJpCR48CC8r+uKVChzs9Iungj9wkZrl8Z041DWEWvyIHILYKCPNzJghKsivj+S3mLo6BVc7mBNzdxA46w==} + dependencies: + '@aws-sdk/types': 3.523.0 + '@aws-sdk/util-utf8-browser': 3.259.0 + tslib: 1.14.1 + dev: false + + /@aws-sdk/client-route-53@3.529.1: + resolution: {integrity: sha512-osra30V5ILwEBeE1DUZreY7HYWQGco+WcQ1qg1UDSh/C0Nyxlu+8bVpwB/bjaldmy5Fi9MRv8SQsMdiAJFNp+w==} + engines: {node: '>=14.0.0'} + dependencies: + '@aws-crypto/sha256-browser': 3.0.0 + '@aws-crypto/sha256-js': 3.0.0 + '@aws-sdk/client-sts': 3.529.1(@aws-sdk/credential-provider-node@3.529.1) + '@aws-sdk/core': 3.529.1 + '@aws-sdk/credential-provider-node': 3.529.1 + '@aws-sdk/middleware-host-header': 3.523.0 + '@aws-sdk/middleware-logger': 3.523.0 + '@aws-sdk/middleware-recursion-detection': 3.523.0 + '@aws-sdk/middleware-sdk-route53': 3.523.0 + '@aws-sdk/middleware-user-agent': 3.525.0 + '@aws-sdk/region-config-resolver': 3.525.0 + '@aws-sdk/types': 3.523.0 + '@aws-sdk/util-endpoints': 3.525.0 + '@aws-sdk/util-user-agent-browser': 3.523.0 + '@aws-sdk/util-user-agent-node': 3.525.0 + '@aws-sdk/xml-builder': 3.523.0 + '@smithy/config-resolver': 2.1.5 + '@smithy/core': 1.3.8 + '@smithy/fetch-http-handler': 2.4.5 + '@smithy/hash-node': 2.1.4 + '@smithy/invalid-dependency': 2.1.4 + '@smithy/middleware-content-length': 2.1.4 + '@smithy/middleware-endpoint': 2.4.6 + '@smithy/middleware-retry': 2.1.7 + '@smithy/middleware-serde': 2.2.1 + '@smithy/middleware-stack': 2.1.4 + '@smithy/node-config-provider': 2.2.5 + '@smithy/node-http-handler': 2.4.3 + '@smithy/protocol-http': 3.2.2 + '@smithy/smithy-client': 2.4.5 + '@smithy/types': 2.11.0 + '@smithy/url-parser': 2.1.4 + '@smithy/util-base64': 2.2.1 + '@smithy/util-body-length-browser': 2.1.1 + '@smithy/util-body-length-node': 2.2.2 + '@smithy/util-defaults-mode-browser': 2.1.7 + '@smithy/util-defaults-mode-node': 2.2.7 + '@smithy/util-endpoints': 1.1.5 + '@smithy/util-middleware': 2.1.4 + '@smithy/util-retry': 2.1.4 + '@smithy/util-utf8': 2.2.0 + '@smithy/util-waiter': 2.1.4 + tslib: 2.6.2 + transitivePeerDependencies: + - aws-crt + dev: false + + /@aws-sdk/client-sso-oidc@3.529.1(@aws-sdk/credential-provider-node@3.529.1): + resolution: {integrity: sha512-bimxCWAvRnVcluWEQeadXvHyzWlBWsuGVligsaVZaGF0TLSn0eLpzpN9B1EhHzTf7m0Kh/wGtPSH1JxO6PpB+A==} + engines: {node: '>=14.0.0'} + peerDependencies: + '@aws-sdk/credential-provider-node': ^3.529.1 + dependencies: + '@aws-crypto/sha256-browser': 3.0.0 + '@aws-crypto/sha256-js': 3.0.0 + '@aws-sdk/client-sts': 3.529.1(@aws-sdk/credential-provider-node@3.529.1) + '@aws-sdk/core': 3.529.1 + '@aws-sdk/credential-provider-node': 3.529.1 + '@aws-sdk/middleware-host-header': 3.523.0 + '@aws-sdk/middleware-logger': 3.523.0 + '@aws-sdk/middleware-recursion-detection': 3.523.0 + '@aws-sdk/middleware-user-agent': 3.525.0 + '@aws-sdk/region-config-resolver': 3.525.0 + '@aws-sdk/types': 3.523.0 + '@aws-sdk/util-endpoints': 3.525.0 + '@aws-sdk/util-user-agent-browser': 3.523.0 + '@aws-sdk/util-user-agent-node': 3.525.0 + '@smithy/config-resolver': 2.1.5 + '@smithy/core': 1.3.8 + '@smithy/fetch-http-handler': 2.4.5 + '@smithy/hash-node': 2.1.4 + '@smithy/invalid-dependency': 2.1.4 + '@smithy/middleware-content-length': 2.1.4 + '@smithy/middleware-endpoint': 2.4.6 + '@smithy/middleware-retry': 2.1.7 + '@smithy/middleware-serde': 2.2.1 + '@smithy/middleware-stack': 2.1.4 + '@smithy/node-config-provider': 2.2.5 + '@smithy/node-http-handler': 2.4.3 + '@smithy/protocol-http': 3.2.2 + '@smithy/smithy-client': 2.4.5 + '@smithy/types': 2.11.0 + '@smithy/url-parser': 2.1.4 + '@smithy/util-base64': 2.2.1 + '@smithy/util-body-length-browser': 2.1.1 + '@smithy/util-body-length-node': 2.2.2 + '@smithy/util-defaults-mode-browser': 2.1.7 + '@smithy/util-defaults-mode-node': 2.2.7 + '@smithy/util-endpoints': 1.1.5 + '@smithy/util-middleware': 2.1.4 + '@smithy/util-retry': 2.1.4 + '@smithy/util-utf8': 2.2.0 + tslib: 2.6.2 + transitivePeerDependencies: + - aws-crt + dev: false + + /@aws-sdk/client-sso@3.529.1: + resolution: {integrity: sha512-KT1U/ZNjDhVv2ZgjzaeAn9VM7l667yeSguMrRYC8qk5h91/61MbjZypi6eOuKuVM+0fsQvzKScTQz0Lio0eYag==} + engines: {node: '>=14.0.0'} + dependencies: + '@aws-crypto/sha256-browser': 3.0.0 + '@aws-crypto/sha256-js': 3.0.0 + '@aws-sdk/core': 3.529.1 + '@aws-sdk/middleware-host-header': 3.523.0 + '@aws-sdk/middleware-logger': 3.523.0 + '@aws-sdk/middleware-recursion-detection': 3.523.0 + '@aws-sdk/middleware-user-agent': 3.525.0 + '@aws-sdk/region-config-resolver': 3.525.0 + '@aws-sdk/types': 3.523.0 + '@aws-sdk/util-endpoints': 3.525.0 + '@aws-sdk/util-user-agent-browser': 3.523.0 + '@aws-sdk/util-user-agent-node': 3.525.0 + '@smithy/config-resolver': 2.1.5 + '@smithy/core': 1.3.8 + '@smithy/fetch-http-handler': 2.4.5 + '@smithy/hash-node': 2.1.4 + '@smithy/invalid-dependency': 2.1.4 + '@smithy/middleware-content-length': 2.1.4 + '@smithy/middleware-endpoint': 2.4.6 + '@smithy/middleware-retry': 2.1.7 + '@smithy/middleware-serde': 2.2.1 + '@smithy/middleware-stack': 2.1.4 + '@smithy/node-config-provider': 2.2.5 + '@smithy/node-http-handler': 2.4.3 + '@smithy/protocol-http': 3.2.2 + '@smithy/smithy-client': 2.4.5 + '@smithy/types': 2.11.0 + '@smithy/url-parser': 2.1.4 + '@smithy/util-base64': 2.2.1 + '@smithy/util-body-length-browser': 2.1.1 + '@smithy/util-body-length-node': 2.2.2 + '@smithy/util-defaults-mode-browser': 2.1.7 + '@smithy/util-defaults-mode-node': 2.2.7 + '@smithy/util-endpoints': 1.1.5 + '@smithy/util-middleware': 2.1.4 + '@smithy/util-retry': 2.1.4 + '@smithy/util-utf8': 2.2.0 + tslib: 2.6.2 + transitivePeerDependencies: + - aws-crt + dev: false + + /@aws-sdk/client-sts@3.529.1(@aws-sdk/credential-provider-node@3.529.1): + resolution: {integrity: sha512-Rvk2Sr3MACQTOtngUU+omlf4E17k47dRVXR7OFRD6Ow5iGgC9tkN2q/ExDPW/ktPOmM0lSgzWyQ6/PC/Zq3HUg==} + engines: {node: '>=14.0.0'} + peerDependencies: + '@aws-sdk/credential-provider-node': ^3.529.1 + dependencies: + '@aws-crypto/sha256-browser': 3.0.0 + '@aws-crypto/sha256-js': 3.0.0 + '@aws-sdk/core': 3.529.1 + '@aws-sdk/credential-provider-node': 3.529.1 + '@aws-sdk/middleware-host-header': 3.523.0 + '@aws-sdk/middleware-logger': 3.523.0 + '@aws-sdk/middleware-recursion-detection': 3.523.0 + '@aws-sdk/middleware-user-agent': 3.525.0 + '@aws-sdk/region-config-resolver': 3.525.0 + '@aws-sdk/types': 3.523.0 + '@aws-sdk/util-endpoints': 3.525.0 + '@aws-sdk/util-user-agent-browser': 3.523.0 + '@aws-sdk/util-user-agent-node': 3.525.0 + '@smithy/config-resolver': 2.1.5 + '@smithy/core': 1.3.8 + '@smithy/fetch-http-handler': 2.4.5 + '@smithy/hash-node': 2.1.4 + '@smithy/invalid-dependency': 2.1.4 + '@smithy/middleware-content-length': 2.1.4 + '@smithy/middleware-endpoint': 2.4.6 + '@smithy/middleware-retry': 2.1.7 + '@smithy/middleware-serde': 2.2.1 + '@smithy/middleware-stack': 2.1.4 + '@smithy/node-config-provider': 2.2.5 + '@smithy/node-http-handler': 2.4.3 + '@smithy/protocol-http': 3.2.2 + '@smithy/smithy-client': 2.4.5 + '@smithy/types': 2.11.0 + '@smithy/url-parser': 2.1.4 + '@smithy/util-base64': 2.2.1 + '@smithy/util-body-length-browser': 2.1.1 + '@smithy/util-body-length-node': 2.2.2 + '@smithy/util-defaults-mode-browser': 2.1.7 + '@smithy/util-defaults-mode-node': 2.2.7 + '@smithy/util-endpoints': 1.1.5 + '@smithy/util-middleware': 2.1.4 + '@smithy/util-retry': 2.1.4 + '@smithy/util-utf8': 2.2.0 + tslib: 2.6.2 + transitivePeerDependencies: + - aws-crt + dev: false + + /@aws-sdk/core@3.529.1: + resolution: {integrity: sha512-Sj42sYPfaL9PHvvciMICxhyrDZjqnnvFbPKDmQL5aFKyXy122qx7RdVqUOQERDmMQfvJh6+0W1zQlLnre89q4Q==} + engines: {node: '>=14.0.0'} + dependencies: + '@smithy/core': 1.3.8 + '@smithy/protocol-http': 3.2.2 + '@smithy/signature-v4': 2.1.4 + '@smithy/smithy-client': 2.4.5 + '@smithy/types': 2.11.0 + fast-xml-parser: 4.2.5 + tslib: 2.6.2 + dev: false + + /@aws-sdk/credential-provider-env@3.523.0: + resolution: {integrity: sha512-Y6DWdH6/OuMDoNKVzZlNeBc6f1Yjk1lYMjANKpIhMbkRCvLJw/PYZKOZa8WpXbTYdgg9XLjKybnLIb3ww3uuzA==} + engines: {node: '>=14.0.0'} + dependencies: + '@aws-sdk/types': 3.523.0 + '@smithy/property-provider': 2.1.4 + '@smithy/types': 2.11.0 + tslib: 2.6.2 + dev: false + + /@aws-sdk/credential-provider-http@3.525.0: + resolution: {integrity: sha512-RNWQGuSBQZhl3iqklOslUEfQ4br1V3DCPboMpeqFtddUWJV3m2u2extFur9/4Uy+1EHVF120IwZUKtd8dF+ibw==} + engines: {node: '>=14.0.0'} + dependencies: + '@aws-sdk/types': 3.523.0 + '@smithy/fetch-http-handler': 2.4.5 + '@smithy/node-http-handler': 2.4.3 + '@smithy/property-provider': 2.1.4 + '@smithy/protocol-http': 3.2.2 + '@smithy/smithy-client': 2.4.5 + '@smithy/types': 2.11.0 + '@smithy/util-stream': 2.1.5 + tslib: 2.6.2 + dev: false + + /@aws-sdk/credential-provider-ini@3.529.1(@aws-sdk/credential-provider-node@3.529.1): + resolution: {integrity: sha512-RjHsuTvHIwXG7a/3ERexemiD3c9riKMCZQzY2/b0Gg0ButEVbBcMfERtUzWmQ0V4ufe/PEZjP68MH1gupcoF9A==} + engines: {node: '>=14.0.0'} + dependencies: + '@aws-sdk/client-sts': 3.529.1(@aws-sdk/credential-provider-node@3.529.1) + '@aws-sdk/credential-provider-env': 3.523.0 + '@aws-sdk/credential-provider-process': 3.523.0 + '@aws-sdk/credential-provider-sso': 3.529.1(@aws-sdk/credential-provider-node@3.529.1) + '@aws-sdk/credential-provider-web-identity': 3.529.1(@aws-sdk/credential-provider-node@3.529.1) + '@aws-sdk/types': 3.523.0 + '@smithy/credential-provider-imds': 2.2.6 + '@smithy/property-provider': 2.1.4 + '@smithy/shared-ini-file-loader': 2.3.5 + '@smithy/types': 2.11.0 + tslib: 2.6.2 + transitivePeerDependencies: + - '@aws-sdk/credential-provider-node' + - aws-crt + dev: false + + /@aws-sdk/credential-provider-node@3.529.1: + resolution: {integrity: sha512-mvY7F3dMmk/0dZOCfl5sUI1bG0osureBjxhELGCF0KkJqhWI0hIzh8UnPkYytSg3vdc97CMv7pTcozxrdA3b0g==} + engines: {node: '>=14.0.0'} + dependencies: + '@aws-sdk/credential-provider-env': 3.523.0 + '@aws-sdk/credential-provider-http': 3.525.0 + '@aws-sdk/credential-provider-ini': 3.529.1(@aws-sdk/credential-provider-node@3.529.1) + '@aws-sdk/credential-provider-process': 3.523.0 + '@aws-sdk/credential-provider-sso': 3.529.1(@aws-sdk/credential-provider-node@3.529.1) + '@aws-sdk/credential-provider-web-identity': 3.529.1(@aws-sdk/credential-provider-node@3.529.1) + '@aws-sdk/types': 3.523.0 + '@smithy/credential-provider-imds': 2.2.6 + '@smithy/property-provider': 2.1.4 + '@smithy/shared-ini-file-loader': 2.3.5 + '@smithy/types': 2.11.0 + tslib: 2.6.2 + transitivePeerDependencies: + - aws-crt + dev: false + + /@aws-sdk/credential-provider-process@3.523.0: + resolution: {integrity: sha512-f0LP9KlFmMvPWdKeUKYlZ6FkQAECUeZMmISsv6NKtvPCI9e4O4cLTeR09telwDK8P0HrgcRuZfXM7E30m8re0Q==} + engines: {node: '>=14.0.0'} + dependencies: + '@aws-sdk/types': 3.523.0 + '@smithy/property-provider': 2.1.4 + '@smithy/shared-ini-file-loader': 2.3.5 + '@smithy/types': 2.11.0 + tslib: 2.6.2 + dev: false + + /@aws-sdk/credential-provider-sso@3.529.1(@aws-sdk/credential-provider-node@3.529.1): + resolution: {integrity: sha512-KFMKkaoTGDgSJG+o9Ii7AglWG5JQeF6IFw9cXLMwDdIrp3KUmRcUIqe0cjOoCqeQEDGy0VHsimHmKKJ3894i/A==} + engines: {node: '>=14.0.0'} + dependencies: + '@aws-sdk/client-sso': 3.529.1 + '@aws-sdk/token-providers': 3.529.1(@aws-sdk/credential-provider-node@3.529.1) + '@aws-sdk/types': 3.523.0 + '@smithy/property-provider': 2.1.4 + '@smithy/shared-ini-file-loader': 2.3.5 + '@smithy/types': 2.11.0 + tslib: 2.6.2 + transitivePeerDependencies: + - '@aws-sdk/credential-provider-node' + - aws-crt + dev: false + + /@aws-sdk/credential-provider-web-identity@3.529.1(@aws-sdk/credential-provider-node@3.529.1): + resolution: {integrity: sha512-AGuZDOKN+AttjwTjrF47WLqzeEut2YynyxjkXZhxZF/xn8i5Y51kUAUdXsXw1bgR25pAeXQIdhsrQlRa1Pm5kw==} + engines: {node: '>=14.0.0'} + dependencies: + '@aws-sdk/client-sts': 3.529.1(@aws-sdk/credential-provider-node@3.529.1) + '@aws-sdk/types': 3.523.0 + '@smithy/property-provider': 2.1.4 + '@smithy/types': 2.11.0 + tslib: 2.6.2 + transitivePeerDependencies: + - '@aws-sdk/credential-provider-node' + - aws-crt + dev: false + + /@aws-sdk/middleware-host-header@3.523.0: + resolution: {integrity: sha512-4g3q7Ta9sdD9TMUuohBAkbx/e3I/juTqfKi7TPgP+8jxcYX72MOsgemAMHuP6CX27eyj4dpvjH+w4SIVDiDSmg==} + engines: {node: '>=14.0.0'} + dependencies: + '@aws-sdk/types': 3.523.0 + '@smithy/protocol-http': 3.2.2 + '@smithy/types': 2.11.0 + tslib: 2.6.2 + dev: false + + /@aws-sdk/middleware-logger@3.523.0: + resolution: {integrity: sha512-PeDNJNhfiaZx54LBaLTXzUaJ9LXFwDFFIksipjqjvxMafnoVcQwKbkoPUWLe5ytT4nnL1LogD3s55mERFUsnwg==} + engines: {node: '>=14.0.0'} + dependencies: + '@aws-sdk/types': 3.523.0 + '@smithy/types': 2.11.0 + tslib: 2.6.2 + dev: false + + /@aws-sdk/middleware-recursion-detection@3.523.0: + resolution: {integrity: sha512-nZ3Vt7ehfSDYnrcg/aAfjjvpdE+61B3Zk68i6/hSUIegT3IH9H1vSW67NDKVp+50hcEfzWwM2HMPXxlzuyFyrw==} + engines: {node: '>=14.0.0'} + dependencies: + '@aws-sdk/types': 3.523.0 + '@smithy/protocol-http': 3.2.2 + '@smithy/types': 2.11.0 + tslib: 2.6.2 + dev: false + + /@aws-sdk/middleware-sdk-route53@3.523.0: + resolution: {integrity: sha512-d+SKqDBM3XCVkF/crRWwJD1WuS4PBY/CaTGwIyND1Z3o3ZCMhyo4f2ni19U+7ZtEULW50ZGznhB2F4GJHqpDUg==} + engines: {node: '>=14.0.0'} + dependencies: + '@aws-sdk/types': 3.523.0 + '@smithy/types': 2.11.0 + tslib: 2.6.2 + dev: false + + /@aws-sdk/middleware-user-agent@3.525.0: + resolution: {integrity: sha512-4al/6uO+t/QIYXK2OgqzDKQzzLAYJza1vWFS+S0lJ3jLNGyLB5BMU5KqWjDzevYZ4eCnz2Nn7z0FveUTNz8YdQ==} + engines: {node: '>=14.0.0'} + dependencies: + '@aws-sdk/types': 3.523.0 + '@aws-sdk/util-endpoints': 3.525.0 + '@smithy/protocol-http': 3.2.2 + '@smithy/types': 2.11.0 + tslib: 2.6.2 + dev: false + + /@aws-sdk/region-config-resolver@3.525.0: + resolution: {integrity: sha512-8kFqXk6UyKgTMi7N7QlhA6qM4pGPWbiUXqEY2RgUWngtxqNFGeM9JTexZeuavQI+qLLe09VPShPNX71fEDcM6w==} + engines: {node: '>=14.0.0'} + dependencies: + '@aws-sdk/types': 3.523.0 + '@smithy/node-config-provider': 2.2.5 + '@smithy/types': 2.11.0 + '@smithy/util-config-provider': 2.2.1 + '@smithy/util-middleware': 2.1.4 + tslib: 2.6.2 + dev: false + + /@aws-sdk/token-providers@3.529.1(@aws-sdk/credential-provider-node@3.529.1): + resolution: {integrity: sha512-NpgMjsfpqiugbxrYGXtta914N43Mx/H0niidqv8wKMTgWQEtsJvYtOni+kuLXB+LmpjaMFNlpadooFU/bK4buA==} + engines: {node: '>=14.0.0'} + dependencies: + '@aws-sdk/client-sso-oidc': 3.529.1(@aws-sdk/credential-provider-node@3.529.1) + '@aws-sdk/types': 3.523.0 + '@smithy/property-provider': 2.1.4 + '@smithy/shared-ini-file-loader': 2.3.5 + '@smithy/types': 2.11.0 + tslib: 2.6.2 + transitivePeerDependencies: + - '@aws-sdk/credential-provider-node' + - aws-crt + dev: false + + /@aws-sdk/types@3.523.0: + resolution: {integrity: sha512-AqGIu4u+SxPiUuNBp2acCVcq80KDUFjxe6e3cMTvKWTzCbrVk1AXv0dAaJnCmdkWIha6zJDWxpIk/aL4EGhZ9A==} + engines: {node: '>=14.0.0'} + dependencies: + '@smithy/types': 2.11.0 + tslib: 2.6.2 + dev: false + + /@aws-sdk/util-endpoints@3.525.0: + resolution: {integrity: sha512-DIW7WWU5tIGkeeKX6NJUyrEIdWMiqjLQG3XBzaUj+ufIENwNjdAHhlD8l2vX7Yr3JZRT6yN/84wBCj7Tw1xd1g==} + engines: {node: '>=14.0.0'} + dependencies: + '@aws-sdk/types': 3.523.0 + '@smithy/types': 2.11.0 + '@smithy/util-endpoints': 1.1.5 + tslib: 2.6.2 + dev: false + + /@aws-sdk/util-locate-window@3.495.0: + resolution: {integrity: sha512-MfaPXT0kLX2tQaR90saBT9fWQq2DHqSSJRzW+MZWsmF+y5LGCOhO22ac/2o6TKSQm7h0HRc2GaADqYYYor62yg==} + engines: {node: '>=14.0.0'} + dependencies: + tslib: 2.6.2 + dev: false + + /@aws-sdk/util-user-agent-browser@3.523.0: + resolution: {integrity: sha512-6ZRNdGHX6+HQFqTbIA5+i8RWzxFyxsZv8D3soRfpdyWIKkzhSz8IyRKXRciwKBJDaC7OX2jzGE90wxRQft27nA==} + dependencies: + '@aws-sdk/types': 3.523.0 + '@smithy/types': 2.11.0 + bowser: 2.11.0 + tslib: 2.6.2 + dev: false + + /@aws-sdk/util-user-agent-node@3.525.0: + resolution: {integrity: sha512-88Wjt4efyUSBGcyIuh1dvoMqY1k15jpJc5A/3yi67clBQEFsu9QCodQCQPqmRjV3VRcMtBOk+jeCTiUzTY5dRQ==} + engines: {node: '>=14.0.0'} + peerDependencies: + aws-crt: '>=1.0.0' + peerDependenciesMeta: + aws-crt: + optional: true + dependencies: + '@aws-sdk/types': 3.523.0 + '@smithy/node-config-provider': 2.2.5 + '@smithy/types': 2.11.0 + tslib: 2.6.2 + dev: false + + /@aws-sdk/util-utf8-browser@3.259.0: + resolution: {integrity: sha512-UvFa/vR+e19XookZF8RzFZBrw2EUkQWxiBW0yYQAhvk3C+QVGl0H3ouca8LDBlBfQKXwmW3huo/59H8rwb1wJw==} + dependencies: + tslib: 2.6.2 + dev: false + + /@aws-sdk/xml-builder@3.523.0: + resolution: {integrity: sha512-wfvyVymj2TUw7SuDor9IuFcAzJZvWRBZotvY/wQJOlYa3UP3Oezzecy64N4FWfBJEsZdrTN+HOZFl+IzTWWnUA==} + engines: {node: '>=14.0.0'} + dependencies: + '@smithy/types': 2.11.0 + tslib: 2.6.2 + dev: false + + /@fastify/busboy@2.1.1: + resolution: {integrity: sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==} + engines: {node: '>=14'} + dev: false + + /@octokit/auth-token@4.0.0: + resolution: {integrity: sha512-tY/msAuJo6ARbK6SPIxZrPBms3xPbfwBrulZe0Wtr/DIY9lje2HeV1uoebShn6mx7SjCHif6EjMvoREj+gZ+SA==} + engines: {node: '>= 18'} + dev: false + + /@octokit/core@5.1.0: + resolution: {integrity: sha512-BDa2VAMLSh3otEiaMJ/3Y36GU4qf6GI+VivQ/P41NC6GHcdxpKlqV0ikSZ5gdQsmS3ojXeRx5vasgNTinF0Q4g==} + engines: {node: '>= 18'} + dependencies: + '@octokit/auth-token': 4.0.0 + '@octokit/graphql': 7.0.2 + '@octokit/request': 8.2.0 + '@octokit/request-error': 5.0.1 + '@octokit/types': 12.6.0 + before-after-hook: 2.2.3 + universal-user-agent: 6.0.1 + dev: false + + /@octokit/endpoint@9.0.4: + resolution: {integrity: sha512-DWPLtr1Kz3tv8L0UvXTDP1fNwM0S+z6EJpRcvH66orY6Eld4XBMCSYsaWp4xIm61jTWxK68BrR7ibO+vSDnZqw==} + engines: {node: '>= 18'} + dependencies: + '@octokit/types': 12.6.0 + universal-user-agent: 6.0.1 + dev: false + + /@octokit/graphql@7.0.2: + resolution: {integrity: sha512-OJ2iGMtj5Tg3s6RaXH22cJcxXRi7Y3EBqbHTBRq+PQAqfaS8f/236fUrWhfSn8P4jovyzqucxme7/vWSSZBX2Q==} + engines: {node: '>= 18'} + dependencies: + '@octokit/request': 8.2.0 + '@octokit/types': 12.6.0 + universal-user-agent: 6.0.1 + dev: false + + /@octokit/openapi-types@20.0.0: + resolution: {integrity: sha512-EtqRBEjp1dL/15V7WiX5LJMIxxkdiGJnabzYx5Apx4FkQIFgAfKumXeYAqqJCj1s+BMX4cPFIFC4OLCR6stlnA==} + dev: false + + /@octokit/plugin-paginate-rest@9.2.1(@octokit/core@5.1.0): + resolution: {integrity: sha512-wfGhE/TAkXZRLjksFXuDZdmGnJQHvtU/joFQdweXUgzo1XwvBCD4o4+75NtFfjfLK5IwLf9vHTfSiU3sLRYpRw==} + engines: {node: '>= 18'} + peerDependencies: + '@octokit/core': '5' + dependencies: + '@octokit/core': 5.1.0 + '@octokit/types': 12.6.0 + dev: false + + /@octokit/plugin-request-log@4.0.1(@octokit/core@5.1.0): + resolution: {integrity: sha512-GihNqNpGHorUrO7Qa9JbAl0dbLnqJVrV8OXe2Zm5/Y4wFkZQDfTreBzVmiRfJVfE4mClXdihHnbpyyO9FSX4HA==} + engines: {node: '>= 18'} + peerDependencies: + '@octokit/core': '5' + dependencies: + '@octokit/core': 5.1.0 + dev: false + + /@octokit/plugin-rest-endpoint-methods@10.4.1(@octokit/core@5.1.0): + resolution: {integrity: sha512-xV1b+ceKV9KytQe3zCVqjg+8GTGfDYwaT1ATU5isiUyVtlVAO3HNdzpS4sr4GBx4hxQ46s7ITtZrAsxG22+rVg==} + engines: {node: '>= 18'} + peerDependencies: + '@octokit/core': '5' + dependencies: + '@octokit/core': 5.1.0 + '@octokit/types': 12.6.0 + dev: false + + /@octokit/request-error@5.0.1: + resolution: {integrity: sha512-X7pnyTMV7MgtGmiXBwmO6M5kIPrntOXdyKZLigNfQWSEQzVxR4a4vo49vJjTWX70mPndj8KhfT4Dx+2Ng3vnBQ==} + engines: {node: '>= 18'} + dependencies: + '@octokit/types': 12.6.0 + deprecation: 2.3.1 + once: 1.4.0 + dev: false + + /@octokit/request@8.2.0: + resolution: {integrity: sha512-exPif6x5uwLqv1N1irkLG1zZNJkOtj8bZxuVHd71U5Ftuxf2wGNvAJyNBcPbPC+EBzwYEbBDdSFb8EPcjpYxPQ==} + engines: {node: '>= 18'} + dependencies: + '@octokit/endpoint': 9.0.4 + '@octokit/request-error': 5.0.1 + '@octokit/types': 12.6.0 + universal-user-agent: 6.0.1 + dev: false + + /@octokit/rest@20.0.2: + resolution: {integrity: sha512-Ux8NDgEraQ/DMAU1PlAohyfBBXDwhnX2j33Z1nJNziqAfHi70PuxkFYIcIt8aIAxtRE7KVuKp8lSR8pA0J5iOQ==} + engines: {node: '>= 18'} + dependencies: + '@octokit/core': 5.1.0 + '@octokit/plugin-paginate-rest': 9.2.1(@octokit/core@5.1.0) + '@octokit/plugin-request-log': 4.0.1(@octokit/core@5.1.0) + '@octokit/plugin-rest-endpoint-methods': 10.4.1(@octokit/core@5.1.0) + dev: false + + /@octokit/types@12.6.0: + resolution: {integrity: sha512-1rhSOfRa6H9w4YwK0yrf5faDaDTb+yLyBUKOCV4xtCDB5VmIPqd/v9yr9o6SAzOAlRxMiRiCic6JVM1/kunVkw==} + dependencies: + '@octokit/openapi-types': 20.0.0 + dev: false + + /@smithy/abort-controller@2.1.4: + resolution: {integrity: sha512-66HO817oIZ2otLIqy06R5muapqZjkgF1jfU0wyNko8cuqZNu8nbS9ljlhcRYw/M/uWRJzB9ih81DLSHhYbBLlQ==} + engines: {node: '>=14.0.0'} + dependencies: + '@smithy/types': 2.11.0 + tslib: 2.6.2 + dev: false + + /@smithy/config-resolver@2.1.5: + resolution: {integrity: sha512-LcBB5JQC3Tx2ZExIJzfvWaajhFIwHrUNQeqxhred2r5nnqrdly9uoCrvM1sxOOdghYuWWm2Kr8tBCDOmxsgeTA==} + engines: {node: '>=14.0.0'} + dependencies: + '@smithy/node-config-provider': 2.2.5 + '@smithy/types': 2.11.0 + '@smithy/util-config-provider': 2.2.1 + '@smithy/util-middleware': 2.1.4 + tslib: 2.6.2 + dev: false + + /@smithy/core@1.3.8: + resolution: {integrity: sha512-6cFhQ9ChU7MxvOXJn6nuUSONacpNsGHWhfueROQuM/0vibDdZA9FWEdNbVkuVuc+BFI5BnaX3ltERUlpUirpIA==} + engines: {node: '>=14.0.0'} + dependencies: + '@smithy/middleware-endpoint': 2.4.6 + '@smithy/middleware-retry': 2.1.7 + '@smithy/middleware-serde': 2.2.1 + '@smithy/protocol-http': 3.2.2 + '@smithy/smithy-client': 2.4.5 + '@smithy/types': 2.11.0 + '@smithy/util-middleware': 2.1.4 + tslib: 2.6.2 + dev: false + + /@smithy/credential-provider-imds@2.2.6: + resolution: {integrity: sha512-+xQe4Pite0kdk9qn0Vyw5BRVh0iSlj+T4TEKRXr4E1wZKtVgIzGlkCrfICSjiPVFkPxk4jMpVboMYdEiiA88/w==} + engines: {node: '>=14.0.0'} + dependencies: + '@smithy/node-config-provider': 2.2.5 + '@smithy/property-provider': 2.1.4 + '@smithy/types': 2.11.0 + '@smithy/url-parser': 2.1.4 + tslib: 2.6.2 + dev: false + + /@smithy/eventstream-codec@2.1.4: + resolution: {integrity: sha512-UkiieTztP7adg8EuqZvB0Y4LewdleZCJU7Kgt9RDutMsRYqO32fMpWeQHeTHaIMosmzcRZUykMRrhwGJe9mP3A==} + dependencies: + '@aws-crypto/crc32': 3.0.0 + '@smithy/types': 2.11.0 + '@smithy/util-hex-encoding': 2.1.1 + tslib: 2.6.2 + dev: false + + /@smithy/fetch-http-handler@2.4.5: + resolution: {integrity: sha512-FR1IMGdo0yRFs1tk71zRGSa1MznVLQOVNaPjyNtx6dOcy/u0ovEnXN5NVz6slw5KujFlg3N1w4+UbO8F3WyYUg==} + dependencies: + '@smithy/protocol-http': 3.2.2 + '@smithy/querystring-builder': 2.1.4 + '@smithy/types': 2.11.0 + '@smithy/util-base64': 2.2.1 + tslib: 2.6.2 + dev: false + + /@smithy/hash-node@2.1.4: + resolution: {integrity: sha512-uvCcpDLXaTTL0X/9ezF8T8sS77UglTfZVQaUOBiCvR0QydeSyio3t0Hj3QooVdyFsKTubR8gCk/ubLk3vAyDng==} + engines: {node: '>=14.0.0'} + dependencies: + '@smithy/types': 2.11.0 + '@smithy/util-buffer-from': 2.1.1 + '@smithy/util-utf8': 2.2.0 + tslib: 2.6.2 + dev: false + + /@smithy/invalid-dependency@2.1.4: + resolution: {integrity: sha512-QzlNBl6jt3nb9jNnE51wTegReVvUdozyMMrFEyb/rc6AzPID1O+qMJYjAAoNw098y0CZVfCpEnoK2+mfBOd8XA==} + dependencies: + '@smithy/types': 2.11.0 + tslib: 2.6.2 + dev: false + + /@smithy/is-array-buffer@2.1.1: + resolution: {integrity: sha512-xozSQrcUinPpNPNPds4S7z/FakDTh1MZWtRP/2vQtYB/u3HYrX2UXuZs+VhaKBd6Vc7g2XPr2ZtwGBNDN6fNKQ==} + engines: {node: '>=14.0.0'} + dependencies: + tslib: 2.6.2 + dev: false + + /@smithy/middleware-content-length@2.1.4: + resolution: {integrity: sha512-C6VRwfcr0w9qRFhDGCpWMVhlEIBFlmlPRP1aX9Cv9xDj9SUwlDrNvoV1oP1vjRYuLxCDgovBBynCwwcluS2wLw==} + engines: {node: '>=14.0.0'} + dependencies: + '@smithy/protocol-http': 3.2.2 + '@smithy/types': 2.11.0 + tslib: 2.6.2 + dev: false + + /@smithy/middleware-endpoint@2.4.6: + resolution: {integrity: sha512-AsXtUXHPOAS0EGZUSFOsVJvc7p0KL29PGkLxLfycPOcFVLru/oinYB6yvyL73ZZPX2OB8sMYUMrj7eH2kI7V/w==} + engines: {node: '>=14.0.0'} + dependencies: + '@smithy/middleware-serde': 2.2.1 + '@smithy/node-config-provider': 2.2.5 + '@smithy/shared-ini-file-loader': 2.3.5 + '@smithy/types': 2.11.0 + '@smithy/url-parser': 2.1.4 + '@smithy/util-middleware': 2.1.4 + tslib: 2.6.2 + dev: false + + /@smithy/middleware-retry@2.1.7: + resolution: {integrity: sha512-8fOP/cJN4oMv+5SRffZC8RkqfWxHqGgn/86JPINY/1DnTRegzf+G5GT9lmIdG1YasuSbU7LISfW9PXil3isPVw==} + engines: {node: '>=14.0.0'} + dependencies: + '@smithy/node-config-provider': 2.2.5 + '@smithy/protocol-http': 3.2.2 + '@smithy/service-error-classification': 2.1.4 + '@smithy/smithy-client': 2.4.5 + '@smithy/types': 2.11.0 + '@smithy/util-middleware': 2.1.4 + '@smithy/util-retry': 2.1.4 + tslib: 2.6.2 + uuid: 8.3.2 + dev: false + + /@smithy/middleware-serde@2.2.1: + resolution: {integrity: sha512-VAWRWqnNjgccebndpyK94om4ZTYzXLQxUmNCXYzM/3O9MTfQjTNBgtFtQwyIIez6z7LWcCsXmnKVIOE9mLqAHQ==} + engines: {node: '>=14.0.0'} + dependencies: + '@smithy/types': 2.11.0 + tslib: 2.6.2 + dev: false + + /@smithy/middleware-stack@2.1.4: + resolution: {integrity: sha512-Qqs2ba8Ax1rGKOSGJS2JN23fhhox2WMdRuzx0NYHtXzhxbJOIMmz9uQY6Hf4PY8FPteBPp1+h0j5Fmr+oW12sg==} + engines: {node: '>=14.0.0'} + dependencies: + '@smithy/types': 2.11.0 + tslib: 2.6.2 + dev: false + + /@smithy/node-config-provider@2.2.5: + resolution: {integrity: sha512-CxPf2CXhjO79IypHJLBATB66Dw6suvr1Yc2ccY39hpR6wdse3pZ3E8RF83SODiNH0Wjmkd0ze4OF8exugEixgA==} + engines: {node: '>=14.0.0'} + dependencies: + '@smithy/property-provider': 2.1.4 + '@smithy/shared-ini-file-loader': 2.3.5 + '@smithy/types': 2.11.0 + tslib: 2.6.2 + dev: false + + /@smithy/node-http-handler@2.4.3: + resolution: {integrity: sha512-bD5zRdEl1u/4vAAMeQnGEUNbH1seISV2Z0Wnn7ltPRl/6B2zND1R9XzTfsOnH1R5jqghpochF/mma8u7uXz0qQ==} + engines: {node: '>=14.0.0'} + dependencies: + '@smithy/abort-controller': 2.1.4 + '@smithy/protocol-http': 3.2.2 + '@smithy/querystring-builder': 2.1.4 + '@smithy/types': 2.11.0 + tslib: 2.6.2 + dev: false + + /@smithy/property-provider@2.1.4: + resolution: {integrity: sha512-nWaY/MImj1BiXZ9WY65h45dcxOx8pl06KYoHxwojDxDL+Q9yLU1YnZpgv8zsHhEftlj9KhePENjQTlNowWVyug==} + engines: {node: '>=14.0.0'} + dependencies: + '@smithy/types': 2.11.0 + tslib: 2.6.2 + dev: false + + /@smithy/protocol-http@3.2.2: + resolution: {integrity: sha512-xYBlllOQcOuLoxzhF2u8kRHhIFGQpDeTQj/dBSnw4kfI29WMKL5RnW1m9YjnJAJ49miuIvrkJR+gW5bCQ+Mchw==} + engines: {node: '>=14.0.0'} + dependencies: + '@smithy/types': 2.11.0 + tslib: 2.6.2 + dev: false + + /@smithy/querystring-builder@2.1.4: + resolution: {integrity: sha512-LXSL0J/nRWvGT+jIj+Fip3j0J1ZmHkUyBFRzg/4SmPNCLeDrtVu7ptKOnTboPsFZu5BxmpYok3kJuQzzRdrhbw==} + engines: {node: '>=14.0.0'} + dependencies: + '@smithy/types': 2.11.0 + '@smithy/util-uri-escape': 2.1.1 + tslib: 2.6.2 + dev: false + + /@smithy/querystring-parser@2.1.4: + resolution: {integrity: sha512-U2b8olKXgZAs0eRo7Op11jTNmmcC/sqYmsA7vN6A+jkGnDvJlEl7AetUegbBzU8q3D6WzC5rhR/joIy8tXPzIg==} + engines: {node: '>=14.0.0'} + dependencies: + '@smithy/types': 2.11.0 + tslib: 2.6.2 + dev: false + + /@smithy/service-error-classification@2.1.4: + resolution: {integrity: sha512-JW2Hthy21evnvDmYYk1kItOmbp3X5XI5iqorXgFEunb6hQfSDZ7O1g0Clyxg7k/Pcr9pfLk5xDIR2To/IohlsQ==} + engines: {node: '>=14.0.0'} + dependencies: + '@smithy/types': 2.11.0 + dev: false + + /@smithy/shared-ini-file-loader@2.3.5: + resolution: {integrity: sha512-oI99+hOvsM8oAJtxAGmoL/YCcGXtbP0fjPseYGaNmJ4X5xOFTer0KPk7AIH3AL6c5AlYErivEi1X/X78HgTVIw==} + engines: {node: '>=14.0.0'} + dependencies: + '@smithy/types': 2.11.0 + tslib: 2.6.2 + dev: false + + /@smithy/signature-v4@2.1.4: + resolution: {integrity: sha512-gnu9gCn0qQ8IdhNjs6o3QVCXzUs33znSDYwVMWo3nX4dM6j7z9u6FC302ShYyVWfO4MkVMuGCCJ6nl3PcH7V1Q==} + engines: {node: '>=14.0.0'} + dependencies: + '@smithy/eventstream-codec': 2.1.4 + '@smithy/is-array-buffer': 2.1.1 + '@smithy/types': 2.11.0 + '@smithy/util-hex-encoding': 2.1.1 + '@smithy/util-middleware': 2.1.4 + '@smithy/util-uri-escape': 2.1.1 + '@smithy/util-utf8': 2.2.0 + tslib: 2.6.2 + dev: false + + /@smithy/smithy-client@2.4.5: + resolution: {integrity: sha512-igXOM4kPXPo6b5LZXTUqTnrGk20uVd8OXoybC3f89gczzGfziLK4yUNOmiHSdxY9OOMOnnhVe5MpTm01MpFqvA==} + engines: {node: '>=14.0.0'} + dependencies: + '@smithy/middleware-endpoint': 2.4.6 + '@smithy/middleware-stack': 2.1.4 + '@smithy/protocol-http': 3.2.2 + '@smithy/types': 2.11.0 + '@smithy/util-stream': 2.1.5 + tslib: 2.6.2 + dev: false + + /@smithy/types@2.11.0: + resolution: {integrity: sha512-AR0SXO7FuAskfNhyGfSTThpLRntDI5bOrU0xrpVYU0rZyjl3LBXInZFMTP/NNSd7IS6Ksdtar0QvnrPRIhVrLQ==} + engines: {node: '>=14.0.0'} + dependencies: + tslib: 2.6.2 + dev: false + + /@smithy/url-parser@2.1.4: + resolution: {integrity: sha512-1hTy6UYRYqOZlHKH2/2NzdNQ4NNmW2Lp0sYYvztKy+dEQuLvZL9w88zCzFQqqFer3DMcscYOshImxkJTGdV+rg==} + dependencies: + '@smithy/querystring-parser': 2.1.4 + '@smithy/types': 2.11.0 + tslib: 2.6.2 + dev: false + + /@smithy/util-base64@2.2.1: + resolution: {integrity: sha512-troGfokrpoqv8TGgsb8p4vvM71vqor314514jyQ0i9Zae3qs0jUVbSMCIBB1tseVynXFRcZJAZ9hPQYlifLD5A==} + engines: {node: '>=14.0.0'} + dependencies: + '@smithy/util-buffer-from': 2.1.1 + '@smithy/util-utf8': 2.2.0 + tslib: 2.6.2 + dev: false + + /@smithy/util-body-length-browser@2.1.1: + resolution: {integrity: sha512-ekOGBLvs1VS2d1zM2ER4JEeBWAvIOUKeaFch29UjjJsxmZ/f0L3K3x0dEETgh3Q9bkZNHgT+rkdl/J/VUqSRag==} + dependencies: + tslib: 2.6.2 + dev: false + + /@smithy/util-body-length-node@2.2.2: + resolution: {integrity: sha512-U7DooaT1SfW7XHrOcxthYJnQ+WMaefRrFPxW5Qmypw38Ivv+TKvfVuVHA9V162h8BeW9rzOJwOunjgXd0DdB4w==} + engines: {node: '>=14.0.0'} + dependencies: + tslib: 2.6.2 + dev: false + + /@smithy/util-buffer-from@2.1.1: + resolution: {integrity: sha512-clhNjbyfqIv9Md2Mg6FffGVrJxw7bgK7s3Iax36xnfVj6cg0fUG7I4RH0XgXJF8bxi+saY5HR21g2UPKSxVCXg==} + engines: {node: '>=14.0.0'} + dependencies: + '@smithy/is-array-buffer': 2.1.1 + tslib: 2.6.2 + dev: false + + /@smithy/util-config-provider@2.2.1: + resolution: {integrity: sha512-50VL/tx9oYYcjJn/qKqNy7sCtpD0+s8XEBamIFo4mFFTclKMNp+rsnymD796uybjiIquB7VCB/DeafduL0y2kw==} + engines: {node: '>=14.0.0'} + dependencies: + tslib: 2.6.2 + dev: false + + /@smithy/util-defaults-mode-browser@2.1.7: + resolution: {integrity: sha512-vvIpWsysEdY77R0Qzr6+LRW50ye7eii7AyHM0OJnTi0isHYiXo5M/7o4k8gjK/b1upQJdfjzSBoJVa2SWrI+2g==} + engines: {node: '>= 10.0.0'} + dependencies: + '@smithy/property-provider': 2.1.4 + '@smithy/smithy-client': 2.4.5 + '@smithy/types': 2.11.0 + bowser: 2.11.0 + tslib: 2.6.2 + dev: false + + /@smithy/util-defaults-mode-node@2.2.7: + resolution: {integrity: sha512-qzXkSDyU6Th+rNNcNkG4a7Ix7m5HlMOtSCPxTVKlkz7eVsqbSSPggegbFeQJ2MVELBB4wnzNPsVPJIrpIaJpXA==} + engines: {node: '>= 10.0.0'} + dependencies: + '@smithy/config-resolver': 2.1.5 + '@smithy/credential-provider-imds': 2.2.6 + '@smithy/node-config-provider': 2.2.5 + '@smithy/property-provider': 2.1.4 + '@smithy/smithy-client': 2.4.5 + '@smithy/types': 2.11.0 + tslib: 2.6.2 + dev: false + + /@smithy/util-endpoints@1.1.5: + resolution: {integrity: sha512-tgDpaUNsUtRvNiBulKU1VnpoXU1GINMfZZXunRhUXOTBEAufG1Wp79uDXLau2gg1RZ4dpAR6lXCkrmddihCGUg==} + engines: {node: '>= 14.0.0'} + dependencies: + '@smithy/node-config-provider': 2.2.5 + '@smithy/types': 2.11.0 + tslib: 2.6.2 + dev: false + + /@smithy/util-hex-encoding@2.1.1: + resolution: {integrity: sha512-3UNdP2pkYUUBGEXzQI9ODTDK+Tcu1BlCyDBaRHwyxhA+8xLP8agEKQq4MGmpjqb4VQAjq9TwlCQX0kP6XDKYLg==} + engines: {node: '>=14.0.0'} + dependencies: + tslib: 2.6.2 + dev: false + + /@smithy/util-middleware@2.1.4: + resolution: {integrity: sha512-5yYNOgCN0DL0OplME0pthoUR/sCfipnROkbTO7m872o0GHCVNJj5xOFJ143rvHNA54+pIPMLum4z2DhPC2pVGA==} + engines: {node: '>=14.0.0'} + dependencies: + '@smithy/types': 2.11.0 + tslib: 2.6.2 + dev: false + + /@smithy/util-retry@2.1.4: + resolution: {integrity: sha512-JRZwhA3fhkdenSEYIWatC8oLwt4Bdf2LhHbNQApqb7yFoIGMl4twcYI3BcJZ7YIBZrACA9jGveW6tuCd836XzQ==} + engines: {node: '>= 14.0.0'} + dependencies: + '@smithy/service-error-classification': 2.1.4 + '@smithy/types': 2.11.0 + tslib: 2.6.2 + dev: false + + /@smithy/util-stream@2.1.5: + resolution: {integrity: sha512-FqvBFeTgx+QC4+i8USHqU8Ifs9nYRpW/OBfksojtgkxPIQ2H7ypXDEbnQRAV7PwoNHWcSwPomLYi0svmQQG5ow==} + engines: {node: '>=14.0.0'} + dependencies: + '@smithy/fetch-http-handler': 2.4.5 + '@smithy/node-http-handler': 2.4.3 + '@smithy/types': 2.11.0 + '@smithy/util-base64': 2.2.1 + '@smithy/util-buffer-from': 2.1.1 + '@smithy/util-hex-encoding': 2.1.1 + '@smithy/util-utf8': 2.2.0 + tslib: 2.6.2 + dev: false + + /@smithy/util-uri-escape@2.1.1: + resolution: {integrity: sha512-saVzI1h6iRBUVSqtnlOnc9ssU09ypo7n+shdQ8hBTZno/9rZ3AuRYvoHInV57VF7Qn7B+pFJG7qTzFiHxWlWBw==} + engines: {node: '>=14.0.0'} + dependencies: + tslib: 2.6.2 + dev: false + + /@smithy/util-utf8@2.2.0: + resolution: {integrity: sha512-hBsKr5BqrDrKS8qy+YcV7/htmMGxriA1PREOf/8AGBhHIZnfilVv1Waf1OyKhSbFW15U/8+gcMUQ9/Kk5qwpHQ==} + engines: {node: '>=14.0.0'} + dependencies: + '@smithy/util-buffer-from': 2.1.1 + tslib: 2.6.2 + dev: false + + /@smithy/util-waiter@2.1.4: + resolution: {integrity: sha512-AK17WaC0hx1wR9juAOsQkJ6DjDxBGEf5TrKhpXtNFEn+cVto9Li3MVsdpAO97AF7bhFXSyC8tJA3F4ThhqwCdg==} + engines: {node: '>=14.0.0'} + dependencies: + '@smithy/abort-controller': 2.1.4 + '@smithy/types': 2.11.0 + tslib: 2.6.2 + dev: false + + /before-after-hook@2.2.3: + resolution: {integrity: sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ==} + dev: false + + /bowser@2.11.0: + resolution: {integrity: sha512-AlcaJBi/pqqJBIQ8U9Mcpc9i8Aqxn88Skv5d+xBX006BY5u8N3mGLHa5Lgppa7L/HfwgwLgZ6NYs+Ag6uUmJRA==} + dev: false + + /deprecation@2.3.1: + resolution: {integrity: sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ==} + dev: false + + /fast-xml-parser@4.2.5: + resolution: {integrity: sha512-B9/wizE4WngqQftFPmdaMYlXoJlJOYxGQOanC77fq9k8+Z0v5dDSVh+3glErdIROP//s/jgb7ZuxKfB8nVyo0g==} + hasBin: true + dependencies: + strnum: 1.0.5 + dev: false + + /once@1.4.0: + resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} + dependencies: + wrappy: 1.0.2 + dev: false + + /strnum@1.0.5: + resolution: {integrity: sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA==} + dev: false + + /tslib@1.14.1: + resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} + dev: false + + /tslib@2.6.2: + resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==} + dev: false + + /tunnel@0.0.6: + resolution: {integrity: sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==} + engines: {node: '>=0.6.11 <=0.7.0 || >=0.7.3'} + dev: false + + /undici@5.28.3: + resolution: {integrity: sha512-3ItfzbrhDlINjaP0duwnNsKpDQk3acHI3gVJ1z4fmwMK31k5G9OVIAMLSIaP6w4FaGkaAkN6zaQO9LUvZ1t7VA==} + engines: {node: '>=14.0'} + dependencies: + '@fastify/busboy': 2.1.1 + dev: false + + /universal-user-agent@6.0.1: + resolution: {integrity: sha512-yCzhz6FN2wU1NiiQRogkTQszlQSlpWaw8SvVegAc+bDxbzHgh1vX8uIe8OYyMH6DwH+sdTJsgMl36+mSMdRJIQ==} + dev: false + + /uuid@8.3.2: + resolution: {integrity: sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==} + hasBin: true + dev: false + + /wrappy@1.0.2: + resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} + dev: false diff --git a/.github/scripts/crib/pr-comment-crib-env.js b/.github/scripts/crib/pr-comment-crib-env.js index 37ca7316cc3..38283038ed1 100755 --- a/.github/scripts/crib/pr-comment-crib-env.js +++ b/.github/scripts/crib/pr-comment-crib-env.js @@ -1,8 +1,25 @@ #!/usr/bin/env node -const core = require("@actions/core"); -const github = require("@actions/github"); -const { Octokit } = require("@octokit/rest"); +import * as core from "@actions/core"; +import * as github from "@actions/github"; +import { route53RecordsExist } from "./lib/check-route53-records.js"; + +function generateSubdomains(subdomainPrefix, prNumber) { + const subDomainSuffixes = [ + "node1", + "node2", + "node3", + "node4", + "node5", + "node6", + "geth-http", + "geth-ws", + "mockserver", + ]; + return subDomainSuffixes.map( + (suffix) => `${subdomainPrefix}-${prNumber}-${suffix}` + ); +} async function commentExists(octokit, owner, repo, prNumber, uniqueIdentifier) { // This will automatically paginate through all comments @@ -19,15 +36,26 @@ async function commentExists(octokit, owner, repo, prNumber, uniqueIdentifier) { async function run() { try { const token = process.env.GITHUB_TOKEN; - const octokit = new Octokit({ auth: token }); + const route53ZoneId = process.env.ROUTE53_ZONE_ID; + const subdomainPrefix = process.env.SUBDOMAIN_PREFIX || "crib-chainlink"; + + // Check for the existence of GITHUB_TOKEN and ROUTE53_ZONE_ID + if (!token || !route53ZoneId) { + core.setFailed( + "Error: Missing required environment variables: GITHUB_TOKEN or ROUTE53_ZONE_ID." + ); + return; + } + const octokit = github.getOctokit(token); const context = github.context; + const labelsToCheck = ["crib"]; const { owner, repo } = context.repo; const prNumber = context.issue.number; if (!prNumber) { - core.setFailed("Could not get PR number from context"); + core.setFailed("Error: Could not get PR number from context"); return; } @@ -48,6 +76,9 @@ async function run() { return; } + const subdomains = generateSubdomains(subdomainPrefix, prNumber); + core.debug("Subdomains:", subdomains); + // Comment header and unique identifier const commentHeader = "## CRIB Environment Details"; @@ -57,6 +88,31 @@ async function run() { return; } + // Check if DNS records exist in Route 53 before printing out the subdomains. + try { + const maxRetries = 8; + const recordsExist = await route53RecordsExist( + route53ZoneId, + subdomains, + maxRetries + ); + if (recordsExist) { + core.info("Route 53 DNS records exist."); + } else { + core.setFailed( + "Route 53 DNS records do not exist. Please check the Route 53 hosted zone." + ); + return; + } + } catch (error) { + core.setFailed(error.message); + return; + } + + const subdomainsFormatted = subdomains + .map((subdomain) => `- ${subdomain}.`) + .join("\n"); + // Construct the comment const comment = `${commentHeader} :information_source: @@ -66,17 +122,11 @@ Please review the following details: ### Subdomains -_Use these subdomains to access the CRIB environment. They are prefixes to the internal base domain._ - -- crib-chainlink-${prNumber}-node1. -- crib-chainlink-${prNumber}-node2. -- crib-chainlink-${prNumber}-node3. -- crib-chainlink-${prNumber}-node4. -- crib-chainlink-${prNumber}-node5. -- crib-chainlink-${prNumber}-node6. -- crib-chainlink-${prNumber}-geth-http. -- crib-chainlink-${prNumber}-geth-ws. -- crib-chainlink-${prNumber}-mockserver. +_Use these subdomains to access the CRIB environment. They are prefixes to the internal base domain which work over the VPN._ + +${subdomainsFormatted} + +**NOTE:** If you have trouble resolving these subdomains, please try to reset your VPN DNS and/or local DNS. `; // Create a comment on the PR @@ -91,10 +141,4 @@ _Use these subdomains to access the CRIB environment. They are prefixes to the i } } -// Run the script if it's executed directly from the command line -if (require.main === module) { - run(); -} - -// Export the run function for testing purposes -module.exports = { run }; +run(); diff --git a/.github/workflows/automation-benchmark-tests.yml b/.github/workflows/automation-benchmark-tests.yml index c81e46d9930..dd67d988625 100644 --- a/.github/workflows/automation-benchmark-tests.yml +++ b/.github/workflows/automation-benchmark-tests.yml @@ -25,7 +25,7 @@ jobs: id-token: write contents: read name: Automation Benchmark Test - runs-on: ubuntu20.04-16cores-64GB + runs-on: ubuntu22.04-16cores-64GB env: SLACK_API_KEY: ${{ secrets.QA_SLACK_API_KEY }} SLACK_CHANNEL: C03KJ5S7KEK @@ -33,7 +33,7 @@ jobs: REF_NAME: ${{ github.head_ref || github.ref_name }} steps: - name: Checkout the repo - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 with: ref: ${{ env.REF_NAME }} - name: Get Slack config and mask base64 config @@ -66,7 +66,7 @@ jobs: QA_AWS_ACCOUNT_NUMBER: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }} suites: benchmark chaos reorg load - name: Run Tests - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@c67a09566412d153ff7640d99f96b43aa03abc04 # v2.3.6 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@5bee84d30d90295010bda68b0cd46be3a1eea917 # v2.3.9 env: DETACH_RUNNER: true TEST_SUITE: benchmark diff --git a/.github/workflows/automation-load-tests.yml b/.github/workflows/automation-load-tests.yml index 82a1bba6d67..4b9fb4f1a15 100644 --- a/.github/workflows/automation-load-tests.yml +++ b/.github/workflows/automation-load-tests.yml @@ -21,7 +21,7 @@ jobs: id-token: write contents: read name: Automation Load Test - runs-on: ubuntu20.04-16cores-64GB + runs-on: ubuntu22.04-16cores-64GB env: SLACK_API_KEY: ${{ secrets.QA_SLACK_API_KEY }} SLACK_CHANNEL: C03KJ5S7KEK @@ -29,7 +29,7 @@ jobs: REF_NAME: ${{ github.head_ref || github.ref_name }} steps: - name: Checkout the repo - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 with: ref: ${{ env.REF_NAME }} - name: Get Slack config and mask base64 config @@ -82,7 +82,7 @@ jobs: QA_AWS_ACCOUNT_NUMBER: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }} suites: benchmark chaos reorg load - name: Run Tests - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@c67a09566412d153ff7640d99f96b43aa03abc04 # v2.3.6 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@5bee84d30d90295010bda68b0cd46be3a1eea917 # v2.3.9 env: RR_CPU: 4000m RR_MEM: 4Gi diff --git a/.github/workflows/automation-nightly-tests.yml b/.github/workflows/automation-nightly-tests.yml index 0427fe5b47d..b2451f9dc9c 100644 --- a/.github/workflows/automation-nightly-tests.yml +++ b/.github/workflows/automation-nightly-tests.yml @@ -17,7 +17,7 @@ jobs: id-token: write contents: read name: Build Chainlink Image - runs-on: ubuntu20.04-16cores-64GB + runs-on: ubuntu22.04-16cores-64GB steps: - name: Collect Metrics id: collect-gha-metrics @@ -29,7 +29,7 @@ jobs: this-job-name: Build Chainlink Image continue-on-error: true - name: Checkout the repo - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 with: ref: ${{ github.event.pull_request.head.sha || github.event.merge_group.head_sha }} - name: Build Chainlink Image @@ -61,26 +61,26 @@ jobs: - name: Upgrade 2.0 suite: smoke nodes: 1 - os: ubuntu20.04-8cores-32GB + os: ubuntu22.04-8cores-32GB network: SIMULATED command: -run ^TestAutomationNodeUpgrade/registry_2_0 ./smoke - name: Upgrade 2.1 suite: smoke nodes: 5 - os: ubuntu20.04-8cores-32GB + os: ubuntu22.04-8cores-32GB network: SIMULATED command: -run ^TestAutomationNodeUpgrade/registry_2_1 ./smoke - name: Upgrade 2.2 suite: smoke nodes: 5 - os: ubuntu20.04-8cores-32GB + os: ubuntu22.04-8cores-32GB network: SIMULATED command: -run ^TestAutomationNodeUpgrade/registry_2_2 ./smoke runs-on: ${{ matrix.tests.os }} name: Automation ${{ matrix.tests.name }} Test steps: - name: Checkout the repo - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 with: ref: ${{ github.head_ref || github.ref_name }} - name: Prepare Base64 TOML override @@ -92,7 +92,7 @@ jobs: upgradeImage: ${{ env.CHAINLINK_IMAGE }} upgradeVersion: ${{ github.sha }} - name: Run Tests - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@c67a09566412d153ff7640d99f96b43aa03abc04 # v2.3.6 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@5bee84d30d90295010bda68b0cd46be3a1eea917 # v2.3.9 env: TEST_SUITE: ${{ matrix.tests.suite }} with: @@ -109,7 +109,7 @@ jobs: QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} QA_KUBECONFIG: ${{ secrets.QA_KUBECONFIG }} - name: Upload test log - uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 + uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 if: failure() with: name: test-log-${{ matrix.tests.name }} diff --git a/.github/workflows/automation-ondemand-tests.yml b/.github/workflows/automation-ondemand-tests.yml index b6638960aaf..0e7cb761343 100644 --- a/.github/workflows/automation-ondemand-tests.yml +++ b/.github/workflows/automation-ondemand-tests.yml @@ -20,6 +20,16 @@ on: required: true default: public.ecr.aws/chainlink/chainlink type: string + enableChaos: + description: Check to enable chaos tests + type: boolean + default: false + required: true + enableReorg: + description: Check to enable reorg tests + type: boolean + default: false + required: true env: ENV_JOB_IMAGE: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink-tests:${{ github.sha }} @@ -41,7 +51,7 @@ jobs: dockerfile: plugins/chainlink.Dockerfile tag-suffix: -plugins name: Build Chainlink Image ${{ matrix.image.name }} - runs-on: ubuntu20.04-16cores-64GB + runs-on: ubuntu22.04-16cores-64GB steps: - name: Collect Metrics if: inputs.chainlinkImage == '' @@ -54,13 +64,13 @@ jobs: this-job-name: Build Chainlink Image ${{ matrix.image.name }} continue-on-error: true - name: Checkout the repo - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 with: ref: ${{ github.head_ref || github.ref_name }} - name: Check if image exists if: inputs.chainlinkImage == '' id: check-image - uses: smartcontractkit/chainlink-github-actions/docker/image-exists@c67a09566412d153ff7640d99f96b43aa03abc04 # v2.3.6 + uses: smartcontractkit/chainlink-github-actions/docker/image-exists@5bee84d30d90295010bda68b0cd46be3a1eea917 # v2.3.9 with: repository: chainlink tag: ${{ github.sha }}${{ matrix.image.tag-suffix }} @@ -68,7 +78,7 @@ jobs: AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} - name: Build Image if: steps.check-image.outputs.exists == 'false' && inputs.chainlinkImage == '' - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/build-image@c67a09566412d153ff7640d99f96b43aa03abc04 # v2.3.6 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/build-image@5bee84d30d90295010bda68b0cd46be3a1eea917 # v2.3.9 with: cl_repo: smartcontractkit/chainlink cl_ref: ${{ github.sha }} @@ -88,7 +98,7 @@ jobs: id-token: write contents: read name: Build Test Image - runs-on: ubuntu20.04-16cores-64GB + runs-on: ubuntu22.04-16cores-64GB steps: - name: Collect Metrics id: collect-gha-metrics @@ -100,10 +110,11 @@ jobs: this-job-name: Build Test Image continue-on-error: true - name: Checkout the repo - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 with: ref: ${{ github.head_ref || github.ref_name }} - name: Build Test Image + if: inputs.enableChaos || inputs.enableReorg uses: ./.github/actions/build-test-image with: QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} @@ -130,6 +141,7 @@ jobs: suite: chaos nodes: 15 os: ubuntu-latest + enabled: ${{ inputs.enableChaos }} pyroscope_env: ci-automation-on-demand-chaos network: SIMULATED command: -run ^TestAutomationChaos$ ./chaos @@ -137,27 +149,34 @@ jobs: suite: reorg nodes: 5 os: ubuntu-latest + enabled: ${{ inputs.enableReorg }} pyroscope_env: ci-automation-on-demand-reorg network: SIMULATED_NONDEV command: -run ^TestAutomationReorg$ ./reorg - name: upgrade 2.0 + type: upgrade suite: smoke nodes: 1 - os: ubuntu20.04-8cores-32GB + os: ubuntu22.04-8cores-32GB + enabled: true pyroscope_env: ci-automation-on-demand-upgrade network: SIMULATED command: -run ^TestAutomationNodeUpgrade/registry_2_0 ./smoke - name: upgrade 2.1 + type: upgrade suite: smoke - nodes: 1 - os: ubuntu20.04-8cores-32GB + nodes: 5 + os: ubuntu22.04-8cores-32GB + enabled: true pyroscope_env: ci-automation-on-demand-upgrade network: SIMULATED command: -run ^TestAutomationNodeUpgrade/registry_2_1 ./smoke - name: upgrade 2.2 + type: upgrade suite: smoke - nodes: 1 - os: ubuntu20.04-8cores-32GB + nodes: 5 + os: ubuntu22.04-8cores-32GB + enabled: true pyroscope_env: ci-automation-on-demand-upgrade network: SIMULATED command: -run ^TestAutomationNodeUpgrade/registry_2_2 ./smoke @@ -165,7 +184,7 @@ jobs: name: Automation On Demand ${{ matrix.tests.name }} Test steps: - name: Checkout the repo - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 with: ref: ${{ github.head_ref || github.ref_name }} - name: Determine build to use @@ -185,7 +204,7 @@ jobs: echo "upgrade_version=${{ inputs.chainlinkVersion }}" >>$GITHUB_OUTPUT echo "upgrade_image=$READ_CL_IMAGE" >>$GITHUB_OUTPUT fi - if [[ "${{ matrix.tests.name }}" == "upgrade" ]]; then + if [[ "${{ matrix.tests.type }}" == "upgrade" ]]; then READ_CL_UPGR_IMAGE=$(jq -r '.inputs.chainlinkImageUpdate' $GITHUB_EVENT_PATH) echo ::add-mask::$READ_CL_UPGR_IMAGE echo "image=$READ_CL_UPGR_IMAGE" >>$GITHUB_OUTPUT @@ -239,7 +258,8 @@ jobs: echo ::add-mask::$BASE64_CONFIG_OVERRIDE echo "BASE64_CONFIG_OVERRIDE=$BASE64_CONFIG_OVERRIDE" >> $GITHUB_ENV - name: Run Tests - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@c67a09566412d153ff7640d99f96b43aa03abc04 # v2.3.6 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@5bee84d30d90295010bda68b0cd46be3a1eea917 # v2.3.9 + if: ${{ matrix.tests.enabled == true }} env: TEST_SUITE: ${{ matrix.tests.suite }} with: @@ -256,7 +276,7 @@ jobs: QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} QA_KUBECONFIG: ${{ secrets.QA_KUBECONFIG }} - name: Upload test log - uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 + uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 if: failure() with: name: test-log-${{ matrix.tests.name }} diff --git a/.github/workflows/bash-scripts.yml b/.github/workflows/bash-scripts.yml index 9fe2a0e60e4..e9b7265c962 100644 --- a/.github/workflows/bash-scripts.yml +++ b/.github/workflows/bash-scripts.yml @@ -11,8 +11,8 @@ jobs: bash-scripts-src: ${{ steps.bash-scripts.outputs.src }} steps: - name: Checkout the repo - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - uses: dorny/paths-filter@0bc4621a3135347011ad047f9ecf449bf72ce2bd # v3.0.0 + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 + - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 id: bash-scripts with: filters: | @@ -25,7 +25,7 @@ jobs: needs: [changes] steps: - name: Checkout the repo - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 - name: Run ShellCheck if: needs.changes.outputs.bash-scripts-src == 'true' uses: ludeeus/action-shellcheck@00cae500b08a931fb5698e11e79bfbd38e612a38 # v2.0.0 diff --git a/.github/workflows/build-publish-develop.yml b/.github/workflows/build-publish-develop.yml index 48cc5df80f3..65aef2b88af 100644 --- a/.github/workflows/build-publish-develop.yml +++ b/.github/workflows/build-publish-develop.yml @@ -31,7 +31,7 @@ jobs: name: push-chainlink-develop ${{ matrix.image.name }} steps: - name: Checkout repository - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 with: ref: ${{ env.GIT_REF }} # When this is ran from manual workflow_dispatch, the github.sha may be diff --git a/.github/workflows/build-publish-pr.yml b/.github/workflows/build-publish-pr.yml index b7b06e149e2..8bed9f97450 100644 --- a/.github/workflows/build-publish-pr.yml +++ b/.github/workflows/build-publish-pr.yml @@ -21,7 +21,7 @@ jobs: ECR_IMAGE_NAME: crib-chainlink-untrusted steps: - name: Checkout repository - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 - name: Git Short SHA shell: bash @@ -32,7 +32,7 @@ jobs: - name: Check if image exists id: check-image - uses: smartcontractkit/chainlink-github-actions/docker/image-exists@c67a09566412d153ff7640d99f96b43aa03abc04 # v2.3.6 + uses: smartcontractkit/chainlink-github-actions/docker/image-exists@5bee84d30d90295010bda68b0cd46be3a1eea917 # v2.3.9 with: repository: ${{ env.ECR_IMAGE_NAME}} tag: sha-${{ env.GIT_SHORT_SHA }} diff --git a/.github/workflows/build-publish.yml b/.github/workflows/build-publish.yml index 123ecb5f83f..bc05ef7615c 100644 --- a/.github/workflows/build-publish.yml +++ b/.github/workflows/build-publish.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-20.04 steps: - name: Checkout repository - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 - name: Check for VERSION file bump on tags # Avoids checking VERSION file bump on forks. if: ${{ github.repository == 'smartcontractkit/chainlink' && startsWith(github.ref, 'refs/tags/v') }} @@ -33,7 +33,7 @@ jobs: contents: read steps: - name: Checkout repository - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 - name: Build, sign and publish chainlink image uses: ./.github/actions/build-sign-publish-chainlink diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c4983bfac06..8178fd588da 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-20.04 steps: - name: Checkout repository - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 - name: Build chainlink image uses: ./.github/actions/build-sign-publish-chainlink diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml deleted file mode 100644 index c9f1b3626b5..00000000000 --- a/.github/workflows/changelog.yml +++ /dev/null @@ -1,40 +0,0 @@ -# -# This action checks PRs to see if any CHANGELOG* files were updated. -# If none were, it will add a message to the PR asking if it would make sense to do so. -# -name: Changelog - -on: pull_request - -jobs: - changelog: - # For security reasons, GITHUB_TOKEN is read-only on forks, so we cannot leave comments on PRs. - # This check skips the job if it is detected we are running on a fork. - if: ${{ github.event.pull_request.head.repo.full_name == 'smartcontractkit/chainlink' }} - name: Changelog checker - runs-on: ubuntu-latest - steps: - - name: Check for changed files - id: changedfiles - uses: umani/changed-files@d7f842d11479940a6036e3aacc6d35523e6ba978 # Version 4.1.0 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - pattern: '^docs/CHANGELOG.*$' - - name: Make a comment - uses: unsplash/comment-on-pr@ffe8f97ccc63ce12c3c23c6885b169db67958d3b # Version 1.3.0 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - if: contains(steps.changedfiles.outputs.files_updated, 'CHANGELOG') != true && contains(steps.changedfiles.outputs.files_created, 'CHANGELOG') != true - with: - msg: "I see that you haven't updated any CHANGELOG files. Would it make sense to do so?" - check_for_duplicate_msg: true - - name: Collect Metrics - if: always() - id: collect-gha-metrics - uses: smartcontractkit/push-gha-metrics-action@0281b09807758be1dcc41651e44e62b353808c47 # v2.1.0 - with: - org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} - basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} - hostname: ${{ secrets.GRAFANA_INTERNAL_HOST }} - this-job-name: Changelog checker - continue-on-error: true diff --git a/.github/workflows/changeset.yml b/.github/workflows/changeset.yml new file mode 100644 index 00000000000..a2fabaa8f8a --- /dev/null +++ b/.github/workflows/changeset.yml @@ -0,0 +1,84 @@ +# +# This action checks PRs to see if any changeset files were added in the PR core files were changed. +# If none were, it will add a comment in the PR to run changeset command to generate a changeset file. +# +name: Changeset + +on: pull_request + +jobs: + changeset: + # For security reasons, GITHUB_TOKEN is read-only on forks, so we cannot leave comments on PRs. + # This check skips the job if it is detected we are running on a fork. + if: ${{ github.event.pull_request.head.repo.full_name == 'smartcontractkit/chainlink' }} + name: Changeset checker + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 + - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 + id: files-changed + with: + token: ${{ secrets.GITHUB_TOKEN }} + predicate-quantifier: every + filters: | + shared: + - common/** + - '!common/**/*_test.go' + - plugins/** + - '!plugins/**/*_test.go' + core: + - core/** + - '!core/**/*_test.go' + - '!core/**/*.md' + - '!core/**/*.json' + - '!core/chainlink.goreleaser.Dockerfile' + - '!core/chainlink.Dockerfile' + contracts: + - contracts/**/*.sol + - '!contracts/**/*.t.sol' + core-changeset: + - added: '.changeset/**' + contracts-changeset: + - added: 'contracts/.changeset/**' + - name: Make a comment + uses: thollander/actions-comment-pull-request@fabd468d3a1a0b97feee5f6b9e499eab0dd903f6 # v2.5.0 + if: ${{ (steps.files-changed.outputs.core == 'true' || steps.files-changed.outputs.shared == 'true') && steps.files-changed.outputs.core-changeset == 'false' }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + message: "I see you updated files related to `core`. Please run `pnpm changeset` in the root directory to add a changeset." + reactions: eyes + comment_tag: changeset-core + - name: Make a comment + uses: thollander/actions-comment-pull-request@fabd468d3a1a0b97feee5f6b9e499eab0dd903f6 # v2.5.0 + if: ${{ steps.files-changed.outputs.contracts == 'true' && steps.files-changed.outputs.contracts-changeset == 'false' }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + message: | + I see you updated files related to `contracts`. Please run `pnpm changeset` in the `contracts` directory to add a changeset. + reactions: eyes + comment_tag: changeset-contracts + - name: Check for new changeset for core + if: ${{ (steps.files-changed.outputs.core == 'true' || steps.files-changed.outputs.shared == 'true') && steps.files-changed.outputs.core-changeset == 'false' }} + shell: bash + run: | + echo "Please run pnpm changeset to add a changeset for core." + exit 1 + - name: Check for new changeset for contracts + if: ${{ steps.files-changed.outputs.contracts == 'true' && steps.files-changed.outputs.contracts-changeset == 'false' }} + shell: bash + run: | + echo "Please run pnpm changeset to add a changeset for contracts." + exit 1 + - name: Collect Metrics + if: always() + id: collect-gha-metrics + uses: smartcontractkit/push-gha-metrics-action@0281b09807758be1dcc41651e44e62b353808c47 # v2.1.0 + with: + org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} + basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} + hostname: ${{ secrets.GRAFANA_INTERNAL_HOST }} + this-job-name: Changeset checker + continue-on-error: true diff --git a/.github/workflows/ci-core.yml b/.github/workflows/ci-core.yml index 19da48d1dac..cc934ecf9b6 100644 --- a/.github/workflows/ci-core.yml +++ b/.github/workflows/ci-core.yml @@ -1,7 +1,8 @@ name: CI Core +run-name: CI Core ${{ inputs.distinct_run_name && inputs.distinct_run_name || '' }} concurrency: - group: ${{ github.workflow }}-${{ github.ref }} + group: ${{ github.workflow }}-${{ github.ref }}-${{ inputs.distinct_run_name }} cancel-in-progress: true # Run on key branches to make sure integration is good, otherwise run on all PR's @@ -15,22 +16,60 @@ on: pull_request: schedule: - cron: "0 0 * * *" + workflow_dispatch: + inputs: + distinct_run_name: + description: 'A unique identifier for this run, used when running from other repos' + required: false + type: string + evm-ref: + description: The chainlink-evm reference to use when testing against a specific version for compatibliity + required: false + default: "" + type: string jobs: + + filter: # No need to run core tests if there are only changes to the integration-tests + name: Detect Changes + permissions: + pull-requests: read + outputs: + changes: ${{ steps.ignore-filter.outputs.changes || steps.changes.outputs.changes }} + runs-on: ubuntu-latest + steps: + - name: Checkout the repo + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 + with: + repository: smartcontractkit/chainlink + - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 + id: changes + with: + filters: | + changes: + - '!integration-tests/**' + - name: Ignore Filter On Workflow Dispatch + if: ${{ github.event_name == 'workflow_dispatch' }} + id: ignore-filter + run: echo "changes=true" >> $GITHUB_OUTPUT + golangci: - if: ${{ github.event_name == 'pull_request' || github.event_name == 'schedule' }} + # We don't directly merge dependabot PRs, so let's not waste the resources + if: ${{ github.event_name == 'pull_request' || github.event_name == 'schedule' && github.actor != 'dependabot[bot]' }} name: lint - runs-on: ubuntu20.04-8cores-32GB + runs-on: ubuntu22.04-8cores-32GB + needs: [filter] steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 - name: Golang Lint uses: ./.github/actions/golangci-lint + if: ${{ needs.filter.outputs.changes == 'true' }} with: gc-basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} gc-host: ${{ secrets.GRAFANA_INTERNAL_HOST }} gc-org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} - name: Notify Slack - if: ${{ failure() && (github.event_name == 'merge_group' || github.event.branch == 'develop')}} + if: ${{ failure() && (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 }} @@ -44,35 +83,53 @@ jobs: matrix: cmd: ["go_core_tests", "go_core_race_tests", "go_core_fuzz"] name: Core Tests (${{ matrix.cmd }}) - runs-on: ubuntu20.04-64cores-256GB + # We don't directly merge dependabot PRs, so let's not waste the resources + if: github.actor != 'dependabot[bot]' + needs: [filter] + runs-on: ubuntu-latest-64cores-256GB env: CL_DATABASE_URL: postgresql://postgres:postgres@localhost:5432/chainlink_test?sslmode=disable steps: - name: Checkout the repo - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 - name: Setup node + if: ${{ needs.filter.outputs.changes == 'true' }} uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 - name: Setup NodeJS + if: ${{ needs.filter.outputs.changes == 'true' }} uses: ./.github/actions/setup-nodejs with: prod: "true" - name: Setup Go + if: ${{ needs.filter.outputs.changes == 'true' }} uses: ./.github/actions/setup-go - name: Setup Solana + if: ${{ needs.filter.outputs.changes == 'true' }} uses: ./.github/actions/setup-solana - name: Setup wasmd + if: ${{ needs.filter.outputs.changes == 'true' }} uses: ./.github/actions/setup-wasmd - name: Setup Postgres + if: ${{ needs.filter.outputs.changes == 'true' }} uses: ./.github/actions/setup-postgres - name: Touching core/web/assets/index.html + if: ${{ needs.filter.outputs.changes == 'true' }} run: mkdir -p core/web/assets && touch core/web/assets/index.html - name: Download Go vendor packages + if: ${{ needs.filter.outputs.changes == 'true' }} run: go mod download + - name: Replace chainlink-evm deps + if: ${{ needs.filter.outputs.changes == 'true' && inputs.evm-ref != ''}} + shell: bash + run: go get github.com/smartcontractkit/chainlink-evm@${{ inputs.evm-ref }} - name: Build binary + if: ${{ needs.filter.outputs.changes == 'true' }} run: go build -o chainlink.test . - name: Setup DB + if: ${{ needs.filter.outputs.changes == 'true' }} run: ./chainlink.test local db preparetest - name: Install LOOP Plugins + if: ${{ needs.filter.outputs.changes == 'true' }} run: | pushd $(go list -m -f "{{.Dir}}" github.com/smartcontractkit/chainlink-feeds) go install ./cmd/chainlink-feeds @@ -87,32 +144,33 @@ jobs: go install ./pkg/chainlink/cmd/chainlink-starknet popd - name: Increase Race Timeout - if: github.event.schedule != '' + if: ${{ github.event.schedule != '' && needs.filter.outputs.changes == 'true' }} run: | echo "TIMEOUT=10m" >> $GITHUB_ENV echo "COUNT=50" >> $GITHUB_ENV - name: Run tests + if: ${{ needs.filter.outputs.changes == 'true' }} id: run-tests env: OUTPUT_FILE: ./output.txt USE_TEE: false run: ./tools/bin/${{ matrix.cmd }} ./... - name: Print Filtered Test Results - if: ${{ failure() && matrix.cmd == 'go_core_tests' }} - uses: smartcontractkit/chainlink-github-actions/go/go-test-results-parsing@c67a09566412d153ff7640d99f96b43aa03abc04 # v2.3.6 + if: ${{ failure() && matrix.cmd == 'go_core_tests' && needs.filter.outputs.changes == 'true' }} + uses: smartcontractkit/chainlink-github-actions/go/go-test-results-parsing@5bee84d30d90295010bda68b0cd46be3a1eea917 # v2.3.9 with: results-file: ./output.txt output-file: ./output-short.txt - name: Print Races - if: ${{ failure() && matrix.cmd == 'go_core_race_tests' }} + if: ${{ failure() && matrix.cmd == 'go_core_race_tests' && needs.filter.outputs.changes == 'true' }} run: find race.* | xargs cat - name: Print postgres logs - if: always() + if: ${{ always() && needs.filter.outputs.changes == 'true' }} run: docker compose logs postgres | tee ../../../postgres_logs.txt working-directory: ./.github/actions/setup-postgres - name: Store logs artifacts - if: always() - uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 + if: ${{ needs.filter.outputs.changes == 'true' && always() }} + uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 with: name: ${{ matrix.cmd }}_logs path: | @@ -122,7 +180,7 @@ jobs: ./coverage.txt ./postgres_logs.txt - name: Notify Slack - if: ${{ failure() && matrix.cmd == 'go_core_race_tests' && (github.event_name == 'merge_group' || github.event.branch == 'develop') }} + if: ${{ failure() && matrix.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 }} @@ -130,7 +188,7 @@ jobs: channel-id: "#topic-data-races" slack-message: "Race tests failed: ${{ job.html_url }}\n${{ format('https://github.com/smartcontractkit/chainlink/actions/runs/{0}', github.run_id) }}" - name: Collect Metrics - if: always() + if: ${{ needs.filter.outputs.changes == 'true' && always() }} id: collect-gha-metrics uses: smartcontractkit/push-gha-metrics-action@0281b09807758be1dcc41651e44e62b353808c47 # v2.1.0 with: @@ -142,51 +200,68 @@ jobs: continue-on-error: true detect-flakey-tests: - needs: [core] + needs: [filter, core] name: Flakey Test Detection runs-on: ubuntu-latest - if: always() + if: ${{ always() && github.actor != 'dependabot[bot]' }} env: CL_DATABASE_URL: postgresql://postgres:postgres@localhost:5432/chainlink_test?sslmode=disable steps: - name: Checkout the repo - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 - name: Setup node + if: ${{ needs.filter.outputs.changes == 'true' }} uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 - name: Setup NodeJS + if: ${{ needs.filter.outputs.changes == 'true' }} uses: ./.github/actions/setup-nodejs with: prod: "true" - name: Setup Go + if: ${{ needs.filter.outputs.changes == 'true' }} uses: ./.github/actions/setup-go - name: Setup Postgres + if: ${{ needs.filter.outputs.changes == 'true' }} uses: ./.github/actions/setup-postgres - name: Touching core/web/assets/index.html + if: ${{ needs.filter.outputs.changes == 'true' }} run: mkdir -p core/web/assets && touch core/web/assets/index.html - - name: Download Go vendor packages + - name: Download Go vendor packages + if: ${{ needs.filter.outputs.changes == 'true' }} run: go mod download + - name: Replace chainlink-evm deps + if: ${{ needs.filter.outputs.changes == 'true' && inputs.evm-ref != ''}} + shell: bash + run: go get github.com/smartcontractkit/chainlink-evm@${{ inputs.evm-ref }} - name: Build binary + if: ${{ needs.filter.outputs.changes == 'true' }} run: go build -o chainlink.test . - name: Setup DB + if: ${{ needs.filter.outputs.changes == 'true' }} run: ./chainlink.test local db preparetest - name: Load test outputs - uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 + if: ${{ needs.filter.outputs.changes == 'true' }} + uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4 with: path: ./artifacts - name: Build flakey test runner + if: ${{ needs.filter.outputs.changes == 'true' }} run: go build ./tools/flakeytests/cmd/runner - name: Re-run tests + if: ${{ needs.filter.outputs.changes == 'true' }} env: - GRAFANA_CLOUD_BASIC_AUTH: ${{ secrets.GRAFANA_CLOUD_BASIC_AUTH }} - GRAFANA_CLOUD_HOST: ${{ secrets.GRAFANA_CLOUD_HOST }} + GRAFANA_INTERNAL_BASIC_AUTH: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} + GRAFANA_INTERNAL_HOST: ${{ secrets.GRAFANA_INTERNAL_HOST }} + GRAFANA_INTERNAL_TENANT_ID: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} GITHUB_EVENT_PATH: ${{ github.event_path }} GITHUB_EVENT_NAME: ${{ github.event_name }} GITHUB_REPO: ${{ github.repository }} GITHUB_RUN_ID: ${{ github.run_id }} run: | ./runner \ - -grafana_auth=$GRAFANA_CLOUD_BASIC_AUTH \ - -grafana_host=$GRAFANA_CLOUD_HOST \ + -grafana_auth=$GRAFANA_INTERNAL_BASIC_AUTH \ + -grafana_host=$GRAFANA_INTERNAL_HOST \ + -grafana_org_id=$GRAFANA_INTERNAL_TENANT_ID \ -gh_sha=$GITHUB_SHA \ -gh_event_path=$GITHUB_EVENT_PATH \ -gh_event_name=$GITHUB_EVENT_NAME \ @@ -195,8 +270,8 @@ jobs: -command=./tools/bin/go_core_tests \ `ls -R ./artifacts/go_core_tests*/output.txt` - name: Store logs artifacts - if: always() - uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 + if: ${{ needs.filter.outputs.changes == 'true' && always() }} + uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 with: name: flakey_test_runner_logs path: | @@ -205,15 +280,15 @@ jobs: scan: name: SonarQube Scan needs: [core] - if: ${{ always() }} + if: ${{ always() && github.actor != 'dependabot[bot]' }} runs-on: ubuntu-latest steps: - name: Checkout the repo - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 with: fetch-depth: 0 # fetches all history for all tags and branches to provide more metadata for sonar reports - name: Download all workflow run artifacts - uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 + uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4 - name: Set SonarQube Report Paths id: sonarqube_report_paths shell: bash @@ -243,8 +318,8 @@ jobs: clean: name: Clean Go Tidy & Generate - if: ${{ !contains(join(github.event.pull_request.labels.*.name, ' '), 'skip-smoke-tests') }} - runs-on: ubuntu20.04-8cores-32GB + if: ${{ !contains(join(github.event.pull_request.labels.*.name, ' '), 'skip-smoke-tests') && github.actor != 'dependabot[bot]' }} + runs-on: ubuntu22.04-8cores-32GB defaults: run: shell: bash @@ -254,7 +329,7 @@ jobs: run: | echo "## \`skip-smoke-tests\` label is active, skipping E2E smoke tests" >>$GITHUB_STEP_SUMMARY exit 0 - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 with: fetch-depth: 0 - name: Setup Go diff --git a/.github/workflows/ci-scripts.yml b/.github/workflows/ci-scripts.yml index f44967d5e20..974c866a59d 100644 --- a/.github/workflows/ci-scripts.yml +++ b/.github/workflows/ci-scripts.yml @@ -9,7 +9,7 @@ jobs: if: ${{ github.event_name == 'pull_request' }} runs-on: ubuntu-latest steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 - name: Golang Lint uses: ./.github/actions/golangci-lint with: @@ -25,7 +25,7 @@ jobs: if: ${{ github.event_name == 'pull_request' }} runs-on: ubuntu-latest steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 - name: Setup Go uses: ./.github/actions/setup-go with: diff --git a/.github/workflows/client-compatibility-tests.yml b/.github/workflows/client-compatibility-tests.yml index 890d938705a..3c45bc71e64 100644 --- a/.github/workflows/client-compatibility-tests.yml +++ b/.github/workflows/client-compatibility-tests.yml @@ -33,7 +33,7 @@ jobs: this-job-name: Build Chainlink Image continue-on-error: true - name: Checkout the repo - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 with: ref: ${{ github.event.pull_request.head.sha || github.event.merge_group.head_sha }} - name: Build Chainlink Image @@ -63,11 +63,11 @@ jobs: this-job-name: Build Tests Binary continue-on-error: true - name: Checkout the repo - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 with: ref: ${{ github.event.pull_request.head.sha || github.event.merge_group.head_sha }} - name: Build Tests - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/build-tests@c67a09566412d153ff7640d99f96b43aa03abc04 # v2.3.6 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/build-tests@5bee84d30d90295010bda68b0cd46be3a1eea917 # v2.3.9 with: test_download_vendor_packages_command: cd ./integration-tests && go mod download token: ${{ secrets.GITHUB_TOKEN }} @@ -109,12 +109,13 @@ jobs: client: nethermind timeout: 30m pyroscope_env: ci-smoke-ocr-nethermind-simulated - - name: ocr-besu - test: TestOCRBasic - file: ocr - client: besu - timeout: 30m - pyroscope_env: ci-smoke-ocr-besu-simulated + # Will fail until https://github.com/hyperledger/besu/pull/6702 is merged and released + # - name: ocr-besu + # test: TestOCRBasic + # file: ocr + # client: besu + # timeout: 30m + # pyroscope_env: ci-smoke-ocr-besu-simulated - name: ocr-erigon test: TestOCRBasic file: ocr @@ -133,12 +134,13 @@ jobs: client: nethermind timeout: 30m pyroscope_env: ci-smoke-nethermind-evm-simulated - - name: ocr2-besu - test: "^TestOCRv2Basic/plugins$" - file: ocr2 - client: besu - timeout: 30m - pyroscope_env: ci-smoke-ocr2-besu-simulated + # Will fail until https://github.com/hyperledger/besu/pull/6702 is merged and released + # - name: ocr2-besu + # test: "^TestOCRv2Basic/plugins$" + # file: ocr2 + # client: besu + # timeout: 30m + # pyroscope_env: ci-smoke-ocr2-besu-simulated - name: ocr2-erigon test: "^TestOCRv2Basic/plugins$" file: ocr2 @@ -149,7 +151,7 @@ jobs: name: Client Compatibility Test ${{ matrix.name }} steps: - name: Download Tests Binary - uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 + uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4 with: name: tests - name: Prepare Base64 TOML config @@ -203,7 +205,7 @@ jobs: key_secret="$PYROSCOPE_KEY" [PrivateEthereumNetwork] - consensus_type="pos" + ethereum_version="eth2" consensus_layer="prysm" execution_layer="$execution_layer" wait_for_finalization=false @@ -222,7 +224,7 @@ jobs: echo "BASE64_CONFIG_OVERRIDE=$BASE64_CONFIG_OVERRIDE" >> $GITHUB_ENV touch .root_dir - name: Run Tests - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests-binary@c67a09566412d153ff7640d99f96b43aa03abc04 # v2.3.6 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests-binary@5bee84d30d90295010bda68b0cd46be3a1eea917 # v2.3.9 with: test_command_to_run: ./tests -test.timeout ${{ matrix.timeout }} -test.run ${{ matrix.test }} binary_name: tests @@ -315,7 +317,7 @@ jobs: product: [ocr, ocr2] steps: - name: Checkout the repo - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 with: ref: ${{ github.event.pull_request.head.sha || github.event.merge_group.head_sha }} - name: Post Test Results to Slack diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index faf35dc7a40..100e7eeefd9 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -22,7 +22,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 - name: Set up Go if: ${{ matrix.language == 'go' }} diff --git a/.github/workflows/delete-deployments.yml b/.github/workflows/delete-deployments.yml index 6c2aa8482f1..59e1b802baa 100644 --- a/.github/workflows/delete-deployments.yml +++ b/.github/workflows/delete-deployments.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repo - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 - name: Clean up integration environment uses: ./.github/actions/delete-deployments diff --git a/.github/workflows/dependency-check.yml b/.github/workflows/dependency-check.yml index 1f820cb2bbf..4139a2079b4 100644 --- a/.github/workflows/dependency-check.yml +++ b/.github/workflows/dependency-check.yml @@ -11,8 +11,8 @@ jobs: changes: ${{ steps.changes.outputs.src }} steps: - name: Checkout the repo - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - uses: dorny/paths-filter@0bc4621a3135347011ad047f9ecf449bf72ce2bd # v3.0.0 + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 + - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 id: changes with: filters: | @@ -25,7 +25,7 @@ jobs: needs: [changes] steps: - name: Check out code - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 - name: Set up Go if: needs.changes.outputs.src == 'true' @@ -40,7 +40,7 @@ jobs: - name: Check vulnerabilities if: needs.changes.outputs.src == 'true' - uses: sonatype-nexus-community/nancy-github-action@main + uses: sonatype-nexus-community/nancy-github-action@726e338312e68ecdd4b4195765f174d3b3ce1533 # v1.0.3 with: nancyVersion: "v1.0.39" diff --git a/.github/workflows/evm-version-compatibility-tests.yml b/.github/workflows/evm-version-compatibility-tests.yml new file mode 100644 index 00000000000..536781aa1c0 --- /dev/null +++ b/.github/workflows/evm-version-compatibility-tests.yml @@ -0,0 +1,337 @@ +name: EVM Node Version Compatibility Tests +on: + merge_group: + pull_request: + push: + tags: + - "*" + workflow_dispatch: + inputs: + base64_test_list: + description: Base64 encoded test list (same format as ./integration-tests/evm_node_compatibility_test_list.json) + required: false + type: string + +env: + CHAINLINK_IMAGE: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink + INTERNAL_DOCKER_REPO: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com + MOD_CACHE_VERSION: 2 + +jobs: + + # Check if go.mod has changed + check-dependency-bump: + runs-on: ubuntu-latest + outputs: + dependency_changed: ${{ steps.changes.outputs.dependency_changed }} + steps: + - name: Checkout code + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Check for go.mod changes + id: changes + run: | + git fetch origin ${{ github.base_ref }} + # if no match is found then grep exits with code 1, but if there is a match it exits with code 0 + DEPENDENCY_CHANGED=$(git diff origin/${{ github.base_ref }}...HEAD -- go.mod | grep -q 'github.com/ethereum/go-ethereum'; echo $?) + PR_VERSION=$(grep 'github.com/ethereum/go-ethereum' go.mod | awk '{print $2}') + + # here 0 means a match was found, 1 means no match was found + if [ "$DEPENDENCY_CHANGED" -eq 0 ]; then + # Dependency was changed in the PR, now compare with the base branch + git fetch origin ${{ github.base_ref }} + BASE_VERSION=$(git show origin/${{ github.base_ref }}:go.mod | grep 'github.com/ethereum/go-ethereum' | awk '{print $2}') + + echo "Base branch version: $BASE_VERSION" + echo "PR branch version: $PR_VERSION" + + echo "Dependency version changed in the PR compared to the base branch." + echo "dependency_changed=true" >> $GITHUB_OUTPUT + else + echo "No changes to ethereum/go-ethereum dependency in the PR." + echo "PR branch version: $PR_VERSION" + echo "dependency_changed=false" >> $GITHUB_OUTPUT + fi + + # Build Test Dependencies + + build-chainlink: + if: needs.check-dependency-bump.outputs.dependency_changed == 'true' || github.event_name == 'workflow_dispatch' + needs: [check-dependency-bump] + environment: integration + permissions: + id-token: write + contents: read + name: Build Chainlink Image + runs-on: ubuntu-latest + steps: + - name: Collect Metrics + id: collect-gha-metrics + uses: smartcontractkit/push-gha-metrics-action@0281b09807758be1dcc41651e44e62b353808c47 # v2.1.0 + with: + org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} + basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} + hostname: ${{ secrets.GRAFANA_INTERNAL_HOST }} + this-job-name: Build Chainlink Image + continue-on-error: true + - name: Checkout the repo + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + with: + ref: ${{ github.event.pull_request.head.sha || github.event.merge_group.head_sha }} + - name: Build Chainlink Image + uses: ./.github/actions/build-chainlink-image + with: + tag_suffix: "" + dockerfile: core/chainlink.Dockerfile + git_commit_sha: ${{ github.sha }} + AWS_REGION: ${{ secrets.QA_AWS_REGION }} + AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} + + build-tests: + if: needs.check-dependency-bump.outputs.dependency_changed == 'true' || github.event_name == 'workflow_dispatch' + needs: [check-dependency-bump] + environment: integration + permissions: + id-token: write + contents: read + name: Build Tests Binary + runs-on: ubuntu-latest + steps: + - name: Collect Metrics + id: collect-gha-metrics + uses: smartcontractkit/push-gha-metrics-action@0281b09807758be1dcc41651e44e62b353808c47 # v2.1.0 + with: + org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} + basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} + hostname: ${{ secrets.GRAFANA_INTERNAL_HOST }} + this-job-name: Build Tests Binary + continue-on-error: true + - name: Checkout the repo + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + with: + ref: ${{ github.event.pull_request.head.sha || github.event.merge_group.head_sha }} + - name: Build Tests + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/build-tests@c67a09566412d153ff7640d99f96b43aa03abc04 # v2.3.6 + with: + test_download_vendor_packages_command: cd ./integration-tests && go mod download + token: ${{ secrets.GITHUB_TOKEN }} + go_mod_path: ./integration-tests/go.mod + go_tags: embed + cache_key_id: core-e2e-${{ env.MOD_CACHE_VERSION }} + cache_restore_only: "true" + binary_name: tests + + build-test-matrix: + if: needs.check-dependency-bump.outputs.dependency_changed == 'true' || github.event_name == 'workflow_dispatch' + needs: [check-dependency-bump] + runs-on: ubuntu-latest + name: Build Test Matrix + outputs: + matrix: ${{ env.JOB_MATRIX_JSON }} + steps: + - name: Checkout the repo + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + - name: Setup environment variables + run: | + echo "BASE64_TEST_LIST=${{ github.event.inputs.base64_test_list }}" >> $GITHUB_ENV + - name: Decode Base64 Test List Input if Set + id: decode-base64-test-list + if: env.BASE64_TEST_LIST != '' + run: | + echo "Decoding base64 test list..." + DECODED_BASE64_TEST_LIST=$(echo $BASE64_TEST_LIST | base64 -d) + echo $DECODED_BASE64_TEST_LIST + cd ./integration-tests + echo $DECODED_BASE64_TEST_LIST >> ./evm_node_compatibility_test_list.json + - name: Override Test List If Present + if: env.BASE64_TEST_LIST == '' + id: build-test-matrix-list + run: | + cd ./integration-tests + cp ./smoke/evm_node_compatibility_test_list.json . + - name: Create Test Matrix + id: create-test-matrix-list + run: | + cd ./integration-tests + JOB_MATRIX_JSON=$(./scripts/buildEvmClientTestMatrixList.sh ./evm_node_compatibility_test_list.json ubuntu-latest) + echo "JOB_MATRIX_JSON=${JOB_MATRIX_JSON}" >> $GITHUB_ENV + echo $JOB_MATRIX_JSON | jq . + + # End Build Test Dependencies + + evm-node-compatiblity-matrix: + environment: integration + permissions: + checks: write + pull-requests: write + id-token: write + contents: read + needs: + [check-dependency-bump, build-chainlink, build-tests, build-test-matrix] + env: + SELECTED_NETWORKS: SIMULATED + CHAINLINK_COMMIT_SHA: ${{ github.sha }} + CHAINLINK_ENV_USER: ${{ github.actor }} + TEST_LOG_LEVEL: debug + strategy: + fail-fast: false + matrix: + evm_node: ${{fromJson(needs.build-test-matrix.outputs.matrix)}} + runs-on: ${{ matrix.evm_node.os }} + name: EVM node compatibility of ${{ matrix.evm_node.product }} with ${{ matrix.evm_node.docker_image }} + steps: + - name: Collect Metrics + if: needs.changes.outputs.src == 'true' || github.event_name == 'workflow_dispatch' + id: collect-gha-metrics + uses: smartcontractkit/push-gha-metrics-action@0281b09807758be1dcc41651e44e62b353808c47 # v2.1.0 + with: + basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} + hostname: ${{ secrets.GRAFANA_INTERNAL_HOST }} + org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} + this-job-name: EVM node compatibility ${{ matrix.evm_node.name }} ${{ matrix.evm_node.docker_image }} + test-results-file: '{"testType":"go","filePath":"/tmp/gotest.log"}' + continue-on-error: true + - name: Checkout the repo + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + with: + ref: ${{ github.event.pull_request.head.sha || github.event.merge_group.head_sha }} + - name: Build Go Test Command + id: build-go-test-command + run: | + # if the matrix.evm_node.run is set, use it for a different command + if [ "${{ matrix.evm_node.run }}" != "" ]; then + echo "run_command=${{ matrix.evm_node.run }} ./smoke/${{ matrix.evm_node.product }}_test.go" >> "$GITHUB_OUTPUT" + else + echo "run_command=./smoke/${{ matrix.evm_node.product }}_test.go" >> "$GITHUB_OUTPUT" + fi + - name: Prepare Base64 TOML override + uses: ./.github/actions/setup-create-base64-config + with: + runId: ${{ github.run_id }} + testLogCollect: ${{ vars.TEST_LOG_COLLECT }} + selectedNetworks: ${{ env.SELECTED_NETWORKS }} + chainlinkImage: ${{ env.CHAINLINK_IMAGE }} + chainlinkVersion: ${{ github.sha }} + lokiEndpoint: ${{ secrets.LOKI_URL }} + lokiTenantId: ${{ vars.LOKI_TENANT_ID }} + lokiBasicAuth: ${{ secrets.LOKI_BASIC_AUTH }} + logstreamLogTargets: ${{ vars.LOGSTREAM_LOG_TARGETS }} + grafanaUrl: ${{ vars.GRAFANA_URL }} + grafanaDashboardUrl: "/d/ddf75041-1e39-42af-aa46-361fe4c36e9e/ci-e2e-tests-logs" + ethExecutionClient: ${{ matrix.evm_node.eth_client }} + customEthClientDockerImage: ${{ matrix.evm_node.docker_image }} + + - name: Run Tests + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@c67a09566412d153ff7640d99f96b43aa03abc04 # v2.3.6 + with: + test_command_to_run: cd ./integration-tests && go test -timeout 45m -count=1 -json -test.parallel=2 ${{ steps.build-go-test-command.outputs.run_command }} 2>&1 | tee /tmp/gotest.log | gotestfmt + test_download_vendor_packages_command: cd ./integration-tests && go mod download + cl_repo: ${{ env.CHAINLINK_IMAGE }} + cl_image_tag: ${{ github.sha }} + aws_registries: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }} + artifacts_location: ./integration-tests/smoke/logs/ + publish_check_name: ${{ matrix.evm_node.product }}-compatibility-${{ matrix.evm_node.eth_client }}-${{ matrix.evm_node.docker_image }} + token: ${{ secrets.GITHUB_TOKEN }} + go_mod_path: ./integration-tests/go.mod + cache_key_id: core-e2e-${{ env.MOD_CACHE_VERSION }} + cache_restore_only: "true" + QA_AWS_REGION: ${{ secrets.QA_AWS_REGION }} + QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} + QA_KUBECONFIG: "" + should_tidy: "false" + - name: Print failed test summary + if: always() + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/show-test-summary@c67a09566412d153ff7640d99f96b43aa03abc04 # v2.3.6 + + start-slack-thread: + name: Start Slack Thread + if: ${{ always() && needs.check-dependency-bump.outputs.dependency_changed == 'true' && needs.*.result != 'skipped' && needs.*.result != 'cancelled' }} + environment: integration + outputs: + thread_ts: ${{ steps.slack.outputs.thread_ts }} + permissions: + checks: write + pull-requests: write + id-token: write + contents: read + runs-on: ubuntu-latest + needs: [ evm-node-compatiblity-matrix] + steps: + - name: Debug Result + run: echo ${{ join(needs.*.result, ',') }} + - name: Main Slack Notification + uses: slackapi/slack-github-action@6c661ce58804a1a20f6dc5fbee7f0381b469e001 # v1.25.0 + id: slack + with: + channel-id: ${{ secrets.QA_SLACK_CHANNEL }} + payload: | + { + "attachments": [ + { + "color": "${{ contains(join(needs.*.result, ','), 'failure') && '#C62828' || '#2E7D32' }}", + "blocks": [ + { + "type": "header", + "text": { + "type": "plain_text", + "text": "EVM Node Compatability Test Results ${{ contains(join(needs.*.result, ','), 'failure') && ':x:' || ':white_check_mark:'}}", + "emoji": true + } + }, + { + "type": "section", + "text": { + "type": "mrkdwn", + "text": "${{ contains(join(needs.*.result, ','), 'failure') && 'Some tests failed, notifying <@U060CGGPY8H>' || 'All Good!' }}" + } + }, + { + "type": "divider" + }, + { + "type": "section", + "text": { + "type": "mrkdwn", + "text": "<${{ github.server_url }}/${{ github.repository }}/releases/tag/${{ github.ref_name }}|${{ github.ref_name }}> | <${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }}|${{ github.sha }}> | <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|Run>" + } + } + ] + } + ] + } + env: + SLACK_BOT_TOKEN: ${{ secrets.QA_SLACK_API_KEY }} + + post-test-results-to-slack: + name: Post Test Results for ${{matrix.evm_node.eth_client}} to Slack + if: ${{ always() && needs.check-dependency-bump.outputs.dependency_changed == 'true' && needs.*.result != 'skipped' && needs.*.result != 'cancelled' }} + environment: integration + permissions: + checks: write + pull-requests: write + id-token: write + contents: read + runs-on: ubuntu-latest + needs: [start-slack-thread, build-test-matrix] + strategy: + fail-fast: false + matrix: + # this basically works as group by in SQL; we should update it when we update the test list JSON file + product: [automation,ocr,ocr2,vrf,vrfv2,vrfv2plus] + steps: + - name: Checkout the repo + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + with: + ref: ${{ github.event.pull_request.head.sha || github.event.merge_group.head_sha }} + - name: Post Test Results to Slack + uses: ./.github/actions/notify-slack-jobs-result + with: + github_token: ${{ github.token }} + github_repository: ${{ github.repository }} + workflow_run_id: ${{ github.run_id }} + github_job_name_regex: ^EVM node compatibility of ${{ matrix.product }} with (?.*?)$ + message_title: ${{ matrix.product }} + slack_channel_id: ${{ secrets.QA_SLACK_CHANNEL }} + slack_bot_token: ${{ secrets.QA_SLACK_API_KEY }} + slack_thread_ts: ${{ needs.start-slack-thread.outputs.thread_ts }} diff --git a/.github/workflows/goreleaser-build-publish-develop.yml b/.github/workflows/goreleaser-build-publish-develop.yml index 20bf4e342d1..699af61b626 100644 --- a/.github/workflows/goreleaser-build-publish-develop.yml +++ b/.github/workflows/goreleaser-build-publish-develop.yml @@ -8,7 +8,7 @@ on: jobs: push-chainlink-develop-goreleaser: runs-on: - labels: ubuntu20.04-16cores-64GB + labels: ubuntu22.04-16cores-64GB outputs: goreleaser-metadata: ${{ steps.build-sign-publish.outputs.goreleaser-metadata }} goreleaser-artifacts: ${{ steps.build-sign-publish.outputs.goreleaser-artifacts }} @@ -18,7 +18,7 @@ jobs: contents: read steps: - name: Checkout repository - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 - name: Configure aws credentials uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2 with: diff --git a/.github/workflows/helm-chart-publish.yml b/.github/workflows/helm-chart-publish.yml index ca0ff6104a4..643338ebf5d 100644 --- a/.github/workflows/helm-chart-publish.yml +++ b/.github/workflows/helm-chart-publish.yml @@ -12,7 +12,7 @@ jobs: contents: read steps: - name: Checkout repo - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 - name: Configure aws credentials uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2 @@ -23,12 +23,12 @@ jobs: - name: Get Github Token id: get-gh-token - uses: smartcontractkit/chainlink-github-actions/github-app-token-issuer@main + uses: smartcontractkit/chainlink-github-actions/github-app-token-issuer@5bee84d30d90295010bda68b0cd46be3a1eea917 # v2.3.9 with: url: ${{ secrets.GATI_LAMBDA_FUNCTION_URL }} - name: Install Helm - uses: azure/setup-helm@5119fcb9089d432beecbf79bb2c7915207344b78 # v3.5 + uses: azure/setup-helm@b7246b12e77f7134dc2d460a3d5bad15bbe29390 # v4.1.0 - name: Run chart-releaser uses: helm/chart-releaser-action@a917fd15b20e8b64b94d9158ad54cd6345335584 # v1.6.0 diff --git a/.github/workflows/integration-chaos-tests.yml b/.github/workflows/integration-chaos-tests.yml index 364b2ac12bb..9484eed95ed 100644 --- a/.github/workflows/integration-chaos-tests.yml +++ b/.github/workflows/integration-chaos-tests.yml @@ -26,10 +26,10 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout the repo - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 - name: Check if image exists id: check-image - uses: smartcontractkit/chainlink-github-actions/docker/image-exists@c67a09566412d153ff7640d99f96b43aa03abc04 # v2.3.6 + uses: smartcontractkit/chainlink-github-actions/docker/image-exists@5bee84d30d90295010bda68b0cd46be3a1eea917 # v2.3.9 with: repository: chainlink tag: ${{ github.sha }} @@ -37,7 +37,7 @@ jobs: AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} - name: Build Image if: steps.check-image.outputs.exists == 'false' - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/build-image@c67a09566412d153ff7640d99f96b43aa03abc04 # v2.3.6 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/build-image@5bee84d30d90295010bda68b0cd46be3a1eea917 # v2.3.9 with: cl_repo: smartcontractkit/chainlink cl_ref: ${{ github.sha }} @@ -69,7 +69,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout the repo - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 - name: Build Test Image uses: ./.github/actions/build-test-image with: @@ -109,7 +109,7 @@ jobs: test-results-file: '{"testType":"go","filePath":"/tmp/gotest.log"}' continue-on-error: true - name: Checkout the repo - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 - name: Prepare Base64 TOML config env: CHAINLINK_VERSION: ${{ github.sha }} @@ -129,7 +129,7 @@ jobs: echo ::add-mask::$BASE64_CONFIG_OVERRIDE echo "BASE64_CONFIG_OVERRIDE=$BASE64_CONFIG_OVERRIDE" >> $GITHUB_ENV - name: Run Tests - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@c67a09566412d153ff7640d99f96b43aa03abc04 # v2.3.6 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@5bee84d30d90295010bda68b0cd46be3a1eea917 # v2.3.9 with: test_command_to_run: cd integration-tests && go test -timeout 1h -count=1 -json -test.parallel 11 ./chaos 2>&1 | tee /tmp/gotest.log | gotestfmt test_download_vendor_packages_command: cd ./integration-tests && go mod download @@ -143,7 +143,7 @@ jobs: QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} QA_KUBECONFIG: ${{ secrets.QA_KUBECONFIG }} - name: Upload test log - uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 + uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 if: failure() with: name: Test Results Log diff --git a/.github/workflows/integration-staging-tests.yml b/.github/workflows/integration-staging-tests.yml index 6851a4ec3f1..d092b2bca1c 100644 --- a/.github/workflows/integration-staging-tests.yml +++ b/.github/workflows/integration-staging-tests.yml @@ -35,7 +35,7 @@ concurrency: jobs: e2e-soak-test: environment: sdlc - runs-on: ubuntu20.04-8cores-32GB + runs-on: ubuntu22.04-8cores-32GB permissions: contents: read id-token: write @@ -49,7 +49,7 @@ jobs: WASP_LOG_LEVEL: info steps: - name: Checkout code - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 with: fetch-depth: 0 - name: Prepare Base64 TOML override diff --git a/.github/workflows/integration-tests-publish.yml b/.github/workflows/integration-tests-publish.yml index ab4049cdab2..11f921a36a7 100644 --- a/.github/workflows/integration-tests-publish.yml +++ b/.github/workflows/integration-tests-publish.yml @@ -18,7 +18,7 @@ jobs: id-token: write contents: read name: Publish Integration Test Image - runs-on: ubuntu20.04-16cores-64GB + runs-on: ubuntu22.04-16cores-64GB steps: - name: Collect Metrics id: collect-gha-metrics @@ -30,7 +30,7 @@ jobs: this-job-name: Publish Integration Test Image continue-on-error: true - name: Checkout the repo - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 with: ref: ${{ github.event.pull_request.head.sha || github.sha }} - name: Setup Other Tags If Not Workflow Dispatch @@ -72,7 +72,7 @@ jobs: # dockerfile: plugins/chainlink.Dockerfile # tag-suffix: -plugins name: Build Chainlink Image ${{ matrix.image.name }} - runs-on: ubuntu20.04-8cores-32GB + runs-on: ubuntu22.04-8cores-32GB steps: - name: Collect Metrics id: collect-gha-metrics @@ -84,7 +84,7 @@ jobs: this-job-name: Build Chainlink Image ${{ matrix.image.name }} continue-on-error: true - name: Checkout the repo - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 with: ref: ${{ github.sha }} - name: Build Chainlink Image diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index e8c15109938..6a0c80abc97 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -1,4 +1,5 @@ name: Integration Tests +run-name: Integration Tests ${{ inputs.distinct_run_name && inputs.distinct_run_name || '' }} on: merge_group: pull_request: @@ -6,10 +7,28 @@ on: tags: - "*" workflow_dispatch: + inputs: + cl_ref: + description: 'The ref to checkout, defaults to the calling branch' + required: false + type: string + evm-ref: + description: 'The sha of the chainlink-evm commit to use if wanted' + required: false + type: string + run_solana: + description: 'Run solana tests' + required: false + type: string + default: 'false' + distinct_run_name: + description: 'A unique identifier for this run, only use from other repos' + required: false + type: string # Only run 1 of this workflow at a time per PR concurrency: - group: integration-tests-chainlink-${{ github.ref }} + group: integration-tests-chainlink-${{ github.ref }}-${{ inputs.distinct_run_name }} cancel-in-progress: true env: @@ -25,9 +44,15 @@ jobs: enforce-ctf-version: name: Enforce CTF Version runs-on: ubuntu-latest + # We don't directly merge dependabot PRs, so let's not waste the resources + if: github.actor != 'dependabot[bot]' steps: + - run: echo "${{github.event_name}}" - name: Checkout the repo - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 + with: + repository: smartcontractkit/chainlink + ref: ${{ inputs.cl_ref }} - name: Check Merge Group Condition id: condition-check run: | @@ -45,7 +70,7 @@ jobs: echo "should-enforce=$SHOULD_ENFORCE" >> $GITHUB_OUTPUT - name: Enforce CTF Version if: steps.condition-check.outputs.should-enforce == 'true' - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/mod-version@c67a09566412d153ff7640d99f96b43aa03abc04 # v2.3.6 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/mod-version@5bee84d30d90295010bda68b0cd46be3a1eea917 # v2.3.9 with: go-project-path: ./integration-tests module-name: github.com/smartcontractkit/chainlink-testing-framework @@ -54,14 +79,19 @@ jobs: environment: integration name: Check Paths That Require Tests To Run runs-on: ubuntu-latest + # We don't directly merge dependabot PRs, so let's not waste the resources + if: github.actor != 'dependabot[bot]' steps: - name: Checkout the repo - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - uses: dorny/paths-filter@0bc4621a3135347011ad047f9ecf449bf72ce2bd # v3.0.0 + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 + with: + repository: smartcontractkit/chainlink + ref: ${{ inputs.cl_ref }} + - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 id: changes with: filters: | - src: + changes: - '**/*.go' - '**/*go.sum' - '**/*go.mod' @@ -69,6 +99,10 @@ jobs: - '**/*Dockerfile' - 'core/**/config/**/*.toml' - 'integration-tests/**/*.toml' + - name: Ignore Filter On Workflow Dispatch + if: ${{ github.event_name == 'workflow_dispatch' }} + id: ignore-filter + run: echo "changes=true" >> $GITHUB_OUTPUT - name: Collect Metrics if: always() id: collect-gha-metrics @@ -80,11 +114,13 @@ jobs: this-job-name: Check Paths That Require Tests To Run continue-on-error: true outputs: - src: ${{ steps.changes.outputs.src }} + src: ${{ steps.ignore-filter.outputs.changes || steps.changes.outputs.changes }} build-lint-integration-tests: name: Build and Lint integration-tests - runs-on: ubuntu20.04-16cores-64GB + runs-on: ubuntu22.04-16cores-64GB + # We don't directly merge dependabot PRs, so let's not waste the resources + if: github.actor != 'dependabot[bot]' strategy: matrix: project: @@ -96,9 +132,12 @@ jobs: cache-id: load steps: - name: Checkout the repo - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 + with: + repository: smartcontractkit/chainlink + ref: ${{ inputs.cl_ref }} - name: Setup Go - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/setup-go@c67a09566412d153ff7640d99f96b43aa03abc04 # v2.3.6 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/setup-go@5bee84d30d90295010bda68b0cd46be3a1eea917 # v2.3.9 with: test_download_vendor_packages_command: cd ${{ matrix.project.path }} && go mod download go_mod_path: ${{ matrix.project.path }}/go.mod @@ -136,7 +175,7 @@ jobs: dockerfile: plugins/chainlink.Dockerfile tag-suffix: -plugins name: Build Chainlink Image ${{ matrix.image.name }} - runs-on: ubuntu20.04-16cores-64GB + runs-on: ubuntu22.04-16cores-64GB needs: [changes, enforce-ctf-version] steps: - name: Collect Metrics @@ -150,9 +189,10 @@ jobs: this-job-name: Build Chainlink Image ${{ matrix.image.name }} continue-on-error: true - name: Checkout the repo - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 with: - ref: ${{ github.event.pull_request.head.sha || github.event.merge_group.head_sha }} + repository: smartcontractkit/chainlink + ref: ${{ inputs.cl_ref || github.event.pull_request.head.sha || github.event.merge_group.head_sha }} - name: Build Chainlink Image if: needs.changes.outputs.src == 'true' || github.event_name == 'workflow_dispatch' uses: ./.github/actions/build-chainlink-image @@ -162,6 +202,7 @@ jobs: git_commit_sha: ${{ github.sha }} AWS_REGION: ${{ secrets.QA_AWS_REGION }} AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} + dep_evm_sha: ${{ inputs.evm-ref }} build-test-image: if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'schedule' || contains(join(github.event.pull_request.labels.*.name, ' '), 'build-test-image') @@ -170,7 +211,7 @@ jobs: id-token: write contents: read name: Build Test Image - runs-on: ubuntu20.04-16cores-64GB + runs-on: ubuntu22.04-16cores-64GB needs: [changes] steps: - name: Collect Metrics @@ -184,9 +225,10 @@ jobs: this-job-name: Build Test Image continue-on-error: true - name: Checkout the repo - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 with: - ref: ${{ github.event.pull_request.head.sha || github.event.merge_group.head_sha }} + repository: smartcontractkit/chainlink + ref: ${{ inputs.cl_ref || github.event.pull_request.head.sha || github.event.merge_group.head_sha }} - name: Build Test Image if: needs.changes.outputs.src == 'true' || github.event_name == 'workflow_dispatch' uses: ./.github/actions/build-test-image @@ -209,7 +251,10 @@ jobs: echo "## \`skip-smoke-tests\` label is active, skipping E2E smoke tests" >>$GITHUB_STEP_SUMMARY exit 0 - name: Checkout the repo - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 + with: + repository: smartcontractkit/chainlink + ref: ${{ inputs.cl_ref }} - name: Compare Test Lists run: | cd ./integration-tests @@ -277,9 +322,10 @@ jobs: test-results-file: '{"testType":"go","filePath":"/tmp/gotest.log"}' continue-on-error: true - name: Checkout the repo - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 with: - ref: ${{ github.event.pull_request.head.sha || github.event.merge_group.head_sha }} + repository: smartcontractkit/chainlink + ref: ${{ inputs.cl_ref || github.event.pull_request.head.sha || github.event.merge_group.head_sha }} - name: Build Go Test Command id: build-go-test-command run: | @@ -300,9 +346,9 @@ jobs: pyroscopeServer: ${{ matrix.product.pyroscope_env == '' && '' || !startsWith(github.ref, 'refs/tags/') && '' || secrets.QA_PYROSCOPE_INSTANCE }} # Avoid sending blank envs https://github.com/orgs/community/discussions/25725 pyroscopeEnvironment: ${{ matrix.product.pyroscope_env }} pyroscopeKey: ${{ secrets.QA_PYROSCOPE_KEY }} - lokiEndpoint: ${{ secrets.LOKI_URL }} - lokiTenantId: ${{ vars.LOKI_TENANT_ID }} - lokiBasicAuth: ${{ secrets.LOKI_BASIC_AUTH }} + lokiEndpoint: https://${{ secrets.GRAFANA_INTERNAL_HOST }}/loki/api/v1/push + lokiTenantId: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} + lokiBasicAuth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} logstreamLogTargets: ${{ vars.LOGSTREAM_LOG_TARGETS }} grafanaUrl: ${{ vars.GRAFANA_URL }} grafanaDashboardUrl: "/d/ddf75041-1e39-42af-aa46-361fe4c36e9e/ci-e2e-tests-logs" @@ -310,7 +356,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@c67a09566412d153ff7640d99f96b43aa03abc04 # v2.3.6 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@5bee84d30d90295010bda68b0cd46be3a1eea917 # v2.3.9 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 | gotestfmt test_download_vendor_packages_command: cd ./integration-tests && go mod download @@ -329,10 +375,10 @@ jobs: should_tidy: "false" - name: Print failed test summary if: always() - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/show-test-summary@c67a09566412d153ff7640d99f96b43aa03abc04 # v2.3.6 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/show-test-summary@5bee84d30d90295010bda68b0cd46be3a1eea917 # v2.3.9 eth-smoke-tests-matrix-log-poller: - if: ${{ !(contains(join(github.event.pull_request.labels.*.name, ' '), 'skip-smoke-tests') || github.event_name == 'workflow_dispatch') }} + if: ${{ !(contains(join(github.event.pull_request.labels.*.name, ' '), 'skip-smoke-tests') || github.event_name == 'workflow_dispatch') || inputs.distinct_run_name != '' }} environment: integration permissions: checks: write @@ -365,9 +411,10 @@ jobs: test-results-file: '{"testType":"go","filePath":"/tmp/gotest.log"}' continue-on-error: true - name: Checkout the repo - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 with: - ref: ${{ github.event.pull_request.head.sha || github.event.merge_group.head_sha }} + repository: smartcontractkit/chainlink + ref: ${{ inputs.cl_ref || github.event.pull_request.head.sha || github.event.merge_group.head_sha }} - name: Build Go Test Command id: build-go-test-command run: | @@ -388,16 +435,16 @@ jobs: pyroscopeServer: ${{ matrix.product.pyroscope_env == '' && '' || !startsWith(github.ref, 'refs/tags/') && '' || secrets.QA_PYROSCOPE_INSTANCE }} # Avoid sending blank envs https://github.com/orgs/community/discussions/25725 pyroscopeEnvironment: ${{ matrix.product.pyroscope_env }} pyroscopeKey: ${{ secrets.QA_PYROSCOPE_KEY }} - lokiEndpoint: ${{ secrets.LOKI_URL }} - lokiTenantId: ${{ vars.LOKI_TENANT_ID }} - lokiBasicAuth: ${{ secrets.LOKI_BASIC_AUTH }} + lokiEndpoint: https://${{ secrets.GRAFANA_INTERNAL_HOST }}/loki/api/v1/push + lokiTenantId: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} + lokiBasicAuth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} logstreamLogTargets: ${{ vars.LOGSTREAM_LOG_TARGETS }} grafanaUrl: ${{ vars.GRAFANA_URL }} grafanaDashboardUrl: "/d/ddf75041-1e39-42af-aa46-361fe4c36e9e/ci-e2e-tests-logs" ## 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@c67a09566412d153ff7640d99f96b43aa03abc04 # v2.3.6 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@5bee84d30d90295010bda68b0cd46be3a1eea917 # v2.3.9 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 | gotestfmt test_download_vendor_packages_command: cd ./integration-tests && go mod download @@ -419,6 +466,7 @@ jobs: if: ${{ !contains(join(github.event.pull_request.labels.*.name, ' '), 'skip-smoke-tests') }} environment: integration permissions: + actions: read checks: write pull-requests: write id-token: write @@ -452,12 +500,12 @@ jobs: pyroscope_env: ci-smoke-ocr-evm-simulated - name: ocr2 nodes: 6 - os: ubuntu-latest + os: ubuntu22.04-16cores-64GB file: ocr2 pyroscope_env: ci-smoke-ocr2-evm-simulated - name: ocr2 nodes: 6 - os: ubuntu-latest + os: ubuntu22.04-16cores-64GB pyroscope_env: ci-smoke-ocr2-plugins-evm-simulated tag_suffix: "-plugins" - name: vrf @@ -469,7 +517,7 @@ jobs: os: ubuntu-latest pyroscope_env: ci-smoke-vrf2-evm-simulated - name: vrfv2plus - nodes: 4 + nodes: 5 os: ubuntu-latest pyroscope_env: ci-smoke-vrf2plus-evm-simulated - name: forwarder_ocr @@ -483,6 +531,9 @@ jobs: runs-on: ${{ matrix.product.os }} name: ETH Smoke Tests ${{ matrix.product.name }}${{ matrix.product.tag_suffix }} steps: + # Handy for debugging resource usage + # - name: Collect Workflow Telemetry + # uses: catchpoint/workflow-telemetry-action@v2 - name: Collect Metrics if: needs.changes.outputs.src == 'true' || github.event_name == 'workflow_dispatch' id: collect-gha-metrics @@ -495,9 +546,10 @@ jobs: test-results-file: '{"testType":"go","filePath":"/tmp/gotest.log"}' continue-on-error: true - name: Checkout the repo - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 with: - ref: ${{ github.event.pull_request.head.sha || github.event.merge_group.head_sha }} + repository: smartcontractkit/chainlink + ref: ${{ inputs.cl_ref || github.event.pull_request.head.sha || github.event.merge_group.head_sha }} - name: Build Go Test Command id: build-go-test-command run: | @@ -570,16 +622,16 @@ jobs: pyroscopeServer: ${{ matrix.product.pyroscope_env == '' && '' || !startsWith(github.ref, 'refs/tags/') && '' || secrets.QA_PYROSCOPE_INSTANCE }} # Avoid sending blank envs https://github.com/orgs/community/discussions/25725 pyroscopeEnvironment: ${{ matrix.product.pyroscope_env }} pyroscopeKey: ${{ secrets.QA_PYROSCOPE_KEY }} - lokiEndpoint: ${{ secrets.LOKI_URL }} - lokiTenantId: ${{ vars.LOKI_TENANT_ID }} - lokiBasicAuth: ${{ secrets.LOKI_BASIC_AUTH }} + lokiEndpoint: https://${{ secrets.GRAFANA_INTERNAL_HOST }}/loki/api/v1/push + lokiTenantId: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} + lokiBasicAuth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} logstreamLogTargets: ${{ vars.LOGSTREAM_LOG_TARGETS }} grafanaUrl: ${{ vars.GRAFANA_URL }} grafanaDashboardUrl: "/d/ddf75041-1e39-42af-aa46-361fe4c36e9e/ci-e2e-tests-logs" ## 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@c67a09566412d153ff7640d99f96b43aa03abc04 # v2.3.6 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@5bee84d30d90295010bda68b0cd46be3a1eea917 # v2.3.9 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 | gotestfmt test_download_vendor_packages_command: cd ./integration-tests && go mod download @@ -600,7 +652,7 @@ jobs: # Run this step when changes that do not need the test to run are made - name: Run Setup if: needs.changes.outputs.src == 'false' - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/setup-run-tests-environment@c67a09566412d153ff7640d99f96b43aa03abc04 # v2.3.6 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/setup-run-tests-environment@5bee84d30d90295010bda68b0cd46be3a1eea917 # v2.3.9 with: test_download_vendor_packages_command: cd ./integration-tests && go mod download go_mod_path: ./integration-tests/go.mod @@ -620,13 +672,13 @@ jobs: ls -l ./integration-tests/smoke/traces - name: Upload Trace Data if: steps.check-label.outputs.trace == 'true' && matrix.product.name == 'ocr2' && matrix.product.tag_suffix == '-plugins' - uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 + uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 with: name: trace-data path: ./integration-tests/smoke/traces/trace-data.json - name: Print failed test summary if: always() - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/show-test-summary@c67a09566412d153ff7640d99f96b43aa03abc04 # v2.3.6 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/show-test-summary@5bee84d30d90295010bda68b0cd46be3a1eea917 # v2.3.9 with: test_directory: ./integration-tests/smoke/ @@ -635,13 +687,15 @@ jobs: if: always() runs-on: ubuntu-latest name: ETH Smoke Tests - needs: [eth-smoke-tests-matrix, eth-smoke-tests-matrix-automation] + needs: [eth-smoke-tests-matrix, eth-smoke-tests-matrix-automation, eth-smoke-tests-matrix-log-poller] # needs: [eth-smoke-tests-matrix] steps: - name: Check smoke test matrix status - if: needs.eth-smoke-tests-matrix.result != 'success' || needs.eth-smoke-tests-matrix-automation.result != 'success' + if: needs.eth-smoke-tests-matrix.result != 'success' || needs.eth-smoke-tests-matrix-automation.result != 'success' || needs.eth-smoke-tests-matrix-log-poller.result != 'success' run: | - echo "${{ needs.eth-smoke-tests-matrix.result }}" + echo "ETH Smoke Tests: ${{ needs.eth-smoke-tests-matrix.result }}" + echo "Automation: ${{ needs.eth-smoke-tests-matrix-automation.result }}" + echo "Log Poller: ${{ needs.eth-smoke-tests-matrix-log-poller.result }}" exit 1 - name: Collect Metrics if: always() @@ -663,7 +717,10 @@ jobs: steps: - name: Checkout repo if: ${{ github.event_name == 'pull_request' }} - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 + with: + repository: smartcontractkit/chainlink + ref: ${{ inputs.cl_ref }} - name: 🧼 Clean up Environment if: ${{ github.event_name == 'pull_request' }} @@ -693,11 +750,12 @@ jobs: continue-on-error: true steps: - name: Checkout the repo - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 with: - ref: ${{ github.event.pull_request.head.sha || github.event.merge_group.head_sha }} + repository: smartcontractkit/chainlink + ref: ${{ inputs.cl_ref || github.event.pull_request.head.sha || github.event.merge_group.head_sha }} - name: Run Setup - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/setup-go@c67a09566412d153ff7640d99f96b43aa03abc04 # v2.3.6 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/setup-go@5bee84d30d90295010bda68b0cd46be3a1eea917 # v2.3.9 with: test_download_vendor_packages_command: | cd ./integration-tests @@ -732,9 +790,10 @@ jobs: TEST_SUITE: migration steps: - name: Checkout the repo - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 with: - ref: ${{ github.event.pull_request.head.sha || github.event.merge_group.head_sha }} + repository: smartcontractkit/chainlink + ref: ${{ inputs.cl_ref || github.event.pull_request.head.sha || github.event.merge_group.head_sha }} - name: Get Latest Version id: get_latest_version run: | @@ -753,7 +812,7 @@ jobs: upgradeImage: ${{ env.UPGRADE_IMAGE }} upgradeVersion: ${{ env.UPGRADE_VERSION }} - name: Run Migration Tests - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@c67a09566412d153ff7640d99f96b43aa03abc04 # v2.3.6 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@5bee84d30d90295010bda68b0cd46be3a1eea917 # v2.3.9 with: test_command_to_run: cd ./integration-tests && go test -timeout 30m -count=1 -json ./migration 2>&1 | tee /tmp/gotest.log | gotestfmt test_download_vendor_packages_command: cd ./integration-tests && go mod download @@ -769,7 +828,7 @@ jobs: QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} QA_KUBECONFIG: ${{ secrets.QA_KUBECONFIG }} - name: Upload test log - uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 + uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 if: failure() with: name: test-log-${{ matrix.product.name }} @@ -790,6 +849,8 @@ jobs: ## Solana Section get_solana_sha: + # We don't directly merge dependabot PRs, so let's not waste the resources + if: ${{ github.actor != 'dependabot[bot]' && inputs.run_solana != 'false' }} name: Get Solana Sha From Go Mod environment: Integration runs-on: ubuntu-latest @@ -797,9 +858,10 @@ jobs: sha: ${{ steps.getsha.outputs.sha }} steps: - name: Checkout the repo - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 with: - ref: ${{ github.event.pull_request.head.sha || github.event.merge_group.head_sha }} + repository: smartcontractkit/chainlink + ref: ${{ inputs.cl_ref || github.event.pull_request.head.sha || github.event.merge_group.head_sha }} - name: Setup Go uses: ./.github/actions/setup-go with: @@ -816,7 +878,7 @@ jobs: echo "short sha is: ${short_sha}" echo "short_sha=${short_sha}" >> "$GITHUB_OUTPUT" - name: Checkout solana - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 with: repository: smartcontractkit/chainlink-solana ref: develop @@ -843,7 +905,7 @@ jobs: projectserum_version: ${{ steps.psversion.outputs.projectserum_version }} steps: - name: Checkout the solana repo - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 with: repository: smartcontractkit/chainlink-solana ref: ${{ needs.get_solana_sha.outputs.sha }} @@ -866,7 +928,7 @@ jobs: steps: - name: Check if image exists id: check-image - uses: smartcontractkit/chainlink-github-actions/docker/image-exists@c67a09566412d153ff7640d99f96b43aa03abc04 # v2.3.6 + uses: smartcontractkit/chainlink-github-actions/docker/image-exists@5bee84d30d90295010bda68b0cd46be3a1eea917 # v2.3.9 with: repository: chainlink-solana-tests tag: ${{ needs.get_solana_sha.outputs.sha }} @@ -881,7 +943,7 @@ jobs: id-token: write contents: read name: Solana Build Artifacts - runs-on: ubuntu20.04-16cores-64GB + runs-on: ubuntu22.04-16cores-64GB needs: [ changes, @@ -926,7 +988,7 @@ jobs: id-token: write contents: read name: Solana Build Test Image - runs-on: ubuntu20.04-16cores-64GB + runs-on: ubuntu22.04-16cores-64GB needs: [ solana-build-contracts, @@ -949,7 +1011,7 @@ jobs: continue-on-error: true - name: Checkout the repo if: (needs.changes.outputs.src == 'true' || github.event_name == 'workflow_dispatch') && needs.solana-test-image-exists.outputs.exists == 'false' - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 with: repository: smartcontractkit/chainlink-solana ref: ${{ needs.get_solana_sha.outputs.sha }} @@ -974,7 +1036,7 @@ jobs: id-token: write contents: read name: Solana Smoke Tests - runs-on: ubuntu20.04-16cores-64GB + runs-on: ubuntu22.04-16cores-64GB needs: [ build-chainlink, @@ -1001,13 +1063,13 @@ jobs: test-results-file: '{"testType":"go","filePath":"/tmp/gotest.log"}' continue-on-error: true - name: Checkout the repo - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 with: repository: smartcontractkit/chainlink-solana ref: ${{ needs.get_solana_sha.outputs.sha }} - name: Run Setup if: needs.changes.outputs.src == 'true' || github.event_name == 'workflow_dispatch' - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/setup-run-tests-environment@c67a09566412d153ff7640d99f96b43aa03abc04 # v2.3.6 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/setup-run-tests-environment@5bee84d30d90295010bda68b0cd46be3a1eea917 # v2.3.9 with: go_mod_path: ./integration-tests/go.mod cache_restore_only: true @@ -1051,7 +1113,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@c67a09566412d153ff7640d99f96b43aa03abc04 # v2.3.6 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@5bee84d30d90295010bda68b0cd46be3a1eea917 # v2.3.9 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 }} @@ -1067,7 +1129,7 @@ jobs: QA_KUBECONFIG: "" run_setup: false - name: Upload test log - uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 + uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 if: failure() with: name: test-log-solana diff --git a/.github/workflows/lint-gh-workflows.yml b/.github/workflows/lint-gh-workflows.yml index 381a2a56e16..992af2706e2 100644 --- a/.github/workflows/lint-gh-workflows.yml +++ b/.github/workflows/lint-gh-workflows.yml @@ -7,9 +7,9 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out Code - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 - name: Run actionlint - uses: reviewdog/action-actionlint@6a38513dd4d2e818798c5c73d0870adbb82de4a4 # v1.41.0 + uses: reviewdog/action-actionlint@c6ee1eb0a5d47b2af53a203652b5dac0b6c4016e # v1.43.0 - name: Collect Metrics if: always() id: collect-gha-metrics diff --git a/.github/workflows/live-testnet-tests.yml b/.github/workflows/live-testnet-tests.yml index 49a4796552f..107aee57ac0 100644 --- a/.github/workflows/live-testnet-tests.yml +++ b/.github/workflows/live-testnet-tests.yml @@ -5,6 +5,7 @@ # (we're trying to eliminate this as a requirement, should make it a lot easier). # Each chain can have a variety of tests to run. # We also want reporting to be clear in the start-slack-thread and post-test-results-to-slack jobs. +# Funding address: 0xC1107e57082945E28d3202A81B1520DEA3AE6AEC # *** name: Live Testnet Tests @@ -77,7 +78,7 @@ jobs: this-job-name: Build Chainlink Image continue-on-error: true - name: Checkout the repo - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 with: ref: ${{ github.event.pull_request.head.sha || github.event.merge_group.head_sha }} - name: Build Chainlink Image @@ -107,11 +108,11 @@ jobs: this-job-name: Build Tests Binary continue-on-error: true - name: Checkout the repo - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 with: ref: ${{ github.event.pull_request.head.sha || github.event.merge_group.head_sha }} - name: Build Tests - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/build-tests@c67a09566412d153ff7640d99f96b43aa03abc04 # v2.3.6 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/build-tests@5bee84d30d90295010bda68b0cd46be3a1eea917 # v2.3.9 with: test_download_vendor_packages_command: cd ./integration-tests && go mod download token: ${{ secrets.GITHUB_TOKEN }} @@ -174,7 +175,7 @@ jobs: "type": "section", "text": { "type": "mrkdwn", - "text": "<${{ github.server_url }}/${{ github.repository }}/releases/tag/${{ github.ref_name }}|${{ github.ref_name }}> | <${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }}|${{ github.sha }}> | <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|Run>" + "text": "<${{ github.server_url }}/${{ github.repository }}/releases/tag/${{ github.ref_name }}|${{ github.ref_name }}> | <${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }}|${{ github.sha }}> | <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|Run>\nThe funding address for all tests and networks is `0xC1107e57082945E28d3202A81B1520DEA3AE6AEC`" } } ] @@ -201,7 +202,7 @@ jobs: network: [Sepolia, Optimism Sepolia, Arbitrum Sepolia, Base Sepolia, Polygon Mumbai, Avalanche Fuji, Fantom Testnet, Celo Alfajores, Linea Goerli, BSC Testnet] steps: - name: Checkout the repo - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 with: ref: ${{ github.event.pull_request.head.sha || github.event.merge_group.head_sha }} - name: Post Test Results @@ -241,7 +242,7 @@ jobs: name: Sepolia ${{ matrix.product }} Tests runs-on: ubuntu-latest steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 with: fetch-depth: 0 - name: Prepare Base64 TOML override @@ -265,11 +266,11 @@ jobs: wsEndpoints: ${{ secrets.QA_SEPOLIA_URLS }} fundingKeys: ${{ secrets.QA_EVM_KEYS }} - name: Download Tests Binary - uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 + uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4 with: name: tests - name: Run Tests - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests-binary@c67a09566412d153ff7640d99f96b43aa03abc04 # v2.3.6 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests-binary@5bee84d30d90295010bda68b0cd46be3a1eea917 # v2.3.9 with: test_command_to_run: ./tests -test.timeout 30m -test.count=1 -test.parallel=1 -test.run ${{ matrix.test }} binary_name: tests @@ -287,7 +288,7 @@ jobs: QA_KUBECONFIG: ${{ secrets.QA_KUBECONFIG }} - name: Print failed test summary if: always() - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/show-test-summary@c67a09566412d153ff7640d99f96b43aa03abc04 # v2.3.6 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/show-test-summary@5bee84d30d90295010bda68b0cd46be3a1eea917 # v2.3.9 with: test_directory: "./" @@ -314,7 +315,7 @@ jobs: name: BSC Testnet ${{ matrix.product }} Tests runs-on: ubuntu-latest steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 with: fetch-depth: 0 - name: Prepare Base64 TOML override @@ -338,11 +339,11 @@ jobs: wsEndpoints: ${{ secrets.QA_BSC_TESTNET_URLS }} fundingKeys: ${{ secrets.QA_EVM_KEYS }} - name: Download Tests Binary - uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 + uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4 with: name: tests - name: Run Tests - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests-binary@c67a09566412d153ff7640d99f96b43aa03abc04 # v2.3.6 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests-binary@5bee84d30d90295010bda68b0cd46be3a1eea917 # v2.3.9 with: test_command_to_run: ./tests -test.timeout 30m -test.count=1 -test.parallel=1 -test.run ${{ matrix.test }} binary_name: tests @@ -360,7 +361,7 @@ jobs: QA_KUBECONFIG: ${{ secrets.QA_KUBECONFIG }} - name: Print failed test summary if: always() - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/show-test-summary@c67a09566412d153ff7640d99f96b43aa03abc04 # v2.3.6 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/show-test-summary@5bee84d30d90295010bda68b0cd46be3a1eea917 # v2.3.9 with: test_directory: "./" @@ -387,7 +388,7 @@ jobs: name: Optimism Sepolia ${{ matrix.product }} Tests runs-on: ubuntu-latest steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 with: fetch-depth: 0 - name: Prepare Base64 TOML override @@ -411,11 +412,11 @@ jobs: wsEndpoints: ${{ secrets.QA_OPTIMISM_SEPOLIA_URLS }} fundingKeys: ${{ secrets.QA_EVM_KEYS }} - name: Download Tests Binary - uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 + uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4 with: name: tests - name: Run Tests - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests-binary@c67a09566412d153ff7640d99f96b43aa03abc04 # v2.3.6 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests-binary@5bee84d30d90295010bda68b0cd46be3a1eea917 # v2.3.9 with: test_command_to_run: ./tests -test.timeout 30m -test.count=1 -test.parallel=1 -test.run ${{ matrix.test }} binary_name: tests @@ -433,7 +434,7 @@ jobs: QA_KUBECONFIG: ${{ secrets.QA_KUBECONFIG }} - name: Print failed test summary if: always() - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/show-test-summary@c67a09566412d153ff7640d99f96b43aa03abc04 # v2.3.6 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/show-test-summary@5bee84d30d90295010bda68b0cd46be3a1eea917 # v2.3.9 with: test_directory: "./" @@ -460,7 +461,7 @@ jobs: name: Arbitrum Sepolia ${{ matrix.product }} Tests runs-on: ubuntu-latest steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 with: fetch-depth: 0 - name: Prepare Base64 TOML override @@ -484,11 +485,11 @@ jobs: wsEndpoints: ${{ secrets.QA_ARBITRUM_SEPOLIA_URLS }} fundingKeys: ${{ secrets.QA_EVM_KEYS }} - name: Download Tests Binary - uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 + uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4 with: name: tests - name: Run Tests - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests-binary@c67a09566412d153ff7640d99f96b43aa03abc04 # v2.3.6 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests-binary@5bee84d30d90295010bda68b0cd46be3a1eea917 # v2.3.9 with: test_command_to_run: ./tests -test.timeout 30m -test.count=1 -test.parallel=1 -test.run ${{ matrix.test }} binary_name: tests @@ -506,7 +507,7 @@ jobs: QA_KUBECONFIG: ${{ secrets.QA_KUBECONFIG }} - name: Print failed test summary if: always() - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/show-test-summary@c67a09566412d153ff7640d99f96b43aa03abc04 # v2.3.6 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/show-test-summary@5bee84d30d90295010bda68b0cd46be3a1eea917 # v2.3.9 with: test_directory: "./" @@ -529,7 +530,7 @@ jobs: name: Base Sepolia ${{ matrix.product }} Tests runs-on: ubuntu-latest steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 with: fetch-depth: 0 - name: Prepare Base64 TOML override @@ -553,11 +554,11 @@ jobs: wsEndpoints: ${{ secrets.QA_BASE_SEPOLIA_URLS }} fundingKeys: ${{ secrets.QA_EVM_KEYS }} - name: Download Tests Binary - uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 + uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4 with: name: tests - name: Run Tests - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests-binary@c67a09566412d153ff7640d99f96b43aa03abc04 # v2.3.6 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests-binary@5bee84d30d90295010bda68b0cd46be3a1eea917 # v2.3.9 with: test_command_to_run: ./tests -test.timeout 30m -test.count=1 -test.parallel=1 -test.run ${{ matrix.test }} binary_name: tests @@ -575,7 +576,7 @@ jobs: QA_KUBECONFIG: ${{ secrets.QA_KUBECONFIG }} - name: Print failed test summary if: always() - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/show-test-summary@c67a09566412d153ff7640d99f96b43aa03abc04 # v2.3.6 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/show-test-summary@5bee84d30d90295010bda68b0cd46be3a1eea917 # v2.3.9 with: test_directory: "./" @@ -602,7 +603,7 @@ jobs: name: Polygon Mumbai ${{ matrix.product }} Tests runs-on: ubuntu-latest steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 with: fetch-depth: 0 - name: Prepare Base64 TOML override @@ -626,11 +627,11 @@ jobs: wsEndpoints: ${{ secrets.QA_POLYGON_MUMBAI_URLS }} fundingKeys: ${{ secrets.QA_EVM_KEYS }} - name: Download Tests Binary - uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 + uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4 with: name: tests - name: Run Tests - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests-binary@c67a09566412d153ff7640d99f96b43aa03abc04 # v2.3.6 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests-binary@5bee84d30d90295010bda68b0cd46be3a1eea917 # v2.3.9 with: test_command_to_run: ./tests -test.timeout 30m -test.count=1 -test.parallel=1 -test.run ${{ matrix.test }} binary_name: tests @@ -648,7 +649,7 @@ jobs: QA_KUBECONFIG: ${{ secrets.QA_KUBECONFIG }} - name: Print failed test summary if: always() - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/show-test-summary@c67a09566412d153ff7640d99f96b43aa03abc04 # v2.3.6 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/show-test-summary@5bee84d30d90295010bda68b0cd46be3a1eea917 # v2.3.9 with: test_directory: "./" @@ -675,7 +676,7 @@ jobs: name: Avalanche Fuji ${{ matrix.product }} Tests runs-on: ubuntu-latest steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 with: fetch-depth: 0 - name: Prepare Base64 TOML override @@ -699,11 +700,11 @@ jobs: wsEndpoints: ${{ secrets.QA_AVALANCHE_FUJI_URLS }} fundingKeys: ${{ secrets.QA_EVM_KEYS }} - name: Download Tests Binary - uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 + uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4 with: name: tests - name: Run Tests - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests-binary@c67a09566412d153ff7640d99f96b43aa03abc04 # v2.3.6 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests-binary@5bee84d30d90295010bda68b0cd46be3a1eea917 # v2.3.9 with: test_command_to_run: ./tests -test.timeout 30m -test.count=1 -test.parallel=1 -test.run ${{ matrix.test }} binary_name: tests @@ -721,7 +722,7 @@ jobs: QA_KUBECONFIG: ${{ secrets.QA_KUBECONFIG }} - name: Print failed test summary if: always() - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/show-test-summary@c67a09566412d153ff7640d99f96b43aa03abc04 # v2.3.6 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/show-test-summary@5bee84d30d90295010bda68b0cd46be3a1eea917 # v2.3.9 with: test_directory: "./" @@ -748,7 +749,7 @@ jobs: name: Fantom Testnet ${{ matrix.product }} Tests runs-on: ubuntu-latest steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 with: fetch-depth: 0 - name: Prepare Base64 TOML override @@ -772,11 +773,11 @@ jobs: wsEndpoints: ${{ secrets.QA_FANTOM_TESTNET_URLS }} fundingKeys: ${{ secrets.QA_EVM_KEYS }} - name: Download Tests Binary - uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 + uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4 with: name: tests - name: Run Tests - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests-binary@c67a09566412d153ff7640d99f96b43aa03abc04 # v2.3.6 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests-binary@5bee84d30d90295010bda68b0cd46be3a1eea917 # v2.3.9 with: test_command_to_run: ./tests -test.timeout 30m -test.count=1 -test.parallel=1 -test.run ${{ matrix.test }} binary_name: tests @@ -794,7 +795,7 @@ jobs: QA_KUBECONFIG: ${{ secrets.QA_KUBECONFIG }} - name: Print failed test summary if: always() - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/show-test-summary@c67a09566412d153ff7640d99f96b43aa03abc04 # v2.3.6 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/show-test-summary@5bee84d30d90295010bda68b0cd46be3a1eea917 # v2.3.9 with: test_directory: "./" @@ -817,7 +818,7 @@ jobs: name: Celo Alfajores ${{ matrix.product }} Tests runs-on: ubuntu-latest steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 with: fetch-depth: 0 - name: Prepare Base64 TOML override @@ -841,11 +842,11 @@ jobs: wsEndpoints: ${{ secrets.QA_CELO_ALFAJORES_URLS }} fundingKeys: ${{ secrets.QA_EVM_KEYS }} - name: Download Tests Binary - uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 + uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4 with: name: tests - name: Run Tests - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests-binary@c67a09566412d153ff7640d99f96b43aa03abc04 # v2.3.6 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests-binary@5bee84d30d90295010bda68b0cd46be3a1eea917 # v2.3.9 with: test_command_to_run: ./tests -test.timeout 30m -test.count=1 -test.parallel=1 -test.run ${{ matrix.test }} binary_name: tests @@ -863,7 +864,7 @@ jobs: QA_KUBECONFIG: ${{ secrets.QA_KUBECONFIG }} - name: Print failed test summary if: always() - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/show-test-summary@c67a09566412d153ff7640d99f96b43aa03abc04 # v2.3.6 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/show-test-summary@5bee84d30d90295010bda68b0cd46be3a1eea917 # v2.3.9 with: test_directory: "./" @@ -886,7 +887,7 @@ jobs: name: Scroll Sepolia ${{ matrix.product }} Tests runs-on: ubuntu-latest steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 with: fetch-depth: 0 - name: Prepare Base64 TOML override @@ -910,11 +911,11 @@ jobs: wsEndpoints: ${{ secrets.QA_SCROLL_SEPOLIA_URLS }} fundingKeys: ${{ secrets.QA_EVM_KEYS }} - name: Download Tests Binary - uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 + uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4 with: name: tests - name: Run Tests - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests-binary@c67a09566412d153ff7640d99f96b43aa03abc04 # v2.3.6 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests-binary@5bee84d30d90295010bda68b0cd46be3a1eea917 # v2.3.9 with: test_command_to_run: ./tests -test.timeout 30m -test.count=1 -test.parallel=1 -test.run ${{ matrix.test }} binary_name: tests @@ -932,7 +933,7 @@ jobs: QA_KUBECONFIG: ${{ secrets.QA_KUBECONFIG }} - name: Print failed test summary if: always() - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/show-test-summary@c67a09566412d153ff7640d99f96b43aa03abc04 # v2.3.6 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/show-test-summary@5bee84d30d90295010bda68b0cd46be3a1eea917 # v2.3.9 with: test_directory: "./" @@ -955,7 +956,7 @@ jobs: name: Linea Goerli ${{ matrix.product }} Tests runs-on: ubuntu-latest steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 with: fetch-depth: 0 - name: Prepare Base64 TOML override @@ -979,11 +980,11 @@ jobs: wsEndpoints: ${{ secrets.QA_LINEA_GOERLI_URLS }} fundingKeys: ${{ secrets.QA_EVM_KEYS }} - name: Download Tests Binary - uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 + uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4 with: name: tests - name: Run Tests - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests-binary@c67a09566412d153ff7640d99f96b43aa03abc04 # v2.3.6 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests-binary@5bee84d30d90295010bda68b0cd46be3a1eea917 # v2.3.9 with: test_command_to_run: ./tests -test.timeout 30m -test.count=1 -test.parallel=1 -test.run ${{ matrix.test }} binary_name: tests @@ -1001,6 +1002,6 @@ jobs: QA_KUBECONFIG: ${{ secrets.QA_KUBECONFIG }} - name: Print failed test summary if: always() - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/show-test-summary@c67a09566412d153ff7640d99f96b43aa03abc04 # v2.3.6 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/show-test-summary@5bee84d30d90295010bda68b0cd46be3a1eea917 # v2.3.9 with: test_directory: "./" diff --git a/.github/workflows/live-vrf-tests.yml b/.github/workflows/live-vrf-tests.yml index e5b3530820b..9dfc1f11ce7 100644 --- a/.github/workflows/live-vrf-tests.yml +++ b/.github/workflows/live-vrf-tests.yml @@ -1,23 +1,16 @@ -name: Live VRF Tests +# Funding address: 0xC1107e57082945E28d3202A81B1520DEA3AE6AEC +name: Generic Live Smoke Tests on: workflow_dispatch: inputs: - slack_user_id: - description: "The Slack member ID to notify" - required: true - type: string networks: - description: "Remove any networks you don't want to run tests on" + description: "Comma-separated list of networks to run on" required: true default: "SEPOLIA,OPTIMISM_SEPOLIA,ARBITRUM_SEPOLIA" - test: - description: "Choose test you want to run" + test_list: + description: "Comma-separated list of tests to run" required: true - type: choice - options: - - "TestVRFBasic" - - "TestVRFv2Basic" - - "TestVRFv2Plus" + default: "TestVRFBasic,TestVRFv2Basic,TestVRFv2Plus" env: CHAINLINK_IMAGE: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink @@ -58,7 +51,7 @@ jobs: this-job-name: Build Chainlink Image continue-on-error: true - name: Checkout the repo - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 with: ref: ${{ github.event.pull_request.head.sha || github.event.merge_group.head_sha }} - name: Build Chainlink Image @@ -79,6 +72,8 @@ jobs: contents: read name: Build Tests Binary runs-on: ubuntu-latest + outputs: + matrix: ${{ steps.build-matrix.outputs.matrix }} steps: - name: Collect Metrics id: collect-gha-metrics @@ -90,11 +85,17 @@ jobs: this-job-name: Build Tests Binary continue-on-error: true - name: Checkout the repo - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 with: ref: ${{ github.event.pull_request.head.sha || github.event.merge_group.head_sha }} + - name: Build Network Matrix + id: build-matrix + run: | + NETWORKS="[\"${{ github.event.inputs.networks }}\"]" + NETWORKS="${NETWORKS//,/\",\"}" + echo "matrix=${NETWORKS}" >> "$GITHUB_OUTPUT" - name: Build Tests - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/build-tests@c67a09566412d153ff7640d99f96b43aa03abc04 # v2.3.6 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/build-tests@5bee84d30d90295010bda68b0cd46be3a1eea917 # v2.3.9 with: test_download_vendor_packages_command: cd ./integration-tests && go mod download token: ${{ secrets.GITHUB_TOKEN }} @@ -104,46 +105,35 @@ jobs: cache_restore_only: "true" binary_name: tests - build-matrix: - environment: integration - permissions: - id-token: write - contents: read - name: Build Matrix - runs-on: ubuntu-latest - outputs: - matrix: ${{ steps.build-matrix.outputs.matrix }} - steps: - - id: build-matrix - run: | - NETWORKS="[\"${{ github.event.inputs.networks }}\"]" - NETWORKS="${NETWORKS//,/\",\"}" - echo "matrix=${NETWORKS}" # End Build Test Dependencies - live-vrf-tests: + live-smoke-tests: environment: integration permissions: checks: write pull-requests: write id-token: write contents: read - needs: [build-chainlink, build-tests, build-matrix] + needs: [build-chainlink, build-tests] strategy: - max-parallel: 1 fail-fast: false matrix: - network: ${{fromJson(needs.build-matrix.outputs.matrix)}} - name: VRF Tests on ${{ matrix.network }} + network: ${{fromJson(needs.build-tests.outputs.matrix)}} + name: Smoke Tests on ${{ matrix.network }} runs-on: ubuntu-latest steps: - name: Build Secrets Names id: build-secrets-names run: | - echo "HTTP_URLS_SECRET_NAME=QA_${{ matrix }}_HTTP_URLS" - echo "URLS_SECRET_NAME=QA_${{ matrix }}_URLS" - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + echo "HTTP_URLS_SECRET_NAME=QA_${{ matrix.network }}_HTTP_URLS" >> $GITHUB_ENV + echo "URLS_SECRET_NAME=QA_${{ matrix.network }}_URLS" >> $GITHUB_ENV + - name: Split Test Names + id: split_list + run: | + IFS=',' read -ra ADDR <<< "${{ inputs.test_list }}" + echo "test_list=${ADDR[*]}" >> $GITHUB_ENV + - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 with: fetch-depth: 0 - name: Prepare Base64 TOML override @@ -164,13 +154,13 @@ jobs: wsEndpoints: ${{ secrets[env.URLS_SECRET_NAME] }} fundingKeys: ${{ secrets.QA_EVM_KEYS }} - name: Download Tests Binary - uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 + uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4 with: name: tests - name: Run Tests - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests-binary@c67a09566412d153ff7640d99f96b43aa03abc04 # v2.3.6 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests-binary@5bee84d30d90295010bda68b0cd46be3a1eea917 # v2.3.9 with: - test_command_to_run: ./tests -test.timeout 1h -test.count=1 -test.parallel=1 -test.run ${{ inputs.test }} + test_command_to_run: ./tests -test.v -test.timeout 4h -test.count=1 -test.parallel=1 -test.run ${{ env.test_list }} binary_name: tests cl_repo: ${{ env.CHAINLINK_IMAGE }} cl_image_tag: ${{ github.sha }} @@ -186,6 +176,6 @@ jobs: QA_KUBECONFIG: ${{ secrets.QA_KUBECONFIG }} - name: Print failed test summary if: always() - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/show-test-summary@c67a09566412d153ff7640d99f96b43aa03abc04 # v2.3.6 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/show-test-summary@5bee84d30d90295010bda68b0cd46be3a1eea917 # v2.3.9 with: test_directory: "./" \ No newline at end of file diff --git a/.github/workflows/on-demand-log-poller.yml b/.github/workflows/on-demand-log-poller.yml index ad3617841d3..1685c7e4556 100644 --- a/.github/workflows/on-demand-log-poller.yml +++ b/.github/workflows/on-demand-log-poller.yml @@ -11,7 +11,7 @@ jobs: test: env: REF_NAME: ${{ github.head_ref || github.ref_name }} - runs-on: ubuntu20.04-8cores-32GB + runs-on: ubuntu22.04-8cores-32GB steps: - name: Add masks and export base64 config run: | @@ -19,7 +19,7 @@ jobs: echo ::add-mask::$BASE64_CONFIG_OVERRIDE echo "BASE64_CONFIG_OVERRIDE=$BASE64_CONFIG_OVERRIDE" >> $GITHUB_ENV - name: Checkout the repo - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 with: ref: ${{ env.REF_NAME }} - name: Setup Go diff --git a/.github/workflows/on-demand-ocr-soak-test.yml b/.github/workflows/on-demand-ocr-soak-test.yml index b44a3fb2d92..8635adc6323 100644 --- a/.github/workflows/on-demand-ocr-soak-test.yml +++ b/.github/workflows/on-demand-ocr-soak-test.yml @@ -40,7 +40,7 @@ jobs: this-job-name: ${{ inputs.network }} OCR Soak Test continue-on-error: true - name: Checkout the repo - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 with: ref: ${{ env.REF_NAME }} - name: Get Slack config and mask base64 config @@ -72,7 +72,7 @@ jobs: QA_AWS_REGION: ${{ secrets.QA_AWS_REGION }} QA_AWS_ACCOUNT_NUMBER: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }} - name: Run Tests - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@c67a09566412d153ff7640d99f96b43aa03abc04 # v2.3.6 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@5bee84d30d90295010bda68b0cd46be3a1eea917 # v2.3.9 env: DETACH_RUNNER: true TEST_SUITE: soak diff --git a/.github/workflows/on-demand-vrfv2-eth2-clients-test.yml b/.github/workflows/on-demand-vrfv2-eth2-clients-test.yml index 24db1e6ffcf..1450faf393d 100644 --- a/.github/workflows/on-demand-vrfv2-eth2-clients-test.yml +++ b/.github/workflows/on-demand-vrfv2-eth2-clients-test.yml @@ -11,7 +11,7 @@ jobs: vrfv2_smoke_test: name: VRFV2 Smoke Test with custom EL client client environment: integration - runs-on: ubuntu20.04-8cores-32GB + runs-on: ubuntu22.04-8cores-32GB permissions: checks: write pull-requests: write @@ -22,7 +22,7 @@ jobs: REF_NAME: ${{ github.head_ref || github.ref_name }} steps: - name: Checkout code - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 with: fetch-depth: 0 - name: Mask base64 config @@ -46,7 +46,7 @@ jobs: echo "### Execution client used" >>$GITHUB_STEP_SUMMARY echo "\`${{ env.ETH2_EL_CLIENT }}\`" >>$GITHUB_STEP_SUMMARY - name: Run Tests - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@c67a09566412d153ff7640d99f96b43aa03abc04 # v2.3.6 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@5bee84d30d90295010bda68b0cd46be3a1eea917 # v2.3.9 with: test_command_to_run: cd ./integration-tests && go test -timeout 30m -count=1 -json -run TestVRFv2Basic ./smoke/vrfv2_test.go 2>&1 | tee /tmp/gotest.log | gotestfmt test_download_vendor_packages_command: cd ./integration-tests && go mod download diff --git a/.github/workflows/on-demand-vrfv2-performance-test.yml b/.github/workflows/on-demand-vrfv2-performance-test.yml index 33377f2133c..47f86b23ad1 100644 --- a/.github/workflows/on-demand-vrfv2-performance-test.yml +++ b/.github/workflows/on-demand-vrfv2-performance-test.yml @@ -19,7 +19,7 @@ jobs: vrfv2_performance_test: name: VRFV2 Performance Test environment: integration - runs-on: ubuntu20.04-8cores-32GB + runs-on: ubuntu22.04-8cores-32GB permissions: checks: write pull-requests: write @@ -46,7 +46,7 @@ jobs: this-job-name: ${{ inputs.network }} VRFV2 Performance Test continue-on-error: true - name: Checkout code - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 with: fetch-depth: 0 - name: Mask base64 config @@ -68,7 +68,7 @@ jobs: echo "### Networks on which test was run" >>$GITHUB_STEP_SUMMARY echo "\`${{ env.NETWORKS }}\`" >>$GITHUB_STEP_SUMMARY - name: Run Tests - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@c67a09566412d153ff7640d99f96b43aa03abc04 # v2.3.6 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@5bee84d30d90295010bda68b0cd46be3a1eea917 # v2.3.9 with: test_command_to_run: cd ./integration-tests/load && go test -v -count=1 -timeout 24h -run TestVRFV2Performance/vrfv2_performance_test ./vrfv2 test_download_vendor_packages_command: cd ./integration-tests && go mod download diff --git a/.github/workflows/on-demand-vrfv2plus-eth2-clients-test.yml b/.github/workflows/on-demand-vrfv2plus-eth2-clients-test.yml index 01777fba646..0150bfdbdf4 100644 --- a/.github/workflows/on-demand-vrfv2plus-eth2-clients-test.yml +++ b/.github/workflows/on-demand-vrfv2plus-eth2-clients-test.yml @@ -11,7 +11,7 @@ jobs: vrfv2plus_smoke_test: name: VRFV2Plus Smoke Test with custom EL client environment: integration - runs-on: ubuntu20.04-8cores-32GB + runs-on: ubuntu22.04-8cores-32GB permissions: checks: write pull-requests: write @@ -22,7 +22,7 @@ jobs: REF_NAME: ${{ github.head_ref || github.ref_name }} steps: - name: Checkout code - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 with: fetch-depth: 0 - name: Mask base64 config @@ -46,7 +46,7 @@ jobs: echo "### Execution client used" >>$GITHUB_STEP_SUMMARY echo "\`${{ env.ETH2_EL_CLIENT }}\`" >>$GITHUB_STEP_SUMMARY - name: Run Tests - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@c67a09566412d153ff7640d99f96b43aa03abc04 # v2.3.6 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@5bee84d30d90295010bda68b0cd46be3a1eea917 # v2.3.9 with: test_command_to_run: cd ./integration-tests && go test -timeout 30m -count=1 -json -run ^TestVRFv2Plus$/^Link_Billing$ ./smoke/vrfv2plus_test.go 2>&1 | tee /tmp/gotest.log | gotestfmt test_download_vendor_packages_command: cd ./integration-tests && go mod download diff --git a/.github/workflows/on-demand-vrfv2plus-performance-test.yml b/.github/workflows/on-demand-vrfv2plus-performance-test.yml index 4240486a181..009b8303a42 100644 --- a/.github/workflows/on-demand-vrfv2plus-performance-test.yml +++ b/.github/workflows/on-demand-vrfv2plus-performance-test.yml @@ -20,7 +20,7 @@ jobs: vrfv2plus_performance_test: name: VRFV2 Plus Performance Test environment: integration - runs-on: ubuntu20.04-8cores-32GB + runs-on: ubuntu22.04-8cores-32GB permissions: checks: write pull-requests: write @@ -47,7 +47,7 @@ jobs: this-job-name: ${{ inputs.network }} VRFV2 Plus Performance Test continue-on-error: true - name: Checkout code - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 with: fetch-depth: 0 - name: Mask base64 config @@ -69,7 +69,7 @@ jobs: echo "### Networks on which test was run" >>$GITHUB_STEP_SUMMARY echo "\`${{ env.NETWORKS }}\`" >>$GITHUB_STEP_SUMMARY - name: Run Tests - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@c67a09566412d153ff7640d99f96b43aa03abc04 # v2.3.6 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@5bee84d30d90295010bda68b0cd46be3a1eea917 # v2.3.9 with: test_command_to_run: cd ./integration-tests/load && go test -v -count=1 -timeout 24h -run TestVRFV2PlusPerformance/vrfv2plus_performance_test ./vrfv2plus test_download_vendor_packages_command: cd ./integration-tests && go mod download diff --git a/.github/workflows/operator-ui-cd.yml b/.github/workflows/operator-ui-cd.yml index 7bbdc3deaef..1e49dc038e4 100644 --- a/.github/workflows/operator-ui-cd.yml +++ b/.github/workflows/operator-ui-cd.yml @@ -16,7 +16,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout the repo - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 - name: Update version id: update @@ -34,12 +34,12 @@ jobs: - name: Get Github Token id: get-gh-token - uses: smartcontractkit/chainlink-github-actions/github-app-token-issuer@chore/update-github-app-token-issuer + uses: smartcontractkit/chainlink-github-actions/github-app-token-issuer@5bee84d30d90295010bda68b0cd46be3a1eea917 # v2.3.9 with: url: ${{ secrets.AWS_INFRA_RELENG_TOKEN_ISSUER_LAMBDA_URL }} - name: Open PR - uses: peter-evans/create-pull-request@b1ddad2c994a25fbc81a28b3ec0e368bb2021c50 # v6.0.0 + uses: peter-evans/create-pull-request@70a41aba780001da0a30141984ae2a0c95d8704e # v6.0.2 with: title: Update Operator UI from ${{ steps.update.outputs.current_tag }} to ${{ steps.update.outputs.latest_tag }} token: ${{ steps.get-gh-token.outputs.access-token }} diff --git a/.github/workflows/operator-ui-ci.yml b/.github/workflows/operator-ui-ci.yml index 8fbd366a346..14bc5b75f70 100644 --- a/.github/workflows/operator-ui-ci.yml +++ b/.github/workflows/operator-ui-ci.yml @@ -33,7 +33,7 @@ jobs: - name: Get Github Token id: get-gh-token - uses: smartcontractkit/chainlink-github-actions/github-app-token-issuer@main + uses: smartcontractkit/chainlink-github-actions/github-app-token-issuer@5bee84d30d90295010bda68b0cd46be3a1eea917 # v2.3.9 with: url: ${{ secrets.AWS_INFRA_RELENG_TOKEN_ISSUER_LAMBDA_URL }} diff --git a/.github/workflows/pr-labels.yml b/.github/workflows/pr-labels.yml index 5480199544a..ee12102f3dd 100644 --- a/.github/workflows/pr-labels.yml +++ b/.github/workflows/pr-labels.yml @@ -8,19 +8,38 @@ jobs: crib: runs-on: ubuntu-latest permissions: + # For AWS assume role. + id-token: write + contents: read + # To comment on PR's. issues: write pull-requests: write steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 + + - uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # v3.0.0 + with: + version: ^8.0.0 - uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 with: node-version: 20 + cache: pnpm + cache-dependency-path: ./.github/scripts/crib/pnpm-lock.yaml - - run: npm ci + - run: pnpm install working-directory: ./.github/scripts/crib + - name: Assume role capable of dispatching action + uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2 + with: + role-to-assume: ${{ secrets.AWS_OIDC_CRIB_ROLE_ARN_SAND }} + role-duration-seconds: 900 + role-session-name: gha-pr-labels-crib + aws-region: ${{ secrets.AWS_REGION }} + - name: Comment CRIB details on PR run: ./.github/scripts/crib/pr-comment-crib-env.js env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + ROUTE53_ZONE_ID: ${{ secrets.ROUTE53_ZONE_ID_SAND }} diff --git a/.github/workflows/readme.yml b/.github/workflows/readme.yml deleted file mode 100644 index 54fa3d7e43d..00000000000 --- a/.github/workflows/readme.yml +++ /dev/null @@ -1,40 +0,0 @@ -# -# This action checks PRs to see if any README* files were updated. -# If none were, it will add a message to the PR asking if it would make sense to do so. -# -name: Readme - -on: pull_request - -jobs: - readme: - # For security reasons, GITHUB_TOKEN is read-only on forks, so we cannot leave comments on PRs. - # This check skips the job if it is detected we are running on a fork. - if: ${{ github.event.pull_request.head.repo.full_name == 'smartcontractkit/chainlink' }} - name: Readme checker - runs-on: ubuntu-latest - steps: - - name: Check for changed files - id: changedfiles - uses: umani/changed-files@d7f842d11479940a6036e3aacc6d35523e6ba978 # Version 4.1.0 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - pattern: '^(?!.*node_modules).*README\.md$' - - name: Make a comment - uses: unsplash/comment-on-pr@ffe8f97ccc63ce12c3c23c6885b169db67958d3b # Version 1.3.0 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - if: contains(steps.changedfiles.outputs.files_updated, 'README') != true && contains(steps.changedfiles.outputs.files_created, 'README') != true - with: - msg: "I see that you haven't updated any README files. Would it make sense to do so?" - check_for_duplicate_msg: true - - name: Collect Metrics - if: always() - id: collect-gha-metrics - uses: smartcontractkit/push-gha-metrics-action@0281b09807758be1dcc41651e44e62b353808c47 # v2.1.0 - with: - org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} - basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} - hostname: ${{ secrets.GRAFANA_INTERNAL_HOST }} - this-job-name: Readme checker - continue-on-error: true \ No newline at end of file diff --git a/.github/workflows/solidity-foundry.yml b/.github/workflows/solidity-foundry.yml index 47f9571eea3..d88de60a38b 100644 --- a/.github/workflows/solidity-foundry.yml +++ b/.github/workflows/solidity-foundry.yml @@ -12,8 +12,8 @@ jobs: changes: ${{ steps.changes.outputs.src }} steps: - name: Checkout the repo - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - uses: dorny/paths-filter@0bc4621a3135347011ad047f9ecf449bf72ce2bd # v3.0.0 + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 + - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 id: changes with: # Foundry is only used for Solidity v0.8 contracts, therefore we can ignore @@ -42,7 +42,7 @@ jobs: # passing required check for PRs that don't have filtered changes. steps: - name: Checkout the repo - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 with: submodules: recursive @@ -55,7 +55,7 @@ jobs: - name: Install Foundry if: needs.changes.outputs.changes == 'true' - uses: foundry-rs/foundry-toolchain@v1 + uses: foundry-rs/foundry-toolchain@8f1998e9878d786675189ef566a2e4bf24869773 # v1.2.0 with: # Has to match the `make foundry` version. version: nightly-5b7e4cb3c882b28f3c32ba580de27ce7381f415a diff --git a/.github/workflows/solidity-hardhat.yml b/.github/workflows/solidity-hardhat.yml index f07c9f8fdca..16f2c32e58e 100644 --- a/.github/workflows/solidity-hardhat.yml +++ b/.github/workflows/solidity-hardhat.yml @@ -19,8 +19,8 @@ jobs: changes: ${{ steps.changes.outputs.src }} steps: - name: Checkout the repo - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - uses: dorny/paths-filter@0bc4621a3135347011ad047f9ecf449bf72ce2bd # v3.0.0 + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 + - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 id: changes with: filters: | @@ -40,7 +40,7 @@ jobs: splits: ${{ steps.split.outputs.splits }} steps: - name: Checkout the repo - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 - name: Generate splits id: split uses: ./.github/actions/split-tests @@ -67,7 +67,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout the repo - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 - name: Setup NodeJS uses: ./.github/actions/setup-nodejs - name: Setup Hardhat @@ -85,7 +85,7 @@ jobs: - name: Rename coverage run: mv ./contracts/coverage.json ./contracts/coverage-${{ matrix.split.idx }}.json - name: Upload coverage - uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 + uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 with: name: solidity-coverage-${{ matrix.split.idx }} path: ./contracts/coverage-${{ matrix.split.idx }}.json @@ -106,13 +106,13 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout the repo - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 - name: Setup NodeJS uses: ./.github/actions/setup-nodejs - name: Make coverage directory run: mkdir ./contracts/coverage-reports - name: Download coverage - uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 + uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4 with: path: ./contracts/coverage-reports - name: Display structure of downloaded files @@ -133,7 +133,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout the repo - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 - name: Setup NodeJS uses: ./.github/actions/setup-nodejs - name: Setup Hardhat diff --git a/.github/workflows/solidity.yml b/.github/workflows/solidity.yml index 904cdacfbff..f734a5c0c73 100644 --- a/.github/workflows/solidity.yml +++ b/.github/workflows/solidity.yml @@ -16,8 +16,8 @@ jobs: changes: ${{ steps.changes.outputs.src }} steps: - name: Checkout the repo - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - uses: dorny/paths-filter@0bc4621a3135347011ad047f9ecf449bf72ce2bd # v3.0.0 + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 + - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 id: changes with: list-files: "csv" @@ -48,7 +48,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout the repo - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 - name: Setup NodeJS uses: ./.github/actions/setup-nodejs - name: Run Prepublish test @@ -71,9 +71,9 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout the repo - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 - name: Checkout diff-so-fancy - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 with: repository: so-fancy/diff-so-fancy ref: a673cb4d2707f64d92b86498a2f5f71c8e2643d5 # v1.4.3 @@ -120,7 +120,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout the repo - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 - name: Setup NodeJS if: needs.changes.outputs.changes == 'true' uses: ./.github/actions/setup-nodejs @@ -150,7 +150,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout the repo - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 - name: Setup NodeJS if: needs.changes.outputs.changes == 'true' uses: ./.github/actions/setup-nodejs diff --git a/.github/workflows/sync-develop-from-smartcontractkit-chainlink.yml b/.github/workflows/sync-develop-from-smartcontractkit-chainlink.yml index afdcfa156c2..3e08a66afbc 100644 --- a/.github/workflows/sync-develop-from-smartcontractkit-chainlink.yml +++ b/.github/workflows/sync-develop-from-smartcontractkit-chainlink.yml @@ -10,7 +10,7 @@ jobs: name: Sync runs-on: ubuntu-latest steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 with: ref: develop if: env.GITHUB_REPOSITORY != 'smartcontractkit/chainlink' diff --git a/.gitignore b/.gitignore index e56774fbefc..1091b453326 100644 --- a/.gitignore +++ b/.gitignore @@ -23,12 +23,14 @@ tools/clroot/db.sqlite3-wal .DS_Store .envrc .env* +!charts/chainlink-cluster/.env.example !.github/actions/setup-postgres/.env .direnv .idea .vscode/ *.iml debug.env +*.txt # codeship *.aes @@ -91,7 +93,10 @@ tools/flakeytests/coverage.txt **/testdata/fuzz/* # Runtime test configuration that might contain secrets -overrides.toml +override*.toml # Pythin venv .venv/ + +# Temp Changelog migration +CHANGELOG.md diff --git a/.goreleaser.develop.yaml b/.goreleaser.develop.yaml index 60949eee72e..7fbd2aa667b 100644 --- a/.goreleaser.develop.yaml +++ b/.goreleaser.develop.yaml @@ -63,6 +63,7 @@ dockers: goarch: amd64 extra_files: - tmp/linux_amd64/libs + - tmp/linux_amd64/plugins - tools/bin/ldd_fix build_flag_templates: - "--platform=linux/amd64" @@ -86,6 +87,7 @@ dockers: goarch: arm64 extra_files: - tmp/linux_arm64/libs + - tmp/linux_arm64/plugins - tools/bin/ldd_fix build_flag_templates: - "--platform=linux/arm64" @@ -109,6 +111,7 @@ dockers: goarch: amd64 extra_files: - tmp/linux_amd64/libs + - tmp/linux_amd64/plugins - tools/bin/ldd_fix build_flag_templates: - "--platform=linux/amd64" @@ -133,6 +136,7 @@ dockers: goarch: arm64 extra_files: - tmp/linux_arm64/libs + - tmp/linux_arm64/plugins - tools/bin/ldd_fix build_flag_templates: - "--platform=linux/arm64" diff --git a/.goreleaser.devspace.yaml b/.goreleaser.devspace.yaml index 21888325fca..1c6b4768d98 100644 --- a/.goreleaser.devspace.yaml +++ b/.goreleaser.devspace.yaml @@ -1,9 +1,8 @@ ## goreleaser <1.14.0 -project_name: chainlink +project_name: chainlink-devspace env: - ZIG_EXEC={{ if index .Env "ZIG_EXEC" }}{{ .Env.ZIG_EXEC }}{{ else }}zig{{ end }} - - IMAGE_PREFIX={{ if index .Env "IMAGE_PREFIX" }}{{ .Env.IMAGE_PREFIX }}{{ else }}localhost:5001{{ end }} - IMAGE_LABEL_DESCRIPTION="node of the decentralized oracle network, bridging on and off-chain computation" - IMAGE_LABEL_LICENSES="MIT" - IMAGE_LABEL_SOURCE="https://github.com/smartcontractkit/{{ .ProjectName }}" @@ -13,7 +12,6 @@ before: - go mod tidy - ./tools/bin/goreleaser_utils before_hook - # See https://goreleaser.com/customization/build/ builds: - binary: chainlink @@ -33,8 +31,9 @@ builds: - -buildmode=pie ldflags: - -s -w -r=$ORIGIN/libs - - -X github.com/smartcontractkit/chainlink/v2/core/static.Version={{ .Env.CHAINLINK_VERSION }} + - -X github.com/smartcontractkit/chainlink/v2/core/static.Version={{ .Version }} - -X github.com/smartcontractkit/chainlink/v2/core/static.Sha={{ .FullCommit }} + # See https://goreleaser.com/customization/docker/ dockers: - id: linux-amd64 @@ -44,42 +43,39 @@ dockers: goarch: amd64 extra_files: - tmp/linux_amd64/libs + - tmp/linux_amd64/plugins - tools/bin/ldd_fix build_flag_templates: - "--platform=linux/amd64" - "--pull" - "--build-arg=CHAINLINK_USER=chainlink" - "--build-arg=COMMIT_SHA={{ .FullCommit }}" + - "--build-arg=CL_MEDIAN_CMD=chainlink-feeds" + - "--build-arg=CL_MERCURY_CMD=chainlink-mercury" + - "--build-arg=CL_SOLANA_CMD=chainlink-solana" + - "--build-arg=CL_STARKNET_CMD=chainlink-starknet" - "--label=org.opencontainers.image.created={{ .Date }}" - "--label=org.opencontainers.image.description={{ .Env.IMAGE_LABEL_DESCRIPTION }}" - "--label=org.opencontainers.image.licenses={{ .Env.IMAGE_LABEL_LICENSES }}" - "--label=org.opencontainers.image.revision={{ .FullCommit }}" - "--label=org.opencontainers.image.source={{ .Env.IMAGE_LABEL_SOURCE }}" - "--label=org.opencontainers.image.title={{ .ProjectName }}" - - "--label=org.opencontainers.image.version={{ .Env.CHAINLINK_VERSION }}" + - "--label=org.opencontainers.image.version={{ .Version }}" - "--label=org.opencontainers.image.url={{ .Env.IMAGE_LABEL_SOURCE }}" image_templates: - - "{{ .Env.IMAGE_PREFIX }}/{{ .ProjectName }}-develop:develop-amd64" - - "{{ .Env.IMAGE_PREFIX }}/{{ .ProjectName }}-develop:sha-{{ .ShortCommit }}-amd64" + - "{{ .Env.IMAGE }}" + # See https://goreleaser.com/customization/docker_manifest/ docker_manifests: - - name_template: "{{ .Env.IMAGE_PREFIX }}/{{ .ProjectName }}-develop:develop" + - name_template: "{{ .Env.IMAGE }}" image_templates: - - "{{ .Env.IMAGE_PREFIX }}/{{ .ProjectName }}-develop:develop-amd64" - - name_template: "{{ .Env.IMAGE_PREFIX }}/{{ .ProjectName }}-develop:sha-{{ .ShortCommit }}" - image_templates: - - "{{ .Env.IMAGE_PREFIX }}/{{ .ProjectName }}-develop:sha-{{ .ShortCommit }}-amd64" - -# See https://goreleaser.com/customization/docker_sign/ -docker_signs: - - artifacts: all - stdin: "{{ .Env.COSIGN_PASSWORD }}" + - "{{ .Env.IMAGE }}" checksum: name_template: "checksums.txt" snapshot: - name_template: "{{ .Env.CHAINLINK_VERSION }}-{{ .ShortCommit }}" + name_template: '{{ .Env.CHAINLINK_VERSION }}-{{ .Runtime.Goarch }}-{{ .Now.Format "2006-01-02-15-04-05Z" }}' changelog: sort: asc diff --git a/.npmrc b/.npmrc new file mode 100644 index 00000000000..f84c6d739b3 --- /dev/null +++ b/.npmrc @@ -0,0 +1,2 @@ +auto-install-peers=true +exclude-links-from-lockfile=true diff --git a/.tool-versions b/.tool-versions index b3c9c6c56da..4aa55bda3f5 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1,6 +1,7 @@ golang 1.21.7 mockery 2.38.0 nodejs 16.16.0 +pnpm 8.11.0 postgres 13.3 helm 3.10.3 zig 0.11.0 diff --git a/GNUmakefile b/GNUmakefile index 46565a2778a..be540e63ea2 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -27,11 +27,8 @@ gomod: ## Ensure chainlink's go dependencies are installed. go mod download .PHONY: gomodtidy -gomodtidy: ## Run go mod tidy on all modules. - go mod tidy - cd ./core/scripts && go mod tidy - cd ./integration-tests && go mod tidy - cd ./integration-tests/load && go mod tidy +gomodtidy: gomods ## Run go mod tidy on all modules. + gomods tidy .PHONY: godoc godoc: ## Install and run godoc @@ -84,8 +81,8 @@ abigen: ## Build & install abigen. ./tools/bin/build_abigen .PHONY: generate -generate: abigen codecgen mockery protoc ## Execute all go:generate commands. - go generate -x ./... +generate: abigen codecgen mockery protoc gomods ## Execute all go:generate commands. + gomods -w go generate -x ./... .PHONY: testscripts testscripts: chainlink-test ## Install and run testscript against testdata/scripts/* files. @@ -112,6 +109,10 @@ presubmit: ## Format go files and imports. gofmt -w . go mod tidy +.PHONY: gomods +gomods: ## Install gomods + go install github.com/jmank88/gomods@v0.1.0 + .PHONY: mockery mockery: $(mockery) ## Install mockery. go install github.com/vektra/mockery/v2@v2.38.0 diff --git a/README.md b/README.md index 099712061d5..82bb8e0b755 100644 --- a/README.md +++ b/README.md @@ -292,6 +292,18 @@ createuser --superuser --password chainlink -h localhost Now you can run tests or compile code as usual. 5. When you're done, stop it: `cd $PGDATA; pg_ctl -o "--unix_socket_directories='$PWD'" stop` +### Changesets + +We use [changesets](https://github.com/changesets/changesets) to manage versioning for libs and the services. + +Every PR that modifies any configuration or code, should most likely accompanied by a changeset file. + +To install `changesets`: + 1. Install `pnpm` if it is not already installed - [docs](https://pnpm.io/installation). + 2. Run `pnpm install`. + +Either after or before you create a commit, run the `pnpm changeset` command to create an accompanying changeset entry which will reflect on the CHANGELOG for the next release. + ### Tips For more tips on how to build and test Chainlink, see our [development tips page](https://github.com/smartcontractkit/chainlink/wiki/Development-Tips). diff --git a/VERSION b/VERSION index c8e38b61405..10c2c0c3d62 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.9.0 +2.10.0 diff --git a/charts/chainlink-cluster/.env.example b/charts/chainlink-cluster/.env.example new file mode 100644 index 00000000000..703c7bf7f83 --- /dev/null +++ b/charts/chainlink-cluster/.env.example @@ -0,0 +1,17 @@ +# The image that will be used for the Chainlink nodes. +DEVSPACE_IMAGE= + +# This is a comma separated list of CIDR blocks that will be allowed to access the ingress. +DEVSPACE_INGRESS_CIDRS= + +# This is the base domain in AWS Route 53 that our ingress subdomains will use. +DEVSPACE_INGRESS_BASE_DOMAIN= + +# This is the ARN of the AWS ACM certificate that will be used for the ingress. +DEVSPACE_INGRESS_CERT_ARN= + +# Time to wait for pods to be in `Ready` condition +DEVSPACE_K8S_POD_WAIT_TIMEOUT=600s + +# The duration that the namespace and all of its associated resources will be kept alive. +NS_TTL=72h diff --git a/charts/chainlink-cluster/.helmignore b/charts/chainlink-cluster/.helmignore index d2c33ef3014..b88381301b2 100644 --- a/charts/chainlink-cluster/.helmignore +++ b/charts/chainlink-cluster/.helmignore @@ -22,3 +22,4 @@ *.tmproj .vscode/ .devspace/ +scripts/ diff --git a/charts/chainlink-cluster/README.md b/charts/chainlink-cluster/README.md index 0943ca5a8b6..0fbbd5d16df 100644 --- a/charts/chainlink-cluster/README.md +++ b/charts/chainlink-cluster/README.md @@ -1,13 +1,17 @@ # Chainlink cluster + Example CL nodes 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 ``` @@ -15,17 +19,27 @@ 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](./values.yaml) comments for more details Set up your K8s access + ``` export DEVSPACE_IMAGE="..." ./setup.sh ${my-personal-namespace-name-crib} ``` -Build and deploy current commit +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 ``` @@ -33,103 +47,110 @@ 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 don't need to build use +If you want to deploy an image tag that is already available in ECR, use: + ``` -devspace deploy --skip-build +devspace deploy --override-image-tag "" ``` -To deploy particular commit (must be in the registry) use +If you want to deploy an image tag from a public ECR repo, use: + ``` -devspace deploy --skip-build ${short_sha_of_image} +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} ``` -Update some Go code of Chainlink node and quickly sync your cluster +List ingress hostnames + ``` -devspace dev +devspace run ingress-hosts ``` -To reset pods to original image just checkout needed commit and do `devspace deploy` again - 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 -## Debug existing cluster -If you need to debug CL node that is already deployed change `dev.app.container` and `dev.app.labelSelector` in [devspace.yaml](devspace.yaml) if they are not default and run: -``` -devspace dev -p node -``` - -## Automatic file sync -When you run `devspace dev` your files described in `dev.app.sync` of [devspace.yaml](devspace.yaml) will be uploaded to the switched container - -After that all the changes will be synced automatically - -Check `.profiles` to understand what is uploaded in profiles `runner` and `node` - # 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 ## Install from release + Add the repository + ``` helm repo add chainlink-cluster https://github.com/raw/smartcontractkit/chainlink/helm-release/ helm repo update ``` + Set default namespace + ``` 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 + ``` helm test cl-cluster ``` ## Uninstall + ``` helm uninstall cl-cluster ``` # Grafana dashboard -We are using [Grabana](https://github.com/K-Phoen/grabana) lib to create dashboards programmatically -You can select `PANELS_INCLUDED`, options are `core`, `wasp`, comma separated +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` + ``` export LOKI_TENANT_ID=promtail export LOKI_URL=... @@ -137,11 +158,34 @@ export GRAFANA_URL=... export GRAFANA_TOKEN=... export PROMETHEUS_DATA_SOURCE_NAME=Thanos export LOKI_DATA_SOURCE_NAME=Loki -export PANELS_INCLUDED=core,wasp -export INFRA_PLATFORM=kubernetes|docker -export GRAFANA_FOLDER=DashboardCoreDebug -export DASHBOARD_NAME=ChainlinkClusterDebug +export INFRA_PLATFORM=kubernetes +export GRAFANA_FOLDER=CRIB +export DASHBOARD_NAME=CL-Cluster + +devspace run dashboard_deploy +``` + +Open Grafana folder `DashboardCoreDebug` and find dashboard `ChainlinkClusterDebug` -go run dashboard/cmd/dashboard_deploy.go +# 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 ``` -Open Grafana folder `DashboardCoreDebug` and find dashboard `ChainlinkClusterDebug` \ No newline at end of file + +# 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/dashboard/cmd/dashboard_deploy.go b/charts/chainlink-cluster/dashboard/cmd/dashboard_deploy.go deleted file mode 100644 index a818ff44095..00000000000 --- a/charts/chainlink-cluster/dashboard/cmd/dashboard_deploy.go +++ /dev/null @@ -1,75 +0,0 @@ -package main - -import ( - "fmt" - "github.com/smartcontractkit/chainlink/charts/chainlink-cluster/dashboard/dashboard" - "os" - "strings" -) - -func main() { - name := os.Getenv("DASHBOARD_NAME") - if name == "" { - panic("DASHBOARD_NAME must be provided") - } - - lokiDataSourceName := os.Getenv("LOKI_DATA_SOURCE_NAME") - if lokiDataSourceName == "" { - fmt.Println("LOKI_DATA_SOURCE_NAME is empty, panels with logs will be disabled") - } - - prometheusDataSourceName := os.Getenv("PROMETHEUS_DATA_SOURCE_NAME") - if prometheusDataSourceName == "" { - panic("PROMETHEUS_DATA_SOURCE_NAME must be provided") - } - - grafanaURL := os.Getenv("GRAFANA_URL") - if grafanaURL == "" { - panic("GRAFANA_URL must be provided") - } - - grafanaToken := os.Getenv("GRAFANA_TOKEN") - if grafanaToken == "" { - panic("GRAFANA_TOKEN must be provided") - } - - grafanaFolder := os.Getenv("GRAFANA_FOLDER") - if grafanaFolder == "" { - panic("GRAFANA_FOLDER must be provided") - } - - infraPlatform := os.Getenv("INFRA_PLATFORM") - if infraPlatform == "" { - panic("INFRA_PLATFORM must be provided, can be either docker|kubernetes") - } - - panelsIncluded := os.Getenv("PANELS_INCLUDED") - // can be empty - if panelsIncluded == "" { - fmt.Println("PANELS_INCLUDED can be provided to specify panels groups, value must be separated by comma. Possible values are: core, wasp") - } - panelsIncludedArray := strings.Split(panelsIncluded, ",") - - err := dashboard.NewDashboard( - name, - grafanaURL, - grafanaToken, - grafanaFolder, - []string{"generated"}, - lokiDataSourceName, - prometheusDataSourceName, - infraPlatform, - panelsIncludedArray, - nil, - ) - if err != nil { - fmt.Printf("Could not create dashbard: %s\n", name) - fmt.Printf("Error: %s\n", err) - os.Exit(1) - } - fmt.Printf("Successfully deployed %s dashboard on grafana instance %s in folder %s\n", - name, - grafanaURL, - grafanaFolder, - ) -} diff --git a/charts/chainlink-cluster/dashboard/cmd/deploy.go b/charts/chainlink-cluster/dashboard/cmd/deploy.go new file mode 100644 index 00000000000..883c1939a6b --- /dev/null +++ b/charts/chainlink-cluster/dashboard/cmd/deploy.go @@ -0,0 +1,79 @@ +package main + +import ( + "github.com/K-Phoen/grabana/dashboard" + lib "github.com/smartcontractkit/chainlink/dashboard-lib" + core_don "github.com/smartcontractkit/chainlink/dashboard-lib/core-don" + k8spods "github.com/smartcontractkit/chainlink/dashboard-lib/k8s-pods" + waspdb "github.com/smartcontractkit/wasp/dashboard" +) + +const ( + DashboardName = "Chainlink Cluster (DON)" +) + +func main() { + cfg := lib.ReadEnvDeployOpts() + db := lib.NewDashboard(DashboardName, cfg, + []dashboard.Option{ + dashboard.AutoRefresh("10s"), + dashboard.Tags([]string{"generated"}), + }, + ) + db.Add( + core_don.New( + core_don.Props{ + PrometheusDataSource: cfg.DataSources.Prometheus, + PlatformOpts: core_don.PlatformPanelOpts(cfg.Platform), + }, + ), + ) + if cfg.Platform == "kubernetes" { + db.Add( + k8spods.New( + k8spods.Props{ + PrometheusDataSource: cfg.DataSources.Prometheus, + LokiDataSource: cfg.DataSources.Loki, + }, + ), + ) + } + // TODO: refactor as a component later + addWASPRows(db, cfg) + if err := db.Deploy(); err != nil { + lib.L.Fatal().Err(err).Msg("failed to deploy the dashboard") + } + lib.L.Info(). + Str("Name", DashboardName). + Str("GrafanaURL", db.DeployOpts.GrafanaURL). + Str("GrafanaFolder", db.DeployOpts.GrafanaFolder). + Msg("Dashboard deployed") +} + +func addWASPRows(db *lib.Dashboard, cfg lib.EnvConfig) { + if cfg.Platform == "docker" { + return + } + selectors := map[string]string{ + "branch": `=~"${branch:pipe}"`, + "commit": `=~"${commit:pipe}"`, + } + db.Add(waspdb.AddVariables(cfg.DataSources.Loki)) + db.Add( + []dashboard.Option{ + waspdb.WASPLoadStatsRow( + cfg.DataSources.Loki, + selectors, + ), + }, + ) + db.Add( + []dashboard.Option{ + waspdb.WASPDebugDataRow( + cfg.DataSources.Loki, + selectors, + true, + ), + }, + ) +} diff --git a/charts/chainlink-cluster/dashboard/dashboard.go b/charts/chainlink-cluster/dashboard/dashboard.go deleted file mode 100644 index ff8b7fa8a0a..00000000000 --- a/charts/chainlink-cluster/dashboard/dashboard.go +++ /dev/null @@ -1,201 +0,0 @@ -package dashboard - -import ( - "context" - "fmt" - "github.com/K-Phoen/grabana" - "github.com/K-Phoen/grabana/dashboard" - "github.com/K-Phoen/grabana/variable/query" - wasp "github.com/smartcontractkit/wasp/dashboard" - "net/http" - "os" -) - -type PanelOption struct { - labelFilters map[string]string - labelFilter string - legendString string - labelQuery string -} - -type Dashboard struct { - Name string - grafanaURL string - grafanaToken string - grafanaFolder string - grafanaTags []string - LokiDataSourceName string - PrometheusDataSourceName string - platform string - panels []string - panelOption PanelOption - Builder dashboard.Builder - opts []dashboard.Option - extendedOpts []dashboard.Option -} - -// NewDashboard returns a new Grafana dashboard, it comes empty and depending on user inputs panels are added to it -func NewDashboard( - name string, - grafanaURL string, - grafanaToken string, - grafanaFolder string, - grafanaTags []string, - lokiDataSourceName string, - prometheusDataSourceName string, - platform string, - panels []string, - extendedOpts []dashboard.Option, -) error { - db := &Dashboard{ - Name: name, - grafanaURL: grafanaURL, - grafanaToken: grafanaToken, - grafanaFolder: grafanaFolder, - grafanaTags: grafanaTags, - LokiDataSourceName: lokiDataSourceName, - PrometheusDataSourceName: prometheusDataSourceName, - platform: platform, - panels: panels, - extendedOpts: extendedOpts, - } - db.init() - db.addCoreVariables() - - if Contains(db.panels, "core") { - db.addCorePanels() - } - - switch db.platform { - case "kubernetes": - db.addKubernetesVariables() - db.addKubernetesPanels() - panelQuery := map[string]string{ - "branch": `=~"${branch:pipe}"`, - "commit": `=~"${commit:pipe}"`, - } - waspPanelsLoadStats := wasp.WASPLoadStatsRow(db.LokiDataSourceName, panelQuery) - waspPanelsDebugData := wasp.WASPDebugDataRow(db.LokiDataSourceName, panelQuery, false) - db.opts = append(db.opts, waspPanelsLoadStats) - db.opts = append(db.opts, waspPanelsDebugData) - break - } - - db.opts = append(db.opts, db.extendedOpts...) - err := db.deploy() - if err != nil { - os.Exit(1) - return err - } - return nil -} - -func (m *Dashboard) deploy() error { - ctx := context.Background() - - builder, builderErr := dashboard.New( - m.Name, - m.opts..., - ) - if builderErr != nil { - fmt.Printf("Could not build dashboard: %s\n", builderErr) - return builderErr - } - - client := grabana.NewClient(&http.Client{}, m.grafanaURL, grabana.WithAPIToken(m.grafanaToken)) - fo, folderErr := client.FindOrCreateFolder(ctx, m.grafanaFolder) - if folderErr != nil { - fmt.Printf("Could not find or create folder: %s\n", folderErr) - return folderErr - } - if _, err := client.UpsertDashboard(ctx, fo, builder); err != nil { - fmt.Printf("Could not upsert dashboard: %s\n", err) - return err - } - - return nil -} - -func (m *Dashboard) init() { - opts := []dashboard.Option{ - dashboard.AutoRefresh("10s"), - dashboard.Tags(m.grafanaTags), - } - - m.panelOption.labelFilters = map[string]string{ - "instance": `=~"${instance}"`, - "commit": `=~"${commit:pipe}"`, - } - - switch m.platform { - case "kubernetes": - m.panelOption.labelFilters = map[string]string{ - "job": `=~"${instance}"`, - "namespace": `=~"${namespace}"`, - "pod": `=~"${pod}"`, - } - m.panelOption.labelFilter = "job" - m.panelOption.legendString = "pod" - break - case "docker": - m.panelOption.labelFilters = map[string]string{ - "instance": `=~"${instance}"`, - } - m.panelOption.labelFilter = "instance" - m.panelOption.legendString = "instance" - break - } - - for key, value := range m.panelOption.labelFilters { - m.panelOption.labelQuery += key + value + ", " - } - m.opts = append(m.opts, opts...) -} - -func (m *Dashboard) addCoreVariables() { - opts := []dashboard.Option{ - dashboard.VariableAsQuery( - "instance", - query.DataSource(m.PrometheusDataSourceName), - query.Multiple(), - query.IncludeAll(), - query.Request(fmt.Sprintf("label_values(%s)", m.panelOption.labelFilter)), - query.Sort(query.NumericalAsc), - ), - dashboard.VariableAsQuery( - "evmChainID", - query.DataSource(m.PrometheusDataSourceName), - query.Multiple(), - query.IncludeAll(), - query.Request(fmt.Sprintf("label_values(%s)", "evmChainID")), - query.Sort(query.NumericalAsc), - ), - } - - m.opts = append(m.opts, opts...) -} - -func (m *Dashboard) addKubernetesVariables() { - opts := []dashboard.Option{ - dashboard.VariableAsQuery( - "namespace", - query.DataSource(m.PrometheusDataSourceName), - query.Multiple(), - query.IncludeAll(), - query.Request(fmt.Sprintf("label_values(%s)", "namespace")), - query.Sort(query.NumericalAsc), - ), - dashboard.VariableAsQuery( - "pod", - query.DataSource(m.PrometheusDataSourceName), - query.Multiple(), - query.IncludeAll(), - query.Request("label_values(kube_pod_container_info{namespace=\"$namespace\"}, pod)"), - query.Sort(query.NumericalAsc), - ), - } - - m.opts = append(m.opts, opts...) - waspVariables := wasp.AddVariables(m.LokiDataSourceName) - m.opts = append(m.opts, waspVariables...) -} diff --git a/charts/chainlink-cluster/dashboard/panels.go b/charts/chainlink-cluster/dashboard/panels.go deleted file mode 100644 index 61161a2f7b6..00000000000 --- a/charts/chainlink-cluster/dashboard/panels.go +++ /dev/null @@ -1,1779 +0,0 @@ -package dashboard - -import ( - "github.com/K-Phoen/grabana/dashboard" - "github.com/K-Phoen/grabana/gauge" - "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" -) - -func (m *Dashboard) addMainPanels() { - var panelsIncluded []row.Option - var goVersionLegend string = "version" - - globalInfoPanels := []row.Option{ - row.WithStat( - "App Version", - stat.DataSource(m.PrometheusDataSourceName), - stat.Text(stat.TextValueAndName), - stat.Orientation(stat.OrientationAuto), - stat.TitleFontSize(12), - stat.ValueFontSize(20), - stat.Span(2), - stat.Text("name"), - stat.WithPrometheusTarget( - `version{`+m.panelOption.labelQuery+`}`, - prometheus.Legend("{{version}}"), - ), - ), - row.WithStat( - "Go Version", - stat.DataSource(m.PrometheusDataSourceName), - stat.Text(stat.TextValueAndName), - stat.Orientation(stat.OrientationAuto), - stat.TitleFontSize(12), - stat.ValueFontSize(20), - stat.Span(2), - stat.Text("name"), - stat.WithPrometheusTarget( - `go_info{`+m.panelOption.labelQuery+`}`, - prometheus.Legend("{{"+goVersionLegend+"}}"), - ), - ), - row.WithStat( - "Uptime in days", - stat.DataSource(m.PrometheusDataSourceName), - stat.Text(stat.TextValueAndName), - stat.Orientation(stat.OrientationHorizontal), - stat.TitleFontSize(12), - stat.ValueFontSize(20), - stat.Span(8), - stat.WithPrometheusTarget( - `uptime_seconds{`+m.panelOption.labelQuery+`} / 86400`, - prometheus.Legend("{{"+m.panelOption.legendString+"}}"), - ), - ), - row.WithStat( - "ETH Balance", - stat.DataSource(m.PrometheusDataSourceName), - stat.Text(stat.TextValueAndName), - stat.Orientation(stat.OrientationHorizontal), - stat.TitleFontSize(12), - stat.ValueFontSize(20), - stat.Span(6), - stat.Decimals(2), - stat.WithPrometheusTarget( - `eth_balance{`+m.panelOption.labelQuery+`}`, - prometheus.Legend("{{"+m.panelOption.legendString+"}} - {{account}}"), - ), - ), - row.WithStat( - "Solana Balance", - stat.DataSource(m.PrometheusDataSourceName), - stat.Text(stat.TextValueAndName), - stat.Orientation(stat.OrientationHorizontal), - stat.TitleFontSize(12), - stat.ValueFontSize(20), - stat.Span(6), - stat.Decimals(2), - stat.WithPrometheusTarget( - `solana_balance{`+m.panelOption.labelQuery+`}`, - prometheus.Legend("{{"+m.panelOption.labelFilter+"}} - {{account}}"), - ), - ), - } - - additionalPanels := []row.Option{ - row.WithTimeSeries( - "Service Components Health", - timeseries.Span(12), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.WithPrometheusTarget( - `health{`+m.panelOption.labelQuery+`}`, - prometheus.Legend("{{"+m.panelOption.legendString+"}} - {{service_id}}"), - ), - ), - row.WithTimeSeries( - "ETH Balance", - timeseries.Span(6), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.Axis( - axis.Unit(""), - axis.Decimals(2), - ), - timeseries.WithPrometheusTarget( - `eth_balance{`+m.panelOption.labelQuery+`}`, - prometheus.Legend("{{"+m.panelOption.legendString+"}} - {{account}}"), - ), - ), - row.WithTimeSeries( - "SOL Balance", - timeseries.Span(6), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.Axis( - axis.Unit(""), - axis.Decimals(2), - ), - timeseries.WithPrometheusTarget( - `solana_balance{`+m.panelOption.labelQuery+`}`, - prometheus.Legend("{{"+m.panelOption.legendString+"}} - {{account}}"), - ), - ), - } - - panelsIncluded = append(panelsIncluded, globalInfoPanels...) - if m.platform == "kubernetes" { - panelsIncluded = append(panelsIncluded, row.WithStat( - "Pod Restarts", - stat.Span(2), - stat.Height("100px"), - stat.DataSource(m.PrometheusDataSourceName), - stat.WithPrometheusTarget( - `sum(increase(kube_pod_container_status_restarts_total{pod=~"$instance.*", namespace=~"${namespace}"}[$__rate_interval])) by (pod)`, - prometheus.Legend("{{pod}}"), - ), - )) - } - panelsIncluded = append(panelsIncluded, additionalPanels...) - - opts := []dashboard.Option{ - dashboard.Row( - "Global health", - panelsIncluded..., - ), - } - - m.opts = append(m.opts, opts...) -} - -func (m *Dashboard) addKubePanels() { - opts := []dashboard.Option{ - dashboard.Row( - "Pod health", - row.WithStat( - "Pod Restarts", - stat.Span(4), - stat.Text(stat.TextValueAndName), - stat.Orientation(stat.OrientationHorizontal), - stat.DataSource(m.PrometheusDataSourceName), - stat.SparkLine(), - stat.SparkLineYMin(0), - stat.WithPrometheusTarget( - `sum(increase(kube_pod_container_status_restarts_total{pod=~"$pod", namespace=~"${namespace}"}[$__rate_interval])) by (pod)`, - prometheus.Legend("{{pod}}"), - ), - ), - row.WithStat( - "OOM Events", - stat.Span(4), - stat.Text(stat.TextValueAndName), - stat.Orientation(stat.OrientationHorizontal), - stat.DataSource(m.PrometheusDataSourceName), - stat.SparkLine(), - stat.SparkLineYMin(0), - stat.WithPrometheusTarget( - `sum(container_oom_events_total{pod=~"$pod", namespace=~"${namespace}"}) by (pod)`, - prometheus.Legend("{{pod}}"), - ), - ), - row.WithStat( - "OOM Killed", - stat.Span(4), - stat.Text(stat.TextValueAndName), - stat.Orientation(stat.OrientationHorizontal), - stat.DataSource(m.PrometheusDataSourceName), - stat.SparkLine(), - stat.SparkLineYMin(0), - stat.WithPrometheusTarget( - `kube_pod_container_status_last_terminated_reason{reason="OOMKilled", pod=~"$pod", namespace=~"${namespace}"}`, - prometheus.Legend("{{pod}}"), - ), - ), - row.WithTimeSeries( - "CPU Usage", - timeseries.Span(6), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.WithPrometheusTarget( - `sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{pod=~"$pod", namespace=~"${namespace}"}) by (pod)`, - prometheus.Legend("{{pod}}"), - ), - ), - row.WithTimeSeries( - "Memory Usage", - timeseries.Span(6), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.Axis( - axis.Unit("bytes"), - axis.Label("Memory"), - axis.SoftMin(0), - ), - timeseries.WithPrometheusTarget( - `sum(container_memory_rss{pod=~"$pod", namespace=~"${namespace}", container!=""}) by (pod)`, - prometheus.Legend("{{pod}}"), - ), - ), - row.WithTimeSeries( - "Receive Bandwidth", - timeseries.Span(6), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.Axis( - axis.Unit("Bps"), - axis.SoftMin(0), - ), - timeseries.WithPrometheusTarget( - `sum(irate(container_network_receive_bytes_total{pod=~"$pod", namespace=~"${namespace}"}[$__rate_interval])) by (pod)`, - prometheus.Legend("{{pod}}"), - ), - ), - row.WithTimeSeries( - "Transmit Bandwidth", - timeseries.Span(6), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.Axis( - axis.Unit("Bps"), - axis.SoftMin(0), - ), - timeseries.WithPrometheusTarget( - `sum(irate(container_network_transmit_bytes_total{pod=~"$pod", namespace=~"${namespace}"}[$__rate_interval])) by (pod)`, - prometheus.Legend("{{pod}}"), - ), - ), - row.WithTimeSeries( - "Average Container Bandwidth by Namespace: Received", - timeseries.Span(6), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.Axis( - axis.Unit("Bps"), - axis.SoftMin(0), - ), - timeseries.WithPrometheusTarget( - `avg(irate(container_network_receive_bytes_total{pod=~"$pod", namespace=~"${namespace}"}[$__rate_interval])) by (pod)`, - prometheus.Legend("{{pod}}"), - ), - ), - row.WithTimeSeries( - "Average Container Bandwidth by Namespace: Transmitted", - timeseries.Span(6), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.Axis( - axis.Unit("Bps"), - axis.SoftMin(0), - ), - timeseries.WithPrometheusTarget( - `avg(irate(container_network_transmit_bytes_total{pod=~"$pod", namespace=~"${namespace}"}[$__rate_interval])) by (pod)`, - prometheus.Legend("{{pod}}"), - ), - ), - ), - } - - m.opts = append(m.opts, opts...) -} - -func (m *Dashboard) addLogPollerPanels() { - opts := []dashboard.Option{ - dashboard.Row("LogPoller", - row.Collapse(), - row.WithTimeSeries( - "LogPoller RPS", - timeseries.Span(4), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.WithPrometheusTarget( - `avg(sum(rate(log_poller_query_duration_count{`+m.panelOption.labelQuery+`evmChainID=~"$evmChainID"}[$__rate_interval])) by (query, `+m.panelOption.labelFilter+`)) by (query)`, - prometheus.Legend("{{query}}"), - ), - timeseries.WithPrometheusTarget( - `avg(sum(rate(log_poller_query_duration_count{`+m.panelOption.labelFilter+`=~"$instance", evmChainID=~"$evmChainID"}[$__rate_interval]))) by (`+m.panelOption.labelFilter+`)`, - prometheus.Legend("Total"), - ), - ), - row.WithTimeSeries( - "LogPoller Logs Number Returned", - timeseries.Span(4), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.WithPrometheusTarget( - `log_poller_query_dataset_size{`+m.panelOption.labelQuery+`evmChainID=~"$evmChainID"}`, - prometheus.Legend("{{query}} : {{type}}"), - ), - ), - row.WithTimeSeries( - "LogPoller Average Logs Number Returned", - timeseries.Span(4), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.WithPrometheusTarget( - `avg(log_poller_query_dataset_size{`+m.panelOption.labelQuery+`evmChainID=~"$evmChainID"}) by (query)`, - prometheus.Legend("{{query}}"), - ), - ), - row.WithTimeSeries( - "LogPoller Max Logs Number Returned", - timeseries.Span(4), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.WithPrometheusTarget( - `max(log_poller_query_dataset_size{`+m.panelOption.labelQuery+`evmChainID=~"$evmChainID"}) by (query)`, - prometheus.Legend("{{query}}"), - ), - ), - row.WithTimeSeries( - "LogPoller Logs Number Returned by Chain", - timeseries.Span(4), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.WithPrometheusTarget( - `max(log_poller_query_dataset_size{`+m.panelOption.labelQuery+`}) by (evmChainID)`, - prometheus.Legend("{{evmChainID}}"), - ), - ), - row.WithTimeSeries( - "LogPoller Queries Duration Avg", - timeseries.Span(4), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.WithPrometheusTarget( - `(sum(rate(log_poller_query_duration_sum{`+m.panelOption.labelQuery+`evmChainID=~"$evmChainID"}[$__rate_interval])) by (query) / sum(rate(log_poller_query_duration_count{`+m.panelOption.labelQuery+`}[$__rate_interval])) by (query)) / 1e6`, - prometheus.Legend("{{query}}"), - ), - ), - row.WithTimeSeries( - "LogPoller Queries Duration p99", - timeseries.Span(4), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.WithPrometheusTarget( - `histogram_quantile(0.99, sum(rate(log_poller_query_duration_bucket{`+m.panelOption.labelQuery+`evmChainID=~"$evmChainID"}[$__rate_interval])) by (le, query)) / 1e6`, - prometheus.Legend("{{query}}"), - ), - ), - row.WithTimeSeries( - "LogPoller Queries Duration p95", - timeseries.Span(4), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.WithPrometheusTarget( - `histogram_quantile(0.95, sum(rate(log_poller_query_duration_bucket{`+m.panelOption.labelQuery+`evmChainID=~"$evmChainID"}[$__rate_interval])) by (le, query)) / 1e6`, - prometheus.Legend("{{query}}"), - ), - ), - row.WithTimeSeries( - "LogPoller Queries Duration p90", - timeseries.Span(4), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.WithPrometheusTarget( - `histogram_quantile(0.95, sum(rate(log_poller_query_duration_bucket{`+m.panelOption.labelQuery+`evmChainID=~"$evmChainID"}[$__rate_interval])) by (le, query)) / 1e6`, - prometheus.Legend("{{query}}"), - ), - ), - row.WithTimeSeries( - "LogPoller Queries Duration Median", - timeseries.Span(4), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.WithPrometheusTarget( - `histogram_quantile(0.5, sum(rate(log_poller_query_duration_bucket{`+m.panelOption.labelQuery+`evmChainID=~"$evmChainID"}[$__rate_interval])) by (le, query)) / 1e6`, - prometheus.Legend("{{query}}"), - ), - ), - ), - } - - m.opts = append(m.opts, opts...) -} - -func (m *Dashboard) addFeedsJobsPanels() { - opts := []dashboard.Option{ - dashboard.Row("Feeds Jobs", - row.Collapse(), - row.WithTimeSeries( - "Feeds Job Proposal Requests", - timeseries.Span(6), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.Axis( - axis.Unit(""), - ), - timeseries.WithPrometheusTarget( - `feeds_job_proposal_requests{`+m.panelOption.labelQuery+`}`, - prometheus.Legend("{{"+m.panelOption.legendString+"}}"), - ), - ), - row.WithTimeSeries( - "Feeds Job Proposal Count", - timeseries.Span(6), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.Axis( - axis.Unit(""), - ), - timeseries.WithPrometheusTarget( - `feeds_job_proposal_count{`+m.panelOption.labelQuery+`}`, - prometheus.Legend("{{"+m.panelOption.legendString+"}}"), - ), - ), - ), - } - - m.opts = append(m.opts, opts...) -} - -func (m *Dashboard) addMailboxPanels() { - opts := []dashboard.Option{ - dashboard.Row("Mailbox", - row.Collapse(), - row.WithTimeSeries( - "Mailbox Load Percent", - timeseries.Span(12), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.Axis( - axis.Unit(""), - ), - timeseries.WithPrometheusTarget( - `mailbox_load_percent{`+m.panelOption.labelQuery+`}`, - prometheus.Legend("{{"+m.panelOption.legendString+"}} - {{ name }}"), - ), - ), - ), - } - - m.opts = append(m.opts, opts...) -} - -func (m *Dashboard) addPromReporterPanels() { - opts := []dashboard.Option{ - dashboard.Row("Prom Reporter", - row.Collapse(), - row.WithTimeSeries( - "Unconfirmed Transactions", - timeseries.Span(4), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.Axis( - axis.Unit("Tx"), - ), - timeseries.WithPrometheusTarget( - `unconfirmed_transactions{`+m.panelOption.labelQuery+`}`, - prometheus.Legend("{{"+m.panelOption.legendString+"}}"), - ), - ), - row.WithTimeSeries( - "Unconfirmed TX Age", - timeseries.Span(4), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.Axis( - axis.Unit("Sec"), - ), - timeseries.WithPrometheusTarget( - `max_unconfirmed_tx_age{`+m.panelOption.labelQuery+`}`, - prometheus.Legend("{{"+m.panelOption.legendString+"}}"), - ), - ), - row.WithTimeSeries( - "Unconfirmed TX Blocks", - timeseries.Span(4), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.Axis( - axis.Unit("Blocks"), - ), - timeseries.WithPrometheusTarget( - `max_unconfirmed_blocks{`+m.panelOption.labelQuery+`}`, - prometheus.Legend("{{"+m.panelOption.legendString+"}}"), - ), - ), - ), - } - - m.opts = append(m.opts, opts...) -} - -func (m *Dashboard) addTxManagerPanels() { - opts := []dashboard.Option{ - dashboard.Row("TX Manager", - row.Collapse(), - row.WithTimeSeries( - "TX Manager Time Until TX Broadcast", - timeseries.Span(12), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.Axis( - axis.Unit(""), - ), - timeseries.WithPrometheusTarget( - `tx_manager_time_until_tx_broadcast{`+m.panelOption.labelQuery+`}`, - prometheus.Legend("{{"+m.panelOption.legendString+"}}"), - ), - ), - row.WithTimeSeries( - "TX Manager Num Gas Bumps", - timeseries.Span(6), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.Axis( - axis.Unit(""), - ), - timeseries.WithPrometheusTarget( - `tx_manager_num_gas_bumps{`+m.panelOption.labelQuery+`}`, - prometheus.Legend("{{"+m.panelOption.legendString+"}}"), - ), - ), - row.WithTimeSeries( - "TX Manager Num Gas Bumps Exceeds Limit", - timeseries.Span(6), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.Axis( - axis.Unit(""), - ), - timeseries.WithPrometheusTarget( - `tx_manager_gas_bump_exceeds_limit{`+m.panelOption.labelQuery+`}`, - prometheus.Legend("{{"+m.panelOption.legendString+"}}"), - ), - ), - row.WithTimeSeries( - "TX Manager Num Confirmed Transactions", - timeseries.Span(3), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.Axis( - axis.Unit(""), - ), - timeseries.WithPrometheusTarget( - `tx_manager_num_confirmed_transactions{`+m.panelOption.labelQuery+`}`, - prometheus.Legend("{{"+m.panelOption.legendString+"}}"), - ), - ), - row.WithTimeSeries( - "TX Manager Num Successful Transactions", - timeseries.Span(3), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.Axis( - axis.Unit(""), - ), - timeseries.WithPrometheusTarget( - `tx_manager_num_successful_transactions{`+m.panelOption.labelQuery+`}`, - prometheus.Legend("{{"+m.panelOption.legendString+"}}"), - ), - ), - row.WithTimeSeries( - "TX Manager Num Reverted Transactions", - timeseries.Span(3), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.Axis( - axis.Unit(""), - ), - timeseries.WithPrometheusTarget( - `tx_manager_num_tx_reverted{`+m.panelOption.labelQuery+`}`, - prometheus.Legend("{{"+m.panelOption.legendString+"}}"), - ), - ), - row.WithTimeSeries( - "TX Manager Num Fwd Transactions", - timeseries.Span(3), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.Axis( - axis.Unit(""), - ), - timeseries.WithPrometheusTarget( - `tx_manager_fwd_tx_count{`+m.panelOption.labelQuery+`}`, - prometheus.Legend("{{"+m.panelOption.legendString+"}}"), - ), - ), - row.WithTimeSeries( - "TX Manager Num Transactions Attempts", - timeseries.Span(12), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.Axis( - axis.Unit(""), - ), - timeseries.WithPrometheusTarget( - `tx_manager_tx_attempt_count{`+m.panelOption.labelQuery+`}`, - prometheus.Legend("{{"+m.panelOption.legendString+"}}"), - ), - ), - row.WithTimeSeries( - "TX Manager Time Until TX Confirmed", - timeseries.Span(12), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.Axis( - axis.Unit(""), - ), - timeseries.WithPrometheusTarget( - `tx_manager_time_until_tx_confirmed{`+m.panelOption.labelQuery+`}`, - prometheus.Legend("{{"+m.panelOption.legendString+"}}"), - ), - ), - row.WithTimeSeries( - "TX Manager Block Until TX Confirmed", - timeseries.Span(12), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.Axis( - axis.Unit(""), - ), - timeseries.WithPrometheusTarget( - `tx_manager_blocks_until_tx_confirmed{`+m.panelOption.labelQuery+`}`, - prometheus.Legend("{{"+m.panelOption.legendString+"}}"), - ), - ), - ), - } - - m.opts = append(m.opts, opts...) -} - -func (m *Dashboard) addHeadTrackerPanels() { - opts := []dashboard.Option{ - dashboard.Row("Head tracker", - row.Collapse(), - row.WithTimeSeries( - "Head tracker current head", - timeseries.Span(6), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.Axis( - axis.Unit("Block"), - ), - timeseries.WithPrometheusTarget( - `head_tracker_current_head{`+m.panelOption.labelQuery+`}`, - prometheus.Legend("{{"+m.panelOption.legendString+"}}"), - ), - ), - row.WithTimeSeries( - "Head tracker very old head", - timeseries.Span(6), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.Axis( - axis.Unit("Block"), - ), - timeseries.WithPrometheusTarget( - `head_tracker_very_old_head{`+m.panelOption.labelQuery+`}`, - prometheus.Legend("{{"+m.panelOption.legendString+"}}"), - ), - ), - row.WithTimeSeries( - "Head tracker heads received", - timeseries.Span(6), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.Axis( - axis.Unit("Block"), - ), - timeseries.WithPrometheusTarget( - `head_tracker_heads_received{`+m.panelOption.labelQuery+`}`, - prometheus.Legend("{{"+m.panelOption.legendString+"}}"), - ), - ), - row.WithTimeSeries( - "Head tracker connection errors", - timeseries.Span(6), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.Axis( - axis.Unit("Block"), - ), - timeseries.WithPrometheusTarget( - `head_tracker_connection_errors{`+m.panelOption.labelQuery+`}`, - prometheus.Legend("{{"+m.panelOption.legendString+"}}"), - ), - ), - ), - } - - m.opts = append(m.opts, opts...) -} - -func (m *Dashboard) addDatabasePanels() { - opts := []dashboard.Option{ - // DB Metrics - dashboard.Row("DB Connection Metrics (App)", - row.Collapse(), - row.WithTimeSeries( - "DB Connections", - timeseries.Span(12), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.Axis( - axis.Unit("Conn"), - ), - timeseries.WithPrometheusTarget( - `db_conns_max{`+m.panelOption.labelQuery+`}`, - prometheus.Legend("{{"+m.panelOption.legendString+"}} - Max"), - ), - timeseries.WithPrometheusTarget( - `db_conns_open{`+m.panelOption.labelQuery+`}`, - prometheus.Legend("{{"+m.panelOption.legendString+"}} - Open"), - ), - timeseries.WithPrometheusTarget( - `db_conns_used{`+m.panelOption.labelQuery+`}`, - prometheus.Legend("{{"+m.panelOption.legendString+"}} - Used"), - ), - timeseries.WithPrometheusTarget( - `db_conns_wait{`+m.panelOption.labelQuery+`}`, - prometheus.Legend("{{"+m.panelOption.legendString+"}} - Wait"), - ), - ), - row.WithTimeSeries( - "DB Wait Count", - timeseries.Span(6), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.Axis( - axis.Unit(""), - ), - timeseries.WithPrometheusTarget( - `db_wait_count{`+m.panelOption.labelQuery+`}`, - prometheus.Legend("{{"+m.panelOption.legendString+"}}"), - ), - ), - row.WithTimeSeries( - "DB Wait Time", - timeseries.Span(6), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.Axis( - axis.Unit("Sec"), - ), - timeseries.WithPrometheusTarget( - `db_wait_time_seconds{`+m.panelOption.labelQuery+`}`, - prometheus.Legend("{{"+m.panelOption.legendString+"}}"), - ), - ), - ), - } - - m.opts = append(m.opts, opts...) -} - -func (m *Dashboard) addSQLQueryPanels() { - opts := []dashboard.Option{ - dashboard.Row( - "SQL Query", - row.Collapse(), - row.WithTimeSeries( - "SQL Query Timeout Percent", - timeseries.Span(12), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.Axis( - axis.Unit("percent"), - ), - timeseries.WithPrometheusTarget( - `histogram_quantile(0.9, sum(rate(sql_query_timeout_percent_bucket{`+m.panelOption.labelQuery+`}[$__rate_interval])) by (le))`, - prometheus.Legend("p90"), - ), - timeseries.WithPrometheusTarget( - `histogram_quantile(0.95, sum(rate(sql_query_timeout_percent_bucket{`+m.panelOption.labelQuery+`}[$__rate_interval])) by (le))`, - prometheus.Legend("p95"), - ), - timeseries.WithPrometheusTarget( - `histogram_quantile(0.99, sum(rate(sql_query_timeout_percent_bucket{`+m.panelOption.labelQuery+`}[$__rate_interval])) by (le))`, - prometheus.Legend("p99"), - ), - ), - ), - } - - m.opts = append(m.opts, opts...) -} - -func (m *Dashboard) addLogsPanels() { - opts := []dashboard.Option{ - dashboard.Row("Logs Metrics", - row.Collapse(), - row.WithTimeSeries( - "Logs Counters", - timeseries.Span(12), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.WithPrometheusTarget( - `log_panic_count{`+m.panelOption.labelQuery+`}`, - prometheus.Legend("{{"+m.panelOption.legendString+"}} - panic"), - ), - timeseries.WithPrometheusTarget( - `log_fatal_count{`+m.panelOption.labelQuery+`}`, - prometheus.Legend("{{"+m.panelOption.legendString+"}} - fatal"), - ), - timeseries.WithPrometheusTarget( - `log_critical_count{`+m.panelOption.labelQuery+`}`, - prometheus.Legend("{{"+m.panelOption.legendString+"}} - critical"), - ), - timeseries.WithPrometheusTarget( - `log_warn_count{`+m.panelOption.labelQuery+`}`, - prometheus.Legend("{{"+m.panelOption.legendString+"}} - warn"), - ), - timeseries.WithPrometheusTarget( - `log_error_count{`+m.panelOption.labelQuery+`}`, - prometheus.Legend("{{"+m.panelOption.legendString+"}} - error"), - ), - ), - row.WithTimeSeries( - "Logs Rate", - timeseries.Span(12), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.WithPrometheusTarget( - `sum(rate(log_panic_count{`+m.panelOption.labelQuery+`}[$__rate_interval])) by (`+m.panelOption.legendString+`)`, - prometheus.Legend("{{"+m.panelOption.legendString+"}} - panic"), - ), - timeseries.WithPrometheusTarget( - `sum(rate(log_fatal_count{`+m.panelOption.labelQuery+`}[$__rate_interval])) by (`+m.panelOption.legendString+`)`, - prometheus.Legend("{{"+m.panelOption.legendString+"}} - fatal"), - ), - timeseries.WithPrometheusTarget( - `sum(rate(log_critical_count{`+m.panelOption.labelQuery+`}[$__rate_interval])) by (`+m.panelOption.legendString+`)`, - prometheus.Legend("{{"+m.panelOption.legendString+"}} - critical"), - ), - timeseries.WithPrometheusTarget( - `sum(rate(log_warn_count{`+m.panelOption.labelQuery+`}[$__rate_interval])) by (`+m.panelOption.legendString+`)`, - prometheus.Legend("{{"+m.panelOption.legendString+"}} - warn"), - ), - timeseries.WithPrometheusTarget( - `sum(rate(log_error_count{`+m.panelOption.labelQuery+`}[$__rate_interval])) by (`+m.panelOption.legendString+`)`, - prometheus.Legend("{{"+m.panelOption.legendString+"}} - error"), - ), - ), - ), - } - - m.opts = append(m.opts, opts...) -} - -func (m *Dashboard) addEVMPoolLifecyclePanels() { - opts := []dashboard.Option{ - dashboard.Row( - "EVM Pool Lifecycle", - row.Collapse(), - row.WithTimeSeries( - "EVM Pool Highest Seen Block", - timeseries.Span(6), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.Axis( - axis.Unit("Block"), - ), - timeseries.WithPrometheusTarget( - `evm_pool_rpc_node_highest_seen_block{`+m.panelOption.labelQuery+`evmChainID="${evmChainID}"}`, - prometheus.Legend("{{"+m.panelOption.legendString+"}}"), - ), - ), - row.WithTimeSeries( - "EVM Pool Num Seen Blocks", - timeseries.Span(6), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.Axis( - axis.Unit("Block"), - ), - timeseries.WithPrometheusTarget( - `evm_pool_rpc_node_num_seen_blocks{`+m.panelOption.labelQuery+`}`, - prometheus.Legend("{{"+m.panelOption.legendString+"}}"), - ), - ), - row.WithTimeSeries( - "EVM Pool Node Polls Total", - timeseries.Span(6), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.Axis( - axis.Unit("Block"), - ), - timeseries.WithPrometheusTarget( - `evm_pool_rpc_node_polls_total{`+m.panelOption.labelQuery+`}`, - prometheus.Legend("{{"+m.panelOption.legendString+"}}"), - ), - ), - row.WithTimeSeries( - "EVM Pool Node Polls Failed", - timeseries.Span(6), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.Axis( - axis.Unit("Block"), - ), - timeseries.WithPrometheusTarget( - `evm_pool_rpc_node_polls_failed{`+m.panelOption.labelQuery+`}`, - prometheus.Legend("{{"+m.panelOption.legendString+"}}"), - ), - ), - row.WithTimeSeries( - "EVM Pool Node Polls Success", - timeseries.Span(6), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.Axis( - axis.Unit("Block"), - ), - timeseries.WithPrometheusTarget( - `evm_pool_rpc_node_polls_success{`+m.panelOption.labelQuery+`}`, - prometheus.Legend("{{"+m.panelOption.legendString+"}}"), - ), - ), - ), - } - - m.opts = append(m.opts, opts...) -} - -func (m *Dashboard) addEVMPoolRPCNodePanels() { - opts := []dashboard.Option{ - dashboard.Row( - "EVM Pool RPC Node Metrics (App)", - row.Collapse(), - row.WithTimeSeries( - "EVM Pool RPC Node Calls Success Rate", - timeseries.Span(12), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.Axis( - axis.Unit(""), - axis.Label("%"), - axis.SoftMin(0), - axis.SoftMax(100), - ), - timeseries.WithPrometheusTarget( - `sum(increase(evm_pool_rpc_node_calls_success{`+m.panelOption.labelQuery+`}[$__rate_interval])) by (`+m.panelOption.legendString+`, evmChainID, nodeName) / sum(increase(evm_pool_rpc_node_calls_total{`+m.panelOption.labelQuery+`}[$__rate_interval])) by (`+m.panelOption.legendString+`, evmChainID, nodeName) * 100`, - prometheus.Legend("{{"+m.panelOption.legendString+"}} - {{evmChainID}} - {{nodeName}}"), - ), - ), - row.WithGauge( - "EVM Pool RPC Node Calls Success Rate", - gauge.Span(12), - gauge.Orientation(gauge.OrientationVertical), - gauge.DataSource(m.PrometheusDataSourceName), - gauge.Unit("percentunit"), - gauge.WithPrometheusTarget( - `sum(increase(evm_pool_rpc_node_calls_success{`+m.panelOption.labelQuery+`}[$__rate_interval])) by (`+m.panelOption.legendString+`, evmChainID, nodeName) / sum(increase(evm_pool_rpc_node_calls_total{`+m.panelOption.labelQuery+`}[$__rate_interval])) by (`+m.panelOption.legendString+`, evmChainID, nodeName)`, - prometheus.Legend("{{"+m.panelOption.legendString+"}} - {{evmChainID}} - {{nodeName}}"), - ), - gauge.AbsoluteThresholds([]gauge.ThresholdStep{ - {Color: "#ff0000"}, - {Color: "#ffa500", Value: float64Ptr(0.8)}, - {Color: "#00ff00", Value: float64Ptr(0.9)}, - }), - ), - // issue when value is 0 - row.WithTimeSeries( - "EVM Pool RPC Node Dials Success Rate", - timeseries.Span(12), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.Axis( - axis.Unit(""), - axis.Label("%"), - axis.SoftMin(0), - axis.SoftMax(100), - ), - timeseries.WithPrometheusTarget( - `sum(increase(evm_pool_rpc_node_dials_success{`+m.panelOption.labelQuery+`}[$__rate_interval])) by (`+m.panelOption.legendString+`, evmChainID, nodeName) / sum(increase(evm_pool_rpc_node_dials_total{`+m.panelOption.labelQuery+`}[$__rate_interval])) by (`+m.panelOption.legendString+`, evmChainID, nodeName) * 100`, - prometheus.Legend("{{"+m.panelOption.legendString+"}} - {{evmChainID}} - {{nodeName}}"), - ), - ), - // issue when value is 0 - row.WithTimeSeries( - "EVM Pool RPC Node Dials Failure Rate", - timeseries.Span(12), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.Axis( - axis.Unit(""), - axis.Label("%"), - axis.SoftMin(0), - axis.SoftMax(100), - ), - timeseries.WithPrometheusTarget( - `sum(increase(evm_pool_rpc_node_dials_failed{`+m.panelOption.labelQuery+`}[$__rate_interval])) by (`+m.panelOption.legendString+`, evmChainID, nodeName) / sum(increase(evm_pool_rpc_node_dials_total{`+m.panelOption.labelQuery+`}[$__rate_interval])) by (`+m.panelOption.legendString+`, evmChainID, nodeName) * 100`, - prometheus.Legend("{{"+m.panelOption.legendString+"}} - {{evmChainID}} - {{nodeName}}"), - ), - ), - row.WithTimeSeries( - "EVM Pool RPC Node Transitions", - timeseries.Span(6), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.Axis( - axis.Unit(""), - ), - timeseries.WithPrometheusTarget( - `evm_pool_rpc_node_num_transitions_to_alive{`+m.panelOption.labelQuery+`}`, - prometheus.Legend(""), - ), - timeseries.WithPrometheusTarget( - `evm_pool_rpc_node_num_transitions_to_in_sync{`+m.panelOption.labelQuery+`}`, - prometheus.Legend(""), - ), - timeseries.WithPrometheusTarget( - `evm_pool_rpc_node_num_transitions_to_out_of_sync{`+m.panelOption.labelQuery+`}`, - prometheus.Legend(""), - ), - timeseries.WithPrometheusTarget( - `evm_pool_rpc_node_num_transitions_to_unreachable{`+m.panelOption.labelQuery+`}`, - prometheus.Legend(""), - ), - timeseries.WithPrometheusTarget( - `evm_pool_rpc_node_num_transitions_to_invalid_chain_id{`+m.panelOption.labelQuery+`}`, - prometheus.Legend(""), - ), - timeseries.WithPrometheusTarget( - `evm_pool_rpc_node_num_transitions_to_unusable{`+m.panelOption.labelQuery+`}`, - prometheus.Legend(""), - ), - ), - row.WithTimeSeries( - "EVM Pool RPC Node States", - timeseries.Span(6), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.Axis( - axis.Unit(""), - ), - timeseries.WithPrometheusTarget( - `evm_pool_rpc_node_states{`+m.panelOption.labelQuery+`}`, - prometheus.Legend("{{"+m.panelOption.legendString+"}} - {{evmChainID}} - {{state}}"), - ), - ), - row.WithTimeSeries( - "EVM Pool RPC Node Verifies Success Rate", - timeseries.Span(6), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.Axis( - axis.Unit(""), - axis.Label("%"), - axis.SoftMin(0), - axis.SoftMax(100), - ), - timeseries.WithPrometheusTarget( - `sum(increase(evm_pool_rpc_node_verifies_success{`+m.panelOption.labelQuery+`}[$__rate_interval])) by (`+m.panelOption.legendString+`, evmChainID, nodeName) / sum(increase(evm_pool_rpc_node_verifies{`+m.panelOption.labelQuery+`}[$__rate_interval])) by (`+m.panelOption.legendString+`, evmChainID, nodeName) * 100`, - prometheus.Legend("{{"+m.panelOption.legendString+"}} - {{evmChainID}} - {{nodeName}}"), - ), - ), - row.WithTimeSeries( - "EVM Pool RPC Node Verifies Failure Rate", - timeseries.Span(6), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.Axis( - axis.Unit(""), - axis.Label("%"), - axis.SoftMin(0), - axis.SoftMax(100), - ), - timeseries.WithPrometheusTarget( - `sum(increase(evm_pool_rpc_node_verifies_failed{`+m.panelOption.labelQuery+`}[$__rate_interval])) by (`+m.panelOption.legendString+`, evmChainID, nodeName) / sum(increase(evm_pool_rpc_node_verifies{`+m.panelOption.labelQuery+`}[$__rate_interval])) by (`+m.panelOption.legendString+`, evmChainID, nodeName) * 100`, - prometheus.Legend("{{"+m.panelOption.legendString+"}} - {{evmChainID}} - {{nodeName}}"), - ), - ), - ), - } - - m.opts = append(m.opts, opts...) -} - -func (m *Dashboard) addEVMRPCNodeLatenciesPanels() { - opts := []dashboard.Option{ - dashboard.Row( - "EVM Pool RPC Node Latencies (App)", - row.Collapse(), - row.WithTimeSeries( - "EVM Pool RPC Node Calls Latency 0.90 quantile", - timeseries.Span(12), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.Axis( - axis.Unit("ms"), - ), - timeseries.WithPrometheusTarget( - `histogram_quantile(0.90, sum(rate(evm_pool_rpc_node_rpc_call_time_bucket{`+m.panelOption.labelQuery+`}[$__rate_interval])) by (`+m.panelOption.legendString+`, le, rpcCallName)) / 1e6`, - prometheus.Legend("{{"+m.panelOption.legendString+"}} - {{rpcCallName}}"), - ), - ), - row.WithTimeSeries( - "EVM Pool RPC Node Calls Latency 0.95 quantile", - timeseries.Span(12), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.Axis( - axis.Unit("ms"), - ), - timeseries.WithPrometheusTarget( - `histogram_quantile(0.95, sum(rate(evm_pool_rpc_node_rpc_call_time_bucket{`+m.panelOption.labelQuery+`}[$__rate_interval])) by (`+m.panelOption.legendString+`, le, rpcCallName)) / 1e6`, - prometheus.Legend("{{"+m.panelOption.legendString+"}} - {{rpcCallName}}"), - ), - ), - row.WithTimeSeries( - "EVM Pool RPC Node Calls Latency 0.99 quantile", - timeseries.Span(12), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.Axis( - axis.Unit("ms"), - ), - timeseries.WithPrometheusTarget( - `histogram_quantile(0.99, sum(rate(evm_pool_rpc_node_rpc_call_time_bucket{`+m.panelOption.labelQuery+`}[$__rate_interval])) by (`+m.panelOption.legendString+`, le, rpcCallName)) / 1e6`, - prometheus.Legend("{{"+m.panelOption.legendString+"}} - {{rpcCallName}}"), - ), - ), - ), - } - - m.opts = append(m.opts, opts...) -} - -func (m *Dashboard) addBlockHistoryEstimatorPanels() { - opts := []dashboard.Option{ - dashboard.Row("Block History Estimator", - row.Collapse(), - row.WithTimeSeries( - "Gas Updater All Gas Price Percentiles", - timeseries.Span(6), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.Axis( - axis.Unit(""), - ), - timeseries.WithPrometheusTarget( - `gas_updater_all_gas_price_percentiles{`+m.panelOption.labelQuery+`}`, - prometheus.Legend("{{"+m.panelOption.legendString+"}} - {{ percentile }}"), - ), - ), - row.WithTimeSeries( - "Gas Updater All Tip Cap Percentiles", - timeseries.Span(6), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.Axis( - axis.Unit(""), - ), - timeseries.WithPrometheusTarget( - `gas_updater_all_tip_cap_percentiles{`+m.panelOption.labelQuery+`}`, - prometheus.Legend("{{"+m.panelOption.legendString+"}} - {{ percentile }}"), - ), - ), - row.WithTimeSeries( - "Gas Updater Set Gas Price", - timeseries.Span(6), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.Axis( - axis.Unit(""), - ), - timeseries.WithPrometheusTarget( - `gas_updater_set_gas_price{`+m.panelOption.labelQuery+`}`, - prometheus.Legend("{{"+m.panelOption.legendString+"}}"), - ), - ), - row.WithTimeSeries( - "Gas Updater Set Tip Cap", - timeseries.Span(6), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.Axis( - axis.Unit(""), - ), - timeseries.WithPrometheusTarget( - `gas_updater_set_tip_cap{`+m.panelOption.labelQuery+`}`, - prometheus.Legend("{{"+m.panelOption.legendString+"}}"), - ), - ), - row.WithTimeSeries( - "Gas Updater Current Base Fee", - timeseries.Span(6), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.Axis( - axis.Unit(""), - ), - timeseries.WithPrometheusTarget( - `gas_updater_current_base_fee{`+m.panelOption.labelQuery+`}`, - prometheus.Legend("{{"+m.panelOption.legendString+"}}"), - ), - ), - row.WithTimeSeries( - "Block History Estimator Connectivity Failure Count", - timeseries.Span(6), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.Axis( - axis.Unit(""), - ), - timeseries.WithPrometheusTarget( - `block_history_estimator_connectivity_failure_count{`+m.panelOption.labelQuery+`}`, - prometheus.Legend("{{"+m.panelOption.legendString+"}}"), - ), - ), - ), - } - - m.opts = append(m.opts, opts...) -} - -func (m *Dashboard) addPipelinePanels() { - opts := []dashboard.Option{ - dashboard.Row("Pipeline Metrics (Runner)", - row.Collapse(), - row.WithTimeSeries( - "Pipeline Task Execution Time", - timeseries.Span(12), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.Axis( - axis.Unit("Sec"), - ), - timeseries.WithPrometheusTarget( - `pipeline_task_execution_time{`+m.panelOption.labelQuery+`} / 1e6`, - prometheus.Legend("{{"+m.panelOption.legendString+"}} JobID: {{ job_id }}"), - ), - ), - row.WithTimeSeries( - "Pipeline Run Errors", - timeseries.Span(12), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.Axis( - axis.Unit(""), - ), - timeseries.WithPrometheusTarget( - `pipeline_run_errors{`+m.panelOption.labelQuery+`}`, - prometheus.Legend("{{"+m.panelOption.legendString+"}} JobID: {{ job_id }}"), - ), - ), - row.WithTimeSeries( - "Pipeline Run Total Time to Completion", - timeseries.Span(12), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.Axis( - axis.Unit("Sec"), - ), - timeseries.WithPrometheusTarget( - `pipeline_run_total_time_to_completion{`+m.panelOption.labelQuery+`} / 1e6`, - prometheus.Legend("{{"+m.panelOption.legendString+"}} JobID: {{ job_id }}"), - ), - ), - row.WithTimeSeries( - "Pipeline Tasks Total Finished", - timeseries.Span(12), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.Axis( - axis.Unit(""), - ), - timeseries.WithPrometheusTarget( - `pipeline_tasks_total_finished{`+m.panelOption.labelQuery+`}`, - prometheus.Legend("{{"+m.panelOption.legendString+"}} JobID: {{ job_id }}"), - ), - ), - ), - dashboard.Row( - "Pipeline Metrics (ETHCall)", - row.Collapse(), - row.WithTimeSeries( - "Pipeline Task ETH Call Execution Time", - timeseries.Span(12), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.Axis( - axis.Unit("Sec"), - ), - timeseries.WithPrometheusTarget( - `pipeline_task_eth_call_execution_time{`+m.panelOption.labelQuery+`}`, - prometheus.Legend("{{"+m.panelOption.legendString+"}}"), - ), - ), - ), - dashboard.Row( - "Pipeline Metrics (HTTP)", - row.Collapse(), - row.WithTimeSeries( - "Pipeline Task HTTP Fetch Time", - timeseries.Span(6), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.Axis( - axis.Unit("Sec"), - ), - timeseries.WithPrometheusTarget( - `pipeline_task_http_fetch_time{`+m.panelOption.labelQuery+`} / 1e6`, - prometheus.Legend("{{"+m.panelOption.legendString+"}}"), - ), - ), - row.WithTimeSeries( - "Pipeline Task HTTP Response Body Size", - timeseries.Span(6), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.Axis( - axis.Unit("Bytes"), - ), - timeseries.WithPrometheusTarget( - `pipeline_task_http_response_body_size{`+m.panelOption.labelQuery+`}`, - prometheus.Legend("{{"+m.panelOption.legendString+"}}"), - ), - ), - ), - dashboard.Row( - "Pipeline Metrics (Bridge)", - row.Collapse(), - row.WithTimeSeries( - "Pipeline Bridge Latency", - timeseries.Span(6), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.Axis( - axis.Unit("Sec"), - ), - timeseries.WithPrometheusTarget( - `bridge_latency_seconds{`+m.panelOption.labelQuery+`}`, - prometheus.Legend("{{"+m.panelOption.legendString+"}}"), - ), - ), - row.WithTimeSeries( - "Pipeline Bridge Errors Total", - timeseries.Span(6), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.Axis( - axis.Unit(""), - ), - timeseries.WithPrometheusTarget( - `bridge_errors_total{`+m.panelOption.labelQuery+`}`, - prometheus.Legend("{{"+m.panelOption.legendString+"}}"), - ), - ), - row.WithTimeSeries( - "Pipeline Bridge Cache Hits Total", - timeseries.Span(6), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.Axis( - axis.Unit(""), - ), - timeseries.WithPrometheusTarget( - `bridge_cache_hits_total{`+m.panelOption.labelQuery+`}`, - prometheus.Legend("{{"+m.panelOption.legendString+"}}"), - ), - ), - row.WithTimeSeries( - "Pipeline Bridge Cache Errors Total", - timeseries.Span(6), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.Axis( - axis.Unit(""), - ), - timeseries.WithPrometheusTarget( - `bridge_cache_errors_total{`+m.panelOption.labelQuery+`}`, - prometheus.Legend("{{"+m.panelOption.legendString+"}}"), - ), - ), - ), - dashboard.Row( - "Pipeline Metrics", - row.Collapse(), - row.WithTimeSeries( - "Pipeline Runs Queued", - timeseries.Span(6), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.Axis( - axis.Unit(""), - ), - timeseries.WithPrometheusTarget( - `pipeline_runs_queued{`+m.panelOption.labelQuery+`}`, - prometheus.Legend("{{"+m.panelOption.legendString+"}}"), - ), - ), - row.WithTimeSeries( - "Pipeline Runs Tasks Queued", - timeseries.Span(6), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.Axis( - axis.Unit(""), - ), - timeseries.WithPrometheusTarget( - `pipeline_task_runs_queued{`+m.panelOption.labelQuery+`}`, - prometheus.Legend("{{"+m.panelOption.legendString+"}}"), - ), - ), - ), - } - - m.opts = append(m.opts, opts...) -} - -func (m *Dashboard) addHTTPAPIPanels() { - opts := []dashboard.Option{ - // HTTP API Metrics - dashboard.Row( - "HTTP API Metrics", - row.Collapse(), - row.WithTimeSeries( - "Request Duration p95", - timeseries.Span(12), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.Axis( - axis.Unit("Sec"), - ), - timeseries.WithPrometheusTarget( - `histogram_quantile(0.95, sum(rate(service_gonic_request_duration_bucket{`+m.panelOption.labelQuery+`}[$__rate_interval])) by (`+m.panelOption.legendString+`, le, path, method))`, - prometheus.Legend("{{"+m.panelOption.legendString+"}} - {{ method }} - {{ path }}"), - ), - ), - row.WithTimeSeries( - "Request Total Rate over interval", - timeseries.Span(12), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.Axis( - axis.Unit(""), - ), - timeseries.WithPrometheusTarget( - `sum(rate(service_gonic_requests_total{`+m.panelOption.labelQuery+`}[$__rate_interval])) by (`+m.panelOption.legendString+`, path, method, code)`, - prometheus.Legend("{{"+m.panelOption.legendString+"}} - {{ method }} - {{ path }} - {{ code }}"), - ), - ), - row.WithTimeSeries( - "Average Request Size", - timeseries.Span(6), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.Axis( - axis.Unit("Bytes"), - ), - timeseries.WithPrometheusTarget( - `avg(rate(service_gonic_request_size_bytes_sum{`+m.panelOption.labelQuery+`}[$__rate_interval])) by (`+m.panelOption.legendString+`)/avg(rate(service_gonic_request_size_bytes_count{`+m.panelOption.labelQuery+`}[$__rate_interval])) by (`+m.panelOption.legendString+`)`, - prometheus.Legend("{{"+m.panelOption.legendString+"}}"), - ), - ), - row.WithTimeSeries( - "Response Size", - timeseries.Span(6), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.Axis( - axis.Unit("Bytes"), - ), - timeseries.WithPrometheusTarget( - `avg(rate(service_gonic_response_size_bytes_sum{`+m.panelOption.labelQuery+`}[$__rate_interval])) by (`+m.panelOption.legendString+`)/avg(rate(service_gonic_response_size_bytes_count{`+m.panelOption.labelQuery+`}[$__rate_interval])) by (`+m.panelOption.legendString+`)`, - prometheus.Legend("{{"+m.panelOption.legendString+"}}"), - ), - ), - ), - } - - m.opts = append(m.opts, opts...) -} - -func (m *Dashboard) addPromHTTPPanels() { - opts := []dashboard.Option{ - dashboard.Row( - "PromHTTP Metrics", - row.Collapse(), - row.WithGauge("HTTP Request in flight", - gauge.Span(12), - gauge.Orientation(gauge.OrientationVertical), - gauge.DataSource(m.PrometheusDataSourceName), - gauge.WithPrometheusTarget( - `promhttp_metric_handler_requests_in_flight{`+m.panelOption.labelQuery+`}`, - prometheus.Legend("{{"+m.panelOption.legendString+"}}"), - ), - ), - row.WithTimeSeries( - "HTTP rate", - timeseries.Span(12), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.Axis( - axis.Unit(""), - ), - timeseries.WithPrometheusTarget( - `sum(rate(promhttp_metric_handler_requests_total{`+m.panelOption.labelQuery+`}[$__rate_interval])) by (`+m.panelOption.legendString+`, code)`, - prometheus.Legend("{{"+m.panelOption.legendString+"}}"), - ), - ), - ), - } - - m.opts = append(m.opts, opts...) -} - -func (m *Dashboard) addGoMetricsPanels() { - opts := []dashboard.Option{ - dashboard.Row( - "Go Metrics", - row.Collapse(), - row.WithTable( - "Threads", - table.Span(3), - table.Height("200px"), - table.DataSource(m.PrometheusDataSourceName), - table.WithPrometheusTarget( - `sum(go_threads{`+m.panelOption.labelQuery+`}) by (`+m.panelOption.legendString+`)`, - prometheus.Legend("{{"+m.panelOption.legendString+"}}")), - table.HideColumn("Time"), - table.AsTimeSeriesAggregations([]table.Aggregation{ - {Label: "AVG", Type: table.AVG}, - {Label: "Current", Type: table.Current}, - }), - ), - row.WithTimeSeries( - "Threads", - timeseries.Span(9), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.Axis( - axis.Unit(""), - ), - timeseries.WithPrometheusTarget( - `sum(go_threads{`+m.panelOption.labelQuery+`}) by (`+m.panelOption.legendString+`)`, - prometheus.Legend("{{"+m.panelOption.legendString+"}}"), - ), - ), - row.WithStat( - "Heap Allocations", - stat.Span(12), - stat.Orientation(stat.OrientationVertical), - stat.DataSource(m.PrometheusDataSourceName), - stat.Unit("bytes"), - stat.ColorValue(), - stat.WithPrometheusTarget( - `sum(go_memstats_heap_alloc_bytes{`+m.panelOption.labelQuery+`}) by (`+m.panelOption.legendString+`)`, - ), - ), - row.WithTimeSeries( - "Heap allocations", - timeseries.Span(12), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.WithPrometheusTarget( - `sum(go_memstats_heap_alloc_bytes{`+m.panelOption.labelQuery+`}) by (`+m.panelOption.legendString+`)`, - prometheus.Legend("{{"+m.panelOption.legendString+"}}"), - ), - timeseries.Axis( - axis.Unit("bytes"), - axis.Label("Memory"), - axis.SoftMin(0), - ), - ), - row.WithTimeSeries( - "Memory in Heap", - timeseries.Span(6), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.Axis( - axis.Unit("bytes"), - axis.Label("Memory"), - axis.SoftMin(0), - ), - timeseries.WithPrometheusTarget( - `go_memstats_heap_alloc_bytes{`+m.panelOption.labelQuery+`}`, - prometheus.Legend("{{"+m.panelOption.legendString+"}} - Alloc"), - ), - timeseries.WithPrometheusTarget( - `go_memstats_heap_sys_bytes{`+m.panelOption.labelQuery+`}`, - prometheus.Legend("{{"+m.panelOption.legendString+"}} - Sys"), - ), - timeseries.WithPrometheusTarget( - `go_memstats_heap_idle_bytes{`+m.panelOption.labelQuery+`}`, - prometheus.Legend("{{"+m.panelOption.legendString+"}} - Idle"), - ), - timeseries.WithPrometheusTarget( - `go_memstats_heap_inuse_bytes{`+m.panelOption.labelQuery+`}`, - prometheus.Legend("{{"+m.panelOption.legendString+"}} - InUse"), - ), - timeseries.WithPrometheusTarget( - `go_memstats_heap_released_bytes{`+m.panelOption.labelQuery+`}`, - prometheus.Legend("{{"+m.panelOption.legendString+"}} - Released"), - ), - ), - row.WithTimeSeries( - "Memory in Off-Heap", - timeseries.Span(6), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.Axis( - axis.Unit("bytes"), - axis.Label("Memory"), - axis.SoftMin(0), - ), - timeseries.WithPrometheusTarget( - `go_memstats_mspan_inuse_bytes{`+m.panelOption.labelQuery+`}`, - prometheus.Legend("{{"+m.panelOption.legendString+"}} - Total InUse"), - ), - timeseries.WithPrometheusTarget( - `go_memstats_mspan_sys_bytes{`+m.panelOption.labelQuery+`}`, - prometheus.Legend("{{"+m.panelOption.legendString+"}} - Total Sys"), - ), - timeseries.WithPrometheusTarget( - `go_memstats_mcache_inuse_bytes{`+m.panelOption.labelQuery+`}`, - prometheus.Legend("{{"+m.panelOption.legendString+"}} - Cache InUse"), - ), - timeseries.WithPrometheusTarget( - `go_memstats_mcache_sys_bytes{`+m.panelOption.labelQuery+`}`, - prometheus.Legend("{{"+m.panelOption.legendString+"}} - Cache Sys"), - ), - timeseries.WithPrometheusTarget( - `go_memstats_buck_hash_sys_bytes{`+m.panelOption.labelQuery+`}`, - prometheus.Legend("{{"+m.panelOption.legendString+"}} - Hash Sys"), - ), - timeseries.WithPrometheusTarget( - `go_memstats_gc_sys_bytes{`+m.panelOption.labelQuery+`}`, - prometheus.Legend("{{"+m.panelOption.legendString+"}} - GC Sys"), - ), - timeseries.WithPrometheusTarget( - `go_memstats_other_sys_bytes{`+m.panelOption.labelQuery+`}`, - prometheus.Legend("{{"+m.panelOption.legendString+"}} - bytes of memory are used for other runtime allocations"), - ), - timeseries.WithPrometheusTarget( - `go_memstats_next_gc_bytes{`+m.panelOption.labelQuery+`}`, - prometheus.Legend("{{"+m.panelOption.legendString+"}} - Next GC"), - ), - ), - row.WithTimeSeries( - "Memory in Stack", - timeseries.Span(6), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.WithPrometheusTarget( - `go_memstats_stack_inuse_bytes{`+m.panelOption.labelQuery+`}`, - prometheus.Legend("{{"+m.panelOption.legendString+"}} - InUse"), - ), - timeseries.WithPrometheusTarget( - `go_memstats_stack_sys_bytes{`+m.panelOption.labelQuery+`}`, - prometheus.Legend("{{"+m.panelOption.legendString+"}} - Sys"), - ), - timeseries.Axis( - axis.Unit("bytes"), - axis.Label("Memory"), - axis.SoftMin(0), - ), - ), - row.WithTimeSeries( - "Total Used Memory", - timeseries.Span(6), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.WithPrometheusTarget( - `go_memstats_sys_bytes{`+m.panelOption.labelQuery+`}`, - prometheus.Legend("{{"+m.panelOption.legendString+"}}"), - ), - timeseries.Axis( - axis.Unit("bytes"), - axis.Label("Memory"), - axis.SoftMin(0), - ), - ), - row.WithTimeSeries( - "Number of Live Objects", - timeseries.Span(6), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.WithPrometheusTarget( - `go_memstats_mallocs_total{`+m.panelOption.labelQuery+`} - go_memstats_frees_total{`+m.panelOption.labelQuery+`}`, - prometheus.Legend("{{"+m.panelOption.legendString+"}}"), - ), - timeseries.Axis( - axis.SoftMin(0), - ), - ), - row.WithTimeSeries( - "Rate of Objects Allocated", - timeseries.Span(6), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.WithPrometheusTarget( - `rate(go_memstats_mallocs_total{`+m.panelOption.labelQuery+`}[1m])`, - prometheus.Legend("{{"+m.panelOption.legendString+"}}"), - ), - timeseries.Axis( - axis.SoftMin(0), - ), - ), - row.WithTimeSeries( - "Rate of a Pointer Dereferences", - timeseries.Span(6), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.WithPrometheusTarget( - `rate(go_memstats_lookups_total{`+m.panelOption.labelQuery+`}[1m])`, - prometheus.Legend("{{"+m.panelOption.legendString+"}}"), - ), - timeseries.Axis( - axis.Unit("ops"), - axis.SoftMin(0), - ), - ), - row.WithTimeSeries( - "Goroutines", - timeseries.Span(6), - timeseries.Height("200px"), - timeseries.DataSource(m.PrometheusDataSourceName), - timeseries.WithPrometheusTarget( - `go_goroutines{`+m.panelOption.labelQuery+`}`, - prometheus.Legend("{{"+m.panelOption.legendString+"}}"), - ), - timeseries.Axis( - axis.SoftMin(0), - ), - ), - ), - } - - m.opts = append(m.opts, opts...) -} - -func (m *Dashboard) addCorePanels() { - m.addMainPanels() - m.addLogPollerPanels() - m.addFeedsJobsPanels() - m.addMailboxPanels() - m.addPromReporterPanels() - m.addTxManagerPanels() - m.addHeadTrackerPanels() - m.addDatabasePanels() - m.addSQLQueryPanels() - m.addLogsPanels() - m.addEVMPoolLifecyclePanels() - m.addEVMPoolRPCNodePanels() - m.addEVMRPCNodeLatenciesPanels() - m.addBlockHistoryEstimatorPanels() - m.addPipelinePanels() - m.addHTTPAPIPanels() - m.addPromHTTPPanels() - m.addGoMetricsPanels() -} - -func (m *Dashboard) addKubernetesPanels() { - m.addKubePanels() -} - -func float64Ptr(input float64) *float64 { - return &input -} diff --git a/charts/chainlink-cluster/dashboard/utils.go b/charts/chainlink-cluster/dashboard/utils.go deleted file mode 100644 index cc095d13eba..00000000000 --- a/charts/chainlink-cluster/dashboard/utils.go +++ /dev/null @@ -1,10 +0,0 @@ -package dashboard - -func Contains[T comparable](arr []T, x T) bool { - for _, v := range arr { - if v == x { - return true - } - } - return false -} diff --git a/charts/chainlink-cluster/devspace.yaml b/charts/chainlink-cluster/devspace.yaml index 6256ae41bf0..f520c627b7f 100644 --- a/charts/chainlink-cluster/devspace.yaml +++ b/charts/chainlink-cluster/devspace.yaml @@ -2,120 +2,76 @@ version: v2beta1 name: chainlink vars: - NS_TTL: 72h - DEVSPACE_IMAGE: - noCache: true - source: env - # This is the base domain in AWS Route 53 that our ingress subdomains will use. - DEVSPACE_INGRESS_BASE_DOMAIN: - source: env - # This is the ARN of the AWS ACM certificate that will be used for the ingress. - DEVSPACE_INGRESS_CERT_ARN: - source: env - # This is a comma separated list of CIDR blocks that will be allowed to access the ingress. - DEVSPACE_INGRESS_CIDRS: - source: env - # Time to wait for pods to be in `Ready` condition - DEVSPACE_K8S_POD_WAIT_TIMEOUT: 600s + DEVSPACE_ENV_FILE: .env -# This is a list of `pipelines` that DevSpace can execute (you can define your own) pipelines: - dev: - # We don't need a rollout here and image haven't been really changed, - # may not deserve to be commited, so we are just rebooting the app pods - run: |- - devspace run-pipeline deploy - kubectl get pods -n ${DEVSPACE_NAMESPACE} --no-headers=true | grep '^app-node-' | awk '{print $1}' | xargs kubectl delete pod -n ${DEVSPACE_NAMESPACE} - kubectl wait pods -n ${DEVSPACE_NAMESPACE} --selector=app=app --for=condition=Ready --timeout=${DEVSPACE_K8S_POD_WAIT_TIMEOUT} - # You can run this pipeline via `devspace deploy` (or `devspace run-pipeline deploy`) deploy: - run: |- - set -o pipefail - echo "Removing .devspace cache!" - rm -rf .devspace/ || true - registry_id=$(echo "$DEVSPACE_IMAGE" | cut -d'.' -f1) - - # Login into registry - echo "Authorizing into ECR registry" - aws ecr get-login-password --region us-west-2 | docker login --username AWS --password-stdin ${registry_id}.dkr.ecr.us-west-2.amazonaws.com + flags: + - name: override-image-tag + short: o + type: string + description: "If specified, the specified tag will be used instead of building a new image" + run: |- + tagOverride=$(get_flag "override-image-tag") run_dependencies --all - ensure_pull_secrets --all - - build_images --all - - kubectl label namespace ${DEVSPACE_NAMESPACE} cleanup.kyverno.io/ttl=${NS_TTL} || true - kubectl label namespace/${DEVSPACE_NAMESPACE} network=crib || true - tag=$(git rev-parse --short HEAD) - image=${DEVSPACE_IMAGE}:$tag - echo "Checking tag: '$tag'" - repository_name="chainlink-devspace" - desired_tag=$tag + if [[ -n "${tagOverride}" ]]; then + image=${DEVSPACE_IMAGE}:${tagOverride} + echo "Using user provided image: $image" - # Check if the desired tag is present in the repository - image_list=$(aws ecr list-images --repository-name "$repository_name") - tag_exists=$(echo "$image_list" | jq -e '.imageIds[] | select(.imageTag == "'"${desired_tag}"'")' >/dev/null && echo true || echo false) + args="" + for i in {0..5}; do + args+="--set=helm.values.chainlink.nodes[$i].image=$image " + done - # Check the value of the tag_exists variable - if [ "$tag_exists" = "true" ]; then - echo "Image tag '$tag' found." + create_deployments app $args else - echo "Image tag '$tag' not found. Please build the image using 'devspace deploy'" - exit 1 + build_images --all + create_deployments app fi - create_deployments app \ - --set=helm.values.chainlink.nodes[0].image=$image \ - --set=helm.values.chainlink.nodes[1].image=$image \ - --set=helm.values.chainlink.nodes[2].image=$image \ - --set=helm.values.chainlink.nodes[3].image=$image \ - --set=helm.values.chainlink.nodes[4].image=$image \ - --set=helm.values.chainlink.nodes[5].image=$image + echo echo "Namespace ${DEVSPACE_NAMESPACE} will be deleted in ${NS_TTL}" - echo "To extend the TTL for e.g. 72 hours, run: devspace run ttl ${DEVSPACE_NAMESPACE} 72h" - + echo "To extend the TTL for e.g. 72 hours, run:" + echo "devspace run ttl ${DEVSPACE_NAMESPACE} 72h" echo - echo "############################################" - echo "Ingress Domains" - echo "############################################" - ingress_names="node1 node2 node3 node4 node5 node6 geth-1337-http geth-1337-ws geth-2337-http geth-2337-ws" - for ingress in ${ingress_names}; do - echo "https://${DEVSPACE_NAMESPACE}-${ingress}.${DEVSPACE_INGRESS_BASE_DOMAIN}" - done + kubectl label namespace ${DEVSPACE_NAMESPACE} cleanup.kyverno.io/ttl=${NS_TTL} > /dev/null 2>&1 || true + kubectl label namespace/${DEVSPACE_NAMESPACE} network=crib > /dev/null 2>&1 || true purge: run: |- kubectl delete ns ${DEVSPACE_NAMESPACE} commands: + ingress-hosts: |- + kubectl get ingress -n ${DEVSPACE_NAMESPACE} \ + -o=jsonpath="{range .items[*].spec.rules[*]}{.host}{'\n'}{end}" connect: |- sudo kubefwd svc -n $1 ttl: |- kubectl label namespace $1 cleanup.kyverno.io/ttl=$2 --overwrite + workload: |- + cd ../../integration-tests/load/ocr && go test -v -run TestOCRLoad || cd - + dashboard_deploy: |- + go run dashboard/cmd/deploy.go + dashboard_test: |- + cd dashboard/tests && npx playwright test || cd - images: app: image: ${DEVSPACE_IMAGE} tags: - - $(git rev-parse --short HEAD) + - ${devspace.namespace}-${devspace.timestamp} custom: skipImageArg: true command: |- - TOPLEVEL=$(git rev-parse --show-toplevel) - pushd $TOPLEVEL - pwd - goreleaser --version - MACOS_SDK_DIR=$(pwd)/tools/bin/MacOSX12.3.sdk ./tools/bin/goreleaser_wrapper release --snapshot --clean --config .goreleaser.devspace.yaml - popd - BUILT_IMAGE=$(cat $TOPLEVEL/dist/artifacts.json | jq -r '.[] | select(.type == "Docker Image" and .goarch == "amd64" and (.name | contains("sha")) and ( .name | contains("root") | not) ) | .name') + GIT_ROOT=$(git rev-parse --show-toplevel) + cd $GIT_ROOT - echo "Tagging and pushing image" - tag=$(git rev-parse --short HEAD) - TAGGED_IMAGE=${DEVSPACE_IMAGE}:$tag - docker tag $BUILT_IMAGE ${runtime.images.app.image}:${runtime.images.app.tag} - echo "Tagged image: $TAGGED_IMAGE" - docker push $TAGGED_IMAGE + image=${runtime.images.app} + MACOS_SDK_DIR=$(pwd)/tools/bin/MacOSX12.3.sdk IMAGE=$image ./tools/bin/goreleaser_wrapper release --snapshot --clean --config .goreleaser.devspace.yaml + docker push $image hooks: - wait: running: true @@ -126,11 +82,17 @@ hooks: # vars don't work here, = releaseName release: "app" events: ["after:deploy:app"] - name: "wait-for-pod-hook" + + # Check that the ingress was created successfully, and print ingress hostnames. + - name: "ingress-check-hook" + command: ./scripts/ingress_check.sh + args: ["app"] # Ingress name. + events: ["after:deploy:app"] # This is a list of `deployments` that DevSpace can create for this project deployments: app: + updateImageTags: false namespace: ${DEVSPACE_NAMESPACE} helm: releaseName: "app" @@ -157,7 +119,7 @@ deployments: p2p_port: 6690 nodes: - name: node-1 - image: ${DEVSPACE_IMAGE} + image: ${runtime.images.app} # default resources are 300m/1Gi # first node need more resources to build faster inside container # at least 2Gi of memory is required otherwise build will fail (OOM) @@ -201,15 +163,15 @@ deployments: # or use overridesToml to override some part of configuration # overridesToml: | - name: node-2 - image: ${DEVSPACE_IMAGE} + image: ${runtime.images.app} - name: node-3 - image: ${DEVSPACE_IMAGE} + image: ${runtime.images.app} - name: node-4 - image: ${DEVSPACE_IMAGE} + image: ${runtime.images.app} - name: node-5 - image: ${DEVSPACE_IMAGE} + image: ${runtime.images.app} - name: node-6 - image: ${DEVSPACE_IMAGE} + image: ${runtime.images.app} # each CL node have a dedicated PostgreSQL 11.15 # use StatefulSet by setting: @@ -404,4 +366,4 @@ deployments: podAnnotations: nodeSelector: tolerations: - affinity: \ No newline at end of file + affinity: diff --git a/charts/chainlink-cluster/go.mod b/charts/chainlink-cluster/go.mod index f07d94fec98..4a8dd43fd5f 100644 --- a/charts/chainlink-cluster/go.mod +++ b/charts/chainlink-cluster/go.mod @@ -1,9 +1,10 @@ -module github.com/smartcontractkit/chainlink/charts/chainlink-cluster/dashboard +module github.com/smartcontractkit/chainlink/charts/chainlink-cluster -go 1.21 +go 1.21.7 require ( github.com/K-Phoen/grabana v0.22.1 + github.com/smartcontractkit/chainlink/dashboard-lib v0.0.0-00010101000000-000000000000 github.com/smartcontractkit/wasp v0.4.6 ) @@ -11,7 +12,12 @@ require ( github.com/K-Phoen/sdk v0.12.4 // indirect github.com/gosimple/slug v1.13.1 // indirect github.com/gosimple/unidecode v1.0.1 // indirect + github.com/mattn/go-colorable v0.1.13 // indirect + github.com/mattn/go-isatty v0.0.19 // indirect + github.com/pkg/errors v0.9.1 // indirect github.com/prometheus/common v0.45.0 // indirect + github.com/rs/zerolog v1.32.0 // indirect + golang.org/x/sys v0.15.0 // indirect ) replace ( @@ -19,6 +25,7 @@ replace ( // replicating the replace directive on cosmos SDK github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 + github.com/grafana/grafana-foundation-sdk/go => github.com/grafana/grafana-foundation-sdk/go v0.0.0-20240314112857-a7c9c6d0044c // until merged upstream: https://github.com/hashicorp/go-plugin/pull/257 github.com/hashicorp/go-plugin => github.com/smartcontractkit/go-plugin v0.0.0-20240208201424-b3b91517de16 @@ -27,4 +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 ) diff --git a/charts/chainlink-cluster/go.sum b/charts/chainlink-cluster/go.sum index a235ef089d7..d1680424a7a 100644 --- a/charts/chainlink-cluster/go.sum +++ b/charts/chainlink-cluster/go.sum @@ -2,19 +2,36 @@ github.com/K-Phoen/grabana v0.22.1 h1:b/O+C3H2H6VNYSeMCYUO4X4wYuwFXgBcRkvYa+fjpQ github.com/K-Phoen/grabana v0.22.1/go.mod h1:3LTXrTzQzTKTgvKSXdRjlsJbizSOW/V23Q3iX00R5bU= github.com/K-Phoen/sdk v0.12.4 h1:j2EYuBJm3zDTD0fGKACVFWxAXtkR0q5QzfVqxmHSeGQ= github.com/K-Phoen/sdk v0.12.4/go.mod h1:qmM0wO23CtoDux528MXPpYvS4XkRWkWX6rvX9Za8EVU= +github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gosimple/slug v1.13.1 h1:bQ+kpX9Qa6tHRaK+fZR0A0M2Kd7Pa5eHPPsb1JpHD+Q= github.com/gosimple/slug v1.13.1/go.mod h1:UiRaFH+GEilHstLUmcBgWcI42viBN7mAb818JrYOeFQ= github.com/gosimple/unidecode v1.0.1 h1:hZzFTMMqSswvf0LBJZCZgThIZrpDHFXux9KeGmn6T/o= github.com/gosimple/unidecode v1.0.1/go.mod h1:CP0Cr1Y1kogOtx0bJblKzsVWrqYaqfNOnHzpgWw4Awc= +github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= +github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= +github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= +github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= github.com/prometheus/common v0.45.0/go.mod h1:YJmSTw9BoKxJplESWWxlbyttQR4uaEcGyv9MZjVOJsY= +github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= +github.com/rs/zerolog v1.32.0 h1:keLypqrlIjaFsbmJOBdB/qvyF8KEtCWHwobLp5l/mQ0= +github.com/rs/zerolog v1.32.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= github.com/smartcontractkit/wasp v0.4.6 h1:s6J8HgpxMHORl19nCpZPxc5jaVUQv8EXB6QjTuLXXnw= github.com/smartcontractkit/wasp v0.4.6/go.mod h1:+ViWdUf1ap6powiEiwPskpZfH/Q1sG29YoVav7zGOIo= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.6.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 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= +golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/charts/chainlink-cluster/scripts/ingress_check.sh b/charts/chainlink-cluster/scripts/ingress_check.sh new file mode 100755 index 00000000000..9e9e3d85b61 --- /dev/null +++ b/charts/chainlink-cluster/scripts/ingress_check.sh @@ -0,0 +1,52 @@ +#!/usr/bin/env bash + +set -euo pipefail + +### +# To be invoked by `devspace` after a successful DevSpace deploy via a hook. +### + +if [[ -z "${DEVSPACE_HOOK_KUBE_NAMESPACE:-}" ]]; then + echo "Error: DEVSPACE_HOOK_KUBE_NAMESPACE is not set. Make sure to run from devspace." + exit 1 +fi + +INGRESS_NAME="${1:-}" +if [[ -z "${INGRESS_NAME}" ]]; then + echo "Usage: $0 INGRESS_NAME" + exit 1 +fi + +max_retries=10 +sleep_duration_retry=10 # 10 seconds +sleep_duration_propagate=60 # 60 seconds +timeout=$((60 * 2)) # 2 minutes +elapsed=0 # Track the elapsed time + +# Loop until conditions are met or we reach max retries or timeout +for ((i=1; i<=max_retries && elapsed<=timeout; i++)); do + ingress_hostname_aws=$(kubectl get ingress "${INGRESS_NAME}" -n "${DEVSPACE_HOOK_KUBE_NAMESPACE}" \ + -o jsonpath='{.status.loadBalancer.ingress[0].hostname}') + + # Sometimes the events on the ingress are "" instead of "successfully reconciled". + # So we use the AWS hostname as a signal that the ingress has been created successfully. + if echo "${ingress_hostname_aws}" | grep -q ".elb.amazonaws.com"; then + echo "#############################################################" + echo "# Ingress hostnames:" + echo "#############################################################" + devspace run ingress-hosts + echo + echo "Sleeping for ${sleep_duration_propagate} seconds to allow DNS records to propagate... (Use CTRL+C to safely skip this step.)" + sleep $sleep_duration_propagate + echo "...done. NOTE: If you have an issue with the DNS records, try to reset your local and/or VPN DNS cache." + exit 0 + else + echo "Attempt $i: Waiting for the ingress to be created..." + sleep $sleep_duration_retry + ((elapsed += sleep_duration_retry)) + fi +done + +# If we reached here, it means we hit the retry limit or the timeout +echo "Error: Ingress was not successfully created within the given constraints." +exit 1 diff --git a/charts/chainlink-cluster/templates/chainlink-cm.yaml b/charts/chainlink-cluster/templates/chainlink-cm.yaml index 25deb475af2..6f8b043e3d1 100644 --- a/charts/chainlink-cluster/templates/chainlink-cm.yaml +++ b/charts/chainlink-cluster/templates/chainlink-cm.yaml @@ -68,4 +68,4 @@ data: {{ else }} {{ end }} --- -{{- end }} \ No newline at end of file +{{- end }} diff --git a/common/client/mock_rpc_test.go b/common/client/mock_rpc_test.go index 60e0cb4b421..731d0f94cf2 100644 --- a/common/client/mock_rpc_test.go +++ b/common/client/mock_rpc_test.go @@ -454,6 +454,34 @@ func (_m *mockRPC[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS return r0, r1 } +// LatestFinalizedBlock provides a mock function with given fields: ctx +func (_m *mockRPC[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) LatestFinalizedBlock(ctx context.Context) (HEAD, error) { + ret := _m.Called(ctx) + + if len(ret) == 0 { + panic("no return value specified for LatestFinalizedBlock") + } + + var r0 HEAD + var r1 error + if rf, ok := ret.Get(0).(func(context.Context) (HEAD, error)); ok { + return rf(ctx) + } + if rf, ok := ret.Get(0).(func(context.Context) HEAD); ok { + r0 = rf(ctx) + } else { + r0 = ret.Get(0).(HEAD) + } + + if rf, ok := ret.Get(1).(func(context.Context) error); ok { + r1 = rf(ctx) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + // PendingCallContract provides a mock function with given fields: ctx, msg func (_m *mockRPC[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) PendingCallContract(ctx context.Context, msg interface{}) ([]byte, error) { ret := _m.Called(ctx, msg) diff --git a/common/client/multi_node.go b/common/client/multi_node.go index e86a7631982..cc8daed599c 100644 --- a/common/client/multi_node.go +++ b/common/client/multi_node.go @@ -819,3 +819,12 @@ func (c *multiNode[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OP } return n.RPC().TransactionReceipt(ctx, txHash) } + +func (c *multiNode[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, RPC_CLIENT, BATCH_ELEM]) LatestFinalizedBlock(ctx context.Context) (head HEAD, err error) { + n, err := c.selectNode() + if err != nil { + return head, err + } + + return n.RPC().LatestFinalizedBlock(ctx) +} diff --git a/common/client/node.go b/common/client/node.go index ee9ff5eb1c0..082b1b45f99 100644 --- a/common/client/node.go +++ b/common/client/node.go @@ -240,6 +240,10 @@ func (n *node[CHAIN_ID, HEAD, RPC]) verifyChainID(callerCtx context.Context, lgg st := n.State() switch st { + case nodeStateClosed: + // The node is already closed, and any subsequent transition is invalid. + // To make spotting such transitions a bit easier, return the invalid node state. + return nodeStateLen case nodeStateDialed, nodeStateOutOfSync, nodeStateInvalidChainID, nodeStateSyncing: default: panic(fmt.Sprintf("cannot verify node in state %v", st)) diff --git a/common/client/node_fsm.go b/common/client/node_fsm.go index 4cb020893b5..e9105dcc060 100644 --- a/common/client/node_fsm.go +++ b/common/client/node_fsm.go @@ -243,6 +243,9 @@ func (n *node[CHAIN_ID, HEAD, RPC]) transitionToUnreachable(fn func()) { } func (n *node[CHAIN_ID, HEAD, RPC]) declareState(state nodeState) { + if n.State() == nodeStateClosed { + return + } switch state { case nodeStateInvalidChainID: n.declareInvalidChainID() diff --git a/common/client/node_lifecycle_test.go b/common/client/node_lifecycle_test.go index 7c31c085dd3..437bc4a655b 100644 --- a/common/client/node_lifecycle_test.go +++ b/common/client/node_lifecycle_test.go @@ -808,8 +808,8 @@ func TestUnit_NodeLifecycle_unreachableLoop(t *testing.T) { }) defer func() { assert.NoError(t, node.close()) }() - rpc.On("Dial", mock.Anything).Return(nil).Twice() - rpc.On("ChainID", mock.Anything).Return(nodeChainID, nil).Twice() + rpc.On("Dial", mock.Anything).Return(nil) + rpc.On("ChainID", mock.Anything).Return(nodeChainID, nil) rpc.On("IsSyncing", mock.Anything).Return(true, nil) setupRPCForAliveLoop(t, rpc) diff --git a/common/client/types.go b/common/client/types.go index 485a0b2671a..8d7b5b71b83 100644 --- a/common/client/types.go +++ b/common/client/types.go @@ -117,6 +117,7 @@ type clientAPI[ BlockByNumber(ctx context.Context, number *big.Int) (HEAD, error) BlockByHash(ctx context.Context, hash BLOCK_HASH) (HEAD, error) LatestBlockHeight(context.Context) (*big.Int, error) + LatestFinalizedBlock(ctx context.Context) (HEAD, error) // Events FilterEvents(ctx context.Context, query EVENT_OPS) ([]EVENT, error) diff --git a/common/config/chaintype.go b/common/config/chaintype.go index 9ef4864b86e..29bab2a91e2 100644 --- a/common/config/chaintype.go +++ b/common/config/chaintype.go @@ -11,24 +11,33 @@ type ChainType string // nolint const ( ChainArbitrum ChainType = "arbitrum" + ChainCelo ChainType = "celo" + ChainGnosis ChainType = "gnosis" + ChainKroma ChainType = "kroma" ChainMetis ChainType = "metis" ChainOptimismBedrock ChainType = "optimismBedrock" - ChainXDai ChainType = "xdai" - ChainCelo ChainType = "celo" + ChainScroll ChainType = "scroll" ChainWeMix ChainType = "wemix" - ChainKroma ChainType = "kroma" + ChainXDai ChainType = "xdai" // Deprecated: use ChainGnosis instead ChainZkSync ChainType = "zksync" - ChainScroll ChainType = "scroll" ) var ErrInvalidChainType = fmt.Errorf("must be one of %s or omitted", strings.Join([]string{ - string(ChainArbitrum), string(ChainMetis), string(ChainXDai), string(ChainOptimismBedrock), string(ChainCelo), - string(ChainKroma), string(ChainWeMix), string(ChainZkSync), string(ChainScroll)}, ", ")) + string(ChainArbitrum), + string(ChainCelo), + string(ChainGnosis), + string(ChainKroma), + string(ChainMetis), + string(ChainOptimismBedrock), + string(ChainScroll), + string(ChainWeMix), + string(ChainZkSync), +}, ", ")) // IsValid returns true if the ChainType value is known or empty. func (c ChainType) IsValid() bool { switch c { - case "", ChainArbitrum, ChainMetis, ChainOptimismBedrock, ChainXDai, ChainCelo, ChainKroma, ChainWeMix, ChainZkSync, ChainScroll: + case "", ChainArbitrum, ChainCelo, ChainGnosis, ChainKroma, ChainMetis, ChainOptimismBedrock, ChainScroll, ChainWeMix, ChainXDai, ChainZkSync: return true } return false @@ -41,9 +50,6 @@ func (c ChainType) IsL2() bool { switch c { case ChainArbitrum, ChainMetis: return true - - case ChainXDai: - fallthrough default: return false } diff --git a/common/fee/utils.go b/common/fee/utils.go index eeb2c966719..26323e11e26 100644 --- a/common/fee/utils.go +++ b/common/fee/utils.go @@ -8,13 +8,13 @@ import ( "github.com/shopspring/decimal" ) -func ApplyMultiplier(feeLimit uint32, multiplier float32) (uint32, error) { - result := decimal.NewFromBigInt(big.NewInt(0).SetUint64(uint64(feeLimit)), 0).Mul(decimal.NewFromFloat32(multiplier)).IntPart() +func ApplyMultiplier(feeLimit uint64, multiplier float32) (uint64, error) { + result := decimal.NewFromBigInt(big.NewInt(0).SetUint64(feeLimit), 0).Mul(decimal.NewFromFloat32(multiplier)) - if result > math.MaxUint32 { + if result.GreaterThan(decimal.NewFromBigInt(big.NewInt(0).SetUint64(math.MaxUint64), 0)) { return 0, fmt.Errorf("integer overflow when applying multiplier of %f to fee limit of %d", multiplier, feeLimit) } - return uint32(result), nil + return result.BigInt().Uint64(), nil } // Returns the input value increased by the given percentage. diff --git a/common/headtracker/head_tracker.go b/common/headtracker/head_tracker.go index 4cc152fb9fe..eb9d72f123c 100644 --- a/common/headtracker/head_tracker.go +++ b/common/headtracker/head_tracker.go @@ -4,6 +4,7 @@ import ( "context" "errors" "fmt" + "math/big" "sync" "time" @@ -96,18 +97,6 @@ func NewHeadTracker[ func (ht *HeadTracker[HTH, S, ID, BLOCK_HASH]) Start(ctx context.Context) error { return ht.StartOnce("HeadTracker", func() error { ht.log.Debugw("Starting HeadTracker", "chainID", ht.chainID) - latestChain, err := ht.headSaver.Load(ctx) - if err != nil { - return err - } - if latestChain.IsValid() { - ht.log.Debugw( - fmt.Sprintf("HeadTracker: Tracking logs from last block %v with hash %s", latestChain.BlockNumber(), latestChain.BlockHash()), - "blockNumber", latestChain.BlockNumber(), - "blockHash", latestChain.BlockHash(), - ) - } - // NOTE: Always try to start the head tracker off with whatever the // latest head is, without waiting for the subscription to send us one. // @@ -115,18 +104,12 @@ func (ht *HeadTracker[HTH, S, ID, BLOCK_HASH]) Start(ctx context.Context) error // anyway when we connect (but we should not rely on this because it is // not specced). If it happens this is fine, and the head will be // ignored as a duplicate. - initialHead, err := ht.getInitialHead(ctx) + err := ht.handleInitialHead(ctx) if err != nil { - if errors.Is(err, ctx.Err()) { - return nil + if ctx.Err() != nil { + return ctx.Err() } - ht.log.Errorw("Error getting initial head", "err", err) - } else if initialHead.IsValid() { - if err := ht.handleNewHead(ctx, initialHead); err != nil { - return fmt.Errorf("error handling initial head: %w", err) - } - } else { - ht.log.Debug("Got nil initial head") + ht.log.Errorw("Error handling initial head", "err", err) } ht.wgDone.Add(3) @@ -140,6 +123,49 @@ func (ht *HeadTracker[HTH, S, ID, BLOCK_HASH]) Start(ctx context.Context) error }) } +func (ht *HeadTracker[HTH, S, ID, BLOCK_HASH]) handleInitialHead(ctx context.Context) error { + initialHead, err := ht.client.HeadByNumber(ctx, nil) + if err != nil { + return fmt.Errorf("failed to fetch initial head: %w", err) + } + + if !initialHead.IsValid() { + ht.log.Warnw("Got nil initial head", "head", initialHead) + return nil + } + ht.log.Debugw("Got initial head", "head", initialHead, "blockNumber", initialHead.BlockNumber(), "blockHash", initialHead.BlockHash()) + + latestFinalized, err := ht.calculateLatestFinalized(ctx, initialHead) + if err != nil { + return fmt.Errorf("failed to calculate latest finalized head: %w", err) + } + + if !latestFinalized.IsValid() { + return fmt.Errorf("latest finalized block is not valid") + } + + latestChain, err := ht.headSaver.Load(ctx, latestFinalized.BlockNumber()) + if err != nil { + return fmt.Errorf("failed to initialized headSaver: %w", err) + } + + if latestChain.IsValid() { + earliest := latestChain.EarliestHeadInChain() + ht.log.Debugw( + "Loaded chain from DB", + "latest_blockNumber", latestChain.BlockNumber(), + "latest_blockHash", latestChain.BlockHash(), + "earliest_blockNumber", earliest.BlockNumber(), + "earliest_blockHash", earliest.BlockHash(), + ) + } + if err := ht.handleNewHead(ctx, initialHead); err != nil { + return fmt.Errorf("error handling initial head: %w", err) + } + + return nil +} + // Close stops HeadTracker service. func (ht *HeadTracker[HTH, S, ID, BLOCK_HASH]) Close() error { return ht.StopOnce("HeadTracker", func() error { @@ -159,36 +185,26 @@ func (ht *HeadTracker[HTH, S, ID, BLOCK_HASH]) HealthReport() map[string]error { return report } -func (ht *HeadTracker[HTH, S, ID, BLOCK_HASH]) Backfill(ctx context.Context, headWithChain HTH, depth uint) (err error) { - if uint(headWithChain.ChainLength()) >= depth { - return nil +func (ht *HeadTracker[HTH, S, ID, BLOCK_HASH]) Backfill(ctx context.Context, headWithChain, latestFinalized HTH) (err error) { + if !latestFinalized.IsValid() { + return errors.New("can not perform backfill without a valid latestFinalized head") } - baseHeight := headWithChain.BlockNumber() - int64(depth-1) - if baseHeight < 0 { - baseHeight = 0 + if headWithChain.BlockNumber() < latestFinalized.BlockNumber() { + const errMsg = "invariant violation: expected head of canonical chain to be ahead of the latestFinalized" + ht.log.With("head_block_num", headWithChain.BlockNumber(), + "latest_finalized_block_number", latestFinalized.BlockNumber()). + Criticalf(errMsg) + return errors.New(errMsg) } - return ht.backfill(ctx, headWithChain.EarliestHeadInChain(), baseHeight) + return ht.backfill(ctx, headWithChain, latestFinalized) } func (ht *HeadTracker[HTH, S, ID, BLOCK_HASH]) LatestChain() HTH { return ht.headSaver.LatestChain() } -func (ht *HeadTracker[HTH, S, ID, BLOCK_HASH]) getInitialHead(ctx context.Context) (HTH, error) { - head, err := ht.client.HeadByNumber(ctx, nil) - if err != nil { - return ht.getNilHead(), fmt.Errorf("failed to fetch initial head: %w", err) - } - loggerFields := []interface{}{"head", head} - if head.IsValid() { - loggerFields = append(loggerFields, "blockNumber", head.BlockNumber(), "blockHash", head.BlockHash()) - } - ht.log.Debugw("Got initial head", loggerFields...) - return head, nil -} - func (ht *HeadTracker[HTH, S, ID, BLOCK_HASH]) handleNewHead(ctx context.Context, head HTH) error { prevHead := ht.headSaver.LatestChain() @@ -290,7 +306,13 @@ func (ht *HeadTracker[HTH, S, ID, BLOCK_HASH]) backfillLoop() { break } { - err := ht.Backfill(ctx, head, uint(ht.config.FinalityDepth())) + latestFinalized, err := ht.calculateLatestFinalized(ctx, head) + if err != nil { + ht.log.Warnw("Failed to calculate finalized block", "err", err) + continue + } + + err = ht.Backfill(ctx, head, latestFinalized) if err != nil { ht.log.Warnw("Unexpected error while backfilling heads", "err", err) } else if ctx.Err() != nil { @@ -302,14 +324,30 @@ func (ht *HeadTracker[HTH, S, ID, BLOCK_HASH]) backfillLoop() { } } -// backfill fetches all missing heads up until the base height -func (ht *HeadTracker[HTH, S, ID, BLOCK_HASH]) backfill(ctx context.Context, head types.Head[BLOCK_HASH], baseHeight int64) (err error) { - headBlockNumber := head.BlockNumber() - if headBlockNumber <= baseHeight { - return nil +// calculateLatestFinalized - returns latest finalized block. It's expected that currentHeadNumber - is the head of +// canonical chain. There is no guaranties that returned block belongs to the canonical chain. Additional verification +// must be performed before usage. +func (ht *HeadTracker[HTH, S, ID, BLOCK_HASH]) calculateLatestFinalized(ctx context.Context, currentHead HTH) (h HTH, err error) { + if ht.config.FinalityTagEnabled() { + return ht.client.LatestFinalizedBlock(ctx) + } + // no need to make an additional RPC call on chains with instant finality + if ht.config.FinalityDepth() == 0 { + return currentHead, nil } + finalizedBlockNumber := currentHead.BlockNumber() - int64(ht.config.FinalityDepth()) + if finalizedBlockNumber <= 0 { + finalizedBlockNumber = 0 + } + return ht.client.HeadByNumber(ctx, big.NewInt(finalizedBlockNumber)) +} + +// backfill fetches all missing heads up until the latestFinalizedHead +func (ht *HeadTracker[HTH, S, ID, BLOCK_HASH]) backfill(ctx context.Context, head, latestFinalizedHead HTH) (err error) { + headBlockNumber := head.BlockNumber() mark := time.Now() fetched := 0 + baseHeight := latestFinalizedHead.BlockNumber() l := ht.log.With("blockNumber", headBlockNumber, "n", headBlockNumber-baseHeight, "fromBlockHeight", baseHeight, @@ -337,11 +375,30 @@ func (ht *HeadTracker[HTH, S, ID, BLOCK_HASH]) backfill(ctx context.Context, hea fetched++ if ctx.Err() != nil { ht.log.Debugw("context canceled, aborting backfill", "err", err, "ctx.Err", ctx.Err()) - break + return fmt.Errorf("fetchAndSaveHead failed: %w", ctx.Err()) } else if err != nil { return fmt.Errorf("fetchAndSaveHead failed: %w", err) } } + + if head.BlockHash() != latestFinalizedHead.BlockHash() { + const errMsg = "expected finalized block to be present in canonical chain" + ht.log.With("finalized_block_number", latestFinalizedHead.BlockNumber(), "finalized_hash", latestFinalizedHead.BlockHash(), + "canonical_chain_block_number", head.BlockNumber(), "canonical_chain_hash", head.BlockHash()).Criticalf(errMsg) + return fmt.Errorf(errMsg) + } + + l = l.With("latest_finalized_block_hash", latestFinalizedHead.BlockHash(), + "latest_finalized_block_number", latestFinalizedHead.BlockNumber()) + + err = ht.headSaver.MarkFinalized(ctx, latestFinalizedHead) + if err != nil { + l.Debugw("failed to mark block as finalized", "err", err) + return nil + } + + l.Debugw("marked block as finalized") + return } diff --git a/common/headtracker/types/client.go b/common/headtracker/types/client.go index 906f95bbe54..a1e419809b5 100644 --- a/common/headtracker/types/client.go +++ b/common/headtracker/types/client.go @@ -15,4 +15,6 @@ type Client[H types.Head[BLOCK_HASH], S types.Subscription, ID types.ID, BLOCK_H // SubscribeNewHead is the method in which the client receives new Head. // It can be implemented differently for each chain i.e websocket, polling, etc SubscribeNewHead(ctx context.Context, ch chan<- H) (S, error) + // LatestFinalizedBlock - returns the latest block that was marked as finalized + LatestFinalizedBlock(ctx context.Context) (head H, err error) } diff --git a/common/headtracker/types/config.go b/common/headtracker/types/config.go index ca64f7a2952..019aa9847d9 100644 --- a/common/headtracker/types/config.go +++ b/common/headtracker/types/config.go @@ -5,6 +5,7 @@ import "time" type Config interface { BlockEmissionIdleWarningThreshold() time.Duration FinalityDepth() uint32 + FinalityTagEnabled() bool } type HeadTrackerConfig interface { diff --git a/common/mocks/head_tracker.go b/common/mocks/head_tracker.go index 83ee54b1847..fea31a1d6eb 100644 --- a/common/mocks/head_tracker.go +++ b/common/mocks/head_tracker.go @@ -14,17 +14,17 @@ type HeadTracker[H types.Head[BLOCK_HASH], BLOCK_HASH types.Hashable] struct { mock.Mock } -// Backfill provides a mock function with given fields: ctx, headWithChain, depth -func (_m *HeadTracker[H, BLOCK_HASH]) Backfill(ctx context.Context, headWithChain H, depth uint) error { - ret := _m.Called(ctx, headWithChain, depth) +// Backfill provides a mock function with given fields: ctx, headWithChain, latestFinalized +func (_m *HeadTracker[H, BLOCK_HASH]) Backfill(ctx context.Context, headWithChain H, latestFinalized H) error { + ret := _m.Called(ctx, headWithChain, latestFinalized) if len(ret) == 0 { panic("no return value specified for Backfill") } var r0 error - if rf, ok := ret.Get(0).(func(context.Context, H, uint) error); ok { - r0 = rf(ctx, headWithChain, depth) + if rf, ok := ret.Get(0).(func(context.Context, H, H) error); ok { + r0 = rf(ctx, headWithChain, latestFinalized) } else { r0 = ret.Error(0) } diff --git a/common/txmgr/broadcaster.go b/common/txmgr/broadcaster.go index 3e7520aff1a..5c9d9ae55bb 100644 --- a/common/txmgr/broadcaster.go +++ b/common/txmgr/broadcaster.go @@ -5,7 +5,6 @@ import ( "database/sql" "errors" "fmt" - "slices" "sync" "time" @@ -112,13 +111,13 @@ type Broadcaster[ txStore txmgrtypes.TransactionStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, SEQ, FEE] client txmgrtypes.TransactionClient[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] txmgrtypes.TxAttemptBuilder[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] - sequenceSyncer SequenceSyncer[ADDR, TX_HASH, BLOCK_HASH, SEQ] - resumeCallback ResumeCallback - chainID CHAIN_ID - config txmgrtypes.BroadcasterChainConfig - feeConfig txmgrtypes.BroadcasterFeeConfig - txConfig txmgrtypes.BroadcasterTransactionsConfig - listenerConfig txmgrtypes.BroadcasterListenerConfig + sequenceTracker txmgrtypes.SequenceTracker[ADDR, SEQ] + resumeCallback ResumeCallback + chainID CHAIN_ID + config txmgrtypes.BroadcasterChainConfig + feeConfig txmgrtypes.BroadcasterFeeConfig + txConfig txmgrtypes.BroadcasterTransactionsConfig + listenerConfig txmgrtypes.BroadcasterListenerConfig // autoSyncSequence, if set, will cause Broadcaster to fast-forward the sequence // when Start is called @@ -141,10 +140,6 @@ type Broadcaster[ initSync sync.Mutex isStarted bool - - sequenceLock sync.RWMutex - nextSequenceMap map[ADDR]SEQ - generateNextSequence types.GenerateNextSequenceFunc[SEQ] } func NewBroadcaster[ @@ -164,11 +159,10 @@ func NewBroadcaster[ listenerConfig txmgrtypes.BroadcasterListenerConfig, keystore txmgrtypes.KeyStore[ADDR, CHAIN_ID, SEQ], txAttemptBuilder txmgrtypes.TxAttemptBuilder[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], - sequenceSyncer SequenceSyncer[ADDR, TX_HASH, BLOCK_HASH, SEQ], + sequenceTracker txmgrtypes.SequenceTracker[ADDR, SEQ], lggr logger.Logger, checkerFactory TransmitCheckerFactory[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], autoSyncSequence bool, - generateNextSequence types.GenerateNextSequenceFunc[SEQ], ) *Broadcaster[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { lggr = logger.Named(lggr, "Broadcaster") b := &Broadcaster[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]{ @@ -176,7 +170,6 @@ func NewBroadcaster[ txStore: txStore, client: client, TxAttemptBuilder: txAttemptBuilder, - sequenceSyncer: sequenceSyncer, chainID: client.ConfiguredChainID(), config: config, feeConfig: feeConfig, @@ -185,10 +178,10 @@ func NewBroadcaster[ ks: keystore, checkerFactory: checkerFactory, autoSyncSequence: autoSyncSequence, + sequenceTracker: sequenceTracker, } b.processUnstartedTxsImpl = b.processUnstartedTxs - b.generateNextSequence = generateNextSequence return b } @@ -222,9 +215,7 @@ func (eb *Broadcaster[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) star eb.wg = sync.WaitGroup{} eb.wg.Add(len(eb.enabledAddresses)) eb.triggers = make(map[ADDR]chan struct{}) - eb.sequenceLock.Lock() - eb.nextSequenceMap = eb.loadNextSequenceMap(ctx, eb.enabledAddresses) - eb.sequenceLock.Unlock() + eb.sequenceTracker.LoadNextSequences(ctx, eb.enabledAddresses) for _, addr := range eb.enabledAddresses { triggerCh := make(chan struct{}, 1) eb.triggers[addr] = triggerCh @@ -284,46 +275,6 @@ func (eb *Broadcaster[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Trig } } -// Load the next sequence map using the tx table or on-chain (if not found in tx table) -func (eb *Broadcaster[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) loadNextSequenceMap(ctx context.Context, addresses []ADDR) map[ADDR]SEQ { - nextSequenceMap := make(map[ADDR]SEQ) - for _, address := range addresses { - seq, err := eb.getSequenceForAddr(ctx, address) - if err == nil { - nextSequenceMap[address] = seq - } - } - - return nextSequenceMap -} - -func (eb *Broadcaster[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) getSequenceForAddr(ctx context.Context, address ADDR) (seq SEQ, err error) { - // Get the highest sequence from the tx table - // Will need to be incremented since this sequence is already used - seq, err = eb.txStore.FindLatestSequence(ctx, address, eb.chainID) - if err == nil { - seq = eb.generateNextSequence(seq) - return seq, nil - } - // Look for nonce on-chain if no tx found for address in TxStore or if error occurred - // Returns the nonce that should be used for the next transaction so no need to increment - seq, err = eb.client.PendingSequenceAt(ctx, address) - if err == nil { - return seq, nil - } - eb.lggr.Criticalw("failed to retrieve next sequence from on-chain for address: ", "address", address.String()) - return seq, err - -} - -func (eb *Broadcaster[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) newSequenceSyncBackoff() backoff.Backoff { - return backoff.Backoff{ - Min: 100 * time.Millisecond, - Max: 5 * time.Second, - Jitter: true, - } -} - func (eb *Broadcaster[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) newResendBackoff() backoff.Backoff { return backoff.Backoff{ Min: 1 * time.Second, @@ -340,7 +291,7 @@ func (eb *Broadcaster[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) moni if eb.autoSyncSequence { eb.lggr.Debugw("Auto-syncing sequence", "address", addr.String()) - eb.SyncSequence(ctx, addr) + eb.sequenceTracker.SyncSequence(ctx, addr, eb.chStop) if ctx.Err() != nil { return } @@ -393,46 +344,6 @@ func (eb *Broadcaster[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) moni } } -// syncSequence tries to sync the key sequence, retrying indefinitely until success or stop signal is sent -func (eb *Broadcaster[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) SyncSequence(ctx context.Context, addr ADDR) { - sequenceSyncRetryBackoff := eb.newSequenceSyncBackoff() - localSequence, err := eb.GetNextSequence(ctx, addr) - // Address not found in map so skip sync - if err != nil { - eb.lggr.Criticalw("Failed to retrieve local next sequence for address", "address", addr.String(), "err", err) - return - } - - // Enter loop with retries - var attempt int - for { - select { - case <-eb.chStop: - return - case <-time.After(sequenceSyncRetryBackoff.Duration()): - attempt++ - newNextSequence, err := eb.sequenceSyncer.Sync(ctx, addr, localSequence) - if err != nil { - if attempt > 5 { - eb.lggr.Criticalw("Failed to sync with on-chain sequence", "address", addr.String(), "attempt", attempt, "err", err) - eb.SvcErrBuffer.Append(err) - } else { - eb.lggr.Warnw("Failed to sync with on-chain sequence", "address", addr.String(), "attempt", attempt, "err", err) - } - continue - } - // Found new sequence to use from on-chain - if localSequence.String() != newNextSequence.String() { - eb.lggr.Infow("Fast-forward sequence", "address", addr, "newNextSequence", newNextSequence, "oldNextSequence", localSequence) - // Set new sequence in the map - eb.SetNextSequence(addr, newNextSequence) - } - return - - } - } -} - // ProcessUnstartedTxs picks up and handles all txes in the queue // revive:disable:error-return func (eb *Broadcaster[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) ProcessUnstartedTxs(ctx context.Context, addr ADDR) (retryable bool, err error) { @@ -619,18 +530,12 @@ func (eb *Broadcaster[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) hand // and hand off to the confirmer to get the receipt (or mark as // failed). observeTimeUntilBroadcast(eb.chainID, etx.CreatedAt, time.Now()) - // Check if from_address exists in map to ensure it is valid before broadcasting - var sequence SEQ - sequence, err = eb.GetNextSequence(ctx, etx.FromAddress) - if err != nil { - return err, true - } err = eb.txStore.UpdateTxAttemptInProgressToBroadcast(ctx, &etx, attempt, txmgrtypes.TxAttemptBroadcast) if err != nil { return err, true } // Increment sequence if successfully broadcasted - eb.IncrementNextSequence(etx.FromAddress, sequence) + eb.sequenceTracker.GenerateNextSequence(etx.FromAddress, *etx.Sequence) return err, true case client.Underpriced: return eb.tryAgainBumpingGas(ctx, lgr, err, etx, attempt, initialBroadcastAt) @@ -677,18 +582,12 @@ func (eb *Broadcaster[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) hand // transaction to have been accepted. In this case, the right thing to // do is assume success and hand off to Confirmer - // Check if from_address exists in map to ensure it is valid before broadcasting - var sequence SEQ - sequence, err = eb.GetNextSequence(ctx, etx.FromAddress) - if err != nil { - return err, true - } err = eb.txStore.UpdateTxAttemptInProgressToBroadcast(ctx, &etx, attempt, txmgrtypes.TxAttemptBroadcast) if err != nil { return err, true } // Increment sequence if successfully broadcasted - eb.IncrementNextSequence(etx.FromAddress, sequence) + eb.sequenceTracker.GenerateNextSequence(etx.FromAddress, *etx.Sequence) return err, true } // Either the unknown error prevented the transaction from being mined, or @@ -716,7 +615,7 @@ func (eb *Broadcaster[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) next return nil, fmt.Errorf("findNextUnstartedTransactionFromAddress failed: %w", err) } - sequence, err := eb.GetNextSequence(ctx, etx.FromAddress) + sequence, err := eb.sequenceTracker.GetNextSequence(ctx, etx.FromAddress) if err != nil { return nil, err } @@ -760,7 +659,7 @@ func (eb *Broadcaster[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) tryA return eb.saveTryAgainAttempt(ctx, lgr, etx, attempt, replacementAttempt, initialBroadcastAt, fee, feeLimit) } -func (eb *Broadcaster[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) saveTryAgainAttempt(ctx context.Context, lgr logger.Logger, etx txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], attempt txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], replacementAttempt txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], initialBroadcastAt time.Time, newFee FEE, newFeeLimit uint32) (err error, retyrable bool) { +func (eb *Broadcaster[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) saveTryAgainAttempt(ctx context.Context, lgr logger.Logger, etx txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], attempt txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], replacementAttempt txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], initialBroadcastAt time.Time, newFee FEE, newFeeLimit uint64) (err error, retyrable bool) { if err = eb.txStore.SaveReplacementInProgressAttempt(ctx, attempt, &replacementAttempt); err != nil { return fmt.Errorf("tryAgainWithNewFee failed: %w", err), true } @@ -805,49 +704,6 @@ func (eb *Broadcaster[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) save return eb.txStore.UpdateTxFatalError(ctx, etx) } -// Used to get the next usable sequence for a transaction -func (eb *Broadcaster[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) GetNextSequence(ctx context.Context, address ADDR) (seq SEQ, err error) { - eb.sequenceLock.Lock() - defer eb.sequenceLock.Unlock() - // Get next sequence from map - seq, exists := eb.nextSequenceMap[address] - if exists { - return seq, nil - } - - eb.lggr.Infow("address not found in local next sequence map. Attempting to search and populate sequence.", "address", address.String()) - // Check if address is in the enabled address list - if !slices.Contains(eb.enabledAddresses, address) { - return seq, fmt.Errorf("address disabled: %s", address) - } - - // Try to retrieve next sequence from tx table or on-chain to load the map - // A scenario could exist where loading the map during startup failed (e.g. All configured RPC's are unreachable at start) - // The expectation is that the node does not fail startup so sequences need to be loaded during runtime - foundSeq, err := eb.getSequenceForAddr(ctx, address) - if err != nil { - return seq, fmt.Errorf("failed to find next sequence for address: %s", address) - } - - // Set sequence in map - eb.nextSequenceMap[address] = foundSeq - return foundSeq, nil -} - -// Used to increment the sequence in the mapping to have the next usable one available for the next transaction -func (eb *Broadcaster[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) IncrementNextSequence(address ADDR, seq SEQ) { - eb.sequenceLock.Lock() - defer eb.sequenceLock.Unlock() - eb.nextSequenceMap[address] = eb.generateNextSequence(seq) -} - -// Used to set the next sequence explicitly to a certain value -func (eb *Broadcaster[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) SetNextSequence(address ADDR, seq SEQ) { - eb.sequenceLock.Lock() - defer eb.sequenceLock.Unlock() - eb.nextSequenceMap[address] = seq -} - func observeTimeUntilBroadcast[CHAIN_ID types.ID](chainID CHAIN_ID, createdAt, broadcastAt time.Time) { duration := float64(broadcastAt.Sub(createdAt)) promTimeUntilBroadcast.WithLabelValues(chainID.String()).Observe(duration) diff --git a/common/txmgr/confirmer.go b/common/txmgr/confirmer.go index 073a6b90fa4..d76e70d9707 100644 --- a/common/txmgr/confirmer.go +++ b/common/txmgr/confirmer.go @@ -793,7 +793,7 @@ func (ec *Confirmer[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) bum logFields := ec.logFieldsPreviousAttempt(previousAttempt) var bumpedFee FEE - var bumpedFeeLimit uint32 + var bumpedFeeLimit uint64 bumpedAttempt, bumpedFee, bumpedFeeLimit, _, err = ec.NewBumpTxAttempt(ctx, etx, previousAttempt, previousAttempts, ec.lggr) // if no error, return attempt @@ -1039,7 +1039,7 @@ func (ec *Confirmer[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) mar // This operates completely orthogonal to the normal Confirmer and can result in untracked attempts! // Only for emergency usage. // This is in case of some unforeseen scenario where the node is refusing to release the lock. KISS. -func (ec *Confirmer[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) ForceRebroadcast(ctx context.Context, seqs []SEQ, fee FEE, address ADDR, overrideGasLimit uint32) error { +func (ec *Confirmer[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) ForceRebroadcast(ctx context.Context, seqs []SEQ, fee FEE, address ADDR, overrideGasLimit uint64) error { if len(seqs) == 0 { ec.lggr.Infof("ForceRebroadcast: No sequences provided. Skipping") return nil @@ -1082,7 +1082,7 @@ func (ec *Confirmer[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) For return nil } -func (ec *Confirmer[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) sendEmptyTransaction(ctx context.Context, fromAddress ADDR, seq SEQ, overrideGasLimit uint32, fee FEE) (string, error) { +func (ec *Confirmer[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) sendEmptyTransaction(ctx context.Context, fromAddress ADDR, seq SEQ, overrideGasLimit uint64, fee FEE) (string, error) { gasLimit := overrideGasLimit if gasLimit == 0 { gasLimit = ec.feeConfig.LimitDefault() diff --git a/common/txmgr/sequence_syncer.go b/common/txmgr/sequence_syncer.go deleted file mode 100644 index dd4d458dd74..00000000000 --- a/common/txmgr/sequence_syncer.go +++ /dev/null @@ -1,11 +0,0 @@ -package txmgr - -import ( - "context" - - "github.com/smartcontractkit/chainlink/v2/common/types" -) - -type SequenceSyncer[ADDR types.Hashable, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, SEQ types.Sequence] interface { - Sync(ctx context.Context, addr ADDR, localSequence SEQ) (SEQ, error) -} diff --git a/common/txmgr/txmgr.go b/common/txmgr/txmgr.go index d0b33ad7e30..74d218915d9 100644 --- a/common/txmgr/txmgr.go +++ b/common/txmgr/txmgr.go @@ -107,7 +107,6 @@ type Txm[ tracker *Tracker[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, R, SEQ, FEE] fwdMgr txmgrtypes.ForwarderManager[ADDR] txAttemptBuilder txmgrtypes.TxAttemptBuilder[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] - sequenceSyncer SequenceSyncer[ADDR, TX_HASH, BLOCK_HASH, SEQ] } func (b *Txm[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) RegisterResumeCallback(fn ResumeCallback) { @@ -136,7 +135,6 @@ func NewTxm[ fwdMgr txmgrtypes.ForwarderManager[ADDR], txAttemptBuilder txmgrtypes.TxAttemptBuilder[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], txStore txmgrtypes.TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE], - sequenceSyncer SequenceSyncer[ADDR, TX_HASH, BLOCK_HASH, SEQ], broadcaster *Broadcaster[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], confirmer *Confirmer[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, R, SEQ, FEE], resender *Resender[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, R, SEQ, FEE], @@ -157,7 +155,6 @@ func NewTxm[ reset: make(chan reset), fwdMgr: fwdMgr, txAttemptBuilder: txAttemptBuilder, - sequenceSyncer: sequenceSyncer, broadcaster: broadcaster, confirmer: confirmer, resender: resender, @@ -561,7 +558,7 @@ func (b *Txm[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) SendNative ToAddress: to, EncodedPayload: []byte{}, Value: value, - FeeLimit: gasLimit, + FeeLimit: uint64(gasLimit), Strategy: NewSendEveryStrategy(), } etx, err = b.pruneQueueAndCreateTxn(ctx, txRequest, chainID) diff --git a/common/txmgr/types/client.go b/common/txmgr/types/client.go index 32527e5896e..759b15d6162 100644 --- a/common/txmgr/types/client.go +++ b/common/txmgr/types/client.go @@ -62,9 +62,9 @@ type TransactionClient[ ) (client.SendTxReturnCode, error) SendEmptyTransaction( ctx context.Context, - newTxAttempt func(ctx context.Context, seq SEQ, feeLimit uint32, fee FEE, fromAddress ADDR) (attempt TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], err error), + newTxAttempt func(ctx context.Context, seq SEQ, feeLimit uint64, fee FEE, fromAddress ADDR) (attempt TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], err error), seq SEQ, - gasLimit uint32, + gasLimit uint64, fee FEE, fromAddress ADDR, ) (txhash string, err error) diff --git a/common/txmgr/types/config.go b/common/txmgr/types/config.go index 502a7f42d5c..53e35cd4b6e 100644 --- a/common/txmgr/types/config.go +++ b/common/txmgr/types/config.go @@ -42,7 +42,7 @@ type BroadcasterListenerConfig interface { type ConfirmerFeeConfig interface { BumpTxDepth() uint32 - LimitDefault() uint32 + LimitDefault() uint64 // from gas.Config BumpThreshold() uint64 diff --git a/common/txmgr/types/mocks/tx_attempt_builder.go b/common/txmgr/types/mocks/tx_attempt_builder.go index 5b9b3e505ad..20ecbde0945 100644 --- a/common/txmgr/types/mocks/tx_attempt_builder.go +++ b/common/txmgr/types/mocks/tx_attempt_builder.go @@ -77,7 +77,7 @@ func (_m *TxAttemptBuilder[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) } // NewBumpTxAttempt provides a mock function with given fields: ctx, tx, previousAttempt, priorAttempts, lggr -func (_m *TxAttemptBuilder[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) NewBumpTxAttempt(ctx context.Context, tx txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], previousAttempt txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], priorAttempts []txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], lggr logger.Logger) (txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], FEE, uint32, bool, error) { +func (_m *TxAttemptBuilder[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) NewBumpTxAttempt(ctx context.Context, tx txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], previousAttempt txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], priorAttempts []txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], lggr logger.Logger) (txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], FEE, uint64, bool, error) { ret := _m.Called(ctx, tx, previousAttempt, priorAttempts, lggr) if len(ret) == 0 { @@ -86,10 +86,10 @@ func (_m *TxAttemptBuilder[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) var r0 txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] var r1 FEE - var r2 uint32 + var r2 uint64 var r3 bool var r4 error - if rf, ok := ret.Get(0).(func(context.Context, txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], []txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], logger.Logger) (txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], FEE, uint32, bool, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], []txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], logger.Logger) (txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], FEE, uint64, bool, error)); ok { return rf(ctx, tx, previousAttempt, priorAttempts, lggr) } if rf, ok := ret.Get(0).(func(context.Context, txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], []txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], logger.Logger) txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]); ok { @@ -104,10 +104,10 @@ func (_m *TxAttemptBuilder[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) r1 = ret.Get(1).(FEE) } - if rf, ok := ret.Get(2).(func(context.Context, txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], []txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], logger.Logger) uint32); ok { + if rf, ok := ret.Get(2).(func(context.Context, txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], []txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], logger.Logger) uint64); ok { r2 = rf(ctx, tx, previousAttempt, priorAttempts, lggr) } else { - r2 = ret.Get(2).(uint32) + r2 = ret.Get(2).(uint64) } if rf, ok := ret.Get(3).(func(context.Context, txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], []txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], logger.Logger) bool); ok { @@ -126,7 +126,7 @@ func (_m *TxAttemptBuilder[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) } // NewCustomTxAttempt provides a mock function with given fields: ctx, tx, fee, gasLimit, txType, lggr -func (_m *TxAttemptBuilder[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) NewCustomTxAttempt(ctx context.Context, tx txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], fee FEE, gasLimit uint32, txType int, lggr logger.Logger) (txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], bool, error) { +func (_m *TxAttemptBuilder[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) NewCustomTxAttempt(ctx context.Context, tx txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], fee FEE, gasLimit uint64, txType int, lggr logger.Logger) (txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], bool, error) { ret := _m.Called(ctx, tx, fee, gasLimit, txType, lggr) if len(ret) == 0 { @@ -136,22 +136,22 @@ func (_m *TxAttemptBuilder[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) var r0 txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] var r1 bool var r2 error - if rf, ok := ret.Get(0).(func(context.Context, txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], FEE, uint32, int, logger.Logger) (txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], bool, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], FEE, uint64, int, logger.Logger) (txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], bool, error)); ok { return rf(ctx, tx, fee, gasLimit, txType, lggr) } - if rf, ok := ret.Get(0).(func(context.Context, txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], FEE, uint32, int, logger.Logger) txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]); ok { + if rf, ok := ret.Get(0).(func(context.Context, txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], FEE, uint64, int, logger.Logger) txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]); ok { r0 = rf(ctx, tx, fee, gasLimit, txType, lggr) } else { r0 = ret.Get(0).(txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) } - if rf, ok := ret.Get(1).(func(context.Context, txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], FEE, uint32, int, logger.Logger) bool); ok { + if rf, ok := ret.Get(1).(func(context.Context, txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], FEE, uint64, int, logger.Logger) bool); ok { r1 = rf(ctx, tx, fee, gasLimit, txType, lggr) } else { r1 = ret.Get(1).(bool) } - if rf, ok := ret.Get(2).(func(context.Context, txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], FEE, uint32, int, logger.Logger) error); ok { + if rf, ok := ret.Get(2).(func(context.Context, txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], FEE, uint64, int, logger.Logger) error); ok { r2 = rf(ctx, tx, fee, gasLimit, txType, lggr) } else { r2 = ret.Error(2) @@ -161,7 +161,7 @@ func (_m *TxAttemptBuilder[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) } // NewEmptyTxAttempt provides a mock function with given fields: ctx, seq, feeLimit, fee, fromAddress -func (_m *TxAttemptBuilder[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) NewEmptyTxAttempt(ctx context.Context, seq SEQ, feeLimit uint32, fee FEE, fromAddress ADDR) (txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], error) { +func (_m *TxAttemptBuilder[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) NewEmptyTxAttempt(ctx context.Context, seq SEQ, feeLimit uint64, fee FEE, fromAddress ADDR) (txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], error) { ret := _m.Called(ctx, seq, feeLimit, fee, fromAddress) if len(ret) == 0 { @@ -170,16 +170,16 @@ func (_m *TxAttemptBuilder[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) var r0 txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] var r1 error - if rf, ok := ret.Get(0).(func(context.Context, SEQ, uint32, FEE, ADDR) (txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, SEQ, uint64, FEE, ADDR) (txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], error)); ok { return rf(ctx, seq, feeLimit, fee, fromAddress) } - if rf, ok := ret.Get(0).(func(context.Context, SEQ, uint32, FEE, ADDR) txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]); ok { + if rf, ok := ret.Get(0).(func(context.Context, SEQ, uint64, FEE, ADDR) txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]); ok { r0 = rf(ctx, seq, feeLimit, fee, fromAddress) } else { r0 = ret.Get(0).(txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) } - if rf, ok := ret.Get(1).(func(context.Context, SEQ, uint32, FEE, ADDR) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, SEQ, uint64, FEE, ADDR) error); ok { r1 = rf(ctx, seq, feeLimit, fee, fromAddress) } else { r1 = ret.Error(1) @@ -189,7 +189,7 @@ func (_m *TxAttemptBuilder[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) } // NewTxAttempt provides a mock function with given fields: ctx, tx, lggr, opts -func (_m *TxAttemptBuilder[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) NewTxAttempt(ctx context.Context, tx txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], lggr logger.Logger, opts ...feetypes.Opt) (txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], FEE, uint32, bool, error) { +func (_m *TxAttemptBuilder[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) NewTxAttempt(ctx context.Context, tx txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], lggr logger.Logger, opts ...feetypes.Opt) (txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], FEE, uint64, bool, error) { _va := make([]interface{}, len(opts)) for _i := range opts { _va[_i] = opts[_i] @@ -205,10 +205,10 @@ func (_m *TxAttemptBuilder[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) var r0 txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] var r1 FEE - var r2 uint32 + var r2 uint64 var r3 bool var r4 error - if rf, ok := ret.Get(0).(func(context.Context, txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], logger.Logger, ...feetypes.Opt) (txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], FEE, uint32, bool, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], logger.Logger, ...feetypes.Opt) (txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], FEE, uint64, bool, error)); ok { return rf(ctx, tx, lggr, opts...) } if rf, ok := ret.Get(0).(func(context.Context, txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], logger.Logger, ...feetypes.Opt) txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]); ok { @@ -223,10 +223,10 @@ func (_m *TxAttemptBuilder[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) r1 = ret.Get(1).(FEE) } - if rf, ok := ret.Get(2).(func(context.Context, txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], logger.Logger, ...feetypes.Opt) uint32); ok { + if rf, ok := ret.Get(2).(func(context.Context, txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], logger.Logger, ...feetypes.Opt) uint64); ok { r2 = rf(ctx, tx, lggr, opts...) } else { - r2 = ret.Get(2).(uint32) + r2 = ret.Get(2).(uint64) } if rf, ok := ret.Get(3).(func(context.Context, txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], logger.Logger, ...feetypes.Opt) bool); ok { @@ -245,7 +245,7 @@ func (_m *TxAttemptBuilder[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) } // NewTxAttemptWithType provides a mock function with given fields: ctx, tx, lggr, txType, opts -func (_m *TxAttemptBuilder[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) NewTxAttemptWithType(ctx context.Context, tx txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], lggr logger.Logger, txType int, opts ...feetypes.Opt) (txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], FEE, uint32, bool, error) { +func (_m *TxAttemptBuilder[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) NewTxAttemptWithType(ctx context.Context, tx txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], lggr logger.Logger, txType int, opts ...feetypes.Opt) (txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], FEE, uint64, bool, error) { _va := make([]interface{}, len(opts)) for _i := range opts { _va[_i] = opts[_i] @@ -261,10 +261,10 @@ func (_m *TxAttemptBuilder[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) var r0 txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] var r1 FEE - var r2 uint32 + var r2 uint64 var r3 bool var r4 error - if rf, ok := ret.Get(0).(func(context.Context, txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], logger.Logger, int, ...feetypes.Opt) (txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], FEE, uint32, bool, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], logger.Logger, int, ...feetypes.Opt) (txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], FEE, uint64, bool, error)); ok { return rf(ctx, tx, lggr, txType, opts...) } if rf, ok := ret.Get(0).(func(context.Context, txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], logger.Logger, int, ...feetypes.Opt) txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]); ok { @@ -279,10 +279,10 @@ func (_m *TxAttemptBuilder[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) r1 = ret.Get(1).(FEE) } - if rf, ok := ret.Get(2).(func(context.Context, txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], logger.Logger, int, ...feetypes.Opt) uint32); ok { + if rf, ok := ret.Get(2).(func(context.Context, txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], logger.Logger, int, ...feetypes.Opt) uint64); ok { r2 = rf(ctx, tx, lggr, txType, opts...) } else { - r2 = ret.Get(2).(uint32) + r2 = ret.Get(2).(uint64) } if rf, ok := ret.Get(3).(func(context.Context, txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], logger.Logger, int, ...feetypes.Opt) bool); ok { diff --git a/common/txmgr/types/sequence_tracker.go b/common/txmgr/types/sequence_tracker.go new file mode 100644 index 00000000000..7e824aa38cd --- /dev/null +++ b/common/txmgr/types/sequence_tracker.go @@ -0,0 +1,26 @@ +package types + +import ( + "context" + + "github.com/smartcontractkit/chainlink-common/pkg/services" + "github.com/smartcontractkit/chainlink/v2/common/types" +) + +type SequenceTracker[ + // Represents an account address, in native chain format. + ADDR types.Hashable, + // Represents the sequence type for a chain. For example, nonce for EVM. + SEQ types.Sequence, +] interface { + // Load the next sequence needed for transactions for all enabled addresses + LoadNextSequences(context.Context, []ADDR) + // Get the next sequence to assign to a transaction + GetNextSequence(context.Context, ADDR) (SEQ, error) + // Signals the existing sequence has been used so generates and stores the next sequence + // Can be a no-op depending on the chain + GenerateNextSequence(ADDR, SEQ) + // Syncs the local sequence with the one on-chain in case the address as been used externally + // Can be a no-op depending on the chain + SyncSequence(context.Context, ADDR, services.StopChan) +} diff --git a/common/txmgr/types/tx.go b/common/txmgr/types/tx.go index 3b294adcd07..76fd7f4b3ab 100644 --- a/common/txmgr/types/tx.go +++ b/common/txmgr/types/tx.go @@ -79,7 +79,7 @@ type TxRequest[ADDR types.Hashable, TX_HASH types.Hashable] struct { ToAddress ADDR EncodedPayload []byte Value big.Int - FeeLimit uint32 + FeeLimit uint64 Meta *TxMeta[ADDR, TX_HASH] ForwarderAddress ADDR @@ -175,7 +175,7 @@ type TxAttempt[ Tx Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] TxFee FEE // ChainSpecificFeeLimit on the TxAttempt is always the same as the on-chain encoded value for fee limit - ChainSpecificFeeLimit uint32 + ChainSpecificFeeLimit uint64 SignedRawTx []byte Hash TX_HASH CreatedAt time.Time @@ -205,7 +205,7 @@ type Tx[ Value big.Int // FeeLimit on the Tx is always the conceptual gas limit, which is not // necessarily the same as the on-chain encoded value (i.e. Optimism) - FeeLimit uint32 + FeeLimit uint64 Error null.String // BroadcastAt is updated every time an attempt for this tx is re-sent // In almost all cases it will be within a second or so of the actual send time. diff --git a/common/txmgr/types/tx_attempt_builder.go b/common/txmgr/types/tx_attempt_builder.go index 47c71abea35..b242f73e6fc 100644 --- a/common/txmgr/types/tx_attempt_builder.go +++ b/common/txmgr/types/tx_attempt_builder.go @@ -27,18 +27,18 @@ type TxAttemptBuilder[ types.HeadTrackable[HEAD, BLOCK_HASH] // NewTxAttempt builds a transaction using the configured transaction type and fee estimator (new estimation) - NewTxAttempt(ctx context.Context, tx Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], lggr logger.Logger, opts ...feetypes.Opt) (attempt TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], fee FEE, feeLimit uint32, retryable bool, err error) + NewTxAttempt(ctx context.Context, tx Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], lggr logger.Logger, opts ...feetypes.Opt) (attempt TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], fee FEE, feeLimit uint64, retryable bool, err error) // NewTxAttemptWithType builds a transaction using the configured fee estimator (new estimation) + passed in tx type - NewTxAttemptWithType(ctx context.Context, tx Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], lggr logger.Logger, txType int, opts ...feetypes.Opt) (attempt TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], fee FEE, feeLimit uint32, retryable bool, err error) + NewTxAttemptWithType(ctx context.Context, tx Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], lggr logger.Logger, txType int, opts ...feetypes.Opt) (attempt TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], fee FEE, feeLimit uint64, retryable bool, err error) // NewBumpTxAttempt builds a transaction using the configured fee estimator (bumping) + tx type from previous attempt // this should only be used after an initial attempt has been broadcast and the underlying gas estimator only needs to bump the fee - NewBumpTxAttempt(ctx context.Context, tx Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], previousAttempt TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], priorAttempts []TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], lggr logger.Logger) (attempt TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], bumpedFee FEE, bumpedFeeLimit uint32, retryable bool, err error) + NewBumpTxAttempt(ctx context.Context, tx Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], previousAttempt TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], priorAttempts []TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], lggr logger.Logger) (attempt TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], bumpedFee FEE, bumpedFeeLimit uint64, retryable bool, err error) // NewCustomTxAttempt builds a transaction using the passed in fee + tx type - NewCustomTxAttempt(ctx context.Context, tx Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], fee FEE, gasLimit uint32, txType int, lggr logger.Logger) (attempt TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], retryable bool, err error) + NewCustomTxAttempt(ctx context.Context, tx Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], fee FEE, gasLimit uint64, txType int, lggr logger.Logger) (attempt TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], retryable bool, err error) // NewEmptyTxAttempt is used in ForceRebroadcast to create a signed tx with zero value sent to the zero address - NewEmptyTxAttempt(ctx context.Context, seq SEQ, feeLimit uint32, fee FEE, fromAddress ADDR) (attempt TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], err error) + NewEmptyTxAttempt(ctx context.Context, seq SEQ, feeLimit uint64, fee FEE, fromAddress ADDR) (attempt TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], err error) } diff --git a/common/types/head_tracker.go b/common/types/head_tracker.go index d8fa8011783..83a2d7b8adb 100644 --- a/common/types/head_tracker.go +++ b/common/types/head_tracker.go @@ -12,9 +12,8 @@ import ( //go:generate mockery --quiet --name HeadTracker --output ../mocks/ --case=underscore type HeadTracker[H Head[BLOCK_HASH], BLOCK_HASH Hashable] interface { services.Service - // Backfill given a head will fill in any missing heads up to the given depth - // (used for testing) - Backfill(ctx context.Context, headWithChain H, depth uint) (err error) + // Backfill given a head will fill in any missing heads up to latestFinalized + Backfill(ctx context.Context, headWithChain, latestFinalized H) (err error) LatestChain() H } @@ -37,12 +36,14 @@ type HeadSaver[H Head[BLOCK_HASH], BLOCK_HASH Hashable] interface { // Save updates the latest block number, if indeed the latest, and persists // this number in case of reboot. Save(ctx context.Context, head H) error - // Load loads latest EvmHeadTrackerHistoryDepth heads, returns the latest chain. - Load(ctx context.Context) (H, error) + // Load loads latest heads up to latestFinalized - historyDepth, returns the latest chain. + Load(ctx context.Context, latestFinalized int64) (H, error) // LatestChain returns the block header with the highest number that has been seen, or nil. LatestChain() H // Chain returns a head for the specified hash, or nil. Chain(hash BLOCK_HASH) H + // MarkFinalized - marks matching block and all it's direct ancestors as finalized + MarkFinalized(ctx context.Context, latestFinalized H) error } // HeadListener is a chain agnostic interface that manages connection of Client that receives heads from the blockchain node diff --git a/contracts/.changeset/README.md b/contracts/.changeset/README.md new file mode 100644 index 00000000000..e5b6d8d6a67 --- /dev/null +++ b/contracts/.changeset/README.md @@ -0,0 +1,8 @@ +# Changesets + +Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works +with multi-package repos, or single-package repos to help you version and publish your code. You can +find the full documentation for it [in our repository](https://github.com/changesets/changesets) + +We have a quick list of common questions to get you started engaging with this project in +[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md) diff --git a/contracts/.changeset/clever-kings-smell.md b/contracts/.changeset/clever-kings-smell.md new file mode 100644 index 00000000000..eee8eddf53a --- /dev/null +++ b/contracts/.changeset/clever-kings-smell.md @@ -0,0 +1,11 @@ +--- +"@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/config.json b/contracts/.changeset/config.json new file mode 100644 index 00000000000..8205542a708 --- /dev/null +++ b/contracts/.changeset/config.json @@ -0,0 +1,16 @@ +{ + "$schema": "https://unpkg.com/@changesets/config@2.3.1/schema.json", + "changelog": [ + "@changesets/changelog-github", + { + "repo": "smartcontractkit/chainlink" + } + ], + "commit": false, + "fixed": [], + "linked": [], + "access": "public", + "baseBranch": "develop", + "updateInternalDependencies": "patch", + "ignore": [] +} diff --git a/contracts/.changeset/fluffy-peaches-provide.md b/contracts/.changeset/fluffy-peaches-provide.md new file mode 100644 index 00000000000..cf6f001ac2e --- /dev/null +++ b/contracts/.changeset/fluffy-peaches-provide.md @@ -0,0 +1,5 @@ +--- +"@chainlink/contracts": patch +--- + +added logic C contract to automation 2.3 diff --git a/contracts/.changeset/pretty-cups-tickle.md b/contracts/.changeset/pretty-cups-tickle.md new file mode 100644 index 00000000000..a7c5625a4e1 --- /dev/null +++ b/contracts/.changeset/pretty-cups-tickle.md @@ -0,0 +1,5 @@ +--- +"@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 new file mode 100644 index 00000000000..ad0e6859957 --- /dev/null +++ b/contracts/.changeset/quick-vans-retire.md @@ -0,0 +1,5 @@ +--- +"@chainlink/contracts": minor +--- + +introduce native billing support to automation registry v2.3 diff --git a/contracts/.changeset/three-spoons-clean.md b/contracts/.changeset/three-spoons-clean.md new file mode 100644 index 00000000000..f822a9cb274 --- /dev/null +++ b/contracts/.changeset/three-spoons-clean.md @@ -0,0 +1,5 @@ +--- +"@chainlink/contracts": patch +--- + +use common interface for v2.3 diff --git a/contracts/gas-snapshots/functions.gas-snapshot b/contracts/gas-snapshots/functions.gas-snapshot index fb24f678bc2..d46a449b4d2 100644 --- a/contracts/gas-snapshots/functions.gas-snapshot +++ b/contracts/gas-snapshots/functions.gas-snapshot @@ -1,12 +1,12 @@ -ChainSpecificUtil__getCurrentTxL1GasFees_Arbitrum:test__getCurrentTxL1GasFees_SuccessWhenArbitrumGoerli() (gas: 15924776) -ChainSpecificUtil__getCurrentTxL1GasFees_Arbitrum:test__getCurrentTxL1GasFees_SuccessWhenArbitrumMainnet() (gas: 15924754) -ChainSpecificUtil__getCurrentTxL1GasFees_Arbitrum:test__getCurrentTxL1GasFees_SuccessWhenArbitrumSepolia() (gas: 15924770) -ChainSpecificUtil__getCurrentTxL1GasFees_Base:test__getCurrentTxL1GasFees_SuccessWhenBaseGoerli() (gas: 15936218) -ChainSpecificUtil__getCurrentTxL1GasFees_Base:test__getCurrentTxL1GasFees_SuccessWhenBaseMainnet() (gas: 15936195) -ChainSpecificUtil__getCurrentTxL1GasFees_Base:test__getCurrentTxL1GasFees_SuccessWhenBaseSepolia() (gas: 15936167) -ChainSpecificUtil__getCurrentTxL1GasFees_Optimism:test__getCurrentTxL1GasFees_SuccessWhenOptimismGoerli() (gas: 15936118) -ChainSpecificUtil__getCurrentTxL1GasFees_Optimism:test__getCurrentTxL1GasFees_SuccessWhenOptimismMainnet() (gas: 15936107) -ChainSpecificUtil__getCurrentTxL1GasFees_Optimism:test__getCurrentTxL1GasFees_SuccessWhenOptimismSepolia() (gas: 15936151) +ChainSpecificUtil__getCurrentTxL1GasFees_Arbitrum:test__getCurrentTxL1GasFees_SuccessWhenArbitrumGoerli() (gas: 15926591) +ChainSpecificUtil__getCurrentTxL1GasFees_Arbitrum:test__getCurrentTxL1GasFees_SuccessWhenArbitrumMainnet() (gas: 15926569) +ChainSpecificUtil__getCurrentTxL1GasFees_Arbitrum:test__getCurrentTxL1GasFees_SuccessWhenArbitrumSepolia() (gas: 15926585) +ChainSpecificUtil__getCurrentTxL1GasFees_Base:test__getCurrentTxL1GasFees_SuccessWhenBaseGoerli() (gas: 15938033) +ChainSpecificUtil__getCurrentTxL1GasFees_Base:test__getCurrentTxL1GasFees_SuccessWhenBaseMainnet() (gas: 15938010) +ChainSpecificUtil__getCurrentTxL1GasFees_Base:test__getCurrentTxL1GasFees_SuccessWhenBaseSepolia() (gas: 15937982) +ChainSpecificUtil__getCurrentTxL1GasFees_Optimism:test__getCurrentTxL1GasFees_SuccessWhenOptimismGoerli() (gas: 15937933) +ChainSpecificUtil__getCurrentTxL1GasFees_Optimism:test__getCurrentTxL1GasFees_SuccessWhenOptimismMainnet() (gas: 15937922) +ChainSpecificUtil__getCurrentTxL1GasFees_Optimism:test__getCurrentTxL1GasFees_SuccessWhenOptimismSepolia() (gas: 15937966) FunctionsBilling_Constructor:test_Constructor_Success() (gas: 14823) FunctionsBilling_DeleteCommitment:test_DeleteCommitment_RevertIfNotRouter() (gas: 13260) FunctionsBilling_DeleteCommitment:test_DeleteCommitment_Success() (gas: 15875) @@ -18,13 +18,13 @@ FunctionsBilling_GetConfig:test_GetConfig_Success() (gas: 27553) FunctionsBilling_GetDONFeeJuels:test_GetDONFeeJuels_Success() (gas: 40831) FunctionsBilling_GetOperationFee:test_GetOperationFeeJuels_Success() (gas: 40211) FunctionsBilling_GetWeiPerUnitLink:test_GetWeiPerUnitLink_Success() (gas: 29414) -FunctionsBilling_OracleWithdraw:test_OracleWithdraw_RevertIfInsufficientBalance() (gas: 70107) -FunctionsBilling_OracleWithdraw:test_OracleWithdraw_RevertWithNoBalance() (gas: 106264) -FunctionsBilling_OracleWithdraw:test_OracleWithdraw_SuccessCoordinatorOwner() (gas: 129542) -FunctionsBilling_OracleWithdraw:test_OracleWithdraw_SuccessTransmitterWithBalanceNoAmountGiven() (gas: 169241) -FunctionsBilling_OracleWithdraw:test_OracleWithdraw_SuccessTransmitterWithBalanceValidAmountGiven() (gas: 142476) +FunctionsBilling_OracleWithdraw:test_OracleWithdraw_RevertIfInsufficientBalance() (gas: 70136) +FunctionsBilling_OracleWithdraw:test_OracleWithdraw_RevertWithNoBalance() (gas: 106293) +FunctionsBilling_OracleWithdraw:test_OracleWithdraw_SuccessCoordinatorOwner() (gas: 129571) +FunctionsBilling_OracleWithdraw:test_OracleWithdraw_SuccessTransmitterWithBalanceNoAmountGiven() (gas: 169270) +FunctionsBilling_OracleWithdraw:test_OracleWithdraw_SuccessTransmitterWithBalanceValidAmountGiven() (gas: 142505) FunctionsBilling_OracleWithdrawAll:test_OracleWithdrawAll_RevertIfNotOwner() (gas: 13297) -FunctionsBilling_OracleWithdrawAll:test_OracleWithdrawAll_SuccessPaysTransmittersWithBalance() (gas: 217168) +FunctionsBilling_OracleWithdrawAll:test_OracleWithdrawAll_SuccessPaysTransmittersWithBalance() (gas: 217197) FunctionsBilling_UpdateConfig:test_UpdateConfig_RevertIfNotOwner() (gas: 21521) FunctionsBilling_UpdateConfig:test_UpdateConfig_Success() (gas: 49192) FunctionsBilling__DisperseFeePool:test__DisperseFeePool_RevertIfNotSet() (gas: 8810) @@ -208,12 +208,12 @@ FunctionsTermsOfServiceAllowList_BlockSender:test_BlockSender_Success() (gas: 96 FunctionsTermsOfServiceAllowList_Constructor:test_Constructor_Success() (gas: 12253) FunctionsTermsOfServiceAllowList_GetAllAllowedSenders:test_GetAllAllowedSenders_Success() (gas: 19199) FunctionsTermsOfServiceAllowList_GetAllowedSendersCount:test_GetAllowedSendersCount_Success() (gas: 12995) -FunctionsTermsOfServiceAllowList_GetAllowedSendersInRange:test_GetAllowedSendersInRange_RevertIfAllowedSendersIsEmpty() (gas: 13158901) -FunctionsTermsOfServiceAllowList_GetAllowedSendersInRange:test_GetAllowedSendersInRange_RevertIfEndIsAfterLastAllowedSender() (gas: 16571) -FunctionsTermsOfServiceAllowList_GetAllowedSendersInRange:test_GetAllowedSendersInRange_RevertIfStartIsAfterEnd() (gas: 13301) -FunctionsTermsOfServiceAllowList_GetAllowedSendersInRange:test_GetAllowedSendersInRange_Success() (gas: 20448) +FunctionsTermsOfServiceAllowList_GetAllowedSendersInRange:test_GetAllowedSendersInRange_RevertIfAllowedSendersIsEmpty() (gas: 13160699) +FunctionsTermsOfServiceAllowList_GetAllowedSendersInRange:test_GetAllowedSendersInRange_RevertIfEndIsAfterLastAllowedSender() (gas: 16554) +FunctionsTermsOfServiceAllowList_GetAllowedSendersInRange:test_GetAllowedSendersInRange_RevertIfStartIsAfterEnd() (gas: 13284) +FunctionsTermsOfServiceAllowList_GetAllowedSendersInRange:test_GetAllowedSendersInRange_Success() (gas: 20268) FunctionsTermsOfServiceAllowList_GetBlockedSendersCount:test_GetBlockedSendersCount_Success() (gas: 12931) -FunctionsTermsOfServiceAllowList_GetBlockedSendersInRange:test_GetBlockedSendersInRange_RevertIfAllowedSendersIsEmpty() (gas: 13158905) +FunctionsTermsOfServiceAllowList_GetBlockedSendersInRange:test_GetBlockedSendersInRange_RevertIfAllowedSendersIsEmpty() (gas: 13160720) FunctionsTermsOfServiceAllowList_GetBlockedSendersInRange:test_GetBlockedSendersInRange_RevertIfEndIsAfterLastAllowedSender() (gas: 16549) FunctionsTermsOfServiceAllowList_GetBlockedSendersInRange:test_GetBlockedSendersInRange_RevertIfStartIsAfterEnd() (gas: 13367) FunctionsTermsOfServiceAllowList_GetBlockedSendersInRange:test_GetBlockedSendersInRange_Success() (gas: 18493) diff --git a/contracts/package.json b/contracts/package.json index 20717c036bc..8b1b4381118 100644 --- a/contracts/package.json +++ b/contracts/package.json @@ -87,6 +87,9 @@ "@eth-optimism/contracts": "0.6.0", "@scroll-tech/contracts": "0.1.0", "@openzeppelin/contracts": "4.9.3", - "@openzeppelin/contracts-upgradeable": "4.9.3" + "@openzeppelin/contracts-upgradeable": "4.9.3", + "@changesets/changelog-github": "^0.4.8", + "@changesets/cli": "~2.26.2", + "semver": "^7.5.4" } } diff --git a/contracts/pnpm-lock.yaml b/contracts/pnpm-lock.yaml index e272d62ab4a..ea7e2922b06 100644 --- a/contracts/pnpm-lock.yaml +++ b/contracts/pnpm-lock.yaml @@ -8,6 +8,12 @@ overrides: '@ethersproject/logger': 5.0.6 dependencies: + '@changesets/changelog-github': + specifier: ^0.4.8 + version: 0.4.8 + '@changesets/cli': + specifier: ~2.26.2 + version: 2.26.2 '@eth-optimism/contracts': specifier: 0.6.0 version: 0.6.0(ethers@5.7.2) @@ -20,6 +26,9 @@ dependencies: '@scroll-tech/contracts': specifier: 0.1.0 version: 0.1.0 + semver: + specifier: ^7.5.4 + version: 7.5.4 devDependencies: '@ethereum-waffle/mock-contract': @@ -215,12 +224,10 @@ packages: engines: {node: '>=6.9.0'} dependencies: '@babel/highlight': 7.18.6 - dev: true /@babel/helper-validator-identifier@7.19.1: resolution: {integrity: sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==} engines: {node: '>=6.9.0'} - dev: true /@babel/highlight@7.18.6: resolution: {integrity: sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==} @@ -229,7 +236,6 @@ packages: '@babel/helper-validator-identifier': 7.19.1 chalk: 2.4.2 js-tokens: 4.0.0 - dev: true /@babel/runtime@7.19.0: resolution: {integrity: sha512-eR8Lo9hnDS7tqkO7NsV+mKvCmv5boaXFSZ70DnfhcgiEne8hv9oCEd36Klw74EtizEqLsy4YnW8UWwpBVolHZA==} @@ -238,6 +244,13 @@ packages: regenerator-runtime: 0.13.9 dev: true + /@babel/runtime@7.24.0: + resolution: {integrity: sha512-Chk32uHMg6TnQdvw2e9IlqPpFX/6NLuK0Ys2PqLb7/gL5uFn9mXvK715FGLlOLQrcO4qIkNHkvPGktzzXexsFw==} + engines: {node: '>=6.9.0'} + dependencies: + regenerator-runtime: 0.14.1 + dev: false + /@chainsafe/as-sha256@0.3.1: resolution: {integrity: sha512-hldFFYuf49ed7DAakWVXSJODuq3pzJEguD8tQ7h+sGkM18vja+OFoJI9krnGmgzyuZC2ETX0NOIcCTy31v2Mtg==} dev: true @@ -269,6 +282,209 @@ packages: case: 1.6.3 dev: true + /@changesets/apply-release-plan@6.1.4: + resolution: {integrity: sha512-FMpKF1fRlJyCZVYHr3CbinpZZ+6MwvOtWUuO8uo+svcATEoc1zRDcj23pAurJ2TZ/uVz1wFHH6K3NlACy0PLew==} + dependencies: + '@babel/runtime': 7.24.0 + '@changesets/config': 2.3.1 + '@changesets/get-version-range-type': 0.3.2 + '@changesets/git': 2.0.0 + '@changesets/types': 5.2.1 + '@manypkg/get-packages': 1.1.3 + detect-indent: 6.1.0 + fs-extra: 7.0.1 + lodash.startcase: 4.4.0 + outdent: 0.5.0 + prettier: 2.8.8 + resolve-from: 5.0.0 + semver: 7.5.4 + dev: false + + /@changesets/assemble-release-plan@5.2.4: + resolution: {integrity: sha512-xJkWX+1/CUaOUWTguXEbCDTyWJFECEhmdtbkjhn5GVBGxdP/JwaHBIU9sW3FR6gD07UwZ7ovpiPclQZs+j+mvg==} + dependencies: + '@babel/runtime': 7.24.0 + '@changesets/errors': 0.1.4 + '@changesets/get-dependents-graph': 1.3.6 + '@changesets/types': 5.2.1 + '@manypkg/get-packages': 1.1.3 + semver: 7.5.4 + dev: false + + /@changesets/changelog-git@0.1.14: + resolution: {integrity: sha512-+vRfnKtXVWsDDxGctOfzJsPhaCdXRYoe+KyWYoq5X/GqoISREiat0l3L8B0a453B2B4dfHGcZaGyowHbp9BSaA==} + dependencies: + '@changesets/types': 5.2.1 + dev: false + + /@changesets/changelog-github@0.4.8: + resolution: {integrity: sha512-jR1DHibkMAb5v/8ym77E4AMNWZKB5NPzw5a5Wtqm1JepAuIF+hrKp2u04NKM14oBZhHglkCfrla9uq8ORnK/dw==} + dependencies: + '@changesets/get-github-info': 0.5.2 + '@changesets/types': 5.2.1 + dotenv: 8.6.0 + transitivePeerDependencies: + - encoding + dev: false + + /@changesets/cli@2.26.2: + resolution: {integrity: sha512-dnWrJTmRR8bCHikJHl9b9HW3gXACCehz4OasrXpMp7sx97ECuBGGNjJhjPhdZNCvMy9mn4BWdplI323IbqsRig==} + hasBin: true + dependencies: + '@babel/runtime': 7.24.0 + '@changesets/apply-release-plan': 6.1.4 + '@changesets/assemble-release-plan': 5.2.4 + '@changesets/changelog-git': 0.1.14 + '@changesets/config': 2.3.1 + '@changesets/errors': 0.1.4 + '@changesets/get-dependents-graph': 1.3.6 + '@changesets/get-release-plan': 3.0.17 + '@changesets/git': 2.0.0 + '@changesets/logger': 0.0.5 + '@changesets/pre': 1.0.14 + '@changesets/read': 0.5.9 + '@changesets/types': 5.2.1 + '@changesets/write': 0.2.3 + '@manypkg/get-packages': 1.1.3 + '@types/is-ci': 3.0.4 + '@types/semver': 7.5.0 + ansi-colors: 4.1.3 + chalk: 2.4.2 + enquirer: 2.3.6 + external-editor: 3.1.0 + fs-extra: 7.0.1 + human-id: 1.0.2 + is-ci: 3.0.1 + meow: 6.1.1 + outdent: 0.5.0 + p-limit: 2.3.0 + preferred-pm: 3.1.3 + resolve-from: 5.0.0 + semver: 7.5.4 + spawndamnit: 2.0.0 + term-size: 2.2.1 + tty-table: 4.2.3 + dev: false + + /@changesets/config@2.3.1: + resolution: {integrity: sha512-PQXaJl82CfIXddUOppj4zWu+987GCw2M+eQcOepxN5s+kvnsZOwjEJO3DH9eVy+OP6Pg/KFEWdsECFEYTtbg6w==} + dependencies: + '@changesets/errors': 0.1.4 + '@changesets/get-dependents-graph': 1.3.6 + '@changesets/logger': 0.0.5 + '@changesets/types': 5.2.1 + '@manypkg/get-packages': 1.1.3 + fs-extra: 7.0.1 + micromatch: 4.0.5 + dev: false + + /@changesets/errors@0.1.4: + resolution: {integrity: sha512-HAcqPF7snsUJ/QzkWoKfRfXushHTu+K5KZLJWPb34s4eCZShIf8BFO3fwq6KU8+G7L5KdtN2BzQAXOSXEyiY9Q==} + dependencies: + extendable-error: 0.1.7 + dev: false + + /@changesets/get-dependents-graph@1.3.6: + resolution: {integrity: sha512-Q/sLgBANmkvUm09GgRsAvEtY3p1/5OCzgBE5vX3vgb5CvW0j7CEljocx5oPXeQSNph6FXulJlXV3Re/v3K3P3Q==} + dependencies: + '@changesets/types': 5.2.1 + '@manypkg/get-packages': 1.1.3 + chalk: 2.4.2 + fs-extra: 7.0.1 + semver: 7.5.4 + dev: false + + /@changesets/get-github-info@0.5.2: + resolution: {integrity: sha512-JppheLu7S114aEs157fOZDjFqUDpm7eHdq5E8SSR0gUBTEK0cNSHsrSR5a66xs0z3RWuo46QvA3vawp8BxDHvg==} + dependencies: + dataloader: 1.4.0 + node-fetch: 2.6.7 + transitivePeerDependencies: + - encoding + dev: false + + /@changesets/get-release-plan@3.0.17: + resolution: {integrity: sha512-6IwKTubNEgoOZwDontYc2x2cWXfr6IKxP3IhKeK+WjyD6y3M4Gl/jdQvBw+m/5zWILSOCAaGLu2ZF6Q+WiPniw==} + dependencies: + '@babel/runtime': 7.24.0 + '@changesets/assemble-release-plan': 5.2.4 + '@changesets/config': 2.3.1 + '@changesets/pre': 1.0.14 + '@changesets/read': 0.5.9 + '@changesets/types': 5.2.1 + '@manypkg/get-packages': 1.1.3 + dev: false + + /@changesets/get-version-range-type@0.3.2: + resolution: {integrity: sha512-SVqwYs5pULYjYT4op21F2pVbcrca4qA/bAA3FmFXKMN7Y+HcO8sbZUTx3TAy2VXulP2FACd1aC7f2nTuqSPbqg==} + dev: false + + /@changesets/git@2.0.0: + resolution: {integrity: sha512-enUVEWbiqUTxqSnmesyJGWfzd51PY4H7mH9yUw0hPVpZBJ6tQZFMU3F3mT/t9OJ/GjyiM4770i+sehAn6ymx6A==} + dependencies: + '@babel/runtime': 7.24.0 + '@changesets/errors': 0.1.4 + '@changesets/types': 5.2.1 + '@manypkg/get-packages': 1.1.3 + is-subdir: 1.2.0 + micromatch: 4.0.5 + spawndamnit: 2.0.0 + dev: false + + /@changesets/logger@0.0.5: + resolution: {integrity: sha512-gJyZHomu8nASHpaANzc6bkQMO9gU/ib20lqew1rVx753FOxffnCrJlGIeQVxNWCqM+o6OOleCo/ivL8UAO5iFw==} + dependencies: + chalk: 2.4.2 + dev: false + + /@changesets/parse@0.3.16: + resolution: {integrity: sha512-127JKNd167ayAuBjUggZBkmDS5fIKsthnr9jr6bdnuUljroiERW7FBTDNnNVyJ4l69PzR57pk6mXQdtJyBCJKg==} + dependencies: + '@changesets/types': 5.2.1 + js-yaml: 3.14.1 + dev: false + + /@changesets/pre@1.0.14: + resolution: {integrity: sha512-dTsHmxQWEQekHYHbg+M1mDVYFvegDh9j/kySNuDKdylwfMEevTeDouR7IfHNyVodxZXu17sXoJuf2D0vi55FHQ==} + dependencies: + '@babel/runtime': 7.24.0 + '@changesets/errors': 0.1.4 + '@changesets/types': 5.2.1 + '@manypkg/get-packages': 1.1.3 + fs-extra: 7.0.1 + dev: false + + /@changesets/read@0.5.9: + resolution: {integrity: sha512-T8BJ6JS6j1gfO1HFq50kU3qawYxa4NTbI/ASNVVCBTsKquy2HYwM9r7ZnzkiMe8IEObAJtUVGSrePCOxAK2haQ==} + dependencies: + '@babel/runtime': 7.24.0 + '@changesets/git': 2.0.0 + '@changesets/logger': 0.0.5 + '@changesets/parse': 0.3.16 + '@changesets/types': 5.2.1 + chalk: 2.4.2 + fs-extra: 7.0.1 + p-filter: 2.1.0 + dev: false + + /@changesets/types@4.1.0: + resolution: {integrity: sha512-LDQvVDv5Kb50ny2s25Fhm3d9QSZimsoUGBsUioj6MC3qbMUCuC8GPIvk/M6IvXx3lYhAs0lwWUQLb+VIEUCECw==} + dev: false + + /@changesets/types@5.2.1: + resolution: {integrity: sha512-myLfHbVOqaq9UtUKqR/nZA/OY7xFjQMdfgfqeZIBK4d0hA6pgxArvdv8M+6NUzzBsjWLOtvApv8YHr4qM+Kpfg==} + dev: false + + /@changesets/write@0.2.3: + resolution: {integrity: sha512-Dbamr7AIMvslKnNYsLFafaVORx4H0pvCA2MHqgtNCySMe1blImEyAEOzDmcgKAkgz4+uwoLz7demIrX+JBr/Xw==} + dependencies: + '@babel/runtime': 7.24.0 + '@changesets/types': 5.2.1 + fs-extra: 7.0.1 + human-id: 1.0.2 + prettier: 2.8.8 + dev: false + /@colors/colors@1.5.0: resolution: {integrity: sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==} engines: {node: '>=0.1.90'} @@ -828,6 +1044,26 @@ packages: '@jridgewell/sourcemap-codec': 1.4.15 dev: true + /@manypkg/find-root@1.1.0: + resolution: {integrity: sha512-mki5uBvhHzO8kYYix/WRy2WX8S3B5wdVSc9D6KcU5lQNglP2yt58/VfLuAK49glRXChosY8ap2oJ1qgma3GUVA==} + dependencies: + '@babel/runtime': 7.24.0 + '@types/node': 12.19.16 + find-up: 4.1.0 + fs-extra: 8.1.0 + dev: false + + /@manypkg/get-packages@1.1.3: + resolution: {integrity: sha512-fo+QhuU3qE/2TQMQmbVMqaQ6EWbMhi4ABWP+O4AM1NqPBuy0OrApV5LO6BrrgnhtAHS2NH6RrVk9OL181tTi8A==} + dependencies: + '@babel/runtime': 7.24.0 + '@changesets/types': 4.1.0 + '@manypkg/find-root': 1.1.0 + fs-extra: 8.1.0 + globby: 11.1.0 + read-yaml-file: 1.1.0 + dev: false + /@metamask/eth-sig-util@4.0.1: resolution: {integrity: sha512-tghyZKLHZjcdlDqCA3gNZmLeR0XvOE9U1qoQO9ohyAZT6Pya+H9vkBPcsyXytmYLNgVoin7CKCmweo/R43V+tQ==} engines: {node: '>=12.0.0'} @@ -853,12 +1089,10 @@ packages: dependencies: '@nodelib/fs.stat': 2.0.5 run-parallel: 1.1.9 - dev: true /@nodelib/fs.stat@2.0.5: resolution: {integrity: sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==} engines: {node: '>= 8'} - dev: true /@nodelib/fs.walk@1.2.8: resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} @@ -866,7 +1100,6 @@ packages: dependencies: '@nodelib/fs.scandir': 2.1.5 fastq: 1.6.0 - dev: true /@nomicfoundation/ethereumjs-block@5.0.2: resolution: {integrity: sha512-hSe6CuHI4SsSiWWjHDIzWhSiAVpzMUcDRpWYzN0T9l8/Rz7xNn3elwVOJ/tAyS0LqL6vitUD78Uk7lQDXZun7Q==} @@ -1466,6 +1699,7 @@ packages: /@sindresorhus/is@0.14.0: resolution: {integrity: sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==} engines: {node: '>=6'} + requiresBuild: true dev: true /@sindresorhus/is@4.6.0: @@ -1505,6 +1739,7 @@ packages: /@szmarczak/http-timer@1.1.2: resolution: {integrity: sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==} engines: {node: '>=6'} + requiresBuild: true dependencies: defer-to-connect: 1.1.1 dev: true @@ -1760,6 +1995,12 @@ packages: resolution: {integrity: sha512-SZs7ekbP8CN0txVG2xVRH6EgKmEm31BOxA07vkFaETzZz1xh+cbt8BcI0slpymvwhx5dlFnQG2rTlPVQn+iRPQ==} dev: true + /@types/is-ci@3.0.4: + resolution: {integrity: sha512-AkCYCmwlXeuH89DagDCzvCAyltI2v9lh3U3DqSg/GrBYoReAaWwxfXCqMx9UV5MajLZ4ZFwZzV4cABGIxk2XRw==} + dependencies: + ci-info: 3.9.0 + dev: false + /@types/json-schema@7.0.13: resolution: {integrity: sha512-RbSSoHliUbnXj3ny0CNFOoxrIDV6SUGyStHsvDqosw6CkdPV8TtWGlfecuK4ToyMEAql6pzNxgCFKanovUzlgQ==} dev: true @@ -1778,6 +2019,10 @@ packages: resolution: {integrity: sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==} dev: true + /@types/minimist@1.2.5: + resolution: {integrity: sha512-hov8bUuiLiyFPGyFPE1lwWhmzYbirOXQNNo40+y3zow8aFVTeyn3VWL0VFFfdNddA8S4Vf0Tc062rzyNr7Paag==} + dev: false + /@types/mkdirp@0.5.2: resolution: {integrity: sha512-U5icWpv7YnZYGsN4/cmh3WD2onMY0aJIiTE6+51TwJCttdHvtCYmkBNOobHlXwrJRL0nkH9jH4kD+1FAdMN4Tg==} dependencies: @@ -1805,7 +2050,6 @@ packages: /@types/node@12.19.16: resolution: {integrity: sha512-7xHmXm/QJ7cbK2laF+YYD7gb5MggHIIQwqyjin3bpEGiSuvScMQ5JZZXPvRipi1MwckTQbJZROMns/JxdnIL1Q==} - dev: true /@types/node@16.18.80: resolution: {integrity: sha512-vFxJ1Iyl7A0+xB0uW1r1v504yItKZLdqg/VZELUZ4H02U0bXAgBisSQ8Erf0DMruNFz9ggoiEv6T8Ll9bTg8Jw==} @@ -1815,6 +2059,10 @@ packages: resolution: {integrity: sha512-tktOkFUA4kXx2hhhrB8bIFb5TbwzS4uOhKEmwiD+NoiL0qtP2OQ9mFldbgD4dV1djrlBYP6eBuQZiWjuHUpqFw==} dev: true + /@types/normalize-package-data@2.4.4: + resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} + dev: false + /@types/pbkdf2@3.1.0: resolution: {integrity: sha512-Cf63Rv7jCQ0LaL8tNXmEyqTHuIJxRdlS5vMh1mj5voN4+QFhVZnlZruezqpWYDiJ8UTzhP0VmeLXCmBk66YrMQ==} dependencies: @@ -1856,7 +2104,6 @@ packages: /@types/semver@7.5.0: resolution: {integrity: sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw==} - dev: true /@types/sinon-chai@3.2.8: resolution: {integrity: sha512-d4ImIQbT/rKMG8+AXpmcan5T2/PNeSjrYhvkwet6z0p8kzYtfgA32xzOBlbU0yqJfq+/0Ml805iFoODO0LP5/g==} @@ -2032,7 +2279,7 @@ packages: ajv: 6.12.6 better-ajv-errors: 0.8.2(ajv@6.12.6) neodoc: 2.0.2 - semver: 7.3.7 + semver: 7.5.4 source-map-support: 0.5.21 optionalDependencies: prettier: 2.8.8 @@ -2087,6 +2334,7 @@ packages: /accepts@1.3.7: resolution: {integrity: sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==} engines: {node: '>= 0.6'} + requiresBuild: true dependencies: mime-types: 2.1.27 negotiator: 0.6.2 @@ -2202,7 +2450,6 @@ packages: /ansi-colors@4.1.3: resolution: {integrity: sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==} engines: {node: '>=6'} - dev: true /ansi-escapes@4.3.2: resolution: {integrity: sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==} @@ -2229,7 +2476,6 @@ packages: /ansi-regex@5.0.1: resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} engines: {node: '>=8'} - dev: true /ansi-styles@2.2.1: resolution: {integrity: sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA==} @@ -2241,14 +2487,12 @@ packages: engines: {node: '>=4'} dependencies: color-convert: 1.9.3 - dev: true /ansi-styles@4.3.0: resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} engines: {node: '>=8'} dependencies: color-convert: 2.0.1 - dev: true /antlr4@4.13.0: resolution: {integrity: sha512-zooUbt+UscjnWyOrsuY/tVFL4rwrAGwOivpQmvmUDE22hy/lUA467Rc1rcixyRwcRUIXFYBwv7+dClDSHdmmew==} @@ -2275,7 +2519,6 @@ packages: resolution: {integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==} dependencies: sprintf-js: 1.0.3 - dev: true /argparse@2.0.1: resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} @@ -2325,16 +2568,15 @@ packages: dependencies: call-bind: 1.0.5 is-array-buffer: 3.0.2 - dev: true /array-flatten@1.1.1: resolution: {integrity: sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==} + requiresBuild: true dev: true /array-union@2.1.0: resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==} engines: {node: '>=8'} - dev: true /array-uniq@1.0.3: resolution: {integrity: sha512-MNha4BWQ6JbwhFhj03YK552f7cb3AzoE8SzeljgChvL1dl3IcvggXVz1DilzySZkCja+CXuZbdW7yATchWn8/Q==} @@ -2357,13 +2599,23 @@ packages: get-intrinsic: 1.2.2 dev: true + /array.prototype.flat@1.3.2: + resolution: {integrity: sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.5 + define-properties: 1.2.1 + es-abstract: 1.22.3 + es-shim-unscopables: 1.0.2 + dev: false + /array.prototype.reduce@1.0.4: resolution: {integrity: sha512-WnM+AjG/DvLRLo4DDl+r+SvCzYtD2Jd9oeBYMcEaI7t3fFrHY9M53/wdLcTvmZNQ70IU6Htj0emFkZ5TS+lrdw==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.2 - define-properties: 1.1.4 - es-abstract: 1.20.3 + call-bind: 1.0.5 + define-properties: 1.2.1 + es-abstract: 1.22.3 es-array-method-boxes-properly: 1.0.0 is-string: 1.0.7 dev: true @@ -2379,7 +2631,11 @@ packages: get-intrinsic: 1.2.2 is-array-buffer: 3.0.2 is-shared-array-buffer: 1.0.2 - dev: true + + /arrify@1.0.1: + resolution: {integrity: sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==} + engines: {node: '>=0.10.0'} + dev: false /asap@2.0.6: resolution: {integrity: sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==} @@ -2387,6 +2643,7 @@ packages: /asn1.js@4.10.1: resolution: {integrity: sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==} + requiresBuild: true dependencies: bn.js: 4.12.0 inherits: 2.0.4 @@ -2471,7 +2728,6 @@ packages: /available-typed-arrays@1.0.5: resolution: {integrity: sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==} engines: {node: '>= 0.4'} - dev: true /aws-sign2@0.7.0: resolution: {integrity: sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==} @@ -3075,6 +3331,13 @@ packages: leven: 3.1.0 dev: true + /better-path-resolve@1.0.0: + resolution: {integrity: sha512-pbnl5XzGBdrFU/wT4jqmJVPn2B6UHPBOhzMQkY/SPUPB6QtUXtmBHBIwCbXJol93mOpGMnQyP/+BB19q04xj7g==} + engines: {node: '>=4'} + dependencies: + is-windows: 1.0.2 + dev: false + /big-integer@1.6.36: resolution: {integrity: sha512-t70bfa7HYEA1D9idDbmuv7YbsbVkQ+Hp+8KFSul4aE5e/i1bjCNIRYJZlA8Q8p0r9T8cF/RVvwUgRA//FydEyg==} engines: {node: '>=0.6'} @@ -3152,6 +3415,7 @@ packages: /body-parser@1.19.0: resolution: {integrity: sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==} engines: {node: '>= 0.8'} + requiresBuild: true dependencies: bytes: 3.1.0 content-type: 1.0.4 @@ -3207,7 +3471,12 @@ packages: engines: {node: '>=8'} dependencies: fill-range: 7.0.1 - dev: true + + /breakword@1.0.6: + resolution: {integrity: sha512-yjxDAYyK/pBvws9H4xKYpLDpYKEH6CzrBPAuXq3x18I+c/2MkVtT3qAr7Oloi6Dss9qNhPVueAAVU1CSeNDIXw==} + dependencies: + wcwidth: 1.0.1 + dev: false /brorand@1.1.0: resolution: {integrity: sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==} @@ -3238,6 +3507,7 @@ packages: /browserify-cipher@1.0.1: resolution: {integrity: sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==} + requiresBuild: true dependencies: browserify-aes: 1.2.0 browserify-des: 1.0.2 @@ -3246,6 +3516,7 @@ packages: /browserify-des@1.0.2: resolution: {integrity: sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==} + requiresBuild: true dependencies: cipher-base: 1.0.4 des.js: 1.0.1 @@ -3255,6 +3526,7 @@ packages: /browserify-rsa@4.0.1: resolution: {integrity: sha512-+YpEyaLDDvvdzIxQ+cCx73r5YEhS3ANGOkiHdyWqW4t3gdeoNEYjSiQwntbU4Uo2/9yRkpYX3SRFeH+7jc2Duw==} + requiresBuild: true dependencies: bn.js: 4.12.0 randombytes: 2.1.0 @@ -3269,6 +3541,7 @@ packages: /browserify-sign@4.0.4: resolution: {integrity: sha512-D2ItxCwNtLcHRrOCuEDZQlIezlFyUV/N5IYz6TY1svu1noyThFuthoEjzT8ChZe3UEctqnwmykcPhet3Eiz58A==} + requiresBuild: true dependencies: bn.js: 4.12.0 browserify-rsa: 4.0.1 @@ -3307,6 +3580,7 @@ packages: /buffer-to-arraybuffer@0.0.5: resolution: {integrity: sha512-3dthu5CYiVB1DEJp61FtApNnNndTckcqe4pFcLdvHtrpG+kcyekCJKg4MRiDcFW7A6AODnXB9U4dwQiCW5kzJQ==} + requiresBuild: true dev: true /buffer-xor@1.0.3: @@ -3364,6 +3638,7 @@ packages: /bytes@3.1.0: resolution: {integrity: sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==} engines: {node: '>= 0.8'} + requiresBuild: true dev: true /bytes@3.1.2: @@ -3407,6 +3682,7 @@ packages: /cacheable-request@6.1.0: resolution: {integrity: sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg==} engines: {node: '>=8'} + requiresBuild: true dependencies: clone-response: 1.0.2 get-stream: 5.1.0 @@ -3442,7 +3718,6 @@ packages: dependencies: function-bind: 1.1.1 get-intrinsic: 1.1.3 - dev: true /call-bind@1.0.5: resolution: {integrity: sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==} @@ -3450,7 +3725,6 @@ packages: function-bind: 1.1.2 get-intrinsic: 1.2.2 set-function-length: 1.1.1 - dev: true /callsites@3.1.0: resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} @@ -3464,6 +3738,15 @@ packages: upper-case: 1.1.3 dev: true + /camelcase-keys@6.2.2: + resolution: {integrity: sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg==} + engines: {node: '>=8'} + dependencies: + camelcase: 5.3.1 + map-obj: 4.3.0 + quick-lru: 4.0.1 + dev: false + /camelcase@3.0.0: resolution: {integrity: sha512-4nhGqUkc4BqbBBB4Q6zLuD7lzzrHYrjKGeYaEji/3tFR5VdJu9v+LilhGIVe8wxEJPPOeWo7eg8dwY13TZ1BNg==} engines: {node: '>=0.10.0'} @@ -3477,7 +3760,6 @@ packages: /camelcase@5.3.1: resolution: {integrity: sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==} engines: {node: '>=6'} - dev: true /camelcase@6.3.0: resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==} @@ -3564,7 +3846,6 @@ packages: ansi-styles: 3.2.1 escape-string-regexp: 1.0.5 supports-color: 5.5.0 - dev: true /chalk@4.1.2: resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} @@ -3572,7 +3853,6 @@ packages: dependencies: ansi-styles: 4.3.0 supports-color: 7.2.0 - dev: true /change-case@3.0.2: resolution: {integrity: sha512-Mww+SLF6MZ0U6kdg11algyKd5BARbyM4TbFBepwowYSR5ClfQGCGtxNXgykpN0uF/bstWeaGDT4JWaDh8zWAHA==} @@ -3597,6 +3877,10 @@ packages: upper-case-first: 1.1.2 dev: true + /chardet@0.7.0: + resolution: {integrity: sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==} + dev: false + /charenc@0.0.2: resolution: {integrity: sha512-yrLQ/yVUFXkzg7EDQsPieE/53+0RlaWTs+wBrvW36cyilJ2SaDWfl4Yj7MtLTXleV9uEKefbAGUPv2/iWSooRA==} dev: true @@ -3668,16 +3952,23 @@ packages: /chownr@1.1.4: resolution: {integrity: sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==} + requiresBuild: true dev: true /ci-info@2.0.0: resolution: {integrity: sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==} dev: true + /ci-info@3.9.0: + resolution: {integrity: sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==} + engines: {node: '>=8'} + dev: false + /cids@0.7.5: resolution: {integrity: sha512-zT7mPeghoWAu+ppn8+BS1tQ5qGmbMfB4AregnQjA/qHY3GC1m1ptI9GkWNlgeu38r7CuRdXB47uY2XgAYt6QVA==} engines: {node: '>=4.0.0', npm: '>=3.0.0'} deprecated: This module has been superseded by the multiformats module + requiresBuild: true dependencies: buffer: 5.7.1 class-is: 1.1.0 @@ -3695,6 +3986,7 @@ packages: /class-is@1.1.0: resolution: {integrity: sha512-rhjH9AG1fvabIDoGRVH587413LPjTZgmDF9fOFCbFJQV4yuocX1mHxxvXI4g3cGwbVY9wAYIoKlg1N79frJKQw==} + requiresBuild: true dev: true /class-utils@0.3.6: @@ -3759,6 +4051,14 @@ packages: wrap-ansi: 5.1.0 dev: true + /cliui@6.0.0: + resolution: {integrity: sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==} + dependencies: + string-width: 4.2.3 + strip-ansi: 6.0.1 + wrap-ansi: 6.2.0 + dev: false + /cliui@7.0.4: resolution: {integrity: sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==} dependencies: @@ -3767,12 +4067,26 @@ packages: wrap-ansi: 7.0.0 dev: true + /cliui@8.0.1: + resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} + engines: {node: '>=12'} + dependencies: + string-width: 4.2.3 + strip-ansi: 6.0.1 + wrap-ansi: 7.0.0 + dev: false + /clone-response@1.0.2: resolution: {integrity: sha512-yjLXh88P599UOyPTFX0POsd7WxnbsVsGohcwzHOLspIhhpalPw1BcqED8NblyZLKcGrL8dTgMlcaZxV2jAD41Q==} dependencies: mimic-response: 1.0.1 dev: true + /clone@1.0.4: + resolution: {integrity: sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==} + engines: {node: '>=0.8'} + dev: false + /clone@2.1.2: resolution: {integrity: sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w==} engines: {node: '>=0.8'} @@ -3800,22 +4114,18 @@ packages: resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} dependencies: color-name: 1.1.3 - dev: true /color-convert@2.0.1: resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} engines: {node: '>=7.0.0'} dependencies: color-name: 1.1.4 - dev: true /color-name@1.1.3: resolution: {integrity: sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==} - dev: true /color-name@1.1.4: resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} - dev: true /colors@1.4.0: resolution: {integrity: sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==} @@ -3910,6 +4220,7 @@ packages: /content-disposition@0.5.3: resolution: {integrity: sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==} engines: {node: '>= 0.6'} + requiresBuild: true dependencies: safe-buffer: 5.1.2 dev: true @@ -3925,6 +4236,7 @@ packages: /content-type@1.0.4: resolution: {integrity: sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==} engines: {node: '>= 0.6'} + requiresBuild: true dev: true /convert-source-map@1.8.0: @@ -3935,11 +4247,13 @@ packages: /cookie-signature@1.0.6: resolution: {integrity: sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==} + requiresBuild: true dev: true /cookie@0.4.0: resolution: {integrity: sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==} engines: {node: '>= 0.6'} + requiresBuild: true dev: true /cookie@0.4.2: @@ -3949,6 +4263,7 @@ packages: /cookiejar@2.1.2: resolution: {integrity: sha512-Mw+adcfzPxcPeI+0WlvRrr/3lGVO0bD75SxX6811cxSh1Wbxx7xZBGK1eVtDf6si8rg2lhnUjsVLMFMfbRIuwA==} + requiresBuild: true dev: true /copy-descriptor@0.1.1: @@ -3983,6 +4298,7 @@ packages: /cors@2.8.5: resolution: {integrity: sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==} engines: {node: '>= 0.10'} + requiresBuild: true dependencies: object-assign: 4.1.1 vary: 1.1.2 @@ -4006,6 +4322,7 @@ packages: /create-ecdh@4.0.3: resolution: {integrity: sha512-GbEHQPMOswGpKXM9kCWVrremUcBmjteUaQ01T9rkKCPDXfUHX0IoP9LpHYo2NPFampa4e+/pFDc3jQdxrxQLaw==} + requiresBuild: true dependencies: bn.js: 4.12.0 elliptic: 6.5.4 @@ -4053,6 +4370,14 @@ packages: - encoding dev: true + /cross-spawn@5.1.0: + resolution: {integrity: sha512-pTgQJ5KC0d2hcY8eyL1IzlBPYjTkyH72XRZPnLyKus2mBfNjQs3klqbJU2VILqZryAZUt9JOb3h/mWMy23/f5A==} + dependencies: + lru-cache: 4.1.5 + shebang-command: 1.2.0 + which: 1.3.1 + dev: false + /cross-spawn@6.0.5: resolution: {integrity: sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==} engines: {node: '>=4.8'} @@ -4120,6 +4445,28 @@ packages: engines: {node: '>= 6'} dev: true + /csv-generate@3.4.3: + resolution: {integrity: sha512-w/T+rqR0vwvHqWs/1ZyMDWtHHSJaN06klRqJXBEpDJaM/+dZkso0OKh1VcuuYvK3XM53KysVNq8Ko/epCK8wOw==} + dev: false + + /csv-parse@4.16.3: + resolution: {integrity: sha512-cO1I/zmz4w2dcKHVvpCr7JVRu8/FymG5OEpmvsZYlccYolPBLoVGKUHgNoc4ZGkFeFlWGEDmMyBM+TTqRdW/wg==} + dev: false + + /csv-stringify@5.6.5: + resolution: {integrity: sha512-PjiQ659aQ+fUTQqSrd1XEDnOr52jh30RBurfzkscaE2tPaFsDH5wOAHJiw8XAHphRknCwMUE9KRayc4K/NbO8A==} + dev: false + + /csv@5.5.3: + resolution: {integrity: sha512-QTaY0XjjhTQOdguARF0lGKm5/mEq9PD9/VhZZegHDIBq2tQwgNpHc3dneD4mGo2iJs+fTKv5Bp0fZ+BRuY3Z0g==} + engines: {node: '>= 0.1.90'} + dependencies: + csv-generate: 3.4.3 + csv-parse: 4.16.3 + csv-stringify: 5.6.5 + stream-transform: 2.1.3 + dev: false + /d@1.0.1: resolution: {integrity: sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==} dependencies: @@ -4134,6 +4481,10 @@ packages: assert-plus: 1.0.0 dev: true + /dataloader@1.4.0: + resolution: {integrity: sha512-68s5jYdlvasItOJnCuI2Q9s4q98g0pCyL3HrcKJu8KNugUl8ahgmZYg38ysLTgQjjXX3H8CJLkAvWrclWfcalw==} + dev: false + /death@1.1.0: resolution: {integrity: sha512-vsV6S4KVHvTGxbEcij7hkWRv0It+sGGWVOM67dQde/o5Xjnr+KmLjxWJii2uEObIrt1CcM9w0Yaovx+iOlIL+w==} dev: true @@ -4186,10 +4537,17 @@ packages: supports-color: 8.1.1 dev: true + /decamelize-keys@1.1.1: + resolution: {integrity: sha512-WiPxgEirIV0/eIOMcnFBA3/IJZAZqKnwAwWyvvdi4lsr1WCN22nhdf/3db3DoZcUjTV2SqfzIwNyp6y2xs3nmg==} + engines: {node: '>=0.10.0'} + dependencies: + decamelize: 1.2.0 + map-obj: 1.0.1 + dev: false + /decamelize@1.2.0: resolution: {integrity: sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==} engines: {node: '>=0.10.0'} - dev: true /decamelize@4.0.0: resolution: {integrity: sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==} @@ -4204,6 +4562,7 @@ packages: /decompress-response@3.3.0: resolution: {integrity: sha512-BzRPQuY1ip+qDonAOz42gRm/pg9F768C+npV/4JOsxRC2sq+Rlk+Q4ZCAsOhnIaMrgarILY+RMUIvMmmX1qAEA==} engines: {node: '>=4'} + requiresBuild: true dependencies: mimic-response: 1.0.1 dev: true @@ -4248,8 +4607,15 @@ packages: resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} dev: true + /defaults@1.0.4: + resolution: {integrity: sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==} + dependencies: + clone: 1.0.4 + dev: false + /defer-to-connect@1.1.1: resolution: {integrity: sha512-J7thop4u3mRTkYRQ+Vpfwy2G5Ehoy82I14+14W4YMDLKdWloI9gSzRbV30s/NckQGVJtPkWNcW4oMAUigTdqiQ==} + requiresBuild: true dev: true /defer-to-connect@2.0.1: @@ -4278,7 +4644,6 @@ packages: get-intrinsic: 1.2.2 gopd: 1.0.1 has-property-descriptors: 1.0.0 - dev: true /define-properties@1.1.4: resolution: {integrity: sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA==} @@ -4286,7 +4651,6 @@ packages: dependencies: has-property-descriptors: 1.0.0 object-keys: 1.1.1 - dev: true /define-properties@1.2.1: resolution: {integrity: sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==} @@ -4295,7 +4659,6 @@ packages: define-data-property: 1.1.1 has-property-descriptors: 1.0.0 object-keys: 1.1.1 - dev: true /define-property@0.2.5: resolution: {integrity: sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==} @@ -4342,6 +4705,7 @@ packages: /depd@1.1.2: resolution: {integrity: sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==} engines: {node: '>= 0.6'} + requiresBuild: true dev: true /depd@2.0.0: @@ -4351,6 +4715,7 @@ packages: /des.js@1.0.1: resolution: {integrity: sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA==} + requiresBuild: true dependencies: inherits: 2.0.4 minimalistic-assert: 1.0.1 @@ -4358,6 +4723,7 @@ packages: /destroy@1.0.4: resolution: {integrity: sha512-3NdhDuEXnfun/z7x9GOElY49LoqVHoGScmOKwmxhsS8N5Y+Z8KyPPDnaSzqWgYt/ji4mqwfTS34Htrk0zPIXVg==} + requiresBuild: true dev: true /detect-indent@4.0.0: @@ -4372,6 +4738,11 @@ packages: engines: {node: '>=4'} dev: true + /detect-indent@6.1.0: + resolution: {integrity: sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==} + engines: {node: '>=8'} + dev: false + /detect-port@1.3.0: resolution: {integrity: sha512-E+B1gzkl2gqxt1IhUzwjrxBKRqx1UzC3WLONHinn8S3T6lwV/agVCyitiFOsGJ/eYuEUBvD71MZHy3Pv1G9doQ==} engines: {node: '>= 4.2.1'} @@ -4400,6 +4771,7 @@ packages: /diffie-hellman@5.0.3: resolution: {integrity: sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==} + requiresBuild: true dependencies: bn.js: 4.12.0 miller-rabin: 4.0.1 @@ -4417,7 +4789,6 @@ packages: engines: {node: '>=8'} dependencies: path-type: 4.0.0 - dev: true /doctrine@3.0.0: resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} @@ -4463,6 +4834,11 @@ packages: no-case: 2.3.2 dev: true + /dotenv@8.6.0: + resolution: {integrity: sha512-IrPdXQsk2BbzvCBGBOTmmSH5SodmqZNt4ERAZDmW4CT+tL8VtvinqywuANaFu4bOMWki16nqf0e4oC0QIaDr/g==} + engines: {node: '>=10'} + dev: false + /dotignore@0.1.2: resolution: {integrity: sha512-UGGGWfSauusaVJC+8fgV+NVvBXkCTmVv7sk6nojDZZvuOUNGUy0Zk4UpHQD6EDjS0jpBwcACvH4eofvyzBcRDw==} hasBin: true @@ -4481,6 +4857,7 @@ packages: /duplexer3@0.1.4: resolution: {integrity: sha512-CEj8FwwNA4cVH2uFCoHUrmojhYh1vmCdOaneKJXwkeY1i9jnlslVo9dx+hQ5Hl9GnH/Bwy/IjxAyOePyPKYnzA==} + requiresBuild: true dev: true /ecc-jsbn@0.1.2: @@ -4492,6 +4869,7 @@ packages: /ee-first@1.1.1: resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==} + requiresBuild: true dev: true /electron-to-chromium@1.4.270: @@ -4515,11 +4893,11 @@ packages: /emoji-regex@8.0.0: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} - dev: true /encodeurl@1.0.2: resolution: {integrity: sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==} engines: {node: '>= 0.8'} + requiresBuild: true dev: true /encoding-down@5.0.4: @@ -4550,7 +4928,6 @@ packages: engines: {node: '>=8.6'} dependencies: ansi-colors: 4.1.3 - dev: true /entities@4.4.0: resolution: {integrity: sha512-oYp7156SP8LkeGD0GF85ad1X9Ai79WtRsZ2gxJqtBuzH+98YUV6jkHEKlZkMbcrjJjIVJNIDP/3WL9wQkoPbWA==} @@ -4573,40 +4950,9 @@ packages: resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==} dependencies: is-arrayish: 0.2.1 - dev: true - /es-abstract@1.20.3: - resolution: {integrity: sha512-AyrnaKVpMzljIdwjzrj+LxGmj8ik2LckwXacHqrJJ/jxz6dDDBcZ7I7nlHM0FvEW8MfbWJwOd+yT2XzYW49Frw==} - engines: {node: '>= 0.4'} - dependencies: - call-bind: 1.0.2 - es-to-primitive: 1.2.1 - function-bind: 1.1.1 - function.prototype.name: 1.1.5 - get-intrinsic: 1.1.3 - get-symbol-description: 1.0.0 - has: 1.0.3 - has-property-descriptors: 1.0.0 - has-symbols: 1.0.3 - internal-slot: 1.0.3 - is-callable: 1.2.7 - is-negative-zero: 2.0.2 - is-regex: 1.1.4 - is-shared-array-buffer: 1.0.2 - is-string: 1.0.7 - is-weakref: 1.0.2 - object-inspect: 1.12.2 - object-keys: 1.1.1 - object.assign: 4.1.4 - regexp.prototype.flags: 1.4.3 - safe-regex-test: 1.0.0 - string.prototype.trimend: 1.0.5 - string.prototype.trimstart: 1.0.5 - unbox-primitive: 1.0.2 - dev: true - - /es-abstract@1.22.3: - resolution: {integrity: sha512-eiiY8HQeYfYH2Con2berK+To6GrK2RxbPawDkGq4UiCQQfZHb6wX9qQqkbpPqaxQFcl8d9QzZqo0tGE0VcrdwA==} + /es-abstract@1.22.3: + resolution: {integrity: sha512-eiiY8HQeYfYH2Con2berK+To6GrK2RxbPawDkGq4UiCQQfZHb6wX9qQqkbpPqaxQFcl8d9QzZqo0tGE0VcrdwA==} engines: {node: '>= 0.4'} dependencies: array-buffer-byte-length: 1.0.0 @@ -4648,7 +4994,6 @@ packages: typed-array-length: 1.0.4 unbox-primitive: 1.0.2 which-typed-array: 1.1.13 - dev: true /es-array-method-boxes-properly@1.0.0: resolution: {integrity: sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA==} @@ -4661,13 +5006,11 @@ packages: get-intrinsic: 1.2.2 has-tostringtag: 1.0.0 hasown: 2.0.0 - dev: true /es-shim-unscopables@1.0.2: resolution: {integrity: sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw==} dependencies: hasown: 2.0.0 - dev: true /es-to-primitive@1.2.1: resolution: {integrity: sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==} @@ -4676,7 +5019,6 @@ packages: is-callable: 1.2.7 is-date-object: 1.0.2 is-symbol: 1.0.3 - dev: true /es5-ext@0.10.62: resolution: {integrity: sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA==} @@ -4710,16 +5052,15 @@ packages: /escalade@3.1.1: resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==} engines: {node: '>=6'} - dev: true /escape-html@1.0.3: resolution: {integrity: sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==} + requiresBuild: true dev: true /escape-string-regexp@1.0.5: resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==} engines: {node: '>=0.8.0'} - dev: true /escape-string-regexp@4.0.0: resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} @@ -4848,7 +5189,6 @@ packages: resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} engines: {node: '>=4'} hasBin: true - dev: true /esquery@1.5.0: resolution: {integrity: sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==} @@ -4882,6 +5222,7 @@ packages: /etag@1.8.1: resolution: {integrity: sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==} engines: {node: '>= 0.6'} + requiresBuild: true dev: true /eth-block-tracker@3.0.1: @@ -4965,6 +5306,7 @@ packages: /eth-lib@0.1.29: resolution: {integrity: sha512-bfttrr3/7gG4E02HoWTDUcDDslN003OlOoBxk9virpAZQ1ja/jDgwkWB8QfJF7ojuEowrqy+lzp9VcJG7/k5bQ==} + requiresBuild: true dependencies: bn.js: 4.12.0 elliptic: 6.5.4 @@ -5363,7 +5705,6 @@ packages: is-hex-prefixed: 1.0.0 strip-hex-prefix: 1.0.0 dev: true - bundledDependencies: false /eventemitter3@4.0.4: resolution: {integrity: sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ==} @@ -5399,6 +5740,7 @@ packages: /express@4.17.1: resolution: {integrity: sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==} engines: {node: '>= 0.10.0'} + requiresBuild: true dependencies: accepts: 1.3.7 array-flatten: 1.1.1 @@ -5459,6 +5801,19 @@ packages: resolution: {integrity: sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==} dev: true + /extendable-error@0.1.7: + resolution: {integrity: sha512-UOiS2in6/Q0FK0R0q6UY9vYpQ21mr/Qn1KOnte7vsACuNJf514WvCCUHSRCPcgjPT2bAhNIJdlE6bVap1GKmeg==} + dev: false + + /external-editor@3.1.0: + resolution: {integrity: sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==} + engines: {node: '>=4'} + dependencies: + chardet: 0.7.0 + iconv-lite: 0.4.24 + tmp: 0.0.33 + dev: false + /extglob@2.0.4: resolution: {integrity: sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==} engines: {node: '>=0.10.0'} @@ -5519,7 +5874,6 @@ packages: glob-parent: 5.1.2 merge2: 1.4.1 micromatch: 4.0.5 - dev: true /fast-json-stable-stringify@2.1.0: resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} @@ -5533,7 +5887,6 @@ packages: resolution: {integrity: sha512-jmxqQ3Z/nXoeyDmWAzF9kH1aGZSis6e/SbfPmJpUnyZ0ogr6iscHQaml4wsEepEWSdtmpy+eVXmCRIMpxaXqOA==} dependencies: reusify: 1.0.4 - dev: true /fetch-ponyfill@4.1.0: resolution: {integrity: sha512-knK9sGskIg2T7OnYLdZ2hZXn0CtDrAIBxYQLpmEf0BqfdWnwmM1weccUl5+4EdA44tzNSFAuxITPbXtPehUB3g==} @@ -5567,11 +5920,11 @@ packages: engines: {node: '>=8'} dependencies: to-regex-range: 5.0.1 - dev: true /finalhandler@1.1.2: resolution: {integrity: sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==} engines: {node: '>= 0.8'} + requiresBuild: true dependencies: debug: 2.6.9 encodeurl: 1.0.2 @@ -5627,7 +5980,6 @@ packages: dependencies: locate-path: 5.0.0 path-exists: 4.0.0 - dev: true /find-up@5.0.0: resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} @@ -5635,7 +5987,13 @@ packages: dependencies: locate-path: 6.0.0 path-exists: 4.0.0 - dev: true + + /find-yarn-workspace-root2@1.2.16: + resolution: {integrity: sha512-hr6hb1w8ePMpPVUK39S4RlwJzi+xPLuVuG8XlwXU3KD5Yn3qgBWVfy3AzNlDhWvE1EORCE65/Qm26rFQt3VLVA==} + dependencies: + micromatch: 4.0.5 + pkg-dir: 4.2.0 + dev: false /find-yarn-workspace-root@1.2.1: resolution: {integrity: sha512-dVtfb0WuQG+8Ag2uWkbG79hOUzEsRrhBzgfn86g2sJPkzmcpGdghbNTfUKGTxymFrY/tLIodDzLoW9nOJ4FY8Q==} @@ -5696,7 +6054,6 @@ packages: resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==} dependencies: is-callable: 1.2.7 - dev: true /for-in@1.0.2: resolution: {integrity: sha512-7EwmXrOjyL+ChxMhmG5lnW9MPt1aIeZEwKhQzoBUdTV0N3zuwWDZYVJatDvZ2OyzPUvdIAZDsCetk3coyMfcnQ==} @@ -5745,6 +6102,7 @@ packages: /forwarded@0.1.2: resolution: {integrity: sha512-Ua9xNhH0b8pwE3yRbFfXJvfdWF0UHNCdeyb2sbi9Ul/M+r3PTdrz7Cv4SCfZRMjmzEM9PhraqfZFbGTIg3OMyA==} engines: {node: '>= 0.6'} + requiresBuild: true dev: true /fp-ts@1.19.3: @@ -5761,6 +6119,7 @@ packages: /fresh@0.5.2: resolution: {integrity: sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==} engines: {node: '>= 0.6'} + requiresBuild: true dev: true /fs-extra@0.30.0: @@ -5788,7 +6147,6 @@ packages: graceful-fs: 4.2.10 jsonfile: 4.0.0 universalify: 0.1.2 - dev: true /fs-extra@8.1.0: resolution: {integrity: sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==} @@ -5797,7 +6155,6 @@ packages: graceful-fs: 4.2.10 jsonfile: 4.0.0 universalify: 0.1.2 - dev: true /fs-extra@9.1.0: resolution: {integrity: sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==} @@ -5811,6 +6168,7 @@ packages: /fs-minipass@1.2.7: resolution: {integrity: sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA==} + requiresBuild: true dependencies: minipass: 2.9.0 dev: true @@ -5842,21 +6200,9 @@ packages: /function-bind@1.1.1: resolution: {integrity: sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==} - dev: true /function-bind@1.1.2: resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} - dev: true - - /function.prototype.name@1.1.5: - resolution: {integrity: sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==} - engines: {node: '>= 0.4'} - dependencies: - call-bind: 1.0.2 - define-properties: 1.1.4 - es-abstract: 1.20.3 - functions-have-names: 1.2.3 - dev: true /function.prototype.name@1.1.6: resolution: {integrity: sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==} @@ -5866,7 +6212,6 @@ packages: define-properties: 1.2.1 es-abstract: 1.22.3 functions-have-names: 1.2.3 - dev: true /functional-red-black-tree@1.0.1: resolution: {integrity: sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==} @@ -5874,7 +6219,6 @@ packages: /functions-have-names@1.2.3: resolution: {integrity: sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==} - dev: true /ganache-core@2.13.2: resolution: {integrity: sha512-tIF5cR+ANQz0+3pHWxHjIwHqFXcVo0Mb+kcsNhglNFALcYo49aQpnS9dqHartqPfMFjiHh/qFoD3mYK0d/qGgw==} @@ -5927,7 +6271,6 @@ packages: /get-caller-file@2.0.5: resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} engines: {node: 6.* || 8.* || >= 10.*} - dev: true /get-func-name@2.0.2: resolution: {integrity: sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==} @@ -5938,7 +6281,6 @@ packages: function-bind: 1.1.1 has: 1.0.3 has-symbols: 1.0.3 - dev: true /get-intrinsic@1.2.2: resolution: {integrity: sha512-0gSo4ml/0j98Y3lngkFEot/zhiCeWsbYIlZ+uZOVgzLyLaUw7wxUL+nCTP0XJvJg1AXulJRI3UJi8GsbDuxdGA==} @@ -5947,7 +6289,6 @@ packages: has-proto: 1.0.1 has-symbols: 1.0.3 hasown: 2.0.0 - dev: true /get-port@3.2.0: resolution: {integrity: sha512-x5UJKlgeUiNT8nyo/AcnwLnZuZNcSjSw0kogRB+Whd1fjjFq4B1hySFxSFWWSn4mIBzg3sRNUDFYc4g5gjPoLg==} @@ -5957,11 +6298,13 @@ packages: /get-stream@3.0.0: resolution: {integrity: sha512-GlhdIUuVakc8SJ6kK0zAFbiGzRFzNnY4jUuEbV9UROo4Y+0Ny4fjvcZFVTeDA4odpFyOQzaw6hXukJSq/f28sQ==} engines: {node: '>=4'} + requiresBuild: true dev: true /get-stream@4.1.0: resolution: {integrity: sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==} engines: {node: '>=6'} + requiresBuild: true dependencies: pump: 3.0.0 dev: true @@ -5984,7 +6327,6 @@ packages: dependencies: call-bind: 1.0.2 get-intrinsic: 1.1.3 - dev: true /get-value@2.0.6: resolution: {integrity: sha512-Ln0UQDlxH1BapMu3GPtf7CuYNwRZf2gwCuPqbyG6pB8WfmFpzqcy4xtAaAMUhnNqjMKTiCPZG2oMT3YSx8U2NA==} @@ -6010,7 +6352,6 @@ packages: engines: {node: '>= 6'} dependencies: is-glob: 4.0.3 - dev: true /glob-parent@6.0.2: resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==} @@ -6124,7 +6465,6 @@ packages: engines: {node: '>= 0.4'} dependencies: define-properties: 1.2.1 - dev: true /globby@10.0.2: resolution: {integrity: sha512-7dUi7RvCoT/xast/o/dLN53oqND4yk0nsHkhRgn9w65C4PofCLOoJ39iSOg+qVDdWQPIEj+eszMHQ+aLVwwQSg==} @@ -6150,13 +6490,11 @@ packages: ignore: 5.2.4 merge2: 1.4.1 slash: 3.0.0 - dev: true /gopd@1.0.1: resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==} dependencies: get-intrinsic: 1.2.2 - dev: true /got@12.1.0: resolution: {integrity: sha512-hBv2ty9QN2RdbJJMK3hesmSkFTjVIHyIDDbssCKnSmq62edGgImJWD10Eb1k77TiV1bxloxqcFAVK8+9pkhOig==} @@ -6180,6 +6518,7 @@ packages: /got@7.1.0: resolution: {integrity: sha512-Y5WMo7xKKq1muPsxD+KmrR8DH5auG7fBdDVueZwETwV6VytKyU9OX/ddpq2/1hp1vIPvVb4T81dKQz3BivkNLw==} engines: {node: '>=4'} + requiresBuild: true dependencies: '@types/keyv': 3.1.4 '@types/responselike': 1.0.0 @@ -6220,11 +6559,9 @@ packages: /graceful-fs@4.2.10: resolution: {integrity: sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==} - dev: true /grapheme-splitter@1.0.4: resolution: {integrity: sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==} - dev: true /graphemer@1.4.0: resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} @@ -6262,6 +6599,11 @@ packages: har-schema: 2.0.0 dev: true + /hard-rejection@2.1.0: + resolution: {integrity: sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA==} + engines: {node: '>=6'} + dev: false + /hardhat-abi-exporter@2.10.1(hardhat@2.19.2): resolution: {integrity: sha512-X8GRxUTtebMAd2k4fcPyVnCdPa6dYK4lBsrwzKP5yiSq4i+WadWPIumaLfce53TUf/o2TnLpLOduyO1ylE2NHQ==} engines: {node: '>=14.14.0'} @@ -6382,7 +6724,6 @@ packages: /has-bigints@1.0.2: resolution: {integrity: sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==} - dev: true /has-flag@1.0.0: resolution: {integrity: sha512-DyYHfIYwAJmjAjSSPKANxI8bFY9YtFrgkAfinBojQ8YJTOuOuav64tMUJv584SES4xl74PmuaevIyaLESHdTAA==} @@ -6392,35 +6733,32 @@ packages: /has-flag@3.0.0: resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==} engines: {node: '>=4'} - dev: true /has-flag@4.0.0: resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} engines: {node: '>=8'} - dev: true /has-property-descriptors@1.0.0: resolution: {integrity: sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==} dependencies: get-intrinsic: 1.1.3 - dev: true /has-proto@1.0.1: resolution: {integrity: sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==} engines: {node: '>= 0.4'} - dev: true /has-symbol-support-x@1.4.2: resolution: {integrity: sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw==} + requiresBuild: true dev: true /has-symbols@1.0.3: resolution: {integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==} engines: {node: '>= 0.4'} - dev: true /has-to-string-tag-x@1.4.1: resolution: {integrity: sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw==} + requiresBuild: true dependencies: has-symbol-support-x: 1.4.2 dev: true @@ -6430,7 +6768,6 @@ packages: engines: {node: '>= 0.4'} dependencies: has-symbols: 1.0.3 - dev: true /has-value@0.3.1: resolution: {integrity: sha512-gpG936j8/MzaeID5Yif+577c17TxaDmhuyVgSwtnL/q8UUTySg8Mecb+8Cf1otgLoD7DDH75axp86ER7LFsf3Q==} @@ -6468,7 +6805,6 @@ packages: engines: {node: '>= 0.4.0'} dependencies: function-bind: 1.1.1 - dev: true /hash-base@3.1.0: resolution: {integrity: sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==} @@ -6497,7 +6833,6 @@ packages: engines: {node: '>= 0.4'} dependencies: function-bind: 1.1.2 - dev: true /he@1.2.0: resolution: {integrity: sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==} @@ -6540,7 +6875,6 @@ packages: /hosted-git-info@2.8.9: resolution: {integrity: sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==} - dev: true /htmlparser2@8.0.1: resolution: {integrity: sha512-4lVbmc1diZC7GUJQtRQ5yBAeUCL1exyMwmForWkRLnwyzWBFxN633SALPMGYaWZvKe9j1pRZJpauvmxENSp/EA==} @@ -6568,6 +6902,7 @@ packages: /http-errors@1.7.2: resolution: {integrity: sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==} engines: {node: '>= 0.6'} + requiresBuild: true dependencies: depd: 1.1.2 inherits: 2.0.3 @@ -6579,6 +6914,7 @@ packages: /http-errors@1.7.3: resolution: {integrity: sha512-ZTTX0MWrsQ2ZAhA1cejAwDLycFsd7I7nVtnkT3Ol0aqodaKW+0CTZDQ1uBv5whptCnc8e8HeRRJxRs0kmm/Qfw==} engines: {node: '>= 0.6'} + requiresBuild: true dependencies: depd: 1.1.2 inherits: 2.0.4 @@ -6635,12 +6971,15 @@ packages: - supports-color dev: true + /human-id@1.0.2: + resolution: {integrity: sha512-UNopramDEhHJD+VR+ehk8rOslwSfByxPIZyJRfV739NDhN5LF1fa1MqnzKm2lGTQRjNrjK19Q5fhkgIfjlVUKw==} + dev: false + /iconv-lite@0.4.24: resolution: {integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==} engines: {node: '>=0.10.0'} dependencies: safer-buffer: 2.1.2 - dev: true /iconv-lite@0.6.3: resolution: {integrity: sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==} @@ -6663,7 +7002,6 @@ packages: /ignore@5.2.4: resolution: {integrity: sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==} engines: {node: '>= 4'} - dev: true /immediate@3.2.3: resolution: {integrity: sha512-RrGCXRm/fRVqMIhqXrGEX9rRADavPiDFSoMb/k64i9XMk8uH4r/Omi5Ctierj6XzNecwDbO4WuFbDD1zmpl3Tg==} @@ -6693,7 +7031,6 @@ packages: /indent-string@4.0.0: resolution: {integrity: sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==} engines: {node: '>=8'} - dev: true /inflight@1.0.6: resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} @@ -6704,6 +7041,7 @@ packages: /inherits@2.0.3: resolution: {integrity: sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==} + requiresBuild: true dev: true /inherits@2.0.4: @@ -6713,15 +7051,6 @@ packages: resolution: {integrity: sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==} dev: true - /internal-slot@1.0.3: - resolution: {integrity: sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA==} - engines: {node: '>= 0.4'} - dependencies: - get-intrinsic: 1.1.3 - has: 1.0.3 - side-channel: 1.0.4 - dev: true - /internal-slot@1.0.6: resolution: {integrity: sha512-Xj6dv+PsbtwyPpEflsejS+oIZxmMlV44zAhG479uYu89MsjcYOhCFnNyKrkJrihbsiasQyY0afoCl/9BLR65bg==} engines: {node: '>= 0.4'} @@ -6729,7 +7058,6 @@ packages: get-intrinsic: 1.2.2 hasown: 2.0.0 side-channel: 1.0.4 - dev: true /interpret@1.2.0: resolution: {integrity: sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw==} @@ -6756,6 +7084,7 @@ packages: /ipaddr.js@1.9.0: resolution: {integrity: sha512-M4Sjn6N/+O6/IXSJseKqHoFc+5FdGJ22sXqnjTpdZweHK64MzEPAyQZyEU3R/KRv2GLoa7nNtg/C2Ev6m7z+eA==} engines: {node: '>= 0.10'} + requiresBuild: true dev: true /is-accessor-descriptor@0.1.6: @@ -6783,17 +7112,14 @@ packages: call-bind: 1.0.5 get-intrinsic: 1.2.2 is-typed-array: 1.1.12 - dev: true /is-arrayish@0.2.1: resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==} - dev: true /is-bigint@1.0.4: resolution: {integrity: sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==} dependencies: has-bigints: 1.0.2 - dev: true /is-binary-path@2.1.0: resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} @@ -6808,7 +7134,6 @@ packages: dependencies: call-bind: 1.0.2 has-tostringtag: 1.0.0 - dev: true /is-buffer@1.1.6: resolution: {integrity: sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==} @@ -6822,7 +7147,6 @@ packages: /is-callable@1.2.7: resolution: {integrity: sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==} engines: {node: '>= 0.4'} - dev: true /is-ci@2.0.0: resolution: {integrity: sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==} @@ -6831,11 +7155,17 @@ packages: ci-info: 2.0.0 dev: true + /is-ci@3.0.1: + resolution: {integrity: sha512-ZYvCgrefwqoQ6yTyYUbQu64HsITZ3NfKX1lzaEYdkTDcfKzzCI/wthRRYKkdjHKFVgNiXKAKm65Zo1pk2as/QQ==} + hasBin: true + dependencies: + ci-info: 3.9.0 + dev: false + /is-core-module@2.10.0: resolution: {integrity: sha512-Erxj2n/LDAZ7H8WNJXd9tw38GYM3dv8rk8Zcs+jJuxYTW7sozH+SS8NtrSjVL1/vpLvWi1hxy96IzjJ3EHTJJg==} dependencies: has: 1.0.3 - dev: true /is-data-descriptor@0.1.4: resolution: {integrity: sha512-+w9D5ulSoBNlmw9OHn3U2v51SyoCd0he+bB3xMl62oijhrspxowjU+AIcDY0N3iEJbUEkB15IlMASQsxYigvXg==} @@ -6854,7 +7184,6 @@ packages: /is-date-object@1.0.2: resolution: {integrity: sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==} engines: {node: '>= 0.4'} - dev: true /is-descriptor@0.1.6: resolution: {integrity: sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==} @@ -6895,7 +7224,6 @@ packages: /is-extglob@2.1.1: resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} engines: {node: '>=0.10.0'} - dev: true /is-finite@1.1.0: resolution: {integrity: sha512-cdyMtqX/BOqqNBBiKlIVkytNHm49MtMlYyn1zxzvJKWmFMlGzm+ry5BBfYyeY9YmNKbRSo/o7OX9w9ale0wg3w==} @@ -6922,7 +7250,6 @@ packages: /is-fullwidth-code-point@3.0.0: resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} engines: {node: '>=8'} - dev: true /is-function@1.0.1: resolution: {integrity: sha512-coTeFCk0VaNTNO/FwMMaI30KOPOIkLp1q5M7dIVDn4Zop70KyGFZqXSgKClBisjrD3S2cVIuD7MD793/lyLGZQ==} @@ -6938,7 +7265,6 @@ packages: engines: {node: '>=0.10.0'} dependencies: is-extglob: 2.1.1 - dev: true /is-hex-prefixed@1.0.0: resolution: {integrity: sha512-WvtOiug1VFrE9v1Cydwm+FnXd3+w9GaeVUss5W4v/SLy3UW00vP+6iNF2SdnfiBoLy4bTqVdkftNGTUeOFVsbA==} @@ -6954,14 +7280,12 @@ packages: /is-negative-zero@2.0.2: resolution: {integrity: sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==} engines: {node: '>= 0.4'} - dev: true /is-number-object@1.0.7: resolution: {integrity: sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==} engines: {node: '>= 0.4'} dependencies: has-tostringtag: 1.0.0 - dev: true /is-number@3.0.0: resolution: {integrity: sha512-4cboCqIpliH+mAvFNegjZQ4kgKc3ZUhQVr3HvWbSh5q3WH2v82ct+T2Y1hdU5Gdtorx/cLifQjqCbL7bpznLTg==} @@ -6973,10 +7297,10 @@ packages: /is-number@7.0.0: resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} engines: {node: '>=0.12.0'} - dev: true /is-object@1.0.1: resolution: {integrity: sha512-+XzmTRB/JXoIdK20Ge8K8PRsP5UlthLaVhIRxzIwQ73jRgER8iRw98DilvERx/tSjOHLy9JM4sKUfLRMB5ui0Q==} + requiresBuild: true dev: true /is-path-inside@3.0.3: @@ -6987,7 +7311,6 @@ packages: /is-plain-obj@1.1.0: resolution: {integrity: sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==} engines: {node: '>=0.10.0'} - dev: true /is-plain-obj@2.1.0: resolution: {integrity: sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==} @@ -7007,18 +7330,17 @@ packages: dependencies: call-bind: 1.0.2 has-tostringtag: 1.0.0 - dev: true /is-retry-allowed@1.2.0: resolution: {integrity: sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg==} engines: {node: '>=0.10.0'} + requiresBuild: true dev: true /is-shared-array-buffer@1.0.2: resolution: {integrity: sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==} dependencies: call-bind: 1.0.2 - dev: true /is-stream@1.1.0: resolution: {integrity: sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ==} @@ -7030,21 +7352,25 @@ packages: engines: {node: '>= 0.4'} dependencies: has-tostringtag: 1.0.0 - dev: true + + /is-subdir@1.2.0: + resolution: {integrity: sha512-2AT6j+gXe/1ueqbW6fLZJiIw3F8iXGJtt0yDrZaBhAZEG1raiTxKWU+IPqMCzQAXOUCKdA4UDMgacKH25XG2Cw==} + engines: {node: '>=4'} + dependencies: + better-path-resolve: 1.0.0 + dev: false /is-symbol@1.0.3: resolution: {integrity: sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==} engines: {node: '>= 0.4'} dependencies: has-symbols: 1.0.3 - dev: true /is-typed-array@1.1.12: resolution: {integrity: sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg==} engines: {node: '>= 0.4'} dependencies: which-typed-array: 1.1.13 - dev: true /is-typed-array@1.1.5: resolution: {integrity: sha512-S+GRDgJlR3PyEbsX/Fobd9cqpZBuvUS+8asRqYDMLCb2qMzt1oz5m5oxQCxOgUDxiWsOVNi4yaF+/uvdlHlYug==} @@ -7084,12 +7410,10 @@ packages: resolution: {integrity: sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==} dependencies: call-bind: 1.0.2 - dev: true /is-windows@1.0.2: resolution: {integrity: sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==} engines: {node: '>=0.10.0'} - dev: true /is-wsl@2.2.0: resolution: {integrity: sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==} @@ -7108,11 +7432,9 @@ packages: /isarray@2.0.5: resolution: {integrity: sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==} - dev: true /isexe@2.0.0: resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} - dev: true /isobject@2.1.0: resolution: {integrity: sha512-+OUdGJlgjOBZDfxnDjYYG6zp487z0JGNQq3cYQYg5f5hKR+syHMsaztzGeml/4kGG55CSpKSpWTY+jYGgsHLgA==} @@ -7166,6 +7488,7 @@ packages: /isurl@1.0.0: resolution: {integrity: sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w==} engines: {node: '>= 4'} + requiresBuild: true dependencies: has-to-string-tag-x: 1.4.1 is-object: 1.0.1 @@ -7200,7 +7523,6 @@ packages: /js-tokens@4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} - dev: true /js-yaml@3.13.1: resolution: {integrity: sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==} @@ -7216,7 +7538,6 @@ packages: dependencies: argparse: 1.0.10 esprima: 4.0.1 - dev: true /js-yaml@4.1.0: resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} @@ -7241,6 +7562,7 @@ packages: /json-buffer@3.0.0: resolution: {integrity: sha512-CuUqjv0FUZIdXkHPI8MezCnFCdaTAacej1TZYulLoAg1h/PhwkdXFN4V/gzY4g+fMBCOV2xF+rp7t2XD2ns/NQ==} + requiresBuild: true dev: true /json-buffer@3.0.1: @@ -7249,7 +7571,6 @@ packages: /json-parse-even-better-errors@2.3.1: resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==} - dev: true /json-rpc-engine@3.8.0: resolution: {integrity: sha512-6QNcvm2gFuuK4TKU1uwfH0Qd/cOSb9c1lls0gbnIhciktIUQJwz6NQNAW4B1KiGPenv7IKu97V222Yo1bNhGuA==} @@ -7323,7 +7644,6 @@ packages: resolution: {integrity: sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==} optionalDependencies: graceful-fs: 4.2.10 - dev: true /jsonfile@6.1.0: resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==} @@ -7375,6 +7695,7 @@ packages: /keyv@3.1.0: resolution: {integrity: sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA==} + requiresBuild: true dependencies: json-buffer: 3.0.0 dev: true @@ -7407,7 +7728,6 @@ packages: /kind-of@6.0.3: resolution: {integrity: sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==} engines: {node: '>=0.10.0'} - dev: true /klaw-sync@6.0.0: resolution: {integrity: sha512-nIeuVSzdCCs6TDPTqI8w1Yre34sSq7AkZ4B3sfOBbI2CgVSB4Du4aLQijFU2+lhAFCwt9+42Hel6lQNIv6AntQ==} @@ -7421,6 +7741,11 @@ packages: graceful-fs: 4.2.10 dev: true + /kleur@4.1.5: + resolution: {integrity: sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==} + engines: {node: '>=6'} + dev: false + /latest-version@7.0.0: resolution: {integrity: sha512-KvNT4XqAMzdcL6ka6Tl3i2lYeFDgXNCuIX+xNx6ZMVR1dFq+idXd9FLKNMOIx0t9mJ9/HudyX4oZWXZQ0UJHeg==} engines: {node: '>=14.16'} @@ -7605,7 +7930,6 @@ packages: /lines-and-columns@1.2.4: resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} - dev: true /load-json-file@1.1.0: resolution: {integrity: sha512-cy7ZdNRXdablkXYNI049pthVeXFurRyb9+hA/dZzerZ0pGTx42z+y+ssxBaVV2l70t1muq5IdKhn4UtcoGUY9A==} @@ -7618,6 +7942,16 @@ packages: strip-bom: 2.0.0 dev: true + /load-yaml-file@0.2.0: + resolution: {integrity: sha512-OfCBkGEw4nN6JLtgRidPX6QxjBQGQf72q3si2uvqyFEMbycSFFHwAZeXx6cJgFM9wmLrf9zBwCP3Ivqa+LLZPw==} + engines: {node: '>=6'} + dependencies: + graceful-fs: 4.2.10 + js-yaml: 3.14.1 + pify: 4.0.1 + strip-bom: 3.0.0 + dev: false + /locate-path@2.0.0: resolution: {integrity: sha512-NCI2kiDkyR7VeEKm27Kda/iQHyKJe1Bu0FlTbYp3CqJu+9IFe9bLyAjMxf5ZDDbEg+iMPzB5zYyUTSm8wVTKmA==} engines: {node: '>=4'} @@ -7639,14 +7973,12 @@ packages: engines: {node: '>=8'} dependencies: p-locate: 4.1.0 - dev: true /locate-path@6.0.0: resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} engines: {node: '>=10'} dependencies: p-locate: 5.0.0 - dev: true /lodash.assign@4.2.0: resolution: {integrity: sha512-hFuH8TY+Yji7Eja3mGiuAxBqLagejScbG8GbG0j6o9vzn0YL14My+ktnqtZgFTosKymC9/44wP6s7xyuLfnClw==} @@ -7668,6 +8000,10 @@ packages: resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} dev: true + /lodash.startcase@4.4.0: + resolution: {integrity: sha512-+WKqsK294HMSc2jEbNgpHpd0JfIBhp7rEV4aqXWqFr6AlXov+SlcgB1Fv01y2kGe3Gc8nMW7VA0SrGuSkRfIEg==} + dev: false + /lodash.truncate@4.4.2: resolution: {integrity: sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw==} dev: true @@ -7728,6 +8064,7 @@ packages: /lowercase-keys@1.0.1: resolution: {integrity: sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==} engines: {node: '>=0.10.0'} + requiresBuild: true dev: true /lowercase-keys@2.0.0: @@ -7746,6 +8083,13 @@ packages: pseudomap: 1.0.2 dev: true + /lru-cache@4.1.5: + resolution: {integrity: sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==} + dependencies: + pseudomap: 1.0.2 + yallist: 2.1.2 + dev: false + /lru-cache@5.1.1: resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} dependencies: @@ -7757,7 +8101,6 @@ packages: engines: {node: '>=10'} dependencies: yallist: 4.0.0 - dev: true /lru_map@0.3.3: resolution: {integrity: sha512-Pn9cox5CsMYngeDbmChANltQl+5pi6XmTrraMSzhPmMBbmgcxmqWry0U3PGapCU1yB4/LqCcom7qhHZiF/jGfQ==} @@ -7780,6 +8123,16 @@ packages: engines: {node: '>=0.10.0'} dev: true + /map-obj@1.0.1: + resolution: {integrity: sha512-7N/q3lyZ+LVCp7PzuxrJr4KMbBE2hW7BT7YNia330OFxIf4d3r5zVpicP2650l7CPN6RM9zOJRl3NGpqSiw3Eg==} + engines: {node: '>=0.10.0'} + dev: false + + /map-obj@4.3.0: + resolution: {integrity: sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ==} + engines: {node: '>=8'} + dev: false + /map-visit@1.0.0: resolution: {integrity: sha512-4y7uGv8bd2WdM9vpQsiQNo41Ln1NvhvDRuVt0k2JZQ+ezN2uaQes7lZeZ+QQUHOLQAtDaBJ+7wCbi+ab/KFs+w==} engines: {node: '>=0.10.0'} @@ -7807,6 +8160,7 @@ packages: /media-typer@0.3.0: resolution: {integrity: sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==} engines: {node: '>= 0.6'} + requiresBuild: true dev: true /memdown@1.4.1: @@ -7846,14 +8200,31 @@ packages: engines: {node: '>= 0.10.0'} dev: true + /meow@6.1.1: + resolution: {integrity: sha512-3YffViIt2QWgTy6Pale5QpopX/IvU3LPL03jOTqp6pGj3VjesdO/U8CuHMKpnQr4shCNCM5fd5XFFvIIl6JBHg==} + engines: {node: '>=8'} + dependencies: + '@types/minimist': 1.2.5 + camelcase-keys: 6.2.2 + decamelize-keys: 1.1.1 + hard-rejection: 2.1.0 + minimist-options: 4.1.0 + normalize-package-data: 2.5.0 + read-pkg-up: 7.0.1 + redent: 3.0.0 + trim-newlines: 3.0.1 + type-fest: 0.13.1 + yargs-parser: 18.1.3 + dev: false + /merge-descriptors@1.0.1: resolution: {integrity: sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==} + requiresBuild: true dev: true /merge2@1.4.1: resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} engines: {node: '>= 8'} - dev: true /merkle-patricia-tree@2.3.2: resolution: {integrity: sha512-81PW5m8oz/pz3GvsAwbauj7Y00rqm81Tzad77tHBwU7pIAtN+TJnMSOJhxBKflSVYhptMMb9RskhqHqrSm1V+g==} @@ -7883,6 +8254,7 @@ packages: /methods@1.1.2: resolution: {integrity: sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==} engines: {node: '>= 0.6'} + requiresBuild: true dev: true /micromatch@3.1.10: @@ -7912,7 +8284,6 @@ packages: dependencies: braces: 3.0.2 picomatch: 2.3.1 - dev: true /miller-rabin@4.0.1: resolution: {integrity: sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==} @@ -7938,6 +8309,7 @@ packages: resolution: {integrity: sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==} engines: {node: '>=4'} hasBin: true + requiresBuild: true dev: true /mimic-response@1.0.1: @@ -7956,6 +8328,11 @@ packages: dom-walk: 0.1.1 dev: true + /min-indent@1.0.1: + resolution: {integrity: sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==} + engines: {node: '>=4'} + dev: false + /minimalistic-assert@1.0.1: resolution: {integrity: sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==} @@ -7995,6 +8372,15 @@ packages: brace-expansion: 2.0.1 dev: true + /minimist-options@4.1.0: + resolution: {integrity: sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==} + engines: {node: '>= 6'} + dependencies: + arrify: 1.0.1 + is-plain-obj: 1.1.0 + kind-of: 6.0.3 + dev: false + /minimist@1.2.6: resolution: {integrity: sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==} dev: true @@ -8005,6 +8391,7 @@ packages: /minipass@2.9.0: resolution: {integrity: sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==} + requiresBuild: true dependencies: safe-buffer: 5.2.1 yallist: 3.1.1 @@ -8012,6 +8399,7 @@ packages: /minizlib@1.3.3: resolution: {integrity: sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q==} + requiresBuild: true dependencies: minipass: 2.9.0 dev: true @@ -8024,10 +8412,16 @@ packages: is-extendable: 1.0.1 dev: true + /mixme@0.5.10: + resolution: {integrity: sha512-5H76ANWinB1H3twpJ6JY8uvAtpmFvHNArpilJAjXRKXSDDLPIMoZArw5SH0q9z+lLs8IrMw7Q2VWpWimFKFT1Q==} + engines: {node: '>= 8.0.0'} + dev: false + /mkdirp-promise@5.0.1: resolution: {integrity: sha512-Hepn5kb1lJPtVW84RFT40YG1OddBNTOVUZR2bzQUHc+Z03en8/3uX0+060JDhcEzyO08HmipsN9DcnFMxhIL9w==} engines: {node: '>=4'} deprecated: This package is broken and no longer maintained. 'mkdirp' itself supports promises now, please switch to that. + requiresBuild: true dependencies: mkdirp: 1.0.4 dev: true @@ -8119,6 +8513,7 @@ packages: /mock-fs@4.12.0: resolution: {integrity: sha512-/P/HtrlvBxY4o/PzXY9cCNBrdylDNxg7gnrv2sMNxj+UJ2m8jSpl0/A6fuJeNAWr99ZvGWH8XCbE0vmnM5KupQ==} + requiresBuild: true dev: true /module-error@1.0.2: @@ -8149,6 +8544,7 @@ packages: /multibase@0.6.1: resolution: {integrity: sha512-pFfAwyTjbbQgNc3G7D48JkJxWtoJoBMaR4xQUOuB8RnCgRqaYmWNFeJTTvrJ2w51bjLq2zTby6Rqj9TQ9elSUw==} deprecated: This module has been superseded by the multiformats module + requiresBuild: true dependencies: base-x: 3.0.9 buffer: 5.7.1 @@ -8157,6 +8553,7 @@ packages: /multibase@0.7.0: resolution: {integrity: sha512-TW8q03O0f6PNFTQDvh3xxH03c8CjGaaYrjkl9UQPG6rz53TQzzxJVCIWVjzcbN/Q5Y53Zd0IBQBMVktVgNx4Fg==} deprecated: This module has been superseded by the multiformats module + requiresBuild: true dependencies: base-x: 3.0.9 buffer: 5.7.1 @@ -8165,6 +8562,7 @@ packages: /multicodec@0.5.7: resolution: {integrity: sha512-PscoRxm3f+88fAtELwUnZxGDkduE2HD9Q6GHUOywQLjOGT/HAdhjLDYNZ1e7VR0s0TP0EwZ16LNUTFpoBGivOA==} deprecated: This module has been superseded by the multiformats module + requiresBuild: true dependencies: varint: 5.0.2 dev: true @@ -8172,6 +8570,7 @@ packages: /multicodec@1.0.4: resolution: {integrity: sha512-NDd7FeS3QamVtbgfvu5h7fd1IlbaC4EQ0/pgU4zqE2vdHCmBGsUa0TiM8/TdSeG6BMPC92OOCf8F1ocE/Wkrrg==} deprecated: This module has been superseded by the multiformats module + requiresBuild: true dependencies: buffer: 5.7.1 varint: 5.0.2 @@ -8179,6 +8578,7 @@ packages: /multihashes@0.4.21: resolution: {integrity: sha512-uVSvmeCWf36pU2nB4/1kzYZjsXD9vofZKpgudqkceYY5g2aZZXJ5r9lxuzoRLl1OAp28XljXsEJ/X/85ZsKmKw==} + requiresBuild: true dependencies: buffer: 5.7.1 multibase: 0.7.0 @@ -8199,6 +8599,7 @@ packages: /nano-json-stream-parser@0.1.2: resolution: {integrity: sha512-9MqxMH/BSJC7dnLsEMPyfN5Dvoo49IsPFYMcHw3Bcfc2kN0lpHRBSzlMSVx4HGyJ7s9B31CyBTVehWJoQ8Ctew==} + requiresBuild: true dev: true /nanoid@3.3.3: @@ -8237,6 +8638,7 @@ packages: /negotiator@0.6.2: resolution: {integrity: sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==} engines: {node: '>= 0.6'} + requiresBuild: true dev: true /neo-async@2.6.2: @@ -8297,7 +8699,6 @@ packages: optional: true dependencies: whatwg-url: 5.0.0 - dev: true /node-gyp-build@4.5.0: resolution: {integrity: sha512-2iGbaQBV+ITgCz76ZEjmhUKAKVf7xfY1sRl4UiKQspfZMH2h06SyhNsnSVy50cwkFQDGLyif6m/6uFXHkOZ6rg==} @@ -8335,7 +8736,6 @@ packages: resolve: 1.22.1 semver: 5.7.1 validate-npm-package-license: 3.0.4 - dev: true /normalize-path@3.0.0: resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} @@ -8345,6 +8745,7 @@ packages: /normalize-url@4.5.1: resolution: {integrity: sha512-9UZCFRHQdNrfTpGg8+1INIg93B6zE0aXMVFkw1WFwvO4SlZywU6aLg5Of0Ap/PgcbSw4LNxvMWXMeugwMCX0AA==} engines: {node: '>=8'} + requiresBuild: true dev: true /normalize-url@6.1.0: @@ -8391,11 +8792,9 @@ packages: /object-inspect@1.12.2: resolution: {integrity: sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==} - dev: true /object-inspect@1.13.1: resolution: {integrity: sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==} - dev: true /object-is@1.1.5: resolution: {integrity: sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==} @@ -8412,7 +8811,6 @@ packages: /object-keys@1.1.1: resolution: {integrity: sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==} engines: {node: '>= 0.4'} - dev: true /object-visit@1.0.1: resolution: {integrity: sha512-GBaMwwAVK9qbQN3Scdo0OyvgPW7l3lnaVMj84uTOZlswkX0KpF6fyDBJhtTthf7pymztoN36/KEr1DyhF96zEA==} @@ -8425,7 +8823,7 @@ packages: resolution: {integrity: sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==} engines: {node: '>= 0.4'} dependencies: - define-properties: 1.1.4 + define-properties: 1.2.1 function-bind: 1.1.1 has-symbols: 1.0.3 object-keys: 1.1.1 @@ -8439,16 +8837,15 @@ packages: define-properties: 1.1.4 has-symbols: 1.0.3 object-keys: 1.1.1 - dev: true /object.getownpropertydescriptors@2.1.4: resolution: {integrity: sha512-sccv3L/pMModT6dJAYF3fzGMVcb38ysQ0tEE6ixv2yXJDtEIPph268OlAdJj5/qZMZDq2g/jqvwppt36uS/uQQ==} engines: {node: '>= 0.8'} dependencies: array.prototype.reduce: 1.0.4 - call-bind: 1.0.2 - define-properties: 1.1.4 - es-abstract: 1.20.3 + call-bind: 1.0.5 + define-properties: 1.2.1 + es-abstract: 1.22.3 dev: true /object.pick@1.3.0: @@ -8479,6 +8876,7 @@ packages: /on-finished@2.3.0: resolution: {integrity: sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==} engines: {node: '>= 0.8'} + requiresBuild: true dependencies: ee-first: 1.1.1 dev: true @@ -8536,16 +8934,21 @@ packages: /os-tmpdir@1.0.2: resolution: {integrity: sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==} engines: {node: '>=0.10.0'} - dev: true + + /outdent@0.5.0: + resolution: {integrity: sha512-/jHxFIzoMXdqPzTaCpFzAAWhpkSjZPF4Vsn6jAfNpmbH/ymsmd7Qc6VE9BGn0L6YMj6uwpQLxCECpus4ukKS9Q==} + dev: false /p-cancelable@0.3.0: resolution: {integrity: sha512-RVbZPLso8+jFeq1MfNvgXtCRED2raz/dKpacfTNxsx6pLEpEomM7gah6VeHSYV3+vo0OAi4MkArtQcWWXuQoyw==} engines: {node: '>=4'} + requiresBuild: true dev: true /p-cancelable@1.1.0: resolution: {integrity: sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==} engines: {node: '>=6'} + requiresBuild: true dev: true /p-cancelable@3.0.0: @@ -8553,9 +8956,17 @@ packages: engines: {node: '>=12.20'} dev: true + /p-filter@2.1.0: + resolution: {integrity: sha512-ZBxxZ5sL2HghephhpGAQdoskxplTwr7ICaehZwLIlfL6acuVgZPm8yBNuRAFBGEqtD/hmUeq9eqLg2ys9Xr/yw==} + engines: {node: '>=8'} + dependencies: + p-map: 2.1.0 + dev: false + /p-finally@1.0.0: resolution: {integrity: sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow==} engines: {node: '>=4'} + requiresBuild: true dev: true /p-limit@1.3.0: @@ -8570,14 +8981,12 @@ packages: engines: {node: '>=6'} dependencies: p-try: 2.2.0 - dev: true /p-limit@3.1.0: resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} engines: {node: '>=10'} dependencies: yocto-queue: 0.1.0 - dev: true /p-locate@2.0.0: resolution: {integrity: sha512-nQja7m7gSKuewoVRen45CtVfODR3crN3goVQ0DDZ9N3yHxgpkuBhZqsaiotSQRrADUrne346peY7kT3TSACykg==} @@ -8598,14 +9007,17 @@ packages: engines: {node: '>=8'} dependencies: p-limit: 2.3.0 - dev: true /p-locate@5.0.0: resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} engines: {node: '>=10'} dependencies: p-limit: 3.1.0 - dev: true + + /p-map@2.1.0: + resolution: {integrity: sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==} + engines: {node: '>=6'} + dev: false /p-map@4.0.0: resolution: {integrity: sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==} @@ -8617,6 +9029,7 @@ packages: /p-timeout@1.2.1: resolution: {integrity: sha512-gb0ryzr+K2qFqFv6qi3khoeqMZF/+ajxQipEF6NteZVnvz9tzdsfAVj3lYtn1gAXvH5lfLwfxEII799gt/mRIA==} engines: {node: '>=4'} + requiresBuild: true dependencies: p-finally: 1.0.0 dev: true @@ -8629,7 +9042,6 @@ packages: /p-try@2.2.0: resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==} engines: {node: '>=6'} - dev: true /package-json@8.1.1: resolution: {integrity: sha512-cbH9IAIJHNj9uXi196JVsRlt7cHKak6u/e6AkL/bkRelZ7rlL3X1YKxsZwa36xipOEKAsdtmaG6aAJoM1fx2zA==} @@ -8656,6 +9068,7 @@ packages: /parse-asn1@5.1.5: resolution: {integrity: sha512-jkMYn1dcJqF6d5CpU689bq7w/b5ALS9ROVSpQDPrZsqqesUJii9qutvoT5ltGedNXMO2e16YUWIghG9KxaViTQ==} + requiresBuild: true dependencies: asn1.js: 4.10.1 browserify-aes: 1.2.0 @@ -8688,7 +9101,6 @@ packages: error-ex: 1.3.2 json-parse-even-better-errors: 2.3.1 lines-and-columns: 1.2.4 - dev: true /parse5-htmlparser2-tree-adapter@7.0.0: resolution: {integrity: sha512-B77tOZrqqfUfnVcOrUvfdLbz4pu4RopLD/4vmu3HUPswwTA8OH0EMW9BlWR2B0RCoiZRAHEUu7IxeP1Pd1UU+g==} @@ -8706,6 +9118,7 @@ packages: /parseurl@1.3.3: resolution: {integrity: sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==} engines: {node: '>= 0.8'} + requiresBuild: true dev: true /pascal-case@2.0.1: @@ -8786,7 +9199,6 @@ packages: /path-exists@4.0.0: resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} engines: {node: '>=8'} - dev: true /path-is-absolute@1.0.1: resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} @@ -8805,7 +9217,6 @@ packages: /path-parse@1.0.7: resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} - dev: true /path-starts-with@2.0.1: resolution: {integrity: sha512-wZ3AeiRBRlNwkdUxvBANh0+esnt38DLffHDujZyRHkqkaKHTglnY2EP5UX3b8rdeiSutgO4y9NEJwXezNP5vHg==} @@ -8814,6 +9225,7 @@ packages: /path-to-regexp@0.1.7: resolution: {integrity: sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==} + requiresBuild: true dev: true /path-type@1.1.0: @@ -8828,7 +9240,6 @@ packages: /path-type@4.0.0: resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} engines: {node: '>=8'} - dev: true /pathval@1.1.1: resolution: {integrity: sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==} @@ -8851,7 +9262,6 @@ packages: /picomatch@2.3.1: resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} engines: {node: '>=8.6'} - dev: true /pify@2.3.0: resolution: {integrity: sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==} @@ -8861,7 +9271,6 @@ packages: /pify@4.0.1: resolution: {integrity: sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==} engines: {node: '>=6'} - dev: true /pinkie-promise@2.0.1: resolution: {integrity: sha512-0Gni6D4UcLTbv9c57DfxDGdr41XfgUjqWZu492f0cIGr16zDU06BWP/RAEvOuo7CQ0CNjHaLlM59YJJFm3NWlw==} @@ -8875,6 +9284,13 @@ packages: engines: {node: '>=0.10.0'} dev: true + /pkg-dir@4.2.0: + resolution: {integrity: sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==} + engines: {node: '>=8'} + dependencies: + find-up: 4.1.0 + dev: false + /pluralize@8.0.0: resolution: {integrity: sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==} engines: {node: '>=4'} @@ -8895,6 +9311,16 @@ packages: engines: {node: '>= 0.6'} dev: true + /preferred-pm@3.1.3: + resolution: {integrity: sha512-MkXsENfftWSRpzCzImcp4FRsCc3y1opwB73CfCNWyzMqArju2CrlMHlqB7VexKiPEOjGMbttv1r9fSCn5S610w==} + engines: {node: '>=10'} + dependencies: + find-up: 5.0.0 + find-yarn-workspace-root2: 1.2.16 + path-exists: 4.0.0 + which-pm: 2.0.0 + dev: false + /prelude-ls@1.1.2: resolution: {integrity: sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==} engines: {node: '>= 0.8.0'} @@ -8908,11 +9334,13 @@ packages: /prepend-http@1.0.4: resolution: {integrity: sha512-PhmXi5XmoyKw1Un4E+opM2KcsJInDvKyuOumcjjw3waw86ZNjHwVUOOWLc4bCzLdcKNaWBH9e99sbWzDQsVaYg==} engines: {node: '>=0.10.0'} + requiresBuild: true dev: true /prepend-http@2.0.0: resolution: {integrity: sha512-ravE6m9Atw9Z/jjttRUZ+clIXogdghyZAuWJ3qEzjT+jI/dL1ifAqhZeC5VHzQp1MSt1+jxKkFNemj/iO7tVUA==} engines: {node: '>=4'} + requiresBuild: true dev: true /prettier-linter-helpers@1.0.0: @@ -8951,7 +9379,6 @@ packages: resolution: {integrity: sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==} engines: {node: '>=10.13.0'} hasBin: true - dev: true /prettier@3.2.5: resolution: {integrity: sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==} @@ -9002,6 +9429,7 @@ packages: /proxy-addr@2.0.5: resolution: {integrity: sha512-t/7RxHXPH6cJtP0pRG6smSr9QJidhB+3kXu0KgXnbGYMgzEnUxRQ4/LDdfOwZEMyIh3/xHb8PX3t+lfL9z+YVQ==} engines: {node: '>= 0.10'} + requiresBuild: true dependencies: forwarded: 0.1.2 ipaddr.js: 1.9.0 @@ -9017,7 +9445,6 @@ packages: /pseudomap@1.0.2: resolution: {integrity: sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==} - dev: true /psl@1.9.0: resolution: {integrity: sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==} @@ -9025,6 +9452,7 @@ packages: /public-encrypt@4.0.3: resolution: {integrity: sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==} + requiresBuild: true dependencies: bn.js: 4.12.0 browserify-rsa: 4.0.1 @@ -9115,11 +9543,13 @@ packages: /qs@6.7.0: resolution: {integrity: sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==} engines: {node: '>=0.6'} + requiresBuild: true dev: true /query-string@5.1.1: resolution: {integrity: sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw==} engines: {node: '>=0.10.0'} + requiresBuild: true dependencies: decode-uri-component: 0.2.0 object-assign: 4.1.1 @@ -9136,6 +9566,11 @@ packages: resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} dev: true + /quick-lru@4.0.1: + resolution: {integrity: sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==} + engines: {node: '>=8'} + dev: false + /quick-lru@5.1.1: resolution: {integrity: sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==} engines: {node: '>=10'} @@ -9149,6 +9584,7 @@ packages: /randomfill@1.0.4: resolution: {integrity: sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==} + requiresBuild: true dependencies: randombytes: 2.1.0 safe-buffer: 5.2.1 @@ -9157,11 +9593,13 @@ packages: /range-parser@1.2.1: resolution: {integrity: sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==} engines: {node: '>= 0.6'} + requiresBuild: true dev: true /raw-body@2.4.0: resolution: {integrity: sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==} engines: {node: '>= 0.8'} + requiresBuild: true dependencies: bytes: 3.1.0 http-errors: 1.7.2 @@ -9197,6 +9635,15 @@ packages: read-pkg: 1.1.0 dev: true + /read-pkg-up@7.0.1: + resolution: {integrity: sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==} + engines: {node: '>=8'} + dependencies: + find-up: 4.1.0 + read-pkg: 5.2.0 + type-fest: 0.8.1 + dev: false + /read-pkg@1.1.0: resolution: {integrity: sha512-7BGwRHqt4s/uVbuyoeejRn4YmFnYZiFl4AuaeXHlgZf3sONF0SOGlxs2Pw8g6hCKupo08RafIO5YXFNOKTfwsQ==} engines: {node: '>=0.10.0'} @@ -9206,6 +9653,26 @@ packages: path-type: 1.1.0 dev: true + /read-pkg@5.2.0: + resolution: {integrity: sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==} + engines: {node: '>=8'} + dependencies: + '@types/normalize-package-data': 2.4.4 + normalize-package-data: 2.5.0 + parse-json: 5.2.0 + type-fest: 0.6.0 + dev: false + + /read-yaml-file@1.1.0: + resolution: {integrity: sha512-VIMnQi/Z4HT2Fxuwg5KrY174U1VdUIASQVWXXyqtNRtxSr9IYkn1rsI6Tb6HsrHCmB7gVpNwX6JxPTHcH6IoTA==} + engines: {node: '>=6'} + dependencies: + graceful-fs: 4.2.10 + js-yaml: 3.14.1 + pify: 4.0.1 + strip-bom: 3.0.0 + dev: false + /readable-stream@1.0.34: resolution: {integrity: sha512-ok1qVCJuRkNmvebYikljxJA/UEsKwLl2nI1OmaqAu4/UE+h0wKCHok4XkL/gvi39OacXvw59RJUOFUkDib2rHg==} dependencies: @@ -9264,6 +9731,14 @@ packages: minimatch: 3.0.4 dev: true + /redent@3.0.0: + resolution: {integrity: sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==} + engines: {node: '>=8'} + dependencies: + indent-string: 4.0.0 + strip-indent: 3.0.0 + dev: false + /reduce-flatten@2.0.0: resolution: {integrity: sha512-EJ4UNY/U1t2P/2k6oqotuX2Cc3T6nxJwsM0N0asT7dhrtH1ltUxDn4NalSYmPE2rCkVpcf/X6R0wDwcFpzhd4w==} engines: {node: '>=6'} @@ -9281,6 +9756,10 @@ packages: resolution: {integrity: sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==} dev: true + /regenerator-runtime@0.14.1: + resolution: {integrity: sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==} + dev: false + /regenerator-transform@0.10.1: resolution: {integrity: sha512-PJepbvDbuK1xgIgnau7Y90cwaAmO/LCLMI2mPvaXq2heGMR3aWW5/BQvYrhJ8jgmQjXewXvBjzfqKcVOmhjZ6Q==} dependencies: @@ -9297,15 +9776,6 @@ packages: safe-regex: 1.1.0 dev: true - /regexp.prototype.flags@1.4.3: - resolution: {integrity: sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA==} - engines: {node: '>= 0.4'} - dependencies: - call-bind: 1.0.2 - define-properties: 1.1.4 - functions-have-names: 1.2.3 - dev: true - /regexp.prototype.flags@1.5.1: resolution: {integrity: sha512-sy6TXMN+hnP/wMy+ISxg3krXx7BAtWVO4UouuCN/ziM9UEne0euamVNafDfvC83bRNr95y0V5iijeDQFUNpvrg==} engines: {node: '>= 0.4'} @@ -9313,7 +9783,6 @@ packages: call-bind: 1.0.5 define-properties: 1.2.1 set-function-name: 2.0.1 - dev: true /regexpu-core@2.0.0: resolution: {integrity: sha512-tJ9+S4oKjxY8IZ9jmjnp/mtytu1u3iyIQAfmI51IKWH6bFf7XR1ybtaO6j7INhZKXOTYADk7V5qxaqLkmNxiZQ==} @@ -9432,7 +9901,6 @@ packages: /require-directory@2.1.1: resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} engines: {node: '>=0.10.0'} - dev: true /require-from-string@1.2.1: resolution: {integrity: sha512-H7AkJWMobeskkttHyhTVtS0fxpFLjxhbfMa6Bk3wimP7sdPRGL3EyCg3sAQenFfAe+xQ+oAc85Nmtvq0ROM83Q==} @@ -9450,7 +9918,6 @@ packages: /require-main-filename@2.0.0: resolution: {integrity: sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==} - dev: true /resolve-alpn@1.2.1: resolution: {integrity: sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==} @@ -9466,6 +9933,11 @@ packages: engines: {node: '>=4'} dev: true + /resolve-from@5.0.0: + resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==} + engines: {node: '>=8'} + dev: false + /resolve-url@0.2.1: resolution: {integrity: sha512-ZuF55hVUQaaczgOIwqWzkEcEidmlD/xl44x1UZnhOXcYuFN2S6+rcxpG+C1N3So0wvNI3DmJICUFfu2SxhBmvg==} deprecated: https://github.com/lydell/resolve-url#deprecated @@ -9488,10 +9960,10 @@ packages: is-core-module: 2.10.0 path-parse: 1.0.7 supports-preserve-symlinks-flag: 1.0.0 - dev: true /responselike@1.0.2: resolution: {integrity: sha512-/Fpe5guzJk1gPqdJLJR5u7eG/gNY4nImjbRDaVWVMRhne55TCmj2i9Q+54PBRfatRC8v/rIiv9BN0pMd9OV5EQ==} + requiresBuild: true dependencies: lowercase-keys: 1.0.1 dev: true @@ -9526,7 +9998,6 @@ packages: /reusify@1.0.4: resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} engines: {iojs: '>=1.0.0', node: '>=0.10.0'} - dev: true /rimraf@2.7.1: resolution: {integrity: sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==} @@ -9569,7 +10040,6 @@ packages: /run-parallel@1.1.9: resolution: {integrity: sha512-DEqnSRTDw/Tc3FXf49zedI638Z9onwUotBMiUFKmrO2sdFKIbXamXGQ3Axd4qgphxKB4kw/qP1w5kTxnfU1B9Q==} - dev: true /rustbn.js@0.2.0: resolution: {integrity: sha512-4VlvkRUuCJvr2J6Y0ImW7NvTCriMi7ErOAqWk1y69vAdoNIzCF3yPmgeNzx+RQTLEDFq5sHfscn1MwHxP9hNfA==} @@ -9583,7 +10053,6 @@ packages: get-intrinsic: 1.2.2 has-symbols: 1.0.3 isarray: 2.0.5 - dev: true /safe-buffer@5.1.2: resolution: {integrity: sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==} @@ -9606,7 +10075,6 @@ packages: call-bind: 1.0.2 get-intrinsic: 1.1.3 is-regex: 1.1.4 - dev: true /safe-regex@1.1.0: resolution: {integrity: sha512-aJXcif4xnaNUzvUuC5gcb46oTS7zvg4jpMTnuqtrEPlR3vFr4pxtdTwaF1Qs3Enjn9HK+ZlwQui+a7z0SywIzg==} @@ -9616,7 +10084,6 @@ packages: /safer-buffer@2.1.2: resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} - dev: true /sc-istanbul@0.4.6: resolution: {integrity: sha512-qJFF/8tW/zJsbyfh/iT/ZM5QNHE3CXxtLJbZsL+CzdJLBsPD7SedJZoUA4d8iAcN2IoMp/Dx80shOOd2x96X/g==} @@ -9695,7 +10162,6 @@ packages: /semver@5.7.1: resolution: {integrity: sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==} hasBin: true - dev: true /semver@6.3.0: resolution: {integrity: sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==} @@ -9716,11 +10182,11 @@ packages: hasBin: true dependencies: lru-cache: 6.0.0 - dev: true /send@0.17.1: resolution: {integrity: sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==} engines: {node: '>= 0.8.0'} + requiresBuild: true dependencies: debug: 2.6.9 depd: 1.1.2 @@ -9755,6 +10221,7 @@ packages: /serve-static@1.14.1: resolution: {integrity: sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==} engines: {node: '>= 0.8.0'} + requiresBuild: true dependencies: encodeurl: 1.0.2 escape-html: 1.0.3 @@ -9767,6 +10234,7 @@ packages: /servify@0.1.12: resolution: {integrity: sha512-/xE6GvsKKqyo1BAY+KxOWXcLpPsUUyji7Qg3bVD7hh1eRze5bR1uYiuDA/k3Gof1s9BTzQZEJK8sNcNGFIzeWw==} engines: {node: '>=6'} + requiresBuild: true dependencies: body-parser: 1.19.0 cors: 2.8.5 @@ -9779,7 +10247,6 @@ packages: /set-blocking@2.0.0: resolution: {integrity: sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==} - dev: true /set-function-length@1.1.1: resolution: {integrity: sha512-VoaqjbBJKiWtg4yRcKBQ7g7wnGnLV3M8oLvVWwOk2PdYY6PEFegR1vezXR0tw6fZGF9csVakIRjrJiy2veSBFQ==} @@ -9789,7 +10256,6 @@ packages: get-intrinsic: 1.2.2 gopd: 1.0.1 has-property-descriptors: 1.0.0 - dev: true /set-function-name@2.0.1: resolution: {integrity: sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA==} @@ -9798,7 +10264,6 @@ packages: define-data-property: 1.1.1 functions-have-names: 1.2.3 has-property-descriptors: 1.0.0 - dev: true /set-immediate-shim@1.0.1: resolution: {integrity: sha512-Li5AOqrZWCVA2n5kryzEmqai6bKSIvpz5oUJHPVj6+dsbD3X1ixtsY5tEnsaNpH3pFAHmG8eIHUrtEtohrg+UQ==} @@ -9825,6 +10290,7 @@ packages: /setprototypeof@1.1.1: resolution: {integrity: sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==} + requiresBuild: true dev: true /setprototypeof@1.2.0: @@ -9868,7 +10334,6 @@ packages: engines: {node: '>=0.10.0'} dependencies: shebang-regex: 1.0.0 - dev: true /shebang-command@2.0.0: resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} @@ -9880,7 +10345,6 @@ packages: /shebang-regex@1.0.0: resolution: {integrity: sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==} engines: {node: '>=0.10.0'} - dev: true /shebang-regex@3.0.0: resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} @@ -9903,18 +10367,18 @@ packages: call-bind: 1.0.2 get-intrinsic: 1.1.3 object-inspect: 1.12.2 - dev: true /signal-exit@3.0.7: resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} - dev: true /simple-concat@1.0.0: resolution: {integrity: sha512-pgxq9iGMSS24atefsqEznXW1Te610qB4pwMdrEg6mxczHh7sPtPyiixkP/VaQic8JjZofnIvT7CDeKlHqfbPBg==} + requiresBuild: true dev: true /simple-get@2.8.1: resolution: {integrity: sha512-lSSHRSw3mQNUGPAYRqo7xy9dhKmxFXIjLjp4KHpf99GEH2VH7C3AM+Qfx6du6jhfUi6Vm7XnbEVEf7Wb6N8jRw==} + requiresBuild: true dependencies: decompress-response: 3.3.0 once: 1.4.0 @@ -9934,7 +10398,6 @@ packages: /slash@3.0.0: resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} engines: {node: '>=8'} - dev: true /slice-ansi@4.0.0: resolution: {integrity: sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==} @@ -9945,6 +10408,19 @@ packages: is-fullwidth-code-point: 3.0.0 dev: true + /smartwrap@2.0.2: + resolution: {integrity: sha512-vCsKNQxb7PnCNd2wY1WClWifAc2lwqsG8OaswpJkVJsvMGcnEntdTCDajZCkk93Ay1U3t/9puJmb525Rg5MZBA==} + engines: {node: '>=6'} + hasBin: true + dependencies: + array.prototype.flat: 1.3.2 + breakword: 1.0.6 + grapheme-splitter: 1.0.4 + strip-ansi: 6.0.1 + wcwidth: 1.0.1 + yargs: 15.4.1 + dev: false + /snake-case@2.1.0: resolution: {integrity: sha512-FMR5YoPFwOLuh4rRz92dywJjyKYZNLpMn1R5ujVpIYkbA9p01fq8RMg0FkO4M+Yobt4MjHeLTJVm5xFFBHSV2Q==} dependencies: @@ -10273,27 +10749,30 @@ packages: engines: {node: '>=0.10.0'} dev: true + /spawndamnit@2.0.0: + resolution: {integrity: sha512-j4JKEcncSjFlqIwU5L/rp2N5SIPsdxaRsIv678+TZxZ0SRDJTm8JrxJMjE/XuiEZNEir3S8l0Fa3Ke339WI4qA==} + dependencies: + cross-spawn: 5.1.0 + signal-exit: 3.0.7 + dev: false + /spdx-correct@3.1.1: resolution: {integrity: sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==} dependencies: spdx-expression-parse: 3.0.1 spdx-license-ids: 3.0.12 - dev: true /spdx-exceptions@2.3.0: resolution: {integrity: sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==} - dev: true /spdx-expression-parse@3.0.1: resolution: {integrity: sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==} dependencies: spdx-exceptions: 2.3.0 spdx-license-ids: 3.0.12 - dev: true /spdx-license-ids@3.0.12: resolution: {integrity: sha512-rr+VVSXtRhO4OHbXUiAF7xW3Bo9DuuF6C5jH+q/x15j2jniycgKbxU09Hr0WqlSLUs4i4ltHGXqTe7VHclYWyA==} - dev: true /split-string@3.1.0: resolution: {integrity: sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==} @@ -10304,7 +10783,6 @@ packages: /sprintf-js@1.0.3: resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} - dev: true /sshpk@1.16.1: resolution: {integrity: sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==} @@ -10340,6 +10818,7 @@ packages: /statuses@1.5.0: resolution: {integrity: sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==} engines: {node: '>= 0.6'} + requiresBuild: true dev: true /statuses@2.0.1: @@ -10359,6 +10838,12 @@ packages: pull-stream: 3.6.14 dev: true + /stream-transform@2.1.3: + resolution: {integrity: sha512-9GHUiM5hMiCi6Y03jD2ARC1ettBXkQBoQAe7nJsPknnI0ow10aXjTnew8QtYQmLjzn974BnmWEAJgCY6ZP1DeQ==} + dependencies: + mixme: 0.5.10 + dev: false + /streamsearch@1.1.0: resolution: {integrity: sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==} engines: {node: '>=10.0.0'} @@ -10367,6 +10852,7 @@ packages: /strict-uri-encode@1.1.0: resolution: {integrity: sha512-R3f198pcvnB+5IpnBlRkphuE9n46WyVl8I39W/ZUTZLz4nqSP/oLYUrcnJrw462Ds8he4YKMov2efsTIw1BDGQ==} engines: {node: '>=0.10.0'} + requiresBuild: true dev: true /string-format@2.0.0: @@ -10406,7 +10892,6 @@ packages: emoji-regex: 8.0.0 is-fullwidth-code-point: 3.0.0 strip-ansi: 6.0.1 - dev: true /string.prototype.trim@1.2.8: resolution: {integrity: sha512-lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ==} @@ -10415,15 +10900,6 @@ packages: call-bind: 1.0.5 define-properties: 1.2.1 es-abstract: 1.22.3 - dev: true - - /string.prototype.trimend@1.0.5: - resolution: {integrity: sha512-I7RGvmjV4pJ7O3kdf+LXFpVfdNOxtCW/2C8f6jNiW4+PQchwxkCDzlk1/7p+Wl4bqFIZeF47qAHXLuHHWKAxog==} - dependencies: - call-bind: 1.0.2 - define-properties: 1.1.4 - es-abstract: 1.20.3 - dev: true /string.prototype.trimend@1.0.7: resolution: {integrity: sha512-Ni79DqeB72ZFq1uH/L6zJ+DKZTkOtPIHovb3YZHQViE+HDouuU4mBrLOLDn5Dde3RF8qw5qVETEjhu9locMLvA==} @@ -10431,15 +10907,6 @@ packages: call-bind: 1.0.5 define-properties: 1.2.1 es-abstract: 1.22.3 - dev: true - - /string.prototype.trimstart@1.0.5: - resolution: {integrity: sha512-THx16TJCGlsN0o6dl2o6ncWUsdgnLRSA23rRE5pyGBw/mLr3Ej/R2LaqCtgP8VNMGZsvMWnf9ooZPyY2bHvUFg==} - dependencies: - call-bind: 1.0.2 - define-properties: 1.1.4 - es-abstract: 1.20.3 - dev: true /string.prototype.trimstart@1.0.7: resolution: {integrity: sha512-NGhtDFu3jCEm7B4Fy0DpLewdJQOZcQ0rGbwQ/+stjnrp2i+rlKeCvos9hOIeCmqwratM47OBxY7uFZzjxHXmrg==} @@ -10447,7 +10914,6 @@ packages: call-bind: 1.0.5 define-properties: 1.2.1 es-abstract: 1.22.3 - dev: true /string_decoder@0.10.31: resolution: {integrity: sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ==} @@ -10491,7 +10957,6 @@ packages: engines: {node: '>=8'} dependencies: ansi-regex: 5.0.1 - dev: true /strip-bom@2.0.0: resolution: {integrity: sha512-kwrX1y7czp1E69n2ajbG65mIo9dqvJ+8aBQXOGVxqwvNbsXdFM6Lq37dLAY3mknUwru8CfcCbfOLL/gMo+fi3g==} @@ -10500,6 +10965,11 @@ packages: is-utf8: 0.2.1 dev: true + /strip-bom@3.0.0: + resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==} + engines: {node: '>=4'} + dev: false + /strip-hex-prefix@1.0.0: resolution: {integrity: sha512-q8d4ue7JGEiVcypji1bALTos+0pWtyGlivAWyPuTkHzuTCJqrK9sWxYQZUq6Nq3cuyv3bm734IhHvHtGGURU6A==} engines: {node: '>=6.5.0', npm: '>=3'} @@ -10512,6 +10982,13 @@ packages: engines: {node: '>=4'} dev: true + /strip-indent@3.0.0: + resolution: {integrity: sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==} + engines: {node: '>=8'} + dependencies: + min-indent: 1.0.1 + dev: false + /strip-json-comments@2.0.1: resolution: {integrity: sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==} engines: {node: '>=0.10.0'} @@ -10539,7 +11016,6 @@ packages: engines: {node: '>=4'} dependencies: has-flag: 3.0.0 - dev: true /supports-color@6.0.0: resolution: {integrity: sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg==} @@ -10553,7 +11029,6 @@ packages: engines: {node: '>=8'} dependencies: has-flag: 4.0.0 - dev: true /supports-color@8.1.1: resolution: {integrity: sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==} @@ -10565,7 +11040,6 @@ packages: /supports-preserve-symlinks-flag@1.0.0: resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} engines: {node: '>= 0.4'} - dev: true /swap-case@1.1.2: resolution: {integrity: sha512-BAmWG6/bx8syfc6qXPprof3Mn5vQgf5dwdUNJhsNqU9WdPt5P+ES/wQ5bxfijy8zwZgZZHslC3iAsxsuQMCzJQ==} @@ -10662,6 +11136,7 @@ packages: /tar@4.4.19: resolution: {integrity: sha512-a20gEsvHnWe0ygBY8JbxoM4w3SJdhc7ZAuxkLqh+nvNQN2IOt0B5lLgM490X5Hl8FF0dl0tOf2ewFYAlIFgzVA==} engines: {node: '>=4.5'} + requiresBuild: true dependencies: chownr: 1.1.4 fs-minipass: 1.2.7 @@ -10672,6 +11147,11 @@ packages: yallist: 3.1.1 dev: true + /term-size@2.2.1: + resolution: {integrity: sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg==} + engines: {node: '>=8'} + dev: false + /test-value@2.1.0: resolution: {integrity: sha512-+1epbAxtKeXttkGFMTX9H42oqzOTufR1ceCF+GYA5aOmvaPq9wd4PUS8329fn2RRLGNeUkgRLnVpycjx8DsO2w==} engines: {node: '>=0.10.0'} @@ -10720,6 +11200,7 @@ packages: /timed-out@4.0.1: resolution: {integrity: sha512-G7r3AhovYtr5YKOWQkta8RKAPb+J9IsO4uVmzjl8AZwfhs8UcUwTiD6gcJYSgOtzyjvQKrKYn41syHbUWMkafA==} engines: {node: '>=0.10.0'} + requiresBuild: true dev: true /title-case@2.1.1: @@ -10734,7 +11215,6 @@ packages: engines: {node: '>=0.6.0'} dependencies: os-tmpdir: 1.0.2 - dev: true /tmp@0.1.0: resolution: {integrity: sha512-J7Z2K08jbGcdA1kkQpJSqLF6T0tdQqpR2pnSUXsIchbPdTI9v3e85cLW0d6WDhwuAleOV71j2xWs8qMPfK7nKw==} @@ -10758,6 +11238,7 @@ packages: /to-readable-stream@1.0.0: resolution: {integrity: sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q==} engines: {node: '>=6'} + requiresBuild: true dev: true /to-regex-range@2.1.1: @@ -10773,7 +11254,6 @@ packages: engines: {node: '>=8.0'} dependencies: is-number: 7.0.0 - dev: true /to-regex@3.0.2: resolution: {integrity: sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==} @@ -10788,6 +11268,7 @@ packages: /toidentifier@1.0.0: resolution: {integrity: sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==} engines: {node: '>=0.6'} + requiresBuild: true dev: true /toidentifier@1.0.1: @@ -10805,7 +11286,11 @@ packages: /tr46@0.0.3: resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} - dev: true + + /trim-newlines@3.0.1: + resolution: {integrity: sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==} + engines: {node: '>=8'} + dev: false /trim-right@1.0.1: resolution: {integrity: sha512-WZGXGstmCWgeevgTL54hrCuw1dyMQIzWy7ZfqRJfSmJZBwklI15egmQytFP6bPidmw3M8d5yEowl1niq4vmqZw==} @@ -10909,6 +11394,20 @@ packages: resolution: {integrity: sha512-Tyrf5mxF8Ofs1tNoxA13lFeZ2Zrbd6cKbuH3V+MQ5sb6DtBj5FjrXVsRWT8YvNAQTqNoz66dz1WsbigI22aEnw==} dev: true + /tty-table@4.2.3: + resolution: {integrity: sha512-Fs15mu0vGzCrj8fmJNP7Ynxt5J7praPXqFN0leZeZBXJwkMxv9cb2D454k1ltrtUSJbZ4yH4e0CynsHLxmUfFA==} + engines: {node: '>=8.0.0'} + hasBin: true + dependencies: + chalk: 4.1.2 + csv: 5.5.3 + kleur: 4.1.5 + smartwrap: 2.0.2 + strip-ansi: 6.0.1 + wcwidth: 1.0.1 + yargs: 17.7.2 + dev: false + /tunnel-agent@0.6.0: resolution: {integrity: sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==} dependencies: @@ -10945,6 +11444,11 @@ packages: resolution: {integrity: sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==} engines: {node: '>=4'} + /type-fest@0.13.1: + resolution: {integrity: sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==} + engines: {node: '>=10'} + dev: false + /type-fest@0.20.2: resolution: {integrity: sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==} engines: {node: '>=10'} @@ -10955,14 +11459,25 @@ packages: engines: {node: '>=10'} dev: true + /type-fest@0.6.0: + resolution: {integrity: sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==} + engines: {node: '>=8'} + dev: false + /type-fest@0.7.1: resolution: {integrity: sha512-Ne2YiiGN8bmrmJJEuTWTLJR32nh/JdL1+PSicowtNb0WFpn59GK8/lfD61bVtzguz7b3PBt74nxpv/Pw5po5Rg==} engines: {node: '>=8'} dev: true + /type-fest@0.8.1: + resolution: {integrity: sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==} + engines: {node: '>=8'} + dev: false + /type-is@1.6.18: resolution: {integrity: sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==} engines: {node: '>= 0.6'} + requiresBuild: true dependencies: media-typer: 0.3.0 mime-types: 2.1.27 @@ -11020,7 +11535,6 @@ packages: call-bind: 1.0.5 get-intrinsic: 1.2.2 is-typed-array: 1.1.12 - dev: true /typed-array-byte-length@1.0.0: resolution: {integrity: sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA==} @@ -11030,7 +11544,6 @@ packages: for-each: 0.3.3 has-proto: 1.0.1 is-typed-array: 1.1.12 - dev: true /typed-array-byte-offset@1.0.0: resolution: {integrity: sha512-RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg==} @@ -11041,7 +11554,6 @@ packages: for-each: 0.3.3 has-proto: 1.0.1 is-typed-array: 1.1.12 - dev: true /typed-array-length@1.0.4: resolution: {integrity: sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==} @@ -11049,7 +11561,6 @@ packages: call-bind: 1.0.5 for-each: 0.3.3 is-typed-array: 1.1.12 - dev: true /typedarray-to-buffer@3.1.5: resolution: {integrity: sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==} @@ -11105,6 +11616,7 @@ packages: /ultron@1.1.1: resolution: {integrity: sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og==} + requiresBuild: true dev: true /unbox-primitive@1.0.2: @@ -11114,7 +11626,6 @@ packages: has-bigints: 1.0.2 has-symbols: 1.0.3 which-boxed-primitive: 1.0.2 - dev: true /underscore@1.9.1: resolution: {integrity: sha512-5/4etnCkd9c8gwgowi5/om/mYO5ajCaOgdzj/oW+0eQV9WxKBDZw5+ycmKmeaTXjInS/W0BzpGLo2xR2aBwZdg==} @@ -11146,7 +11657,6 @@ packages: /universalify@0.1.2: resolution: {integrity: sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==} engines: {node: '>= 4.0.0'} - dev: true /universalify@2.0.0: resolution: {integrity: sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==} @@ -11195,6 +11705,7 @@ packages: /url-parse-lax@1.0.0: resolution: {integrity: sha512-BVA4lR5PIviy2PMseNd2jbFQ+jwSwQGdJejf5ctd1rEXt0Ypd7yanUK9+lYechVlN5VaTJGsu2U/3MDDu6KgBA==} engines: {node: '>=0.10.0'} + requiresBuild: true dependencies: prepend-http: 1.0.4 dev: true @@ -11202,17 +11713,20 @@ packages: /url-parse-lax@3.0.0: resolution: {integrity: sha512-NjFKA0DidqPa5ciFcSrXnAltTtzz84ogy+NebPvfEgAck0+TNg4UJ4IN+fB7zRZfbgUf0syOo9MDxFkDSMuFaQ==} engines: {node: '>=4'} + requiresBuild: true dependencies: prepend-http: 2.0.0 dev: true /url-set-query@1.0.0: resolution: {integrity: sha512-3AChu4NiXquPfeckE5R5cGdiHCMWJx1dwCWOmWIL4KHAziJNOFIYJlpGFeKDvwLPHovZRCxK3cYlwzqI9Vp+Gg==} + requiresBuild: true dev: true /url-to-options@1.0.1: resolution: {integrity: sha512-0kQLIzG4fdk/G5NONku64rSH/x32NOA39LVQqlK8Le6lvTF6GGRJpqaQFGgU+CLwySIqBSMdwYM0sYcW9f6P4A==} engines: {node: '>= 4'} + requiresBuild: true dev: true /url@0.11.0: @@ -11267,6 +11781,7 @@ packages: /utils-merge@1.0.1: resolution: {integrity: sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==} engines: {node: '>= 0.4.0'} + requiresBuild: true dev: true /uuid@2.0.1: @@ -11300,15 +11815,16 @@ packages: dependencies: spdx-correct: 3.1.1 spdx-expression-parse: 3.0.1 - dev: true /varint@5.0.2: resolution: {integrity: sha512-lKxKYG6H03yCZUpAGOPOsMcGxd1RHCu1iKvEHYDPmTyq2HueGhD73ssNBqqQWfvYs04G9iUFRvmAVLW20Jw6ow==} + requiresBuild: true dev: true /vary@1.1.2: resolution: {integrity: sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==} engines: {node: '>= 0.8'} + requiresBuild: true dev: true /verror@1.10.0: @@ -11320,6 +11836,12 @@ packages: extsprintf: 1.4.0 dev: true + /wcwidth@1.0.1: + resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==} + dependencies: + defaults: 1.0.4 + dev: false + /web3-bzz@1.2.11: resolution: {integrity: sha512-XGpWUEElGypBjeFyUhTkiPXFbDVD6Nr/S5jznE3t8cWUA0FxRf1n3n/NuIZeb0H9RkN2Ctd/jNma/k8XGa3YKg==} engines: {node: '>=8.0.0'} @@ -12193,7 +12715,6 @@ packages: /webidl-conversions@3.0.1: resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} - dev: true /websocket@1.0.32: resolution: {integrity: sha512-i4yhcllSP4wrpoPMU2N0TQ/q0O94LRG/eUQjEAamRltjQ1oT1PFFKOG4i877OlJgCG8rw6LrrowJp+TYCEWF7Q==} @@ -12232,7 +12753,6 @@ packages: dependencies: tr46: 0.0.3 webidl-conversions: 3.0.1 - dev: true /which-boxed-primitive@1.0.2: resolution: {integrity: sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==} @@ -12242,7 +12762,6 @@ packages: is-number-object: 1.0.7 is-string: 1.0.7 is-symbol: 1.0.3 - dev: true /which-module@1.0.0: resolution: {integrity: sha512-F6+WgncZi/mJDrammbTuHe1q0R5hOXv/mBaiNA2TCNT/LTHusX0V+CJnj9XT8ki5ln2UZyyddDgHfCzyrOH7MQ==} @@ -12250,7 +12769,14 @@ packages: /which-module@2.0.0: resolution: {integrity: sha512-B+enWhmw6cjfVC7kS8Pj9pCrKSc5txArRyaYGe088shv/FGWH+0Rjx/xPgtsWfsUtS27FkP697E4DDhgrgoc0Q==} - dev: true + + /which-pm@2.0.0: + resolution: {integrity: sha512-Lhs9Pmyph0p5n5Z3mVnN0yWcbQYUAD7rbQUiMsQxOJ3T57k7RFe35SUwWMf7dsbDZks1uOmw4AecB/JMDj3v/w==} + engines: {node: '>=8.15'} + dependencies: + load-yaml-file: 0.2.0 + path-exists: 4.0.0 + dev: false /which-typed-array@1.1.13: resolution: {integrity: sha512-P5Nra0qjSncduVPEAr7xhoF5guty49ArDTwzJ/yNuPIbZppyRxFQsRCWrocxIY+CnMVG+qfbU2FmDKyvSGClow==} @@ -12261,7 +12787,6 @@ packages: for-each: 0.3.3 gopd: 1.0.1 has-tostringtag: 1.0.0 - dev: true /which-typed-array@1.1.4: resolution: {integrity: sha512-49E0SpUe90cjpoc7BOJwyPHRqSAd12c10Qm2amdEZrJPCY2NDxaW01zHITrem+rnETY3dwrbH3UUrUwagfCYDA==} @@ -12281,7 +12806,6 @@ packages: hasBin: true dependencies: isexe: 2.0.0 - dev: true /which@2.0.2: resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} @@ -12341,6 +12865,15 @@ packages: strip-ansi: 5.2.0 dev: true + /wrap-ansi@6.2.0: + resolution: {integrity: sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==} + engines: {node: '>=8'} + dependencies: + ansi-styles: 4.3.0 + string-width: 4.2.3 + strip-ansi: 6.0.1 + dev: false + /wrap-ansi@7.0.0: resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} engines: {node: '>=10'} @@ -12348,7 +12881,6 @@ packages: ansi-styles: 4.3.0 string-width: 4.2.3 strip-ansi: 6.0.1 - dev: true /wrappy@1.0.2: resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} @@ -12356,6 +12888,7 @@ packages: /ws@3.3.3: resolution: {integrity: sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA==} + requiresBuild: true peerDependencies: bufferutil: ^4.0.1 utf-8-validate: ^5.0.2 @@ -12411,12 +12944,14 @@ packages: /xhr-request-promise@0.1.2: resolution: {integrity: sha512-yAQlCCNLwPgoGxw4k+IdRp1uZ7MZibS4kFw2boSUOesjnmvcxxj73j5a8KavE5Bzas++8P49OpJ4m8qjWGiDsA==} + requiresBuild: true dependencies: xhr-request: 1.1.0 dev: true /xhr-request@1.1.0: resolution: {integrity: sha512-Y7qzEaR3FDtL3fP30k9wO/e+FBnBByZeybKOhASsGP30NIkRAAkKD/sCnLvgEfAIEC1rcmK7YG8f4oEnIrrWzA==} + requiresBuild: true dependencies: buffer-to-arraybuffer: 0.0.5 object-assign: 4.1.1 @@ -12465,25 +13000,26 @@ packages: /y18n@4.0.3: resolution: {integrity: sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==} - dev: true /y18n@5.0.8: resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} engines: {node: '>=10'} - dev: true /yaeti@0.0.6: resolution: {integrity: sha512-MvQa//+KcZCUkBTIC9blM+CU9J2GzuTytsOUwf2lidtvkx/6gnEp1QvJv34t9vdjhFmha/mUiNDbN0D0mJWdug==} engines: {node: '>=0.10.32'} dev: true + /yallist@2.1.2: + resolution: {integrity: sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==} + dev: false + /yallist@3.1.1: resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==} dev: true /yallist@4.0.0: resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} - dev: true /yargs-parser@13.1.2: resolution: {integrity: sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==} @@ -12492,6 +13028,14 @@ packages: decamelize: 1.2.0 dev: true + /yargs-parser@18.1.3: + resolution: {integrity: sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==} + engines: {node: '>=6'} + dependencies: + camelcase: 5.3.1 + decamelize: 1.2.0 + dev: false + /yargs-parser@2.4.1: resolution: {integrity: sha512-9pIKIJhnI5tonzG6OnCFlz/yln8xHYcGl+pn3xR0Vzff0vzN1PbNRaelgfgRUwZ3s4i3jvxT9WhmUGL4whnasA==} dependencies: @@ -12504,6 +13048,11 @@ packages: engines: {node: '>=10'} dev: true + /yargs-parser@21.1.1: + resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} + engines: {node: '>=12'} + dev: false + /yargs-unparser@1.6.0: resolution: {integrity: sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw==} engines: {node: '>=6'} @@ -12538,6 +13087,23 @@ packages: yargs-parser: 13.1.2 dev: true + /yargs@15.4.1: + resolution: {integrity: sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==} + engines: {node: '>=8'} + dependencies: + cliui: 6.0.0 + decamelize: 1.2.0 + find-up: 4.1.0 + get-caller-file: 2.0.5 + require-directory: 2.1.1 + require-main-filename: 2.0.0 + set-blocking: 2.0.0 + string-width: 4.2.3 + which-module: 2.0.0 + y18n: 4.0.3 + yargs-parser: 18.1.3 + dev: false + /yargs@16.2.0: resolution: {integrity: sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==} engines: {node: '>=10'} @@ -12551,6 +13117,19 @@ packages: yargs-parser: 20.2.4 dev: true + /yargs@17.7.2: + resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==} + engines: {node: '>=12'} + dependencies: + cliui: 8.0.1 + escalade: 3.1.1 + get-caller-file: 2.0.5 + require-directory: 2.1.1 + string-width: 4.2.3 + y18n: 5.0.8 + yargs-parser: 21.1.1 + dev: false + /yargs@4.8.1: resolution: {integrity: sha512-LqodLrnIDM3IFT+Hf/5sxBnEGECrfdC1uIbgZeJmESCSo4HoCAaKEus8MylXHAkdacGc0ye+Qa+dpkuom8uVYA==} dependencies: @@ -12578,7 +13157,6 @@ packages: /yocto-queue@0.1.0: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} - dev: true github.com/ethereumjs/ethereumjs-abi/ee3994657fa7a427238e6ba92a84d0b529bbcde0: resolution: {tarball: https://codeload.github.com/ethereumjs/ethereumjs-abi/tar.gz/ee3994657fa7a427238e6ba92a84d0b529bbcde0} diff --git a/contracts/scripts/generate-automation-master-interface-v2_3.ts b/contracts/scripts/generate-automation-master-interface-v2_3.ts index 436ae93c172..cb566d744bb 100644 --- a/contracts/scripts/generate-automation-master-interface-v2_3.ts +++ b/contracts/scripts/generate-automation-master-interface-v2_3.ts @@ -5,6 +5,7 @@ import { AutomationRegistry2_3__factory as Registry } from '../typechain/factories/AutomationRegistry2_3__factory' import { AutomationRegistryLogicA2_3__factory as RegistryLogicA } from '../typechain/factories/AutomationRegistryLogicA2_3__factory' import { AutomationRegistryLogicB2_3__factory as RegistryLogicB } from '../typechain/factories/AutomationRegistryLogicB2_3__factory' +import { AutomationRegistryLogicC2_3__factory as RegistryLogicC } from '../typechain/factories/AutomationRegistryLogicC2_3__factory' import { utils } from 'ethers' import fs from 'fs' import { exec } from 'child_process' @@ -15,7 +16,12 @@ const tmpDest = `${dest}/tmp.txt` const combinedABI = [] const abiSet = new Set() -const abis = [Registry.abi, RegistryLogicA.abi, RegistryLogicB.abi] +const abis = [ + Registry.abi, + RegistryLogicA.abi, + RegistryLogicB.abi, + RegistryLogicC.abi, +] for (const abi of abis) { for (const entry of abi) { @@ -40,7 +46,7 @@ const checksum = utils.id(abis.join('')) fs.writeFileSync(`${tmpDest}`, JSON.stringify(combinedABI)) const cmd = ` -cat ${tmpDest} | pnpm abi-to-sol --solidity-version ^0.8.4 --license MIT > ${srcDest} IAutomationRegistryMaster; +cat ${tmpDest} | pnpm abi-to-sol --solidity-version ^0.8.4 --license MIT > ${srcDest} IAutomationRegistryMaster2_3; echo "// abi-checksum: ${checksum}" | cat - ${srcDest} > ${tmpDest} && mv ${tmpDest} ${srcDest}; pnpm prettier --write ${srcDest}; ` diff --git a/contracts/scripts/generate-automation-master-interface.ts b/contracts/scripts/generate-automation-master-interface.ts index 78c09cf2836..18866b2e695 100644 --- a/contracts/scripts/generate-automation-master-interface.ts +++ b/contracts/scripts/generate-automation-master-interface.ts @@ -9,7 +9,7 @@ import { utils } from 'ethers' import fs from 'fs' import { exec } from 'child_process' -const dest = 'src/v0.8/automation/dev/interfaces/v2_2' +const dest = 'src/v0.8/automation/interfaces/v2_2' const srcDest = `${dest}/IAutomationRegistryMaster.sol` const tmpDest = `${dest}/tmp.txt` diff --git a/contracts/scripts/native_solc_compile_all_automation b/contracts/scripts/native_solc_compile_all_automation index 248462f421a..5981074aa10 100755 --- a/contracts/scripts/native_solc_compile_all_automation +++ b/contracts/scripts/native_solc_compile_all_automation @@ -86,21 +86,22 @@ solc-select use $SOLC_VERSION export SOLC_VERSION=$SOLC_VERSION # v0.8.19 -compileContract automation/dev/v2_2/AutomationRegistrar2_2.sol -compileContract automation/dev/v2_2/AutomationRegistry2_2.sol -compileContract automation/dev/v2_2/AutomationRegistryLogicA2_2.sol -compileContract automation/dev/v2_2/AutomationRegistryLogicB2_2.sol -compileContract automation/dev/v2_2/AutomationUtils2_2.sol -compileContract automation/dev/interfaces/v2_2/IAutomationRegistryMaster.sol -compileContract automation/dev/chains/ArbitrumModule.sol -compileContract automation/dev/chains/ChainModuleBase.sol -compileContract automation/dev/chains/OptimismModule.sol -compileContract automation/dev/chains/ScrollModule.sol - -compileContract automation/dev/interfaces/IChainModule.sol +compileContract automation/v2_2/AutomationRegistry2_2.sol +compileContract automation/v2_2/AutomationRegistryLogicA2_2.sol +compileContract automation/v2_2/AutomationRegistryLogicB2_2.sol +compileContract automation/v2_2/AutomationUtils2_2.sol +compileContract automation/interfaces/v2_2/IAutomationRegistryMaster.sol +compileContract automation/chains/ArbitrumModule.sol +compileContract automation/chains/ChainModuleBase.sol +compileContract automation/chains/OptimismModule.sol +compileContract automation/chains/ScrollModule.sol +compileContract automation/interfaces/IChainModule.sol +compileContract automation/interfaces/IAutomationV21PlusCommon.sol +compileContract automation/AutomationCompatibleUtils.sol + compileContract automation/dev/v2_3/AutomationRegistrar2_3.sol compileContract automation/dev/v2_3/AutomationRegistry2_3.sol compileContract automation/dev/v2_3/AutomationRegistryLogicA2_3.sol compileContract automation/dev/v2_3/AutomationRegistryLogicB2_3.sol compileContract automation/dev/v2_3/AutomationUtils2_3.sol -compileContract automation/dev/interfaces/v2_3/IAutomationRegistryMaster2_3.sol \ No newline at end of file +compileContract automation/dev/interfaces/v2_3/IAutomationRegistryMaster2_3.sol diff --git a/contracts/src/v0.8/automation/AutomationBase.sol b/contracts/src/v0.8/automation/AutomationBase.sol index 8267fbc6a4e..72ee8aaeff2 100644 --- a/contracts/src/v0.8/automation/AutomationBase.sol +++ b/contracts/src/v0.8/automation/AutomationBase.sol @@ -10,7 +10,7 @@ contract AutomationBase { */ function _preventExecution() internal view { // solhint-disable-next-line avoid-tx-origin - if (tx.origin != address(0)) { + if (tx.origin != address(0) && tx.origin != address(0x1111111111111111111111111111111111111111)) { revert OnlySimulatedBackend(); } } diff --git a/contracts/src/v0.8/automation/AutomationCompatibleUtils.sol b/contracts/src/v0.8/automation/AutomationCompatibleUtils.sol new file mode 100644 index 00000000000..58d68fc61eb --- /dev/null +++ b/contracts/src/v0.8/automation/AutomationCompatibleUtils.sol @@ -0,0 +1,17 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity 0.8.19; + +import {Log} from "./interfaces/ILogAutomation.sol"; +import {IAutomationV21PlusCommon} from "./interfaces/IAutomationV21PlusCommon.sol"; + +contract AutomationCompatibleUtils { + function _report(IAutomationV21PlusCommon.Report memory) external {} + + function _logTriggerConfig(IAutomationV21PlusCommon.LogTriggerConfig memory) external {} + + function _logTrigger(IAutomationV21PlusCommon.LogTrigger memory) external {} + + function _conditionalTrigger(IAutomationV21PlusCommon.ConditionalTrigger memory) external {} + + function _log(Log memory) external {} +} diff --git a/contracts/src/v0.8/automation/dev/chains/ArbitrumModule.sol b/contracts/src/v0.8/automation/chains/ArbitrumModule.sol similarity index 90% rename from contracts/src/v0.8/automation/dev/chains/ArbitrumModule.sol rename to contracts/src/v0.8/automation/chains/ArbitrumModule.sol index fad7e459c63..e27a0809b7e 100644 --- a/contracts/src/v0.8/automation/dev/chains/ArbitrumModule.sol +++ b/contracts/src/v0.8/automation/chains/ArbitrumModule.sol @@ -1,8 +1,8 @@ // SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.8.19; -import {ArbSys} from "../../../vendor/@arbitrum/nitro-contracts/src/precompiles/ArbSys.sol"; -import {ArbGasInfo} from "../../../vendor/@arbitrum/nitro-contracts/src/precompiles/ArbGasInfo.sol"; +import {ArbSys} from "../../vendor/@arbitrum/nitro-contracts/src/precompiles/ArbSys.sol"; +import {ArbGasInfo} from "../../vendor/@arbitrum/nitro-contracts/src/precompiles/ArbGasInfo.sol"; import {ChainModuleBase} from "./ChainModuleBase.sol"; contract ArbitrumModule is ChainModuleBase { diff --git a/contracts/src/v0.8/automation/dev/chains/ChainModuleBase.sol b/contracts/src/v0.8/automation/chains/ChainModuleBase.sol similarity index 100% rename from contracts/src/v0.8/automation/dev/chains/ChainModuleBase.sol rename to contracts/src/v0.8/automation/chains/ChainModuleBase.sol diff --git a/contracts/src/v0.8/automation/dev/chains/OptimismModule.sol b/contracts/src/v0.8/automation/chains/OptimismModule.sol similarity index 93% rename from contracts/src/v0.8/automation/dev/chains/OptimismModule.sol rename to contracts/src/v0.8/automation/chains/OptimismModule.sol index 1c5a3f33d1f..91c1c0ed968 100644 --- a/contracts/src/v0.8/automation/dev/chains/OptimismModule.sol +++ b/contracts/src/v0.8/automation/chains/OptimismModule.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.8.19; -import {OVM_GasPriceOracle} from "../../../vendor/@eth-optimism/contracts/v0.8.9/contracts/L2/predeploys/OVM_GasPriceOracle.sol"; +import {OVM_GasPriceOracle} from "../../vendor/@eth-optimism/contracts/v0.8.9/contracts/L2/predeploys/OVM_GasPriceOracle.sol"; import {ChainModuleBase} from "./ChainModuleBase.sol"; contract OptimismModule is ChainModuleBase { diff --git a/contracts/src/v0.8/automation/dev/chains/ScrollModule.sol b/contracts/src/v0.8/automation/chains/ScrollModule.sol similarity index 94% rename from contracts/src/v0.8/automation/dev/chains/ScrollModule.sol rename to contracts/src/v0.8/automation/chains/ScrollModule.sol index f01a2b537c3..1e41ed3805f 100644 --- a/contracts/src/v0.8/automation/dev/chains/ScrollModule.sol +++ b/contracts/src/v0.8/automation/chains/ScrollModule.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.8.19; -import {IScrollL1GasPriceOracle} from "../../../vendor/@scroll-tech/contracts/src/L2/predeploys/IScrollL1GasPriceOracle.sol"; +import {IScrollL1GasPriceOracle} from "../../vendor/@scroll-tech/contracts/src/L2/predeploys/IScrollL1GasPriceOracle.sol"; import {ChainModuleBase} from "./ChainModuleBase.sol"; contract ScrollModule is ChainModuleBase { diff --git a/contracts/src/v0.8/automation/dev/interfaces/v2_3/IAutomationRegistryMaster2_3.sol b/contracts/src/v0.8/automation/dev/interfaces/v2_3/IAutomationRegistryMaster2_3.sol index b9be96dee35..ac102ce1d55 100644 --- a/contracts/src/v0.8/automation/dev/interfaces/v2_3/IAutomationRegistryMaster2_3.sol +++ b/contracts/src/v0.8/automation/dev/interfaces/v2_3/IAutomationRegistryMaster2_3.sol @@ -1,9 +1,9 @@ -// abi-checksum: 0xfc319f2ddde95d2e0226c913b9e417495effc4c8c847d01fe07e3de68ea8839c +// abi-checksum: 0x4779bfe92825a9f89273881c9e65a8b2ed1ad567a17168b1e76cb33df4115c0d // SPDX-License-Identifier: MIT // !! THIS FILE WAS AUTOGENERATED BY abi-to-sol v0.6.6. SEE SOURCE BELOW. !! pragma solidity ^0.8.4; -interface IAutomationRegistryMaster { +interface IAutomationRegistryMaster2_3 { error ArrayHasNoEntries(); error CannotCancel(); error CheckDataExceedsLimit(); @@ -16,7 +16,10 @@ interface IAutomationRegistryMaster { error IncorrectNumberOfSignatures(); error IncorrectNumberOfSigners(); error IndexOutOfRange(); + error InsufficientBalance(uint256 available, uint256 requested); + error InvalidBillingToken(); error InvalidDataLength(); + error InvalidFeed(); error InvalidPayee(); error InvalidRecipient(); error InvalidReport(); @@ -24,8 +27,6 @@ interface IAutomationRegistryMaster { error InvalidTransmitter(); error InvalidTrigger(); error InvalidTriggerType(); - error MaxCheckDataSizeCanOnlyIncrease(); - error MaxPerformDataSizeCanOnlyIncrease(); error MigrationNotPermitted(); error NotAContract(); error OnlyActiveSigners(); @@ -38,11 +39,11 @@ interface IAutomationRegistryMaster { error OnlyCallableByProposedAdmin(); error OnlyCallableByProposedPayee(); error OnlyCallableByUpkeepPrivilegeManager(); + error OnlyFinanceAdmin(); error OnlyPausedUpkeep(); error OnlySimulatedBackend(); error OnlyUnpausedUpkeep(); error ParameterLengthError(); - error PaymentGreaterThanAllLINK(); error ReentrantCall(); error RegistryPaused(); error RepeatedSigner(); @@ -50,12 +51,15 @@ interface IAutomationRegistryMaster { error TargetCheckReverted(bytes reason); error TooManyOracles(); error TranscoderNotSet(); + error TransferFailed(); error UpkeepAlreadyExists(); error UpkeepCancelled(); error UpkeepNotCanceled(); error UpkeepNotNeeded(); error ValueNotChanged(); + error ZeroAddressNotAllowed(); event AdminPrivilegeConfigSet(address indexed admin, bytes privilegeConfig); + event BillingConfigSet(address indexed token, AutomationRegistryBase2_3.BillingConfig config); event CancelledUpkeepReport(uint256 indexed id, bytes trigger); event ChainSpecificModuleUpdated(address newModule); event ConfigSet( @@ -70,10 +74,10 @@ interface IAutomationRegistryMaster { bytes offchainConfig ); event DedupKeyAdded(bytes32 indexed dedupKey); + event FeesWithdrawn(address indexed recipient, address indexed assetAddress, uint256 amount); event FundsAdded(uint256 indexed id, address indexed from, uint96 amount); event FundsWithdrawn(uint256 indexed id, uint256 amount, address to); event InsufficientFundsUpkeepReport(uint256 indexed id, bytes trigger); - event OwnerFundsWithdrawn(uint96 amount); event OwnershipTransferRequested(address indexed from, address indexed to); event OwnershipTransferred(address indexed from, address indexed to); event Paused(address account); @@ -127,7 +131,9 @@ interface IAutomationRegistryMaster { uint8 f, AutomationRegistryBase2_3.OnchainConfig memory onchainConfig, uint64 offchainConfigVersion, - bytes memory offchainConfig + bytes memory offchainConfig, + address[] memory billingTokens, + AutomationRegistryBase2_3.BillingConfig[] memory billingConfigs ) external; function simulatePerformUpkeep( uint256 id, @@ -163,7 +169,7 @@ interface IAutomationRegistryMaster { uint256 gasUsed, uint256 gasLimit, uint256 fastGasWei, - uint256 linkNative + uint256 linkUSD ); function checkUpkeep( uint256 id @@ -177,7 +183,7 @@ interface IAutomationRegistryMaster { uint256 gasUsed, uint256 gasLimit, uint256 fastGasWei, - uint256 linkNative + uint256 linkUSD ); function executeCallback( uint256 id, @@ -190,105 +196,151 @@ interface IAutomationRegistryMaster { uint32 gasLimit, address admin, uint8 triggerType, + address billingToken, bytes memory checkData, bytes memory triggerConfig, bytes memory offchainConfig ) external returns (uint256 id); - function registerUpkeep( - address target, - uint32 gasLimit, - address admin, - bytes memory checkData, - bytes memory offchainConfig - ) external returns (uint256 id); + + function acceptUpkeepAdmin(uint256 id) external; + function linkAvailableForPayment() external view returns (uint256); + function pauseUpkeep(uint256 id) external; + function setUpkeepCheckData(uint256 id, bytes memory newCheckData) external; + function setUpkeepGasLimit(uint256 id, uint32 gasLimit) external; + function setUpkeepOffchainConfig(uint256 id, bytes memory config) external; function setUpkeepTriggerConfig(uint256 id, bytes memory triggerConfig) external; + function transferUpkeepAdmin(uint256 id, address proposed) external; + function unpauseUpkeep(uint256 id) external; + function withdrawERC20Fees(address assetAddress, address to, uint256 amount) external; + function withdrawFunds(uint256 id, address to) external; + function withdrawLinkFees(address to, uint256 amount) external; function acceptPayeeship(address transmitter) external; - function acceptUpkeepAdmin(uint256 id) external; function getActiveUpkeepIDs(uint256 startIndex, uint256 maxCount) external view returns (uint256[] memory); function getAdminPrivilegeConfig(address admin) external view returns (bytes memory); function getAllowedReadOnlyAddress() external view returns (address); function getAutomationForwarderLogic() external view returns (address); function getBalance(uint256 id) external view returns (uint96 balance); + function getBillingToken(uint256 upkeepID) external view returns (address); + function getBillingTokenConfig(address token) external view returns (AutomationRegistryBase2_3.BillingConfig memory); + function getBillingTokens() external view returns (address[] memory); function getCancellationDelay() external pure returns (uint256); function getChainModule() external view returns (address chainModule); function getConditionalGasOverhead() external pure returns (uint256); + function getConfig() external view returns (AutomationRegistryBase2_3.OnchainConfig memory); + function getFallbackNativePrice() external view returns (uint256); function getFastGasFeedAddress() external view returns (address); function getForwarder(uint256 upkeepID) external view returns (address); + function getHotVars() external view returns (AutomationRegistryBase2_3.HotVars memory); function getLinkAddress() external view returns (address); - function getLinkNativeFeedAddress() external view returns (address); + function getLinkUSDFeedAddress() external view returns (address); function getLogGasOverhead() external pure returns (uint256); - function getMaxPaymentForGas(uint8 triggerType, uint32 gasLimit) external view returns (uint96 maxPayment); + function getMaxPaymentForGas( + uint8 triggerType, + uint32 gasLimit, + address billingToken + ) external view returns (uint96 maxPayment); function getMinBalance(uint256 id) external view returns (uint96); function getMinBalanceForUpkeep(uint256 id) external view returns (uint96 minBalance); + function getNativeUSDFeedAddress() external view returns (address); + function getNumUpkeeps() external view returns (uint256); function getPeerRegistryMigrationPermission(address peer) external view returns (uint8); function getPerPerformByteGasOverhead() external pure returns (uint256); function getPerSignerGasOverhead() external pure returns (uint256); function getReorgProtectionEnabled() external view returns (bool reorgProtectionEnabled); + function getReserveAmount(address billingToken) external view returns (uint256); function getSignerInfo(address query) external view returns (bool active, uint8 index); function getState() external view returns ( - AutomationRegistryBase2_3.State memory state, - AutomationRegistryBase2_3.OnchainConfigLegacy memory config, + IAutomationV21PlusCommon.StateLegacy memory state, + IAutomationV21PlusCommon.OnchainConfigLegacy memory config, address[] memory signers, address[] memory transmitters, uint8 f ); + function getStorage() external view returns (AutomationRegistryBase2_3.Storage memory); function getTransmitCalldataFixedBytesOverhead() external pure returns (uint256); function getTransmitCalldataPerSignerBytesOverhead() external pure returns (uint256); function getTransmitterInfo( address query ) external view returns (bool active, uint8 index, uint96 balance, uint96 lastCollected, address payee); function getTriggerType(uint256 upkeepId) external pure returns (uint8); - function getUpkeep(uint256 id) external view returns (AutomationRegistryBase2_3.UpkeepInfo memory upkeepInfo); + function getUpkeep(uint256 id) external view returns (IAutomationV21PlusCommon.UpkeepInfoLegacy memory upkeepInfo); function getUpkeepPrivilegeConfig(uint256 upkeepId) external view returns (bytes memory); function getUpkeepTriggerConfig(uint256 upkeepId) external view returns (bytes memory); function hasDedupKey(bytes32 dedupKey) external view returns (bool); function pause() external; - function pauseUpkeep(uint256 id) external; - function recoverFunds() external; function setAdminPrivilegeConfig(address admin, bytes memory newPrivilegeConfig) external; function setPayees(address[] memory payees) external; function setPeerRegistryMigrationPermission(address peer, uint8 permission) external; - function setUpkeepCheckData(uint256 id, bytes memory newCheckData) external; - function setUpkeepGasLimit(uint256 id, uint32 gasLimit) external; - function setUpkeepOffchainConfig(uint256 id, bytes memory config) external; function setUpkeepPrivilegeConfig(uint256 upkeepId, bytes memory newPrivilegeConfig) external; + function supportsBillingToken(address token) external view returns (bool); function transferPayeeship(address transmitter, address proposed) external; - function transferUpkeepAdmin(uint256 id, address proposed) external; function unpause() external; - function unpauseUpkeep(uint256 id) external; function upkeepTranscoderVersion() external pure returns (uint8); function upkeepVersion() external pure returns (uint8); - function withdrawFunds(uint256 id, address to) external; - function withdrawOwnerFunds() external; function withdrawPayment(address from, address to) external; } interface AutomationRegistryBase2_3 { + struct BillingConfig { + uint32 gasFeePPB; + uint24 flatFeeMicroLink; + address priceFeed; + uint256 fallbackPrice; + uint96 minSpend; + } + struct OnchainConfig { - uint32 paymentPremiumPPB; - uint32 flatFeeMicroLink; uint32 checkGasLimit; uint24 stalenessSeconds; uint16 gasCeilingMultiplier; - uint96 minUpkeepSpend; uint32 maxPerformGas; uint32 maxCheckDataSize; uint32 maxPerformDataSize; uint32 maxRevertDataSize; uint256 fallbackGasPrice; uint256 fallbackLinkPrice; + uint256 fallbackNativePrice; address transcoder; address[] registrars; address upkeepPrivilegeManager; address chainModule; bool reorgProtectionEnabled; + address financeAdmin; + } + + struct HotVars { + uint96 totalPremium; + uint32 latestEpoch; + uint24 stalenessSeconds; + uint16 gasCeilingMultiplier; + uint8 f; + bool paused; + bool reentrancyGuard; + bool reorgProtectionEnabled; + address chainModule; } - struct State { + struct Storage { + address transcoder; + uint32 checkGasLimit; + uint32 maxPerformGas; + uint32 nonce; + address upkeepPrivilegeManager; + uint32 configCount; + uint32 latestConfigBlockNumber; + uint32 maxCheckDataSize; + address financeAdmin; + uint32 maxPerformDataSize; + uint32 maxRevertDataSize; + } +} + +interface IAutomationV21PlusCommon { + struct StateLegacy { uint32 nonce; uint96 ownerLinkBalance; uint256 expectedLinkBalance; @@ -319,7 +371,7 @@ interface AutomationRegistryBase2_3 { address upkeepPrivilegeManager; } - struct UpkeepInfo { + struct UpkeepInfoLegacy { address target; uint32 performGas; bytes checkData; @@ -335,5 +387,5 @@ interface AutomationRegistryBase2_3 { // THIS FILE WAS AUTOGENERATED FROM THE FOLLOWING ABI JSON: /* -[{"inputs":[{"internalType":"contract AutomationRegistryLogicB2_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":[],"name":"InvalidDataLength","type":"error"},{"inputs":[],"name":"InvalidPayee","type":"error"},{"inputs":[],"name":"InvalidRecipient","type":"error"},{"inputs":[],"name":"InvalidReport","type":"error"},{"inputs":[],"name":"InvalidSigner","type":"error"},{"inputs":[],"name":"InvalidTransmitter","type":"error"},{"inputs":[],"name":"InvalidTrigger","type":"error"},{"inputs":[],"name":"InvalidTriggerType","type":"error"},{"inputs":[],"name":"MaxCheckDataSizeCanOnlyIncrease","type":"error"},{"inputs":[],"name":"MaxPerformDataSizeCanOnlyIncrease","type":"error"},{"inputs":[],"name":"MigrationNotPermitted","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":"OnlyPausedUpkeep","type":"error"},{"inputs":[],"name":"OnlySimulatedBackend","type":"error"},{"inputs":[],"name":"OnlyUnpausedUpkeep","type":"error"},{"inputs":[],"name":"ParameterLengthError","type":"error"},{"inputs":[],"name":"PaymentGreaterThanAllLINK","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":"UpkeepAlreadyExists","type":"error"},{"inputs":[],"name":"UpkeepCancelled","type":"error"},{"inputs":[],"name":"UpkeepNotCanceled","type":"error"},{"inputs":[],"name":"UpkeepNotNeeded","type":"error"},{"inputs":[],"name":"ValueNotChanged","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"},{"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":"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":"uint96","name":"amount","type":"uint96"}],"name":"OwnerFundsWithdrawn","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":"nonpayable","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":"paymentPremiumPPB","type":"uint32"},{"internalType":"uint32","name":"flatFeeMicroLink","type":"uint32"},{"internalType":"uint32","name":"checkGasLimit","type":"uint32"},{"internalType":"uint24","name":"stalenessSeconds","type":"uint24"},{"internalType":"uint16","name":"gasCeilingMultiplier","type":"uint16"},{"internalType":"uint96","name":"minUpkeepSpend","type":"uint96"},{"internalType":"uint32","name":"maxPerformGas","type":"uint32"},{"internalType":"uint32","name":"maxCheckDataSize","type":"uint32"},{"internalType":"uint32","name":"maxPerformDataSize","type":"uint32"},{"internalType":"uint32","name":"maxRevertDataSize","type":"uint32"},{"internalType":"uint256","name":"fallbackGasPrice","type":"uint256"},{"internalType":"uint256","name":"fallbackLinkPrice","type":"uint256"},{"internalType":"address","name":"transcoder","type":"address"},{"internalType":"address[]","name":"registrars","type":"address[]"},{"internalType":"address","name":"upkeepPrivilegeManager","type":"address"},{"internalType":"contract IChainModule","name":"chainModule","type":"address"},{"internalType":"bool","name":"reorgProtectionEnabled","type":"bool"}],"internalType":"struct AutomationRegistryBase2_3.OnchainConfig","name":"onchainConfig","type":"tuple"},{"internalType":"uint64","name":"offchainConfigVersion","type":"uint64"},{"internalType":"bytes","name":"offchainConfig","type":"bytes"}],"name":"setConfigTypeSafe","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"bytes","name":"performData","type":"bytes"}],"name":"simulatePerformUpkeep","outputs":[{"internalType":"bool","name":"success","type":"bool"},{"internalType":"uint256","name":"gasUsed","type":"uint256"}],"stateMutability":"view","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"},{"inputs":[{"internalType":"contract AutomationRegistryLogicB2_3","name":"logicB","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint96","name":"amount","type":"uint96"}],"name":"addFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"cancelUpkeep","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"bytes[]","name":"values","type":"bytes[]"},{"internalType":"bytes","name":"extraData","type":"bytes"}],"name":"checkCallback","outputs":[{"internalType":"bool","name":"upkeepNeeded","type":"bool"},{"internalType":"bytes","name":"performData","type":"bytes"},{"internalType":"enum AutomationRegistryBase2_3.UpkeepFailureReason","name":"upkeepFailureReason","type":"uint8"},{"internalType":"uint256","name":"gasUsed","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"bytes","name":"triggerData","type":"bytes"}],"name":"checkUpkeep","outputs":[{"internalType":"bool","name":"upkeepNeeded","type":"bool"},{"internalType":"bytes","name":"performData","type":"bytes"},{"internalType":"enum AutomationRegistryBase2_3.UpkeepFailureReason","name":"upkeepFailureReason","type":"uint8"},{"internalType":"uint256","name":"gasUsed","type":"uint256"},{"internalType":"uint256","name":"gasLimit","type":"uint256"},{"internalType":"uint256","name":"fastGasWei","type":"uint256"},{"internalType":"uint256","name":"linkNative","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"checkUpkeep","outputs":[{"internalType":"bool","name":"upkeepNeeded","type":"bool"},{"internalType":"bytes","name":"performData","type":"bytes"},{"internalType":"enum AutomationRegistryBase2_3.UpkeepFailureReason","name":"upkeepFailureReason","type":"uint8"},{"internalType":"uint256","name":"gasUsed","type":"uint256"},{"internalType":"uint256","name":"gasLimit","type":"uint256"},{"internalType":"uint256","name":"fastGasWei","type":"uint256"},{"internalType":"uint256","name":"linkNative","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"bytes","name":"payload","type":"bytes"}],"name":"executeCallback","outputs":[{"internalType":"bool","name":"upkeepNeeded","type":"bool"},{"internalType":"bytes","name":"performData","type":"bytes"},{"internalType":"enum AutomationRegistryBase2_3.UpkeepFailureReason","name":"upkeepFailureReason","type":"uint8"},{"internalType":"uint256","name":"gasUsed","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"address","name":"destination","type":"address"}],"name":"migrateUpkeeps","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"encodedUpkeeps","type":"bytes"}],"name":"receiveUpkeeps","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"target","type":"address"},{"internalType":"uint32","name":"gasLimit","type":"uint32"},{"internalType":"address","name":"admin","type":"address"},{"internalType":"enum AutomationRegistryBase2_3.Trigger","name":"triggerType","type":"uint8"},{"internalType":"bytes","name":"checkData","type":"bytes"},{"internalType":"bytes","name":"triggerConfig","type":"bytes"},{"internalType":"bytes","name":"offchainConfig","type":"bytes"}],"name":"registerUpkeep","outputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"target","type":"address"},{"internalType":"uint32","name":"gasLimit","type":"uint32"},{"internalType":"address","name":"admin","type":"address"},{"internalType":"bytes","name":"checkData","type":"bytes"},{"internalType":"bytes","name":"offchainConfig","type":"bytes"}],"name":"registerUpkeep","outputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"bytes","name":"triggerConfig","type":"bytes"}],"name":"setUpkeepTriggerConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"link","type":"address"},{"internalType":"address","name":"linkNativeFeed","type":"address"},{"internalType":"address","name":"fastGasFeed","type":"address"},{"internalType":"address","name":"automationForwarderLogic","type":"address"},{"internalType":"address","name":"allowedReadOnlyAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"transmitter","type":"address"}],"name":"acceptPayeeship","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"acceptUpkeepAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"startIndex","type":"uint256"},{"internalType":"uint256","name":"maxCount","type":"uint256"}],"name":"getActiveUpkeepIDs","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"admin","type":"address"}],"name":"getAdminPrivilegeConfig","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAllowedReadOnlyAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAutomationForwarderLogic","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getBalance","outputs":[{"internalType":"uint96","name":"balance","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCancellationDelay","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"getChainModule","outputs":[{"internalType":"contract IChainModule","name":"chainModule","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getConditionalGasOverhead","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"getFastGasFeedAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"upkeepID","type":"uint256"}],"name":"getForwarder","outputs":[{"internalType":"contract IAutomationForwarder","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getLinkAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getLinkNativeFeedAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getLogGasOverhead","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"enum AutomationRegistryBase2_3.Trigger","name":"triggerType","type":"uint8"},{"internalType":"uint32","name":"gasLimit","type":"uint32"}],"name":"getMaxPaymentForGas","outputs":[{"internalType":"uint96","name":"maxPayment","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getMinBalance","outputs":[{"internalType":"uint96","name":"","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getMinBalanceForUpkeep","outputs":[{"internalType":"uint96","name":"minBalance","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"peer","type":"address"}],"name":"getPeerRegistryMigrationPermission","outputs":[{"internalType":"enum AutomationRegistryBase2_3.MigrationPermission","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPerPerformByteGasOverhead","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"getPerSignerGasOverhead","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"getReorgProtectionEnabled","outputs":[{"internalType":"bool","name":"reorgProtectionEnabled","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"query","type":"address"}],"name":"getSignerInfo","outputs":[{"internalType":"bool","name":"active","type":"bool"},{"internalType":"uint8","name":"index","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getState","outputs":[{"components":[{"internalType":"uint32","name":"nonce","type":"uint32"},{"internalType":"uint96","name":"ownerLinkBalance","type":"uint96"},{"internalType":"uint256","name":"expectedLinkBalance","type":"uint256"},{"internalType":"uint96","name":"totalPremium","type":"uint96"},{"internalType":"uint256","name":"numUpkeeps","type":"uint256"},{"internalType":"uint32","name":"configCount","type":"uint32"},{"internalType":"uint32","name":"latestConfigBlockNumber","type":"uint32"},{"internalType":"bytes32","name":"latestConfigDigest","type":"bytes32"},{"internalType":"uint32","name":"latestEpoch","type":"uint32"},{"internalType":"bool","name":"paused","type":"bool"}],"internalType":"struct AutomationRegistryBase2_3.State","name":"state","type":"tuple"},{"components":[{"internalType":"uint32","name":"paymentPremiumPPB","type":"uint32"},{"internalType":"uint32","name":"flatFeeMicroLink","type":"uint32"},{"internalType":"uint32","name":"checkGasLimit","type":"uint32"},{"internalType":"uint24","name":"stalenessSeconds","type":"uint24"},{"internalType":"uint16","name":"gasCeilingMultiplier","type":"uint16"},{"internalType":"uint96","name":"minUpkeepSpend","type":"uint96"},{"internalType":"uint32","name":"maxPerformGas","type":"uint32"},{"internalType":"uint32","name":"maxCheckDataSize","type":"uint32"},{"internalType":"uint32","name":"maxPerformDataSize","type":"uint32"},{"internalType":"uint32","name":"maxRevertDataSize","type":"uint32"},{"internalType":"uint256","name":"fallbackGasPrice","type":"uint256"},{"internalType":"uint256","name":"fallbackLinkPrice","type":"uint256"},{"internalType":"address","name":"transcoder","type":"address"},{"internalType":"address[]","name":"registrars","type":"address[]"},{"internalType":"address","name":"upkeepPrivilegeManager","type":"address"}],"internalType":"struct AutomationRegistryBase2_3.OnchainConfigLegacy","name":"config","type":"tuple"},{"internalType":"address[]","name":"signers","type":"address[]"},{"internalType":"address[]","name":"transmitters","type":"address[]"},{"internalType":"uint8","name":"f","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTransmitCalldataFixedBytesOverhead","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"getTransmitCalldataPerSignerBytesOverhead","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"query","type":"address"}],"name":"getTransmitterInfo","outputs":[{"internalType":"bool","name":"active","type":"bool"},{"internalType":"uint8","name":"index","type":"uint8"},{"internalType":"uint96","name":"balance","type":"uint96"},{"internalType":"uint96","name":"lastCollected","type":"uint96"},{"internalType":"address","name":"payee","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"upkeepId","type":"uint256"}],"name":"getTriggerType","outputs":[{"internalType":"enum AutomationRegistryBase2_3.Trigger","name":"","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getUpkeep","outputs":[{"components":[{"internalType":"address","name":"target","type":"address"},{"internalType":"uint32","name":"performGas","type":"uint32"},{"internalType":"bytes","name":"checkData","type":"bytes"},{"internalType":"uint96","name":"balance","type":"uint96"},{"internalType":"address","name":"admin","type":"address"},{"internalType":"uint64","name":"maxValidBlocknumber","type":"uint64"},{"internalType":"uint32","name":"lastPerformedBlockNumber","type":"uint32"},{"internalType":"uint96","name":"amountSpent","type":"uint96"},{"internalType":"bool","name":"paused","type":"bool"},{"internalType":"bytes","name":"offchainConfig","type":"bytes"}],"internalType":"struct AutomationRegistryBase2_3.UpkeepInfo","name":"upkeepInfo","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"upkeepId","type":"uint256"}],"name":"getUpkeepPrivilegeConfig","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"upkeepId","type":"uint256"}],"name":"getUpkeepTriggerConfig","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"dedupKey","type":"bytes32"}],"name":"hasDedupKey","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"pauseUpkeep","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"recoverFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"admin","type":"address"},{"internalType":"bytes","name":"newPrivilegeConfig","type":"bytes"}],"name":"setAdminPrivilegeConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"payees","type":"address[]"}],"name":"setPayees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"peer","type":"address"},{"internalType":"enum AutomationRegistryBase2_3.MigrationPermission","name":"permission","type":"uint8"}],"name":"setPeerRegistryMigrationPermission","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"bytes","name":"newCheckData","type":"bytes"}],"name":"setUpkeepCheckData","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint32","name":"gasLimit","type":"uint32"}],"name":"setUpkeepGasLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"bytes","name":"config","type":"bytes"}],"name":"setUpkeepOffchainConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"upkeepId","type":"uint256"},{"internalType":"bytes","name":"newPrivilegeConfig","type":"bytes"}],"name":"setUpkeepPrivilegeConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"transmitter","type":"address"},{"internalType":"address","name":"proposed","type":"address"}],"name":"transferPayeeship","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"address","name":"proposed","type":"address"}],"name":"transferUpkeepAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"unpauseUpkeep","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"upkeepTranscoderVersion","outputs":[{"internalType":"enum UpkeepFormat","name":"","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"upkeepVersion","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"address","name":"to","type":"address"}],"name":"withdrawFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawOwnerFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"}],"name":"withdrawPayment","outputs":[],"stateMutability":"nonpayable","type":"function"}] +[{"inputs":[{"internalType":"contract AutomationRegistryLogicA2_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":"InvalidBillingToken","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":"InvalidTransmitter","type":"error"},{"inputs":[],"name":"InvalidTrigger","type":"error"},{"inputs":[],"name":"InvalidTriggerType","type":"error"},{"inputs":[],"name":"MigrationNotPermitted","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":"contract IERC20","name":"token","type":"address"},{"components":[{"internalType":"uint32","name":"gasFeePPB","type":"uint32"},{"internalType":"uint24","name":"flatFeeMicroLink","type":"uint24"},{"internalType":"contract AggregatorV3Interface","name":"priceFeed","type":"address"},{"internalType":"uint256","name":"fallbackPrice","type":"uint256"},{"internalType":"uint96","name":"minSpend","type":"uint96"}],"indexed":false,"internalType":"struct AutomationRegistryBase2_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":"recipient","type":"address"},{"indexed":true,"internalType":"address","name":"assetAddress","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":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":"nonpayable","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":"uint24","name":"stalenessSeconds","type":"uint24"},{"internalType":"uint16","name":"gasCeilingMultiplier","type":"uint16"},{"internalType":"uint32","name":"maxPerformGas","type":"uint32"},{"internalType":"uint32","name":"maxCheckDataSize","type":"uint32"},{"internalType":"uint32","name":"maxPerformDataSize","type":"uint32"},{"internalType":"uint32","name":"maxRevertDataSize","type":"uint32"},{"internalType":"uint256","name":"fallbackGasPrice","type":"uint256"},{"internalType":"uint256","name":"fallbackLinkPrice","type":"uint256"},{"internalType":"uint256","name":"fallbackNativePrice","type":"uint256"},{"internalType":"address","name":"transcoder","type":"address"},{"internalType":"address[]","name":"registrars","type":"address[]"},{"internalType":"address","name":"upkeepPrivilegeManager","type":"address"},{"internalType":"contract IChainModule","name":"chainModule","type":"address"},{"internalType":"bool","name":"reorgProtectionEnabled","type":"bool"},{"internalType":"address","name":"financeAdmin","type":"address"}],"internalType":"struct AutomationRegistryBase2_3.OnchainConfig","name":"onchainConfig","type":"tuple"},{"internalType":"uint64","name":"offchainConfigVersion","type":"uint64"},{"internalType":"bytes","name":"offchainConfig","type":"bytes"},{"internalType":"contract IERC20[]","name":"billingTokens","type":"address[]"},{"components":[{"internalType":"uint32","name":"gasFeePPB","type":"uint32"},{"internalType":"uint24","name":"flatFeeMicroLink","type":"uint24"},{"internalType":"contract AggregatorV3Interface","name":"priceFeed","type":"address"},{"internalType":"uint256","name":"fallbackPrice","type":"uint256"},{"internalType":"uint96","name":"minSpend","type":"uint96"}],"internalType":"struct AutomationRegistryBase2_3.BillingConfig[]","name":"billingConfigs","type":"tuple[]"}],"name":"setConfigTypeSafe","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"bytes","name":"performData","type":"bytes"}],"name":"simulatePerformUpkeep","outputs":[{"internalType":"bool","name":"success","type":"bool"},{"internalType":"uint256","name":"gasUsed","type":"uint256"}],"stateMutability":"view","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"},{"inputs":[{"internalType":"contract AutomationRegistryLogicB2_3","name":"logicB","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint96","name":"amount","type":"uint96"}],"name":"addFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"cancelUpkeep","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"bytes[]","name":"values","type":"bytes[]"},{"internalType":"bytes","name":"extraData","type":"bytes"}],"name":"checkCallback","outputs":[{"internalType":"bool","name":"upkeepNeeded","type":"bool"},{"internalType":"bytes","name":"performData","type":"bytes"},{"internalType":"enum AutomationRegistryBase2_3.UpkeepFailureReason","name":"upkeepFailureReason","type":"uint8"},{"internalType":"uint256","name":"gasUsed","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"bytes","name":"triggerData","type":"bytes"}],"name":"checkUpkeep","outputs":[{"internalType":"bool","name":"upkeepNeeded","type":"bool"},{"internalType":"bytes","name":"performData","type":"bytes"},{"internalType":"enum AutomationRegistryBase2_3.UpkeepFailureReason","name":"upkeepFailureReason","type":"uint8"},{"internalType":"uint256","name":"gasUsed","type":"uint256"},{"internalType":"uint256","name":"gasLimit","type":"uint256"},{"internalType":"uint256","name":"fastGasWei","type":"uint256"},{"internalType":"uint256","name":"linkUSD","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"checkUpkeep","outputs":[{"internalType":"bool","name":"upkeepNeeded","type":"bool"},{"internalType":"bytes","name":"performData","type":"bytes"},{"internalType":"enum AutomationRegistryBase2_3.UpkeepFailureReason","name":"upkeepFailureReason","type":"uint8"},{"internalType":"uint256","name":"gasUsed","type":"uint256"},{"internalType":"uint256","name":"gasLimit","type":"uint256"},{"internalType":"uint256","name":"fastGasWei","type":"uint256"},{"internalType":"uint256","name":"linkUSD","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"bytes","name":"payload","type":"bytes"}],"name":"executeCallback","outputs":[{"internalType":"bool","name":"upkeepNeeded","type":"bool"},{"internalType":"bytes","name":"performData","type":"bytes"},{"internalType":"enum AutomationRegistryBase2_3.UpkeepFailureReason","name":"upkeepFailureReason","type":"uint8"},{"internalType":"uint256","name":"gasUsed","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"address","name":"destination","type":"address"}],"name":"migrateUpkeeps","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"encodedUpkeeps","type":"bytes"}],"name":"receiveUpkeeps","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"target","type":"address"},{"internalType":"uint32","name":"gasLimit","type":"uint32"},{"internalType":"address","name":"admin","type":"address"},{"internalType":"enum AutomationRegistryBase2_3.Trigger","name":"triggerType","type":"uint8"},{"internalType":"contract IERC20","name":"billingToken","type":"address"},{"internalType":"bytes","name":"checkData","type":"bytes"},{"internalType":"bytes","name":"triggerConfig","type":"bytes"},{"internalType":"bytes","name":"offchainConfig","type":"bytes"}],"name":"registerUpkeep","outputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract AutomationRegistryLogicC2_3","name":"logicC","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"acceptUpkeepAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"linkAvailableForPayment","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"pauseUpkeep","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"bytes","name":"newCheckData","type":"bytes"}],"name":"setUpkeepCheckData","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint32","name":"gasLimit","type":"uint32"}],"name":"setUpkeepGasLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"bytes","name":"config","type":"bytes"}],"name":"setUpkeepOffchainConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"bytes","name":"triggerConfig","type":"bytes"}],"name":"setUpkeepTriggerConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"address","name":"proposed","type":"address"}],"name":"transferUpkeepAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"unpauseUpkeep","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"assetAddress","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawERC20Fees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"address","name":"to","type":"address"}],"name":"withdrawFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawLinkFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"link","type":"address"},{"internalType":"address","name":"linkUSDFeed","type":"address"},{"internalType":"address","name":"nativeUSDFeed","type":"address"},{"internalType":"address","name":"fastGasFeed","type":"address"},{"internalType":"address","name":"automationForwarderLogic","type":"address"},{"internalType":"address","name":"allowedReadOnlyAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"transmitter","type":"address"}],"name":"acceptPayeeship","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"startIndex","type":"uint256"},{"internalType":"uint256","name":"maxCount","type":"uint256"}],"name":"getActiveUpkeepIDs","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"admin","type":"address"}],"name":"getAdminPrivilegeConfig","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAllowedReadOnlyAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAutomationForwarderLogic","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getBalance","outputs":[{"internalType":"uint96","name":"balance","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"upkeepID","type":"uint256"}],"name":"getBillingToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"}],"name":"getBillingTokenConfig","outputs":[{"components":[{"internalType":"uint32","name":"gasFeePPB","type":"uint32"},{"internalType":"uint24","name":"flatFeeMicroLink","type":"uint24"},{"internalType":"contract AggregatorV3Interface","name":"priceFeed","type":"address"},{"internalType":"uint256","name":"fallbackPrice","type":"uint256"},{"internalType":"uint96","name":"minSpend","type":"uint96"}],"internalType":"struct AutomationRegistryBase2_3.BillingConfig","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getBillingTokens","outputs":[{"internalType":"contract IERC20[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCancellationDelay","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"getChainModule","outputs":[{"internalType":"contract IChainModule","name":"chainModule","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getConditionalGasOverhead","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"getConfig","outputs":[{"components":[{"internalType":"uint32","name":"checkGasLimit","type":"uint32"},{"internalType":"uint24","name":"stalenessSeconds","type":"uint24"},{"internalType":"uint16","name":"gasCeilingMultiplier","type":"uint16"},{"internalType":"uint32","name":"maxPerformGas","type":"uint32"},{"internalType":"uint32","name":"maxCheckDataSize","type":"uint32"},{"internalType":"uint32","name":"maxPerformDataSize","type":"uint32"},{"internalType":"uint32","name":"maxRevertDataSize","type":"uint32"},{"internalType":"uint256","name":"fallbackGasPrice","type":"uint256"},{"internalType":"uint256","name":"fallbackLinkPrice","type":"uint256"},{"internalType":"uint256","name":"fallbackNativePrice","type":"uint256"},{"internalType":"address","name":"transcoder","type":"address"},{"internalType":"address[]","name":"registrars","type":"address[]"},{"internalType":"address","name":"upkeepPrivilegeManager","type":"address"},{"internalType":"contract IChainModule","name":"chainModule","type":"address"},{"internalType":"bool","name":"reorgProtectionEnabled","type":"bool"},{"internalType":"address","name":"financeAdmin","type":"address"}],"internalType":"struct AutomationRegistryBase2_3.OnchainConfig","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getFallbackNativePrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getFastGasFeedAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"upkeepID","type":"uint256"}],"name":"getForwarder","outputs":[{"internalType":"contract IAutomationForwarder","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getHotVars","outputs":[{"components":[{"internalType":"uint96","name":"totalPremium","type":"uint96"},{"internalType":"uint32","name":"latestEpoch","type":"uint32"},{"internalType":"uint24","name":"stalenessSeconds","type":"uint24"},{"internalType":"uint16","name":"gasCeilingMultiplier","type":"uint16"},{"internalType":"uint8","name":"f","type":"uint8"},{"internalType":"bool","name":"paused","type":"bool"},{"internalType":"bool","name":"reentrancyGuard","type":"bool"},{"internalType":"bool","name":"reorgProtectionEnabled","type":"bool"},{"internalType":"contract IChainModule","name":"chainModule","type":"address"}],"internalType":"struct AutomationRegistryBase2_3.HotVars","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getLinkAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getLinkUSDFeedAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getLogGasOverhead","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"enum AutomationRegistryBase2_3.Trigger","name":"triggerType","type":"uint8"},{"internalType":"uint32","name":"gasLimit","type":"uint32"},{"internalType":"contract IERC20","name":"billingToken","type":"address"}],"name":"getMaxPaymentForGas","outputs":[{"internalType":"uint96","name":"maxPayment","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getMinBalance","outputs":[{"internalType":"uint96","name":"","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getMinBalanceForUpkeep","outputs":[{"internalType":"uint96","name":"minBalance","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getNativeUSDFeedAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getNumUpkeeps","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"peer","type":"address"}],"name":"getPeerRegistryMigrationPermission","outputs":[{"internalType":"enum AutomationRegistryBase2_3.MigrationPermission","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPerPerformByteGasOverhead","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"getPerSignerGasOverhead","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"getReorgProtectionEnabled","outputs":[{"internalType":"bool","name":"reorgProtectionEnabled","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"billingToken","type":"address"}],"name":"getReserveAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"query","type":"address"}],"name":"getSignerInfo","outputs":[{"internalType":"bool","name":"active","type":"bool"},{"internalType":"uint8","name":"index","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getState","outputs":[{"components":[{"internalType":"uint32","name":"nonce","type":"uint32"},{"internalType":"uint96","name":"ownerLinkBalance","type":"uint96"},{"internalType":"uint256","name":"expectedLinkBalance","type":"uint256"},{"internalType":"uint96","name":"totalPremium","type":"uint96"},{"internalType":"uint256","name":"numUpkeeps","type":"uint256"},{"internalType":"uint32","name":"configCount","type":"uint32"},{"internalType":"uint32","name":"latestConfigBlockNumber","type":"uint32"},{"internalType":"bytes32","name":"latestConfigDigest","type":"bytes32"},{"internalType":"uint32","name":"latestEpoch","type":"uint32"},{"internalType":"bool","name":"paused","type":"bool"}],"internalType":"struct IAutomationV21PlusCommon.StateLegacy","name":"state","type":"tuple"},{"components":[{"internalType":"uint32","name":"paymentPremiumPPB","type":"uint32"},{"internalType":"uint32","name":"flatFeeMicroLink","type":"uint32"},{"internalType":"uint32","name":"checkGasLimit","type":"uint32"},{"internalType":"uint24","name":"stalenessSeconds","type":"uint24"},{"internalType":"uint16","name":"gasCeilingMultiplier","type":"uint16"},{"internalType":"uint96","name":"minUpkeepSpend","type":"uint96"},{"internalType":"uint32","name":"maxPerformGas","type":"uint32"},{"internalType":"uint32","name":"maxCheckDataSize","type":"uint32"},{"internalType":"uint32","name":"maxPerformDataSize","type":"uint32"},{"internalType":"uint32","name":"maxRevertDataSize","type":"uint32"},{"internalType":"uint256","name":"fallbackGasPrice","type":"uint256"},{"internalType":"uint256","name":"fallbackLinkPrice","type":"uint256"},{"internalType":"address","name":"transcoder","type":"address"},{"internalType":"address[]","name":"registrars","type":"address[]"},{"internalType":"address","name":"upkeepPrivilegeManager","type":"address"}],"internalType":"struct IAutomationV21PlusCommon.OnchainConfigLegacy","name":"config","type":"tuple"},{"internalType":"address[]","name":"signers","type":"address[]"},{"internalType":"address[]","name":"transmitters","type":"address[]"},{"internalType":"uint8","name":"f","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getStorage","outputs":[{"components":[{"internalType":"address","name":"transcoder","type":"address"},{"internalType":"uint32","name":"checkGasLimit","type":"uint32"},{"internalType":"uint32","name":"maxPerformGas","type":"uint32"},{"internalType":"uint32","name":"nonce","type":"uint32"},{"internalType":"address","name":"upkeepPrivilegeManager","type":"address"},{"internalType":"uint32","name":"configCount","type":"uint32"},{"internalType":"uint32","name":"latestConfigBlockNumber","type":"uint32"},{"internalType":"uint32","name":"maxCheckDataSize","type":"uint32"},{"internalType":"address","name":"financeAdmin","type":"address"},{"internalType":"uint32","name":"maxPerformDataSize","type":"uint32"},{"internalType":"uint32","name":"maxRevertDataSize","type":"uint32"}],"internalType":"struct AutomationRegistryBase2_3.Storage","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTransmitCalldataFixedBytesOverhead","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"getTransmitCalldataPerSignerBytesOverhead","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"query","type":"address"}],"name":"getTransmitterInfo","outputs":[{"internalType":"bool","name":"active","type":"bool"},{"internalType":"uint8","name":"index","type":"uint8"},{"internalType":"uint96","name":"balance","type":"uint96"},{"internalType":"uint96","name":"lastCollected","type":"uint96"},{"internalType":"address","name":"payee","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"upkeepId","type":"uint256"}],"name":"getTriggerType","outputs":[{"internalType":"enum AutomationRegistryBase2_3.Trigger","name":"","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getUpkeep","outputs":[{"components":[{"internalType":"address","name":"target","type":"address"},{"internalType":"uint32","name":"performGas","type":"uint32"},{"internalType":"bytes","name":"checkData","type":"bytes"},{"internalType":"uint96","name":"balance","type":"uint96"},{"internalType":"address","name":"admin","type":"address"},{"internalType":"uint64","name":"maxValidBlocknumber","type":"uint64"},{"internalType":"uint32","name":"lastPerformedBlockNumber","type":"uint32"},{"internalType":"uint96","name":"amountSpent","type":"uint96"},{"internalType":"bool","name":"paused","type":"bool"},{"internalType":"bytes","name":"offchainConfig","type":"bytes"}],"internalType":"struct IAutomationV21PlusCommon.UpkeepInfoLegacy","name":"upkeepInfo","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"upkeepId","type":"uint256"}],"name":"getUpkeepPrivilegeConfig","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"upkeepId","type":"uint256"}],"name":"getUpkeepTriggerConfig","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"dedupKey","type":"bytes32"}],"name":"hasDedupKey","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"admin","type":"address"},{"internalType":"bytes","name":"newPrivilegeConfig","type":"bytes"}],"name":"setAdminPrivilegeConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"payees","type":"address[]"}],"name":"setPayees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"peer","type":"address"},{"internalType":"enum AutomationRegistryBase2_3.MigrationPermission","name":"permission","type":"uint8"}],"name":"setPeerRegistryMigrationPermission","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"upkeepId","type":"uint256"},{"internalType":"bytes","name":"newPrivilegeConfig","type":"bytes"}],"name":"setUpkeepPrivilegeConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"}],"name":"supportsBillingToken","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"transmitter","type":"address"},{"internalType":"address","name":"proposed","type":"address"}],"name":"transferPayeeship","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"upkeepTranscoderVersion","outputs":[{"internalType":"enum UpkeepFormat","name":"","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"upkeepVersion","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"}],"name":"withdrawPayment","outputs":[],"stateMutability":"nonpayable","type":"function"}] */ diff --git a/contracts/src/v0.8/automation/dev/test/AutomationRegistrar2_3.t.sol b/contracts/src/v0.8/automation/dev/test/AutomationRegistrar2_3.t.sol new file mode 100644 index 00000000000..9c396e3c488 --- /dev/null +++ b/contracts/src/v0.8/automation/dev/test/AutomationRegistrar2_3.t.sol @@ -0,0 +1,130 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity 0.8.19; + +import {BaseTest} from "./BaseTest.t.sol"; +import {IAutomationRegistryMaster2_3} from "../interfaces/v2_3/IAutomationRegistryMaster2_3.sol"; +import {AutomationRegistrar2_3} from "../v2_3/AutomationRegistrar2_3.sol"; +import {IERC20} from "../../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/IERC20.sol"; + +// forge test --match-path src/v0.8/automation/dev/test/AutomationRegistrar2_3.t.sol + +contract SetUp is BaseTest { + IAutomationRegistryMaster2_3 internal registry; + AutomationRegistrar2_3 internal registrar; + + function setUp() public override { + super.setUp(); + (registry, registrar) = deployAndConfigureAll(); + vm.stopPrank(); // reset identity at the start of each test + } +} + +contract RegisterUpkeep is SetUp { + function testLink_autoApproveOff_happy() external { + vm.startPrank(UPKEEP_ADMIN); + + uint96 amount = uint96(registrar.getMinimumRegistrationAmount(IERC20(address(linkToken)))); + linkToken.approve(address(registrar), amount); + + registrar.registerUpkeep( + AutomationRegistrar2_3.RegistrationParams({ + upkeepContract: address(TARGET1), + amount: amount, + adminAddress: UPKEEP_ADMIN, + gasLimit: 10_000, + triggerType: 0, + billingToken: IERC20(address(linkToken)), + name: "foobar", + encryptedEmail: "", + checkData: bytes("check data"), + triggerConfig: "", + offchainConfig: "" + }) + ); + + assertEq(linkToken.balanceOf(address(registrar)), amount); + assertEq(registry.getNumUpkeeps(), 0); + } + + function testUSDToken_autoApproveOff_happy() external { + vm.startPrank(UPKEEP_ADMIN); + + uint96 amount = uint96(registrar.getMinimumRegistrationAmount(mockERC20)); + mockERC20.approve(address(registrar), amount); + + registrar.registerUpkeep( + AutomationRegistrar2_3.RegistrationParams({ + upkeepContract: address(TARGET1), + amount: amount, + adminAddress: UPKEEP_ADMIN, + gasLimit: 10_000, + triggerType: 0, + billingToken: mockERC20, + name: "foobar", + encryptedEmail: "", + checkData: bytes("check data"), + triggerConfig: "", + offchainConfig: "" + }) + ); + + assertEq(mockERC20.balanceOf(address(registrar)), amount); + assertEq(registry.getNumUpkeeps(), 0); + } + + function testLink_autoApproveOn_happy() external { + registrar.setTriggerConfig(0, AutomationRegistrar2_3.AutoApproveType.ENABLED_ALL, 1000); + + vm.startPrank(UPKEEP_ADMIN); + uint96 amount = uint96(registrar.getMinimumRegistrationAmount(IERC20(address(linkToken)))); + linkToken.approve(address(registrar), amount); + + registrar.registerUpkeep( + AutomationRegistrar2_3.RegistrationParams({ + upkeepContract: address(TARGET1), + amount: amount, + adminAddress: UPKEEP_ADMIN, + gasLimit: 10_000, + triggerType: 0, + billingToken: IERC20(address(linkToken)), + name: "foobar", + encryptedEmail: "", + checkData: bytes("check data"), + triggerConfig: "", + offchainConfig: "" + }) + ); + + assertEq(linkToken.balanceOf(address(registrar)), 0); + assertEq(linkToken.balanceOf(address(registry)), amount); + assertEq(registry.getNumUpkeeps(), 1); + } + + function testUSDToken_autoApproveOn_happy() external { + registrar.setTriggerConfig(0, AutomationRegistrar2_3.AutoApproveType.ENABLED_ALL, 1000); + + vm.startPrank(UPKEEP_ADMIN); + uint96 amount = uint96(registrar.getMinimumRegistrationAmount(mockERC20)); + mockERC20.approve(address(registrar), amount); + + registrar.registerUpkeep( + AutomationRegistrar2_3.RegistrationParams({ + upkeepContract: address(TARGET1), + amount: amount, + adminAddress: UPKEEP_ADMIN, + gasLimit: 10_000, + triggerType: 0, + billingToken: mockERC20, + name: "foobar", + encryptedEmail: "", + checkData: bytes("check data"), + triggerConfig: "", + offchainConfig: "" + }) + ); + + assertEq(mockERC20.balanceOf(address(registrar)), 0); + assertEq(mockERC20.balanceOf(address(registry)), amount); + assertEq(registry.getNumUpkeeps(), 1); + } +} 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 89bea70af86..2047a54bd13 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 @@ -1,88 +1,125 @@ // SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.8.19; -import {AutomationForwarderLogic} from "../../AutomationForwarderLogic.sol"; import {BaseTest} from "./BaseTest.t.sol"; -import {AutomationRegistry2_3} from "../v2_3/AutomationRegistry2_3.sol"; -import {AutomationRegistryBase2_3} from "../v2_3/AutomationRegistryBase2_3.sol"; -import {AutomationRegistryLogicA2_3} from "../v2_3/AutomationRegistryLogicA2_3.sol"; -import {AutomationRegistryLogicB2_3} from "../v2_3/AutomationRegistryLogicB2_3.sol"; -import {IAutomationRegistryMaster} from "../interfaces/v2_3/IAutomationRegistryMaster2_3.sol"; -import {ChainModuleBase} from "../chains/ChainModuleBase.sol"; - -contract AutomationRegistry2_3_SetUp is BaseTest { - address internal constant LINK_ETH_FEED = 0x1111111111111111111111111111111111111110; - address internal constant FAST_GAS_FEED = 0x1111111111111111111111111111111111111112; - address internal constant LINK_TOKEN = 0x1111111111111111111111111111111111111113; - address internal constant ZERO_ADDRESS = address(0); - - // Signer private keys used for these test - uint256 internal constant PRIVATE0 = 0x7b2e97fe057e6de99d6872a2ef2abf52c9b4469bc848c2465ac3fcd8d336e81d; - uint256 internal constant PRIVATE1 = 0xab56160806b05ef1796789248e1d7f34a6465c5280899159d645218cd216cee6; - uint256 internal constant PRIVATE2 = 0x6ec7caa8406a49b76736602810e0a2871959fbbb675e23a8590839e4717f1f7f; - uint256 internal constant PRIVATE3 = 0x80f14b11da94ae7f29d9a7713ea13dc838e31960a5c0f2baf45ed458947b730a; - - uint64 internal constant OFFCHAIN_CONFIG_VERSION = 30; // 2 for OCR2 - uint8 internal constant F = 1; - - address[] internal s_valid_signers; - address[] internal s_valid_transmitters; - address[] internal s_registrars; +import {IAutomationRegistryMaster2_3, AutomationRegistryBase2_3} from "../interfaces/v2_3/IAutomationRegistryMaster2_3.sol"; +import {ChainModuleBase} from "../../chains/ChainModuleBase.sol"; + +// forge test --match-path src/v0.8/automation/dev/test/AutomationRegistry2_3.t.sol - IAutomationRegistryMaster internal registryMaster; +contract SetUp is BaseTest { + address[] internal s_registrars; - function setUp() public override { - s_valid_transmitters = new address[](4); - for (uint160 i = 0; i < 4; ++i) { - s_valid_transmitters[i] = address(4 + i); - } + IAutomationRegistryMaster2_3 internal registry; - s_valid_signers = new address[](4); - s_valid_signers[0] = vm.addr(PRIVATE0); //0xc110458BE52CaA6bB68E66969C3218A4D9Db0211 - s_valid_signers[1] = vm.addr(PRIVATE1); //0xc110a19c08f1da7F5FfB281dc93630923F8E3719 - s_valid_signers[2] = vm.addr(PRIVATE2); //0xc110fdF6e8fD679C7Cc11602d1cd829211A18e9b - s_valid_signers[3] = vm.addr(PRIVATE3); //0xc11028017c9b445B6bF8aE7da951B5cC28B326C0 + function setUp() public virtual override { + super.setUp(); s_registrars = new address[](1); s_registrars[0] = 0x3a0eDE26aa188BFE00b9A0C9A431A1a0CA5f7966; - AutomationForwarderLogic forwarderLogic = new AutomationForwarderLogic(); - AutomationRegistryLogicB2_3 logicB2_3 = new AutomationRegistryLogicB2_3( - LINK_TOKEN, - LINK_ETH_FEED, - FAST_GAS_FEED, - address(forwarderLogic), - ZERO_ADDRESS - ); - AutomationRegistryLogicA2_3 logicA2_3 = new AutomationRegistryLogicA2_3(logicB2_3); - registryMaster = IAutomationRegistryMaster( - address(new AutomationRegistry2_3(AutomationRegistryLogicB2_3(address(logicA2_3)))) - ); + (registry, ) = deployAndConfigureAll(); } } -contract AutomationRegistry2_3_LatestConfigDetails is AutomationRegistry2_3_SetUp { +contract LatestConfigDetails is SetUp { function testGet() public { - (uint32 configCount, uint32 blockNumber, bytes32 configDigest) = registryMaster.latestConfigDetails(); - assertEq(configCount, 0); - assertEq(blockNumber, 0); - assertEq(configDigest, ""); + (uint32 configCount, uint32 blockNumber, bytes32 configDigest) = registry.latestConfigDetails(); + assertEq(configCount, 1); + assertTrue(blockNumber > 0); + assertNotEq(configDigest, ""); } } -contract AutomationRegistry2_3_CheckUpkeep is AutomationRegistry2_3_SetUp { +contract CheckUpkeep is SetUp { function testPreventExecutionOnCheckUpkeep() public { uint256 id = 1; bytes memory triggerData = abi.encodePacked("trigger_data"); // The tx.origin is the DEFAULT_SENDER (0x1804c8AB1F12E6bbf3894d4083f33e07309d1f38) of foundry // Expecting a revert since the tx.origin is not address(0) - vm.expectRevert(abi.encodeWithSelector(IAutomationRegistryMaster.OnlySimulatedBackend.selector)); - registryMaster.checkUpkeep(id, triggerData); + vm.expectRevert(abi.encodeWithSelector(IAutomationRegistryMaster2_3.OnlySimulatedBackend.selector)); + registry.checkUpkeep(id, triggerData); } } -contract AutomationRegistry2_3_SetConfig is AutomationRegistry2_3_SetUp { +contract Withdraw is SetUp { + address internal aMockAddress = address(0x1111111111111111111111111111111111111113); + + function testLinkAvailableForPaymentReturnsLinkBalance() public { + //simulate a deposit of link to the liquidity pool + mintLink(address(registry), 1e10); + + //check there's a balance + assertGt(linkToken.balanceOf(address(registry)), 0); + + //check the link available for payment is the link balance + assertEq(registry.linkAvailableForPayment(), linkToken.balanceOf(address(registry))); + } + + function testWithdrawLinkFeesRevertsBecauseOnlyFinanceAdminAllowed() public { + vm.expectRevert(abi.encodeWithSelector(IAutomationRegistryMaster2_3.OnlyFinanceAdmin.selector)); + registry.withdrawLinkFees(aMockAddress, 1); + } + + function testWithdrawLinkFeesRevertsBecauseOfInsufficientBalance() public { + vm.startPrank(FINANCE_ADMIN); + + // try to withdraw 1 link while there is 0 balance + vm.expectRevert(abi.encodeWithSelector(IAutomationRegistryMaster2_3.InsufficientBalance.selector, 0, 1)); + registry.withdrawLinkFees(aMockAddress, 1); + + vm.stopPrank(); + } + + function testWithdrawLinkFeesRevertsBecauseOfInvalidRecipient() public { + vm.startPrank(FINANCE_ADMIN); + + // try to withdraw 1 link while there is 0 balance + vm.expectRevert(abi.encodeWithSelector(IAutomationRegistryMaster2_3.InvalidRecipient.selector)); + registry.withdrawLinkFees(ZERO_ADDRESS, 1); + + vm.stopPrank(); + } + + function testWithdrawLinkFeeSuccess() public { + //simulate a deposit of link to the liquidity pool + mintLink(address(registry), 1e10); + + //check there's a balance + assertGt(linkToken.balanceOf(address(registry)), 0); + + vm.startPrank(FINANCE_ADMIN); + + // try to withdraw 1 link while there is a ton of link available + registry.withdrawLinkFees(aMockAddress, 1); + + vm.stopPrank(); + + assertEq(linkToken.balanceOf(address(aMockAddress)), 1); + assertEq(linkToken.balanceOf(address(registry)), 1e10 - 1); + } + + function testWithdrawERC20FeeSuccess() public { + // simulate a deposit of ERC20 to the liquidity pool + mintERC20(address(registry), 1e10); + + // check there's a balance + assertGt(mockERC20.balanceOf(address(registry)), 0); + + vm.startPrank(FINANCE_ADMIN); + + // try to withdraw 1 link while there is a ton of link available + registry.withdrawERC20Fees(address(mockERC20), aMockAddress, 1); + + vm.stopPrank(); + + assertEq(mockERC20.balanceOf(address(aMockAddress)), 1); + assertEq(mockERC20.balanceOf(address(registry)), 1e10 - 1); + } +} + +contract SetConfig is SetUp { event ConfigSet( uint32 previousConfigBlockNumber, bytes32 configDigest, @@ -95,41 +132,56 @@ contract AutomationRegistry2_3_SetConfig is AutomationRegistry2_3_SetUp { bytes offchainConfig ); - function testSetConfigSuccess() public { - (uint32 configCount, , ) = registryMaster.latestConfigDetails(); - assertEq(configCount, 0); - ChainModuleBase module = new ChainModuleBase(); - - AutomationRegistryBase2_3.OnchainConfig memory cfg = AutomationRegistryBase2_3.OnchainConfig({ - paymentPremiumPPB: 10_000, - flatFeeMicroLink: 40_000, + address module = address(new ChainModuleBase()); + AutomationRegistryBase2_3.OnchainConfig cfg = + AutomationRegistryBase2_3.OnchainConfig({ checkGasLimit: 5_000_000, stalenessSeconds: 90_000, gasCeilingMultiplier: 0, - minUpkeepSpend: 0, maxPerformGas: 10_000_000, maxCheckDataSize: 5_000, maxPerformDataSize: 5_000, maxRevertDataSize: 5_000, fallbackGasPrice: 20_000_000_000, - fallbackLinkPrice: 200_000_000_000, + fallbackLinkPrice: 2_000_000_000, // $20 + fallbackNativePrice: 400_000_000_000, // $4,000 transcoder: 0xB1e66855FD67f6e85F0f0fA38cd6fBABdf00923c, registrars: s_registrars, upkeepPrivilegeManager: 0xD9c855F08A7e460691F41bBDDe6eC310bc0593D8, chainModule: module, - reorgProtectionEnabled: true + reorgProtectionEnabled: true, + financeAdmin: FINANCE_ADMIN + }); + + function testSetConfigSuccess() public { + (uint32 configCount, uint32 blockNumber, ) = registry.latestConfigDetails(); + assertEq(configCount, 1); + + address billingTokenAddress = address(0x1111111111111111111111111111111111111111); + address[] memory billingTokens = new address[](1); + billingTokens[0] = billingTokenAddress; + + AutomationRegistryBase2_3.BillingConfig[] memory billingConfigs = new AutomationRegistryBase2_3.BillingConfig[](1); + billingConfigs[0] = AutomationRegistryBase2_3.BillingConfig({ + gasFeePPB: 5_000, + flatFeeMicroLink: 20_000, + priceFeed: 0x2222222222222222222222222222222222222222, + fallbackPrice: 2_000_000_000, // $20 + minSpend: 100_000 }); + bytes memory onchainConfigBytes = abi.encode(cfg); + bytes memory onchainConfigBytesWithBilling = abi.encode(cfg, billingTokens, billingConfigs); uint256 a = 1234; - address b = address(0); + address b = ZERO_ADDRESS; bytes memory offchainConfigBytes = abi.encode(a, b); bytes32 configDigest = _configDigestFromConfigData( block.chainid, - address(registryMaster), + address(registry), ++configCount, - s_valid_signers, - s_valid_transmitters, + SIGNERS, + TRANSMITTERS, F, onchainConfigBytes, OFFCHAIN_CONFIG_VERSION, @@ -138,31 +190,226 @@ contract AutomationRegistry2_3_SetConfig is AutomationRegistry2_3_SetUp { vm.expectEmit(); emit ConfigSet( - 0, + blockNumber, configDigest, configCount, - s_valid_signers, - s_valid_transmitters, + SIGNERS, + TRANSMITTERS, F, onchainConfigBytes, OFFCHAIN_CONFIG_VERSION, offchainConfigBytes ); - registryMaster.setConfig( - s_valid_signers, - s_valid_transmitters, + registry.setConfig( + SIGNERS, + TRANSMITTERS, F, - onchainConfigBytes, + onchainConfigBytesWithBilling, + OFFCHAIN_CONFIG_VERSION, + offchainConfigBytes + ); + + (, , address[] memory signers, address[] memory transmitters, uint8 f) = registry.getState(); + + assertEq(signers, SIGNERS); + assertEq(transmitters, TRANSMITTERS); + assertEq(f, F); + + AutomationRegistryBase2_3.BillingConfig memory config = registry.getBillingTokenConfig(billingTokenAddress); + assertEq(config.gasFeePPB, 5_000); + assertEq(config.flatFeeMicroLink, 20_000); + assertEq(config.priceFeed, 0x2222222222222222222222222222222222222222); + assertEq(config.minSpend, 100_000); + + address[] memory tokens = registry.getBillingTokens(); + assertEq(tokens.length, 1); + } + + function testSetConfigMultipleBillingConfigsSuccess() public { + (uint32 configCount, , ) = registry.latestConfigDetails(); + assertEq(configCount, 1); + + address billingTokenAddress1 = address(0x1111111111111111111111111111111111111111); + address billingTokenAddress2 = address(0x1111111111111111111111111111111111111112); + address[] memory billingTokens = new address[](2); + billingTokens[0] = billingTokenAddress1; + billingTokens[1] = billingTokenAddress2; + + AutomationRegistryBase2_3.BillingConfig[] memory billingConfigs = new AutomationRegistryBase2_3.BillingConfig[](2); + billingConfigs[0] = AutomationRegistryBase2_3.BillingConfig({ + gasFeePPB: 5_001, + flatFeeMicroLink: 20_001, + priceFeed: 0x2222222222222222222222222222222222222221, + fallbackPrice: 100, + minSpend: 100 + }); + billingConfigs[1] = AutomationRegistryBase2_3.BillingConfig({ + gasFeePPB: 5_002, + flatFeeMicroLink: 20_002, + priceFeed: 0x2222222222222222222222222222222222222222, + fallbackPrice: 200, + minSpend: 200 + }); + + bytes memory onchainConfigBytesWithBilling = abi.encode(cfg, billingTokens, billingConfigs); + + uint256 a = 1234; + address b = ZERO_ADDRESS; + bytes memory offchainConfigBytes = abi.encode(a, b); + + registry.setConfig( + SIGNERS, + TRANSMITTERS, + F, + onchainConfigBytesWithBilling, OFFCHAIN_CONFIG_VERSION, offchainConfigBytes ); - (, , address[] memory signers, address[] memory transmitters, uint8 f) = registryMaster.getState(); + (, , address[] memory signers, address[] memory transmitters, uint8 f) = registry.getState(); - assertEq(signers, s_valid_signers); - assertEq(transmitters, s_valid_transmitters); + assertEq(signers, SIGNERS); + assertEq(transmitters, TRANSMITTERS); assertEq(f, F); + + AutomationRegistryBase2_3.BillingConfig memory config1 = registry.getBillingTokenConfig(billingTokenAddress1); + assertEq(config1.gasFeePPB, 5_001); + assertEq(config1.flatFeeMicroLink, 20_001); + assertEq(config1.priceFeed, 0x2222222222222222222222222222222222222221); + assertEq(config1.fallbackPrice, 100); + assertEq(config1.minSpend, 100); + + AutomationRegistryBase2_3.BillingConfig memory config2 = registry.getBillingTokenConfig(billingTokenAddress2); + assertEq(config2.gasFeePPB, 5_002); + assertEq(config2.flatFeeMicroLink, 20_002); + assertEq(config2.priceFeed, 0x2222222222222222222222222222222222222222); + assertEq(config2.fallbackPrice, 200); + assertEq(config2.minSpend, 200); + + address[] memory tokens = registry.getBillingTokens(); + assertEq(tokens.length, 2); + } + + function testSetConfigTwiceAndLastSetOverwrites() public { + (uint32 configCount, , ) = registry.latestConfigDetails(); + assertEq(configCount, 1); + + // BillingConfig1 + address billingTokenAddress1 = address(0x1111111111111111111111111111111111111111); + address[] memory billingTokens1 = new address[](1); + billingTokens1[0] = billingTokenAddress1; + + AutomationRegistryBase2_3.BillingConfig[] memory billingConfigs1 = new AutomationRegistryBase2_3.BillingConfig[](1); + billingConfigs1[0] = AutomationRegistryBase2_3.BillingConfig({ + gasFeePPB: 5_001, + flatFeeMicroLink: 20_001, + priceFeed: 0x2222222222222222222222222222222222222221, + fallbackPrice: 100, + minSpend: 100 + }); + + bytes memory onchainConfigBytesWithBilling1 = abi.encode(cfg, billingTokens1, billingConfigs1); + + // BillingConfig2 + address billingTokenAddress2 = address(0x1111111111111111111111111111111111111112); + address[] memory billingTokens2 = new address[](1); + billingTokens2[0] = billingTokenAddress2; + + AutomationRegistryBase2_3.BillingConfig[] memory billingConfigs2 = new AutomationRegistryBase2_3.BillingConfig[](1); + billingConfigs2[0] = AutomationRegistryBase2_3.BillingConfig({ + gasFeePPB: 5_002, + flatFeeMicroLink: 20_002, + priceFeed: 0x2222222222222222222222222222222222222222, + fallbackPrice: 200, + minSpend: 200 + }); + + bytes memory onchainConfigBytesWithBilling2 = abi.encode(cfg, billingTokens2, billingConfigs2); + + uint256 a = 1234; + address b = ZERO_ADDRESS; + bytes memory offchainConfigBytes = abi.encode(a, b); + + // set config once + registry.setConfig( + SIGNERS, + TRANSMITTERS, + F, + onchainConfigBytesWithBilling1, + OFFCHAIN_CONFIG_VERSION, + offchainConfigBytes + ); + + // set config twice + registry.setConfig( + SIGNERS, + TRANSMITTERS, + F, + onchainConfigBytesWithBilling2, + OFFCHAIN_CONFIG_VERSION, + offchainConfigBytes + ); + + (, , address[] memory signers, address[] memory transmitters, uint8 f) = registry.getState(); + + assertEq(signers, SIGNERS); + assertEq(transmitters, TRANSMITTERS); + assertEq(f, F); + + AutomationRegistryBase2_3.BillingConfig memory config2 = registry.getBillingTokenConfig(billingTokenAddress2); + assertEq(config2.gasFeePPB, 5_002); + assertEq(config2.flatFeeMicroLink, 20_002); + assertEq(config2.priceFeed, 0x2222222222222222222222222222222222222222); + assertEq(config2.fallbackPrice, 200); + assertEq(config2.minSpend, 200); + + address[] memory tokens = registry.getBillingTokens(); + assertEq(tokens.length, 1); + } + + function testSetConfigDuplicateBillingConfigFailure() public { + (uint32 configCount, , ) = registry.latestConfigDetails(); + assertEq(configCount, 1); + + address billingTokenAddress1 = address(0x1111111111111111111111111111111111111111); + address billingTokenAddress2 = address(0x1111111111111111111111111111111111111111); + address[] memory billingTokens = new address[](2); + billingTokens[0] = billingTokenAddress1; + billingTokens[1] = billingTokenAddress2; + + AutomationRegistryBase2_3.BillingConfig[] memory billingConfigs = new AutomationRegistryBase2_3.BillingConfig[](2); + billingConfigs[0] = AutomationRegistryBase2_3.BillingConfig({ + gasFeePPB: 5_001, + flatFeeMicroLink: 20_001, + priceFeed: 0x2222222222222222222222222222222222222221, + fallbackPrice: 100, + minSpend: 100 + }); + billingConfigs[1] = AutomationRegistryBase2_3.BillingConfig({ + gasFeePPB: 5_002, + flatFeeMicroLink: 20_002, + priceFeed: 0x2222222222222222222222222222222222222222, + fallbackPrice: 200, + minSpend: 200 + }); + + bytes memory onchainConfigBytesWithBilling = abi.encode(cfg, billingTokens, billingConfigs); + + uint256 a = 1234; + address b = ZERO_ADDRESS; + bytes memory offchainConfigBytes = abi.encode(a, b); + + // expect revert because of duplicate tokens + vm.expectRevert(abi.encodeWithSelector(IAutomationRegistryMaster2_3.DuplicateEntry.selector)); + registry.setConfig( + SIGNERS, + TRANSMITTERS, + F, + onchainConfigBytesWithBilling, + OFFCHAIN_CONFIG_VERSION, + offchainConfigBytes + ); } function _configDigestFromConfigData( diff --git a/contracts/src/v0.8/automation/dev/test/BaseTest.t.sol b/contracts/src/v0.8/automation/dev/test/BaseTest.t.sol index 790afcff4c7..9569467a86b 100644 --- a/contracts/src/v0.8/automation/dev/test/BaseTest.t.sol +++ b/contracts/src/v0.8/automation/dev/test/BaseTest.t.sol @@ -3,11 +3,212 @@ pragma solidity 0.8.19; import "forge-std/Test.sol"; +// import {LinkTokenInterface} from "../../../shared/interfaces/LinkTokenInterface.sol"; +import {LinkToken} from "../../../shared/token/ERC677/LinkToken.sol"; +import {ERC20Mock} from "../../../vendor/openzeppelin-solidity/v4.8.3/contracts/mocks/ERC20Mock.sol"; +import {MockV3Aggregator} from "../../../tests/MockV3Aggregator.sol"; +import {AutomationForwarderLogic} from "../../AutomationForwarderLogic.sol"; +import {AutomationRegistry2_3} from "../v2_3/AutomationRegistry2_3.sol"; +import {AutomationRegistryLogicA2_3} from "../v2_3/AutomationRegistryLogicA2_3.sol"; +import {AutomationRegistryLogicB2_3} from "../v2_3/AutomationRegistryLogicB2_3.sol"; +import {AutomationRegistryLogicC2_3} from "../v2_3/AutomationRegistryLogicC2_3.sol"; +import {IAutomationRegistryMaster2_3, AutomationRegistryBase2_3} from "../interfaces/v2_3/IAutomationRegistryMaster2_3.sol"; +import {AutomationRegistrar2_3} from "../v2_3/AutomationRegistrar2_3.sol"; +import {ChainModuleBase} from "../../chains/ChainModuleBase.sol"; +import {IERC20} from "../../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/IERC20.sol"; +import {MockUpkeep} from "../../mocks/MockUpkeep.sol"; + +/** + * @title BaseTest provides basic test setup procedures and dependancies for use by other + * unit tests + */ contract BaseTest is Test { - address internal OWNER = 0x00007e64E1fB0C487F25dd6D3601ff6aF8d32e4e; + // constants + address internal constant ZERO_ADDRESS = address(0); + + // config + uint8 internal constant F = 1; // number of faulty nodes + uint64 internal constant OFFCHAIN_CONFIG_VERSION = 30; // 2 for OCR2 + + // contracts + LinkToken internal linkToken; + ERC20Mock internal mockERC20; + MockV3Aggregator internal LINK_USD_FEED; + MockV3Aggregator internal NATIVE_USD_FEED; + MockV3Aggregator internal USDTOKEN_USD_FEED; + MockV3Aggregator internal FAST_GAS_FEED; + MockUpkeep internal TARGET1; + MockUpkeep internal TARGET2; + + // roles + address internal constant OWNER = address(uint160(uint256(keccak256("OWNER")))); + address internal constant UPKEEP_ADMIN = address(uint160(uint256(keccak256("UPKEEP_ADMIN")))); + address internal constant FINANCE_ADMIN = address(uint160(uint256(keccak256("FINANCE_ADMIN")))); + address internal constant STRANGER = address(uint160(uint256(keccak256("STRANGER")))); + address internal constant BROKE_USER = address(uint160(uint256(keccak256("BROKE_USER")))); // do not mint to this address + + // nodes + uint256 internal constant SIGNING_KEY0 = 0x7b2e97fe057e6de99d6872a2ef2abf52c9b4469bc848c2465ac3fcd8d336e81d; + uint256 internal constant SIGNING_KEY1 = 0xab56160806b05ef1796789248e1d7f34a6465c5280899159d645218cd216cee6; + uint256 internal constant SIGNING_KEY2 = 0x6ec7caa8406a49b76736602810e0a2871959fbbb675e23a8590839e4717f1f7f; + uint256 internal constant SIGNING_KEY3 = 0x80f14b11da94ae7f29d9a7713ea13dc838e31960a5c0f2baf45ed458947b730a; + address[] internal SIGNERS = new address[](4); + address[] internal TRANSMITTERS = new address[](4); function setUp() public virtual { vm.startPrank(OWNER); - deal(OWNER, 1e20); + linkToken = new LinkToken(); + linkToken.grantMintRole(OWNER); + mockERC20 = new ERC20Mock("MOCK_ERC20", "MOCK_ERC20", OWNER, 0); + + LINK_USD_FEED = new MockV3Aggregator(8, 2_000_000_000); // $20 + NATIVE_USD_FEED = new MockV3Aggregator(8, 400_000_000_000); // $4,000 + USDTOKEN_USD_FEED = new MockV3Aggregator(8, 100_000_000); // $1 + FAST_GAS_FEED = new MockV3Aggregator(0, 1_000_000_000); // 1 gwei + + TARGET1 = new MockUpkeep(); + TARGET2 = new MockUpkeep(); + + SIGNERS[0] = vm.addr(SIGNING_KEY0); //0xc110458BE52CaA6bB68E66969C3218A4D9Db0211 + SIGNERS[1] = vm.addr(SIGNING_KEY1); //0xc110a19c08f1da7F5FfB281dc93630923F8E3719 + SIGNERS[2] = vm.addr(SIGNING_KEY2); //0xc110fdF6e8fD679C7Cc11602d1cd829211A18e9b + SIGNERS[3] = vm.addr(SIGNING_KEY3); //0xc11028017c9b445B6bF8aE7da951B5cC28B326C0 + + TRANSMITTERS[0] = address(uint160(uint256(keccak256("TRANSMITTER1")))); + TRANSMITTERS[1] = address(uint160(uint256(keccak256("TRANSMITTER2")))); + TRANSMITTERS[2] = address(uint160(uint256(keccak256("TRANSMITTER3")))); + TRANSMITTERS[3] = address(uint160(uint256(keccak256("TRANSMITTER4")))); + + // mint funds + vm.deal(UPKEEP_ADMIN, 10 ether); + vm.deal(FINANCE_ADMIN, 10 ether); + vm.deal(STRANGER, 10 ether); + linkToken.mint(UPKEEP_ADMIN, 1000e18); + linkToken.mint(FINANCE_ADMIN, 1000e18); + linkToken.mint(STRANGER, 1000e18); + mockERC20.mint(UPKEEP_ADMIN, 1000e18); + mockERC20.mint(FINANCE_ADMIN, 1000e18); + mockERC20.mint(STRANGER, 1000e18); + + vm.stopPrank(); + } + + /** + * @notice deploys the component parts of a registry, but nothing more + */ + function deployRegistry() internal returns (IAutomationRegistryMaster2_3) { + AutomationForwarderLogic forwarderLogic = new AutomationForwarderLogic(); + AutomationRegistryLogicC2_3 logicC2_3 = new AutomationRegistryLogicC2_3( + address(linkToken), + address(LINK_USD_FEED), + address(NATIVE_USD_FEED), + address(FAST_GAS_FEED), + address(forwarderLogic), + ZERO_ADDRESS + ); + AutomationRegistryLogicB2_3 logicB2_3 = new AutomationRegistryLogicB2_3(logicC2_3); + AutomationRegistryLogicA2_3 logicA2_3 = new AutomationRegistryLogicA2_3(logicB2_3); + return IAutomationRegistryMaster2_3(address(new AutomationRegistry2_3(logicA2_3))); + } + + /** + * @notice deploys and configures a regisry, registrar, and everything needed for most tests + */ + function deployAndConfigureAll() internal returns (IAutomationRegistryMaster2_3, AutomationRegistrar2_3) { + IAutomationRegistryMaster2_3 registry = deployRegistry(); + // deploy & configure registrar + AutomationRegistrar2_3.InitialTriggerConfig[] + memory triggerConfigs = new AutomationRegistrar2_3.InitialTriggerConfig[](2); + triggerConfigs[0] = AutomationRegistrar2_3.InitialTriggerConfig({ + triggerType: 0, // condition + autoApproveType: AutomationRegistrar2_3.AutoApproveType.DISABLED, + autoApproveMaxAllowed: 0 + }); + triggerConfigs[1] = AutomationRegistrar2_3.InitialTriggerConfig({ + triggerType: 1, // log + autoApproveType: AutomationRegistrar2_3.AutoApproveType.DISABLED, + autoApproveMaxAllowed: 0 + }); + IERC20[] memory billingTokens = new IERC20[](2); + billingTokens[0] = IERC20(address(linkToken)); + billingTokens[1] = IERC20(address(mockERC20)); + uint256[] memory minRegistrationFees = new uint256[](billingTokens.length); + minRegistrationFees[0] = 5000000000000000000; // 5 LINK + minRegistrationFees[1] = 100000000000000000000; // 100 USD + AutomationRegistrar2_3 registrar = new AutomationRegistrar2_3( + address(linkToken), + registry, + triggerConfigs, + billingTokens, + minRegistrationFees + ); + // configure registry + address[] memory registrars = new address[](1); + registrars[0] = address(registrar); + address[] memory billingTokenAddresses = new address[](billingTokens.length); + for (uint256 i = 0; i < billingTokens.length; i++) { + billingTokenAddresses[i] = address(billingTokens[i]); + } + AutomationRegistryBase2_3.OnchainConfig memory cfg = 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: registrars, + upkeepPrivilegeManager: 0xD9c855F08A7e460691F41bBDDe6eC310bc0593D8, + chainModule: address(new ChainModuleBase()), + reorgProtectionEnabled: true, + financeAdmin: FINANCE_ADMIN + }); + AutomationRegistryBase2_3.BillingConfig[] + memory billingTokenConfigs = new AutomationRegistryBase2_3.BillingConfig[](2); + billingTokenConfigs[0] = AutomationRegistryBase2_3.BillingConfig({ + gasFeePPB: 10_000_000, // 10% + flatFeeMicroLink: 100_000, + priceFeed: address(LINK_USD_FEED), + fallbackPrice: 1_000_000_000, // $10 + minSpend: 5000000000000000000 // 5 LINK + }); + billingTokenConfigs[1] = AutomationRegistryBase2_3.BillingConfig({ + gasFeePPB: 10_000_000, // 15% + flatFeeMicroLink: 100_000, + priceFeed: address(USDTOKEN_USD_FEED), + fallbackPrice: 100_000_000, // $1 + minSpend: 100000000000000000000 // 100 USD + }); + registry.setConfigTypeSafe( + SIGNERS, + TRANSMITTERS, + F, + cfg, + OFFCHAIN_CONFIG_VERSION, + "", + billingTokenAddresses, + billingTokenConfigs + ); + return (registry, registrar); + } + + /** + * @dev mints LINK to the recipient + */ + function mintLink(address recipient, uint256 amount) public { + vm.prank(OWNER); + linkToken.mint(recipient, amount); + } + + /** + * @dev mints USDToken to the recipient + */ + function mintERC20(address recipient, uint256 amount) public { + vm.prank(OWNER); + mockERC20.mint(recipient, amount); } } diff --git a/contracts/src/v0.8/automation/dev/v2_2/AutomationRegistrar2_2.sol b/contracts/src/v0.8/automation/dev/v2_2/AutomationRegistrar2_2.sol deleted file mode 100644 index 8d2fe775ee8..00000000000 --- a/contracts/src/v0.8/automation/dev/v2_2/AutomationRegistrar2_2.sol +++ /dev/null @@ -1,535 +0,0 @@ -// SPDX-License-Identifier: BUSL-1.1 -pragma solidity 0.8.19; - -import {LinkTokenInterface} from "../../../shared/interfaces/LinkTokenInterface.sol"; -import {IAutomationRegistryMaster} from "../interfaces/v2_2/IAutomationRegistryMaster.sol"; -import {TypeAndVersionInterface} from "../../../interfaces/TypeAndVersionInterface.sol"; -import {ConfirmedOwner} from "../../../shared/access/ConfirmedOwner.sol"; -import {IERC677Receiver} from "../../../shared/interfaces/IERC677Receiver.sol"; - -/** - * @notice Contract to accept requests for upkeep registrations - * @dev There are 2 registration workflows in this contract - * Flow 1. auto approve OFF / manual registration - UI calls `register` function on this contract, this contract owner at a later time then manually - * calls `approve` to register upkeep and emit events to inform UI and others interested. - * Flow 2. auto approve ON / real time registration - UI calls `register` function as before, which calls the `registerUpkeep` function directly on - * keeper registry and then emits approved event to finish the flow automatically without manual intervention. - * The idea is to have same interface(functions,events) for UI or anyone using this contract irrespective of auto approve being enabled or not. - * they can just listen to `RegistrationRequested` & `RegistrationApproved` events and know the status on registrations. - */ -contract AutomationRegistrar2_2 is TypeAndVersionInterface, ConfirmedOwner, IERC677Receiver { - /** - * DISABLED: No auto approvals, all new upkeeps should be approved manually. - * ENABLED_SENDER_ALLOWLIST: Auto approvals for allowed senders subject to max allowed. Manual for rest. - * ENABLED_ALL: Auto approvals for all new upkeeps subject to max allowed. - */ - enum AutoApproveType { - DISABLED, - ENABLED_SENDER_ALLOWLIST, - ENABLED_ALL - } - - bytes4 private constant REGISTER_REQUEST_SELECTOR = this.register.selector; - - mapping(bytes32 => PendingRequest) private s_pendingRequests; - mapping(uint8 => TriggerRegistrationStorage) private s_triggerRegistrations; - - LinkTokenInterface public immutable LINK; - - /** - * @notice versions: - * - KeeperRegistrar 2.1.0: Update for compatability with registry 2.1.0 - * Add auto approval levels by type - * - KeeperRegistrar 2.0.0: Remove source from register - * Breaks our example of "Register an Upkeep using your own deployed contract" - * - KeeperRegistrar 1.1.0: Add functionality for sender allowlist in auto approve - * : Remove rate limit and add max allowed for auto approve - * - KeeperRegistrar 1.0.0: initial release - */ - string public constant override typeAndVersion = "AutomationRegistrar 2.1.0"; - - /** - * @notice TriggerRegistrationStorage stores the auto-approval levels for upkeeps by type - * @member autoApproveType the auto approval setting (see enum) - * @member autoApproveMaxAllowed the max number of upkeeps that can be auto approved of this type - * @member approvedCount the count of upkeeps auto approved of this type - */ - struct TriggerRegistrationStorage { - AutoApproveType autoApproveType; - uint32 autoApproveMaxAllowed; - uint32 approvedCount; - } - - /** - * @notice InitialTriggerConfig configures the auto-approval levels for upkeeps by trigger type - * @dev this struct is only used in the constructor to set the initial values for various trigger configs - * @member triggerType the upkeep type to configure - * @member autoApproveType the auto approval setting (see enum) - * @member autoApproveMaxAllowed the max number of upkeeps that can be auto approved of this type - */ - struct InitialTriggerConfig { - uint8 triggerType; - AutoApproveType autoApproveType; - uint32 autoApproveMaxAllowed; - } - - struct RegistrarConfig { - IAutomationRegistryMaster AutomationRegistry; - uint96 minLINKJuels; - } - - struct PendingRequest { - address admin; - uint96 balance; - } - - struct RegistrationParams { - string name; - bytes encryptedEmail; - address upkeepContract; - uint32 gasLimit; - address adminAddress; - uint8 triggerType; - bytes checkData; - bytes triggerConfig; - bytes offchainConfig; - uint96 amount; - } - - RegistrarConfig private s_config; - // Only applicable if s_config.configType is ENABLED_SENDER_ALLOWLIST - mapping(address => bool) private s_autoApproveAllowedSenders; - - event RegistrationRequested( - bytes32 indexed hash, - string name, - bytes encryptedEmail, - address indexed upkeepContract, - uint32 gasLimit, - address adminAddress, - uint8 triggerType, - bytes triggerConfig, - bytes offchainConfig, - bytes checkData, - uint96 amount - ); - - event RegistrationApproved(bytes32 indexed hash, string displayName, uint256 indexed upkeepId); - - event RegistrationRejected(bytes32 indexed hash); - - event AutoApproveAllowedSenderSet(address indexed senderAddress, bool allowed); - - event ConfigChanged(address AutomationRegistry, uint96 minLINKJuels); - - event TriggerConfigSet(uint8 triggerType, AutoApproveType autoApproveType, uint32 autoApproveMaxAllowed); - - error InvalidAdminAddress(); - error RequestNotFound(); - error HashMismatch(); - error OnlyAdminOrOwner(); - error InsufficientPayment(); - error RegistrationRequestFailed(); - error OnlyLink(); - error AmountMismatch(); - error SenderMismatch(); - error FunctionNotPermitted(); - error LinkTransferFailed(address to); - error InvalidDataLength(); - - /** - * @param LINKAddress Address of Link token - * @param AutomationRegistry keeper registry address - * @param minLINKJuels minimum LINK that new registrations should fund their upkeep with - * @param triggerConfigs the initial config for individual triggers - */ - constructor( - address LINKAddress, - address AutomationRegistry, - uint96 minLINKJuels, - InitialTriggerConfig[] memory triggerConfigs - ) ConfirmedOwner(msg.sender) { - LINK = LinkTokenInterface(LINKAddress); - setConfig(AutomationRegistry, minLINKJuels); - for (uint256 idx = 0; idx < triggerConfigs.length; idx++) { - setTriggerConfig( - triggerConfigs[idx].triggerType, - triggerConfigs[idx].autoApproveType, - triggerConfigs[idx].autoApproveMaxAllowed - ); - } - } - - //EXTERNAL - - /** - * @notice register can only be called through transferAndCall on LINK contract - * @param name string of the upkeep to be registered - * @param encryptedEmail email address of upkeep contact - * @param upkeepContract address to perform upkeep on - * @param gasLimit amount of gas to provide the target contract when performing upkeep - * @param adminAddress address to cancel upkeep and withdraw remaining funds - * @param triggerType the type of trigger for the upkeep - * @param checkData data passed to the contract when checking for upkeep - * @param triggerConfig the config for the trigger - * @param offchainConfig offchainConfig for upkeep in bytes - * @param amount quantity of LINK upkeep is funded with (specified in Juels) - * @param sender address of the sender making the request - */ - function register( - string memory name, - bytes calldata encryptedEmail, - address upkeepContract, - uint32 gasLimit, - address adminAddress, - uint8 triggerType, - bytes memory checkData, - bytes memory triggerConfig, - bytes memory offchainConfig, - uint96 amount, - address sender - ) external onlyLINK { - _register( - RegistrationParams({ - name: name, - encryptedEmail: encryptedEmail, - upkeepContract: upkeepContract, - gasLimit: gasLimit, - adminAddress: adminAddress, - triggerType: triggerType, - checkData: checkData, - triggerConfig: triggerConfig, - offchainConfig: offchainConfig, - amount: amount - }), - sender - ); - } - - /** - * @notice Allows external users to register upkeeps; assumes amount is approved for transfer by the contract - * @param requestParams struct of all possible registration parameters - */ - function registerUpkeep(RegistrationParams calldata requestParams) external returns (uint256) { - if (requestParams.amount < s_config.minLINKJuels) { - revert InsufficientPayment(); - } - - LINK.transferFrom(msg.sender, address(this), requestParams.amount); - - return _register(requestParams, msg.sender); - } - - /** - * @dev register upkeep on AutomationRegistry contract and emit RegistrationApproved event - */ - function approve( - string memory name, - address upkeepContract, - uint32 gasLimit, - address adminAddress, - uint8 triggerType, - bytes calldata checkData, - bytes memory triggerConfig, - bytes calldata offchainConfig, - bytes32 hash - ) external onlyOwner { - PendingRequest memory request = s_pendingRequests[hash]; - if (request.admin == address(0)) { - revert RequestNotFound(); - } - bytes32 expectedHash = keccak256( - abi.encode(upkeepContract, gasLimit, adminAddress, triggerType, checkData, triggerConfig, offchainConfig) - ); - if (hash != expectedHash) { - revert HashMismatch(); - } - delete s_pendingRequests[hash]; - _approve( - RegistrationParams({ - name: name, - encryptedEmail: "", - upkeepContract: upkeepContract, - gasLimit: gasLimit, - adminAddress: adminAddress, - triggerType: triggerType, - checkData: checkData, - triggerConfig: triggerConfig, - offchainConfig: offchainConfig, - amount: request.balance - }), - expectedHash - ); - } - - /** - * @notice cancel will remove a registration request and return the refunds to the request.admin - * @param hash the request hash - */ - function cancel(bytes32 hash) external { - PendingRequest memory request = s_pendingRequests[hash]; - if (!(msg.sender == request.admin || msg.sender == owner())) { - revert OnlyAdminOrOwner(); - } - if (request.admin == address(0)) { - revert RequestNotFound(); - } - delete s_pendingRequests[hash]; - bool success = LINK.transfer(request.admin, request.balance); - if (!success) { - revert LinkTransferFailed(request.admin); - } - emit RegistrationRejected(hash); - } - - /** - * @notice owner calls this function to set contract config - * @param AutomationRegistry new keeper registry address - * @param minLINKJuels minimum LINK that new registrations should fund their upkeep with - */ - function setConfig(address AutomationRegistry, uint96 minLINKJuels) public onlyOwner { - s_config = RegistrarConfig({ - minLINKJuels: minLINKJuels, - AutomationRegistry: IAutomationRegistryMaster(AutomationRegistry) - }); - emit ConfigChanged(AutomationRegistry, minLINKJuels); - } - - /** - * @notice owner calls to set the config for this upkeep type - * @param triggerType the upkeep type to configure - * @param autoApproveType the auto approval setting (see enum) - * @param autoApproveMaxAllowed the max number of upkeeps that can be auto approved of this type - */ - function setTriggerConfig( - uint8 triggerType, - AutoApproveType autoApproveType, - uint32 autoApproveMaxAllowed - ) public onlyOwner { - s_triggerRegistrations[triggerType].autoApproveType = autoApproveType; - s_triggerRegistrations[triggerType].autoApproveMaxAllowed = autoApproveMaxAllowed; - emit TriggerConfigSet(triggerType, autoApproveType, autoApproveMaxAllowed); - } - - /** - * @notice owner calls this function to set allowlist status for senderAddress - * @param senderAddress senderAddress to set the allowlist status for - * @param allowed true if senderAddress needs to be added to allowlist, false if needs to be removed - */ - function setAutoApproveAllowedSender(address senderAddress, bool allowed) external onlyOwner { - s_autoApproveAllowedSenders[senderAddress] = allowed; - - emit AutoApproveAllowedSenderSet(senderAddress, allowed); - } - - /** - * @notice read the allowlist status of senderAddress - * @param senderAddress address to read the allowlist status for - */ - function getAutoApproveAllowedSender(address senderAddress) external view returns (bool) { - return s_autoApproveAllowedSenders[senderAddress]; - } - - /** - * @notice read the current registration configuration - */ - function getConfig() external view returns (address AutomationRegistry, uint256 minLINKJuels) { - RegistrarConfig memory config = s_config; - return (address(config.AutomationRegistry), config.minLINKJuels); - } - - /** - * @notice read the config for this upkeep type - * @param triggerType upkeep type to read config for - */ - function getTriggerRegistrationDetails(uint8 triggerType) external view returns (TriggerRegistrationStorage memory) { - return s_triggerRegistrations[triggerType]; - } - - /** - * @notice gets the admin address and the current balance of a registration request - */ - function getPendingRequest(bytes32 hash) external view returns (address, uint96) { - PendingRequest memory request = s_pendingRequests[hash]; - return (request.admin, request.balance); - } - - /** - * @notice Called when LINK is sent to the contract via `transferAndCall` - * @param sender Address of the sender transfering LINK - * @param amount Amount of LINK sent (specified in Juels) - * @param data Payload of the transaction - */ - function onTokenTransfer( - address sender, - uint256 amount, - bytes calldata data - ) - external - override - onlyLINK - permittedFunctionsForLINK(data) - isActualAmount(amount, data) - isActualSender(sender, data) - { - if (amount < s_config.minLINKJuels) { - revert InsufficientPayment(); - } - (bool success, ) = address(this).delegatecall(data); - // calls register - if (!success) { - revert RegistrationRequestFailed(); - } - } - - // ================================================================ - // | PRIVATE | - // ================================================================ - - /** - * @dev verify registration request and emit RegistrationRequested event - */ - function _register(RegistrationParams memory params, address sender) private returns (uint256) { - if (params.adminAddress == address(0)) { - revert InvalidAdminAddress(); - } - bytes32 hash = keccak256( - abi.encode( - params.upkeepContract, - params.gasLimit, - params.adminAddress, - params.triggerType, - params.checkData, - params.triggerConfig, - params.offchainConfig - ) - ); - - emit RegistrationRequested( - hash, - params.name, - params.encryptedEmail, - params.upkeepContract, - params.gasLimit, - params.adminAddress, - params.triggerType, - params.triggerConfig, - params.offchainConfig, - params.checkData, - params.amount - ); - - uint256 upkeepId; - if (_shouldAutoApprove(s_triggerRegistrations[params.triggerType], sender)) { - s_triggerRegistrations[params.triggerType].approvedCount++; - upkeepId = _approve(params, hash); - } else { - uint96 newBalance = s_pendingRequests[hash].balance + params.amount; - s_pendingRequests[hash] = PendingRequest({admin: params.adminAddress, balance: newBalance}); - } - - return upkeepId; - } - - /** - * @dev register upkeep on AutomationRegistry contract and emit RegistrationApproved event - */ - function _approve(RegistrationParams memory params, bytes32 hash) private returns (uint256) { - IAutomationRegistryMaster AutomationRegistry = s_config.AutomationRegistry; - uint256 upkeepId = AutomationRegistry.registerUpkeep( - params.upkeepContract, - params.gasLimit, - params.adminAddress, - params.triggerType, - params.checkData, - params.triggerConfig, - params.offchainConfig - ); - bool success = LINK.transferAndCall(address(AutomationRegistry), params.amount, abi.encode(upkeepId)); - if (!success) { - revert LinkTransferFailed(address(AutomationRegistry)); - } - emit RegistrationApproved(hash, params.name, upkeepId); - return upkeepId; - } - - /** - * @dev verify sender allowlist if needed and check max limit - */ - function _shouldAutoApprove(TriggerRegistrationStorage memory config, address sender) private view returns (bool) { - if (config.autoApproveType == AutoApproveType.DISABLED) { - return false; - } - if (config.autoApproveType == AutoApproveType.ENABLED_SENDER_ALLOWLIST && (!s_autoApproveAllowedSenders[sender])) { - return false; - } - if (config.approvedCount < config.autoApproveMaxAllowed) { - return true; - } - return false; - } - - // ================================================================ - // | MODIFIERS | - // ================================================================ - - /** - * @dev Reverts if not sent from the LINK token - */ - modifier onlyLINK() { - if (msg.sender != address(LINK)) { - revert OnlyLink(); - } - _; - } - - /** - * @dev Reverts if the given data does not begin with the `register` function selector - * @param _data The data payload of the request - */ - modifier permittedFunctionsForLINK(bytes memory _data) { - bytes4 funcSelector; - assembly { - // solhint-disable-next-line avoid-low-level-calls - funcSelector := mload(add(_data, 32)) // First 32 bytes contain length of data - } - if (funcSelector != REGISTER_REQUEST_SELECTOR) { - revert FunctionNotPermitted(); - } - _; - } - - /** - * @dev Reverts if the actual amount passed does not match the expected amount - * @param expected amount that should match the actual amount - * @param data bytes - */ - modifier isActualAmount(uint256 expected, bytes calldata data) { - // decode register function arguments to get actual amount - (, , , , , , , , , uint96 amount, ) = abi.decode( - data[4:], - (string, bytes, address, uint32, address, uint8, bytes, bytes, bytes, uint96, address) - ); - if (expected != amount) { - revert AmountMismatch(); - } - _; - } - - /** - * @dev Reverts if the actual sender address does not match the expected sender address - * @param expected address that should match the actual sender address - * @param data bytes - */ - modifier isActualSender(address expected, bytes calldata data) { - // decode register function arguments to get actual sender - (, , , , , , , , , , address sender) = abi.decode( - data[4:], - (string, bytes, address, uint32, address, uint8, bytes, bytes, bytes, uint96, address) - ); - if (expected != sender) { - revert SenderMismatch(); - } - _; - } -} diff --git a/contracts/src/v0.8/automation/dev/v2_3/AutomationRegistrar2_3.sol b/contracts/src/v0.8/automation/dev/v2_3/AutomationRegistrar2_3.sol index e1f53fe07e9..9e4df461705 100644 --- a/contracts/src/v0.8/automation/dev/v2_3/AutomationRegistrar2_3.sol +++ b/contracts/src/v0.8/automation/dev/v2_3/AutomationRegistrar2_3.sol @@ -2,10 +2,11 @@ pragma solidity 0.8.19; import {LinkTokenInterface} from "../../../shared/interfaces/LinkTokenInterface.sol"; -import {IAutomationRegistryMaster} from "../interfaces/v2_3/IAutomationRegistryMaster2_3.sol"; +import {IAutomationRegistryMaster2_3} from "../interfaces/v2_3/IAutomationRegistryMaster2_3.sol"; import {TypeAndVersionInterface} from "../../../interfaces/TypeAndVersionInterface.sol"; import {ConfirmedOwner} from "../../../shared/access/ConfirmedOwner.sol"; import {IERC677Receiver} from "../../../shared/interfaces/IERC677Receiver.sol"; +import {IERC20} from "../../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/IERC20.sol"; /** * @notice Contract to accept requests for upkeep registrations @@ -29,13 +30,6 @@ contract AutomationRegistrar2_3 is TypeAndVersionInterface, ConfirmedOwner, IERC ENABLED_ALL } - bytes4 private constant REGISTER_REQUEST_SELECTOR = this.register.selector; - - mapping(bytes32 => PendingRequest) private s_pendingRequests; - mapping(uint8 => TriggerRegistrationStorage) private s_triggerRegistrations; - - LinkTokenInterface public immutable LINK; - /** * @notice versions: * - KeeperRegistrar 2.3.0: Update for compatability with registry 2.3.0 @@ -75,32 +69,48 @@ contract AutomationRegistrar2_3 is TypeAndVersionInterface, ConfirmedOwner, IERC uint32 autoApproveMaxAllowed; } - struct RegistrarConfig { - IAutomationRegistryMaster AutomationRegistry; - uint96 minLINKJuels; - } - struct PendingRequest { address admin; uint96 balance; } - + /** + * @member upkeepContract address to perform upkeep on + * @member amount quantity of LINK upkeep is funded with (specified in wei) + * @member adminAddress address to cancel upkeep and withdraw remaining funds + * @member gasLimit amount of gas to provide the target contract when performing upkeep + * @member triggerType the type of trigger for the upkeep + * @member billingToken the token to pay with + * @member name string of the upkeep to be registered + * @member encryptedEmail email address of upkeep contact + * @member checkData data passed to the contract when checking for upkeep + * @member triggerConfig the config for the trigger + * @member offchainConfig offchainConfig for upkeep in bytes + */ struct RegistrationParams { - string name; - bytes encryptedEmail; address upkeepContract; - uint32 gasLimit; + uint96 amount; + // 1 word full address adminAddress; + uint32 gasLimit; uint8 triggerType; + // 7 bytes left in 2nd word + IERC20 billingToken; + // 12 bytes left in 3rd word + string name; + bytes encryptedEmail; bytes checkData; bytes triggerConfig; bytes offchainConfig; - uint96 amount; } - RegistrarConfig private s_config; - // Only applicable if s_config.configType is ENABLED_SENDER_ALLOWLIST + LinkTokenInterface public immutable LINK; + IAutomationRegistryMaster2_3 s_registry; + + // Only applicable if trigger config is set to ENABLED_SENDER_ALLOWLIST mapping(address => bool) private s_autoApproveAllowedSenders; + mapping(IERC20 => uint256) private s_minRegistrationAmounts; + mapping(bytes32 => PendingRequest) private s_pendingRequests; + mapping(uint8 => TriggerRegistrationStorage) private s_triggerRegistrations; event RegistrationRequested( bytes32 indexed hash, @@ -122,37 +132,36 @@ contract AutomationRegistrar2_3 is TypeAndVersionInterface, ConfirmedOwner, IERC event AutoApproveAllowedSenderSet(address indexed senderAddress, bool allowed); - event ConfigChanged(address AutomationRegistry, uint96 minLINKJuels); + event ConfigChanged(); event TriggerConfigSet(uint8 triggerType, AutoApproveType autoApproveType, uint32 autoApproveMaxAllowed); - error InvalidAdminAddress(); - error RequestNotFound(); error HashMismatch(); - error OnlyAdminOrOwner(); error InsufficientPayment(); - error RegistrationRequestFailed(); - error OnlyLink(); - error AmountMismatch(); - error SenderMismatch(); - error FunctionNotPermitted(); - error LinkTransferFailed(address to); + error InvalidAdminAddress(); + error InvalidBillingToken(); error InvalidDataLength(); + error TransferFailed(address to); + error OnlyAdminOrOwner(); + error OnlyLink(); + error RequestNotFound(); /** * @param LINKAddress Address of Link token - * @param AutomationRegistry keeper registry address - * @param minLINKJuels minimum LINK that new registrations should fund their upkeep with + * @param registry keeper registry address * @param triggerConfigs the initial config for individual triggers + * @param billingTokens the tokens allowed for billing + * @param minRegistrationFees the minimum amount for registering with each billing token */ constructor( address LINKAddress, - address AutomationRegistry, - uint96 minLINKJuels, - InitialTriggerConfig[] memory triggerConfigs + IAutomationRegistryMaster2_3 registry, + InitialTriggerConfig[] memory triggerConfigs, + IERC20[] memory billingTokens, + uint256[] memory minRegistrationFees ) ConfirmedOwner(msg.sender) { LINK = LinkTokenInterface(LINKAddress); - setConfig(AutomationRegistry, minLINKJuels); + setConfig(registry, billingTokens, minRegistrationFees); for (uint256 idx = 0; idx < triggerConfigs.length; idx++) { setTriggerConfig( triggerConfigs[idx].triggerType, @@ -164,104 +173,33 @@ contract AutomationRegistrar2_3 is TypeAndVersionInterface, ConfirmedOwner, IERC //EXTERNAL - /** - * @notice register can only be called through transferAndCall on LINK contract - * @param name string of the upkeep to be registered - * @param encryptedEmail email address of upkeep contact - * @param upkeepContract address to perform upkeep on - * @param gasLimit amount of gas to provide the target contract when performing upkeep - * @param adminAddress address to cancel upkeep and withdraw remaining funds - * @param triggerType the type of trigger for the upkeep - * @param checkData data passed to the contract when checking for upkeep - * @param triggerConfig the config for the trigger - * @param offchainConfig offchainConfig for upkeep in bytes - * @param amount quantity of LINK upkeep is funded with (specified in Juels) - * @param sender address of the sender making the request - */ - function register( - string memory name, - bytes calldata encryptedEmail, - address upkeepContract, - uint32 gasLimit, - address adminAddress, - uint8 triggerType, - bytes memory checkData, - bytes memory triggerConfig, - bytes memory offchainConfig, - uint96 amount, - address sender - ) external onlyLINK { - _register( - RegistrationParams({ - name: name, - encryptedEmail: encryptedEmail, - upkeepContract: upkeepContract, - gasLimit: gasLimit, - adminAddress: adminAddress, - triggerType: triggerType, - checkData: checkData, - triggerConfig: triggerConfig, - offchainConfig: offchainConfig, - amount: amount - }), - sender - ); - } - /** * @notice Allows external users to register upkeeps; assumes amount is approved for transfer by the contract * @param requestParams struct of all possible registration parameters */ function registerUpkeep(RegistrationParams calldata requestParams) external returns (uint256) { - if (requestParams.amount < s_config.minLINKJuels) { - revert InsufficientPayment(); + if (!requestParams.billingToken.transferFrom(msg.sender, address(this), requestParams.amount)) { + revert TransferFailed(address(this)); } - - LINK.transferFrom(msg.sender, address(this), requestParams.amount); - return _register(requestParams, msg.sender); } /** * @dev register upkeep on AutomationRegistry contract and emit RegistrationApproved event + * @param requestParams struct of all possible registration parameters + * @param hash the committment of the registration request */ - function approve( - string memory name, - address upkeepContract, - uint32 gasLimit, - address adminAddress, - uint8 triggerType, - bytes calldata checkData, - bytes memory triggerConfig, - bytes calldata offchainConfig, - bytes32 hash - ) external onlyOwner { + function approve(RegistrationParams calldata requestParams, bytes32 hash) external onlyOwner { PendingRequest memory request = s_pendingRequests[hash]; if (request.admin == address(0)) { revert RequestNotFound(); } - bytes32 expectedHash = keccak256( - abi.encode(upkeepContract, gasLimit, adminAddress, triggerType, checkData, triggerConfig, offchainConfig) - ); + bytes32 expectedHash = keccak256(abi.encode(requestParams)); if (hash != expectedHash) { revert HashMismatch(); } delete s_pendingRequests[hash]; - _approve( - RegistrationParams({ - name: name, - encryptedEmail: "", - upkeepContract: upkeepContract, - gasLimit: gasLimit, - adminAddress: adminAddress, - triggerType: triggerType, - checkData: checkData, - triggerConfig: triggerConfig, - offchainConfig: offchainConfig, - amount: request.balance - }), - expectedHash - ); + _approve(requestParams, expectedHash); } /** @@ -279,22 +217,28 @@ contract AutomationRegistrar2_3 is TypeAndVersionInterface, ConfirmedOwner, IERC delete s_pendingRequests[hash]; bool success = LINK.transfer(request.admin, request.balance); if (!success) { - revert LinkTransferFailed(request.admin); + revert TransferFailed(request.admin); } emit RegistrationRejected(hash); } /** * @notice owner calls this function to set contract config - * @param AutomationRegistry new keeper registry address - * @param minLINKJuels minimum LINK that new registrations should fund their upkeep with + * @param registry new keeper registry address + * @param billingTokens the billing tokens that this registrar supports (registy must also support these) + * @param minBalances minimum balances that users must supply to register with the corresponding billing token */ - function setConfig(address AutomationRegistry, uint96 minLINKJuels) public onlyOwner { - s_config = RegistrarConfig({ - minLINKJuels: minLINKJuels, - AutomationRegistry: IAutomationRegistryMaster(AutomationRegistry) - }); - emit ConfigChanged(AutomationRegistry, minLINKJuels); + function setConfig( + IAutomationRegistryMaster2_3 registry, + IERC20[] memory billingTokens, + uint256[] memory minBalances + ) public onlyOwner { + if (billingTokens.length != minBalances.length) revert InvalidDataLength(); + s_registry = registry; + for (uint256 i = 0; i < billingTokens.length; i++) { + s_minRegistrationAmounts[billingTokens[i]] = minBalances[i]; + } + emit ConfigChanged(); } /** @@ -333,11 +277,17 @@ contract AutomationRegistrar2_3 is TypeAndVersionInterface, ConfirmedOwner, IERC } /** - * @notice read the current registration configuration + * @notice gets the registry that this registrar is pointed to + */ + function getRegistry() external view returns (IAutomationRegistryMaster2_3) { + return s_registry; + } + + /** + * @notice get the minimum registration fee for a particular billing token */ - function getConfig() external view returns (address AutomationRegistry, uint256 minLINKJuels) { - RegistrarConfig memory config = s_config; - return (address(config.AutomationRegistry), config.minLINKJuels); + function getMinimumRegistrationAmount(IERC20 billingToken) external view returns (uint256) { + return s_minRegistrationAmounts[billingToken]; } /** @@ -362,26 +312,12 @@ contract AutomationRegistrar2_3 is TypeAndVersionInterface, ConfirmedOwner, IERC * @param amount Amount of LINK sent (specified in Juels) * @param data Payload of the transaction */ - function onTokenTransfer( - address sender, - uint256 amount, - bytes calldata data - ) - external - override - onlyLINK - permittedFunctionsForLINK(data) - isActualAmount(amount, data) - isActualSender(sender, data) - { - if (amount < s_config.minLINKJuels) { - revert InsufficientPayment(); - } - (bool success, ) = address(this).delegatecall(data); - // calls register - if (!success) { - revert RegistrationRequestFailed(); - } + function onTokenTransfer(address sender, uint256 amount, bytes calldata data) external override { + if (msg.sender != address(LINK)) revert OnlyLink(); + RegistrationParams memory params = abi.decode(data, (RegistrationParams)); + if (address(params.billingToken) != address(LINK)) revert OnlyLink(); + params.amount = uint96(amount); // ignore whatever is sent in registration params, use actual value; casting safe because max supply LINK < 2^96 + _register(params, sender); } // ================================================================ @@ -392,20 +328,16 @@ contract AutomationRegistrar2_3 is TypeAndVersionInterface, ConfirmedOwner, IERC * @dev verify registration request and emit RegistrationRequested event */ function _register(RegistrationParams memory params, address sender) private returns (uint256) { + if (params.amount < s_minRegistrationAmounts[params.billingToken]) { + revert InsufficientPayment(); + } if (params.adminAddress == address(0)) { revert InvalidAdminAddress(); } - bytes32 hash = keccak256( - abi.encode( - params.upkeepContract, - params.gasLimit, - params.adminAddress, - params.triggerType, - params.checkData, - params.triggerConfig, - params.offchainConfig - ) - ); + if (!s_registry.supportsBillingToken(address(params.billingToken))) { + revert InvalidBillingToken(); + } + bytes32 hash = keccak256(abi.encode(params)); emit RegistrationRequested( hash, @@ -426,7 +358,7 @@ contract AutomationRegistrar2_3 is TypeAndVersionInterface, ConfirmedOwner, IERC s_triggerRegistrations[params.triggerType].approvedCount++; upkeepId = _approve(params, hash); } else { - uint96 newBalance = s_pendingRequests[hash].balance + params.amount; + uint96 newBalance = s_pendingRequests[hash].balance + params.amount; // TODO - this is bad UX s_pendingRequests[hash] = PendingRequest({admin: params.adminAddress, balance: newBalance}); } @@ -437,19 +369,28 @@ contract AutomationRegistrar2_3 is TypeAndVersionInterface, ConfirmedOwner, IERC * @dev register upkeep on AutomationRegistry contract and emit RegistrationApproved event */ function _approve(RegistrationParams memory params, bytes32 hash) private returns (uint256) { - IAutomationRegistryMaster AutomationRegistry = s_config.AutomationRegistry; - uint256 upkeepId = AutomationRegistry.registerUpkeep( + IAutomationRegistryMaster2_3 registry = s_registry; + uint256 upkeepId = registry.registerUpkeep( params.upkeepContract, params.gasLimit, params.adminAddress, params.triggerType, + address(params.billingToken), // have to cast as address because master interface doesn't use contract types params.checkData, params.triggerConfig, params.offchainConfig ); - bool success = LINK.transferAndCall(address(AutomationRegistry), params.amount, abi.encode(upkeepId)); + bool success; + if (address(params.billingToken) == address(LINK)) { + success = LINK.transferAndCall(address(registry), params.amount, abi.encode(upkeepId)); + } else { + success = params.billingToken.approve(address(registry), params.amount); + if (success) { + registry.addFunds(upkeepId, params.amount); + } + } if (!success) { - revert LinkTransferFailed(address(AutomationRegistry)); + revert TransferFailed(address(registry)); } emit RegistrationApproved(hash, params.name, upkeepId); return upkeepId; @@ -470,68 +411,4 @@ contract AutomationRegistrar2_3 is TypeAndVersionInterface, ConfirmedOwner, IERC } return false; } - - // ================================================================ - // | MODIFIERS | - // ================================================================ - - /** - * @dev Reverts if not sent from the LINK token - */ - modifier onlyLINK() { - if (msg.sender != address(LINK)) { - revert OnlyLink(); - } - _; - } - - /** - * @dev Reverts if the given data does not begin with the `register` function selector - * @param _data The data payload of the request - */ - modifier permittedFunctionsForLINK(bytes memory _data) { - bytes4 funcSelector; - assembly { - // solhint-disable-next-line avoid-low-level-calls - funcSelector := mload(add(_data, 32)) // First 32 bytes contain length of data - } - if (funcSelector != REGISTER_REQUEST_SELECTOR) { - revert FunctionNotPermitted(); - } - _; - } - - /** - * @dev Reverts if the actual amount passed does not match the expected amount - * @param expected amount that should match the actual amount - * @param data bytes - */ - modifier isActualAmount(uint256 expected, bytes calldata data) { - // decode register function arguments to get actual amount - (, , , , , , , , , uint96 amount, ) = abi.decode( - data[4:], - (string, bytes, address, uint32, address, uint8, bytes, bytes, bytes, uint96, address) - ); - if (expected != amount) { - revert AmountMismatch(); - } - _; - } - - /** - * @dev Reverts if the actual sender address does not match the expected sender address - * @param expected address that should match the actual sender address - * @param data bytes - */ - modifier isActualSender(address expected, bytes calldata data) { - // decode register function arguments to get actual sender - (, , , , , , , , , , address sender) = abi.decode( - data[4:], - (string, bytes, address, uint32, address, uint8, bytes, bytes, bytes, uint96, address) - ); - if (expected != sender) { - revert SenderMismatch(); - } - _; - } } 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 925ef21a48b..96b7fad43aa 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 @@ -4,10 +4,12 @@ pragma solidity 0.8.19; import {EnumerableSet} from "../../../vendor/openzeppelin-solidity/v4.7.3/contracts/utils/structs/EnumerableSet.sol"; import {Address} from "../../../vendor/openzeppelin-solidity/v4.7.3/contracts/utils/Address.sol"; import {AutomationRegistryBase2_3} from "./AutomationRegistryBase2_3.sol"; -import {AutomationRegistryLogicB2_3} from "./AutomationRegistryLogicB2_3.sol"; +import {AutomationRegistryLogicA2_3} from "./AutomationRegistryLogicA2_3.sol"; +import {AutomationRegistryLogicC2_3} from "./AutomationRegistryLogicC2_3.sol"; import {Chainable} from "../../Chainable.sol"; import {IERC677Receiver} from "../../../shared/interfaces/IERC677Receiver.sol"; import {OCR2Abstract} from "../../../shared/ocr2/OCR2Abstract.sol"; +import {IERC20} from "../../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/IERC20.sol"; /** * @notice Registry for adding work for Chainlink nodes to perform on client @@ -43,17 +45,19 @@ contract AutomationRegistry2_3 is AutomationRegistryBase2_3, OCR2Abstract, Chain string public constant override typeAndVersion = "AutomationRegistry 2.3.0"; /** - * @param logicA the address of the first logic contract, but cast as logicB in order to call logicB functions + * @param logicA the address of the first logic contract + * @dev we cast the contract to logicC in order to call logicC functions (via fallback) */ constructor( - AutomationRegistryLogicB2_3 logicA + AutomationRegistryLogicA2_3 logicA ) AutomationRegistryBase2_3( - logicA.getLinkAddress(), - logicA.getLinkNativeFeedAddress(), - logicA.getFastGasFeedAddress(), - logicA.getAutomationForwarderLogic(), - logicA.getAllowedReadOnlyAddress() + AutomationRegistryLogicC2_3(address(logicA)).getLinkAddress(), + AutomationRegistryLogicC2_3(address(logicA)).getLinkUSDFeedAddress(), + AutomationRegistryLogicC2_3(address(logicA)).getNativeUSDFeedAddress(), + AutomationRegistryLogicC2_3(address(logicA)).getFastGasFeedAddress(), + AutomationRegistryLogicC2_3(address(logicA)).getAutomationForwarderLogic(), + AutomationRegistryLogicC2_3(address(logicA)).getAllowedReadOnlyAddress() ) Chainable(address(logicA)) {} @@ -63,9 +67,9 @@ contract AutomationRegistry2_3 is AutomationRegistryBase2_3, OCR2Abstract, Chain */ struct TransmitVars { uint16 numUpkeepsPassedChecks; - uint256 totalCalldataWeight; uint96 totalReimbursement; uint96 totalPremium; + uint256 totalCalldataWeight; } // ================================================================ @@ -167,26 +171,32 @@ contract AutomationRegistry2_3 is AutomationRegistryBase2_3, OCR2Abstract, Chain gasOverhead = gasOverhead / transmitVars.numUpkeepsPassedChecks + ACCOUNTING_PER_UPKEEP_GAS_OVERHEAD; { - uint96 reimbursement; - uint96 premium; + BillingTokenPaymentParams memory billingTokenParams; for (uint256 i = 0; i < report.upkeepIds.length; i++) { if (upkeepTransmitInfo[i].earlyChecksPassed) { - (reimbursement, premium) = _postPerformPayment( + billingTokenParams = _getBillingTokenPaymentParams(hotVars, upkeepTransmitInfo[i].upkeep.billingToken); // TODO avoid doing this every time + PaymentReceipt memory receipt = _handlePayment( hotVars, - report.upkeepIds[i], - upkeepTransmitInfo[i].gasUsed, - report.fastGasWei, - report.linkNative, - gasOverhead, - (l1Fee * upkeepTransmitInfo[i].calldataWeight) / transmitVars.totalCalldataWeight + PaymentParams({ + gasLimit: upkeepTransmitInfo[i].gasUsed, + gasOverhead: gasOverhead, + l1CostWei: (l1Fee * upkeepTransmitInfo[i].calldataWeight) / transmitVars.totalCalldataWeight, + fastGasWei: report.fastGasWei, + linkUSD: report.linkUSD, + nativeUSD: _getNativeUSD(hotVars), + billingToken: billingTokenParams, + isTransaction: true + }), + report.upkeepIds[i] ); - transmitVars.totalPremium += premium; - transmitVars.totalReimbursement += reimbursement; + transmitVars.totalPremium += receipt.premiumJuels; + transmitVars.totalReimbursement += receipt.gasReimbursementJuels; emit UpkeepPerformed( report.upkeepIds[i], upkeepTransmitInfo[i].performSuccess, - reimbursement + premium, + // receipt.gasCharge + receipt.premium, // TODO - this is currently the billing token amount, but should it be? + receipt.gasReimbursementJuels + receipt.premiumJuels, // TODO - this is currently the link tokn amount, but should it be billing token instead? upkeepTransmitInfo[i].gasUsed, gasOverhead, report.triggers[i] @@ -225,12 +235,14 @@ contract AutomationRegistry2_3 is AutomationRegistryBase2_3, OCR2Abstract, Chain * @param amount number of LINK transfer */ function onTokenTransfer(address sender, uint256 amount, bytes calldata data) external override { + // TODO test that this reverts if the billing token != the link token if (msg.sender != address(i_link)) revert OnlyCallableByLINKToken(); if (data.length != 32) revert InvalidDataLength(); uint256 id = abi.decode(data, (uint256)); if (s_upkeep[id].maxValidBlocknumber != UINT32_MAX) revert UpkeepCancelled(); + if (address(s_upkeep[id].billingToken) != address(i_link)) revert InvalidBillingToken(); s_upkeep[id].balance = s_upkeep[id].balance + uint96(amount); - s_expectedLinkBalance = s_expectedLinkBalance + amount; + s_reserveAmounts[address(i_link)] = s_reserveAmounts[address(i_link)] + amount; emit FundsAdded(id, sender, uint96(amount)); } @@ -250,13 +262,20 @@ contract AutomationRegistry2_3 is AutomationRegistryBase2_3, OCR2Abstract, Chain uint64 offchainConfigVersion, bytes memory offchainConfig ) external override { + (OnchainConfig memory config, IERC20[] memory billingTokens, BillingConfig[] memory billingConfigs) = abi.decode( + onchainConfigBytes, + (OnchainConfig, IERC20[], BillingConfig[]) + ); + setConfigTypeSafe( signers, transmitters, f, - abi.decode(onchainConfigBytes, (OnchainConfig)), + config, offchainConfigVersion, - offchainConfig + offchainConfig, + billingTokens, + billingConfigs ); } @@ -266,23 +285,30 @@ contract AutomationRegistry2_3 is AutomationRegistryBase2_3, OCR2Abstract, Chain uint8 f, OnchainConfig memory onchainConfig, uint64 offchainConfigVersion, - bytes memory offchainConfig + bytes memory offchainConfig, + IERC20[] memory billingTokens, + BillingConfig[] memory billingConfigs ) public onlyOwner { if (signers.length > MAX_NUM_ORACLES) revert TooManyOracles(); if (f == 0) revert IncorrectNumberOfFaultyOracles(); if (signers.length != transmitters.length || signers.length <= 3 * f) revert IncorrectNumberOfSigners(); + if (billingTokens.length != billingConfigs.length) revert ParameterLengthError(); + // set billing config for tokens + _setBillingConfig(billingTokens, billingConfigs); // move all pooled payments out of the pool to each transmitter's balance - uint96 totalPremium = s_hotVars.totalPremium; - uint96 oldLength = uint96(s_transmittersList.length); - for (uint256 i = 0; i < oldLength; i++) { - _updateTransmitterBalanceFromPool(s_transmittersList[i], totalPremium, oldLength); + for (uint256 i = 0; i < s_transmittersList.length; i++) { + _updateTransmitterBalanceFromPool( + s_transmittersList[i], + s_hotVars.totalPremium, + uint96(s_transmittersList.length) + ); } // remove any old signer/transmitter addresses address signerAddress; address transmitterAddress; - for (uint256 i = 0; i < oldLength; i++) { + for (uint256 i = 0; i < s_transmittersList.length; i++) { signerAddress = s_signersList[i]; transmitterAddress = s_transmittersList[i]; delete s_signers[signerAddress]; @@ -309,7 +335,7 @@ contract AutomationRegistry2_3 is AutomationRegistryBase2_3, OCR2Abstract, Chain transmitter.index = uint8(i); // new transmitters start afresh from current totalPremium // some spare change of premium from previous pool will be forfeited - transmitter.lastCollected = totalPremium; + transmitter.lastCollected = s_hotVars.totalPremium; s_transmitters[temp] = transmitter; } } @@ -318,13 +344,11 @@ contract AutomationRegistry2_3 is AutomationRegistryBase2_3, OCR2Abstract, Chain s_hotVars = HotVars({ f: f, - paymentPremiumPPB: onchainConfig.paymentPremiumPPB, - flatFeeMicroLink: onchainConfig.flatFeeMicroLink, stalenessSeconds: onchainConfig.stalenessSeconds, gasCeilingMultiplier: onchainConfig.gasCeilingMultiplier, paused: s_hotVars.paused, reentrancyGuard: s_hotVars.reentrancyGuard, - totalPremium: totalPremium, + totalPremium: s_hotVars.totalPremium, latestEpoch: 0, // DON restarts epoch reorgProtectionEnabled: onchainConfig.reorgProtectionEnabled, chainModule: onchainConfig.chainModule @@ -332,20 +356,20 @@ contract AutomationRegistry2_3 is AutomationRegistryBase2_3, OCR2Abstract, Chain s_storage = Storage({ checkGasLimit: onchainConfig.checkGasLimit, - minUpkeepSpend: onchainConfig.minUpkeepSpend, maxPerformGas: onchainConfig.maxPerformGas, transcoder: onchainConfig.transcoder, maxCheckDataSize: onchainConfig.maxCheckDataSize, maxPerformDataSize: onchainConfig.maxPerformDataSize, maxRevertDataSize: onchainConfig.maxRevertDataSize, upkeepPrivilegeManager: onchainConfig.upkeepPrivilegeManager, + financeAdmin: onchainConfig.financeAdmin, nonce: s_storage.nonce, configCount: s_storage.configCount, - latestConfigBlockNumber: s_storage.latestConfigBlockNumber, - ownerLinkBalance: s_storage.ownerLinkBalance + latestConfigBlockNumber: s_storage.latestConfigBlockNumber }); s_fallbackGasPrice = onchainConfig.fallbackGasPrice; s_fallbackLinkPrice = onchainConfig.fallbackLinkPrice; + s_fallbackNativePrice = onchainConfig.fallbackNativePrice; uint32 previousConfigBlockNumber = s_storage.latestConfigBlockNumber; s_storage.latestConfigBlockNumber = uint32(onchainConfig.chainModule.blockNumber()); diff --git a/contracts/src/v0.8/automation/dev/v2_3/AutomationRegistryBase2_3.sol b/contracts/src/v0.8/automation/dev/v2_3/AutomationRegistryBase2_3.sol index 4874bbcb948..89613d2f40b 100644 --- a/contracts/src/v0.8/automation/dev/v2_3/AutomationRegistryBase2_3.sol +++ b/contracts/src/v0.8/automation/dev/v2_3/AutomationRegistryBase2_3.sol @@ -11,7 +11,9 @@ import {AggregatorV3Interface} from "../../../shared/interfaces/AggregatorV3Inte import {LinkTokenInterface} from "../../../shared/interfaces/LinkTokenInterface.sol"; import {KeeperCompatibleInterface} from "../../interfaces/KeeperCompatibleInterface.sol"; import {UpkeepFormat} from "../../interfaces/UpkeepTranscoderInterface.sol"; -import {IChainModule} from "../interfaces/IChainModule.sol"; +import {IChainModule} from "../../interfaces/IChainModule.sol"; +import {IERC20} from "../../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/IERC20.sol"; +import {SafeCast} from "../../../vendor/openzeppelin-solidity/v4.8.3/contracts/utils/math/SafeCast.sol"; /** * @notice Base Keeper Registry contract, contains shared logic between @@ -34,7 +36,6 @@ abstract contract AutomationRegistryBase2_3 is ConfirmedOwner { uint256 internal constant PERFORM_GAS_CUSHION = 5_000; uint256 internal constant PPB_BASE = 1_000_000_000; uint32 internal constant UINT32_MAX = type(uint32).max; - uint96 internal constant LINK_TOTAL_SUPPLY = 1e27; // The first byte of the mask can be 0, because we only ever have 31 oracles uint256 internal constant ORACLE_MASK = 0x0001010101010101010101010101010101010101010101010101010101010101; /** @@ -67,7 +68,8 @@ abstract contract AutomationRegistryBase2_3 is ConfirmedOwner { uint256 internal constant ACCOUNTING_PER_UPKEEP_GAS_OVERHEAD = 7_000; // Overhead per upkeep performed in batch LinkTokenInterface internal immutable i_link; - AggregatorV3Interface internal immutable i_linkNativeFeed; + AggregatorV3Interface internal immutable i_linkUSDFeed; + AggregatorV3Interface internal immutable i_nativeUSDFeed; AggregatorV3Interface internal immutable i_fastGasFeed; address internal immutable i_automationForwarderLogic; address internal immutable i_allowedReadOnlyAddress; @@ -97,12 +99,16 @@ abstract contract AutomationRegistryBase2_3 is ConfirmedOwner { Storage internal s_storage; // Mixture of config and state, not used in transmit uint256 internal s_fallbackGasPrice; uint256 internal s_fallbackLinkPrice; - uint256 internal s_expectedLinkBalance; // Used in case of erroneous LINK transfers to contract + uint256 internal s_fallbackNativePrice; + mapping(address billingToken => uint256 reserveAmount) internal s_reserveAmounts; // unspent user deposits + unwithdrawn NOP payments mapping(address => MigrationPermission) internal s_peerRegistryMigrationPermission; // Permissions for migration to and fro mapping(uint256 => bytes) internal s_upkeepTriggerConfig; // upkeep triggers mapping(uint256 => bytes) internal s_upkeepOffchainConfig; // general config set by users for each upkeep mapping(uint256 => bytes) internal s_upkeepPrivilegeConfig; // general config set by an administrative role for an upkeep mapping(address => bytes) internal s_adminPrivilegeConfig; // general config set by an administrative role for an admin + // billing + mapping(IERC20 billingToken => BillingConfig billingConfig) internal s_billingConfigs; // billing configurations for different tokens + IERC20[] internal s_billingTokens; // list of billing tokens error ArrayHasNoEntries(); error CannotCancel(); @@ -116,7 +122,10 @@ abstract contract AutomationRegistryBase2_3 is ConfirmedOwner { error IncorrectNumberOfSignatures(); error IncorrectNumberOfSigners(); error IndexOutOfRange(); + error InsufficientBalance(uint256 available, uint256 requested); + error InvalidBillingToken(); error InvalidDataLength(); + error InvalidFeed(); error InvalidTrigger(); error InvalidPayee(); error InvalidRecipient(); @@ -124,8 +133,6 @@ abstract contract AutomationRegistryBase2_3 is ConfirmedOwner { error InvalidSigner(); error InvalidTransmitter(); error InvalidTriggerType(); - error MaxCheckDataSizeCanOnlyIncrease(); - error MaxPerformDataSizeCanOnlyIncrease(); error MigrationNotPermitted(); error NotAContract(); error OnlyActiveSigners(); @@ -138,11 +145,11 @@ abstract contract AutomationRegistryBase2_3 is ConfirmedOwner { error OnlyCallableByProposedAdmin(); error OnlyCallableByProposedPayee(); error OnlyCallableByUpkeepPrivilegeManager(); + error OnlyFinanceAdmin(); error OnlyPausedUpkeep(); error OnlySimulatedBackend(); error OnlyUnpausedUpkeep(); error ParameterLengthError(); - error PaymentGreaterThanAllLINK(); error ReentrantCall(); error RegistryPaused(); error RepeatedSigner(); @@ -150,11 +157,13 @@ abstract contract AutomationRegistryBase2_3 is ConfirmedOwner { error TargetCheckReverted(bytes reason); error TooManyOracles(); error TranscoderNotSet(); + error TransferFailed(); error UpkeepAlreadyExists(); error UpkeepCancelled(); error UpkeepNotCanceled(); error UpkeepNotNeeded(); error ValueNotChanged(); + error ZeroAddressNotAllowed(); enum MigrationPermission { NONE, @@ -181,48 +190,6 @@ abstract contract AutomationRegistryBase2_3 is ConfirmedOwner { REGISTRY_PAUSED } - /** - * @notice OnchainConfigLegacy of the registry - * @dev only used in params and return values - * @member paymentPremiumPPB payment premium rate oracles receive on top of - * being reimbursed for gas, measured in parts per billion - * @member flatFeeMicroLink flat fee paid to oracles for performing upkeeps, - * priced in MicroLink; can be used in conjunction with or independently of - * paymentPremiumPPB - * @member checkGasLimit gas limit when checking for upkeep - * @member stalenessSeconds number of seconds that is allowed for feed data to - * be stale before switching to the fallback pricing - * @member gasCeilingMultiplier multiplier to apply to the fast gas feed price - * when calculating the payment ceiling for keepers - * @member minUpkeepSpend minimum LINK that an upkeep must spend before cancelling - * @member maxPerformGas max performGas allowed for an upkeep on this registry - * @member maxCheckDataSize max length of checkData bytes - * @member maxPerformDataSize max length of performData bytes - * @member maxRevertDataSize max length of revertData bytes - * @member fallbackGasPrice gas price used if the gas price feed is stale - * @member fallbackLinkPrice LINK price used if the LINK price feed is stale - * @member transcoder address of the transcoder contract - * @member registrars addresses of the registrar contracts - * @member upkeepPrivilegeManager address which can set privilege for upkeeps - */ - struct OnchainConfigLegacy { - uint32 paymentPremiumPPB; - uint32 flatFeeMicroLink; // min 0.000001 LINK, max 4294 LINK - uint32 checkGasLimit; - uint24 stalenessSeconds; - uint16 gasCeilingMultiplier; - uint96 minUpkeepSpend; - uint32 maxPerformGas; - uint32 maxCheckDataSize; - uint32 maxPerformDataSize; - uint32 maxRevertDataSize; - uint256 fallbackGasPrice; - uint256 fallbackLinkPrice; - address transcoder; - address[] registrars; - address upkeepPrivilegeManager; - } - /** * @notice OnchainConfig of the registry * @dev used only in setConfig() @@ -236,7 +203,6 @@ abstract contract AutomationRegistryBase2_3 is ConfirmedOwner { * be stale before switching to the fallback pricing * @member gasCeilingMultiplier multiplier to apply to the fast gas feed price * when calculating the payment ceiling for keepers - * @member minUpkeepSpend minimum LINK that an upkeep must spend before cancelling * @member maxPerformGas max performGas allowed for an upkeep on this registry * @member maxCheckDataSize max length of checkData bytes * @member maxPerformDataSize max length of performData bytes @@ -250,51 +216,22 @@ abstract contract AutomationRegistryBase2_3 is ConfirmedOwner { * @member chainModule the chain specific module */ struct OnchainConfig { - uint32 paymentPremiumPPB; - uint32 flatFeeMicroLink; // min 0.000001 LINK, max 4294 LINK uint32 checkGasLimit; uint24 stalenessSeconds; uint16 gasCeilingMultiplier; - uint96 minUpkeepSpend; uint32 maxPerformGas; uint32 maxCheckDataSize; uint32 maxPerformDataSize; uint32 maxRevertDataSize; uint256 fallbackGasPrice; uint256 fallbackLinkPrice; + uint256 fallbackNativePrice; address transcoder; address[] registrars; address upkeepPrivilegeManager; IChainModule chainModule; bool reorgProtectionEnabled; - } - - /** - * @notice state of the registry - * @dev only used in params and return values - * @dev this will likely be deprecated in a future version of the registry in favor of individual getters - * @member nonce used for ID generation - * @member ownerLinkBalance withdrawable balance of LINK by contract owner - * @member expectedLinkBalance the expected balance of LINK of the registry - * @member totalPremium the total premium collected on registry so far - * @member numUpkeeps total number of upkeeps on the registry - * @member configCount ordinal number of current config, out of all configs applied to this contract so far - * @member latestConfigBlockNumber last block at which this config was set - * @member latestConfigDigest domain-separation tag for current config - * @member latestEpoch for which a report was transmitted - * @member paused freeze on execution scoped to the entire registry - */ - struct State { - uint32 nonce; - uint96 ownerLinkBalance; - uint256 expectedLinkBalance; - uint96 totalPremium; - uint256 numUpkeeps; - uint32 configCount; - uint32 latestConfigBlockNumber; - bytes32 latestConfigDigest; - uint32 latestEpoch; - bool paused; + address financeAdmin; // TODO: pack this struct better } /** @@ -303,7 +240,7 @@ abstract contract AutomationRegistryBase2_3 is ConfirmedOwner { * @member performGas the gas limit of upkeep execution * @member maxValidBlocknumber until which block this upkeep is valid * @member forwarder the forwarder contract to use for this upkeep - * @member amountSpent the amount this upkeep has spent + * @member amountSpent the amount this upkeep has spent, in the upkeep's billing token * @member balance the balance of this upkeep * @member lastPerformedBlockNumber the last block number when this upkeep was performed */ @@ -312,80 +249,50 @@ abstract contract AutomationRegistryBase2_3 is ConfirmedOwner { uint32 performGas; uint32 maxValidBlocknumber; IAutomationForwarder forwarder; - // 0 bytes left in 1st EVM word - not written to in transmit - uint96 amountSpent; + // 3 bytes left in 1st EVM word - read in transmit path + uint128 amountSpent; uint96 balance; uint32 lastPerformedBlockNumber; - // 2 bytes left in 2nd EVM word - written in transmit path - } - - /** - * @notice all information about an upkeep - * @dev only used in return values - * @dev this will likely be deprecated in a future version of the registry - * @member target the contract which needs to be serviced - * @member performGas the gas limit of upkeep execution - * @member checkData the checkData bytes for this upkeep - * @member balance the balance of this upkeep - * @member admin for this upkeep - * @member maxValidBlocknumber until which block this upkeep is valid - * @member lastPerformedBlockNumber the last block number when this upkeep was performed - * @member amountSpent the amount this upkeep has spent - * @member paused if this upkeep has been paused - * @member offchainConfig the off-chain config of this upkeep - */ - struct UpkeepInfo { - address target; - uint32 performGas; - bytes checkData; - uint96 balance; - address admin; - uint64 maxValidBlocknumber; - uint32 lastPerformedBlockNumber; - uint96 amountSpent; - bool paused; - bytes offchainConfig; + // 0 bytes left in 2nd EVM word - written in transmit path + IERC20 billingToken; + // 12 bytes left in 3rd EVM word - read in transmit path } /// @dev Config + State storage struct which is on hot transmit path struct HotVars { uint96 totalPremium; // ─────────╮ total historical payment to oracles for premium - uint32 paymentPremiumPPB; // │ premium percentage charged to user over tx cost - uint32 flatFeeMicroLink; // │ flat fee charged to user for every perform uint32 latestEpoch; // │ latest epoch for which a report was transmitted uint24 stalenessSeconds; // │ Staleness tolerance for feeds uint16 gasCeilingMultiplier; // │ multiplier on top of fast gas feed for upper bound uint8 f; // │ maximum number of faulty oracles bool paused; // │ pause switch for all upkeeps in the registry - bool reentrancyGuard; // ────────╯ guard against reentrancy - bool reorgProtectionEnabled; // if this registry should enable re-org protection mechanism + bool reentrancyGuard; // | guard against reentrancy + bool reorgProtectionEnabled; // ─╯ if this registry should enable the re-org protection mechanism IChainModule chainModule; // the interface of chain specific module } /// @dev Config + State storage struct which is not on hot transmit path struct Storage { - uint96 minUpkeepSpend; // Minimum amount an upkeep must spend address transcoder; // Address of transcoder contract used in migrations - // 1 EVM word full - uint96 ownerLinkBalance; // Balance of owner, accumulates minUpkeepSpend in case it is not spent uint32 checkGasLimit; // Gas limit allowed in checkUpkeep uint32 maxPerformGas; // Max gas an upkeep can use on this registry uint32 nonce; // Nonce for each upkeep created - uint32 configCount; // incremented each time a new config is posted, The count - // is incorporated into the config digest to prevent replay attacks. + // 1 EVM word full + address upkeepPrivilegeManager; // address which can set privilege for upkeeps + uint32 configCount; // incremented each time a new config is posted, The count is incorporated into the config digest to prevent replay attacks. uint32 latestConfigBlockNumber; // makes it easier for offchain systems to extract config from logs - // 2 EVM word full uint32 maxCheckDataSize; // max length of checkData bytes + // 2 EVM word full + address financeAdmin; // address which can withdraw funds from the contract uint32 maxPerformDataSize; // max length of performData bytes uint32 maxRevertDataSize; // max length of revertData bytes - address upkeepPrivilegeManager; // address which can set privilege for upkeeps - // 3 EVM word full + // 4 bytes left in 3rd EVM word } /// @dev Report transmitted by OCR to transmit function struct Report { uint256 fastGasWei; - uint256 linkNative; + uint256 linkUSD; uint256[] upkeepIds; uint256[] gasLimits; bytes[] triggers; @@ -412,9 +319,17 @@ abstract contract AutomationRegistryBase2_3 is ConfirmedOwner { bytes32 dedupID; } + /** + * @notice holds information about a transmiter / node in the DON + * @member active can this transmitter submit reports + * @member index of oracle in s_signersList/s_transmittersList + * @member balance a node's balance in LINK + * @member lastCollected the total balance at which the node last withdrew + @ @dev uint96 is safe for balance / last collected because transmitters are only ever paid in LINK + */ struct Transmitter { bool active; - uint8 index; // Index of oracle in s_signersList/s_transmittersList + uint8 index; uint96 balance; uint96 lastCollected; } @@ -446,6 +361,66 @@ abstract contract AutomationRegistryBase2_3 is ConfirmedOwner { bytes32 blockHash; } + /** + * @notice the billing config of a token + * @dev this is a storage struct + */ + struct BillingConfig { + uint32 gasFeePPB; + uint24 flatFeeMicroLink; + AggregatorV3Interface priceFeed; + // 1 word, read in getPrice() + uint256 fallbackPrice; + // 2nd word only read if stale + uint96 minSpend; // TODO - placeholder, should be removed when daily fees are added + } + + /** + * @notice pricing params for a biling token + * @dev this is a memory-only struct, so struct packing is less important + */ + struct BillingTokenPaymentParams { + uint32 gasFeePPB; + uint24 flatFeeMicroLink; + uint256 priceUSD; + } + + /** + * @notice struct containing price & payment information used in calculating payment amount + * @member gasLimit the amount of gas used + * @member gasOverhead the amount of gas overhead + * @member l1CostWei the amount to be charged for L1 fee in wei + * @member fastGasWei the fast gas price + * @member linkUSD the exchange ratio between LINK and USD + * @member nativeUSD the exchange ratio between the chain's native token and USD + * @member billingTokenParams the payment params specific to a particular payment token + * @member isTransaction is this an eth_call or a transaction + */ + struct PaymentParams { + uint256 gasLimit; + uint256 gasOverhead; + uint256 l1CostWei; + uint256 fastGasWei; + uint256 linkUSD; + uint256 nativeUSD; + BillingTokenPaymentParams billingToken; + bool isTransaction; + } + + /** + * @notice struct containing receipt information about a payment or cost estimation + * @member gasCharge the amount to charge a user for gas spent + * @member premium the premium charged to the user, shared between all nodes + * @member gasReimbursementJuels the amount to reimburse a node for gas spent + * @member premiumJuels the premium paid to NOPs, shared between all nodes + */ + struct PaymentReceipt { + uint96 gasCharge; + uint96 premium; + uint96 gasReimbursementJuels; + uint96 premiumJuels; + } + event AdminPrivilegeConfigSet(address indexed admin, bytes privilegeConfig); event CancelledUpkeepReport(uint256 indexed id, bytes trigger); event ChainSpecificModuleUpdated(address newModule); @@ -453,7 +428,6 @@ abstract contract AutomationRegistryBase2_3 is ConfirmedOwner { event FundsAdded(uint256 indexed id, address indexed from, uint96 amount); event FundsWithdrawn(uint256 indexed id, uint256 amount, address to); event InsufficientFundsUpkeepReport(uint256 indexed id, bytes trigger); - event OwnerFundsWithdrawn(uint96 amount); event Paused(address account); event PayeesUpdated(address[] transmitters, address[] payees); event PayeeshipTransferRequested(address indexed transmitter, address indexed from, address indexed to); @@ -483,26 +457,35 @@ abstract contract AutomationRegistryBase2_3 is ConfirmedOwner { event UpkeepTriggerConfigSet(uint256 indexed id, bytes triggerConfig); event UpkeepUnpaused(uint256 indexed id); event Unpaused(address account); + // Event to emit when a billing configuration is set + event BillingConfigSet(IERC20 indexed token, BillingConfig config); + event FeesWithdrawn(address indexed recipient, address indexed assetAddress, uint256 amount); /** * @param link address of the LINK Token - * @param linkNativeFeed address of the LINK/Native price feed + * @param linkUSDFeed address of the LINK/USD price feed + * @param nativeUSDFeed address of the Native/USD price feed * @param fastGasFeed address of the Fast Gas price feed * @param automationForwarderLogic the address of automation forwarder logic * @param allowedReadOnlyAddress the address of the allowed read only address */ constructor( address link, - address linkNativeFeed, + address linkUSDFeed, + address nativeUSDFeed, address fastGasFeed, address automationForwarderLogic, address allowedReadOnlyAddress ) ConfirmedOwner(msg.sender) { i_link = LinkTokenInterface(link); - i_linkNativeFeed = AggregatorV3Interface(linkNativeFeed); + i_linkUSDFeed = AggregatorV3Interface(linkUSDFeed); + i_nativeUSDFeed = AggregatorV3Interface(nativeUSDFeed); i_fastGasFeed = AggregatorV3Interface(fastGasFeed); i_automationForwarderLogic = automationForwarderLogic; i_allowedReadOnlyAddress = allowedReadOnlyAddress; + if (i_linkUSDFeed.decimals() != i_nativeUSDFeed.decimals()) { + revert InvalidFeed(); + } } // ================================================================ @@ -531,10 +514,11 @@ abstract contract AutomationRegistryBase2_3 is ConfirmedOwner { if (upkeep.performGas < PERFORM_GAS_MIN || upkeep.performGas > s_storage.maxPerformGas) revert GasLimitOutsideRange(); if (address(s_upkeep[id].forwarder) != address(0)) revert UpkeepAlreadyExists(); + if (address(s_billingConfigs[upkeep.billingToken].priceFeed) == address(0)) revert InvalidBillingToken(); s_upkeep[id] = upkeep; s_upkeepAdmin[id] = admin; s_checkData[id] = checkData; - s_expectedLinkBalance = s_expectedLinkBalance + upkeep.balance; + s_reserveAmounts[address(upkeep.billingToken)] = s_reserveAmounts[address(upkeep.billingToken)] + upkeep.balance; s_upkeepTriggerConfig[id] = triggerConfig; s_upkeepOffchainConfig[id] = offchainConfig; s_upkeepIDs.add(id); @@ -571,7 +555,9 @@ abstract contract AutomationRegistryBase2_3 is ConfirmedOwner { * for gas it takes the min of gas price in the transaction or the fast gas * price in order to reduce costs for the upkeep clients. */ - function _getFeedData(HotVars memory hotVars) internal view returns (uint256 gasWei, uint256 linkNative) { + function _getFeedData( + HotVars memory hotVars + ) internal view returns (uint256 gasWei, uint256 linkUSD, uint256 nativeUSD) { uint32 stalenessSeconds = hotVars.stalenessSeconds; bool staleFallback = stalenessSeconds > 0; uint256 timestamp; @@ -584,91 +570,140 @@ abstract contract AutomationRegistryBase2_3 is ConfirmedOwner { } else { gasWei = uint256(feedValue); } - (, feedValue, , timestamp, ) = i_linkNativeFeed.latestRoundData(); + (, feedValue, , timestamp, ) = i_linkUSDFeed.latestRoundData(); if ( feedValue <= 0 || block.timestamp < timestamp || (staleFallback && stalenessSeconds < block.timestamp - timestamp) ) { - linkNative = s_fallbackLinkPrice; + linkUSD = s_fallbackLinkPrice; } else { - linkNative = uint256(feedValue); + linkUSD = uint256(feedValue); } - return (gasWei, linkNative); + return (gasWei, linkUSD, _getNativeUSD(hotVars)); + } + + /** + * @dev this price has it's own getter for use in the transmit() hot path + * in the future, all price data should be included in the report instead of + * getting read during execution + */ + function _getNativeUSD(HotVars memory hotVars) internal view returns (uint256) { + (, int256 feedValue, , uint256 timestamp, ) = i_nativeUSDFeed.latestRoundData(); + if ( + feedValue <= 0 || + block.timestamp < timestamp || + (hotVars.stalenessSeconds > 0 && hotVars.stalenessSeconds < block.timestamp - timestamp) + ) { + return s_fallbackNativePrice; + } else { + return uint256(feedValue); + } + } + + /** + * @dev gets the price and billing params for a specific billing token + */ + function _getBillingTokenPaymentParams( + HotVars memory hotVars, + IERC20 billingToken + ) internal view returns (BillingTokenPaymentParams memory params) { + BillingConfig memory config = s_billingConfigs[billingToken]; + params.flatFeeMicroLink = config.flatFeeMicroLink; + params.gasFeePPB = config.gasFeePPB; + (, int256 feedValue, , uint256 timestamp, ) = config.priceFeed.latestRoundData(); + if ( + feedValue <= 0 || + block.timestamp < timestamp || + (hotVars.stalenessSeconds > 0 && hotVars.stalenessSeconds < block.timestamp - timestamp) + ) { + params.priceUSD = config.fallbackPrice; + } else { + params.priceUSD = uint256(feedValue); + } + return params; } /** * @dev calculates LINK paid for gas spent plus a configure premium percentage - * @param gasLimit the amount of gas used - * @param gasOverhead the amount of gas overhead - * @param l1CostWei the amount to be charged for L1 fee in wei - * @param fastGasWei the fast gas price - * @param linkNative the exchange ratio between LINK and Native token - * @param isExecution if this is triggered by a perform upkeep function + * @param hotVars the hot path variables + * @param paymentParams the pricing data and gas usage data + * @return receipt the receipt of payment with pricing breakdown + * @dev use of PaymentParams struct is necessary to avoid stack too deep errors */ function _calculatePaymentAmount( HotVars memory hotVars, - uint256 gasLimit, - uint256 gasOverhead, - uint256 l1CostWei, - uint256 fastGasWei, - uint256 linkNative, - bool isExecution - ) internal view returns (uint96, uint96) { - uint256 gasWei = fastGasWei * hotVars.gasCeilingMultiplier; + PaymentParams memory paymentParams + ) internal view returns (PaymentReceipt memory receipt) { + uint256 gasWei = paymentParams.fastGasWei * hotVars.gasCeilingMultiplier; // in case it's actual execution use actual gas price, capped by fastGasWei * gasCeilingMultiplier - if (isExecution && tx.gasprice < gasWei) { + if (paymentParams.isTransaction && tx.gasprice < gasWei) { gasWei = tx.gasprice; } - uint256 gasPayment = ((gasWei * (gasLimit + gasOverhead) + l1CostWei) * 1e18) / linkNative; - uint256 premium = (((gasWei * gasLimit) + l1CostWei) * 1e9 * hotVars.paymentPremiumPPB) / - linkNative + - uint256(hotVars.flatFeeMicroLink) * - 1e12; - // LINK_TOTAL_SUPPLY < UINT96_MAX - if (gasPayment + premium > LINK_TOTAL_SUPPLY) revert PaymentGreaterThanAllLINK(); - return (uint96(gasPayment), uint96(premium)); + + uint256 gasPaymentUSD = (gasWei * (paymentParams.gasLimit + paymentParams.gasOverhead) + paymentParams.l1CostWei) * + paymentParams.nativeUSD; // this is USD * 1e36 ??? TODO + receipt.gasCharge = SafeCast.toUint96(gasPaymentUSD / paymentParams.billingToken.priceUSD); + receipt.gasReimbursementJuels = SafeCast.toUint96(gasPaymentUSD / paymentParams.linkUSD); + + uint256 flatFeeUSD = uint256(paymentParams.billingToken.flatFeeMicroLink) * 1e12 * paymentParams.linkUSD; // TODO - this should get replaced by flatFeeCents later + uint256 premiumUSD = ((((gasWei * paymentParams.gasLimit) + paymentParams.l1CostWei) * + paymentParams.billingToken.gasFeePPB * + paymentParams.nativeUSD) / 1e9) + flatFeeUSD; // this is USD * 1e18 + receipt.premium = SafeCast.toUint96(premiumUSD / paymentParams.billingToken.priceUSD); + receipt.premiumJuels = SafeCast.toUint96(premiumUSD / paymentParams.linkUSD); + + return receipt; } /** - * @dev calculates the max LINK payment for an upkeep. Called during checkUpkeep simulation and assumes + * @dev calculates the max payment for an upkeep. Called during checkUpkeep simulation and assumes * maximum gas overhead, L1 fee */ - function _getMaxLinkPayment( + function _getMaxPayment( HotVars memory hotVars, Trigger triggerType, uint32 performGas, uint256 fastGasWei, - uint256 linkNative + uint256 linkUSD, + uint256 nativeUSD, + IERC20 billingToken ) internal view returns (uint96) { + uint256 maxL1Fee; uint256 maxGasOverhead; - if (triggerType == Trigger.CONDITION) { - maxGasOverhead = REGISTRY_CONDITIONAL_OVERHEAD; - } else if (triggerType == Trigger.LOG) { - maxGasOverhead = REGISTRY_LOG_OVERHEAD; - } else { - revert InvalidTriggerType(); + + { + if (triggerType == Trigger.CONDITION) { + maxGasOverhead = REGISTRY_CONDITIONAL_OVERHEAD; + } else if (triggerType == Trigger.LOG) { + maxGasOverhead = REGISTRY_LOG_OVERHEAD; + } else { + revert InvalidTriggerType(); + } + uint256 maxCalldataSize = s_storage.maxPerformDataSize + + TRANSMIT_CALLDATA_FIXED_BYTES_OVERHEAD + + (TRANSMIT_CALLDATA_PER_SIGNER_BYTES_OVERHEAD * (hotVars.f + 1)); + (uint256 chainModuleFixedOverhead, uint256 chainModulePerByteOverhead) = s_hotVars.chainModule.getGasOverhead(); + maxGasOverhead += + (REGISTRY_PER_SIGNER_GAS_OVERHEAD * (hotVars.f + 1)) + + ((REGISTRY_PER_PERFORM_BYTE_GAS_OVERHEAD + chainModulePerByteOverhead) * maxCalldataSize) + + chainModuleFixedOverhead; + maxL1Fee = hotVars.gasCeilingMultiplier * hotVars.chainModule.getMaxL1Fee(maxCalldataSize); } - uint256 maxCalldataSize = s_storage.maxPerformDataSize + - TRANSMIT_CALLDATA_FIXED_BYTES_OVERHEAD + - (TRANSMIT_CALLDATA_PER_SIGNER_BYTES_OVERHEAD * (hotVars.f + 1)); - (uint256 chainModuleFixedOverhead, uint256 chainModulePerByteOverhead) = s_hotVars.chainModule.getGasOverhead(); - maxGasOverhead += - (REGISTRY_PER_SIGNER_GAS_OVERHEAD * (hotVars.f + 1)) + - ((REGISTRY_PER_PERFORM_BYTE_GAS_OVERHEAD + chainModulePerByteOverhead) * maxCalldataSize) + - chainModuleFixedOverhead; - - uint256 maxL1Fee = hotVars.gasCeilingMultiplier * hotVars.chainModule.getMaxL1Fee(maxCalldataSize); - - (uint96 reimbursement, uint96 premium) = _calculatePaymentAmount( + + PaymentReceipt memory receipt = _calculatePaymentAmount( hotVars, - performGas, - maxGasOverhead, - maxL1Fee, - fastGasWei, - linkNative, - false //isExecution + PaymentParams({ + gasLimit: performGas, + gasOverhead: maxGasOverhead, + l1CostWei: maxL1Fee, + fastGasWei: fastGasWei, + linkUSD: linkUSD, + nativeUSD: nativeUSD, + billingToken: _getBillingTokenPaymentParams(hotVars, billingToken), + isTransaction: false + }) ); - return reimbursement + premium; + return receipt.gasCharge + receipt.premium; } /** @@ -885,46 +920,40 @@ abstract contract AutomationRegistryBase2_3 is ConfirmedOwner { } /** - * @dev does postPerform payment processing for an upkeep. Deducts upkeep's balance and increases - * amount spent. + * @dev handles the payment processing after an upkeep has been performed. + * Deducts an upkeep's balance and increases the amount spent. */ - function _postPerformPayment( + function _handlePayment( HotVars memory hotVars, - uint256 upkeepId, - uint256 gasUsed, - uint256 fastGasWei, - uint256 linkNative, - uint256 gasOverhead, - uint256 l1Fee - ) internal returns (uint96 gasReimbursement, uint96 premium) { - (gasReimbursement, premium) = _calculatePaymentAmount( - hotVars, - gasUsed, - gasOverhead, - l1Fee, - fastGasWei, - linkNative, - true // isExecution - ); + PaymentParams memory paymentParams, + uint256 upkeepId + ) internal returns (PaymentReceipt memory) { + PaymentReceipt memory receipt = _calculatePaymentAmount(hotVars, paymentParams); uint96 balance = s_upkeep[upkeepId].balance; - uint96 payment = gasReimbursement + premium; + uint96 payment = receipt.gasCharge + receipt.premium; // this shouldn't happen, but in rare edge cases, we charge the full balance in case the user // can't cover the amount owed - if (balance < gasReimbursement) { + if (balance < receipt.gasCharge) { + // if the user can't cover the gas fee, then direct all of the payment to the transmitter and distribute no premium to the DON payment = balance; - gasReimbursement = balance; - premium = 0; + receipt.gasReimbursementJuels = SafeCast.toUint96( + (balance * paymentParams.billingToken.priceUSD) / paymentParams.linkUSD + ); + receipt.premiumJuels = 0; } else if (balance < payment) { + // if the user can cover the gas fee, but not the premium, then reduce the premium payment = balance; - premium = payment - gasReimbursement; + receipt.premiumJuels = SafeCast.toUint96( + ((balance * paymentParams.billingToken.priceUSD) / paymentParams.linkUSD) - receipt.gasReimbursementJuels + ); } s_upkeep[upkeepId].balance -= payment; s_upkeep[upkeepId].amountSpent += payment; - return (gasReimbursement, premium); + return receipt; } /** @@ -953,4 +982,46 @@ abstract contract AutomationRegistryBase2_3 is ConfirmedOwner { revert OnlySimulatedBackend(); } } + + /** + * @notice only allows finance admin to call the function + */ + function _onlyFinanceAdminAllowed() internal view { + if (msg.sender != s_storage.financeAdmin) { + revert OnlyFinanceAdmin(); + } + } + + /** + * @notice sets billing configuration for a token + * @param billingTokens the addresses of tokens + * @param billingConfigs the configs for tokens + */ + function _setBillingConfig(IERC20[] memory billingTokens, BillingConfig[] memory billingConfigs) internal { + // Clear existing data + for (uint256 i = 0; i < s_billingTokens.length; i++) { + delete s_billingConfigs[s_billingTokens[i]]; + } + delete s_billingTokens; + + for (uint256 i = 0; i < billingTokens.length; i++) { + IERC20 token = billingTokens[i]; + BillingConfig memory config = billingConfigs[i]; + + if (address(token) == ZERO_ADDRESS || address(config.priceFeed) == ZERO_ADDRESS) { + revert ZeroAddressNotAllowed(); + } + + // if this is a new token, add it to tokens list. Otherwise revert + if (address(s_billingConfigs[token].priceFeed) != ZERO_ADDRESS) { + revert DuplicateEntry(); + } + s_billingTokens.push(token); + + // update the billing config for an existing token or add a new one + s_billingConfigs[token] = config; + + emit BillingConfigSet(token, config); + } + } } diff --git a/contracts/src/v0.8/automation/dev/v2_3/AutomationRegistryLogicA2_3.sol b/contracts/src/v0.8/automation/dev/v2_3/AutomationRegistryLogicA2_3.sol index 721ea35171e..3635779bc9a 100644 --- a/contracts/src/v0.8/automation/dev/v2_3/AutomationRegistryLogicA2_3.sol +++ b/contracts/src/v0.8/automation/dev/v2_3/AutomationRegistryLogicA2_3.sol @@ -4,12 +4,14 @@ pragma solidity 0.8.19; import {EnumerableSet} from "../../../vendor/openzeppelin-solidity/v4.7.3/contracts/utils/structs/EnumerableSet.sol"; import {Address} from "../../../vendor/openzeppelin-solidity/v4.7.3/contracts/utils/Address.sol"; import {AutomationRegistryBase2_3} from "./AutomationRegistryBase2_3.sol"; +import {AutomationRegistryLogicC2_3} from "./AutomationRegistryLogicC2_3.sol"; import {AutomationRegistryLogicB2_3} from "./AutomationRegistryLogicB2_3.sol"; import {Chainable} from "../../Chainable.sol"; import {AutomationForwarder} from "../../AutomationForwarder.sol"; import {IAutomationForwarder} from "../../interfaces/IAutomationForwarder.sol"; import {UpkeepTranscoderInterfaceV2} from "../../interfaces/UpkeepTranscoderInterfaceV2.sol"; import {MigratableKeeperRegistryInterfaceV2} from "../../interfaces/MigratableKeeperRegistryInterfaceV2.sol"; +import {IERC20} from "../../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/IERC20.sol"; /** * @notice Logic contract, works in tandem with AutomationRegistry as a proxy @@ -21,16 +23,18 @@ contract AutomationRegistryLogicA2_3 is AutomationRegistryBase2_3, Chainable { /** * @param logicB the address of the second logic contract + * @dev we cast the contract to logicC in order to call logicC functions (via fallback) */ constructor( AutomationRegistryLogicB2_3 logicB ) AutomationRegistryBase2_3( - logicB.getLinkAddress(), - logicB.getLinkNativeFeedAddress(), - logicB.getFastGasFeedAddress(), - logicB.getAutomationForwarderLogic(), - logicB.getAllowedReadOnlyAddress() + AutomationRegistryLogicC2_3(address(logicB)).getLinkAddress(), + AutomationRegistryLogicC2_3(address(logicB)).getLinkUSDFeedAddress(), + AutomationRegistryLogicC2_3(address(logicB)).getNativeUSDFeedAddress(), + AutomationRegistryLogicC2_3(address(logicB)).getFastGasFeedAddress(), + AutomationRegistryLogicC2_3(address(logicB)).getAutomationForwarderLogic(), + AutomationRegistryLogicC2_3(address(logicB)).getAllowedReadOnlyAddress() ) Chainable(address(logicB)) {} @@ -56,7 +60,7 @@ contract AutomationRegistryLogicA2_3 is AutomationRegistryBase2_3, Chainable { uint256 gasUsed, uint256 gasLimit, uint256 fastGasWei, - uint256 linkNative + uint256 linkUSD ) { _preventExecution(); @@ -65,15 +69,26 @@ contract AutomationRegistryLogicA2_3 is AutomationRegistryBase2_3, Chainable { HotVars memory hotVars = s_hotVars; Upkeep memory upkeep = s_upkeep[id]; - if (hotVars.paused) return (false, bytes(""), UpkeepFailureReason.REGISTRY_PAUSED, 0, upkeep.performGas, 0, 0); - if (upkeep.maxValidBlocknumber != UINT32_MAX) - return (false, bytes(""), UpkeepFailureReason.UPKEEP_CANCELLED, 0, upkeep.performGas, 0, 0); - if (upkeep.paused) return (false, bytes(""), UpkeepFailureReason.UPKEEP_PAUSED, 0, upkeep.performGas, 0, 0); - - (fastGasWei, linkNative) = _getFeedData(hotVars); - uint96 maxLinkPayment = _getMaxLinkPayment(hotVars, triggerType, upkeep.performGas, fastGasWei, linkNative); - if (upkeep.balance < maxLinkPayment) { - return (false, bytes(""), UpkeepFailureReason.INSUFFICIENT_BALANCE, 0, upkeep.performGas, 0, 0); + { + uint256 nativeUSD; + uint96 maxPayment; + if (hotVars.paused) return (false, bytes(""), UpkeepFailureReason.REGISTRY_PAUSED, 0, upkeep.performGas, 0, 0); + if (upkeep.maxValidBlocknumber != UINT32_MAX) + return (false, bytes(""), UpkeepFailureReason.UPKEEP_CANCELLED, 0, upkeep.performGas, 0, 0); + if (upkeep.paused) return (false, bytes(""), UpkeepFailureReason.UPKEEP_PAUSED, 0, upkeep.performGas, 0, 0); + (fastGasWei, linkUSD, nativeUSD) = _getFeedData(hotVars); + maxPayment = _getMaxPayment( + hotVars, + triggerType, + upkeep.performGas, + fastGasWei, + linkUSD, + nativeUSD, + upkeep.billingToken + ); + if (upkeep.balance < maxPayment) { + return (false, bytes(""), UpkeepFailureReason.INSUFFICIENT_BALANCE, 0, upkeep.performGas, 0, 0); + } } bytes memory callData = _checkPayload(id, triggerType, triggerData); @@ -92,7 +107,7 @@ contract AutomationRegistryLogicA2_3 is AutomationRegistryBase2_3, Chainable { gasUsed, upkeep.performGas, fastGasWei, - linkNative + linkUSD ); } return ( @@ -102,21 +117,13 @@ contract AutomationRegistryLogicA2_3 is AutomationRegistryBase2_3, Chainable { gasUsed, upkeep.performGas, fastGasWei, - linkNative + linkUSD ); } (upkeepNeeded, performData) = abi.decode(result, (bool, bytes)); if (!upkeepNeeded) - return ( - false, - bytes(""), - UpkeepFailureReason.UPKEEP_NOT_NEEDED, - gasUsed, - upkeep.performGas, - fastGasWei, - linkNative - ); + return (false, bytes(""), UpkeepFailureReason.UPKEEP_NOT_NEEDED, gasUsed, upkeep.performGas, fastGasWei, linkUSD); if (performData.length > s_storage.maxPerformDataSize) return ( @@ -126,10 +133,10 @@ contract AutomationRegistryLogicA2_3 is AutomationRegistryBase2_3, Chainable { gasUsed, upkeep.performGas, fastGasWei, - linkNative + linkUSD ); - return (upkeepNeeded, performData, upkeepFailureReason, gasUsed, upkeep.performGas, fastGasWei, linkNative); + return (upkeepNeeded, performData, upkeepFailureReason, gasUsed, upkeep.performGas, fastGasWei, linkUSD); } /** @@ -147,7 +154,7 @@ contract AutomationRegistryLogicA2_3 is AutomationRegistryBase2_3, Chainable { uint256 gasUsed, uint256 gasLimit, uint256 fastGasWei, - uint256 linkNative + uint256 linkUSD ) { return checkUpkeep(id, bytes("")); @@ -219,6 +226,7 @@ contract AutomationRegistryLogicA2_3 is AutomationRegistryBase2_3, Chainable { uint32 gasLimit, address admin, Trigger triggerType, + IERC20 billingToken, bytes calldata checkData, bytes memory triggerConfig, bytes memory offchainConfig @@ -238,7 +246,8 @@ contract AutomationRegistryLogicA2_3 is AutomationRegistryBase2_3, Chainable { lastPerformedBlockNumber: 0, amountSpent: 0, paused: false, - forwarder: forwarder + forwarder: forwarder, + billingToken: billingToken }), admin, checkData, @@ -253,20 +262,6 @@ contract AutomationRegistryLogicA2_3 is AutomationRegistryBase2_3, Chainable { return (id); } - /** - * @notice this function registers a conditional upkeep, using a backwards compatible function signature - * @dev this function is backwards compatible with versions <=2.0, but may be removed in a future version - */ - function registerUpkeep( - address target, - uint32 gasLimit, - address admin, - bytes calldata checkData, - bytes calldata offchainConfig - ) external returns (uint256 id) { - return registerUpkeep(target, gasLimit, admin, Trigger.CONDITION, checkData, bytes(""), offchainConfig); - } - /** * @notice cancels an upkeep * @param id the upkeepID to cancel @@ -276,6 +271,7 @@ contract AutomationRegistryLogicA2_3 is AutomationRegistryBase2_3, Chainable { function cancelUpkeep(uint256 id) external { Upkeep memory upkeep = s_upkeep[id]; bool isOwner = msg.sender == owner(); + uint96 minSpend = s_billingConfigs[upkeep.billingToken].minSpend; uint256 height = s_hotVars.chainModule.blockNumber(); if (upkeep.maxValidBlocknumber == 0) revert CannotCancel(); @@ -288,18 +284,17 @@ contract AutomationRegistryLogicA2_3 is AutomationRegistryBase2_3, Chainable { s_upkeep[id].maxValidBlocknumber = uint32(height); s_upkeepIDs.remove(id); - // charge the cancellation fee if the minUpkeepSpend is not met - uint96 minUpkeepSpend = s_storage.minUpkeepSpend; + // charge the cancellation fee if the minSpend is not met uint96 cancellationFee = 0; - // cancellationFee is supposed to be min(max(minUpkeepSpend - amountSpent,0), amountLeft) - if (upkeep.amountSpent < minUpkeepSpend) { - cancellationFee = minUpkeepSpend - upkeep.amountSpent; + // cancellationFee is min(max(minSpend - amountSpent, 0), amountLeft) + if (upkeep.amountSpent < minSpend) { + cancellationFee = minSpend - uint96(upkeep.amountSpent); if (cancellationFee > upkeep.balance) { cancellationFee = upkeep.balance; } } s_upkeep[id].balance = upkeep.balance - cancellationFee; - s_storage.ownerLinkBalance = s_storage.ownerLinkBalance + cancellationFee; + s_reserveAmounts[address(upkeep.billingToken)] = s_reserveAmounts[address(upkeep.billingToken)] - cancellationFee; emit UpkeepCanceled(id, uint64(height)); } @@ -307,14 +302,15 @@ contract AutomationRegistryLogicA2_3 is AutomationRegistryBase2_3, Chainable { /** * @notice adds fund to an upkeep * @param id the upkeepID - * @param amount the amount of LINK to fund, in jules (jules = "wei" of LINK) + * @param amount the amount of funds to add, in the upkeep's billing token */ function addFunds(uint256 id, uint96 amount) external { Upkeep memory upkeep = s_upkeep[id]; if (upkeep.maxValidBlocknumber != UINT32_MAX) revert UpkeepCancelled(); s_upkeep[id].balance = upkeep.balance + amount; - s_expectedLinkBalance = s_expectedLinkBalance + amount; - i_link.transferFrom(msg.sender, address(this), amount); + s_reserveAmounts[address(upkeep.billingToken)] = s_reserveAmounts[address(upkeep.billingToken)] + amount; + bool success = upkeep.billingToken.transferFrom(msg.sender, address(this), amount); + if (!success) revert TransferFailed(); emit FundsAdded(id, msg.sender, amount); } @@ -361,7 +357,9 @@ contract AutomationRegistryLogicA2_3 is AutomationRegistryBase2_3, Chainable { s_upkeepIDs.remove(id); emit UpkeepMigrated(id, upkeep.balance, destination); } - s_expectedLinkBalance = s_expectedLinkBalance - totalBalanceRemaining; + s_reserveAmounts[address(upkeep.billingToken)] = + s_reserveAmounts[address(upkeep.billingToken)] - + totalBalanceRemaining; bytes memory encodedUpkeeps = abi.encode( ids, upkeeps, @@ -417,15 +415,4 @@ contract AutomationRegistryLogicA2_3 is AutomationRegistryBase2_3, Chainable { emit UpkeepReceived(ids[idx], upkeeps[idx].balance, msg.sender); } } - - /** - * @notice sets the upkeep trigger config - * @param id the upkeepID to change the trigger for - * @param triggerConfig the new trigger config - */ - function setUpkeepTriggerConfig(uint256 id, bytes calldata triggerConfig) external { - _requireAdminAndNotCancelled(id); - s_upkeepTriggerConfig[id] = triggerConfig; - emit UpkeepTriggerConfigSet(id, triggerConfig); - } } diff --git a/contracts/src/v0.8/automation/dev/v2_3/AutomationRegistryLogicB2_3.sol b/contracts/src/v0.8/automation/dev/v2_3/AutomationRegistryLogicB2_3.sol index 1f8655967cf..5015b5c3248 100644 --- a/contracts/src/v0.8/automation/dev/v2_3/AutomationRegistryLogicB2_3.sol +++ b/contracts/src/v0.8/automation/dev/v2_3/AutomationRegistryLogicB2_3.sol @@ -4,26 +4,31 @@ pragma solidity 0.8.19; import {AutomationRegistryBase2_3} from "./AutomationRegistryBase2_3.sol"; import {EnumerableSet} from "../../../vendor/openzeppelin-solidity/v4.7.3/contracts/utils/structs/EnumerableSet.sol"; import {Address} from "../../../vendor/openzeppelin-solidity/v4.7.3/contracts/utils/Address.sol"; -import {UpkeepFormat} from "../../interfaces/UpkeepTranscoderInterface.sol"; -import {IAutomationForwarder} from "../../interfaces/IAutomationForwarder.sol"; -import {IChainModule} from "../interfaces/IChainModule.sol"; +import {AutomationRegistryLogicC2_3} from "./AutomationRegistryLogicC2_3.sol"; +import {Chainable} from "../../Chainable.sol"; +import {IERC20} from "../../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/IERC20.sol"; -contract AutomationRegistryLogicB2_3 is AutomationRegistryBase2_3 { +contract AutomationRegistryLogicB2_3 is AutomationRegistryBase2_3, Chainable { using Address for address; using EnumerableSet for EnumerableSet.UintSet; using EnumerableSet for EnumerableSet.AddressSet; /** - * @dev see AutomationRegistry master contract for constructor description + * @param logicC the address of the third logic contract */ constructor( - address link, - address linkNativeFeed, - address fastGasFeed, - address automationForwarderLogic, - address allowedReadOnlyAddress - ) AutomationRegistryBase2_3(link, linkNativeFeed, fastGasFeed, automationForwarderLogic, allowedReadOnlyAddress) {} - + AutomationRegistryLogicC2_3 logicC + ) + AutomationRegistryBase2_3( + logicC.getLinkAddress(), + logicC.getLinkUSDFeedAddress(), + logicC.getNativeUSDFeedAddress(), + logicC.getFastGasFeedAddress(), + logicC.getAutomationForwarderLogic(), + logicC.getAllowedReadOnlyAddress() + ) + Chainable(address(logicC)) + {} // ================================================================ // | UPKEEP MANAGEMENT | // ================================================================ @@ -110,7 +115,18 @@ contract AutomationRegistryLogicB2_3 is AutomationRegistryBase2_3 { } /** - * @notice withdraws LINK funds from an upkeep + * @notice sets the upkeep trigger config + * @param id the upkeepID to change the trigger for + * @param triggerConfig the new trigger config + */ + function setUpkeepTriggerConfig(uint256 id, bytes calldata triggerConfig) external { + _requireAdminAndNotCancelled(id); + s_upkeepTriggerConfig[id] = triggerConfig; + emit UpkeepTriggerConfigSet(id, triggerConfig); + } + + /** + * @notice withdraws an upkeep's funds from an upkeep * @dev note that an upkeep must be cancelled first!! */ function withdrawFunds(uint256 id, address to) external nonReentrant { @@ -119,421 +135,43 @@ contract AutomationRegistryLogicB2_3 is AutomationRegistryBase2_3 { if (s_upkeepAdmin[id] != msg.sender) revert OnlyCallableByAdmin(); if (upkeep.maxValidBlocknumber > s_hotVars.chainModule.blockNumber()) revert UpkeepNotCanceled(); uint96 amountToWithdraw = s_upkeep[id].balance; - s_expectedLinkBalance = s_expectedLinkBalance - amountToWithdraw; + s_reserveAmounts[address(upkeep.billingToken)] = s_reserveAmounts[address(upkeep.billingToken)] - amountToWithdraw; s_upkeep[id].balance = 0; - i_link.transfer(to, amountToWithdraw); + bool success = upkeep.billingToken.transfer(to, amountToWithdraw); + if (!success) revert TransferFailed(); emit FundsWithdrawn(id, amountToWithdraw, to); } - // ================================================================ - // | NODE MANAGEMENT | - // ================================================================ - /** - * @notice transfers the address of payee for a transmitter + * @notice LINK available to withdraw by the finance team */ - function transferPayeeship(address transmitter, address proposed) external { - if (s_transmitterPayees[transmitter] != msg.sender) revert OnlyCallableByPayee(); - if (proposed == msg.sender) revert ValueNotChanged(); - - if (s_proposedPayee[transmitter] != proposed) { - s_proposedPayee[transmitter] = proposed; - emit PayeeshipTransferRequested(transmitter, msg.sender, proposed); - } - } - - /** - * @notice accepts the transfer of the payee - */ - function acceptPayeeship(address transmitter) external { - if (s_proposedPayee[transmitter] != msg.sender) revert OnlyCallableByProposedPayee(); - address past = s_transmitterPayees[transmitter]; - s_transmitterPayees[transmitter] = msg.sender; - s_proposedPayee[transmitter] = ZERO_ADDRESS; - - emit PayeeshipTransferred(transmitter, past, msg.sender); + function linkAvailableForPayment() public view returns (uint256) { + return i_link.balanceOf(address(this)) - s_reserveAmounts[address(i_link)]; } - /** - * @notice withdraws LINK received as payment for work performed - */ - function withdrawPayment(address from, address to) external { + function withdrawLinkFees(address to, uint256 amount) external { + _onlyFinanceAdminAllowed(); if (to == ZERO_ADDRESS) revert InvalidRecipient(); - if (s_transmitterPayees[from] != msg.sender) revert OnlyCallableByPayee(); - uint96 balance = _updateTransmitterBalanceFromPool(from, s_hotVars.totalPremium, uint96(s_transmittersList.length)); - s_transmitters[from].balance = 0; - s_expectedLinkBalance = s_expectedLinkBalance - balance; - i_link.transfer(to, balance); - emit PaymentWithdrawn(from, balance, to, msg.sender); - } - // ================================================================ - // | OWNER / MANAGER ACTIONS | - // ================================================================ - - /** - * @notice sets the privilege config for an upkeep - */ - function setUpkeepPrivilegeConfig(uint256 upkeepId, bytes calldata newPrivilegeConfig) external { - if (msg.sender != s_storage.upkeepPrivilegeManager) { - revert OnlyCallableByUpkeepPrivilegeManager(); - } - s_upkeepPrivilegeConfig[upkeepId] = newPrivilegeConfig; - emit UpkeepPrivilegeConfigSet(upkeepId, newPrivilegeConfig); - } - - /** - * @notice withdraws the owner's LINK balance - */ - function withdrawOwnerFunds() external onlyOwner { - uint96 amount = s_storage.ownerLinkBalance; - s_expectedLinkBalance = s_expectedLinkBalance - amount; - s_storage.ownerLinkBalance = 0; - emit OwnerFundsWithdrawn(amount); - i_link.transfer(msg.sender, amount); - } - - /** - * @notice allows the owner to withdraw any LINK accidentally sent to the contract - */ - function recoverFunds() external onlyOwner { - uint256 total = i_link.balanceOf(address(this)); - i_link.transfer(msg.sender, total - s_expectedLinkBalance); - } + uint256 available = linkAvailableForPayment(); + if (amount > available) revert InsufficientBalance(available, amount); - /** - * @notice sets the payees for the transmitters - */ - function setPayees(address[] calldata payees) external onlyOwner { - if (s_transmittersList.length != payees.length) revert ParameterLengthError(); - for (uint256 i = 0; i < s_transmittersList.length; i++) { - address transmitter = s_transmittersList[i]; - address oldPayee = s_transmitterPayees[transmitter]; - address newPayee = payees[i]; - if ( - (newPayee == ZERO_ADDRESS) || (oldPayee != ZERO_ADDRESS && oldPayee != newPayee && newPayee != IGNORE_ADDRESS) - ) revert InvalidPayee(); - if (newPayee != IGNORE_ADDRESS) { - s_transmitterPayees[transmitter] = newPayee; - } + bool transferStatus = i_link.transfer(to, amount); + if (!transferStatus) { + revert TransferFailed(); } - emit PayeesUpdated(s_transmittersList, payees); + emit FeesWithdrawn(to, address(i_link), amount); } - /** - * @notice sets the migration permission for a peer registry - * @dev this must be done before upkeeps can be migrated to/from another registry - */ - function setPeerRegistryMigrationPermission(address peer, MigrationPermission permission) external onlyOwner { - s_peerRegistryMigrationPermission[peer] = permission; - } - - /** - * @notice pauses the entire registry - */ - function pause() external onlyOwner { - s_hotVars.paused = true; - emit Paused(msg.sender); - } - - /** - * @notice unpauses the entire registry - */ - function unpause() external onlyOwner { - s_hotVars.paused = false; - emit Unpaused(msg.sender); - } - - /** - * @notice sets a generic bytes field used to indicate the privilege that this admin address had - * @param admin the address to set privilege for - * @param newPrivilegeConfig the privileges that this admin has - */ - function setAdminPrivilegeConfig(address admin, bytes calldata newPrivilegeConfig) external { - if (msg.sender != s_storage.upkeepPrivilegeManager) { - revert OnlyCallableByUpkeepPrivilegeManager(); - } - s_adminPrivilegeConfig[admin] = newPrivilegeConfig; - emit AdminPrivilegeConfigSet(admin, newPrivilegeConfig); - } - - // ================================================================ - // | GETTERS | - // ================================================================ - - function getConditionalGasOverhead() external pure returns (uint256) { - return REGISTRY_CONDITIONAL_OVERHEAD; - } - - function getLogGasOverhead() external pure returns (uint256) { - return REGISTRY_LOG_OVERHEAD; - } - - function getPerPerformByteGasOverhead() external pure returns (uint256) { - return REGISTRY_PER_PERFORM_BYTE_GAS_OVERHEAD; - } - - function getPerSignerGasOverhead() external pure returns (uint256) { - return REGISTRY_PER_SIGNER_GAS_OVERHEAD; - } - - function getTransmitCalldataFixedBytesOverhead() external pure returns (uint256) { - return TRANSMIT_CALLDATA_FIXED_BYTES_OVERHEAD; - } - - function getTransmitCalldataPerSignerBytesOverhead() external pure returns (uint256) { - return TRANSMIT_CALLDATA_PER_SIGNER_BYTES_OVERHEAD; - } - - function getCancellationDelay() external pure returns (uint256) { - return CANCELLATION_DELAY; - } - - function getLinkAddress() external view returns (address) { - return address(i_link); - } - - function getLinkNativeFeedAddress() external view returns (address) { - return address(i_linkNativeFeed); - } - - function getFastGasFeedAddress() external view returns (address) { - return address(i_fastGasFeed); - } - - function getAutomationForwarderLogic() external view returns (address) { - return i_automationForwarderLogic; - } - - function getAllowedReadOnlyAddress() external view returns (address) { - return i_allowedReadOnlyAddress; - } - - function upkeepTranscoderVersion() public pure returns (UpkeepFormat) { - return UPKEEP_TRANSCODER_VERSION_BASE; - } - - function upkeepVersion() public pure returns (uint8) { - return UPKEEP_VERSION_BASE; - } - - /** - * @notice read all of the details about an upkeep - * @dev this function may be deprecated in a future version of automation in favor of individual - * getters for each field - */ - function getUpkeep(uint256 id) external view returns (UpkeepInfo memory upkeepInfo) { - Upkeep memory reg = s_upkeep[id]; - address target = address(reg.forwarder) == address(0) ? address(0) : reg.forwarder.getTarget(); - upkeepInfo = UpkeepInfo({ - target: target, - performGas: reg.performGas, - checkData: s_checkData[id], - balance: reg.balance, - admin: s_upkeepAdmin[id], - maxValidBlocknumber: reg.maxValidBlocknumber, - lastPerformedBlockNumber: reg.lastPerformedBlockNumber, - amountSpent: reg.amountSpent, - paused: reg.paused, - offchainConfig: s_upkeepOffchainConfig[id] - }); - return upkeepInfo; - } - - /** - * @notice retrieve active upkeep IDs. Active upkeep is defined as an upkeep which is not paused and not canceled. - * @param startIndex starting index in list - * @param maxCount max count to retrieve (0 = unlimited) - * @dev the order of IDs in the list is **not guaranteed**, therefore, if making successive calls, one - * should consider keeping the blockheight constant to ensure a holistic picture of the contract state - */ - function getActiveUpkeepIDs(uint256 startIndex, uint256 maxCount) external view returns (uint256[] memory) { - uint256 numUpkeeps = s_upkeepIDs.length(); - if (startIndex >= numUpkeeps) revert IndexOutOfRange(); - uint256 endIndex = startIndex + maxCount; - endIndex = endIndex > numUpkeeps || maxCount == 0 ? numUpkeeps : endIndex; - uint256[] memory ids = new uint256[](endIndex - startIndex); - for (uint256 idx = 0; idx < ids.length; idx++) { - ids[idx] = s_upkeepIDs.at(idx + startIndex); - } - return ids; - } - - /** - * @notice returns the upkeep's trigger type - */ - function getTriggerType(uint256 upkeepId) external pure returns (Trigger) { - return _getTriggerType(upkeepId); - } - - /** - * @notice returns the trigger config for an upkeeep - */ - function getUpkeepTriggerConfig(uint256 upkeepId) public view returns (bytes memory) { - return s_upkeepTriggerConfig[upkeepId]; - } - - /** - * @notice read the current info about any transmitter address - */ - function getTransmitterInfo( - address query - ) external view returns (bool active, uint8 index, uint96 balance, uint96 lastCollected, address payee) { - Transmitter memory transmitter = s_transmitters[query]; + function withdrawERC20Fees(address assetAddress, address to, uint256 amount) external { + _onlyFinanceAdminAllowed(); + if (to == ZERO_ADDRESS) revert InvalidRecipient(); - uint96 pooledShare = 0; - if (transmitter.active) { - uint96 totalDifference = s_hotVars.totalPremium - transmitter.lastCollected; - pooledShare = totalDifference / uint96(s_transmittersList.length); + bool transferStatus = IERC20(assetAddress).transfer(to, amount); + if (!transferStatus) { + revert TransferFailed(); } - return ( - transmitter.active, - transmitter.index, - (transmitter.balance + pooledShare), - transmitter.lastCollected, - s_transmitterPayees[query] - ); - } - - /** - * @notice read the current info about any signer address - */ - function getSignerInfo(address query) external view returns (bool active, uint8 index) { - Signer memory signer = s_signers[query]; - return (signer.active, signer.index); - } - - /** - * @notice read the current state of the registry - * @dev this function is deprecated - */ - function getState() - external - view - returns ( - State memory state, - OnchainConfigLegacy memory config, - address[] memory signers, - address[] memory transmitters, - uint8 f - ) - { - state = State({ - nonce: s_storage.nonce, - ownerLinkBalance: s_storage.ownerLinkBalance, - expectedLinkBalance: s_expectedLinkBalance, - totalPremium: s_hotVars.totalPremium, - numUpkeeps: s_upkeepIDs.length(), - configCount: s_storage.configCount, - latestConfigBlockNumber: s_storage.latestConfigBlockNumber, - latestConfigDigest: s_latestConfigDigest, - latestEpoch: s_hotVars.latestEpoch, - paused: s_hotVars.paused - }); - - config = OnchainConfigLegacy({ - paymentPremiumPPB: s_hotVars.paymentPremiumPPB, - flatFeeMicroLink: s_hotVars.flatFeeMicroLink, - checkGasLimit: s_storage.checkGasLimit, - stalenessSeconds: s_hotVars.stalenessSeconds, - gasCeilingMultiplier: s_hotVars.gasCeilingMultiplier, - minUpkeepSpend: s_storage.minUpkeepSpend, - maxPerformGas: s_storage.maxPerformGas, - maxCheckDataSize: s_storage.maxCheckDataSize, - maxPerformDataSize: s_storage.maxPerformDataSize, - maxRevertDataSize: s_storage.maxRevertDataSize, - fallbackGasPrice: s_fallbackGasPrice, - fallbackLinkPrice: s_fallbackLinkPrice, - transcoder: s_storage.transcoder, - registrars: s_registrars.values(), - upkeepPrivilegeManager: s_storage.upkeepPrivilegeManager - }); - - return (state, config, s_signersList, s_transmittersList, s_hotVars.f); - } - - /** - * @notice get the chain module - */ - function getChainModule() external view returns (IChainModule chainModule) { - return s_hotVars.chainModule; - } - - /** - * @notice if this registry has reorg protection enabled - */ - function getReorgProtectionEnabled() external view returns (bool reorgProtectionEnabled) { - return s_hotVars.reorgProtectionEnabled; - } - - /** - * @notice calculates the minimum balance required for an upkeep to remain eligible - * @param id the upkeep id to calculate minimum balance for - */ - function getBalance(uint256 id) external view returns (uint96 balance) { - return s_upkeep[id].balance; - } - - /** - * @notice calculates the minimum balance required for an upkeep to remain eligible - * @param id the upkeep id to calculate minimum balance for - */ - function getMinBalance(uint256 id) external view returns (uint96) { - return getMinBalanceForUpkeep(id); - } - - /** - * @notice calculates the minimum balance required for an upkeep to remain eligible - * @param id the upkeep id to calculate minimum balance for - * @dev this will be deprecated in a future version in favor of getMinBalance - */ - function getMinBalanceForUpkeep(uint256 id) public view returns (uint96 minBalance) { - return getMaxPaymentForGas(_getTriggerType(id), s_upkeep[id].performGas); - } - - /** - * @notice calculates the maximum payment for a given gas limit - * @param gasLimit the gas to calculate payment for - */ - function getMaxPaymentForGas(Trigger triggerType, uint32 gasLimit) public view returns (uint96 maxPayment) { - HotVars memory hotVars = s_hotVars; - (uint256 fastGasWei, uint256 linkNative) = _getFeedData(hotVars); - return _getMaxLinkPayment(hotVars, triggerType, gasLimit, fastGasWei, linkNative); - } - - /** - * @notice retrieves the migration permission for a peer registry - */ - function getPeerRegistryMigrationPermission(address peer) external view returns (MigrationPermission) { - return s_peerRegistryMigrationPermission[peer]; - } - - /** - * @notice returns the upkeep privilege config - */ - function getUpkeepPrivilegeConfig(uint256 upkeepId) external view returns (bytes memory) { - return s_upkeepPrivilegeConfig[upkeepId]; - } - - /** - * @notice returns the upkeep privilege config - */ - function getAdminPrivilegeConfig(address admin) external view returns (bytes memory) { - return s_adminPrivilegeConfig[admin]; - } - - /** - * @notice returns the upkeep's forwarder contract - */ - function getForwarder(uint256 upkeepID) external view returns (IAutomationForwarder) { - return s_upkeep[upkeepID].forwarder; - } - - /** - * @notice returns the upkeep's forwarder contract - */ - function hasDedupKey(bytes32 dedupKey) external view returns (bool) { - return s_dedupKeys[dedupKey]; + emit FeesWithdrawn(to, assetAddress, amount); } } 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 new file mode 100644 index 00000000000..2c7fc16b130 --- /dev/null +++ b/contracts/src/v0.8/automation/dev/v2_3/AutomationRegistryLogicC2_3.sol @@ -0,0 +1,522 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity 0.8.19; + +import {AutomationRegistryBase2_3} from "./AutomationRegistryBase2_3.sol"; +import {EnumerableSet} from "../../../vendor/openzeppelin-solidity/v4.7.3/contracts/utils/structs/EnumerableSet.sol"; +import {Address} from "../../../vendor/openzeppelin-solidity/v4.7.3/contracts/utils/Address.sol"; +import {UpkeepFormat} from "../../interfaces/UpkeepTranscoderInterface.sol"; +import {IAutomationForwarder} from "../../interfaces/IAutomationForwarder.sol"; +import {IChainModule} from "../../interfaces/IChainModule.sol"; +import {IERC20} from "../../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/IERC20.sol"; +import {IAutomationV21PlusCommon} from "../../interfaces/IAutomationV21PlusCommon.sol"; + +contract AutomationRegistryLogicC2_3 is AutomationRegistryBase2_3 { + using Address for address; + using EnumerableSet for EnumerableSet.UintSet; + using EnumerableSet for EnumerableSet.AddressSet; + + /** + * @dev see AutomationRegistry master contract for constructor description + */ + constructor( + address link, + address linkUSDFeed, + address nativeUSDFeed, + address fastGasFeed, + address automationForwarderLogic, + address allowedReadOnlyAddress + ) + AutomationRegistryBase2_3( + link, + linkUSDFeed, + nativeUSDFeed, + fastGasFeed, + automationForwarderLogic, + allowedReadOnlyAddress + ) + {} + + // ================================================================ + // | NODE MANAGEMENT | + // ================================================================ + + /** + * @notice transfers the address of payee for a transmitter + */ + function transferPayeeship(address transmitter, address proposed) external { + if (s_transmitterPayees[transmitter] != msg.sender) revert OnlyCallableByPayee(); + if (proposed == msg.sender) revert ValueNotChanged(); + + if (s_proposedPayee[transmitter] != proposed) { + s_proposedPayee[transmitter] = proposed; + emit PayeeshipTransferRequested(transmitter, msg.sender, proposed); + } + } + + /** + * @notice accepts the transfer of the payee + */ + function acceptPayeeship(address transmitter) external { + if (s_proposedPayee[transmitter] != msg.sender) revert OnlyCallableByProposedPayee(); + address past = s_transmitterPayees[transmitter]; + s_transmitterPayees[transmitter] = msg.sender; + s_proposedPayee[transmitter] = ZERO_ADDRESS; + + emit PayeeshipTransferred(transmitter, past, msg.sender); + } + + /** + * @notice withdraws LINK received as payment for work performed + */ + function withdrawPayment(address from, address to) external { + if (to == ZERO_ADDRESS) revert InvalidRecipient(); + if (s_transmitterPayees[from] != msg.sender) revert OnlyCallableByPayee(); + uint96 balance = _updateTransmitterBalanceFromPool(from, s_hotVars.totalPremium, uint96(s_transmittersList.length)); + s_transmitters[from].balance = 0; + s_reserveAmounts[address(i_link)] = s_reserveAmounts[address(i_link)] - balance; + i_link.transfer(to, balance); + emit PaymentWithdrawn(from, balance, to, msg.sender); + } + + // ================================================================ + // | OWNER / MANAGER ACTIONS | + // ================================================================ + + /** + * @notice sets the privilege config for an upkeep + */ + function setUpkeepPrivilegeConfig(uint256 upkeepId, bytes calldata newPrivilegeConfig) external { + if (msg.sender != s_storage.upkeepPrivilegeManager) { + revert OnlyCallableByUpkeepPrivilegeManager(); + } + s_upkeepPrivilegeConfig[upkeepId] = newPrivilegeConfig; + emit UpkeepPrivilegeConfigSet(upkeepId, newPrivilegeConfig); + } + + /** + * @notice sets the payees for the transmitters + */ + function setPayees(address[] calldata payees) external onlyOwner { + if (s_transmittersList.length != payees.length) revert ParameterLengthError(); + for (uint256 i = 0; i < s_transmittersList.length; i++) { + address transmitter = s_transmittersList[i]; + address oldPayee = s_transmitterPayees[transmitter]; + address newPayee = payees[i]; + if ( + (newPayee == ZERO_ADDRESS) || (oldPayee != ZERO_ADDRESS && oldPayee != newPayee && newPayee != IGNORE_ADDRESS) + ) revert InvalidPayee(); + if (newPayee != IGNORE_ADDRESS) { + s_transmitterPayees[transmitter] = newPayee; + } + } + emit PayeesUpdated(s_transmittersList, payees); + } + + /** + * @notice sets the migration permission for a peer registry + * @dev this must be done before upkeeps can be migrated to/from another registry + */ + function setPeerRegistryMigrationPermission(address peer, MigrationPermission permission) external onlyOwner { + s_peerRegistryMigrationPermission[peer] = permission; + } + + /** + * @notice pauses the entire registry + */ + function pause() external onlyOwner { + s_hotVars.paused = true; + emit Paused(msg.sender); + } + + /** + * @notice unpauses the entire registry + */ + function unpause() external onlyOwner { + s_hotVars.paused = false; + emit Unpaused(msg.sender); + } + + /** + * @notice sets a generic bytes field used to indicate the privilege that this admin address had + * @param admin the address to set privilege for + * @param newPrivilegeConfig the privileges that this admin has + */ + function setAdminPrivilegeConfig(address admin, bytes calldata newPrivilegeConfig) external { + if (msg.sender != s_storage.upkeepPrivilegeManager) { + revert OnlyCallableByUpkeepPrivilegeManager(); + } + s_adminPrivilegeConfig[admin] = newPrivilegeConfig; + emit AdminPrivilegeConfigSet(admin, newPrivilegeConfig); + } + + // ================================================================ + // | GETTERS | + // ================================================================ + + function getConditionalGasOverhead() external pure returns (uint256) { + return REGISTRY_CONDITIONAL_OVERHEAD; + } + + function getLogGasOverhead() external pure returns (uint256) { + return REGISTRY_LOG_OVERHEAD; + } + + function getPerPerformByteGasOverhead() external pure returns (uint256) { + return REGISTRY_PER_PERFORM_BYTE_GAS_OVERHEAD; + } + + function getPerSignerGasOverhead() external pure returns (uint256) { + return REGISTRY_PER_SIGNER_GAS_OVERHEAD; + } + + function getTransmitCalldataFixedBytesOverhead() external pure returns (uint256) { + return TRANSMIT_CALLDATA_FIXED_BYTES_OVERHEAD; + } + + function getTransmitCalldataPerSignerBytesOverhead() external pure returns (uint256) { + return TRANSMIT_CALLDATA_PER_SIGNER_BYTES_OVERHEAD; + } + + function getCancellationDelay() external pure returns (uint256) { + return CANCELLATION_DELAY; + } + + function getLinkAddress() external view returns (address) { + return address(i_link); + } + + function getLinkUSDFeedAddress() external view returns (address) { + return address(i_linkUSDFeed); + } + + function getNativeUSDFeedAddress() external view returns (address) { + return address(i_nativeUSDFeed); + } + + function getFastGasFeedAddress() external view returns (address) { + return address(i_fastGasFeed); + } + + function getAutomationForwarderLogic() external view returns (address) { + return i_automationForwarderLogic; + } + + function getAllowedReadOnlyAddress() external view returns (address) { + return i_allowedReadOnlyAddress; + } + + function getBillingToken(uint256 upkeepID) external view returns (IERC20) { + return s_upkeep[upkeepID].billingToken; + } + + function getBillingTokens() external view returns (IERC20[] memory) { + return s_billingTokens; + } + + function supportsBillingToken(IERC20 token) external view returns (bool) { + return address(s_billingConfigs[token].priceFeed) != address(0); + } + + function getBillingTokenConfig(IERC20 token) external view returns (BillingConfig memory) { + return s_billingConfigs[token]; + } + + function upkeepTranscoderVersion() public pure returns (UpkeepFormat) { + return UPKEEP_TRANSCODER_VERSION_BASE; + } + + function upkeepVersion() public pure returns (uint8) { + return UPKEEP_VERSION_BASE; + } + + /** + * @notice gets the number of upkeeps on the registry + */ + function getNumUpkeeps() external view returns (uint256) { + return s_upkeepIDs.length(); + } + + /** + * @notice read all of the details about an upkeep + * @dev this function may be deprecated in a future version of automation in favor of individual + * getters for each field + */ + function getUpkeep(uint256 id) external view returns (IAutomationV21PlusCommon.UpkeepInfoLegacy memory upkeepInfo) { + Upkeep memory reg = s_upkeep[id]; + address target = address(reg.forwarder) == address(0) ? address(0) : reg.forwarder.getTarget(); + upkeepInfo = IAutomationV21PlusCommon.UpkeepInfoLegacy({ + target: target, + performGas: reg.performGas, + checkData: s_checkData[id], + balance: reg.balance, + admin: s_upkeepAdmin[id], + maxValidBlocknumber: reg.maxValidBlocknumber, + lastPerformedBlockNumber: reg.lastPerformedBlockNumber, + amountSpent: uint96(reg.amountSpent), // force casting to uint96 for backwards compatibility. Not an issue if it overflows. + paused: reg.paused, + offchainConfig: s_upkeepOffchainConfig[id] + }); + return upkeepInfo; + } + + /** + * @notice retrieve active upkeep IDs. Active upkeep is defined as an upkeep which is not paused and not canceled. + * @param startIndex starting index in list + * @param maxCount max count to retrieve (0 = unlimited) + * @dev the order of IDs in the list is **not guaranteed**, therefore, if making successive calls, one + * should consider keeping the blockheight constant to ensure a holistic picture of the contract state + */ + function getActiveUpkeepIDs(uint256 startIndex, uint256 maxCount) external view returns (uint256[] memory) { + uint256 numUpkeeps = s_upkeepIDs.length(); + if (startIndex >= numUpkeeps) revert IndexOutOfRange(); + uint256 endIndex = startIndex + maxCount; + endIndex = endIndex > numUpkeeps || maxCount == 0 ? numUpkeeps : endIndex; + uint256[] memory ids = new uint256[](endIndex - startIndex); + for (uint256 idx = 0; idx < ids.length; idx++) { + ids[idx] = s_upkeepIDs.at(idx + startIndex); + } + return ids; + } + + /** + * @notice returns the upkeep's trigger type + */ + function getTriggerType(uint256 upkeepId) external pure returns (Trigger) { + return _getTriggerType(upkeepId); + } + + /** + * @notice returns the trigger config for an upkeeep + */ + function getUpkeepTriggerConfig(uint256 upkeepId) public view returns (bytes memory) { + return s_upkeepTriggerConfig[upkeepId]; + } + + /** + * @notice read the current info about any transmitter address + */ + function getTransmitterInfo( + address query + ) external view returns (bool active, uint8 index, uint96 balance, uint96 lastCollected, address payee) { + Transmitter memory transmitter = s_transmitters[query]; + + uint96 pooledShare = 0; + if (transmitter.active) { + uint96 totalDifference = s_hotVars.totalPremium - transmitter.lastCollected; + pooledShare = totalDifference / uint96(s_transmittersList.length); + } + + return ( + transmitter.active, + transmitter.index, + (transmitter.balance + pooledShare), + transmitter.lastCollected, + s_transmitterPayees[query] + ); + } + + /** + * @notice read the current info about any signer address + */ + function getSignerInfo(address query) external view returns (bool active, uint8 index) { + Signer memory signer = s_signers[query]; + return (signer.active, signer.index); + } + + /** + * @notice read the current on-chain config of the registry + * @dev this function will change between versions, it should never be used where + * backwards compatibility matters! + */ + function getConfig() external view returns (OnchainConfig memory) { + return + OnchainConfig({ + checkGasLimit: s_storage.checkGasLimit, + stalenessSeconds: s_hotVars.stalenessSeconds, + gasCeilingMultiplier: s_hotVars.gasCeilingMultiplier, + maxPerformGas: s_storage.maxPerformGas, + maxCheckDataSize: s_storage.maxCheckDataSize, + maxPerformDataSize: s_storage.maxPerformDataSize, + maxRevertDataSize: s_storage.maxRevertDataSize, + fallbackGasPrice: s_fallbackGasPrice, + fallbackLinkPrice: s_fallbackLinkPrice, + fallbackNativePrice: s_fallbackNativePrice, + transcoder: s_storage.transcoder, + registrars: s_registrars.values(), + upkeepPrivilegeManager: s_storage.upkeepPrivilegeManager, + chainModule: s_hotVars.chainModule, + reorgProtectionEnabled: s_hotVars.reorgProtectionEnabled, + financeAdmin: s_storage.financeAdmin + }); + } + + /** + * @notice read the current state of the registry + * @dev this function is deprecated + */ + function getState() + external + view + returns ( + IAutomationV21PlusCommon.StateLegacy memory state, + IAutomationV21PlusCommon.OnchainConfigLegacy memory config, + address[] memory signers, + address[] memory transmitters, + uint8 f + ) + { + state = IAutomationV21PlusCommon.StateLegacy({ + nonce: s_storage.nonce, + ownerLinkBalance: 0, // deprecated + expectedLinkBalance: 0, // deprecated + totalPremium: s_hotVars.totalPremium, + numUpkeeps: s_upkeepIDs.length(), + configCount: s_storage.configCount, + latestConfigBlockNumber: s_storage.latestConfigBlockNumber, + latestConfigDigest: s_latestConfigDigest, + latestEpoch: s_hotVars.latestEpoch, + paused: s_hotVars.paused + }); + + config = IAutomationV21PlusCommon.OnchainConfigLegacy({ + paymentPremiumPPB: 0, // deprecated + flatFeeMicroLink: 0, // deprecated + checkGasLimit: s_storage.checkGasLimit, + stalenessSeconds: s_hotVars.stalenessSeconds, + gasCeilingMultiplier: s_hotVars.gasCeilingMultiplier, + minUpkeepSpend: 0, // deprecated + maxPerformGas: s_storage.maxPerformGas, + maxCheckDataSize: s_storage.maxCheckDataSize, + maxPerformDataSize: s_storage.maxPerformDataSize, + maxRevertDataSize: s_storage.maxRevertDataSize, + fallbackGasPrice: s_fallbackGasPrice, + fallbackLinkPrice: s_fallbackLinkPrice, + transcoder: s_storage.transcoder, + registrars: s_registrars.values(), + upkeepPrivilegeManager: s_storage.upkeepPrivilegeManager + }); + + return (state, config, s_signersList, s_transmittersList, s_hotVars.f); + } + + /** + * @notice read the Storage data + * @dev this function signature will change with each version of automation + * this should not be treated as a stable function + */ + function getStorage() external view returns (Storage memory) { + return s_storage; + } + + /** + * @notice read the HotVars data + * @dev this function signature will change with each version of automation + * this should not be treated as a stable function + */ + function getHotVars() external view returns (HotVars memory) { + return s_hotVars; + } + + /** + * @notice get the chain module + */ + function getChainModule() external view returns (IChainModule chainModule) { + return s_hotVars.chainModule; + } + + /** + * @notice if this registry has reorg protection enabled + */ + function getReorgProtectionEnabled() external view returns (bool reorgProtectionEnabled) { + return s_hotVars.reorgProtectionEnabled; + } + + /** + * @notice calculates the minimum balance required for an upkeep to remain eligible + * @param id the upkeep id to calculate minimum balance for + */ + function getBalance(uint256 id) external view returns (uint96 balance) { + return s_upkeep[id].balance; + } + + /** + * @notice calculates the minimum balance required for an upkeep to remain eligible + * @param id the upkeep id to calculate minimum balance for + */ + function getMinBalance(uint256 id) external view returns (uint96) { + return getMinBalanceForUpkeep(id); + } + + /** + * @notice calculates the minimum balance required for an upkeep to remain eligible + * @param id the upkeep id to calculate minimum balance for + * @dev this will be deprecated in a future version in favor of getMinBalance + */ + function getMinBalanceForUpkeep(uint256 id) public view returns (uint96 minBalance) { + Upkeep memory upkeep = s_upkeep[id]; + return getMaxPaymentForGas(_getTriggerType(id), upkeep.performGas, upkeep.billingToken); + } + + /** + * @notice calculates the maximum payment for a given gas limit + * @param gasLimit the gas to calculate payment for + */ + function getMaxPaymentForGas( + Trigger triggerType, + uint32 gasLimit, + IERC20 billingToken + ) public view returns (uint96 maxPayment) { + HotVars memory hotVars = s_hotVars; + (uint256 fastGasWei, uint256 linkUSD, uint256 nativeUSD) = _getFeedData(hotVars); + return _getMaxPayment(hotVars, triggerType, gasLimit, fastGasWei, linkUSD, nativeUSD, billingToken); + } + + /** + * @notice retrieves the migration permission for a peer registry + */ + function getPeerRegistryMigrationPermission(address peer) external view returns (MigrationPermission) { + return s_peerRegistryMigrationPermission[peer]; + } + + /** + * @notice returns the upkeep privilege config + */ + function getUpkeepPrivilegeConfig(uint256 upkeepId) external view returns (bytes memory) { + return s_upkeepPrivilegeConfig[upkeepId]; + } + + /** + * @notice returns the upkeep privilege config + */ + function getAdminPrivilegeConfig(address admin) external view returns (bytes memory) { + return s_adminPrivilegeConfig[admin]; + } + + /** + * @notice returns the upkeep's forwarder contract + */ + function getForwarder(uint256 upkeepID) external view returns (IAutomationForwarder) { + return s_upkeep[upkeepID].forwarder; + } + + /** + * @notice returns the upkeep's forwarder contract + */ + function hasDedupKey(bytes32 dedupKey) external view returns (bool) { + return s_dedupKeys[dedupKey]; + } + + /** + * @notice returns the fallback native price + */ + function getFallbackNativePrice() external view returns (uint256) { + return s_fallbackNativePrice; + } + + /** + * @notice returns the fallback native price + */ + function getReserveAmount(address billingToken) external view returns (uint256) { + return s_reserveAmounts[billingToken]; + } +} diff --git a/contracts/src/v0.8/automation/dev/v2_3/AutomationUtils2_3.sol b/contracts/src/v0.8/automation/dev/v2_3/AutomationUtils2_3.sol index 70794339bc3..59081b7f19b 100644 --- a/contracts/src/v0.8/automation/dev/v2_3/AutomationUtils2_3.sol +++ b/contracts/src/v0.8/automation/dev/v2_3/AutomationUtils2_3.sol @@ -2,7 +2,6 @@ pragma solidity 0.8.19; import {AutomationRegistryBase2_3} from "./AutomationRegistryBase2_3.sol"; -import {Log} from "../../interfaces/ILogAutomation.sol"; /** * @notice this file exposes structs that are otherwise internal to the automation registry @@ -10,31 +9,9 @@ import {Log} from "../../interfaces/ILogAutomation.sol"; * and tests because generated wrappers are made available */ -/** - * @notice structure of trigger for log triggers - */ -struct LogTriggerConfig { - address contractAddress; - uint8 filterSelector; // denotes which topics apply to filter ex 000, 101, 111...only last 3 bits apply - bytes32 topic0; - bytes32 topic1; - bytes32 topic2; - bytes32 topic3; -} - contract AutomationUtils2_3 { /** - * @dev this can be removed as OnchainConfig is now exposed directly from the registry + * @dev this uses the v2.3 Report, which uses linkUSD instead of linkNative (as in v2.2 and prior). This should be used only in typescript tests. */ - function _onChainConfig(AutomationRegistryBase2_3.OnchainConfig memory) external {} // 0x2ff92a81 - function _report(AutomationRegistryBase2_3.Report memory) external {} // 0xe65d6546 - - function _logTriggerConfig(LogTriggerConfig memory) external {} // 0x21f373d7 - - function _logTrigger(AutomationRegistryBase2_3.LogTrigger memory) external {} // 0x1c8d8260 - - function _conditionalTrigger(AutomationRegistryBase2_3.ConditionalTrigger memory) external {} // 0x4b6df294 - - function _log(Log memory) external {} // 0xe9720a49 } diff --git a/contracts/src/v0.8/automation/interfaces/IAutomationV21PlusCommon.sol b/contracts/src/v0.8/automation/interfaces/IAutomationV21PlusCommon.sol new file mode 100644 index 00000000000..2ce2db60e1f --- /dev/null +++ b/contracts/src/v0.8/automation/interfaces/IAutomationV21PlusCommon.sol @@ -0,0 +1,270 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity ^0.8.4; + +interface IAutomationV21PlusCommon { + // registry events + event AdminPrivilegeConfigSet(address indexed admin, bytes privilegeConfig); + event CancelledUpkeepReport(uint256 indexed id, bytes trigger); + event ConfigSet( + uint32 previousConfigBlockNumber, + bytes32 configDigest, + uint64 configCount, + address[] signers, + address[] transmitters, + uint8 f, + bytes onchainConfig, + uint64 offchainConfigVersion, + bytes offchainConfig + ); + event DedupKeyAdded(bytes32 indexed dedupKey); + event InsufficientFundsUpkeepReport(uint256 indexed id, bytes trigger); + event OwnershipTransferred(address indexed from, address indexed to); + event OwnershipTransferRequested(address indexed from, address indexed to); + event Paused(address account); + event PayeeshipTransferred(address indexed transmitter, address indexed from, address indexed to); + event PayeeshipTransferRequested(address indexed transmitter, address indexed from, address indexed to); + event PayeesUpdated(address[] transmitters, address[] payees); + event PaymentWithdrawn(address indexed transmitter, uint256 indexed amount, address indexed to, address payee); + event ReorgedUpkeepReport(uint256 indexed id, bytes trigger); + event StaleUpkeepReport(uint256 indexed id, bytes trigger); + event Transmitted(bytes32 configDigest, uint32 epoch); + event Unpaused(address account); + + // upkeep events + event FundsAdded(uint256 indexed id, address indexed from, uint96 amount); + event FundsWithdrawn(uint256 indexed id, uint256 amount, address to); + event UpkeepAdminTransferred(uint256 indexed id, address indexed from, address indexed to); + event UpkeepAdminTransferRequested(uint256 indexed id, address indexed from, address indexed to); + event UpkeepCanceled(uint256 indexed id, uint64 indexed atBlockHeight); + event UpkeepCheckDataSet(uint256 indexed id, bytes newCheckData); + event UpkeepGasLimitSet(uint256 indexed id, uint96 gasLimit); + event UpkeepMigrated(uint256 indexed id, uint256 remainingBalance, address destination); + event UpkeepOffchainConfigSet(uint256 indexed id, bytes offchainConfig); + event UpkeepPaused(uint256 indexed id); + event UpkeepPerformed( + uint256 indexed id, + bool indexed success, + uint96 totalPayment, + uint256 gasUsed, + uint256 gasOverhead, + bytes trigger + ); + event UpkeepPrivilegeConfigSet(uint256 indexed id, bytes privilegeConfig); + event UpkeepReceived(uint256 indexed id, uint256 startingBalance, address importedFrom); + event UpkeepRegistered(uint256 indexed id, uint32 performGas, address admin); + event UpkeepTriggerConfigSet(uint256 indexed id, bytes triggerConfig); + event UpkeepUnpaused(uint256 indexed id); + + /** + * @notice structure of trigger for log triggers + */ + struct LogTriggerConfig { + address contractAddress; + uint8 filterSelector; // denotes which topics apply to filter ex 000, 101, 111...only last 3 bits apply + bytes32 topic0; + bytes32 topic1; + bytes32 topic2; + bytes32 topic3; + } + + /// @dev Report transmitted by OCR to transmit function + struct Report { + uint256 fastGasWei; + uint256 linkNative; + uint256[] upkeepIds; + uint256[] gasLimits; + bytes[] triggers; + bytes[] performDatas; + } + + /** + * @notice all information about an upkeep + * @dev only used in return values + * @dev this will likely be deprecated in a future version of the registry + * @member target the contract which needs to be serviced + * @member performGas the gas limit of upkeep execution + * @member checkData the checkData bytes for this upkeep + * @member balance the balance of this upkeep + * @member admin for this upkeep + * @member maxValidBlocknumber until which block this upkeep is valid + * @member lastPerformedBlockNumber the last block number when this upkeep was performed + * @member amountSpent the amount this upkeep has spent + * @member paused if this upkeep has been paused + * @member offchainConfig the off-chain config of this upkeep + */ + struct UpkeepInfoLegacy { + address target; + uint32 performGas; + bytes checkData; + uint96 balance; + address admin; + uint64 maxValidBlocknumber; + uint32 lastPerformedBlockNumber; + uint96 amountSpent; + bool paused; + bytes offchainConfig; + } + + /** + * @notice the trigger structure conditional trigger type + */ + struct ConditionalTrigger { + uint32 blockNum; + bytes32 blockHash; + } + + /** + * @notice the trigger structure of log upkeeps + * @dev NOTE that blockNum / blockHash describe the block used for the callback, + * not necessarily the block number that the log was emitted in!!!! + */ + struct LogTrigger { + bytes32 logBlockHash; + bytes32 txHash; + uint32 logIndex; + uint32 blockNum; + bytes32 blockHash; + } + + /** + * @notice state of the registry + * @dev only used in params and return values + * @dev this will likely be deprecated in a future version of the registry in favor of individual getters + * @member nonce used for ID generation + * @member ownerLinkBalance withdrawable balance of LINK by contract owner + * @member expectedLinkBalance the expected balance of LINK of the registry + * @member totalPremium the total premium collected on registry so far + * @member numUpkeeps total number of upkeeps on the registry + * @member configCount ordinal number of current config, out of all configs applied to this contract so far + * @member latestConfigBlockNumber last block at which this config was set + * @member latestConfigDigest domain-separation tag for current config + * @member latestEpoch for which a report was transmitted + * @member paused freeze on execution scoped to the entire registry + */ + struct StateLegacy { + uint32 nonce; + uint96 ownerLinkBalance; + uint256 expectedLinkBalance; + uint96 totalPremium; + uint256 numUpkeeps; + uint32 configCount; + uint32 latestConfigBlockNumber; + bytes32 latestConfigDigest; + uint32 latestEpoch; + bool paused; + } + + /** + * @notice OnchainConfigLegacy of the registry + * @dev only used in params and return values + * @member paymentPremiumPPB payment premium rate oracles receive on top of + * being reimbursed for gas, measured in parts per billion + * @member flatFeeMicroLink flat fee paid to oracles for performing upkeeps, + * priced in MicroLink; can be used in conjunction with or independently of + * paymentPremiumPPB + * @member checkGasLimit gas limit when checking for upkeep + * @member stalenessSeconds number of seconds that is allowed for feed data to + * be stale before switching to the fallback pricing + * @member gasCeilingMultiplier multiplier to apply to the fast gas feed price + * when calculating the payment ceiling for keepers + * @member minUpkeepSpend minimum LINK that an upkeep must spend before cancelling + * @member maxPerformGas max performGas allowed for an upkeep on this registry + * @member maxCheckDataSize max length of checkData bytes + * @member maxPerformDataSize max length of performData bytes + * @member maxRevertDataSize max length of revertData bytes + * @member fallbackGasPrice gas price used if the gas price feed is stale + * @member fallbackLinkPrice LINK price used if the LINK price feed is stale + * @member transcoder address of the transcoder contract + * @member registrars addresses of the registrar contracts + * @member upkeepPrivilegeManager address which can set privilege for upkeeps + */ + struct OnchainConfigLegacy { + uint32 paymentPremiumPPB; + uint32 flatFeeMicroLink; // min 0.000001 LINK, max 4294 LINK + uint32 checkGasLimit; + uint24 stalenessSeconds; + uint16 gasCeilingMultiplier; + uint96 minUpkeepSpend; + uint32 maxPerformGas; + uint32 maxCheckDataSize; + uint32 maxPerformDataSize; + uint32 maxRevertDataSize; + uint256 fallbackGasPrice; + uint256 fallbackLinkPrice; + address transcoder; + address[] registrars; + address upkeepPrivilegeManager; + } + + function checkUpkeep( + uint256 id, + bytes memory triggerData + ) + external + view + returns ( + bool upkeepNeeded, + bytes memory performData, + uint8 upkeepFailureReason, + uint256 gasUsed, + uint256 gasLimit, + uint256 fastGasWei, + uint256 linkNative + ); + function checkUpkeep( + uint256 id + ) + external + view + returns ( + bool upkeepNeeded, + bytes memory performData, + uint8 upkeepFailureReason, + uint256 gasUsed, + uint256 gasLimit, + uint256 fastGasWei, + uint256 linkNative + ); + function simulatePerformUpkeep( + uint256 id, + bytes memory performData + ) external view returns (bool success, uint256 gasUsed); + function executeCallback( + uint256 id, + bytes memory payload + ) external returns (bool upkeepNeeded, bytes memory performData, uint8 upkeepFailureReason, uint256 gasUsed); + function checkCallback( + uint256 id, + bytes[] memory values, + bytes memory extraData + ) external view returns (bool upkeepNeeded, bytes memory performData, uint8 upkeepFailureReason, uint256 gasUsed); + function typeAndVersion() external view returns (string memory); + function addFunds(uint256 id, uint96 amount) external; + function cancelUpkeep(uint256 id) external; + + function getUpkeepPrivilegeConfig(uint256 upkeepId) external view returns (bytes memory); + function hasDedupKey(bytes32 dedupKey) external view returns (bool); + function getUpkeepTriggerConfig(uint256 upkeepId) external view returns (bytes memory); + function getUpkeep(uint256 id) external view returns (UpkeepInfoLegacy memory upkeepInfo); + function getMinBalance(uint256 id) external view returns (uint96); + function getState() + external + view + returns ( + StateLegacy memory state, + OnchainConfigLegacy memory config, + address[] memory signers, + address[] memory transmitters, + uint8 f + ); + function setUpkeepGasLimit(uint256 id, uint32 gasLimit) external; + function setUpkeepPrivilegeConfig(uint256 upkeepId, bytes memory newPrivilegeConfig) external; + function pauseUpkeep(uint256 id) external; + function unpauseUpkeep(uint256 id) external; + function getActiveUpkeepIDs(uint256 startIndex, uint256 maxCount) external view returns (uint256[] memory); + function pause() external; + function setUpkeepCheckData(uint256 id, bytes memory newCheckData) external; + function setUpkeepTriggerConfig(uint256 id, bytes memory triggerConfig) external; + function owner() external view returns (address); + function getTriggerType(uint256 upkeepId) external pure returns (uint8); +} diff --git a/contracts/src/v0.8/automation/dev/interfaces/IChainModule.sol b/contracts/src/v0.8/automation/interfaces/IChainModule.sol similarity index 100% rename from contracts/src/v0.8/automation/dev/interfaces/IChainModule.sol rename to contracts/src/v0.8/automation/interfaces/IChainModule.sol diff --git a/contracts/src/v0.8/automation/interfaces/v2_1/IKeeperRegistryMaster.sol b/contracts/src/v0.8/automation/interfaces/v2_1/IKeeperRegistryMaster.sol index a20fe3127a6..b3f87519495 100644 --- a/contracts/src/v0.8/automation/interfaces/v2_1/IKeeperRegistryMaster.sol +++ b/contracts/src/v0.8/automation/interfaces/v2_1/IKeeperRegistryMaster.sol @@ -106,21 +106,13 @@ interface IKeeperRegistryMaster { event UpkeepRegistered(uint256 indexed id, uint32 performGas, address admin); event UpkeepTriggerConfigSet(uint256 indexed id, bytes triggerConfig); event UpkeepUnpaused(uint256 indexed id); - fallback() external; - function acceptOwnership() external; - function fallbackTo() external view returns (address); - function latestConfigDetails() external view returns (uint32 configCount, uint32 blockNumber, bytes32 configDigest); - function latestConfigDigestAndEpoch() external view returns (bool scanLogs, bytes32 configDigest, uint32 epoch); - function onTokenTransfer(address sender, uint256 amount, bytes memory data) external; - function owner() external view returns (address); - function setConfig( address[] memory signers, address[] memory transmitters, @@ -129,23 +121,19 @@ interface IKeeperRegistryMaster { uint64 offchainConfigVersion, bytes memory offchainConfig ) external; - function setConfigTypeSafe( address[] memory signers, address[] memory transmitters, uint8 f, - KeeperRegistryBase2_1.OnchainConfig memory onchainConfig, + IAutomationV21PlusCommon.OnchainConfigLegacy memory onchainConfig, uint64 offchainConfigVersion, bytes memory offchainConfig ) external; - function simulatePerformUpkeep( uint256 id, bytes memory performData ) external view returns (bool success, uint256 gasUsed); - function transferOwnership(address to) external; - function transmit( bytes32[3] memory reportContext, bytes memory rawReport, @@ -153,19 +141,15 @@ interface IKeeperRegistryMaster { bytes32[] memory ss, bytes32 rawVs ) external; - function typeAndVersion() external view returns (string memory); function addFunds(uint256 id, uint96 amount) external; - function cancelUpkeep(uint256 id) external; - function checkCallback( uint256 id, bytes[] memory values, bytes memory extraData ) external view returns (bool upkeepNeeded, bytes memory performData, uint8 upkeepFailureReason, uint256 gasUsed); - function checkUpkeep( uint256 id, bytes memory triggerData @@ -181,7 +165,6 @@ interface IKeeperRegistryMaster { uint256 fastGasWei, uint256 linkNative ); - function checkUpkeep( uint256 id ) @@ -196,16 +179,12 @@ interface IKeeperRegistryMaster { uint256 fastGasWei, uint256 linkNative ); - function executeCallback( uint256 id, bytes memory payload ) external returns (bool upkeepNeeded, bytes memory performData, uint8 upkeepFailureReason, uint256 gasUsed); - function migrateUpkeeps(uint256[] memory ids, address destination) external; - function receiveUpkeeps(bytes memory encodedUpkeeps) external; - function registerUpkeep( address target, uint32 gasLimit, @@ -215,7 +194,6 @@ interface IKeeperRegistryMaster { bytes memory triggerConfig, bytes memory offchainConfig ) external returns (uint256 id); - function registerUpkeep( address target, uint32 gasLimit, @@ -223,117 +201,70 @@ interface IKeeperRegistryMaster { bytes memory checkData, bytes memory offchainConfig ) external returns (uint256 id); - function setUpkeepTriggerConfig(uint256 id, bytes memory triggerConfig) external; function acceptPayeeship(address transmitter) external; - function acceptUpkeepAdmin(uint256 id) external; - function getActiveUpkeepIDs(uint256 startIndex, uint256 maxCount) external view returns (uint256[] memory); - function getAdminPrivilegeConfig(address admin) external view returns (bytes memory); - function getAutomationForwarderLogic() external view returns (address); - function getBalance(uint256 id) external view returns (uint96 balance); - function getCancellationDelay() external pure returns (uint256); - function getConditionalGasOverhead() external pure returns (uint256); - function getFastGasFeedAddress() external view returns (address); - function getForwarder(uint256 upkeepID) external view returns (address); - function getLinkAddress() external view returns (address); - function getLinkNativeFeedAddress() external view returns (address); - function getLogGasOverhead() external pure returns (uint256); - function getMaxPaymentForGas(uint8 triggerType, uint32 gasLimit) external view returns (uint96 maxPayment); - function getMinBalance(uint256 id) external view returns (uint96); - function getMinBalanceForUpkeep(uint256 id) external view returns (uint96 minBalance); - function getMode() external view returns (uint8); - function getPeerRegistryMigrationPermission(address peer) external view returns (uint8); - function getPerPerformByteGasOverhead() external pure returns (uint256); - function getPerSignerGasOverhead() external pure returns (uint256); - function getSignerInfo(address query) external view returns (bool active, uint8 index); - function getState() external view returns ( - KeeperRegistryBase2_1.State memory state, - KeeperRegistryBase2_1.OnchainConfig memory config, + IAutomationV21PlusCommon.StateLegacy memory state, + IAutomationV21PlusCommon.OnchainConfigLegacy memory config, address[] memory signers, address[] memory transmitters, uint8 f ); - function getTransmitterInfo( address query ) external view returns (bool active, uint8 index, uint96 balance, uint96 lastCollected, address payee); - function getTriggerType(uint256 upkeepId) external pure returns (uint8); - - function getUpkeep(uint256 id) external view returns (KeeperRegistryBase2_1.UpkeepInfo memory upkeepInfo); - + function getUpkeep(uint256 id) external view returns (IAutomationV21PlusCommon.UpkeepInfoLegacy memory upkeepInfo); function getUpkeepPrivilegeConfig(uint256 upkeepId) external view returns (bytes memory); - function getUpkeepTriggerConfig(uint256 upkeepId) external view returns (bytes memory); - function hasDedupKey(bytes32 dedupKey) external view returns (bool); - function pause() external; - function pauseUpkeep(uint256 id) external; - function recoverFunds() external; - function setAdminPrivilegeConfig(address admin, bytes memory newPrivilegeConfig) external; - function setPayees(address[] memory payees) external; - function setPeerRegistryMigrationPermission(address peer, uint8 permission) external; - function setUpkeepCheckData(uint256 id, bytes memory newCheckData) external; - function setUpkeepGasLimit(uint256 id, uint32 gasLimit) external; - function setUpkeepOffchainConfig(uint256 id, bytes memory config) external; - function setUpkeepPrivilegeConfig(uint256 upkeepId, bytes memory newPrivilegeConfig) external; - function transferPayeeship(address transmitter, address proposed) external; - function transferUpkeepAdmin(uint256 id, address proposed) external; - function unpause() external; - function unpauseUpkeep(uint256 id) external; - function upkeepTranscoderVersion() external pure returns (uint8); - function upkeepVersion() external pure returns (uint8); - function withdrawFunds(uint256 id, address to) external; - function withdrawOwnerFunds() external; - function withdrawPayment(address from, address to) external; } -interface KeeperRegistryBase2_1 { - struct OnchainConfig { +interface IAutomationV21PlusCommon { + struct OnchainConfigLegacy { uint32 paymentPremiumPPB; uint32 flatFeeMicroLink; uint32 checkGasLimit; @@ -351,7 +282,7 @@ interface KeeperRegistryBase2_1 { address upkeepPrivilegeManager; } - struct State { + struct StateLegacy { uint32 nonce; uint96 ownerLinkBalance; uint256 expectedLinkBalance; @@ -364,7 +295,7 @@ interface KeeperRegistryBase2_1 { bool paused; } - struct UpkeepInfo { + struct UpkeepInfoLegacy { address target; uint32 performGas; bytes checkData; @@ -380,5 +311,5 @@ interface KeeperRegistryBase2_1 { // THIS FILE WAS AUTOGENERATED FROM THE FOLLOWING ABI JSON: /* -[{"inputs":[{"internalType":"contract KeeperRegistryLogicB2_1","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":[],"name":"InsufficientFunds","type":"error"},{"inputs":[],"name":"InvalidDataLength","type":"error"},{"inputs":[],"name":"InvalidPayee","type":"error"},{"inputs":[],"name":"InvalidRecipient","type":"error"},{"inputs":[],"name":"InvalidReport","type":"error"},{"inputs":[],"name":"InvalidSigner","type":"error"},{"inputs":[],"name":"InvalidTransmitter","type":"error"},{"inputs":[],"name":"InvalidTrigger","type":"error"},{"inputs":[],"name":"InvalidTriggerType","type":"error"},{"inputs":[],"name":"MaxCheckDataSizeCanOnlyIncrease","type":"error"},{"inputs":[],"name":"MaxPerformDataSizeCanOnlyIncrease","type":"error"},{"inputs":[],"name":"MigrationNotPermitted","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":"OnlyPausedUpkeep","type":"error"},{"inputs":[],"name":"OnlySimulatedBackend","type":"error"},{"inputs":[],"name":"OnlyUnpausedUpkeep","type":"error"},{"inputs":[],"name":"ParameterLengthError","type":"error"},{"inputs":[],"name":"PaymentGreaterThanAllLINK","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":"UpkeepAlreadyExists","type":"error"},{"inputs":[],"name":"UpkeepCancelled","type":"error"},{"inputs":[],"name":"UpkeepNotCanceled","type":"error"},{"inputs":[],"name":"UpkeepNotNeeded","type":"error"},{"inputs":[],"name":"ValueNotChanged","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"},{"indexed":false,"internalType":"bytes","name":"trigger","type":"bytes"}],"name":"CancelledUpkeepReport","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":"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":"uint96","name":"amount","type":"uint96"}],"name":"OwnerFundsWithdrawn","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":"nonpayable","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":"paymentPremiumPPB","type":"uint32"},{"internalType":"uint32","name":"flatFeeMicroLink","type":"uint32"},{"internalType":"uint32","name":"checkGasLimit","type":"uint32"},{"internalType":"uint24","name":"stalenessSeconds","type":"uint24"},{"internalType":"uint16","name":"gasCeilingMultiplier","type":"uint16"},{"internalType":"uint96","name":"minUpkeepSpend","type":"uint96"},{"internalType":"uint32","name":"maxPerformGas","type":"uint32"},{"internalType":"uint32","name":"maxCheckDataSize","type":"uint32"},{"internalType":"uint32","name":"maxPerformDataSize","type":"uint32"},{"internalType":"uint32","name":"maxRevertDataSize","type":"uint32"},{"internalType":"uint256","name":"fallbackGasPrice","type":"uint256"},{"internalType":"uint256","name":"fallbackLinkPrice","type":"uint256"},{"internalType":"address","name":"transcoder","type":"address"},{"internalType":"address[]","name":"registrars","type":"address[]"},{"internalType":"address","name":"upkeepPrivilegeManager","type":"address"}],"internalType":"struct KeeperRegistryBase2_1.OnchainConfig","name":"onchainConfig","type":"tuple"},{"internalType":"uint64","name":"offchainConfigVersion","type":"uint64"},{"internalType":"bytes","name":"offchainConfig","type":"bytes"}],"name":"setConfigTypeSafe","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"bytes","name":"performData","type":"bytes"}],"name":"simulatePerformUpkeep","outputs":[{"internalType":"bool","name":"success","type":"bool"},{"internalType":"uint256","name":"gasUsed","type":"uint256"}],"stateMutability":"view","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"},{"inputs":[{"internalType":"contract KeeperRegistryLogicB2_1","name":"logicB","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint96","name":"amount","type":"uint96"}],"name":"addFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"cancelUpkeep","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"bytes[]","name":"values","type":"bytes[]"},{"internalType":"bytes","name":"extraData","type":"bytes"}],"name":"checkCallback","outputs":[{"internalType":"bool","name":"upkeepNeeded","type":"bool"},{"internalType":"bytes","name":"performData","type":"bytes"},{"internalType":"enum KeeperRegistryBase2_1.UpkeepFailureReason","name":"upkeepFailureReason","type":"uint8"},{"internalType":"uint256","name":"gasUsed","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"bytes","name":"triggerData","type":"bytes"}],"name":"checkUpkeep","outputs":[{"internalType":"bool","name":"upkeepNeeded","type":"bool"},{"internalType":"bytes","name":"performData","type":"bytes"},{"internalType":"enum KeeperRegistryBase2_1.UpkeepFailureReason","name":"upkeepFailureReason","type":"uint8"},{"internalType":"uint256","name":"gasUsed","type":"uint256"},{"internalType":"uint256","name":"gasLimit","type":"uint256"},{"internalType":"uint256","name":"fastGasWei","type":"uint256"},{"internalType":"uint256","name":"linkNative","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"checkUpkeep","outputs":[{"internalType":"bool","name":"upkeepNeeded","type":"bool"},{"internalType":"bytes","name":"performData","type":"bytes"},{"internalType":"enum KeeperRegistryBase2_1.UpkeepFailureReason","name":"upkeepFailureReason","type":"uint8"},{"internalType":"uint256","name":"gasUsed","type":"uint256"},{"internalType":"uint256","name":"gasLimit","type":"uint256"},{"internalType":"uint256","name":"fastGasWei","type":"uint256"},{"internalType":"uint256","name":"linkNative","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"bytes","name":"payload","type":"bytes"}],"name":"executeCallback","outputs":[{"internalType":"bool","name":"upkeepNeeded","type":"bool"},{"internalType":"bytes","name":"performData","type":"bytes"},{"internalType":"enum KeeperRegistryBase2_1.UpkeepFailureReason","name":"upkeepFailureReason","type":"uint8"},{"internalType":"uint256","name":"gasUsed","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"address","name":"destination","type":"address"}],"name":"migrateUpkeeps","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"encodedUpkeeps","type":"bytes"}],"name":"receiveUpkeeps","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"target","type":"address"},{"internalType":"uint32","name":"gasLimit","type":"uint32"},{"internalType":"address","name":"admin","type":"address"},{"internalType":"enum KeeperRegistryBase2_1.Trigger","name":"triggerType","type":"uint8"},{"internalType":"bytes","name":"checkData","type":"bytes"},{"internalType":"bytes","name":"triggerConfig","type":"bytes"},{"internalType":"bytes","name":"offchainConfig","type":"bytes"}],"name":"registerUpkeep","outputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"target","type":"address"},{"internalType":"uint32","name":"gasLimit","type":"uint32"},{"internalType":"address","name":"admin","type":"address"},{"internalType":"bytes","name":"checkData","type":"bytes"},{"internalType":"bytes","name":"offchainConfig","type":"bytes"}],"name":"registerUpkeep","outputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"bytes","name":"triggerConfig","type":"bytes"}],"name":"setUpkeepTriggerConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"enum KeeperRegistryBase2_1.Mode","name":"mode","type":"uint8"},{"internalType":"address","name":"link","type":"address"},{"internalType":"address","name":"linkNativeFeed","type":"address"},{"internalType":"address","name":"fastGasFeed","type":"address"},{"internalType":"address","name":"automationForwarderLogic","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"transmitter","type":"address"}],"name":"acceptPayeeship","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"acceptUpkeepAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"startIndex","type":"uint256"},{"internalType":"uint256","name":"maxCount","type":"uint256"}],"name":"getActiveUpkeepIDs","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"admin","type":"address"}],"name":"getAdminPrivilegeConfig","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAutomationForwarderLogic","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getBalance","outputs":[{"internalType":"uint96","name":"balance","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCancellationDelay","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"getConditionalGasOverhead","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"getFastGasFeedAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"upkeepID","type":"uint256"}],"name":"getForwarder","outputs":[{"internalType":"contract IAutomationForwarder","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getLinkAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getLinkNativeFeedAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getLogGasOverhead","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"enum KeeperRegistryBase2_1.Trigger","name":"triggerType","type":"uint8"},{"internalType":"uint32","name":"gasLimit","type":"uint32"}],"name":"getMaxPaymentForGas","outputs":[{"internalType":"uint96","name":"maxPayment","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getMinBalance","outputs":[{"internalType":"uint96","name":"","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getMinBalanceForUpkeep","outputs":[{"internalType":"uint96","name":"minBalance","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMode","outputs":[{"internalType":"enum KeeperRegistryBase2_1.Mode","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"peer","type":"address"}],"name":"getPeerRegistryMigrationPermission","outputs":[{"internalType":"enum KeeperRegistryBase2_1.MigrationPermission","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPerPerformByteGasOverhead","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"getPerSignerGasOverhead","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"query","type":"address"}],"name":"getSignerInfo","outputs":[{"internalType":"bool","name":"active","type":"bool"},{"internalType":"uint8","name":"index","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getState","outputs":[{"components":[{"internalType":"uint32","name":"nonce","type":"uint32"},{"internalType":"uint96","name":"ownerLinkBalance","type":"uint96"},{"internalType":"uint256","name":"expectedLinkBalance","type":"uint256"},{"internalType":"uint96","name":"totalPremium","type":"uint96"},{"internalType":"uint256","name":"numUpkeeps","type":"uint256"},{"internalType":"uint32","name":"configCount","type":"uint32"},{"internalType":"uint32","name":"latestConfigBlockNumber","type":"uint32"},{"internalType":"bytes32","name":"latestConfigDigest","type":"bytes32"},{"internalType":"uint32","name":"latestEpoch","type":"uint32"},{"internalType":"bool","name":"paused","type":"bool"}],"internalType":"struct KeeperRegistryBase2_1.State","name":"state","type":"tuple"},{"components":[{"internalType":"uint32","name":"paymentPremiumPPB","type":"uint32"},{"internalType":"uint32","name":"flatFeeMicroLink","type":"uint32"},{"internalType":"uint32","name":"checkGasLimit","type":"uint32"},{"internalType":"uint24","name":"stalenessSeconds","type":"uint24"},{"internalType":"uint16","name":"gasCeilingMultiplier","type":"uint16"},{"internalType":"uint96","name":"minUpkeepSpend","type":"uint96"},{"internalType":"uint32","name":"maxPerformGas","type":"uint32"},{"internalType":"uint32","name":"maxCheckDataSize","type":"uint32"},{"internalType":"uint32","name":"maxPerformDataSize","type":"uint32"},{"internalType":"uint32","name":"maxRevertDataSize","type":"uint32"},{"internalType":"uint256","name":"fallbackGasPrice","type":"uint256"},{"internalType":"uint256","name":"fallbackLinkPrice","type":"uint256"},{"internalType":"address","name":"transcoder","type":"address"},{"internalType":"address[]","name":"registrars","type":"address[]"},{"internalType":"address","name":"upkeepPrivilegeManager","type":"address"}],"internalType":"struct KeeperRegistryBase2_1.OnchainConfig","name":"config","type":"tuple"},{"internalType":"address[]","name":"signers","type":"address[]"},{"internalType":"address[]","name":"transmitters","type":"address[]"},{"internalType":"uint8","name":"f","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"query","type":"address"}],"name":"getTransmitterInfo","outputs":[{"internalType":"bool","name":"active","type":"bool"},{"internalType":"uint8","name":"index","type":"uint8"},{"internalType":"uint96","name":"balance","type":"uint96"},{"internalType":"uint96","name":"lastCollected","type":"uint96"},{"internalType":"address","name":"payee","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"upkeepId","type":"uint256"}],"name":"getTriggerType","outputs":[{"internalType":"enum KeeperRegistryBase2_1.Trigger","name":"","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getUpkeep","outputs":[{"components":[{"internalType":"address","name":"target","type":"address"},{"internalType":"uint32","name":"performGas","type":"uint32"},{"internalType":"bytes","name":"checkData","type":"bytes"},{"internalType":"uint96","name":"balance","type":"uint96"},{"internalType":"address","name":"admin","type":"address"},{"internalType":"uint64","name":"maxValidBlocknumber","type":"uint64"},{"internalType":"uint32","name":"lastPerformedBlockNumber","type":"uint32"},{"internalType":"uint96","name":"amountSpent","type":"uint96"},{"internalType":"bool","name":"paused","type":"bool"},{"internalType":"bytes","name":"offchainConfig","type":"bytes"}],"internalType":"struct KeeperRegistryBase2_1.UpkeepInfo","name":"upkeepInfo","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"upkeepId","type":"uint256"}],"name":"getUpkeepPrivilegeConfig","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"upkeepId","type":"uint256"}],"name":"getUpkeepTriggerConfig","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"dedupKey","type":"bytes32"}],"name":"hasDedupKey","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"pauseUpkeep","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"recoverFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"admin","type":"address"},{"internalType":"bytes","name":"newPrivilegeConfig","type":"bytes"}],"name":"setAdminPrivilegeConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"payees","type":"address[]"}],"name":"setPayees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"peer","type":"address"},{"internalType":"enum KeeperRegistryBase2_1.MigrationPermission","name":"permission","type":"uint8"}],"name":"setPeerRegistryMigrationPermission","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"bytes","name":"newCheckData","type":"bytes"}],"name":"setUpkeepCheckData","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint32","name":"gasLimit","type":"uint32"}],"name":"setUpkeepGasLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"bytes","name":"config","type":"bytes"}],"name":"setUpkeepOffchainConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"upkeepId","type":"uint256"},{"internalType":"bytes","name":"newPrivilegeConfig","type":"bytes"}],"name":"setUpkeepPrivilegeConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"transmitter","type":"address"},{"internalType":"address","name":"proposed","type":"address"}],"name":"transferPayeeship","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"address","name":"proposed","type":"address"}],"name":"transferUpkeepAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"unpauseUpkeep","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"upkeepTranscoderVersion","outputs":[{"internalType":"enum UpkeepFormat","name":"","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"upkeepVersion","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"address","name":"to","type":"address"}],"name":"withdrawFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawOwnerFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"}],"name":"withdrawPayment","outputs":[],"stateMutability":"nonpayable","type":"function"}] +[{"inputs":[{"internalType":"contract KeeperRegistryLogicB2_1","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":[],"name":"InsufficientFunds","type":"error"},{"inputs":[],"name":"InvalidDataLength","type":"error"},{"inputs":[],"name":"InvalidPayee","type":"error"},{"inputs":[],"name":"InvalidRecipient","type":"error"},{"inputs":[],"name":"InvalidReport","type":"error"},{"inputs":[],"name":"InvalidSigner","type":"error"},{"inputs":[],"name":"InvalidTransmitter","type":"error"},{"inputs":[],"name":"InvalidTrigger","type":"error"},{"inputs":[],"name":"InvalidTriggerType","type":"error"},{"inputs":[],"name":"MaxCheckDataSizeCanOnlyIncrease","type":"error"},{"inputs":[],"name":"MaxPerformDataSizeCanOnlyIncrease","type":"error"},{"inputs":[],"name":"MigrationNotPermitted","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":"OnlyPausedUpkeep","type":"error"},{"inputs":[],"name":"OnlySimulatedBackend","type":"error"},{"inputs":[],"name":"OnlyUnpausedUpkeep","type":"error"},{"inputs":[],"name":"ParameterLengthError","type":"error"},{"inputs":[],"name":"PaymentGreaterThanAllLINK","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":"UpkeepAlreadyExists","type":"error"},{"inputs":[],"name":"UpkeepCancelled","type":"error"},{"inputs":[],"name":"UpkeepNotCanceled","type":"error"},{"inputs":[],"name":"UpkeepNotNeeded","type":"error"},{"inputs":[],"name":"ValueNotChanged","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"},{"indexed":false,"internalType":"bytes","name":"trigger","type":"bytes"}],"name":"CancelledUpkeepReport","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":"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":"uint96","name":"amount","type":"uint96"}],"name":"OwnerFundsWithdrawn","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":"nonpayable","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":"paymentPremiumPPB","type":"uint32"},{"internalType":"uint32","name":"flatFeeMicroLink","type":"uint32"},{"internalType":"uint32","name":"checkGasLimit","type":"uint32"},{"internalType":"uint24","name":"stalenessSeconds","type":"uint24"},{"internalType":"uint16","name":"gasCeilingMultiplier","type":"uint16"},{"internalType":"uint96","name":"minUpkeepSpend","type":"uint96"},{"internalType":"uint32","name":"maxPerformGas","type":"uint32"},{"internalType":"uint32","name":"maxCheckDataSize","type":"uint32"},{"internalType":"uint32","name":"maxPerformDataSize","type":"uint32"},{"internalType":"uint32","name":"maxRevertDataSize","type":"uint32"},{"internalType":"uint256","name":"fallbackGasPrice","type":"uint256"},{"internalType":"uint256","name":"fallbackLinkPrice","type":"uint256"},{"internalType":"address","name":"transcoder","type":"address"},{"internalType":"address[]","name":"registrars","type":"address[]"},{"internalType":"address","name":"upkeepPrivilegeManager","type":"address"}],"internalType":"struct IAutomationV21PlusCommon.OnchainConfigLegacy","name":"onchainConfig","type":"tuple"},{"internalType":"uint64","name":"offchainConfigVersion","type":"uint64"},{"internalType":"bytes","name":"offchainConfig","type":"bytes"}],"name":"setConfigTypeSafe","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"bytes","name":"performData","type":"bytes"}],"name":"simulatePerformUpkeep","outputs":[{"internalType":"bool","name":"success","type":"bool"},{"internalType":"uint256","name":"gasUsed","type":"uint256"}],"stateMutability":"view","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"},{"inputs":[{"internalType":"contract KeeperRegistryLogicB2_1","name":"logicB","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint96","name":"amount","type":"uint96"}],"name":"addFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"cancelUpkeep","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"bytes[]","name":"values","type":"bytes[]"},{"internalType":"bytes","name":"extraData","type":"bytes"}],"name":"checkCallback","outputs":[{"internalType":"bool","name":"upkeepNeeded","type":"bool"},{"internalType":"bytes","name":"performData","type":"bytes"},{"internalType":"enum KeeperRegistryBase2_1.UpkeepFailureReason","name":"upkeepFailureReason","type":"uint8"},{"internalType":"uint256","name":"gasUsed","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"bytes","name":"triggerData","type":"bytes"}],"name":"checkUpkeep","outputs":[{"internalType":"bool","name":"upkeepNeeded","type":"bool"},{"internalType":"bytes","name":"performData","type":"bytes"},{"internalType":"enum KeeperRegistryBase2_1.UpkeepFailureReason","name":"upkeepFailureReason","type":"uint8"},{"internalType":"uint256","name":"gasUsed","type":"uint256"},{"internalType":"uint256","name":"gasLimit","type":"uint256"},{"internalType":"uint256","name":"fastGasWei","type":"uint256"},{"internalType":"uint256","name":"linkNative","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"checkUpkeep","outputs":[{"internalType":"bool","name":"upkeepNeeded","type":"bool"},{"internalType":"bytes","name":"performData","type":"bytes"},{"internalType":"enum KeeperRegistryBase2_1.UpkeepFailureReason","name":"upkeepFailureReason","type":"uint8"},{"internalType":"uint256","name":"gasUsed","type":"uint256"},{"internalType":"uint256","name":"gasLimit","type":"uint256"},{"internalType":"uint256","name":"fastGasWei","type":"uint256"},{"internalType":"uint256","name":"linkNative","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"bytes","name":"payload","type":"bytes"}],"name":"executeCallback","outputs":[{"internalType":"bool","name":"upkeepNeeded","type":"bool"},{"internalType":"bytes","name":"performData","type":"bytes"},{"internalType":"enum KeeperRegistryBase2_1.UpkeepFailureReason","name":"upkeepFailureReason","type":"uint8"},{"internalType":"uint256","name":"gasUsed","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"address","name":"destination","type":"address"}],"name":"migrateUpkeeps","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"encodedUpkeeps","type":"bytes"}],"name":"receiveUpkeeps","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"target","type":"address"},{"internalType":"uint32","name":"gasLimit","type":"uint32"},{"internalType":"address","name":"admin","type":"address"},{"internalType":"enum KeeperRegistryBase2_1.Trigger","name":"triggerType","type":"uint8"},{"internalType":"bytes","name":"checkData","type":"bytes"},{"internalType":"bytes","name":"triggerConfig","type":"bytes"},{"internalType":"bytes","name":"offchainConfig","type":"bytes"}],"name":"registerUpkeep","outputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"target","type":"address"},{"internalType":"uint32","name":"gasLimit","type":"uint32"},{"internalType":"address","name":"admin","type":"address"},{"internalType":"bytes","name":"checkData","type":"bytes"},{"internalType":"bytes","name":"offchainConfig","type":"bytes"}],"name":"registerUpkeep","outputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"bytes","name":"triggerConfig","type":"bytes"}],"name":"setUpkeepTriggerConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"enum KeeperRegistryBase2_1.Mode","name":"mode","type":"uint8"},{"internalType":"address","name":"link","type":"address"},{"internalType":"address","name":"linkNativeFeed","type":"address"},{"internalType":"address","name":"fastGasFeed","type":"address"},{"internalType":"address","name":"automationForwarderLogic","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"transmitter","type":"address"}],"name":"acceptPayeeship","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"acceptUpkeepAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"startIndex","type":"uint256"},{"internalType":"uint256","name":"maxCount","type":"uint256"}],"name":"getActiveUpkeepIDs","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"admin","type":"address"}],"name":"getAdminPrivilegeConfig","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAutomationForwarderLogic","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getBalance","outputs":[{"internalType":"uint96","name":"balance","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCancellationDelay","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"getConditionalGasOverhead","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"getFastGasFeedAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"upkeepID","type":"uint256"}],"name":"getForwarder","outputs":[{"internalType":"contract IAutomationForwarder","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getLinkAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getLinkNativeFeedAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getLogGasOverhead","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"enum KeeperRegistryBase2_1.Trigger","name":"triggerType","type":"uint8"},{"internalType":"uint32","name":"gasLimit","type":"uint32"}],"name":"getMaxPaymentForGas","outputs":[{"internalType":"uint96","name":"maxPayment","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getMinBalance","outputs":[{"internalType":"uint96","name":"","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getMinBalanceForUpkeep","outputs":[{"internalType":"uint96","name":"minBalance","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMode","outputs":[{"internalType":"enum KeeperRegistryBase2_1.Mode","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"peer","type":"address"}],"name":"getPeerRegistryMigrationPermission","outputs":[{"internalType":"enum KeeperRegistryBase2_1.MigrationPermission","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPerPerformByteGasOverhead","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"getPerSignerGasOverhead","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"query","type":"address"}],"name":"getSignerInfo","outputs":[{"internalType":"bool","name":"active","type":"bool"},{"internalType":"uint8","name":"index","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getState","outputs":[{"components":[{"internalType":"uint32","name":"nonce","type":"uint32"},{"internalType":"uint96","name":"ownerLinkBalance","type":"uint96"},{"internalType":"uint256","name":"expectedLinkBalance","type":"uint256"},{"internalType":"uint96","name":"totalPremium","type":"uint96"},{"internalType":"uint256","name":"numUpkeeps","type":"uint256"},{"internalType":"uint32","name":"configCount","type":"uint32"},{"internalType":"uint32","name":"latestConfigBlockNumber","type":"uint32"},{"internalType":"bytes32","name":"latestConfigDigest","type":"bytes32"},{"internalType":"uint32","name":"latestEpoch","type":"uint32"},{"internalType":"bool","name":"paused","type":"bool"}],"internalType":"struct IAutomationV21PlusCommon.StateLegacy","name":"state","type":"tuple"},{"components":[{"internalType":"uint32","name":"paymentPremiumPPB","type":"uint32"},{"internalType":"uint32","name":"flatFeeMicroLink","type":"uint32"},{"internalType":"uint32","name":"checkGasLimit","type":"uint32"},{"internalType":"uint24","name":"stalenessSeconds","type":"uint24"},{"internalType":"uint16","name":"gasCeilingMultiplier","type":"uint16"},{"internalType":"uint96","name":"minUpkeepSpend","type":"uint96"},{"internalType":"uint32","name":"maxPerformGas","type":"uint32"},{"internalType":"uint32","name":"maxCheckDataSize","type":"uint32"},{"internalType":"uint32","name":"maxPerformDataSize","type":"uint32"},{"internalType":"uint32","name":"maxRevertDataSize","type":"uint32"},{"internalType":"uint256","name":"fallbackGasPrice","type":"uint256"},{"internalType":"uint256","name":"fallbackLinkPrice","type":"uint256"},{"internalType":"address","name":"transcoder","type":"address"},{"internalType":"address[]","name":"registrars","type":"address[]"},{"internalType":"address","name":"upkeepPrivilegeManager","type":"address"}],"internalType":"struct IAutomationV21PlusCommon.OnchainConfigLegacy","name":"config","type":"tuple"},{"internalType":"address[]","name":"signers","type":"address[]"},{"internalType":"address[]","name":"transmitters","type":"address[]"},{"internalType":"uint8","name":"f","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"query","type":"address"}],"name":"getTransmitterInfo","outputs":[{"internalType":"bool","name":"active","type":"bool"},{"internalType":"uint8","name":"index","type":"uint8"},{"internalType":"uint96","name":"balance","type":"uint96"},{"internalType":"uint96","name":"lastCollected","type":"uint96"},{"internalType":"address","name":"payee","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"upkeepId","type":"uint256"}],"name":"getTriggerType","outputs":[{"internalType":"enum KeeperRegistryBase2_1.Trigger","name":"","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getUpkeep","outputs":[{"components":[{"internalType":"address","name":"target","type":"address"},{"internalType":"uint32","name":"performGas","type":"uint32"},{"internalType":"bytes","name":"checkData","type":"bytes"},{"internalType":"uint96","name":"balance","type":"uint96"},{"internalType":"address","name":"admin","type":"address"},{"internalType":"uint64","name":"maxValidBlocknumber","type":"uint64"},{"internalType":"uint32","name":"lastPerformedBlockNumber","type":"uint32"},{"internalType":"uint96","name":"amountSpent","type":"uint96"},{"internalType":"bool","name":"paused","type":"bool"},{"internalType":"bytes","name":"offchainConfig","type":"bytes"}],"internalType":"struct IAutomationV21PlusCommon.UpkeepInfoLegacy","name":"upkeepInfo","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"upkeepId","type":"uint256"}],"name":"getUpkeepPrivilegeConfig","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"upkeepId","type":"uint256"}],"name":"getUpkeepTriggerConfig","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"dedupKey","type":"bytes32"}],"name":"hasDedupKey","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"pauseUpkeep","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"recoverFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"admin","type":"address"},{"internalType":"bytes","name":"newPrivilegeConfig","type":"bytes"}],"name":"setAdminPrivilegeConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"payees","type":"address[]"}],"name":"setPayees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"peer","type":"address"},{"internalType":"enum KeeperRegistryBase2_1.MigrationPermission","name":"permission","type":"uint8"}],"name":"setPeerRegistryMigrationPermission","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"bytes","name":"newCheckData","type":"bytes"}],"name":"setUpkeepCheckData","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint32","name":"gasLimit","type":"uint32"}],"name":"setUpkeepGasLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"bytes","name":"config","type":"bytes"}],"name":"setUpkeepOffchainConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"upkeepId","type":"uint256"},{"internalType":"bytes","name":"newPrivilegeConfig","type":"bytes"}],"name":"setUpkeepPrivilegeConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"transmitter","type":"address"},{"internalType":"address","name":"proposed","type":"address"}],"name":"transferPayeeship","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"address","name":"proposed","type":"address"}],"name":"transferUpkeepAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"unpauseUpkeep","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"upkeepTranscoderVersion","outputs":[{"internalType":"enum UpkeepFormat","name":"","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"upkeepVersion","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"address","name":"to","type":"address"}],"name":"withdrawFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawOwnerFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"}],"name":"withdrawPayment","outputs":[],"stateMutability":"nonpayable","type":"function"}] */ diff --git a/contracts/src/v0.8/automation/dev/interfaces/v2_2/IAutomationRegistryMaster.sol b/contracts/src/v0.8/automation/interfaces/v2_2/IAutomationRegistryMaster.sol similarity index 84% rename from contracts/src/v0.8/automation/dev/interfaces/v2_2/IAutomationRegistryMaster.sol rename to contracts/src/v0.8/automation/interfaces/v2_2/IAutomationRegistryMaster.sol index a2d73bbd807..edd8443363b 100644 --- a/contracts/src/v0.8/automation/dev/interfaces/v2_2/IAutomationRegistryMaster.sol +++ b/contracts/src/v0.8/automation/interfaces/v2_2/IAutomationRegistryMaster.sol @@ -230,8 +230,8 @@ interface IAutomationRegistryMaster { external view returns ( - AutomationRegistryBase2_2.State memory state, - AutomationRegistryBase2_2.OnchainConfigLegacy memory config, + IAutomationV21PlusCommon.StateLegacy memory state, + IAutomationV21PlusCommon.OnchainConfigLegacy memory config, address[] memory signers, address[] memory transmitters, uint8 f @@ -242,7 +242,7 @@ interface IAutomationRegistryMaster { address query ) external view returns (bool active, uint8 index, uint96 balance, uint96 lastCollected, address payee); function getTriggerType(uint256 upkeepId) external pure returns (uint8); - function getUpkeep(uint256 id) external view returns (AutomationRegistryBase2_2.UpkeepInfo memory upkeepInfo); + function getUpkeep(uint256 id) external view returns (IAutomationV21PlusCommon.UpkeepInfoLegacy memory upkeepInfo); function getUpkeepPrivilegeConfig(uint256 upkeepId) external view returns (bytes memory); function getUpkeepTriggerConfig(uint256 upkeepId) external view returns (bytes memory); function hasDedupKey(bytes32 dedupKey) external view returns (bool); @@ -287,8 +287,10 @@ interface AutomationRegistryBase2_2 { address chainModule; bool reorgProtectionEnabled; } +} - struct State { +interface IAutomationV21PlusCommon { + struct StateLegacy { uint32 nonce; uint96 ownerLinkBalance; uint256 expectedLinkBalance; @@ -319,7 +321,7 @@ interface AutomationRegistryBase2_2 { address upkeepPrivilegeManager; } - struct UpkeepInfo { + struct UpkeepInfoLegacy { address target; uint32 performGas; bytes checkData; @@ -335,5 +337,5 @@ interface AutomationRegistryBase2_2 { // THIS FILE WAS AUTOGENERATED FROM THE FOLLOWING ABI JSON: /* -[{"inputs":[{"internalType":"contract AutomationRegistryLogicB2_2","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":[],"name":"InvalidDataLength","type":"error"},{"inputs":[],"name":"InvalidPayee","type":"error"},{"inputs":[],"name":"InvalidRecipient","type":"error"},{"inputs":[],"name":"InvalidReport","type":"error"},{"inputs":[],"name":"InvalidSigner","type":"error"},{"inputs":[],"name":"InvalidTransmitter","type":"error"},{"inputs":[],"name":"InvalidTrigger","type":"error"},{"inputs":[],"name":"InvalidTriggerType","type":"error"},{"inputs":[],"name":"MaxCheckDataSizeCanOnlyIncrease","type":"error"},{"inputs":[],"name":"MaxPerformDataSizeCanOnlyIncrease","type":"error"},{"inputs":[],"name":"MigrationNotPermitted","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":"OnlyPausedUpkeep","type":"error"},{"inputs":[],"name":"OnlySimulatedBackend","type":"error"},{"inputs":[],"name":"OnlyUnpausedUpkeep","type":"error"},{"inputs":[],"name":"ParameterLengthError","type":"error"},{"inputs":[],"name":"PaymentGreaterThanAllLINK","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":"UpkeepAlreadyExists","type":"error"},{"inputs":[],"name":"UpkeepCancelled","type":"error"},{"inputs":[],"name":"UpkeepNotCanceled","type":"error"},{"inputs":[],"name":"UpkeepNotNeeded","type":"error"},{"inputs":[],"name":"ValueNotChanged","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"},{"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":"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":"uint96","name":"amount","type":"uint96"}],"name":"OwnerFundsWithdrawn","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":"nonpayable","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":"paymentPremiumPPB","type":"uint32"},{"internalType":"uint32","name":"flatFeeMicroLink","type":"uint32"},{"internalType":"uint32","name":"checkGasLimit","type":"uint32"},{"internalType":"uint24","name":"stalenessSeconds","type":"uint24"},{"internalType":"uint16","name":"gasCeilingMultiplier","type":"uint16"},{"internalType":"uint96","name":"minUpkeepSpend","type":"uint96"},{"internalType":"uint32","name":"maxPerformGas","type":"uint32"},{"internalType":"uint32","name":"maxCheckDataSize","type":"uint32"},{"internalType":"uint32","name":"maxPerformDataSize","type":"uint32"},{"internalType":"uint32","name":"maxRevertDataSize","type":"uint32"},{"internalType":"uint256","name":"fallbackGasPrice","type":"uint256"},{"internalType":"uint256","name":"fallbackLinkPrice","type":"uint256"},{"internalType":"address","name":"transcoder","type":"address"},{"internalType":"address[]","name":"registrars","type":"address[]"},{"internalType":"address","name":"upkeepPrivilegeManager","type":"address"},{"internalType":"contract IChainModule","name":"chainModule","type":"address"},{"internalType":"bool","name":"reorgProtectionEnabled","type":"bool"}],"internalType":"struct AutomationRegistryBase2_2.OnchainConfig","name":"onchainConfig","type":"tuple"},{"internalType":"uint64","name":"offchainConfigVersion","type":"uint64"},{"internalType":"bytes","name":"offchainConfig","type":"bytes"}],"name":"setConfigTypeSafe","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"bytes","name":"performData","type":"bytes"}],"name":"simulatePerformUpkeep","outputs":[{"internalType":"bool","name":"success","type":"bool"},{"internalType":"uint256","name":"gasUsed","type":"uint256"}],"stateMutability":"view","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"},{"inputs":[{"internalType":"contract AutomationRegistryLogicB2_2","name":"logicB","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint96","name":"amount","type":"uint96"}],"name":"addFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"cancelUpkeep","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"bytes[]","name":"values","type":"bytes[]"},{"internalType":"bytes","name":"extraData","type":"bytes"}],"name":"checkCallback","outputs":[{"internalType":"bool","name":"upkeepNeeded","type":"bool"},{"internalType":"bytes","name":"performData","type":"bytes"},{"internalType":"enum AutomationRegistryBase2_2.UpkeepFailureReason","name":"upkeepFailureReason","type":"uint8"},{"internalType":"uint256","name":"gasUsed","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"bytes","name":"triggerData","type":"bytes"}],"name":"checkUpkeep","outputs":[{"internalType":"bool","name":"upkeepNeeded","type":"bool"},{"internalType":"bytes","name":"performData","type":"bytes"},{"internalType":"enum AutomationRegistryBase2_2.UpkeepFailureReason","name":"upkeepFailureReason","type":"uint8"},{"internalType":"uint256","name":"gasUsed","type":"uint256"},{"internalType":"uint256","name":"gasLimit","type":"uint256"},{"internalType":"uint256","name":"fastGasWei","type":"uint256"},{"internalType":"uint256","name":"linkNative","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"checkUpkeep","outputs":[{"internalType":"bool","name":"upkeepNeeded","type":"bool"},{"internalType":"bytes","name":"performData","type":"bytes"},{"internalType":"enum AutomationRegistryBase2_2.UpkeepFailureReason","name":"upkeepFailureReason","type":"uint8"},{"internalType":"uint256","name":"gasUsed","type":"uint256"},{"internalType":"uint256","name":"gasLimit","type":"uint256"},{"internalType":"uint256","name":"fastGasWei","type":"uint256"},{"internalType":"uint256","name":"linkNative","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"bytes","name":"payload","type":"bytes"}],"name":"executeCallback","outputs":[{"internalType":"bool","name":"upkeepNeeded","type":"bool"},{"internalType":"bytes","name":"performData","type":"bytes"},{"internalType":"enum AutomationRegistryBase2_2.UpkeepFailureReason","name":"upkeepFailureReason","type":"uint8"},{"internalType":"uint256","name":"gasUsed","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"address","name":"destination","type":"address"}],"name":"migrateUpkeeps","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"encodedUpkeeps","type":"bytes"}],"name":"receiveUpkeeps","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"target","type":"address"},{"internalType":"uint32","name":"gasLimit","type":"uint32"},{"internalType":"address","name":"admin","type":"address"},{"internalType":"enum AutomationRegistryBase2_2.Trigger","name":"triggerType","type":"uint8"},{"internalType":"bytes","name":"checkData","type":"bytes"},{"internalType":"bytes","name":"triggerConfig","type":"bytes"},{"internalType":"bytes","name":"offchainConfig","type":"bytes"}],"name":"registerUpkeep","outputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"target","type":"address"},{"internalType":"uint32","name":"gasLimit","type":"uint32"},{"internalType":"address","name":"admin","type":"address"},{"internalType":"bytes","name":"checkData","type":"bytes"},{"internalType":"bytes","name":"offchainConfig","type":"bytes"}],"name":"registerUpkeep","outputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"bytes","name":"triggerConfig","type":"bytes"}],"name":"setUpkeepTriggerConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"link","type":"address"},{"internalType":"address","name":"linkNativeFeed","type":"address"},{"internalType":"address","name":"fastGasFeed","type":"address"},{"internalType":"address","name":"automationForwarderLogic","type":"address"},{"internalType":"address","name":"allowedReadOnlyAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"transmitter","type":"address"}],"name":"acceptPayeeship","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"acceptUpkeepAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"startIndex","type":"uint256"},{"internalType":"uint256","name":"maxCount","type":"uint256"}],"name":"getActiveUpkeepIDs","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"admin","type":"address"}],"name":"getAdminPrivilegeConfig","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAllowedReadOnlyAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAutomationForwarderLogic","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getBalance","outputs":[{"internalType":"uint96","name":"balance","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCancellationDelay","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"getChainModule","outputs":[{"internalType":"contract IChainModule","name":"chainModule","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getConditionalGasOverhead","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"getFastGasFeedAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"upkeepID","type":"uint256"}],"name":"getForwarder","outputs":[{"internalType":"contract IAutomationForwarder","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getLinkAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getLinkNativeFeedAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getLogGasOverhead","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"enum AutomationRegistryBase2_2.Trigger","name":"triggerType","type":"uint8"},{"internalType":"uint32","name":"gasLimit","type":"uint32"}],"name":"getMaxPaymentForGas","outputs":[{"internalType":"uint96","name":"maxPayment","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getMinBalance","outputs":[{"internalType":"uint96","name":"","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getMinBalanceForUpkeep","outputs":[{"internalType":"uint96","name":"minBalance","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"peer","type":"address"}],"name":"getPeerRegistryMigrationPermission","outputs":[{"internalType":"enum AutomationRegistryBase2_2.MigrationPermission","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPerPerformByteGasOverhead","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"getPerSignerGasOverhead","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"getReorgProtectionEnabled","outputs":[{"internalType":"bool","name":"reorgProtectionEnabled","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"query","type":"address"}],"name":"getSignerInfo","outputs":[{"internalType":"bool","name":"active","type":"bool"},{"internalType":"uint8","name":"index","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getState","outputs":[{"components":[{"internalType":"uint32","name":"nonce","type":"uint32"},{"internalType":"uint96","name":"ownerLinkBalance","type":"uint96"},{"internalType":"uint256","name":"expectedLinkBalance","type":"uint256"},{"internalType":"uint96","name":"totalPremium","type":"uint96"},{"internalType":"uint256","name":"numUpkeeps","type":"uint256"},{"internalType":"uint32","name":"configCount","type":"uint32"},{"internalType":"uint32","name":"latestConfigBlockNumber","type":"uint32"},{"internalType":"bytes32","name":"latestConfigDigest","type":"bytes32"},{"internalType":"uint32","name":"latestEpoch","type":"uint32"},{"internalType":"bool","name":"paused","type":"bool"}],"internalType":"struct AutomationRegistryBase2_2.State","name":"state","type":"tuple"},{"components":[{"internalType":"uint32","name":"paymentPremiumPPB","type":"uint32"},{"internalType":"uint32","name":"flatFeeMicroLink","type":"uint32"},{"internalType":"uint32","name":"checkGasLimit","type":"uint32"},{"internalType":"uint24","name":"stalenessSeconds","type":"uint24"},{"internalType":"uint16","name":"gasCeilingMultiplier","type":"uint16"},{"internalType":"uint96","name":"minUpkeepSpend","type":"uint96"},{"internalType":"uint32","name":"maxPerformGas","type":"uint32"},{"internalType":"uint32","name":"maxCheckDataSize","type":"uint32"},{"internalType":"uint32","name":"maxPerformDataSize","type":"uint32"},{"internalType":"uint32","name":"maxRevertDataSize","type":"uint32"},{"internalType":"uint256","name":"fallbackGasPrice","type":"uint256"},{"internalType":"uint256","name":"fallbackLinkPrice","type":"uint256"},{"internalType":"address","name":"transcoder","type":"address"},{"internalType":"address[]","name":"registrars","type":"address[]"},{"internalType":"address","name":"upkeepPrivilegeManager","type":"address"}],"internalType":"struct AutomationRegistryBase2_2.OnchainConfigLegacy","name":"config","type":"tuple"},{"internalType":"address[]","name":"signers","type":"address[]"},{"internalType":"address[]","name":"transmitters","type":"address[]"},{"internalType":"uint8","name":"f","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTransmitCalldataFixedBytesOverhead","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"getTransmitCalldataPerSignerBytesOverhead","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"query","type":"address"}],"name":"getTransmitterInfo","outputs":[{"internalType":"bool","name":"active","type":"bool"},{"internalType":"uint8","name":"index","type":"uint8"},{"internalType":"uint96","name":"balance","type":"uint96"},{"internalType":"uint96","name":"lastCollected","type":"uint96"},{"internalType":"address","name":"payee","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"upkeepId","type":"uint256"}],"name":"getTriggerType","outputs":[{"internalType":"enum AutomationRegistryBase2_2.Trigger","name":"","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getUpkeep","outputs":[{"components":[{"internalType":"address","name":"target","type":"address"},{"internalType":"uint32","name":"performGas","type":"uint32"},{"internalType":"bytes","name":"checkData","type":"bytes"},{"internalType":"uint96","name":"balance","type":"uint96"},{"internalType":"address","name":"admin","type":"address"},{"internalType":"uint64","name":"maxValidBlocknumber","type":"uint64"},{"internalType":"uint32","name":"lastPerformedBlockNumber","type":"uint32"},{"internalType":"uint96","name":"amountSpent","type":"uint96"},{"internalType":"bool","name":"paused","type":"bool"},{"internalType":"bytes","name":"offchainConfig","type":"bytes"}],"internalType":"struct AutomationRegistryBase2_2.UpkeepInfo","name":"upkeepInfo","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"upkeepId","type":"uint256"}],"name":"getUpkeepPrivilegeConfig","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"upkeepId","type":"uint256"}],"name":"getUpkeepTriggerConfig","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"dedupKey","type":"bytes32"}],"name":"hasDedupKey","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"pauseUpkeep","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"recoverFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"admin","type":"address"},{"internalType":"bytes","name":"newPrivilegeConfig","type":"bytes"}],"name":"setAdminPrivilegeConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"payees","type":"address[]"}],"name":"setPayees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"peer","type":"address"},{"internalType":"enum AutomationRegistryBase2_2.MigrationPermission","name":"permission","type":"uint8"}],"name":"setPeerRegistryMigrationPermission","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"bytes","name":"newCheckData","type":"bytes"}],"name":"setUpkeepCheckData","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint32","name":"gasLimit","type":"uint32"}],"name":"setUpkeepGasLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"bytes","name":"config","type":"bytes"}],"name":"setUpkeepOffchainConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"upkeepId","type":"uint256"},{"internalType":"bytes","name":"newPrivilegeConfig","type":"bytes"}],"name":"setUpkeepPrivilegeConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"transmitter","type":"address"},{"internalType":"address","name":"proposed","type":"address"}],"name":"transferPayeeship","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"address","name":"proposed","type":"address"}],"name":"transferUpkeepAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"unpauseUpkeep","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"upkeepTranscoderVersion","outputs":[{"internalType":"enum UpkeepFormat","name":"","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"upkeepVersion","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"address","name":"to","type":"address"}],"name":"withdrawFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawOwnerFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"}],"name":"withdrawPayment","outputs":[],"stateMutability":"nonpayable","type":"function"}] +[{"inputs":[{"internalType":"contract AutomationRegistryLogicB2_2","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":[],"name":"InvalidDataLength","type":"error"},{"inputs":[],"name":"InvalidPayee","type":"error"},{"inputs":[],"name":"InvalidRecipient","type":"error"},{"inputs":[],"name":"InvalidReport","type":"error"},{"inputs":[],"name":"InvalidSigner","type":"error"},{"inputs":[],"name":"InvalidTransmitter","type":"error"},{"inputs":[],"name":"InvalidTrigger","type":"error"},{"inputs":[],"name":"InvalidTriggerType","type":"error"},{"inputs":[],"name":"MaxCheckDataSizeCanOnlyIncrease","type":"error"},{"inputs":[],"name":"MaxPerformDataSizeCanOnlyIncrease","type":"error"},{"inputs":[],"name":"MigrationNotPermitted","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":"OnlyPausedUpkeep","type":"error"},{"inputs":[],"name":"OnlySimulatedBackend","type":"error"},{"inputs":[],"name":"OnlyUnpausedUpkeep","type":"error"},{"inputs":[],"name":"ParameterLengthError","type":"error"},{"inputs":[],"name":"PaymentGreaterThanAllLINK","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":"UpkeepAlreadyExists","type":"error"},{"inputs":[],"name":"UpkeepCancelled","type":"error"},{"inputs":[],"name":"UpkeepNotCanceled","type":"error"},{"inputs":[],"name":"UpkeepNotNeeded","type":"error"},{"inputs":[],"name":"ValueNotChanged","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"},{"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":"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":"uint96","name":"amount","type":"uint96"}],"name":"OwnerFundsWithdrawn","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":"nonpayable","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":"paymentPremiumPPB","type":"uint32"},{"internalType":"uint32","name":"flatFeeMicroLink","type":"uint32"},{"internalType":"uint32","name":"checkGasLimit","type":"uint32"},{"internalType":"uint24","name":"stalenessSeconds","type":"uint24"},{"internalType":"uint16","name":"gasCeilingMultiplier","type":"uint16"},{"internalType":"uint96","name":"minUpkeepSpend","type":"uint96"},{"internalType":"uint32","name":"maxPerformGas","type":"uint32"},{"internalType":"uint32","name":"maxCheckDataSize","type":"uint32"},{"internalType":"uint32","name":"maxPerformDataSize","type":"uint32"},{"internalType":"uint32","name":"maxRevertDataSize","type":"uint32"},{"internalType":"uint256","name":"fallbackGasPrice","type":"uint256"},{"internalType":"uint256","name":"fallbackLinkPrice","type":"uint256"},{"internalType":"address","name":"transcoder","type":"address"},{"internalType":"address[]","name":"registrars","type":"address[]"},{"internalType":"address","name":"upkeepPrivilegeManager","type":"address"},{"internalType":"contract IChainModule","name":"chainModule","type":"address"},{"internalType":"bool","name":"reorgProtectionEnabled","type":"bool"}],"internalType":"struct AutomationRegistryBase2_2.OnchainConfig","name":"onchainConfig","type":"tuple"},{"internalType":"uint64","name":"offchainConfigVersion","type":"uint64"},{"internalType":"bytes","name":"offchainConfig","type":"bytes"}],"name":"setConfigTypeSafe","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"bytes","name":"performData","type":"bytes"}],"name":"simulatePerformUpkeep","outputs":[{"internalType":"bool","name":"success","type":"bool"},{"internalType":"uint256","name":"gasUsed","type":"uint256"}],"stateMutability":"view","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"},{"inputs":[{"internalType":"contract AutomationRegistryLogicB2_2","name":"logicB","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint96","name":"amount","type":"uint96"}],"name":"addFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"cancelUpkeep","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"bytes[]","name":"values","type":"bytes[]"},{"internalType":"bytes","name":"extraData","type":"bytes"}],"name":"checkCallback","outputs":[{"internalType":"bool","name":"upkeepNeeded","type":"bool"},{"internalType":"bytes","name":"performData","type":"bytes"},{"internalType":"enum AutomationRegistryBase2_2.UpkeepFailureReason","name":"upkeepFailureReason","type":"uint8"},{"internalType":"uint256","name":"gasUsed","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"bytes","name":"triggerData","type":"bytes"}],"name":"checkUpkeep","outputs":[{"internalType":"bool","name":"upkeepNeeded","type":"bool"},{"internalType":"bytes","name":"performData","type":"bytes"},{"internalType":"enum AutomationRegistryBase2_2.UpkeepFailureReason","name":"upkeepFailureReason","type":"uint8"},{"internalType":"uint256","name":"gasUsed","type":"uint256"},{"internalType":"uint256","name":"gasLimit","type":"uint256"},{"internalType":"uint256","name":"fastGasWei","type":"uint256"},{"internalType":"uint256","name":"linkNative","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"checkUpkeep","outputs":[{"internalType":"bool","name":"upkeepNeeded","type":"bool"},{"internalType":"bytes","name":"performData","type":"bytes"},{"internalType":"enum AutomationRegistryBase2_2.UpkeepFailureReason","name":"upkeepFailureReason","type":"uint8"},{"internalType":"uint256","name":"gasUsed","type":"uint256"},{"internalType":"uint256","name":"gasLimit","type":"uint256"},{"internalType":"uint256","name":"fastGasWei","type":"uint256"},{"internalType":"uint256","name":"linkNative","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"bytes","name":"payload","type":"bytes"}],"name":"executeCallback","outputs":[{"internalType":"bool","name":"upkeepNeeded","type":"bool"},{"internalType":"bytes","name":"performData","type":"bytes"},{"internalType":"enum AutomationRegistryBase2_2.UpkeepFailureReason","name":"upkeepFailureReason","type":"uint8"},{"internalType":"uint256","name":"gasUsed","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"address","name":"destination","type":"address"}],"name":"migrateUpkeeps","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"encodedUpkeeps","type":"bytes"}],"name":"receiveUpkeeps","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"target","type":"address"},{"internalType":"uint32","name":"gasLimit","type":"uint32"},{"internalType":"address","name":"admin","type":"address"},{"internalType":"enum AutomationRegistryBase2_2.Trigger","name":"triggerType","type":"uint8"},{"internalType":"bytes","name":"checkData","type":"bytes"},{"internalType":"bytes","name":"triggerConfig","type":"bytes"},{"internalType":"bytes","name":"offchainConfig","type":"bytes"}],"name":"registerUpkeep","outputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"target","type":"address"},{"internalType":"uint32","name":"gasLimit","type":"uint32"},{"internalType":"address","name":"admin","type":"address"},{"internalType":"bytes","name":"checkData","type":"bytes"},{"internalType":"bytes","name":"offchainConfig","type":"bytes"}],"name":"registerUpkeep","outputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"bytes","name":"triggerConfig","type":"bytes"}],"name":"setUpkeepTriggerConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"link","type":"address"},{"internalType":"address","name":"linkNativeFeed","type":"address"},{"internalType":"address","name":"fastGasFeed","type":"address"},{"internalType":"address","name":"automationForwarderLogic","type":"address"},{"internalType":"address","name":"allowedReadOnlyAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"transmitter","type":"address"}],"name":"acceptPayeeship","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"acceptUpkeepAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"startIndex","type":"uint256"},{"internalType":"uint256","name":"maxCount","type":"uint256"}],"name":"getActiveUpkeepIDs","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"admin","type":"address"}],"name":"getAdminPrivilegeConfig","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAllowedReadOnlyAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAutomationForwarderLogic","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getBalance","outputs":[{"internalType":"uint96","name":"balance","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCancellationDelay","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"getChainModule","outputs":[{"internalType":"contract IChainModule","name":"chainModule","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getConditionalGasOverhead","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"getFastGasFeedAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"upkeepID","type":"uint256"}],"name":"getForwarder","outputs":[{"internalType":"contract IAutomationForwarder","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getLinkAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getLinkNativeFeedAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getLogGasOverhead","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"enum AutomationRegistryBase2_2.Trigger","name":"triggerType","type":"uint8"},{"internalType":"uint32","name":"gasLimit","type":"uint32"}],"name":"getMaxPaymentForGas","outputs":[{"internalType":"uint96","name":"maxPayment","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getMinBalance","outputs":[{"internalType":"uint96","name":"","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getMinBalanceForUpkeep","outputs":[{"internalType":"uint96","name":"minBalance","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"peer","type":"address"}],"name":"getPeerRegistryMigrationPermission","outputs":[{"internalType":"enum AutomationRegistryBase2_2.MigrationPermission","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPerPerformByteGasOverhead","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"getPerSignerGasOverhead","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"getReorgProtectionEnabled","outputs":[{"internalType":"bool","name":"reorgProtectionEnabled","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"query","type":"address"}],"name":"getSignerInfo","outputs":[{"internalType":"bool","name":"active","type":"bool"},{"internalType":"uint8","name":"index","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getState","outputs":[{"components":[{"internalType":"uint32","name":"nonce","type":"uint32"},{"internalType":"uint96","name":"ownerLinkBalance","type":"uint96"},{"internalType":"uint256","name":"expectedLinkBalance","type":"uint256"},{"internalType":"uint96","name":"totalPremium","type":"uint96"},{"internalType":"uint256","name":"numUpkeeps","type":"uint256"},{"internalType":"uint32","name":"configCount","type":"uint32"},{"internalType":"uint32","name":"latestConfigBlockNumber","type":"uint32"},{"internalType":"bytes32","name":"latestConfigDigest","type":"bytes32"},{"internalType":"uint32","name":"latestEpoch","type":"uint32"},{"internalType":"bool","name":"paused","type":"bool"}],"internalType":"struct IAutomationV21PlusCommon.StateLegacy","name":"state","type":"tuple"},{"components":[{"internalType":"uint32","name":"paymentPremiumPPB","type":"uint32"},{"internalType":"uint32","name":"flatFeeMicroLink","type":"uint32"},{"internalType":"uint32","name":"checkGasLimit","type":"uint32"},{"internalType":"uint24","name":"stalenessSeconds","type":"uint24"},{"internalType":"uint16","name":"gasCeilingMultiplier","type":"uint16"},{"internalType":"uint96","name":"minUpkeepSpend","type":"uint96"},{"internalType":"uint32","name":"maxPerformGas","type":"uint32"},{"internalType":"uint32","name":"maxCheckDataSize","type":"uint32"},{"internalType":"uint32","name":"maxPerformDataSize","type":"uint32"},{"internalType":"uint32","name":"maxRevertDataSize","type":"uint32"},{"internalType":"uint256","name":"fallbackGasPrice","type":"uint256"},{"internalType":"uint256","name":"fallbackLinkPrice","type":"uint256"},{"internalType":"address","name":"transcoder","type":"address"},{"internalType":"address[]","name":"registrars","type":"address[]"},{"internalType":"address","name":"upkeepPrivilegeManager","type":"address"}],"internalType":"struct IAutomationV21PlusCommon.OnchainConfigLegacy","name":"config","type":"tuple"},{"internalType":"address[]","name":"signers","type":"address[]"},{"internalType":"address[]","name":"transmitters","type":"address[]"},{"internalType":"uint8","name":"f","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTransmitCalldataFixedBytesOverhead","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"getTransmitCalldataPerSignerBytesOverhead","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"query","type":"address"}],"name":"getTransmitterInfo","outputs":[{"internalType":"bool","name":"active","type":"bool"},{"internalType":"uint8","name":"index","type":"uint8"},{"internalType":"uint96","name":"balance","type":"uint96"},{"internalType":"uint96","name":"lastCollected","type":"uint96"},{"internalType":"address","name":"payee","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"upkeepId","type":"uint256"}],"name":"getTriggerType","outputs":[{"internalType":"enum AutomationRegistryBase2_2.Trigger","name":"","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getUpkeep","outputs":[{"components":[{"internalType":"address","name":"target","type":"address"},{"internalType":"uint32","name":"performGas","type":"uint32"},{"internalType":"bytes","name":"checkData","type":"bytes"},{"internalType":"uint96","name":"balance","type":"uint96"},{"internalType":"address","name":"admin","type":"address"},{"internalType":"uint64","name":"maxValidBlocknumber","type":"uint64"},{"internalType":"uint32","name":"lastPerformedBlockNumber","type":"uint32"},{"internalType":"uint96","name":"amountSpent","type":"uint96"},{"internalType":"bool","name":"paused","type":"bool"},{"internalType":"bytes","name":"offchainConfig","type":"bytes"}],"internalType":"struct IAutomationV21PlusCommon.UpkeepInfoLegacy","name":"upkeepInfo","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"upkeepId","type":"uint256"}],"name":"getUpkeepPrivilegeConfig","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"upkeepId","type":"uint256"}],"name":"getUpkeepTriggerConfig","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"dedupKey","type":"bytes32"}],"name":"hasDedupKey","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"pauseUpkeep","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"recoverFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"admin","type":"address"},{"internalType":"bytes","name":"newPrivilegeConfig","type":"bytes"}],"name":"setAdminPrivilegeConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"payees","type":"address[]"}],"name":"setPayees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"peer","type":"address"},{"internalType":"enum AutomationRegistryBase2_2.MigrationPermission","name":"permission","type":"uint8"}],"name":"setPeerRegistryMigrationPermission","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"bytes","name":"newCheckData","type":"bytes"}],"name":"setUpkeepCheckData","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint32","name":"gasLimit","type":"uint32"}],"name":"setUpkeepGasLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"bytes","name":"config","type":"bytes"}],"name":"setUpkeepOffchainConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"upkeepId","type":"uint256"},{"internalType":"bytes","name":"newPrivilegeConfig","type":"bytes"}],"name":"setUpkeepPrivilegeConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"transmitter","type":"address"},{"internalType":"address","name":"proposed","type":"address"}],"name":"transferPayeeship","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"address","name":"proposed","type":"address"}],"name":"transferUpkeepAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"unpauseUpkeep","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"upkeepTranscoderVersion","outputs":[{"internalType":"enum UpkeepFormat","name":"","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"upkeepVersion","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"address","name":"to","type":"address"}],"name":"withdrawFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawOwnerFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"}],"name":"withdrawPayment","outputs":[],"stateMutability":"nonpayable","type":"function"}] */ diff --git a/contracts/src/v0.8/automation/mocks/MockUpkeep.sol b/contracts/src/v0.8/automation/mocks/MockUpkeep.sol new file mode 100644 index 00000000000..17899f4cade --- /dev/null +++ b/contracts/src/v0.8/automation/mocks/MockUpkeep.sol @@ -0,0 +1,53 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +contract MockUpkeep { + bool public shouldCheckRevert; + bool public shouldPerformRevert; + bool public checkResult = true; + bytes public performData; + uint256 public checkGasToBurn; + uint256 public performGasToBurn; + + event UpkeepPerformedWith(bytes upkeepData); + error CheckRevert(); + error PerformRevert(); + + function setShouldCheckRevert(bool value) public { + shouldCheckRevert = value; + } + + function setShouldPerformRevert(bool value) public { + shouldPerformRevert = value; + } + + function setCheckResult(bool value) public { + checkResult = value; + } + + function setPerformData(bytes calldata data) public { + performData = data; + } + + function setCheckGasToBurn(uint256 value) public { + checkGasToBurn = value; + } + + function setPerformGasToBurn(uint256 value) public { + performGasToBurn = value; + } + + function checkUpkeep(bytes calldata) external view returns (bool callable, bytes memory executedata) { + if (shouldCheckRevert) revert CheckRevert(); + uint256 startGas = gasleft(); + while (startGas - gasleft() < checkGasToBurn) {} // burn gas + return (checkResult, performData); + } + + function performUpkeep(bytes calldata data) external { + if (shouldPerformRevert) revert PerformRevert(); + uint256 startGas = gasleft(); + while (startGas - gasleft() < performGasToBurn) {} // burn gas + emit UpkeepPerformedWith(data); + } +} diff --git a/contracts/src/v0.8/automation/dev/test/AutomationRegistry2_2.t.sol b/contracts/src/v0.8/automation/test/AutomationRegistry2_2.t.sol similarity index 98% rename from contracts/src/v0.8/automation/dev/test/AutomationRegistry2_2.t.sol rename to contracts/src/v0.8/automation/test/AutomationRegistry2_2.t.sol index 6b05e4f6465..f3eafc0d9a5 100644 --- a/contracts/src/v0.8/automation/dev/test/AutomationRegistry2_2.t.sol +++ b/contracts/src/v0.8/automation/test/AutomationRegistry2_2.t.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.8.19; -import {AutomationForwarderLogic} from "../../AutomationForwarderLogic.sol"; +import {AutomationForwarderLogic} from "../AutomationForwarderLogic.sol"; import {BaseTest} from "./BaseTest.t.sol"; import {AutomationRegistry2_2} from "../v2_2/AutomationRegistry2_2.sol"; import {AutomationRegistryBase2_2} from "../v2_2/AutomationRegistryBase2_2.sol"; diff --git a/contracts/src/v0.8/automation/testhelpers/UpkeepCounter.sol b/contracts/src/v0.8/automation/testhelpers/UpkeepCounter.sol index caeed98e302..24a8b1f9010 100644 --- a/contracts/src/v0.8/automation/testhelpers/UpkeepCounter.sol +++ b/contracts/src/v0.8/automation/testhelpers/UpkeepCounter.sol @@ -4,25 +4,25 @@ pragma solidity 0.8.16; contract UpkeepCounter { event PerformingUpkeep( address indexed from, - uint256 initialBlock, - uint256 lastBlock, + uint256 initialTimestamp, + uint256 lastTimestamp, uint256 previousBlock, uint256 counter ); uint256 public testRange; uint256 public interval; - uint256 public lastBlock; + uint256 public lastTimestamp; uint256 public previousPerformBlock; - uint256 public initialBlock; + uint256 public initialTimestamp; uint256 public counter; constructor(uint256 _testRange, uint256 _interval) { testRange = _testRange; interval = _interval; previousPerformBlock = 0; - lastBlock = block.number; - initialBlock = 0; + lastTimestamp = block.timestamp; + initialTimestamp = 0; counter = 0; } @@ -31,28 +31,28 @@ contract UpkeepCounter { } function performUpkeep(bytes calldata performData) external { - if (initialBlock == 0) { - initialBlock = block.number; + if (initialTimestamp == 0) { + initialTimestamp = block.timestamp; } - lastBlock = block.number; + lastTimestamp = block.timestamp; counter = counter + 1; performData; - emit PerformingUpkeep(tx.origin, initialBlock, lastBlock, previousPerformBlock, counter); - previousPerformBlock = lastBlock; + emit PerformingUpkeep(tx.origin, initialTimestamp, lastTimestamp, previousPerformBlock, counter); + previousPerformBlock = lastTimestamp; } function eligible() public view returns (bool) { - if (initialBlock == 0) { + if (initialTimestamp == 0) { return true; } - return (block.number - initialBlock) < testRange && (block.number - lastBlock) >= interval; + return (block.timestamp - initialTimestamp) < testRange && (block.timestamp - lastTimestamp) >= interval; } function setSpread(uint256 _testRange, uint256 _interval) external { testRange = _testRange; interval = _interval; - initialBlock = 0; + initialTimestamp = 0; counter = 0; } } diff --git a/contracts/src/v0.8/automation/upkeeps/LinkAvailableBalanceMonitor.sol b/contracts/src/v0.8/automation/upkeeps/LinkAvailableBalanceMonitor.sol index b858800d73a..dfbfb78d3d6 100644 --- a/contracts/src/v0.8/automation/upkeeps/LinkAvailableBalanceMonitor.sol +++ b/contracts/src/v0.8/automation/upkeeps/LinkAvailableBalanceMonitor.sol @@ -71,8 +71,8 @@ contract LinkAvailableBalanceMonitor is AccessControl, AutomationCompatibleInter bytes32 private constant ADMIN_ROLE = keccak256("ADMIN_ROLE"); bytes32 private constant EXECUTOR_ROLE = keccak256("EXECUTOR_ROLE"); - uint96 private constant DEFAULT_TOP_UP_AMOUNT_JULES = 9000000000000000000; - uint96 private constant DEFAULT_MIN_BALANCE_JULES = 1000000000000000000; + uint96 private constant DEFAULT_TOP_UP_AMOUNT_JUELS = 9000000000000000000; + uint96 private constant DEFAULT_MIN_BALANCE_JUELS = 1000000000000000000; IERC20 private immutable i_linkToken; uint256 private s_minWaitPeriodSeconds; @@ -142,14 +142,15 @@ contract LinkAvailableBalanceMonitor is AccessControl, AutomationCompatibleInter } // s_onRampAddresses is not the same length as s_watchList, so it has // to be clean in a separate loop - for (uint256 idx = 0; idx < s_onRampAddresses.length(); idx++) { - (uint256 key, ) = s_onRampAddresses.at(idx); + for (uint256 idx = s_onRampAddresses.length(); idx > 0; idx--) { + (uint256 key, ) = s_onRampAddresses.at(idx - 1); s_onRampAddresses.remove(key); } for (uint256 idx = 0; idx < addresses.length; idx++) { address targetAddress = addresses[idx]; if (s_targets[targetAddress].isActive) revert DuplicateAddress(targetAddress); if (targetAddress == address(0)) revert InvalidWatchList(); + if (minBalances[idx] == 0) revert InvalidWatchList(); if (topUpAmounts[idx] == 0) revert InvalidWatchList(); s_targets[targetAddress] = MonitoredAddress({ isActive: true, @@ -173,6 +174,7 @@ contract LinkAvailableBalanceMonitor is AccessControl, AutomationCompatibleInter /// in which case it will carry the proper dstChainSelector along with the 0x0 address function addToWatchListOrDecomission(address targetAddress, uint64 dstChainSelector) public onlyAdminOrExecutor { if (s_targets[targetAddress].isActive) revert DuplicateAddress(targetAddress); + if (targetAddress == address(0) && dstChainSelector == 0) revert InvalidAddress(targetAddress); bool onRampExists = s_onRampAddresses.contains(dstChainSelector); // if targetAddress is an existing onRamp, there's a need of cleaning the previous onRamp associated to this dstChainSelector // there's no need to remove any other address that's not an onRamp @@ -182,16 +184,19 @@ contract LinkAvailableBalanceMonitor is AccessControl, AutomationCompatibleInter } // only add the new address if it's not 0x0 if (targetAddress != address(0)) { - s_onRampAddresses.set(dstChainSelector, targetAddress); s_targets[targetAddress] = MonitoredAddress({ isActive: true, - minBalance: DEFAULT_MIN_BALANCE_JULES, - topUpAmount: DEFAULT_TOP_UP_AMOUNT_JULES, + minBalance: DEFAULT_MIN_BALANCE_JUELS, + topUpAmount: DEFAULT_TOP_UP_AMOUNT_JUELS, lastTopUpTimestamp: 0 }); s_watchList.add(targetAddress); - } else { - // if the address is 0x0, it means the onRamp has ben decomissioned and has to be cleaned + // add the contract to onRampAddresses if it carries a valid dstChainSelector + if (dstChainSelector > 0) { + s_onRampAddresses.set(dstChainSelector, targetAddress); + } + // else if is refundant as this is the only corner case left, maintaining it for legibility + } else if (targetAddress == address(0) && dstChainSelector > 0) { s_onRampAddresses.remove(dstChainSelector); } } @@ -219,16 +224,24 @@ contract LinkAvailableBalanceMonitor is AccessControl, AutomationCompatibleInter uint256 idx = uint256(blockhash(block.number - (block.number % s_upkeepInterval) - 1)) % numTargets; uint256 numToCheck = numTargets < maxCheck ? numTargets : maxCheck; uint256 numFound = 0; + uint256 minWaitPeriod = s_minWaitPeriodSeconds; address[] memory targetsToFund = new address[](maxPerform); - MonitoredAddress memory target; + MonitoredAddress memory contractToFund; for ( uint256 numChecked = 0; numChecked < numToCheck; (idx, numChecked) = ((idx + 1) % numTargets, numChecked + 1) ) { address targetAddress = s_watchList.at(idx); - target = s_targets[targetAddress]; - if (_needsFunding(targetAddress, target.minBalance)) { + contractToFund = s_targets[targetAddress]; + if ( + _needsFunding( + targetAddress, + contractToFund.lastTopUpTimestamp + minWaitPeriod, + contractToFund.minBalance, + contractToFund.isActive + ) + ) { targetsToFund[numFound] = targetAddress; numFound++; if (numFound == maxPerform) { @@ -247,21 +260,31 @@ contract LinkAvailableBalanceMonitor is AccessControl, AutomationCompatibleInter /// @notice tries to fund an array of target addresses, checking if they're underfunded in the process /// @param targetAddresses is an array of contract addresses to be funded in case they're underfunded function topUp(address[] memory targetAddresses) public whenNotPaused { - MonitoredAddress memory target; + MonitoredAddress memory contractToFund; + uint256 minWaitPeriod = s_minWaitPeriodSeconds; uint256 localBalance = i_linkToken.balanceOf(address(this)); for (uint256 idx = 0; idx < targetAddresses.length; idx++) { address targetAddress = targetAddresses[idx]; - target = s_targets[targetAddress]; - if (localBalance >= target.topUpAmount && _needsFunding(targetAddress, target.minBalance)) { - bool success = i_linkToken.transfer(targetAddress, target.topUpAmount); + contractToFund = s_targets[targetAddress]; + s_targets[targetAddress].lastTopUpTimestamp = uint56(block.timestamp); + if ( + localBalance >= contractToFund.topUpAmount && + _needsFunding( + targetAddress, + contractToFund.lastTopUpTimestamp + minWaitPeriod, + contractToFund.minBalance, + contractToFund.isActive + ) + ) { + bool success = i_linkToken.transfer(targetAddress, contractToFund.topUpAmount); if (success) { - localBalance -= target.topUpAmount; - s_targets[targetAddress].lastTopUpTimestamp = uint56(block.timestamp); + localBalance -= contractToFund.topUpAmount; emit TopUpSucceeded(targetAddress); } else { emit TopUpFailed(targetAddress); } } else { + s_targets[targetAddress].lastTopUpTimestamp = contractToFund.lastTopUpTimestamp; emit TopUpBlocked(targetAddress); } } @@ -271,8 +294,14 @@ contract LinkAvailableBalanceMonitor is AccessControl, AutomationCompatibleInter /// if it is elligible for funding /// @param targetAddress the target to check /// @param minBalance minimum balance required for the target + /// @param minWaitPeriodPassed the minimum wait period (target lastTopUpTimestamp + minWaitPeriod) /// @return bool whether the target needs funding or not - function _needsFunding(address targetAddress, uint256 minBalance) private view returns (bool) { + function _needsFunding( + address targetAddress, + uint256 minWaitPeriodPassed, + uint256 minBalance, + bool contractIsActive + ) private view returns (bool) { // Explicitly check if the targetAddress is the zero address // or if it's not a contract. In both cases return with false, // to prevent target.linkAvailableForPayment from running, @@ -280,21 +309,17 @@ contract LinkAvailableBalanceMonitor is AccessControl, AutomationCompatibleInter if (targetAddress == address(0) || targetAddress.code.length == 0) { return false; } - MonitoredAddress memory addressToCheck = s_targets[targetAddress]; ILinkAvailable target; IAggregatorProxy proxy = IAggregatorProxy(targetAddress); try proxy.aggregator() returns (address aggregatorAddress) { + // proxy.aggregator() can return a 0 address if the address is not an aggregator if (aggregatorAddress == address(0)) return false; target = ILinkAvailable(aggregatorAddress); } catch { target = ILinkAvailable(targetAddress); } try target.linkAvailableForPayment() returns (int256 balance) { - if ( - balance < int256(minBalance) && - addressToCheck.lastTopUpTimestamp + s_minWaitPeriodSeconds <= block.timestamp && - addressToCheck.isActive - ) { + if (balance < int256(minBalance) && minWaitPeriodPassed <= block.timestamp && contractIsActive) { return true; } } catch {} @@ -408,9 +433,9 @@ contract LinkAvailableBalanceMonitor is AccessControl, AutomationCompatibleInter /// @notice Gets configuration information for an address on the watchlist function getAccountInfo( address targetAddress - ) external view returns (bool isActive, uint256 minBalance, uint256 topUpAmount) { + ) external view returns (bool isActive, uint96 minBalance, uint96 topUpAmount, uint56 lastTopUpTimestamp) { MonitoredAddress memory target = s_targets[targetAddress]; - return (target.isActive, target.minBalance, target.topUpAmount); + return (target.isActive, target.minBalance, target.topUpAmount, target.lastTopUpTimestamp); } /// @dev Modifier to make a function callable only by executor role or the diff --git a/contracts/src/v0.8/automation/v2_1/AutomationUtils2_1.sol b/contracts/src/v0.8/automation/v2_1/AutomationUtils2_1.sol index f6ba913b2fb..76483c89861 100644 --- a/contracts/src/v0.8/automation/v2_1/AutomationUtils2_1.sol +++ b/contracts/src/v0.8/automation/v2_1/AutomationUtils2_1.sol @@ -3,6 +3,7 @@ pragma solidity 0.8.16; import {KeeperRegistryBase2_1} from "./KeeperRegistryBase2_1.sol"; import {Log} from "../interfaces/ILogAutomation.sol"; +import {IAutomationV21PlusCommon} from "../interfaces/IAutomationV21PlusCommon.sol"; /** * @notice this file exposes structs that are otherwise internal to the automation registry @@ -26,7 +27,7 @@ contract AutomationUtils2_1 { /** * @dev this can be removed as OnchainConfig is now exposed directly from the registry */ - function _onChainConfig(KeeperRegistryBase2_1.OnchainConfig memory) external {} // 0x2ff92a81 + function _onChainConfig(IAutomationV21PlusCommon.OnchainConfigLegacy memory) external {} // 0x2ff92a81 function _report(KeeperRegistryBase2_1.Report memory) external {} // 0xe65d6546 diff --git a/contracts/src/v0.8/automation/v2_1/KeeperRegistry2_1.sol b/contracts/src/v0.8/automation/v2_1/KeeperRegistry2_1.sol index 7c88f12f5a1..25028e6f84a 100644 --- a/contracts/src/v0.8/automation/v2_1/KeeperRegistry2_1.sol +++ b/contracts/src/v0.8/automation/v2_1/KeeperRegistry2_1.sol @@ -8,6 +8,7 @@ import {KeeperRegistryLogicB2_1} from "./KeeperRegistryLogicB2_1.sol"; import {Chainable} from "../Chainable.sol"; import {IERC677Receiver} from "../../shared/interfaces/IERC677Receiver.sol"; import {OCR2Abstract} from "../../shared/ocr2/OCR2Abstract.sol"; +import {IAutomationV21PlusCommon} from "../interfaces/IAutomationV21PlusCommon.sol"; /** * @notice Registry for adding work for Chainlink Keepers to perform on client @@ -236,7 +237,7 @@ contract KeeperRegistry2_1 is KeeperRegistryBase2_1, OCR2Abstract, Chainable, IE signers, transmitters, f, - abi.decode(onchainConfigBytes, (OnchainConfig)), + abi.decode(onchainConfigBytes, (IAutomationV21PlusCommon.OnchainConfigLegacy)), offchainConfigVersion, offchainConfig ); @@ -246,7 +247,7 @@ contract KeeperRegistry2_1 is KeeperRegistryBase2_1, OCR2Abstract, Chainable, IE address[] memory signers, address[] memory transmitters, uint8 f, - OnchainConfig memory onchainConfig, + IAutomationV21PlusCommon.OnchainConfigLegacy memory onchainConfig, uint64 offchainConfigVersion, bytes memory offchainConfig ) public onlyOwner { diff --git a/contracts/src/v0.8/automation/v2_1/KeeperRegistryBase2_1.sol b/contracts/src/v0.8/automation/v2_1/KeeperRegistryBase2_1.sol index f81fcef636e..fe738943d35 100644 --- a/contracts/src/v0.8/automation/v2_1/KeeperRegistryBase2_1.sol +++ b/contracts/src/v0.8/automation/v2_1/KeeperRegistryBase2_1.sol @@ -185,76 +185,6 @@ abstract contract KeeperRegistryBase2_1 is ConfirmedOwner, ExecutionPrevention { REGISTRY_PAUSED } - /** - * @notice OnchainConfig of the registry - * @dev only used in params and return values - * @member paymentPremiumPPB payment premium rate oracles receive on top of - * being reimbursed for gas, measured in parts per billion - * @member flatFeeMicroLink flat fee paid to oracles for performing upkeeps, - * priced in MicroLink; can be used in conjunction with or independently of - * paymentPremiumPPB - * @member checkGasLimit gas limit when checking for upkeep - * @member stalenessSeconds number of seconds that is allowed for feed data to - * be stale before switching to the fallback pricing - * @member gasCeilingMultiplier multiplier to apply to the fast gas feed price - * when calculating the payment ceiling for keepers - * @member minUpkeepSpend minimum LINK that an upkeep must spend before cancelling - * @member maxPerformGas max performGas allowed for an upkeep on this registry - * @member maxCheckDataSize max length of checkData bytes - * @member maxPerformDataSize max length of performData bytes - * @member maxRevertDataSize max length of revertData bytes - * @member fallbackGasPrice gas price used if the gas price feed is stale - * @member fallbackLinkPrice LINK price used if the LINK price feed is stale - * @member transcoder address of the transcoder contract - * @member registrars addresses of the registrar contracts - * @member upkeepPrivilegeManager address which can set privilege for upkeeps - */ - struct OnchainConfig { - uint32 paymentPremiumPPB; - uint32 flatFeeMicroLink; // min 0.000001 LINK, max 4294 LINK - uint32 checkGasLimit; - uint24 stalenessSeconds; - uint16 gasCeilingMultiplier; - uint96 minUpkeepSpend; - uint32 maxPerformGas; - uint32 maxCheckDataSize; - uint32 maxPerformDataSize; - uint32 maxRevertDataSize; - uint256 fallbackGasPrice; - uint256 fallbackLinkPrice; - address transcoder; - address[] registrars; - address upkeepPrivilegeManager; - } - - /** - * @notice state of the registry - * @dev only used in params and return values - * @dev this will likely be deprecated in a future version of the registry in favor of individual getters - * @member nonce used for ID generation - * @member ownerLinkBalance withdrawable balance of LINK by contract owner - * @member expectedLinkBalance the expected balance of LINK of the registry - * @member totalPremium the total premium collected on registry so far - * @member numUpkeeps total number of upkeeps on the registry - * @member configCount ordinal number of current config, out of all configs applied to this contract so far - * @member latestConfigBlockNumber last block at which this config was set - * @member latestConfigDigest domain-separation tag for current config - * @member latestEpoch for which a report was transmitted - * @member paused freeze on execution scoped to the entire registry - */ - struct State { - uint32 nonce; - uint96 ownerLinkBalance; - uint256 expectedLinkBalance; - uint96 totalPremium; - uint256 numUpkeeps; - uint32 configCount; - uint32 latestConfigBlockNumber; - bytes32 latestConfigDigest; - uint32 latestEpoch; - bool paused; - } - /** * @notice relevant state of an upkeep which is used in transmit function * @member paused if this upkeep has been paused @@ -277,34 +207,6 @@ abstract contract KeeperRegistryBase2_1 is ConfirmedOwner, ExecutionPrevention { // 2 bytes left in 2nd EVM word - written in transmit path } - /** - * @notice all information about an upkeep - * @dev only used in return values - * @dev this will likely be deprecated in a future version of the registry - * @member target the contract which needs to be serviced - * @member performGas the gas limit of upkeep execution - * @member checkData the checkData bytes for this upkeep - * @member balance the balance of this upkeep - * @member admin for this upkeep - * @member maxValidBlocknumber until which block this upkeep is valid - * @member lastPerformedBlockNumber the last block number when this upkeep was performed - * @member amountSpent the amount this upkeep has spent - * @member paused if this upkeep has been paused - * @member offchainConfig the off-chain config of this upkeep - */ - struct UpkeepInfo { - address target; - uint32 performGas; - bytes checkData; - uint96 balance; - address admin; - uint64 maxValidBlocknumber; - uint32 lastPerformedBlockNumber; - uint96 amountSpent; - bool paused; - bytes offchainConfig; - } - /// @dev Config + State storage struct which is on hot transmit path struct HotVars { uint8 f; // maximum number of faulty oracles diff --git a/contracts/src/v0.8/automation/v2_1/KeeperRegistryLogicB2_1.sol b/contracts/src/v0.8/automation/v2_1/KeeperRegistryLogicB2_1.sol index b394bff4ee8..243d0ba5ed9 100644 --- a/contracts/src/v0.8/automation/v2_1/KeeperRegistryLogicB2_1.sol +++ b/contracts/src/v0.8/automation/v2_1/KeeperRegistryLogicB2_1.sol @@ -6,6 +6,7 @@ import {EnumerableSet} from "../../vendor/openzeppelin-solidity/v4.7.3/contracts import {Address} from "../../vendor/openzeppelin-solidity/v4.7.3/contracts/utils/Address.sol"; import {UpkeepFormat} from "../interfaces/UpkeepTranscoderInterface.sol"; import {IAutomationForwarder} from "../interfaces/IAutomationForwarder.sol"; +import {IAutomationV21PlusCommon} from "../interfaces/IAutomationV21PlusCommon.sol"; contract KeeperRegistryLogicB2_1 is KeeperRegistryBase2_1 { using Address for address; @@ -313,10 +314,10 @@ contract KeeperRegistryLogicB2_1 is KeeperRegistryBase2_1 { * @dev this function may be deprecated in a future version of automation in favor of individual * getters for each field */ - function getUpkeep(uint256 id) external view returns (UpkeepInfo memory upkeepInfo) { + function getUpkeep(uint256 id) external view returns (IAutomationV21PlusCommon.UpkeepInfoLegacy memory upkeepInfo) { Upkeep memory reg = s_upkeep[id]; address target = address(reg.forwarder) == address(0) ? address(0) : reg.forwarder.getTarget(); - upkeepInfo = UpkeepInfo({ + upkeepInfo = IAutomationV21PlusCommon.UpkeepInfoLegacy({ target: target, performGas: reg.performGas, checkData: s_checkData[id], @@ -402,14 +403,14 @@ contract KeeperRegistryLogicB2_1 is KeeperRegistryBase2_1 { external view returns ( - State memory state, - OnchainConfig memory config, + IAutomationV21PlusCommon.StateLegacy memory state, + IAutomationV21PlusCommon.OnchainConfigLegacy memory config, address[] memory signers, address[] memory transmitters, uint8 f ) { - state = State({ + state = IAutomationV21PlusCommon.StateLegacy({ nonce: s_storage.nonce, ownerLinkBalance: s_storage.ownerLinkBalance, expectedLinkBalance: s_expectedLinkBalance, @@ -422,7 +423,7 @@ contract KeeperRegistryLogicB2_1 is KeeperRegistryBase2_1 { paused: s_hotVars.paused }); - config = OnchainConfig({ + config = IAutomationV21PlusCommon.OnchainConfigLegacy({ paymentPremiumPPB: s_hotVars.paymentPremiumPPB, flatFeeMicroLink: s_hotVars.flatFeeMicroLink, checkGasLimit: s_storage.checkGasLimit, diff --git a/contracts/src/v0.8/automation/dev/v2_2/AutomationRegistry2_2.sol b/contracts/src/v0.8/automation/v2_2/AutomationRegistry2_2.sol similarity index 97% rename from contracts/src/v0.8/automation/dev/v2_2/AutomationRegistry2_2.sol rename to contracts/src/v0.8/automation/v2_2/AutomationRegistry2_2.sol index 7b37a5eba2c..8add9568d26 100644 --- a/contracts/src/v0.8/automation/dev/v2_2/AutomationRegistry2_2.sol +++ b/contracts/src/v0.8/automation/v2_2/AutomationRegistry2_2.sol @@ -1,13 +1,13 @@ // SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.8.19; -import {EnumerableSet} from "../../../vendor/openzeppelin-solidity/v4.7.3/contracts/utils/structs/EnumerableSet.sol"; -import {Address} from "../../../vendor/openzeppelin-solidity/v4.7.3/contracts/utils/Address.sol"; +import {EnumerableSet} from "../../vendor/openzeppelin-solidity/v4.7.3/contracts/utils/structs/EnumerableSet.sol"; +import {Address} from "../../vendor/openzeppelin-solidity/v4.7.3/contracts/utils/Address.sol"; import {AutomationRegistryBase2_2} from "./AutomationRegistryBase2_2.sol"; import {AutomationRegistryLogicB2_2} from "./AutomationRegistryLogicB2_2.sol"; -import {Chainable} from "../../Chainable.sol"; -import {IERC677Receiver} from "../../../shared/interfaces/IERC677Receiver.sol"; -import {OCR2Abstract} from "../../../shared/ocr2/OCR2Abstract.sol"; +import {Chainable} from "../Chainable.sol"; +import {IERC677Receiver} from "../../shared/interfaces/IERC677Receiver.sol"; +import {OCR2Abstract} from "../../shared/ocr2/OCR2Abstract.sol"; /** * @notice Registry for adding work for Chainlink nodes to perform on client diff --git a/contracts/src/v0.8/automation/dev/v2_2/AutomationRegistryBase2_2.sol b/contracts/src/v0.8/automation/v2_2/AutomationRegistryBase2_2.sol similarity index 87% rename from contracts/src/v0.8/automation/dev/v2_2/AutomationRegistryBase2_2.sol rename to contracts/src/v0.8/automation/v2_2/AutomationRegistryBase2_2.sol index d415e0e3e1f..de91cd13542 100644 --- a/contracts/src/v0.8/automation/dev/v2_2/AutomationRegistryBase2_2.sol +++ b/contracts/src/v0.8/automation/v2_2/AutomationRegistryBase2_2.sol @@ -1,16 +1,16 @@ // SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.8.19; -import {EnumerableSet} from "../../../vendor/openzeppelin-solidity/v4.7.3/contracts/utils/structs/EnumerableSet.sol"; -import {Address} from "../../../vendor/openzeppelin-solidity/v4.7.3/contracts/utils/Address.sol"; -import {StreamsLookupCompatibleInterface} from "../../interfaces/StreamsLookupCompatibleInterface.sol"; -import {ILogAutomation, Log} from "../../interfaces/ILogAutomation.sol"; -import {IAutomationForwarder} from "../../interfaces/IAutomationForwarder.sol"; -import {ConfirmedOwner} from "../../../shared/access/ConfirmedOwner.sol"; -import {AggregatorV3Interface} from "../../../shared/interfaces/AggregatorV3Interface.sol"; -import {LinkTokenInterface} from "../../../shared/interfaces/LinkTokenInterface.sol"; -import {KeeperCompatibleInterface} from "../../interfaces/KeeperCompatibleInterface.sol"; -import {UpkeepFormat} from "../../interfaces/UpkeepTranscoderInterface.sol"; +import {EnumerableSet} from "../../vendor/openzeppelin-solidity/v4.7.3/contracts/utils/structs/EnumerableSet.sol"; +import {Address} from "../../vendor/openzeppelin-solidity/v4.7.3/contracts/utils/Address.sol"; +import {StreamsLookupCompatibleInterface} from "../interfaces/StreamsLookupCompatibleInterface.sol"; +import {ILogAutomation, Log} from "../interfaces/ILogAutomation.sol"; +import {IAutomationForwarder} from "../interfaces/IAutomationForwarder.sol"; +import {ConfirmedOwner} from "../../shared/access/ConfirmedOwner.sol"; +import {AggregatorV3Interface} from "../../shared/interfaces/AggregatorV3Interface.sol"; +import {LinkTokenInterface} from "../../shared/interfaces/LinkTokenInterface.sol"; +import {KeeperCompatibleInterface} from "../interfaces/KeeperCompatibleInterface.sol"; +import {UpkeepFormat} from "../interfaces/UpkeepTranscoderInterface.sol"; import {IChainModule} from "../interfaces/IChainModule.sol"; /** @@ -181,48 +181,6 @@ abstract contract AutomationRegistryBase2_2 is ConfirmedOwner { REGISTRY_PAUSED } - /** - * @notice OnchainConfigLegacy of the registry - * @dev only used in params and return values - * @member paymentPremiumPPB payment premium rate oracles receive on top of - * being reimbursed for gas, measured in parts per billion - * @member flatFeeMicroLink flat fee paid to oracles for performing upkeeps, - * priced in MicroLink; can be used in conjunction with or independently of - * paymentPremiumPPB - * @member checkGasLimit gas limit when checking for upkeep - * @member stalenessSeconds number of seconds that is allowed for feed data to - * be stale before switching to the fallback pricing - * @member gasCeilingMultiplier multiplier to apply to the fast gas feed price - * when calculating the payment ceiling for keepers - * @member minUpkeepSpend minimum LINK that an upkeep must spend before cancelling - * @member maxPerformGas max performGas allowed for an upkeep on this registry - * @member maxCheckDataSize max length of checkData bytes - * @member maxPerformDataSize max length of performData bytes - * @member maxRevertDataSize max length of revertData bytes - * @member fallbackGasPrice gas price used if the gas price feed is stale - * @member fallbackLinkPrice LINK price used if the LINK price feed is stale - * @member transcoder address of the transcoder contract - * @member registrars addresses of the registrar contracts - * @member upkeepPrivilegeManager address which can set privilege for upkeeps - */ - struct OnchainConfigLegacy { - uint32 paymentPremiumPPB; - uint32 flatFeeMicroLink; // min 0.000001 LINK, max 4294 LINK - uint32 checkGasLimit; - uint24 stalenessSeconds; - uint16 gasCeilingMultiplier; - uint96 minUpkeepSpend; - uint32 maxPerformGas; - uint32 maxCheckDataSize; - uint32 maxPerformDataSize; - uint32 maxRevertDataSize; - uint256 fallbackGasPrice; - uint256 fallbackLinkPrice; - address transcoder; - address[] registrars; - address upkeepPrivilegeManager; - } - /** * @notice OnchainConfig of the registry * @dev used only in setConfig() @@ -269,34 +227,6 @@ abstract contract AutomationRegistryBase2_2 is ConfirmedOwner { bool reorgProtectionEnabled; } - /** - * @notice state of the registry - * @dev only used in params and return values - * @dev this will likely be deprecated in a future version of the registry in favor of individual getters - * @member nonce used for ID generation - * @member ownerLinkBalance withdrawable balance of LINK by contract owner - * @member expectedLinkBalance the expected balance of LINK of the registry - * @member totalPremium the total premium collected on registry so far - * @member numUpkeeps total number of upkeeps on the registry - * @member configCount ordinal number of current config, out of all configs applied to this contract so far - * @member latestConfigBlockNumber last block at which this config was set - * @member latestConfigDigest domain-separation tag for current config - * @member latestEpoch for which a report was transmitted - * @member paused freeze on execution scoped to the entire registry - */ - struct State { - uint32 nonce; - uint96 ownerLinkBalance; - uint256 expectedLinkBalance; - uint96 totalPremium; - uint256 numUpkeeps; - uint32 configCount; - uint32 latestConfigBlockNumber; - bytes32 latestConfigDigest; - uint32 latestEpoch; - bool paused; - } - /** * @notice relevant state of an upkeep which is used in transmit function * @member paused if this upkeep has been paused @@ -319,34 +249,6 @@ abstract contract AutomationRegistryBase2_2 is ConfirmedOwner { // 2 bytes left in 2nd EVM word - written in transmit path } - /** - * @notice all information about an upkeep - * @dev only used in return values - * @dev this will likely be deprecated in a future version of the registry - * @member target the contract which needs to be serviced - * @member performGas the gas limit of upkeep execution - * @member checkData the checkData bytes for this upkeep - * @member balance the balance of this upkeep - * @member admin for this upkeep - * @member maxValidBlocknumber until which block this upkeep is valid - * @member lastPerformedBlockNumber the last block number when this upkeep was performed - * @member amountSpent the amount this upkeep has spent - * @member paused if this upkeep has been paused - * @member offchainConfig the off-chain config of this upkeep - */ - struct UpkeepInfo { - address target; - uint32 performGas; - bytes checkData; - uint96 balance; - address admin; - uint64 maxValidBlocknumber; - uint32 lastPerformedBlockNumber; - uint96 amountSpent; - bool paused; - bytes offchainConfig; - } - /// @dev Config + State storage struct which is on hot transmit path struct HotVars { uint96 totalPremium; // ─────────╮ total historical payment to oracles for premium diff --git a/contracts/src/v0.8/automation/dev/v2_2/AutomationRegistryLogicA2_2.sol b/contracts/src/v0.8/automation/v2_2/AutomationRegistryLogicA2_2.sol similarity index 96% rename from contracts/src/v0.8/automation/dev/v2_2/AutomationRegistryLogicA2_2.sol rename to contracts/src/v0.8/automation/v2_2/AutomationRegistryLogicA2_2.sol index b5269fcb63a..dfe78c9db6f 100644 --- a/contracts/src/v0.8/automation/dev/v2_2/AutomationRegistryLogicA2_2.sol +++ b/contracts/src/v0.8/automation/v2_2/AutomationRegistryLogicA2_2.sol @@ -1,15 +1,15 @@ // SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.8.19; -import {EnumerableSet} from "../../../vendor/openzeppelin-solidity/v4.7.3/contracts/utils/structs/EnumerableSet.sol"; -import {Address} from "../../../vendor/openzeppelin-solidity/v4.7.3/contracts/utils/Address.sol"; +import {EnumerableSet} from "../../vendor/openzeppelin-solidity/v4.7.3/contracts/utils/structs/EnumerableSet.sol"; +import {Address} from "../../vendor/openzeppelin-solidity/v4.7.3/contracts/utils/Address.sol"; import {AutomationRegistryBase2_2} from "./AutomationRegistryBase2_2.sol"; import {AutomationRegistryLogicB2_2} from "./AutomationRegistryLogicB2_2.sol"; -import {Chainable} from "../../Chainable.sol"; -import {AutomationForwarder} from "../../AutomationForwarder.sol"; -import {IAutomationForwarder} from "../../interfaces/IAutomationForwarder.sol"; -import {UpkeepTranscoderInterfaceV2} from "../../interfaces/UpkeepTranscoderInterfaceV2.sol"; -import {MigratableKeeperRegistryInterfaceV2} from "../../interfaces/MigratableKeeperRegistryInterfaceV2.sol"; +import {Chainable} from "../Chainable.sol"; +import {AutomationForwarder} from "../AutomationForwarder.sol"; +import {IAutomationForwarder} from "../interfaces/IAutomationForwarder.sol"; +import {UpkeepTranscoderInterfaceV2} from "../interfaces/UpkeepTranscoderInterfaceV2.sol"; +import {MigratableKeeperRegistryInterfaceV2} from "../interfaces/MigratableKeeperRegistryInterfaceV2.sol"; /** * @notice Logic contract, works in tandem with AutomationRegistry as a proxy diff --git a/contracts/src/v0.8/automation/dev/v2_2/AutomationRegistryLogicB2_2.sol b/contracts/src/v0.8/automation/v2_2/AutomationRegistryLogicB2_2.sol similarity index 95% rename from contracts/src/v0.8/automation/dev/v2_2/AutomationRegistryLogicB2_2.sol rename to contracts/src/v0.8/automation/v2_2/AutomationRegistryLogicB2_2.sol index 6ce56577819..f6d1ea8f717 100644 --- a/contracts/src/v0.8/automation/dev/v2_2/AutomationRegistryLogicB2_2.sol +++ b/contracts/src/v0.8/automation/v2_2/AutomationRegistryLogicB2_2.sol @@ -2,11 +2,12 @@ pragma solidity 0.8.19; import {AutomationRegistryBase2_2} from "./AutomationRegistryBase2_2.sol"; -import {EnumerableSet} from "../../../vendor/openzeppelin-solidity/v4.7.3/contracts/utils/structs/EnumerableSet.sol"; -import {Address} from "../../../vendor/openzeppelin-solidity/v4.7.3/contracts/utils/Address.sol"; -import {UpkeepFormat} from "../../interfaces/UpkeepTranscoderInterface.sol"; -import {IAutomationForwarder} from "../../interfaces/IAutomationForwarder.sol"; +import {EnumerableSet} from "../../vendor/openzeppelin-solidity/v4.7.3/contracts/utils/structs/EnumerableSet.sol"; +import {Address} from "../../vendor/openzeppelin-solidity/v4.7.3/contracts/utils/Address.sol"; +import {UpkeepFormat} from "../interfaces/UpkeepTranscoderInterface.sol"; +import {IAutomationForwarder} from "../interfaces/IAutomationForwarder.sol"; import {IChainModule} from "../interfaces/IChainModule.sol"; +import {IAutomationV21PlusCommon} from "../interfaces/IAutomationV21PlusCommon.sol"; contract AutomationRegistryLogicB2_2 is AutomationRegistryBase2_2 { using Address for address; @@ -322,10 +323,10 @@ contract AutomationRegistryLogicB2_2 is AutomationRegistryBase2_2 { * @dev this function may be deprecated in a future version of automation in favor of individual * getters for each field */ - function getUpkeep(uint256 id) external view returns (UpkeepInfo memory upkeepInfo) { + function getUpkeep(uint256 id) external view returns (IAutomationV21PlusCommon.UpkeepInfoLegacy memory upkeepInfo) { Upkeep memory reg = s_upkeep[id]; address target = address(reg.forwarder) == address(0) ? address(0) : reg.forwarder.getTarget(); - upkeepInfo = UpkeepInfo({ + upkeepInfo = IAutomationV21PlusCommon.UpkeepInfoLegacy({ target: target, performGas: reg.performGas, checkData: s_checkData[id], @@ -412,14 +413,14 @@ contract AutomationRegistryLogicB2_2 is AutomationRegistryBase2_2 { external view returns ( - State memory state, - OnchainConfigLegacy memory config, + IAutomationV21PlusCommon.StateLegacy memory state, + IAutomationV21PlusCommon.OnchainConfigLegacy memory config, address[] memory signers, address[] memory transmitters, uint8 f ) { - state = State({ + state = IAutomationV21PlusCommon.StateLegacy({ nonce: s_storage.nonce, ownerLinkBalance: s_storage.ownerLinkBalance, expectedLinkBalance: s_expectedLinkBalance, @@ -432,7 +433,7 @@ contract AutomationRegistryLogicB2_2 is AutomationRegistryBase2_2 { paused: s_hotVars.paused }); - config = OnchainConfigLegacy({ + config = IAutomationV21PlusCommon.OnchainConfigLegacy({ paymentPremiumPPB: s_hotVars.paymentPremiumPPB, flatFeeMicroLink: s_hotVars.flatFeeMicroLink, checkGasLimit: s_storage.checkGasLimit, diff --git a/contracts/src/v0.8/automation/dev/v2_2/AutomationUtils2_2.sol b/contracts/src/v0.8/automation/v2_2/AutomationUtils2_2.sol similarity index 83% rename from contracts/src/v0.8/automation/dev/v2_2/AutomationUtils2_2.sol rename to contracts/src/v0.8/automation/v2_2/AutomationUtils2_2.sol index 2558937233a..abdabeb4807 100644 --- a/contracts/src/v0.8/automation/dev/v2_2/AutomationUtils2_2.sol +++ b/contracts/src/v0.8/automation/v2_2/AutomationUtils2_2.sol @@ -2,7 +2,8 @@ pragma solidity 0.8.19; import {AutomationRegistryBase2_2} from "./AutomationRegistryBase2_2.sol"; -import {Log} from "../../interfaces/ILogAutomation.sol"; +import {Log} from "../interfaces/ILogAutomation.sol"; +import {IAutomationV21PlusCommon} from "../interfaces/IAutomationV21PlusCommon.sol"; /** * @notice this file exposes structs that are otherwise internal to the automation registry @@ -26,7 +27,7 @@ contract AutomationUtils2_2 { /** * @dev this can be removed as OnchainConfig is now exposed directly from the registry */ - function _onChainConfig(AutomationRegistryBase2_2.OnchainConfig memory) external {} // 0x2ff92a81 + function _onChainConfig(IAutomationV21PlusCommon.OnchainConfigLegacy memory) external {} // 0x2ff92a81 function _report(AutomationRegistryBase2_2.Report memory) external {} // 0xe65d6546 diff --git a/contracts/src/v0.8/automation/dev/v2_2/LICENSE b/contracts/src/v0.8/automation/v2_2/LICENSE similarity index 100% rename from contracts/src/v0.8/automation/dev/v2_2/LICENSE rename to contracts/src/v0.8/automation/v2_2/LICENSE diff --git a/contracts/src/v0.8/automation/dev/v2_2/README.md b/contracts/src/v0.8/automation/v2_2/README.md similarity index 100% rename from contracts/src/v0.8/automation/dev/v2_2/README.md rename to contracts/src/v0.8/automation/v2_2/README.md diff --git a/contracts/src/v0.8/functions/dev/v1_X/FunctionsBilling.sol b/contracts/src/v0.8/functions/dev/v1_X/FunctionsBilling.sol index b6b65c4e556..c973f55a715 100644 --- a/contracts/src/v0.8/functions/dev/v1_X/FunctionsBilling.sol +++ b/contracts/src/v0.8/functions/dev/v1_X/FunctionsBilling.sol @@ -106,13 +106,13 @@ abstract contract FunctionsBilling is Routable, IFunctionsBilling { /// @inheritdoc IFunctionsBilling function getDONFeeJuels(bytes memory /* requestData */) public view override returns (uint72) { - // s_config.donFee is in cents of USD. Get Juel amount then convert to dollars. + // s_config.donFee is in cents of USD. Convert to dollars amount then get amount of Juels. return SafeCast.toUint72(_getJuelsFromUsd(s_config.donFeeCentsUsd) / 100); } /// @inheritdoc IFunctionsBilling function getOperationFeeJuels() public view override returns (uint72) { - // s_config.donFee is in cents of USD. Get Juel amount then convert to dollars. + // s_config.donFee is in cents of USD. Convert to dollars then get amount of Juels. return SafeCast.toUint72(_getJuelsFromUsd(s_config.operationFeeCentsUsd) / 100); } @@ -124,6 +124,7 @@ abstract contract FunctionsBilling is Routable, IFunctionsBilling { /// @inheritdoc IFunctionsBilling function getWeiPerUnitLink() public view returns (uint256) { (, int256 weiPerUnitLink, , uint256 timestamp, ) = s_linkToNativeFeed.latestRoundData(); + // Only fallback if feedStalenessSeconds is set // solhint-disable-next-line not-rely-on-time if (s_config.feedStalenessSeconds < block.timestamp - timestamp && s_config.feedStalenessSeconds > 0) { return s_config.fallbackNativePerUnitLink; @@ -143,6 +144,7 @@ abstract contract FunctionsBilling is Routable, IFunctionsBilling { /// @inheritdoc IFunctionsBilling function getUsdPerUnitLink() public view returns (uint256, uint8) { (, int256 usdPerUnitLink, , uint256 timestamp, ) = s_linkToUsdFeed.latestRoundData(); + // Only fallback if feedStalenessSeconds is set // solhint-disable-next-line not-rely-on-time if (s_config.feedStalenessSeconds < block.timestamp - timestamp && s_config.feedStalenessSeconds > 0) { return (s_config.fallbackUsdPerUnitLink, s_config.fallbackUsdPerUnitLinkDecimals); @@ -420,6 +422,10 @@ abstract contract FunctionsBilling is Routable, IFunctionsBilling { revert NoTransmittersSet(); } uint96 feePoolShare = s_feePool / uint96(numberOfTransmitters); + if (feePoolShare == 0) { + // Dust cannot be evenly distributed to all transmitters + return; + } // Bounded by "maxNumOracles" on OCR2Abstract.sol for (uint256 i = 0; i < numberOfTransmitters; ++i) { s_withdrawableTokens[transmitters[i]] += feePoolShare; diff --git a/contracts/src/v0.8/functions/dev/v1_X/FunctionsClient.sol b/contracts/src/v0.8/functions/dev/v1_X/FunctionsClient.sol index 4aabef01f28..378714dac85 100644 --- a/contracts/src/v0.8/functions/dev/v1_X/FunctionsClient.sol +++ b/contracts/src/v0.8/functions/dev/v1_X/FunctionsClient.sol @@ -25,7 +25,8 @@ abstract contract FunctionsClient is IFunctionsClient { /// @notice Sends a Chainlink Functions request /// @param data The CBOR encoded bytes data for a Functions request /// @param subscriptionId The subscription ID that will be charged to service the request - /// @param callbackGasLimit the amount of gas that will be available for the fulfillment callback + /// @param callbackGasLimit - The amount of gas that will be available for the fulfillment callback + /// @param donId - An identifier used to determine which route to send the request along /// @return requestId The generated request ID for this request function _sendRequest( bytes memory data, diff --git a/contracts/src/v0.8/functions/dev/v1_X/accessControl/TermsOfServiceAllowList.sol b/contracts/src/v0.8/functions/dev/v1_X/accessControl/TermsOfServiceAllowList.sol index fe4ebe983ef..24bc9f6e22c 100644 --- a/contracts/src/v0.8/functions/dev/v1_X/accessControl/TermsOfServiceAllowList.sol +++ b/contracts/src/v0.8/functions/dev/v1_X/accessControl/TermsOfServiceAllowList.sol @@ -128,11 +128,7 @@ contract TermsOfServiceAllowList is ITermsOfServiceAllowList, IAccessController, uint64 allowedSenderIdxStart, uint64 allowedSenderIdxEnd ) external view override returns (address[] memory allowedSenders) { - if ( - allowedSenderIdxStart > allowedSenderIdxEnd || - allowedSenderIdxEnd >= s_allowedSenders.length() || - s_allowedSenders.length() == 0 - ) { + if (allowedSenderIdxStart > allowedSenderIdxEnd || allowedSenderIdxEnd >= s_allowedSenders.length()) { revert InvalidCalldata(); } diff --git a/contracts/src/v0.8/functions/dev/v1_X/interfaces/IFunctionsBilling.sol b/contracts/src/v0.8/functions/dev/v1_X/interfaces/IFunctionsBilling.sol index 79806f1eb18..ecf15c68f0d 100644 --- a/contracts/src/v0.8/functions/dev/v1_X/interfaces/IFunctionsBilling.sol +++ b/contracts/src/v0.8/functions/dev/v1_X/interfaces/IFunctionsBilling.sol @@ -59,7 +59,7 @@ interface IFunctionsBilling { struct FunctionsBillingConfig { uint32 fulfillmentGasPriceOverEstimationBP; // ══╗ Percentage of gas price overestimation to account for changes in gas price between request and response. Held as basis points (one hundredth of 1 percentage point) - uint32 feedStalenessSeconds; // ║ How long before we consider the feed price to be stale and fallback to fallbackNativePerUnitLink. + uint32 feedStalenessSeconds; // ║ How long before we consider the feed price to be stale and fallback to fallbackNativePerUnitLink. Default of 0 means no fallback. uint32 gasOverheadBeforeCallback; // ║ Represents the average gas execution cost before the fulfillment callback. This amount is always billed for every request. uint32 gasOverheadAfterCallback; // ║ Represents the average gas execution cost after the fulfillment callback. This amount is always billed for every request. uint40 minimumEstimateGasPriceWei; // ║ The lowest amount of wei that will be used as the tx.gasprice when estimating the cost to fulfill the request diff --git a/contracts/src/v0.8/functions/dev/v1_X/ocr/OCR2Base.sol b/contracts/src/v0.8/functions/dev/v1_X/ocr/OCR2Base.sol index cf461bdb217..02ea5cf3721 100644 --- a/contracts/src/v0.8/functions/dev/v1_X/ocr/OCR2Base.sol +++ b/contracts/src/v0.8/functions/dev/v1_X/ocr/OCR2Base.sol @@ -22,12 +22,12 @@ abstract contract OCR2Base is ConfirmedOwner, OCR2Abstract { // to extract config from logs. // Storing these fields used on the hot path in a ConfigInfo variable reduces the - // retrieval of all of them to a single SLOAD. If any further fields are - // added, make sure that storage of the struct still takes at most 32 bytes. + // retrieval of all of them into two SLOADs. If any further fields are + // added, make sure that storage of the struct still takes at most 64 bytes. struct ConfigInfo { bytes32 latestConfigDigest; - uint8 f; // TODO: could be optimized by squeezing into one slot - uint8 n; + uint8 f; // ───╮ + uint8 n; // ───╯ } ConfigInfo internal s_configInfo; @@ -215,7 +215,7 @@ abstract contract OCR2Base is ConfirmedOwner, OCR2Abstract { ); uint256 prefixMask = type(uint256).max << (256 - 16); // 0xFFFF00..00 uint256 prefix = 0x0001 << (256 - 16); // 0x000100..00 - return bytes32((prefix & prefixMask) | (h & ~prefixMask)); + return bytes32(prefix | (h & ~prefixMask)); } /** diff --git a/contracts/src/v0.8/tests/VerifiableLoadBase.sol b/contracts/src/v0.8/tests/VerifiableLoadBase.sol index 1b51ed303ae..86ebf8b8c7c 100644 --- a/contracts/src/v0.8/tests/VerifiableLoadBase.sol +++ b/contracts/src/v0.8/tests/VerifiableLoadBase.sol @@ -2,7 +2,7 @@ pragma solidity ^0.8.16; import "../vendor/openzeppelin-solidity/v4.7.3/contracts/utils/structs/EnumerableSet.sol"; -import "../automation/interfaces/v2_1/IKeeperRegistryMaster.sol"; +import {IKeeperRegistryMaster, IAutomationV21PlusCommon} from "../automation/interfaces/v2_1/IKeeperRegistryMaster.sol"; import {ArbSys} from "../vendor/@arbitrum/nitro-contracts/src/precompiles/ArbSys.sol"; import "../automation/v2_1/AutomationRegistrar2_1.sol"; import {LogTriggerConfig} from "../automation/v2_1/AutomationUtils2_1.sol"; @@ -291,7 +291,7 @@ abstract contract VerifiableLoadBase is ConfirmedOwner { function topUpFund(uint256 upkeepId, uint256 blockNum) public { if (blockNum - lastTopUpBlocks[upkeepId] > upkeepTopUpCheckInterval) { - KeeperRegistryBase2_1.UpkeepInfo memory info = registry.getUpkeep(upkeepId); + IAutomationV21PlusCommon.UpkeepInfoLegacy memory info = registry.getUpkeep(upkeepId); uint96 minBalance = registry.getMinBalanceForUpkeep(upkeepId); if (info.balance < minBalanceThresholdMultiplier * minBalance) { addFunds(upkeepId, addLinkAmount); @@ -463,7 +463,7 @@ abstract contract VerifiableLoadBase is ConfirmedOwner { } } - function getUpkeepInfo(uint256 upkeepId) public view returns (KeeperRegistryBase2_1.UpkeepInfo memory) { + function getUpkeepInfo(uint256 upkeepId) public view returns (IAutomationV21PlusCommon.UpkeepInfoLegacy memory) { return registry.getUpkeep(upkeepId); } diff --git a/contracts/src/v0.8/vrf/dev/BatchVRFCoordinatorV2Plus.sol b/contracts/src/v0.8/vrf/dev/BatchVRFCoordinatorV2Plus.sol index 3e6a5095bc7..ee15a4f1729 100644 --- a/contracts/src/v0.8/vrf/dev/BatchVRFCoordinatorV2Plus.sol +++ b/contracts/src/v0.8/vrf/dev/BatchVRFCoordinatorV2Plus.sol @@ -11,13 +11,13 @@ import {VRFTypes} from "../VRFTypes.sol"; */ contract BatchVRFCoordinatorV2Plus { // solhint-disable-next-line chainlink-solidity/prefix-immutable-variables-with-i - IVRFCoordinatorV2Plus public immutable COORDINATOR; + IVRFCoordinatorV2PlusFulfill public immutable COORDINATOR; event ErrorReturned(uint256 indexed requestId, string reason); event RawErrorReturned(uint256 indexed requestId, bytes lowLevelData); constructor(address coordinatorAddr) { - COORDINATOR = IVRFCoordinatorV2Plus(coordinatorAddr); + COORDINATOR = IVRFCoordinatorV2PlusFulfill(coordinatorAddr); } /** @@ -28,7 +28,7 @@ contract BatchVRFCoordinatorV2Plus { function fulfillRandomWords(VRFTypes.Proof[] memory proofs, VRFTypes.RequestCommitmentV2Plus[] memory rcs) external { // solhint-disable-next-line custom-errors require(proofs.length == rcs.length, "input array arg lengths mismatch"); - for (uint256 i = 0; i < proofs.length; i++) { + for (uint256 i = 0; i < proofs.length; ++i) { try COORDINATOR.fulfillRandomWords(proofs[i], rcs[i], false) returns (uint96 /* payment */) { continue; } catch Error(string memory reason) { @@ -59,7 +59,7 @@ contract BatchVRFCoordinatorV2Plus { } } -interface IVRFCoordinatorV2Plus { +interface IVRFCoordinatorV2PlusFulfill { function fulfillRandomWords( VRFTypes.Proof memory proof, VRFTypes.RequestCommitmentV2Plus memory rc, diff --git a/contracts/src/v0.8/vrf/dev/SubscriptionAPI.sol b/contracts/src/v0.8/vrf/dev/SubscriptionAPI.sol index 8a634f904a8..fe073aa8924 100644 --- a/contracts/src/v0.8/vrf/dev/SubscriptionAPI.sol +++ b/contracts/src/v0.8/vrf/dev/SubscriptionAPI.sol @@ -60,8 +60,14 @@ abstract contract SubscriptionAPI is ConfirmedOwner, IERC677Receiver, IVRFSubscr // consumer is valid without reading all the consumers from storage. address[] consumers; } - // Note a nonce of 0 indicates an the consumer is not assigned to that subscription. - mapping(address => mapping(uint256 => uint64)) /* consumer */ /* subId */ /* nonce */ internal s_consumers; + struct ConsumerConfig { + bool active; + uint64 nonce; + uint64 pendingReqCount; + } + // Note a nonce of 0 indicates the consumer is not assigned to that subscription. + mapping(address => mapping(uint256 => ConsumerConfig)) /* consumerAddress */ /* subId */ /* consumerConfig */ + internal s_consumers; mapping(uint256 => SubscriptionConfig) /* subId */ /* subscriptionConfig */ internal s_subscriptionConfigs; mapping(uint256 => Subscription) /* subId */ /* subscription */ internal s_subscriptions; // subscription nonce used to construct subId. Rises monotonically @@ -165,11 +171,11 @@ abstract contract SubscriptionAPI is ConfirmedOwner, IERC677Receiver, IVRFSubscr * @dev notably can be called even if there are pending requests, outstanding ones may fail onchain */ function ownerCancelSubscription(uint256 subId) external onlyOwner { - address owner = s_subscriptionConfigs[subId].owner; - if (owner == address(0)) { + address subOwner = s_subscriptionConfigs[subId].owner; + if (subOwner == address(0)) { revert InvalidSubscription(); } - _cancelSubscriptionHelper(subId, owner); + _cancelSubscriptionHelper(subId, subOwner); } /** @@ -305,17 +311,17 @@ abstract contract SubscriptionAPI is ConfirmedOwner, IERC677Receiver, IVRFSubscr public view override - returns (uint96 balance, uint96 nativeBalance, uint64 reqCount, address owner, address[] memory consumers) + returns (uint96 balance, uint96 nativeBalance, uint64 reqCount, address subOwner, address[] memory consumers) { - owner = s_subscriptionConfigs[subId].owner; - if (owner == address(0)) { + subOwner = s_subscriptionConfigs[subId].owner; + if (subOwner == address(0)) { revert InvalidSubscription(); } return ( s_subscriptions[subId].balance, s_subscriptions[subId].nativeBalance, s_subscriptions[subId].reqCount, - owner, + subOwner, s_subscriptionConfigs[subId].consumers ); } @@ -400,19 +406,21 @@ abstract contract SubscriptionAPI is ConfirmedOwner, IERC677Receiver, IVRFSubscr * @inheritdoc IVRFSubscriptionV2Plus */ function addConsumer(uint256 subId, address consumer) external override onlySubOwner(subId) nonReentrant { + ConsumerConfig storage consumerConfig = s_consumers[consumer][subId]; + if (consumerConfig.active) { + // Idempotence - do nothing if already added. + // Ensures uniqueness in s_subscriptions[subId].consumers. + return; + } // Already maxed, cannot add any more consumers. address[] storage consumers = s_subscriptionConfigs[subId].consumers; if (consumers.length == MAX_CONSUMERS) { revert TooManyConsumers(); } - mapping(uint256 => uint64) storage nonces = s_consumers[consumer]; - if (nonces[subId] != 0) { - // Idempotence - do nothing if already added. - // Ensures uniqueness in s_subscriptions[subId].consumers. - return; - } - // Initialize the nonce to 1, indicating the consumer is allocated. - nonces[subId] = 1; + // consumerConfig.nonce is 0 if the consumer had never sent a request to this subscription + // otherwise, consumerConfig.nonce is non-zero + // in both cases, use consumerConfig.nonce as is and set active status to true + consumerConfig.active = true; consumers.push(consumer); emit SubscriptionConsumerAdded(subId, consumer); @@ -464,12 +472,12 @@ abstract contract SubscriptionAPI is ConfirmedOwner, IERC677Receiver, IVRFSubscr } function _onlySubOwner(uint256 subId) internal view { - address owner = s_subscriptionConfigs[subId].owner; - if (owner == address(0)) { + address subOwner = s_subscriptionConfigs[subId].owner; + if (subOwner == address(0)) { revert InvalidSubscription(); } - if (msg.sender != owner) { - revert MustBeSubOwner(owner); + if (msg.sender != subOwner) { + revert MustBeSubOwner(subOwner); } } } diff --git a/contracts/src/v0.8/vrf/dev/VRFConsumerBaseV2Plus.sol b/contracts/src/v0.8/vrf/dev/VRFConsumerBaseV2Plus.sol index d993f69e094..5bff4b63221 100644 --- a/contracts/src/v0.8/vrf/dev/VRFConsumerBaseV2Plus.sol +++ b/contracts/src/v0.8/vrf/dev/VRFConsumerBaseV2Plus.sol @@ -111,6 +111,9 @@ abstract contract VRFConsumerBaseV2Plus is IVRFMigratableConsumerV2Plus, Confirm * @param _vrfCoordinator address of VRFCoordinator contract */ constructor(address _vrfCoordinator) ConfirmedOwner(msg.sender) { + if (_vrfCoordinator == address(0)) { + revert ZeroAddress(); + } s_vrfCoordinator = IVRFCoordinatorV2Plus(_vrfCoordinator); } @@ -144,8 +147,13 @@ abstract contract VRFConsumerBaseV2Plus is IVRFMigratableConsumerV2Plus, Confirm /** * @inheritdoc IVRFMigratableConsumerV2Plus */ - function setCoordinator(address _vrfCoordinator) public override onlyOwnerOrCoordinator { + function setCoordinator(address _vrfCoordinator) external override onlyOwnerOrCoordinator { + if (_vrfCoordinator == address(0)) { + revert ZeroAddress(); + } s_vrfCoordinator = IVRFCoordinatorV2Plus(_vrfCoordinator); + + emit CoordinatorSet(_vrfCoordinator); } modifier onlyOwnerOrCoordinator() { diff --git a/contracts/src/v0.8/vrf/dev/VRFCoordinatorV2_5.sol b/contracts/src/v0.8/vrf/dev/VRFCoordinatorV2_5.sol index e03181b7254..6bbcfd18525 100644 --- a/contracts/src/v0.8/vrf/dev/VRFCoordinatorV2_5.sol +++ b/contracts/src/v0.8/vrf/dev/VRFCoordinatorV2_5.sol @@ -3,6 +3,7 @@ pragma solidity ^0.8.4; import {BlockhashStoreInterface} from "../interfaces/BlockhashStoreInterface.sol"; import {VRF} from "../../vrf/VRF.sol"; +import {VRFTypes} from "../VRFTypes.sol"; import {VRFConsumerBaseV2Plus, IVRFMigratableConsumerV2Plus} from "./VRFConsumerBaseV2Plus.sol"; import {ChainSpecificUtil} from "../../ChainSpecificUtil.sol"; import {SubscriptionAPI} from "./SubscriptionAPI.sol"; @@ -24,28 +25,23 @@ contract VRFCoordinatorV2_5 is VRF, SubscriptionAPI, IVRFCoordinatorV2Plus { // 5k is plenty for an EXTCODESIZE call (2600) + warm CALL (100) // and some arithmetic operations. uint256 private constant GAS_FOR_CALL_EXACT_CHECK = 5_000; + // upper bound limit for premium percentages to make sure fee calculations don't overflow + uint8 private constant PREMIUM_PERCENTAGE_MAX = 155; error InvalidRequestConfirmations(uint16 have, uint16 min, uint16 max); error GasLimitTooBig(uint32 have, uint32 want); error NumWordsTooBig(uint32 have, uint32 want); + error MsgDataTooBig(uint256 have, uint32 max); error ProvingKeyAlreadyRegistered(bytes32 keyHash); error NoSuchProvingKey(bytes32 keyHash); error InvalidLinkWeiPrice(int256 linkWei); error LinkDiscountTooHigh(uint32 flatFeeLinkDiscountPPM, uint32 flatFeeNativePPM); - error InsufficientGasForConsumer(uint256 have, uint256 want); + error InvalidPremiumPercentage(uint8 premiumPercentage, uint8 max); error NoCorrespondingRequest(); error IncorrectCommitment(); error BlockhashNotInStore(uint256 blockNum); error PaymentTooLarge(); error InvalidExtraArgsTag(); error GasPriceExceeded(uint256 gasPrice, uint256 maxGas); - struct RequestCommitment { - uint64 blockNum; - uint256 subId; - uint32 callbackGasLimit; - uint32 numWords; - address sender; - bytes extraArgs; - } struct ProvingKey { bool exists; // proving key exists @@ -94,6 +90,8 @@ contract VRFCoordinatorV2_5 is VRF, SubscriptionAPI, IVRFCoordinatorV2Plus { uint8 linkPremiumPercentage ); + event FallbackWeiPerUnitLinkUsed(uint256 requestId, int256 fallbackWeiPerUnitLink); + constructor(address blockhashStore) SubscriptionAPI() { BLOCKHASH_STORE = BlockhashStoreInterface(blockhashStore); } @@ -176,9 +174,15 @@ contract VRFCoordinatorV2_5 is VRF, SubscriptionAPI, IVRFCoordinatorV2Plus { if (fallbackWeiPerUnitLink <= 0) { revert InvalidLinkWeiPrice(fallbackWeiPerUnitLink); } - if (fulfillmentFlatFeeNativePPM > 0 && fulfillmentFlatFeeLinkDiscountPPM >= fulfillmentFlatFeeNativePPM) { + if (fulfillmentFlatFeeLinkDiscountPPM > fulfillmentFlatFeeNativePPM) { revert LinkDiscountTooHigh(fulfillmentFlatFeeLinkDiscountPPM, fulfillmentFlatFeeNativePPM); } + if (nativePremiumPercentage > PREMIUM_PERCENTAGE_MAX) { + revert InvalidPremiumPercentage(nativePremiumPercentage, PREMIUM_PERCENTAGE_MAX); + } + if (linkPremiumPercentage > PREMIUM_PERCENTAGE_MAX) { + revert InvalidPremiumPercentage(linkPremiumPercentage, PREMIUM_PERCENTAGE_MAX); + } s_config = Config({ minimumRequestConfirmations: minimumRequestConfirmations, maxGasLimit: maxGasLimit, @@ -251,10 +255,9 @@ contract VRFCoordinatorV2_5 is VRF, SubscriptionAPI, IVRFCoordinatorV2Plus { } // Its important to ensure that the consumer is in fact who they say they // are, otherwise they could use someone else's subscription balance. - // A nonce of 0 indicates consumer is not allocated to the sub. - mapping(uint256 => uint64) storage nonces = s_consumers[msg.sender]; - uint64 nonce = nonces[subId]; - if (nonce == 0) { + mapping(uint256 => ConsumerConfig) storage consumerConfigs = s_consumers[msg.sender]; + ConsumerConfig memory consumerConfig = consumerConfigs[subId]; + if (!consumerConfig.active) { revert InvalidConsumer(subId, msg.sender); } // Input validation using the config storage word. @@ -281,9 +284,10 @@ contract VRFCoordinatorV2_5 is VRF, SubscriptionAPI, IVRFCoordinatorV2Plus { // Note we do not check whether the keyHash is valid to save gas. // The consequence for users is that they can send requests // for invalid keyHashes which will simply not be fulfilled. - ++nonce; + ++consumerConfig.nonce; + ++consumerConfig.pendingReqCount; uint256 preSeed; - (requestId, preSeed) = _computeRequestId(req.keyHash, msg.sender, subId, nonce); + (requestId, preSeed) = _computeRequestId(req.keyHash, msg.sender, subId, consumerConfig.nonce); bytes memory extraArgsBytes = VRFV2PlusClient._argsToBytes(_fromBytes(req.extraArgs)); s_requestCommitments[requestId] = keccak256( @@ -308,7 +312,7 @@ contract VRFCoordinatorV2_5 is VRF, SubscriptionAPI, IVRFCoordinatorV2Plus { extraArgsBytes, msg.sender ); - nonces[subId] = nonce; + consumerConfigs[subId] = consumerConfig; return requestId; } @@ -364,7 +368,7 @@ contract VRFCoordinatorV2_5 is VRF, SubscriptionAPI, IVRFCoordinatorV2Plus { function _getRandomnessFromProof( Proof memory proof, - RequestCommitment memory rc + VRFTypes.RequestCommitmentV2Plus memory rc ) internal view returns (Output memory) { bytes32 keyHash = hashOfKey(proof.pk); ProvingKey memory key = s_provingKeys[keyHash]; @@ -413,7 +417,7 @@ contract VRFCoordinatorV2_5 is VRF, SubscriptionAPI, IVRFCoordinatorV2Plus { function _deliverRandomness( uint256 requestId, - RequestCommitment memory rc, + VRFTypes.RequestCommitmentV2Plus memory rc, uint256[] memory randomWords ) internal returns (bool success) { VRFConsumerBaseV2Plus v; @@ -440,10 +444,36 @@ contract VRFCoordinatorV2_5 is VRF, SubscriptionAPI, IVRFCoordinatorV2Plus { */ function fulfillRandomWords( Proof memory proof, - RequestCommitment memory rc, + VRFTypes.RequestCommitmentV2Plus memory rc, bool onlyPremium ) external nonReentrant returns (uint96 payment) { uint256 startGas = gasleft(); + // fulfillRandomWords msg.data has 772 bytes and with an additional + // buffer of 32 bytes, we get 804 bytes. + /* Data size split: + * fulfillRandomWords function signature - 4 bytes + * proof - 416 bytes + * pk - 64 bytes + * gamma - 64 bytes + * c - 32 bytes + * s - 32 bytes + * seed - 32 bytes + * uWitness - 32 bytes + * cGammaWitness - 64 bytes + * sHashWitness - 64 bytes + * zInv - 32 bytes + * requestCommitment - 320 bytes + * blockNum - 32 bytes + * subId - 32 bytes + * callbackGasLimit - 32 bytes + * numWords - 32 bytes + * sender - 32 bytes + * extraArgs - 128 bytes + * onlyPremium - 32 bytes + */ + if (msg.data.length > 804) { + revert MsgDataTooBig(msg.data.length, 804); + } Output memory output = _getRandomnessFromProof(proof, rc); uint256 gasPrice = _getValidatedGasPrice(onlyPremium, output.provingKey.maxGas); @@ -463,13 +493,24 @@ contract VRFCoordinatorV2_5 is VRF, SubscriptionAPI, IVRFCoordinatorV2Plus { // Increment the req count for the subscription. ++s_subscriptions[rc.subId].reqCount; + // Decrement the pending req count for the consumer. + --s_consumers[rc.sender][rc.subId].pendingReqCount; bool nativePayment = uint8(rc.extraArgs[rc.extraArgs.length - 1]) == 1; - // We want to charge users exactly for how much gas they use in their callback. - // The gasAfterPaymentCalculation is meant to cover these additional operations where we - // decrement the subscription balance and increment the oracles withdrawable balance. - payment = _calculatePaymentAmount(startGas, gasPrice, nativePayment, onlyPremium); + // stack too deep error + { + // We want to charge users exactly for how much gas they use in their callback with + // an additional premium. If onlyPremium is true, only premium is charged without + // the gas cost. The gasAfterPaymentCalculation is meant to cover these additional + // operations where we decrement the subscription balance and increment the + // withdrawable balance. + bool isFeedStale; + (payment, isFeedStale) = _calculatePaymentAmount(startGas, gasPrice, nativePayment, onlyPremium); + if (isFeedStale) { + emit FallbackWeiPerUnitLinkUsed(output.requestId, s_fallbackWeiPerUnitLink); + } + } _chargePayment(payment, nativePayment, rc.subId); @@ -503,9 +544,9 @@ contract VRFCoordinatorV2_5 is VRF, SubscriptionAPI, IVRFCoordinatorV2Plus { uint256 weiPerUnitGas, bool nativePayment, bool onlyPremium - ) internal view returns (uint96) { + ) internal view returns (uint96, bool) { if (nativePayment) { - return _calculatePaymentAmountNative(startGas, weiPerUnitGas, onlyPremium); + return (_calculatePaymentAmountNative(startGas, weiPerUnitGas, onlyPremium), false); } return _calculatePaymentAmountLink(startGas, weiPerUnitGas, onlyPremium); } @@ -533,9 +574,8 @@ contract VRFCoordinatorV2_5 is VRF, SubscriptionAPI, IVRFCoordinatorV2Plus { uint256 startGas, uint256 weiPerUnitGas, bool onlyPremium - ) internal view returns (uint96) { - int256 weiPerUnitLink; - weiPerUnitLink = _getFeedData(); + ) internal view returns (uint96, bool) { + (int256 weiPerUnitLink, bool isFeedStale) = _getFeedData(); if (weiPerUnitLink <= 0) { revert InvalidLinkWeiPrice(weiPerUnitLink); } @@ -558,18 +598,19 @@ contract VRFCoordinatorV2_5 is VRF, SubscriptionAPI, IVRFCoordinatorV2Plus { if (payment > 1e27) { revert PaymentTooLarge(); // Payment + fee cannot be more than all of the link in existence. } - return uint96(payment); + return (uint96(payment), isFeedStale); } - function _getFeedData() private view returns (int256 weiPerUnitLink) { + function _getFeedData() private view returns (int256 weiPerUnitLink, bool isFeedStale) { uint32 stalenessSeconds = s_config.stalenessSeconds; uint256 timestamp; (, weiPerUnitLink, , timestamp, ) = LINK_NATIVE_FEED.latestRoundData(); // solhint-disable-next-line not-rely-on-time - if (stalenessSeconds > 0 && stalenessSeconds < block.timestamp - timestamp) { + isFeedStale = stalenessSeconds > 0 && stalenessSeconds < block.timestamp - timestamp; + if (isFeedStale) { weiPerUnitLink = s_fallbackWeiPerUnitLink; } - return weiPerUnitLink; + return (weiPerUnitLink, isFeedStale); } /** @@ -581,14 +622,9 @@ contract VRFCoordinatorV2_5 is VRF, SubscriptionAPI, IVRFCoordinatorV2Plus { if (consumersLength == 0) { return false; } - uint256 provingKeyHashesLength = s_provingKeyHashes.length; for (uint256 i = 0; i < consumersLength; ++i) { - address consumer = consumers[i]; - for (uint256 j = 0; j < provingKeyHashesLength; ++j) { - (uint256 reqId, ) = _computeRequestId(s_provingKeyHashes[j], consumer, subId, s_consumers[consumer][subId]); - if (s_requestCommitments[reqId] != 0) { - return true; - } + if (s_consumers[consumers[i]][subId].pendingReqCount > 0) { + return true; } } return false; @@ -601,7 +637,7 @@ contract VRFCoordinatorV2_5 is VRF, SubscriptionAPI, IVRFCoordinatorV2Plus { if (pendingRequestExists(subId)) { revert PendingRequestExists(); } - if (s_consumers[consumer][subId] == 0) { + if (!s_consumers[consumer][subId].active) { revert InvalidConsumer(subId, consumer); } // Note bounded by MAX_CONSUMERS @@ -617,7 +653,7 @@ contract VRFCoordinatorV2_5 is VRF, SubscriptionAPI, IVRFCoordinatorV2Plus { break; } } - delete s_consumers[consumer][subId]; + s_consumers[consumer][subId].active = false; emit SubscriptionConsumerRemoved(subId, consumer); } @@ -699,16 +735,16 @@ contract VRFCoordinatorV2_5 is VRF, SubscriptionAPI, IVRFCoordinatorV2Plus { if (!_isTargetRegistered(newCoordinator)) { revert CoordinatorNotRegistered(newCoordinator); } - (uint96 balance, uint96 nativeBalance, , address owner, address[] memory consumers) = getSubscription(subId); + (uint96 balance, uint96 nativeBalance, , address subOwner, address[] memory consumers) = getSubscription(subId); // solhint-disable-next-line custom-errors - require(owner == msg.sender, "Not subscription owner"); + require(subOwner == msg.sender, "Not subscription owner"); // solhint-disable-next-line custom-errors require(!pendingRequestExists(subId), "Pending request exists"); V1MigrationData memory migrationData = V1MigrationData({ fromVersion: 1, subId: subId, - subOwner: owner, + subOwner: subOwner, consumers: consumers, linkBalance: balance, nativeBalance: nativeBalance diff --git a/contracts/src/v0.8/vrf/dev/VRFV2PlusWrapper.sol b/contracts/src/v0.8/vrf/dev/VRFV2PlusWrapper.sol index a724b70a3d8..785ab4aa827 100644 --- a/contracts/src/v0.8/vrf/dev/VRFV2PlusWrapper.sol +++ b/contracts/src/v0.8/vrf/dev/VRFV2PlusWrapper.sol @@ -20,58 +20,73 @@ import {ChainSpecificUtil} from "../../ChainSpecificUtil.sol"; contract VRFV2PlusWrapper is ConfirmedOwner, TypeAndVersionInterface, VRFConsumerBaseV2Plus, IVRFV2PlusWrapper { event WrapperFulfillmentFailed(uint256 indexed requestId, address indexed consumer); + // upper bound limit for premium percentages to make sure fee calculations don't overflow + uint8 private constant PREMIUM_PERCENTAGE_MAX = 155; + + // 5k is plenty for an EXTCODESIZE call (2600) + warm CALL (100) + // and some arithmetic operations. + uint256 private constant GAS_FOR_CALL_EXACT_CHECK = 5_000; + uint16 private constant EXPECTED_MIN_LENGTH = 36; + + // solhint-disable-next-line chainlink-solidity/prefix-immutable-variables-with-i + uint256 public immutable SUBSCRIPTION_ID; + LinkTokenInterface internal immutable i_link; + error LinkAlreadySet(); + error LinkDiscountTooHigh(uint32 flatFeeLinkDiscountPPM, uint32 flatFeeNativePPM); + error InvalidPremiumPercentage(uint8 premiumPercentage, uint8 max); error FailedToTransferLink(); error IncorrectExtraArgsLength(uint16 expectedMinimumLength, uint16 actualLength); error NativePaymentInOnTokenTransfer(); error LINKPaymentInRequestRandomWordsInNative(); /* Storage Slot 1: BEGIN */ - // s_keyHash is the key hash to use when requesting randomness. Fees are paid based on current gas - // fees, so this should be set to the highest gas lane on the network. - bytes32 internal s_keyHash; + // 20 bytes used by VRFConsumerBaseV2Plus.s_vrfCoordinator + + // s_configured tracks whether this contract has been configured. If not configured, randomness + // requests cannot be made. + bool public s_configured; + + // s_disabled disables the contract when true. When disabled, new VRF requests cannot be made + // but existing ones can still be fulfilled. + bool public s_disabled; + + // s_maxNumWords is the max number of words that can be requested in a single wrapped VRF request. + uint8 internal s_maxNumWords; + + // 9 bytes left /* Storage Slot 1: END */ /* Storage Slot 2: BEGIN */ - // solhint-disable-next-line chainlink-solidity/prefix-immutable-variables-with-i - uint256 public immutable SUBSCRIPTION_ID; + // s_keyHash is the key hash to use when requesting randomness. Fees are paid based on current gas + // fees, so this should be set to the highest gas lane on the network. + bytes32 internal s_keyHash; /* Storage Slot 2: END */ /* Storage Slot 3: BEGIN */ - // 5k is plenty for an EXTCODESIZE call (2600) + warm CALL (100) - // and some arithmetic operations. - uint256 private constant GAS_FOR_CALL_EXACT_CHECK = 5_000; - /* Storage Slot 3: END */ - - /* Storage Slot 4: BEGIN */ // lastRequestId is the request ID of the most recent VRF V2 request made by this wrapper. This // should only be relied on within the same transaction the request was made. uint256 public override lastRequestId; - /* Storage Slot 4: END */ + /* Storage Slot 3: END */ - /* Storage Slot 5: BEGIN */ + /* Storage Slot 4: BEGIN */ // s_fallbackWeiPerUnitLink is the backup LINK exchange rate used when the LINK/NATIVE feed is // stale. int256 private s_fallbackWeiPerUnitLink; - /* Storage Slot 5: END */ + /* Storage Slot 4: END */ - /* Storage Slot 6: BEGIN */ + /* Storage Slot 5: BEGIN */ // s_stalenessSeconds is the number of seconds before we consider the feed price to be stale and // fallback to fallbackWeiPerUnitLink. uint32 private s_stalenessSeconds; - // s_fulfillmentFlatFeeLinkPPM is the flat fee in millionths of LINK that VRFCoordinatorV2 - // charges. - uint32 private s_fulfillmentFlatFeeLinkPPM; - - // s_fulfillmentFlatFeeLinkPPM is the flat fee in millionths of LINK that VRFCoordinatorV2 - // charges. - uint32 private s_fulfillmentFlatFeeNativePPM; + AggregatorV3Interface public s_linkNativeFeed; - LinkTokenInterface public s_link; - /* Storage Slot 6: END */ + /// @dev padding to make sure that the next variable is at a new storage slot + uint64 private s_padding; + /* Storage Slot 5: END */ - /* Storage Slot 7: BEGIN */ + /* Storage Slot 6: BEGIN */ // s_wrapperGasOverhead reflects the gas overhead of the wrapper's fulfillRandomWords // function. The cost for this gas is passed to the user. uint32 private s_wrapperGasOverhead; @@ -92,27 +107,24 @@ contract VRFV2PlusWrapper is ConfirmedOwner, TypeAndVersionInterface, VRFConsume // payment calculation in the coordinator. uint32 private s_coordinatorGasOverhead; - AggregatorV3Interface public s_linkNativeFeed; - /* Storage Slot 7: END */ - - /* Storage Slot 8: BEGIN */ - // s_configured tracks whether this contract has been configured. If not configured, randomness - // requests cannot be made. - bool public s_configured; + // s_fulfillmentFlatFeeLinkPPM is the flat fee in millionths of native that VRFCoordinatorV2 + // charges for native payment. + uint32 private s_fulfillmentFlatFeeNativePPM; - // s_disabled disables the contract when true. When disabled, new VRF requests cannot be made - // but existing ones can still be fulfilled. - bool public s_disabled; + // s_fulfillmentFlatFeeLinkDiscountPPM is the flat fee discount in millionths of native that VRFCoordinatorV2 + // charges for link payment. + uint32 private s_fulfillmentFlatFeeLinkDiscountPPM; - // s_wrapperPremiumPercentage is the premium ratio in percentage. For example, a value of 0 + // s_wrapperNativePremiumPercentage is the premium ratio in percentage for native payment. For example, a value of 0 // indicates no premium. A value of 15 indicates a 15 percent premium. - uint8 private s_wrapperPremiumPercentage; + uint8 private s_wrapperNativePremiumPercentage; - // s_maxNumWords is the max number of words that can be requested in a single wrapped VRF request. - uint8 internal s_maxNumWords; + // s_wrapperLinkPremiumPercentage is the premium ratio in percentage for link payment. For example, a value of 0 + // indicates no premium. A value of 15 indicates a 15 percent premium. + uint8 private s_wrapperLinkPremiumPercentage; - uint16 private constant EXPECTED_MIN_LENGTH = 36; - /* Storage Slot 8: END */ + // 10 bytes left + /* Storage Slot 6: END */ struct Callback { address callbackAddress; @@ -123,15 +135,16 @@ contract VRFV2PlusWrapper is ConfirmedOwner, TypeAndVersionInterface, VRFConsume // GasPrice is unlikely to be more than 14 ETH on most chains uint64 requestGasPrice; } - /* Storage Slot 9: BEGIN */ + /* Storage Slot 7: BEGIN */ mapping(uint256 => Callback) /* requestID */ /* callback */ public s_callbacks; - - /* Storage Slot 9: END */ + /* Storage Slot 7: END */ constructor(address _link, address _linkNativeFeed, address _coordinator) VRFConsumerBaseV2Plus(_coordinator) { - if (_link != address(0)) { - s_link = LinkTokenInterface(_link); + if (_link == address(0)) { + revert ZeroAddress(); } + i_link = LinkTokenInterface(_link); + if (_linkNativeFeed != address(0)) { s_linkNativeFeed = AggregatorV3Interface(_linkNativeFeed); } @@ -143,23 +156,13 @@ contract VRFV2PlusWrapper is ConfirmedOwner, TypeAndVersionInterface, VRFConsume } /** - * @notice set the link token to be used by this wrapper - * @param link address of the link token - */ - function setLINK(address link) external onlyOwner { - // Disallow re-setting link token because the logic wouldn't really make sense - if (address(s_link) != address(0)) { - revert LinkAlreadySet(); - } - s_link = LinkTokenInterface(link); - } - - /** - * @notice set the link native feed to be used by this wrapper + * @notice set link native feed to be used by this wrapper * @param linkNativeFeed address of the link native feed */ function setLinkNativeFeed(address linkNativeFeed) external onlyOwner { s_linkNativeFeed = AggregatorV3Interface(linkNativeFeed); + + emit LinkNativeFeedSet(linkNativeFeed); } /** @@ -168,6 +171,8 @@ contract VRFV2PlusWrapper is ConfirmedOwner, TypeAndVersionInterface, VRFConsume */ function setFulfillmentTxSize(uint32 size) external onlyOwner { s_fulfillmentTxSizeBytes = size; + + emit FulfillmentTxSizeSet(size); } /** @@ -182,7 +187,9 @@ contract VRFV2PlusWrapper is ConfirmedOwner, TypeAndVersionInterface, VRFConsume * @param _coordinatorGasOverhead reflects the gas overhead of the coordinator's * fulfillRandomWords function. * - * @param _wrapperPremiumPercentage is the premium ratio in percentage for wrapper requests. + * @param _wrapperNativePremiumPercentage is the premium ratio in percentage for wrapper requests paid in native. + * + * @param _wrapperLinkPremiumPercentage is the premium ratio in percentage for wrapper requests paid in link. * * @param _keyHash to use for requesting randomness. * @param _maxNumWords is the max number of words that can be requested in a single wrapped VRF request @@ -192,26 +199,38 @@ contract VRFV2PlusWrapper is ConfirmedOwner, TypeAndVersionInterface, VRFConsume * @param _fallbackWeiPerUnitLink is the backup LINK exchange rate used when the LINK/NATIVE feed * is stale. * - * @param _fulfillmentFlatFeeLinkPPM is the flat fee in millionths of LINK that VRFCoordinatorV2Plus - * charges. - * * @param _fulfillmentFlatFeeNativePPM is the flat fee in millionths of native that VRFCoordinatorV2Plus - * charges. + * charges for native payment. + * + * @param _fulfillmentFlatFeeLinkDiscountPPM is the flat fee discount in millionths of native that VRFCoordinatorV2Plus + * charges for link payment. */ function setConfig( uint32 _wrapperGasOverhead, uint32 _coordinatorGasOverhead, - uint8 _wrapperPremiumPercentage, + uint8 _wrapperNativePremiumPercentage, + uint8 _wrapperLinkPremiumPercentage, bytes32 _keyHash, uint8 _maxNumWords, uint32 _stalenessSeconds, int256 _fallbackWeiPerUnitLink, - uint32 _fulfillmentFlatFeeLinkPPM, - uint32 _fulfillmentFlatFeeNativePPM + uint32 _fulfillmentFlatFeeNativePPM, + uint32 _fulfillmentFlatFeeLinkDiscountPPM ) external onlyOwner { + if (_fulfillmentFlatFeeLinkDiscountPPM > _fulfillmentFlatFeeNativePPM) { + revert LinkDiscountTooHigh(_fulfillmentFlatFeeLinkDiscountPPM, _fulfillmentFlatFeeNativePPM); + } + if (_wrapperNativePremiumPercentage > PREMIUM_PERCENTAGE_MAX) { + revert InvalidPremiumPercentage(_wrapperNativePremiumPercentage, PREMIUM_PERCENTAGE_MAX); + } + if (_wrapperLinkPremiumPercentage > PREMIUM_PERCENTAGE_MAX) { + revert InvalidPremiumPercentage(_wrapperLinkPremiumPercentage, PREMIUM_PERCENTAGE_MAX); + } + s_wrapperGasOverhead = _wrapperGasOverhead; s_coordinatorGasOverhead = _coordinatorGasOverhead; - s_wrapperPremiumPercentage = _wrapperPremiumPercentage; + s_wrapperNativePremiumPercentage = _wrapperNativePremiumPercentage; + s_wrapperLinkPremiumPercentage = _wrapperLinkPremiumPercentage; s_keyHash = _keyHash; s_maxNumWords = _maxNumWords; s_configured = true; @@ -219,8 +238,21 @@ contract VRFV2PlusWrapper is ConfirmedOwner, TypeAndVersionInterface, VRFConsume // Get other configuration from coordinator s_stalenessSeconds = _stalenessSeconds; s_fallbackWeiPerUnitLink = _fallbackWeiPerUnitLink; - s_fulfillmentFlatFeeLinkPPM = _fulfillmentFlatFeeLinkPPM; s_fulfillmentFlatFeeNativePPM = _fulfillmentFlatFeeNativePPM; + s_fulfillmentFlatFeeLinkDiscountPPM = _fulfillmentFlatFeeLinkDiscountPPM; + + emit ConfigSet( + _wrapperGasOverhead, + _coordinatorGasOverhead, + _wrapperNativePremiumPercentage, + _wrapperLinkPremiumPercentage, + _keyHash, + _maxNumWords, + _stalenessSeconds, + _fallbackWeiPerUnitLink, + _fulfillmentFlatFeeNativePPM, + s_fulfillmentFlatFeeLinkDiscountPPM + ); } /** @@ -232,11 +264,11 @@ contract VRFV2PlusWrapper is ConfirmedOwner, TypeAndVersionInterface, VRFConsume * @return stalenessSeconds is the number of seconds before we consider the feed price to be stale * and fallback to fallbackWeiPerUnitLink. * - * @return fulfillmentFlatFeeLinkPPM is the flat fee in millionths of LINK that VRFCoordinatorV2Plus - * charges. - * * @return fulfillmentFlatFeeNativePPM is the flat fee in millionths of native that VRFCoordinatorV2Plus - * charges. + * charges for native payment. + * + * @return fulfillmentFlatFeeLinkDiscountPPM is the flat fee discount in millionths of native that VRFCoordinatorV2Plus + * charges for link payment. * * @return wrapperGasOverhead reflects the gas overhead of the wrapper's fulfillRandomWords * function. The cost for this gas is passed to the user. @@ -244,7 +276,10 @@ contract VRFV2PlusWrapper is ConfirmedOwner, TypeAndVersionInterface, VRFConsume * @return coordinatorGasOverhead reflects the gas overhead of the coordinator's * fulfillRandomWords function. * - * @return wrapperPremiumPercentage is the premium ratio in percentage. For example, a value of 0 + * @return wrapperNativePremiumPercentage is the premium ratio in percentage for native payment. For example, a value of 0 + * indicates no premium. A value of 15 indicates a 15 percent premium. + * + * @return wrapperLinkPremiumPercentage is the premium ratio in percentage for link payment. For example, a value of 0 * indicates no premium. A value of 15 indicates a 15 percent premium. * * @return keyHash is the key hash to use when requesting randomness. Fees are paid based on @@ -259,11 +294,12 @@ contract VRFV2PlusWrapper is ConfirmedOwner, TypeAndVersionInterface, VRFConsume returns ( int256 fallbackWeiPerUnitLink, uint32 stalenessSeconds, - uint32 fulfillmentFlatFeeLinkPPM, uint32 fulfillmentFlatFeeNativePPM, + uint32 fulfillmentFlatFeeLinkDiscountPPM, uint32 wrapperGasOverhead, uint32 coordinatorGasOverhead, - uint8 wrapperPremiumPercentage, + uint8 wrapperNativePremiumPercentage, + uint8 wrapperLinkPremiumPercentage, bytes32 keyHash, uint8 maxNumWords ) @@ -271,11 +307,12 @@ contract VRFV2PlusWrapper is ConfirmedOwner, TypeAndVersionInterface, VRFConsume return ( s_fallbackWeiPerUnitLink, s_stalenessSeconds, - s_fulfillmentFlatFeeLinkPPM, s_fulfillmentFlatFeeNativePPM, + s_fulfillmentFlatFeeLinkDiscountPPM, s_wrapperGasOverhead, s_coordinatorGasOverhead, - s_wrapperPremiumPercentage, + s_wrapperNativePremiumPercentage, + s_wrapperLinkPremiumPercentage, s_keyHash, s_maxNumWords ); @@ -293,7 +330,7 @@ contract VRFV2PlusWrapper is ConfirmedOwner, TypeAndVersionInterface, VRFConsume function calculateRequestPrice( uint32 _callbackGasLimit ) external view override onlyConfiguredNotDisabled returns (uint256) { - int256 weiPerUnitLink = _getFeedData(); + (int256 weiPerUnitLink, ) = _getFeedData(); return _calculateRequestPrice(_callbackGasLimit, tx.gasprice, weiPerUnitLink); } @@ -316,7 +353,7 @@ contract VRFV2PlusWrapper is ConfirmedOwner, TypeAndVersionInterface, VRFConsume uint32 _callbackGasLimit, uint256 _requestGasPriceWei ) external view override onlyConfiguredNotDisabled returns (uint256) { - int256 weiPerUnitLink = _getFeedData(); + (int256 weiPerUnitLink, ) = _getFeedData(); return _calculateRequestPrice(_callbackGasLimit, _requestGasPriceWei, weiPerUnitLink); } @@ -329,20 +366,21 @@ contract VRFV2PlusWrapper is ConfirmedOwner, TypeAndVersionInterface, VRFConsume function _calculateRequestPriceNative(uint256 _gas, uint256 _requestGasPrice) internal view returns (uint256) { // costWei is the base fee denominated in wei (native) - // costWei takes into account the L1 posting costs of the VRF fulfillment - // transaction, if we are on an L2. - uint256 costWei = (_requestGasPrice * - (_gas + s_wrapperGasOverhead + s_coordinatorGasOverhead) + - ChainSpecificUtil._getL1CalldataGasCost(s_fulfillmentTxSizeBytes)); - // ((wei/gas * (gas)) + l1wei) - // baseFee is the base fee denominated in wei - uint256 baseFee = costWei; - // feeWithPremium is the fee after the percentage premium is applied - uint256 feeWithPremium = (baseFee * (s_wrapperPremiumPercentage + 100)) / 100; - // feeWithFlatFee is the fee after the flat fee is applied on top of the premium - uint256 feeWithFlatFee = feeWithPremium + (1e12 * uint256(s_fulfillmentFlatFeeNativePPM)); - - return feeWithFlatFee; + // (wei/gas) * gas + uint256 wrapperCostWei = _requestGasPrice * s_wrapperGasOverhead; + + // 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 + s_coordinatorGasOverhead) + + ChainSpecificUtil._getL1CalldataGasCost(s_fulfillmentTxSizeBytes); + + // coordinatorCostWithPremiumAndFlatFeeWei is the coordinator cost with the percentage premium and flat fee applied + // coordinator cost * premium multiplier + flat fee + uint256 coordinatorCostWithPremiumAndFlatFeeWei = ((coordinatorCostWei * (s_wrapperNativePremiumPercentage + 100)) / + 100) + (1e12 * uint256(s_fulfillmentFlatFeeNativePPM)); + + return wrapperCostWei + coordinatorCostWithPremiumAndFlatFeeWei; } function _calculateRequestPrice( @@ -351,20 +389,23 @@ contract VRFV2PlusWrapper is ConfirmedOwner, TypeAndVersionInterface, VRFConsume int256 _weiPerUnitLink ) internal view returns (uint256) { // costWei is the base fee denominated in wei (native) - // costWei takes into account the L1 posting costs of the VRF fulfillment - // transaction, if we are on an L2. - uint256 costWei = (_requestGasPrice * - (_gas + s_wrapperGasOverhead + s_coordinatorGasOverhead) + - ChainSpecificUtil._getL1CalldataGasCost(s_fulfillmentTxSizeBytes)); - // (1e18 juels/link) * ((wei/gas * (gas)) + l1wei) / (wei/link) == 1e18 juels * wei/link / (wei/link) == 1e18 juels * wei/link * link/wei == juels - // baseFee is the base fee denominated in juels (link) - uint256 baseFee = (1e18 * costWei) / uint256(_weiPerUnitLink); - // feeWithPremium is the fee after the percentage premium is applied - uint256 feeWithPremium = (baseFee * (s_wrapperPremiumPercentage + 100)) / 100; - // feeWithFlatFee is the fee after the flat fee is applied on top of the premium - uint256 feeWithFlatFee = feeWithPremium + (1e12 * uint256(s_fulfillmentFlatFeeLinkPPM)); - - return feeWithFlatFee; + // (wei/gas) * gas + uint256 wrapperCostWei = _requestGasPrice * s_wrapperGasOverhead; + + // 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 + s_coordinatorGasOverhead) + + ChainSpecificUtil._getL1CalldataGasCost(s_fulfillmentTxSizeBytes); + + // coordinatorCostWithPremiumAndFlatFeeWei is the coordinator cost with the percentage premium and flat fee applied + // coordinator cost * premium multiplier + flat fee + uint256 coordinatorCostWithPremiumAndFlatFeeWei = ((coordinatorCostWei * (s_wrapperLinkPremiumPercentage + 100)) / + 100) + (1e12 * uint256(s_fulfillmentFlatFeeNativePPM - s_fulfillmentFlatFeeLinkDiscountPPM)); + + // requestPrice is denominated in juels (link) + // (1e18 juels/link) * wei / (wei/link) = juels + return (1e18 * (wrapperCostWei + coordinatorCostWithPremiumAndFlatFeeWei)) / uint256(_weiPerUnitLink); } /** @@ -382,7 +423,7 @@ contract VRFV2PlusWrapper is ConfirmedOwner, TypeAndVersionInterface, VRFConsume */ function onTokenTransfer(address _sender, uint256 _amount, bytes calldata _data) external onlyConfiguredNotDisabled { // solhint-disable-next-line custom-errors - require(msg.sender == address(s_link), "only callable from LINK"); + require(msg.sender == address(i_link), "only callable from LINK"); (uint32 callbackGasLimit, uint16 requestConfirmations, uint32 numWords, bytes memory extraArgs) = abi.decode( _data, @@ -390,7 +431,7 @@ contract VRFV2PlusWrapper is ConfirmedOwner, TypeAndVersionInterface, VRFConsume ); checkPaymentMode(extraArgs, true); uint32 eip150Overhead = _getEIP150Overhead(callbackGasLimit); - int256 weiPerUnitLink = _getFeedData(); + (int256 weiPerUnitLink, bool isFeedStale) = _getFeedData(); uint256 price = _calculateRequestPrice(callbackGasLimit, tx.gasprice, weiPerUnitLink); // solhint-disable-next-line custom-errors require(_amount >= price, "fee too low"); @@ -411,6 +452,10 @@ contract VRFV2PlusWrapper is ConfirmedOwner, TypeAndVersionInterface, VRFConsume requestGasPrice: uint64(tx.gasprice) }); lastRequestId = requestId; + + if (isFeedStale) { + emit FallbackWeiPerUnitLinkUsed(requestId, s_fallbackWeiPerUnitLink); + } } function checkPaymentMode(bytes memory extraArgs, bool isLinkMode) public pure { @@ -442,7 +487,7 @@ contract VRFV2PlusWrapper is ConfirmedOwner, TypeAndVersionInterface, VRFConsume uint16 _requestConfirmations, uint32 _numWords, bytes calldata extraArgs - ) external payable override returns (uint256 requestId) { + ) external payable override onlyConfiguredNotDisabled returns (uint256 requestId) { checkPaymentMode(extraArgs, false); uint32 eip150Overhead = _getEIP150Overhead(_callbackGasLimit); @@ -473,26 +518,28 @@ contract VRFV2PlusWrapper is ConfirmedOwner, TypeAndVersionInterface, VRFConsume * @notice withdraw is used by the VRFV2Wrapper's owner to withdraw LINK revenue. * * @param _recipient is the address that should receive the LINK funds. - * - * @param _amount is the amount of LINK in Juels that should be withdrawn. */ - function withdraw(address _recipient, uint256 _amount) external onlyOwner { - if (!s_link.transfer(_recipient, _amount)) { + function withdraw(address _recipient) external onlyOwner { + uint256 amount = i_link.balanceOf(address(this)); + if (!i_link.transfer(_recipient, amount)) { revert FailedToTransferLink(); } + + emit Withdrawn(_recipient, amount); } /** * @notice withdraw is used by the VRFV2Wrapper's owner to withdraw native revenue. * * @param _recipient is the address that should receive the native funds. - * - * @param _amount is the amount of native in Wei that should be withdrawn. */ - function withdrawNative(address _recipient, uint256 _amount) external onlyOwner { - (bool success, ) = payable(_recipient).call{value: _amount}(""); + function withdrawNative(address _recipient) external onlyOwner { + uint256 amount = address(this).balance; + (bool success, ) = payable(_recipient).call{value: amount}(""); // solhint-disable-next-line custom-errors require(success, "failed to withdraw native"); + + emit NativeWithdrawn(_recipient, amount); } /** @@ -500,6 +547,8 @@ contract VRFV2PlusWrapper is ConfirmedOwner, TypeAndVersionInterface, VRFConsume */ function enable() external onlyOwner { s_disabled = false; + + emit Enabled(); } /** @@ -508,36 +557,44 @@ contract VRFV2PlusWrapper is ConfirmedOwner, TypeAndVersionInterface, VRFConsume */ function disable() external onlyOwner { s_disabled = true; + + emit Disabled(); } // solhint-disable-next-line chainlink-solidity/prefix-internal-functions-with-underscore function fulfillRandomWords(uint256 _requestId, uint256[] memory _randomWords) internal override { Callback memory callback = s_callbacks[_requestId]; delete s_callbacks[_requestId]; + + address callbackAddress = callback.callbackAddress; // solhint-disable-next-line custom-errors - require(callback.callbackAddress != address(0), "request not found"); // This should never happen + require(callbackAddress != address(0), "request not found"); // This should never happen VRFV2PlusWrapperConsumerBase c; bytes memory resp = abi.encodeWithSelector(c.rawFulfillRandomWords.selector, _requestId, _randomWords); - bool success = _callWithExactGas(callback.callbackGasLimit, callback.callbackAddress, resp); + bool success = _callWithExactGas(callback.callbackGasLimit, callbackAddress, resp); if (!success) { - emit WrapperFulfillmentFailed(_requestId, callback.callbackAddress); + emit WrapperFulfillmentFailed(_requestId, callbackAddress); } } - function _getFeedData() private view returns (int256) { - bool staleFallback = s_stalenessSeconds > 0; + function link() external view override returns (address) { + return address(i_link); + } + + function _getFeedData() private view returns (int256 weiPerUnitLink, bool isFeedStale) { + uint32 stalenessSeconds = s_stalenessSeconds; uint256 timestamp; - int256 weiPerUnitLink; (, weiPerUnitLink, , timestamp, ) = s_linkNativeFeed.latestRoundData(); // solhint-disable-next-line not-rely-on-time - if (staleFallback && s_stalenessSeconds < block.timestamp - timestamp) { + isFeedStale = stalenessSeconds > 0 && stalenessSeconds < block.timestamp - timestamp; + if (isFeedStale) { weiPerUnitLink = s_fallbackWeiPerUnitLink; } // solhint-disable-next-line custom-errors require(weiPerUnitLink >= 0, "Invalid LINK wei price"); - return weiPerUnitLink; + return (weiPerUnitLink, isFeedStale); } /** diff --git a/contracts/src/v0.8/vrf/dev/VRFV2PlusWrapperConsumerBase.sol b/contracts/src/v0.8/vrf/dev/VRFV2PlusWrapperConsumerBase.sol index 162a658f0ed..07a3292facc 100644 --- a/contracts/src/v0.8/vrf/dev/VRFV2PlusWrapperConsumerBase.sol +++ b/contracts/src/v0.8/vrf/dev/VRFV2PlusWrapperConsumerBase.sol @@ -29,34 +29,19 @@ import {IVRFV2PlusWrapper} from "./interfaces/IVRFV2PlusWrapper.sol"; * @dev fulfillment with the randomness result. */ abstract contract VRFV2PlusWrapperConsumerBase { - error LINKAlreadySet(); error OnlyVRFWrapperCanFulfill(address have, address want); - LinkTokenInterface internal s_linkToken; + LinkTokenInterface internal immutable i_linkToken; IVRFV2PlusWrapper public immutable i_vrfV2PlusWrapper; /** - * @param _link is the address of LinkToken * @param _vrfV2PlusWrapper is the address of the VRFV2Wrapper contract */ - constructor(address _link, address _vrfV2PlusWrapper) { - if (_link != address(0)) { - s_linkToken = LinkTokenInterface(_link); - } - - i_vrfV2PlusWrapper = IVRFV2PlusWrapper(_vrfV2PlusWrapper); - } - - /** - * @notice setLinkToken changes the LINK token address. - * @param _link is the address of the new LINK token contract - */ - function setLinkToken(address _link) external { - if (address(s_linkToken) != address(0)) { - revert LINKAlreadySet(); - } + constructor(address _vrfV2PlusWrapper) { + IVRFV2PlusWrapper vrfV2PlusWrapper = IVRFV2PlusWrapper(_vrfV2PlusWrapper); - s_linkToken = LinkTokenInterface(_link); + i_linkToken = LinkTokenInterface(vrfV2PlusWrapper.link()); + i_vrfV2PlusWrapper = vrfV2PlusWrapper; } /** @@ -79,7 +64,7 @@ abstract contract VRFV2PlusWrapperConsumerBase { bytes memory extraArgs ) internal returns (uint256 requestId, uint256 reqPrice) { reqPrice = i_vrfV2PlusWrapper.calculateRequestPrice(_callbackGasLimit); - s_linkToken.transferAndCall( + i_linkToken.transferAndCall( address(i_vrfV2PlusWrapper), reqPrice, abi.encode(_callbackGasLimit, _requestConfirmations, _numWords, extraArgs) @@ -131,6 +116,6 @@ abstract contract VRFV2PlusWrapperConsumerBase { /// @notice getLinkToken returns the link token contract function getLinkToken() public view returns (LinkTokenInterface) { - return s_linkToken; + return i_linkToken; } } diff --git a/contracts/src/v0.8/vrf/dev/interfaces/IVRFCoordinatorV2Plus.sol b/contracts/src/v0.8/vrf/dev/interfaces/IVRFCoordinatorV2Plus.sol index 846da0b1edc..b0d5a801694 100644 --- a/contracts/src/v0.8/vrf/dev/interfaces/IVRFCoordinatorV2Plus.sol +++ b/contracts/src/v0.8/vrf/dev/interfaces/IVRFCoordinatorV2Plus.sol @@ -9,7 +9,7 @@ import {IVRFSubscriptionV2Plus} from "./IVRFSubscriptionV2Plus.sol"; interface IVRFCoordinatorV2Plus is IVRFSubscriptionV2Plus { /** * @notice Request a set of random words. - * @param req - a struct containing following fiels for randomness request: + * @param req - a struct containing following fields for randomness request: * keyHash - Corresponds to a particular oracle job which uses * that key for generating the VRF proof. Different keyHash's have different gas price * ceilings, so you can select a specific one to bound your maximum per request cost. diff --git a/contracts/src/v0.8/vrf/dev/interfaces/IVRFMigratableConsumerV2Plus.sol b/contracts/src/v0.8/vrf/dev/interfaces/IVRFMigratableConsumerV2Plus.sol index ed61fb6af01..67d12b886e1 100644 --- a/contracts/src/v0.8/vrf/dev/interfaces/IVRFMigratableConsumerV2Plus.sol +++ b/contracts/src/v0.8/vrf/dev/interfaces/IVRFMigratableConsumerV2Plus.sol @@ -5,7 +5,9 @@ pragma solidity ^0.8.0; /// @notice method required to be implemented by all V2Plus consumers. /// @dev This interface is designed to be used in VRFConsumerBaseV2Plus. interface IVRFMigratableConsumerV2Plus { + event CoordinatorSet(address vrfCoordinator); + /// @notice Sets the VRF Coordinator address - /// @notice This method is should only be callable by the coordinator or contract owner + /// @notice This method should only be callable by the coordinator or contract owner function setCoordinator(address vrfCoordinator) external; } diff --git a/contracts/src/v0.8/vrf/dev/interfaces/IVRFSubscriptionV2Plus.sol b/contracts/src/v0.8/vrf/dev/interfaces/IVRFSubscriptionV2Plus.sol index 49c131988a6..b178ffb98b0 100644 --- a/contracts/src/v0.8/vrf/dev/interfaces/IVRFSubscriptionV2Plus.sol +++ b/contracts/src/v0.8/vrf/dev/interfaces/IVRFSubscriptionV2Plus.sol @@ -26,7 +26,7 @@ interface IVRFSubscriptionV2Plus { function cancelSubscription(uint256 subId, address to) external; /** - * @notice Request subscription owner transfer. + * @notice Accept subscription owner transfer. * @param subId - ID of the subscription * @dev will revert if original owner of subId has * not requested that msg.sender become the new owner. @@ -92,7 +92,7 @@ interface IVRFSubscriptionV2Plus { /** * @notice Fund a subscription with native. * @param subId - ID of the subscription - * @notice This method expects msg.value to be greater than 0. + * @notice This method expects msg.value to be greater than or equal to 0. */ function fundSubscriptionWithNative(uint256 subId) external payable; } diff --git a/contracts/src/v0.8/vrf/dev/interfaces/IVRFV2PlusWrapper.sol b/contracts/src/v0.8/vrf/dev/interfaces/IVRFV2PlusWrapper.sol index aa3de0b6770..c1ee4921459 100644 --- a/contracts/src/v0.8/vrf/dev/interfaces/IVRFV2PlusWrapper.sol +++ b/contracts/src/v0.8/vrf/dev/interfaces/IVRFV2PlusWrapper.sol @@ -2,6 +2,26 @@ pragma solidity ^0.8.0; interface IVRFV2PlusWrapper { + event LinkNativeFeedSet(address linkNativeFeed); + event FulfillmentTxSizeSet(uint32 size); + event ConfigSet( + uint32 wrapperGasOverhead, + uint32 coordinatorGasOverhead, + uint8 wrapperNativePremiumPercentage, + uint8 wrapperLinkPremiumPercentage, + bytes32 keyHash, + uint8 maxNumWords, + uint32 stalenessSeconds, + int256 fallbackWeiPerUnitLink, + uint32 fulfillmentFlatFeeNativePPM, + uint32 fulfillmentFlatFeeLinkDiscountPPM + ); + event FallbackWeiPerUnitLinkUsed(uint256 requestId, int256 fallbackWeiPerUnitLink); + event Withdrawn(address indexed to, uint256 amount); + event NativeWithdrawn(address indexed to, uint256 amount); + event Enabled(); + event Disabled(); + /** * @return the request ID of the most recent VRF V2 request made by this wrapper. This should only * be relied option within the same transaction that the request was made. @@ -68,4 +88,6 @@ interface IVRFV2PlusWrapper { uint32 _numWords, bytes memory extraArgs ) external payable returns (uint256 requestId); + + function link() external view returns (address); } diff --git a/contracts/src/v0.8/vrf/dev/testhelpers/ExposedVRFCoordinatorV2_5.sol b/contracts/src/v0.8/vrf/dev/testhelpers/ExposedVRFCoordinatorV2_5.sol index b3ece7126ef..3f4e799fb6d 100644 --- a/contracts/src/v0.8/vrf/dev/testhelpers/ExposedVRFCoordinatorV2_5.sol +++ b/contracts/src/v0.8/vrf/dev/testhelpers/ExposedVRFCoordinatorV2_5.sol @@ -2,6 +2,7 @@ pragma solidity ^0.8.4; import {VRFCoordinatorV2_5} from "../VRFCoordinatorV2_5.sol"; +import {VRFTypes} from "../../VRFTypes.sol"; import {EnumerableSet} from "../../../vendor/openzeppelin-solidity/v4.7.3/contracts/utils/structs/EnumerableSet.sol"; // solhint-disable-next-line contract-name-camelcase @@ -25,7 +26,7 @@ contract ExposedVRFCoordinatorV2_5 is VRFCoordinatorV2_5 { function getRandomnessFromProofExternal( Proof calldata proof, - RequestCommitment calldata rc + VRFTypes.RequestCommitmentV2Plus calldata rc ) external view returns (Output memory) { return _getRandomnessFromProof(proof, rc); } @@ -71,7 +72,7 @@ contract ExposedVRFCoordinatorV2_5 is VRFCoordinatorV2_5 { uint256 weiPerUnitGas, bool nativePayment, bool onlyPremium - ) external view returns (uint96) { + ) external view returns (uint96, bool) { return _calculatePaymentAmount(startGas, weiPerUnitGas, nativePayment, onlyPremium); } } diff --git a/contracts/src/v0.8/vrf/dev/testhelpers/VRFCoordinatorV2PlusUpgradedVersion.sol b/contracts/src/v0.8/vrf/dev/testhelpers/VRFCoordinatorV2PlusUpgradedVersion.sol index 608536518fb..121466da495 100644 --- a/contracts/src/v0.8/vrf/dev/testhelpers/VRFCoordinatorV2PlusUpgradedVersion.sol +++ b/contracts/src/v0.8/vrf/dev/testhelpers/VRFCoordinatorV2PlusUpgradedVersion.sol @@ -240,8 +240,9 @@ contract VRFCoordinatorV2PlusUpgradedVersion is // Its important to ensure that the consumer is in fact who they say they // are, otherwise they could use someone else's subscription balance. // A nonce of 0 indicates consumer is not allocated to the sub. - uint64 currentNonce = s_consumers[msg.sender][req.subId]; - if (currentNonce == 0) { + mapping(uint256 => ConsumerConfig) storage consumerConfigs = s_consumers[msg.sender]; + ConsumerConfig memory consumerConfig = consumerConfigs[req.subId]; + if (!consumerConfig.active) { revert InvalidConsumer(req.subId, msg.sender); } // Input validation using the config storage word. @@ -267,8 +268,8 @@ contract VRFCoordinatorV2PlusUpgradedVersion is // Note we do not check whether the keyHash is valid to save gas. // The consequence for users is that they can send requests // for invalid keyHashes which will simply not be fulfilled. - uint64 nonce = currentNonce + 1; - (uint256 requestId, uint256 preSeed) = _computeRequestId(req.keyHash, msg.sender, req.subId, nonce); + ++consumerConfig.nonce; + (uint256 requestId, uint256 preSeed) = _computeRequestId(req.keyHash, msg.sender, req.subId, consumerConfig.nonce); VRFV2PlusClient.ExtraArgsV1 memory extraArgs = _fromBytes(req.extraArgs); bytes memory extraArgsBytes = VRFV2PlusClient._argsToBytes(extraArgs); @@ -294,7 +295,7 @@ contract VRFCoordinatorV2PlusUpgradedVersion is extraArgsBytes, msg.sender ); - s_consumers[msg.sender][req.subId] = nonce; + s_consumers[msg.sender][req.subId] = consumerConfig; return requestId; } @@ -548,7 +549,7 @@ contract VRFCoordinatorV2PlusUpgradedVersion is s_provingKeyHashes[j], subConfig.consumers[i], subId, - s_consumers[subConfig.consumers[i]][subId] + s_consumers[subConfig.consumers[i]][subId].nonce ); if (s_requestCommitments[reqId] != 0) { return true; @@ -565,7 +566,7 @@ contract VRFCoordinatorV2PlusUpgradedVersion is if (pendingRequestExists(subId)) { revert PendingRequestExists(); } - if (s_consumers[consumer][subId] == 0) { + if (!s_consumers[consumer][subId].active) { revert InvalidConsumer(subId, consumer); } // Note bounded by MAX_CONSUMERS @@ -712,7 +713,11 @@ contract VRFCoordinatorV2PlusUpgradedVersion is } for (uint256 i = 0; i < migrationData.consumers.length; i++) { - s_consumers[migrationData.consumers[i]][migrationData.subId] = 1; + s_consumers[migrationData.consumers[i]][migrationData.subId] = ConsumerConfig({ + active: true, + nonce: 0, + pendingReqCount: 0 + }); } s_subscriptions[migrationData.subId] = Subscription({ diff --git a/contracts/src/v0.8/vrf/dev/testhelpers/VRFV2PlusLoadTestWithMetrics.sol b/contracts/src/v0.8/vrf/dev/testhelpers/VRFV2PlusLoadTestWithMetrics.sol index d937728a790..85cb7727366 100644 --- a/contracts/src/v0.8/vrf/dev/testhelpers/VRFV2PlusLoadTestWithMetrics.sol +++ b/contracts/src/v0.8/vrf/dev/testhelpers/VRFV2PlusLoadTestWithMetrics.sol @@ -21,6 +21,8 @@ contract VRFV2PlusLoadTestWithMetrics is VRFConsumerBaseV2Plus { uint256 public s_lastRequestId; + uint32[] public s_requestBlockTimes; + struct RequestStatus { bool fulfilled; uint256[] randomWords; @@ -70,6 +72,8 @@ contract VRFV2PlusLoadTestWithMetrics is VRFConsumerBaseV2Plus { ); s_responseCount++; + + s_requestBlockTimes.push(uint32(responseTimeInBlocks)); } function requestRandomWords( @@ -116,6 +120,7 @@ contract VRFV2PlusLoadTestWithMetrics is VRFConsumerBaseV2Plus { s_fastestResponseTimeInSeconds = 999; s_requestCount = 0; s_responseCount = 0; + delete s_requestBlockTimes; } function getRequestStatus( @@ -161,4 +166,18 @@ contract VRFV2PlusLoadTestWithMetrics is VRFConsumerBaseV2Plus { return (_slowestResponseTime, _fastestResponseTime, averageInMillions); } + + function getRequestBlockTimes(uint256 offset, uint256 quantity) external view returns (uint32[] memory) { + uint256 end = offset + quantity; + if (end > s_requestBlockTimes.length) { + end = s_requestBlockTimes.length; + } + + uint32[] memory blockTimes = new uint32[](end - offset); + for (uint256 i = offset; i < end; i++) { + blockTimes[i - offset] = s_requestBlockTimes[i]; + } + + return blockTimes; + } } diff --git a/contracts/src/v0.8/vrf/dev/testhelpers/VRFV2PlusWrapperConsumerExample.sol b/contracts/src/v0.8/vrf/dev/testhelpers/VRFV2PlusWrapperConsumerExample.sol index bc0e6531631..9eee0494b28 100644 --- a/contracts/src/v0.8/vrf/dev/testhelpers/VRFV2PlusWrapperConsumerExample.sol +++ b/contracts/src/v0.8/vrf/dev/testhelpers/VRFV2PlusWrapperConsumerExample.sol @@ -18,10 +18,7 @@ contract VRFV2PlusWrapperConsumerExample is VRFV2PlusWrapperConsumerBase, Confir mapping(uint256 => RequestStatus) /* requestId */ /* requestStatus */ public s_requests; - constructor( - address _link, - address _vrfV2Wrapper - ) ConfirmedOwner(msg.sender) VRFV2PlusWrapperConsumerBase(_link, _vrfV2Wrapper) {} + constructor(address _vrfV2Wrapper) ConfirmedOwner(msg.sender) VRFV2PlusWrapperConsumerBase(_vrfV2Wrapper) {} function makeRequest( uint32 _callbackGasLimit, @@ -70,7 +67,7 @@ contract VRFV2PlusWrapperConsumerExample is VRFV2PlusWrapperConsumerBase, Confir /// @notice withdrawLink withdraws the amount specified in amount to the owner /// @param amount the amount to withdraw, in juels function withdrawLink(uint256 amount) external onlyOwner { - s_linkToken.transfer(owner(), amount); + i_linkToken.transfer(owner(), amount); } /// @notice withdrawNative withdraws the amount specified in amount to the owner diff --git a/contracts/src/v0.8/vrf/dev/testhelpers/VRFV2PlusWrapperLoadTestConsumer.sol b/contracts/src/v0.8/vrf/dev/testhelpers/VRFV2PlusWrapperLoadTestConsumer.sol index 5b75bc07d6a..431fcd77100 100644 --- a/contracts/src/v0.8/vrf/dev/testhelpers/VRFV2PlusWrapperLoadTestConsumer.sol +++ b/contracts/src/v0.8/vrf/dev/testhelpers/VRFV2PlusWrapperLoadTestConsumer.sol @@ -13,6 +13,7 @@ contract VRFV2PlusWrapperLoadTestConsumer is VRFV2PlusWrapperConsumerBase, Confi uint256 public s_slowestFulfillment = 0; uint256 public s_fastestFulfillment = 999; uint256 public s_lastRequestId; + uint32[] public s_requestBlockTimes; // solhint-disable-next-line chainlink-solidity/prefix-storage-variables-with-s-underscore mapping(uint256 => uint256) internal requestHeights; // requestIds to block number when rand request was made @@ -32,10 +33,7 @@ contract VRFV2PlusWrapperLoadTestConsumer is VRFV2PlusWrapperConsumerBase, Confi mapping(uint256 => RequestStatus) /* requestId */ /* requestStatus */ public s_requests; - constructor( - address _link, - address _vrfV2PlusWrapper - ) ConfirmedOwner(msg.sender) VRFV2PlusWrapperConsumerBase(_link, _vrfV2PlusWrapper) {} + constructor(address _vrfV2PlusWrapper) ConfirmedOwner(msg.sender) VRFV2PlusWrapperConsumerBase(_vrfV2PlusWrapper) {} function makeRequests( uint32 _callbackGasLimit, @@ -125,6 +123,8 @@ contract VRFV2PlusWrapperLoadTestConsumer is VRFV2PlusWrapperConsumerBase, Confi s_requests[_requestId].fulfilmentTimestamp = block.timestamp; s_requests[_requestId].fulfilmentBlockNumber = fulfilmentBlockNumber; + s_requestBlockTimes.push(uint32(requestDelay)); + emit WrappedRequestFulfilled(_requestId, _randomWords, s_requests[_requestId].paid); } @@ -157,18 +157,33 @@ contract VRFV2PlusWrapperLoadTestConsumer is VRFV2PlusWrapperConsumerBase, Confi ); } + function getRequestBlockTimes(uint256 offset, uint256 quantity) external view returns (uint32[] memory) { + uint256 end = offset + quantity; + if (end > s_requestBlockTimes.length) { + end = s_requestBlockTimes.length; + } + + uint32[] memory blockTimes = new uint32[](end - offset); + for (uint256 i = offset; i < end; i++) { + blockTimes[i - offset] = s_requestBlockTimes[i]; + } + + return blockTimes; + } + function reset() external { s_averageFulfillmentInMillions = 0; // in millions for better precision s_slowestFulfillment = 0; s_fastestFulfillment = 999; s_requestCount = 0; s_responseCount = 0; + delete s_requestBlockTimes; } /// @notice withdrawLink withdraws the amount specified in amount to the owner /// @param amount the amount to withdraw, in juels function withdrawLink(uint256 amount) external onlyOwner { - s_linkToken.transfer(owner(), amount); + i_linkToken.transfer(owner(), amount); } /// @notice withdrawNative withdraws the amount specified in amount to the owner diff --git a/contracts/test/v0.8/Cron.test.ts b/contracts/test/v0.8/Cron.test.ts index 2cdc7c247f9..87d81e563b9 100644 --- a/contracts/test/v0.8/Cron.test.ts +++ b/contracts/test/v0.8/Cron.test.ts @@ -68,7 +68,7 @@ describe('Cron', () => { }) describe('calculateNextTick() / calculateLastTick()', () => { - it('correctly identifies the next & last ticks for cron jobs', async () => { + it('correctly identifies the next & last ticks for cron jobs [ @skip-coverage ]', async () => { await setTimestamp(timeStamp) const now = () => moment.unix(timeStamp) const tests = [ diff --git a/contracts/test/v0.8/automation/AutomationRegistrar2_2.test.ts b/contracts/test/v0.8/automation/AutomationRegistrar2_2.test.ts deleted file mode 100644 index b7585462067..00000000000 --- a/contracts/test/v0.8/automation/AutomationRegistrar2_2.test.ts +++ /dev/null @@ -1,1013 +0,0 @@ -import { ethers } from 'hardhat' -import { ContractFactory, Contract } from 'ethers' -import { assert, expect } from 'chai' -import { evmRevert } from '../../test-helpers/matchers' -import { getUsers, Personas } from '../../test-helpers/setup' -import { BigNumber, Signer } from 'ethers' -import { MockV3Aggregator__factory as MockV3AggregatorFactory } from '../../../typechain/factories/MockV3Aggregator__factory' -import { UpkeepMock__factory as UpkeepMockFactory } from '../../../typechain/factories/UpkeepMock__factory' -import { MockV3Aggregator } from '../../../typechain/MockV3Aggregator' -import { UpkeepMock } from '../../../typechain/UpkeepMock' -import { toWei } from '../../test-helpers/helpers' -import { IKeeperRegistryMaster as IKeeperRegistry } from '../../../typechain/IKeeperRegistryMaster' -import { AutomationRegistrar2_2 as Registrar } from '../../../typechain/AutomationRegistrar2_2' -import { deployRegistry21 } from './helpers' - -// copied from KeeperRegistryBase2_2.sol -enum Trigger { - CONDITION, - LOG, -} - -let linkTokenFactory: ContractFactory -let mockV3AggregatorFactory: MockV3AggregatorFactory -let upkeepMockFactory: UpkeepMockFactory - -let personas: Personas - -before(async () => { - personas = (await getUsers()).personas - - linkTokenFactory = await ethers.getContractFactory( - 'src/v0.4/LinkToken.sol:LinkToken', - ) - mockV3AggregatorFactory = (await ethers.getContractFactory( - 'src/v0.8/tests/MockV3Aggregator.sol:MockV3Aggregator', - )) as unknown as MockV3AggregatorFactory - upkeepMockFactory = await ethers.getContractFactory('UpkeepMock') -}) - -const errorMsgs = { - onlyOwner: 'revert Only callable by owner', - onlyAdmin: 'OnlyAdminOrOwner()', - hashPayload: 'HashMismatch()', - requestNotFound: 'RequestNotFound()', -} - -describe('AutomationRegistrar2_2', () => { - const upkeepName = 'SampleUpkeep' - - const linkEth = BigNumber.from(300000000) - const gasWei = BigNumber.from(100) - const performGas = BigNumber.from(100000) - const paymentPremiumPPB = BigNumber.from(250000000) - const flatFeeMicroLink = BigNumber.from(0) - const maxAllowedAutoApprove = 5 - const trigger = '0xdeadbeef' - const offchainConfig = '0x01234567' - - const emptyBytes = '0x00' - const stalenessSeconds = BigNumber.from(43820) - const gasCeilingMultiplier = BigNumber.from(1) - const checkGasLimit = BigNumber.from(20000000) - const fallbackGasPrice = BigNumber.from(200) - const fallbackLinkPrice = BigNumber.from(200000000) - const maxCheckDataSize = BigNumber.from(10000) - const maxPerformDataSize = BigNumber.from(10000) - const maxRevertDataSize = BigNumber.from(1000) - const maxPerformGas = BigNumber.from(5000000) - const minUpkeepSpend = BigNumber.from('1000000000000000000') - const amount = BigNumber.from('5000000000000000000') - const amount1 = BigNumber.from('6000000000000000000') - const transcoder = ethers.constants.AddressZero - const upkeepManager = ethers.Wallet.createRandom().address - - // Enum values are not auto exported in ABI so have to manually declare - const autoApproveType_DISABLED = 0 - const autoApproveType_ENABLED_SENDER_ALLOWLIST = 1 - const autoApproveType_ENABLED_ALL = 2 - - let owner: Signer - let admin: Signer - let someAddress: Signer - let registrarOwner: Signer - let stranger: Signer - let requestSender: Signer - - let linkToken: Contract - let linkEthFeed: MockV3Aggregator - let gasPriceFeed: MockV3Aggregator - let mock: UpkeepMock - let registry: IKeeperRegistry - let registrar: Registrar - - beforeEach(async () => { - owner = personas.Default - admin = personas.Neil - someAddress = personas.Ned - registrarOwner = personas.Nelly - stranger = personas.Nancy - requestSender = personas.Norbert - - linkToken = await linkTokenFactory.connect(owner).deploy() - gasPriceFeed = await mockV3AggregatorFactory - .connect(owner) - .deploy(0, gasWei) - linkEthFeed = await mockV3AggregatorFactory - .connect(owner) - .deploy(9, linkEth) - - registry = await deployRegistry21( - owner, - 0, - linkToken.address, - linkEthFeed.address, - gasPriceFeed.address, - ) - - mock = await upkeepMockFactory.deploy() - - const registrarFactory = await ethers.getContractFactory( - 'AutomationRegistrar2_2', - ) - registrar = await registrarFactory - .connect(registrarOwner) - .deploy(linkToken.address, registry.address, minUpkeepSpend, [ - { - triggerType: Trigger.CONDITION, - autoApproveType: autoApproveType_DISABLED, - autoApproveMaxAllowed: 0, - }, - { - triggerType: Trigger.LOG, - autoApproveType: autoApproveType_DISABLED, - autoApproveMaxAllowed: 0, - }, - ]) - - await linkToken - .connect(owner) - .transfer(await requestSender.getAddress(), toWei('1000')) - - const keepers = [ - await personas.Carol.getAddress(), - await personas.Nancy.getAddress(), - await personas.Ned.getAddress(), - await personas.Neil.getAddress(), - ] - const onchainConfig = { - paymentPremiumPPB, - flatFeeMicroLink, - checkGasLimit, - stalenessSeconds, - gasCeilingMultiplier, - minUpkeepSpend, - maxCheckDataSize, - maxPerformDataSize, - maxRevertDataSize, - maxPerformGas, - fallbackGasPrice, - fallbackLinkPrice, - transcoder, - registrars: [registrar.address], - upkeepPrivilegeManager: upkeepManager, - } - await registry - .connect(owner) - .setConfigTypeSafe(keepers, keepers, 1, onchainConfig, 1, '0x') - }) - - describe('#typeAndVersion', () => { - it('uses the correct type and version', async () => { - const typeAndVersion = await registrar.typeAndVersion() - assert.equal(typeAndVersion, 'AutomationRegistrar 2.1.0') - }) - }) - - describe('#register', () => { - it('reverts if not called by the LINK token', async () => { - await evmRevert( - registrar - .connect(someAddress) - .register( - upkeepName, - emptyBytes, - mock.address, - performGas, - await admin.getAddress(), - 0, - emptyBytes, - trigger, - offchainConfig, - amount, - await requestSender.getAddress(), - ), - 'OnlyLink()', - ) - }) - - it('reverts if the amount passed in data mismatches actual amount sent', async () => { - await registrar - .connect(registrarOwner) - .setTriggerConfig( - Trigger.CONDITION, - autoApproveType_ENABLED_ALL, - maxAllowedAutoApprove, - ) - - const abiEncodedBytes = registrar.interface.encodeFunctionData( - 'register', - [ - upkeepName, - emptyBytes, - mock.address, - performGas, - await admin.getAddress(), - 0, - emptyBytes, - trigger, - offchainConfig, - amount1, - await requestSender.getAddress(), - ], - ) - - await evmRevert( - linkToken - .connect(requestSender) - .transferAndCall(registrar.address, amount, abiEncodedBytes), - 'AmountMismatch()', - ) - }) - - it('reverts if the sender passed in data mismatches actual sender', async () => { - const abiEncodedBytes = registrar.interface.encodeFunctionData( - 'register', - [ - upkeepName, - emptyBytes, - mock.address, - performGas, - await admin.getAddress(), - 0, - emptyBytes, - trigger, - offchainConfig, - amount, - await admin.getAddress(), // Should have been requestSender.getAddress() - ], - ) - await evmRevert( - linkToken - .connect(requestSender) - .transferAndCall(registrar.address, amount, abiEncodedBytes), - 'SenderMismatch()', - ) - }) - - it('reverts if the admin address is 0x0000...', async () => { - const abiEncodedBytes = registrar.interface.encodeFunctionData( - 'register', - [ - upkeepName, - emptyBytes, - mock.address, - performGas, - '0x0000000000000000000000000000000000000000', - 0, - emptyBytes, - trigger, - offchainConfig, - amount, - await requestSender.getAddress(), - ], - ) - - await evmRevert( - linkToken - .connect(requestSender) - .transferAndCall(registrar.address, amount, abiEncodedBytes), - 'RegistrationRequestFailed()', - ) - }) - - it('Auto Approve ON - registers an upkeep on KeeperRegistry instantly and emits both RegistrationRequested and RegistrationApproved events', async () => { - //set auto approve ON with high threshold limits - await registrar - .connect(registrarOwner) - .setTriggerConfig( - Trigger.CONDITION, - autoApproveType_ENABLED_ALL, - maxAllowedAutoApprove, - ) - - //register with auto approve ON - const abiEncodedBytes = registrar.interface.encodeFunctionData( - 'register', - [ - upkeepName, - emptyBytes, - mock.address, - performGas, - await admin.getAddress(), - 0, - emptyBytes, - trigger, - offchainConfig, - amount, - await requestSender.getAddress(), - ], - ) - const tx = await linkToken - .connect(requestSender) - .transferAndCall(registrar.address, amount, abiEncodedBytes) - - const [id] = await registry.getActiveUpkeepIDs(0, 1) - - //confirm if a new upkeep has been registered and the details are the same as the one just registered - const newupkeep = await registry.getUpkeep(id) - assert.equal(newupkeep.target, mock.address) - assert.equal(newupkeep.admin, await admin.getAddress()) - assert.equal(newupkeep.checkData, emptyBytes) - assert.equal(newupkeep.balance.toString(), amount.toString()) - assert.equal(newupkeep.performGas, performGas.toNumber()) - assert.equal(newupkeep.offchainConfig, offchainConfig) - - await expect(tx).to.emit(registrar, 'RegistrationRequested') - await expect(tx).to.emit(registrar, 'RegistrationApproved') - }) - - it('Auto Approve OFF - does not registers an upkeep on KeeperRegistry, emits only RegistrationRequested event', async () => { - //get upkeep count before attempting registration - const beforeCount = (await registry.getState()).state.numUpkeeps - - //set auto approve OFF, threshold limits dont matter in this case - await registrar - .connect(registrarOwner) - .setTriggerConfig( - Trigger.CONDITION, - autoApproveType_DISABLED, - maxAllowedAutoApprove, - ) - - //register with auto approve OFF - const abiEncodedBytes = registrar.interface.encodeFunctionData( - 'register', - [ - upkeepName, - emptyBytes, - mock.address, - performGas, - await admin.getAddress(), - 0, - emptyBytes, - trigger, - offchainConfig, - amount, - await requestSender.getAddress(), - ], - ) - const tx = await linkToken - .connect(requestSender) - .transferAndCall(registrar.address, amount, abiEncodedBytes) - const receipt = await tx.wait() - - //get upkeep count after attempting registration - const afterCount = (await registry.getState()).state.numUpkeeps - //confirm that a new upkeep has NOT been registered and upkeep count is still the same - assert.deepEqual(beforeCount, afterCount) - - //confirm that only RegistrationRequested event is emitted and RegistrationApproved event is not - await expect(tx).to.emit(registrar, 'RegistrationRequested') - await expect(tx).not.to.emit(registrar, 'RegistrationApproved') - - const hash = receipt.logs[2].topics[1] - const pendingRequest = await registrar.getPendingRequest(hash) - assert.equal(await admin.getAddress(), pendingRequest[0]) - assert.ok(amount.eq(pendingRequest[1])) - }) - - it('Auto Approve ON - Throttle max approvals - does not register an upkeep on KeeperRegistry beyond the max limit, emits only RegistrationRequested event after limit is hit', async () => { - assert.equal((await registry.getState()).state.numUpkeeps.toNumber(), 0) - - //set auto approve on, with max 1 allowed - await registrar - .connect(registrarOwner) - .setTriggerConfig(Trigger.CONDITION, autoApproveType_ENABLED_ALL, 1) - - //set auto approve on, with max 1 allowed - await registrar - .connect(registrarOwner) - .setTriggerConfig(Trigger.LOG, autoApproveType_ENABLED_ALL, 1) - - // register within threshold, new upkeep should be registered - let abiEncodedBytes = registrar.interface.encodeFunctionData('register', [ - upkeepName, - emptyBytes, - mock.address, - performGas, - await admin.getAddress(), - 0, - emptyBytes, - trigger, - offchainConfig, - amount, - await requestSender.getAddress(), - ]) - await linkToken - .connect(requestSender) - .transferAndCall(registrar.address, amount, abiEncodedBytes) - assert.equal((await registry.getState()).state.numUpkeeps.toNumber(), 1) // 0 -> 1 - - // try registering another one, new upkeep should not be registered - abiEncodedBytes = registrar.interface.encodeFunctionData('register', [ - upkeepName, - emptyBytes, - mock.address, - performGas.toNumber() + 1, // make unique hash - await admin.getAddress(), - 0, - emptyBytes, - trigger, - offchainConfig, - amount, - await requestSender.getAddress(), - ]) - await linkToken - .connect(requestSender) - .transferAndCall(registrar.address, amount, abiEncodedBytes) - assert.equal((await registry.getState()).state.numUpkeeps.toNumber(), 1) // Still 1 - - // register a second type of upkeep, different limit - abiEncodedBytes = registrar.interface.encodeFunctionData('register', [ - upkeepName, - emptyBytes, - mock.address, - performGas, - await admin.getAddress(), - Trigger.LOG, - emptyBytes, - trigger, - offchainConfig, - amount, - await requestSender.getAddress(), - ]) - await linkToken - .connect(requestSender) - .transferAndCall(registrar.address, amount, abiEncodedBytes) - assert.equal((await registry.getState()).state.numUpkeeps.toNumber(), 2) // 1 -> 2 - - // Now set new max limit to 2. One more upkeep should get auto approved - await registrar - .connect(registrarOwner) - .setTriggerConfig(Trigger.CONDITION, autoApproveType_ENABLED_ALL, 2) - - abiEncodedBytes = registrar.interface.encodeFunctionData('register', [ - upkeepName, - emptyBytes, - mock.address, - performGas.toNumber() + 2, // make unique hash - await admin.getAddress(), - 0, - emptyBytes, - trigger, - offchainConfig, - amount, - await requestSender.getAddress(), - ]) - await linkToken - .connect(requestSender) - .transferAndCall(registrar.address, amount, abiEncodedBytes) - assert.equal((await registry.getState()).state.numUpkeeps.toNumber(), 3) // 2 -> 3 - - // One more upkeep should not get registered - abiEncodedBytes = registrar.interface.encodeFunctionData('register', [ - upkeepName, - emptyBytes, - mock.address, - performGas.toNumber() + 3, // make unique hash - await admin.getAddress(), - 0, - emptyBytes, - trigger, - offchainConfig, - amount, - await requestSender.getAddress(), - ]) - await linkToken - .connect(requestSender) - .transferAndCall(registrar.address, amount, abiEncodedBytes) - assert.equal((await registry.getState()).state.numUpkeeps.toNumber(), 3) // Still 3 - }) - - it('Auto Approve Sender Allowlist - sender in allowlist - registers an upkeep on KeeperRegistry instantly and emits both RegistrationRequested and RegistrationApproved events', async () => { - const senderAddress = await requestSender.getAddress() - - //set auto approve to ENABLED_SENDER_ALLOWLIST type with high threshold limits - await registrar - .connect(registrarOwner) - .setTriggerConfig( - Trigger.CONDITION, - autoApproveType_ENABLED_SENDER_ALLOWLIST, - maxAllowedAutoApprove, - ) - - // Add sender to allowlist - await registrar - .connect(registrarOwner) - .setAutoApproveAllowedSender(senderAddress, true) - - //register with auto approve ON - const abiEncodedBytes = registrar.interface.encodeFunctionData( - 'register', - [ - upkeepName, - emptyBytes, - mock.address, - performGas, - await admin.getAddress(), - 0, - emptyBytes, - trigger, - offchainConfig, - amount, - await requestSender.getAddress(), - ], - ) - const tx = await linkToken - .connect(requestSender) - .transferAndCall(registrar.address, amount, abiEncodedBytes) - - const [id] = await registry.getActiveUpkeepIDs(0, 1) - - //confirm if a new upkeep has been registered and the details are the same as the one just registered - const newupkeep = await registry.getUpkeep(id) - assert.equal(newupkeep.target, mock.address) - assert.equal(newupkeep.admin, await admin.getAddress()) - assert.equal(newupkeep.checkData, emptyBytes) - assert.equal(newupkeep.balance.toString(), amount.toString()) - assert.equal(newupkeep.performGas, performGas.toNumber()) - - await expect(tx).to.emit(registrar, 'RegistrationRequested') - await expect(tx).to.emit(registrar, 'RegistrationApproved') - }) - - it('Auto Approve Sender Allowlist - sender NOT in allowlist - does not registers an upkeep on KeeperRegistry, emits only RegistrationRequested event', async () => { - const beforeCount = (await registry.getState()).state.numUpkeeps - const senderAddress = await requestSender.getAddress() - - //set auto approve to ENABLED_SENDER_ALLOWLIST type with high threshold limits - await registrar - .connect(registrarOwner) - .setTriggerConfig( - Trigger.CONDITION, - autoApproveType_ENABLED_SENDER_ALLOWLIST, - maxAllowedAutoApprove, - ) - - // Explicitly remove sender from allowlist - await registrar - .connect(registrarOwner) - .setAutoApproveAllowedSender(senderAddress, false) - - //register. auto approve shouldn't happen - const abiEncodedBytes = registrar.interface.encodeFunctionData( - 'register', - [ - upkeepName, - emptyBytes, - mock.address, - performGas, - await admin.getAddress(), - 0, - emptyBytes, - trigger, - offchainConfig, - amount, - await requestSender.getAddress(), - ], - ) - const tx = await linkToken - .connect(requestSender) - .transferAndCall(registrar.address, amount, abiEncodedBytes) - const receipt = await tx.wait() - - //get upkeep count after attempting registration - const afterCount = (await registry.getState()).state.numUpkeeps - //confirm that a new upkeep has NOT been registered and upkeep count is still the same - assert.deepEqual(beforeCount, afterCount) - - //confirm that only RegistrationRequested event is emitted and RegistrationApproved event is not - await expect(tx).to.emit(registrar, 'RegistrationRequested') - await expect(tx).not.to.emit(registrar, 'RegistrationApproved') - - const hash = receipt.logs[2].topics[1] - const pendingRequest = await registrar.getPendingRequest(hash) - assert.equal(await admin.getAddress(), pendingRequest[0]) - assert.ok(amount.eq(pendingRequest[1])) - }) - }) - - describe('#registerUpkeep', () => { - it('reverts with empty message if amount sent is not available in LINK allowance', async () => { - await evmRevert( - registrar.connect(someAddress).registerUpkeep({ - name: upkeepName, - upkeepContract: mock.address, - gasLimit: performGas, - adminAddress: await admin.getAddress(), - triggerType: 0, - checkData: emptyBytes, - triggerConfig: trigger, - offchainConfig: emptyBytes, - amount, - encryptedEmail: emptyBytes, - }), - '', - ) - }) - - it('reverts if the amount passed in data is less than configured minimum', async () => { - await registrar - .connect(registrarOwner) - .setTriggerConfig( - Trigger.CONDITION, - autoApproveType_ENABLED_ALL, - maxAllowedAutoApprove, - ) - - // amt is one order of magnitude less than minUpkeepSpend - const amt = BigNumber.from('100000000000000000') - - await evmRevert( - registrar.connect(someAddress).registerUpkeep({ - name: upkeepName, - upkeepContract: mock.address, - gasLimit: performGas, - adminAddress: await admin.getAddress(), - triggerType: 0, - checkData: emptyBytes, - triggerConfig: trigger, - offchainConfig: emptyBytes, - amount: amt, - encryptedEmail: emptyBytes, - }), - 'InsufficientPayment()', - ) - }) - - it('Auto Approve ON - registers an upkeep on KeeperRegistry instantly and emits both RegistrationRequested and RegistrationApproved events', async () => { - //set auto approve ON with high threshold limits - await registrar - .connect(registrarOwner) - .setTriggerConfig( - Trigger.CONDITION, - autoApproveType_ENABLED_ALL, - maxAllowedAutoApprove, - ) - - await linkToken.connect(requestSender).approve(registrar.address, amount) - - const tx = await registrar.connect(requestSender).registerUpkeep({ - name: upkeepName, - upkeepContract: mock.address, - gasLimit: performGas, - adminAddress: await admin.getAddress(), - triggerType: 0, - checkData: emptyBytes, - triggerConfig: trigger, - offchainConfig, - amount, - encryptedEmail: emptyBytes, - }) - assert.equal((await registry.getState()).state.numUpkeeps.toNumber(), 1) // 0 -> 1 - - //confirm if a new upkeep has been registered and the details are the same as the one just registered - const [id] = await registry.getActiveUpkeepIDs(0, 1) - const newupkeep = await registry.getUpkeep(id) - assert.equal(newupkeep.target, mock.address) - assert.equal(newupkeep.admin, await admin.getAddress()) - assert.equal(newupkeep.checkData, emptyBytes) - assert.equal(newupkeep.balance.toString(), amount.toString()) - assert.equal(newupkeep.performGas, performGas.toNumber()) - assert.equal(newupkeep.offchainConfig, offchainConfig) - - await expect(tx).to.emit(registrar, 'RegistrationRequested') - await expect(tx).to.emit(registrar, 'RegistrationApproved') - }) - }) - - describe('#setAutoApproveAllowedSender', () => { - it('reverts if not called by the owner', async () => { - const tx = registrar - .connect(stranger) - .setAutoApproveAllowedSender(await admin.getAddress(), false) - await evmRevert(tx, 'Only callable by owner') - }) - - it('sets the allowed status correctly and emits log', async () => { - const senderAddress = await stranger.getAddress() - let tx = await registrar - .connect(registrarOwner) - .setAutoApproveAllowedSender(senderAddress, true) - await expect(tx) - .to.emit(registrar, 'AutoApproveAllowedSenderSet') - .withArgs(senderAddress, true) - - let senderAllowedStatus = await registrar - .connect(owner) - .getAutoApproveAllowedSender(senderAddress) - assert.isTrue(senderAllowedStatus) - - tx = await registrar - .connect(registrarOwner) - .setAutoApproveAllowedSender(senderAddress, false) - await expect(tx) - .to.emit(registrar, 'AutoApproveAllowedSenderSet') - .withArgs(senderAddress, false) - - senderAllowedStatus = await registrar - .connect(owner) - .getAutoApproveAllowedSender(senderAddress) - assert.isFalse(senderAllowedStatus) - }) - }) - - describe('#setTriggerConfig', () => { - it('reverts if not called by the owner', async () => { - const tx = registrar - .connect(stranger) - .setTriggerConfig(Trigger.LOG, autoApproveType_ENABLED_ALL, 100) - await evmRevert(tx, 'Only callable by owner') - }) - - it('changes the config', async () => { - const tx = await registrar - .connect(registrarOwner) - .setTriggerConfig(Trigger.LOG, autoApproveType_ENABLED_ALL, 100) - await registrar.getTriggerRegistrationDetails(Trigger.LOG) - await expect(tx) - .to.emit(registrar, 'TriggerConfigSet') - .withArgs(Trigger.LOG, autoApproveType_ENABLED_ALL, 100) - }) - }) - - describe('#approve', () => { - let hash: string - - beforeEach(async () => { - await registrar - .connect(registrarOwner) - .setTriggerConfig( - Trigger.CONDITION, - autoApproveType_DISABLED, - maxAllowedAutoApprove, - ) - - //register with auto approve OFF - const abiEncodedBytes = registrar.interface.encodeFunctionData( - 'register', - [ - upkeepName, - emptyBytes, - mock.address, - performGas, - await admin.getAddress(), - 0, - emptyBytes, - trigger, - offchainConfig, - amount, - await requestSender.getAddress(), - ], - ) - - const tx = await linkToken - .connect(requestSender) - .transferAndCall(registrar.address, amount, abiEncodedBytes) - const receipt = await tx.wait() - hash = receipt.logs[2].topics[1] - }) - - it('reverts if not called by the owner', async () => { - const tx = registrar - .connect(stranger) - .approve( - upkeepName, - mock.address, - performGas, - await admin.getAddress(), - 0, - emptyBytes, - trigger, - emptyBytes, - hash, - ) - await evmRevert(tx, 'Only callable by owner') - }) - - it('reverts if the hash does not exist', async () => { - const tx = registrar - .connect(registrarOwner) - .approve( - upkeepName, - mock.address, - performGas, - await admin.getAddress(), - 0, - emptyBytes, - trigger, - emptyBytes, - '0x000000000000000000000000322813fd9a801c5507c9de605d63cea4f2ce6c44', - ) - await evmRevert(tx, errorMsgs.requestNotFound) - }) - - it('reverts if any member of the payload changes', async () => { - let tx = registrar - .connect(registrarOwner) - .approve( - upkeepName, - ethers.Wallet.createRandom().address, - performGas, - await admin.getAddress(), - 0, - emptyBytes, - trigger, - emptyBytes, - hash, - ) - await evmRevert(tx, errorMsgs.hashPayload) - tx = registrar - .connect(registrarOwner) - .approve( - upkeepName, - mock.address, - 10000, - await admin.getAddress(), - 0, - emptyBytes, - trigger, - emptyBytes, - hash, - ) - await evmRevert(tx, errorMsgs.hashPayload) - tx = registrar - .connect(registrarOwner) - .approve( - upkeepName, - mock.address, - performGas, - ethers.Wallet.createRandom().address, - 0, - emptyBytes, - trigger, - emptyBytes, - hash, - ) - await evmRevert(tx, errorMsgs.hashPayload) - tx = registrar - .connect(registrarOwner) - .approve( - upkeepName, - mock.address, - performGas, - await admin.getAddress(), - 0, - '0x1234', - trigger, - emptyBytes, - hash, - ) - await evmRevert(tx, errorMsgs.hashPayload) - }) - - it('approves an existing registration request', async () => { - const tx = await registrar - .connect(registrarOwner) - .approve( - upkeepName, - mock.address, - performGas, - await admin.getAddress(), - 0, - emptyBytes, - trigger, - offchainConfig, - hash, - ) - await expect(tx).to.emit(registrar, 'RegistrationApproved') - }) - - it('deletes the request afterwards / reverts if the request DNE', async () => { - await registrar - .connect(registrarOwner) - .approve( - upkeepName, - mock.address, - performGas, - await admin.getAddress(), - 0, - emptyBytes, - trigger, - offchainConfig, - hash, - ) - const tx = registrar - .connect(registrarOwner) - .approve( - upkeepName, - mock.address, - performGas, - await admin.getAddress(), - 0, - emptyBytes, - trigger, - offchainConfig, - hash, - ) - await evmRevert(tx, errorMsgs.requestNotFound) - }) - }) - - describe('#cancel', () => { - let hash: string - - beforeEach(async () => { - await registrar - .connect(registrarOwner) - .setTriggerConfig( - Trigger.CONDITION, - autoApproveType_DISABLED, - maxAllowedAutoApprove, - ) - - //register with auto approve OFF - const abiEncodedBytes = registrar.interface.encodeFunctionData( - 'register', - [ - upkeepName, - emptyBytes, - mock.address, - performGas, - await admin.getAddress(), - 0, - emptyBytes, - trigger, - offchainConfig, - amount, - await requestSender.getAddress(), - ], - ) - const tx = await linkToken - .connect(requestSender) - .transferAndCall(registrar.address, amount, abiEncodedBytes) - const receipt = await tx.wait() - hash = receipt.logs[2].topics[1] - // submit duplicate request (increase balance) - await linkToken - .connect(requestSender) - .transferAndCall(registrar.address, amount, abiEncodedBytes) - }) - - it('reverts if not called by the admin / owner', async () => { - const tx = registrar.connect(stranger).cancel(hash) - await evmRevert(tx, errorMsgs.onlyAdmin) - }) - - it('reverts if the hash does not exist', async () => { - const tx = registrar - .connect(registrarOwner) - .cancel( - '0x000000000000000000000000322813fd9a801c5507c9de605d63cea4f2ce6c44', - ) - await evmRevert(tx, errorMsgs.requestNotFound) - }) - - it('refunds the total request balance to the admin address if owner cancels', async () => { - const before = await linkToken.balanceOf(await admin.getAddress()) - const tx = await registrar.connect(registrarOwner).cancel(hash) - const after = await linkToken.balanceOf(await admin.getAddress()) - assert.isTrue(after.sub(before).eq(amount.mul(BigNumber.from(2)))) - await expect(tx).to.emit(registrar, 'RegistrationRejected') - }) - - it('refunds the total request balance to the admin address if admin cancels', async () => { - const before = await linkToken.balanceOf(await admin.getAddress()) - const tx = await registrar.connect(admin).cancel(hash) - const after = await linkToken.balanceOf(await admin.getAddress()) - assert.isTrue(after.sub(before).eq(amount.mul(BigNumber.from(2)))) - await expect(tx).to.emit(registrar, 'RegistrationRejected') - }) - - it('deletes the request hash', async () => { - await registrar.connect(registrarOwner).cancel(hash) - let tx = registrar.connect(registrarOwner).cancel(hash) - await evmRevert(tx, errorMsgs.requestNotFound) - tx = registrar - .connect(registrarOwner) - .approve( - upkeepName, - mock.address, - performGas, - await admin.getAddress(), - 0, - emptyBytes, - trigger, - emptyBytes, - hash, - ) - await evmRevert(tx, errorMsgs.requestNotFound) - }) - }) -}) diff --git a/contracts/test/v0.8/automation/AutomationRegistrar2_3.test.ts b/contracts/test/v0.8/automation/AutomationRegistrar2_3.test.ts index 91a192e0d0c..accd75de2eb 100644 --- a/contracts/test/v0.8/automation/AutomationRegistrar2_3.test.ts +++ b/contracts/test/v0.8/automation/AutomationRegistrar2_3.test.ts @@ -1,5 +1,5 @@ import { ethers } from 'hardhat' -import { ContractFactory, Contract } from 'ethers' +import { ContractFactory, Contract, BigNumberish, BytesLike } from 'ethers' import { assert, expect } from 'chai' import { evmRevert } from '../../test-helpers/matchers' import { getUsers, Personas } from '../../test-helpers/setup' @@ -9,22 +9,21 @@ import { UpkeepMock__factory as UpkeepMockFactory } from '../../../typechain/fac import { ChainModuleBase__factory as ChainModuleBaseFactory } from '../../../typechain/factories/ChainModuleBase__factory' import { MockV3Aggregator } from '../../../typechain/MockV3Aggregator' import { UpkeepMock } from '../../../typechain/UpkeepMock' -import { toWei } from '../../test-helpers/helpers' +import { randomAddress, toWei } from '../../test-helpers/helpers' import { ChainModuleBase } from '../../../typechain/ChainModuleBase' import { AutomationRegistrar2_3 as Registrar } from '../../../typechain/AutomationRegistrar2_3' import { deployRegistry23 } from './helpers' -import { - // AutomationRegistryLogicB2_2__factory as AutomationRegistryLogicBFactory, - IAutomationRegistryMaster as IAutomationRegistry, -} from '../../../typechain' +import { IAutomationRegistryMaster2_3 as IAutomationRegistry } from '../../../typechain' -// copied from KeeperRegistryBase2_3.sol +// copied from AutomationRegistryBase2_3.sol enum Trigger { CONDITION, LOG, } const zeroAddress = ethers.constants.AddressZero +type OnChainConfig = Parameters[3] + let linkTokenFactory: ContractFactory let mockV3AggregatorFactory: MockV3AggregatorFactory let upkeepMockFactory: UpkeepMockFactory @@ -53,7 +52,8 @@ const errorMsgs = { describe('AutomationRegistrar2_3', () => { const upkeepName = 'SampleUpkeep' - const linkEth = BigNumber.from(300000000) + const linkUSD = BigNumber.from('2000000000') // 1 LINK = $20 + const nativeUSD = BigNumber.from('400000000000') // 1 ETH = $4000 const gasWei = BigNumber.from(100) const performGas = BigNumber.from(100000) const paymentPremiumPPB = BigNumber.from(250000000) @@ -61,6 +61,12 @@ describe('AutomationRegistrar2_3', () => { const maxAllowedAutoApprove = 5 const trigger = '0xdeadbeef' const offchainConfig = '0x01234567' + const keepers = [ + randomAddress(), + randomAddress(), + randomAddress(), + randomAddress(), + ] const emptyBytes = '0x00' const stalenessSeconds = BigNumber.from(43820) @@ -68,13 +74,13 @@ describe('AutomationRegistrar2_3', () => { const checkGasLimit = BigNumber.from(20000000) const fallbackGasPrice = BigNumber.from(200) const fallbackLinkPrice = BigNumber.from(200000000) + const fallbackNativePrice = BigNumber.from(200000000) const maxCheckDataSize = BigNumber.from(10000) const maxPerformDataSize = BigNumber.from(10000) const maxRevertDataSize = BigNumber.from(1000) const maxPerformGas = BigNumber.from(5000000) - const minUpkeepSpend = BigNumber.from('1000000000000000000') + const minimumRegistrationAmount = BigNumber.from('1000000000000000000') const amount = BigNumber.from('5000000000000000000') - const amount1 = BigNumber.from('6000000000000000000') const transcoder = ethers.constants.AddressZero const upkeepManager = ethers.Wallet.createRandom().address @@ -91,13 +97,38 @@ describe('AutomationRegistrar2_3', () => { let requestSender: Signer let linkToken: Contract - let linkEthFeed: MockV3Aggregator + let linkUSDFeed: MockV3Aggregator + let nativeUSDFeed: MockV3Aggregator let gasPriceFeed: MockV3Aggregator let mock: UpkeepMock let registry: IAutomationRegistry let registrar: Registrar let chainModuleBase: ChainModuleBase let chainModuleBaseFactory: ChainModuleBaseFactory + let onchainConfig: OnChainConfig + + type RegistrationParams = { + upkeepContract: string + amount: BigNumberish + adminAddress: string + gasLimit: BigNumberish + triggerType: BigNumberish + billingToken: string + name: string + encryptedEmail: BytesLike + checkData: BytesLike + triggerConfig: BytesLike + offchainConfig: BytesLike + } + + function encodeRegistrationParams(params: RegistrationParams) { + return ( + '0x' + + registrar.interface + .encodeFunctionData('registerUpkeep', [params]) + .slice(10) + ) + } beforeEach(async () => { owner = personas.Default @@ -111,9 +142,12 @@ describe('AutomationRegistrar2_3', () => { gasPriceFeed = await mockV3AggregatorFactory .connect(owner) .deploy(0, gasWei) - linkEthFeed = await mockV3AggregatorFactory + linkUSDFeed = await mockV3AggregatorFactory + .connect(owner) + .deploy(8, linkUSD) + nativeUSDFeed = await mockV3AggregatorFactory .connect(owner) - .deploy(9, linkEth) + .deploy(8, nativeUSD) chainModuleBaseFactory = await ethers.getContractFactory('ChainModuleBase') chainModuleBase = await chainModuleBaseFactory.connect(owner).deploy() @@ -121,7 +155,8 @@ describe('AutomationRegistrar2_3', () => { registry = await deployRegistry23( owner, linkToken.address, - linkEthFeed.address, + linkUSDFeed.address, + nativeUSDFeed.address, gasPriceFeed.address, zeroAddress, ) @@ -131,9 +166,10 @@ describe('AutomationRegistrar2_3', () => { const registrarFactory = await ethers.getContractFactory( 'AutomationRegistrar2_3', ) - registrar = await registrarFactory - .connect(registrarOwner) - .deploy(linkToken.address, registry.address, minUpkeepSpend, [ + registrar = await registrarFactory.connect(registrarOwner).deploy( + linkToken.address, + registry.address, + [ { triggerType: Trigger.CONDITION, autoApproveType: autoApproveType_DISABLED, @@ -144,40 +180,51 @@ describe('AutomationRegistrar2_3', () => { autoApproveType: autoApproveType_DISABLED, autoApproveMaxAllowed: 0, }, - ]) + ], + [linkToken.address], + [minimumRegistrationAmount], + ) await linkToken .connect(owner) .transfer(await requestSender.getAddress(), toWei('1000')) - const keepers = [ - await personas.Carol.getAddress(), - await personas.Nancy.getAddress(), - await personas.Ned.getAddress(), - await personas.Neil.getAddress(), - ] - const onchainConfig = { - paymentPremiumPPB, - flatFeeMicroLink, + onchainConfig = { checkGasLimit, stalenessSeconds, gasCeilingMultiplier, - minUpkeepSpend, maxCheckDataSize, maxPerformDataSize, maxRevertDataSize, maxPerformGas, fallbackGasPrice, fallbackLinkPrice, + fallbackNativePrice, transcoder, registrars: [registrar.address], upkeepPrivilegeManager: upkeepManager, chainModule: chainModuleBase.address, reorgProtectionEnabled: true, + financeAdmin: await admin.getAddress(), } - await registry - .connect(owner) - .setConfigTypeSafe(keepers, keepers, 1, onchainConfig, 1, '0x') + await registry.connect(owner).setConfigTypeSafe( + keepers, + keepers, + 1, + onchainConfig, + 1, + '0x', + [linkToken.address], + [ + { + gasFeePPB: paymentPremiumPPB, + flatFeeMicroLink, + priceFeed: await registry.getLinkUSDFeedAddress(), + fallbackPrice: 200, + minSpend: minimumRegistrationAmount, + }, + ], + ) }) describe('#typeAndVersion', () => { @@ -187,110 +234,36 @@ describe('AutomationRegistrar2_3', () => { }) }) - describe('#register', () => { + describe('#onTokenTransfer', () => { it('reverts if not called by the LINK token', async () => { await evmRevert( registrar .connect(someAddress) - .register( - upkeepName, - emptyBytes, - mock.address, - performGas, - await admin.getAddress(), - 0, - emptyBytes, - trigger, - offchainConfig, - amount, - await requestSender.getAddress(), - ), + .onTokenTransfer(await someAddress.getAddress(), 0, '0x'), 'OnlyLink()', ) }) - it('reverts if the amount passed in data mismatches actual amount sent', async () => { - await registrar - .connect(registrarOwner) - .setTriggerConfig( - Trigger.CONDITION, - autoApproveType_ENABLED_ALL, - maxAllowedAutoApprove, - ) - - const abiEncodedBytes = registrar.interface.encodeFunctionData( - 'register', - [ - upkeepName, - emptyBytes, - mock.address, - performGas, - await admin.getAddress(), - 0, - emptyBytes, - trigger, - offchainConfig, - amount1, - await requestSender.getAddress(), - ], - ) - - await evmRevert( - linkToken - .connect(requestSender) - .transferAndCall(registrar.address, amount, abiEncodedBytes), - 'AmountMismatch()', - ) - }) - - it('reverts if the sender passed in data mismatches actual sender', async () => { - const abiEncodedBytes = registrar.interface.encodeFunctionData( - 'register', - [ - upkeepName, - emptyBytes, - mock.address, - performGas, - await admin.getAddress(), - 0, - emptyBytes, - trigger, - offchainConfig, - amount, - await admin.getAddress(), // Should have been requestSender.getAddress() - ], - ) - await evmRevert( - linkToken - .connect(requestSender) - .transferAndCall(registrar.address, amount, abiEncodedBytes), - 'SenderMismatch()', - ) - }) - it('reverts if the admin address is 0x0000...', async () => { - const abiEncodedBytes = registrar.interface.encodeFunctionData( - 'register', - [ - upkeepName, - emptyBytes, - mock.address, - performGas, - '0x0000000000000000000000000000000000000000', - 0, - emptyBytes, - trigger, - offchainConfig, - amount, - await requestSender.getAddress(), - ], - ) + const abiEncodedBytes = encodeRegistrationParams({ + name: upkeepName, + encryptedEmail: emptyBytes, + upkeepContract: mock.address, + gasLimit: performGas, + adminAddress: '0x0000000000000000000000000000000000000000', + checkData: emptyBytes, + triggerType: Trigger.CONDITION, + triggerConfig: trigger, + offchainConfig, + amount, + billingToken: linkToken.address, + }) await evmRevert( linkToken .connect(requestSender) .transferAndCall(registrar.address, amount, abiEncodedBytes), - 'RegistrationRequestFailed()', + 'InvalidAdminAddress()', ) }) @@ -305,22 +278,19 @@ describe('AutomationRegistrar2_3', () => { ) //register with auto approve ON - const abiEncodedBytes = registrar.interface.encodeFunctionData( - 'register', - [ - upkeepName, - emptyBytes, - mock.address, - performGas, - await admin.getAddress(), - 0, - emptyBytes, - trigger, - offchainConfig, - amount, - await requestSender.getAddress(), - ], - ) + const abiEncodedBytes = encodeRegistrationParams({ + name: upkeepName, + encryptedEmail: emptyBytes, + upkeepContract: mock.address, + gasLimit: performGas, + adminAddress: await admin.getAddress(), + checkData: emptyBytes, + triggerType: Trigger.CONDITION, + triggerConfig: trigger, + offchainConfig, + amount, + billingToken: linkToken.address, + }) const tx = await linkToken .connect(requestSender) .transferAndCall(registrar.address, amount, abiEncodedBytes) @@ -340,6 +310,37 @@ describe('AutomationRegistrar2_3', () => { await expect(tx).to.emit(registrar, 'RegistrationApproved') }) + it('Auto Approve ON - ignores the amount passed in and uses the actual amount sent', async () => { + await registrar + .connect(registrarOwner) + .setTriggerConfig( + Trigger.CONDITION, + autoApproveType_ENABLED_ALL, + maxAllowedAutoApprove, + ) + + const abiEncodedBytes = encodeRegistrationParams({ + name: upkeepName, + encryptedEmail: emptyBytes, + upkeepContract: mock.address, + gasLimit: performGas, + adminAddress: await admin.getAddress(), + checkData: emptyBytes, + triggerType: Trigger.CONDITION, + triggerConfig: trigger, + offchainConfig, + amount: amount.mul(10), // muhahahaha 😈 + billingToken: linkToken.address, + }) + + await linkToken + .connect(requestSender) + .transferAndCall(registrar.address, amount, abiEncodedBytes) + + const [id] = await registry.getActiveUpkeepIDs(0, 1) + expect(await registry.getBalance(id)).to.equal(amount) + }) + it('Auto Approve OFF - does not registers an upkeep on KeeperRegistry, emits only RegistrationRequested event', async () => { //get upkeep count before attempting registration const beforeCount = (await registry.getState()).state.numUpkeeps @@ -354,22 +355,19 @@ describe('AutomationRegistrar2_3', () => { ) //register with auto approve OFF - const abiEncodedBytes = registrar.interface.encodeFunctionData( - 'register', - [ - upkeepName, - emptyBytes, - mock.address, - performGas, - await admin.getAddress(), - 0, - emptyBytes, - trigger, - offchainConfig, - amount, - await requestSender.getAddress(), - ], - ) + const abiEncodedBytes = encodeRegistrationParams({ + name: upkeepName, + encryptedEmail: emptyBytes, + upkeepContract: mock.address, + gasLimit: performGas, + adminAddress: await admin.getAddress(), + checkData: emptyBytes, + triggerType: Trigger.CONDITION, + triggerConfig: trigger, + offchainConfig, + amount, + billingToken: linkToken.address, + }) const tx = await linkToken .connect(requestSender) .transferAndCall(registrar.address, amount, abiEncodedBytes) @@ -404,57 +402,57 @@ describe('AutomationRegistrar2_3', () => { .setTriggerConfig(Trigger.LOG, autoApproveType_ENABLED_ALL, 1) // register within threshold, new upkeep should be registered - let abiEncodedBytes = registrar.interface.encodeFunctionData('register', [ - upkeepName, - emptyBytes, - mock.address, - performGas, - await admin.getAddress(), - 0, - emptyBytes, - trigger, + let abiEncodedBytes = encodeRegistrationParams({ + name: upkeepName, + encryptedEmail: emptyBytes, + upkeepContract: mock.address, + gasLimit: performGas, + adminAddress: await admin.getAddress(), + checkData: emptyBytes, + triggerType: Trigger.CONDITION, + triggerConfig: trigger, offchainConfig, amount, - await requestSender.getAddress(), - ]) + billingToken: linkToken.address, + }) await linkToken .connect(requestSender) .transferAndCall(registrar.address, amount, abiEncodedBytes) assert.equal((await registry.getState()).state.numUpkeeps.toNumber(), 1) // 0 -> 1 // try registering another one, new upkeep should not be registered - abiEncodedBytes = registrar.interface.encodeFunctionData('register', [ - upkeepName, - emptyBytes, - mock.address, - performGas.toNumber() + 1, // make unique hash - await admin.getAddress(), - 0, - emptyBytes, - trigger, + abiEncodedBytes = encodeRegistrationParams({ + name: upkeepName, + encryptedEmail: emptyBytes, + upkeepContract: mock.address, + gasLimit: performGas.toNumber() + 1, // make unique hash + adminAddress: await admin.getAddress(), + checkData: emptyBytes, + triggerType: Trigger.CONDITION, + triggerConfig: trigger, offchainConfig, amount, - await requestSender.getAddress(), - ]) + billingToken: linkToken.address, + }) await linkToken .connect(requestSender) .transferAndCall(registrar.address, amount, abiEncodedBytes) assert.equal((await registry.getState()).state.numUpkeeps.toNumber(), 1) // Still 1 // register a second type of upkeep, different limit - abiEncodedBytes = registrar.interface.encodeFunctionData('register', [ - upkeepName, - emptyBytes, - mock.address, - performGas, - await admin.getAddress(), - Trigger.LOG, - emptyBytes, - trigger, + abiEncodedBytes = encodeRegistrationParams({ + name: upkeepName, + encryptedEmail: emptyBytes, + upkeepContract: mock.address, + gasLimit: performGas, // make unique hash + adminAddress: await admin.getAddress(), + checkData: emptyBytes, + triggerType: Trigger.LOG, + triggerConfig: trigger, offchainConfig, amount, - await requestSender.getAddress(), - ]) + billingToken: linkToken.address, + }) await linkToken .connect(requestSender) .transferAndCall(registrar.address, amount, abiEncodedBytes) @@ -465,38 +463,38 @@ describe('AutomationRegistrar2_3', () => { .connect(registrarOwner) .setTriggerConfig(Trigger.CONDITION, autoApproveType_ENABLED_ALL, 2) - abiEncodedBytes = registrar.interface.encodeFunctionData('register', [ - upkeepName, - emptyBytes, - mock.address, - performGas.toNumber() + 2, // make unique hash - await admin.getAddress(), - 0, - emptyBytes, - trigger, + abiEncodedBytes = encodeRegistrationParams({ + name: upkeepName, + encryptedEmail: emptyBytes, + upkeepContract: mock.address, + gasLimit: performGas.toNumber() + 2, // make unique hash + adminAddress: await admin.getAddress(), + checkData: emptyBytes, + triggerType: Trigger.CONDITION, + triggerConfig: trigger, offchainConfig, amount, - await requestSender.getAddress(), - ]) + billingToken: linkToken.address, + }) await linkToken .connect(requestSender) .transferAndCall(registrar.address, amount, abiEncodedBytes) assert.equal((await registry.getState()).state.numUpkeeps.toNumber(), 3) // 2 -> 3 // One more upkeep should not get registered - abiEncodedBytes = registrar.interface.encodeFunctionData('register', [ - upkeepName, - emptyBytes, - mock.address, - performGas.toNumber() + 3, // make unique hash - await admin.getAddress(), - 0, - emptyBytes, - trigger, + abiEncodedBytes = encodeRegistrationParams({ + name: upkeepName, + encryptedEmail: emptyBytes, + upkeepContract: mock.address, + gasLimit: performGas.toNumber() + 3, // make unique hash + adminAddress: await admin.getAddress(), + checkData: emptyBytes, + triggerType: Trigger.CONDITION, + triggerConfig: trigger, offchainConfig, amount, - await requestSender.getAddress(), - ]) + billingToken: linkToken.address, + }) await linkToken .connect(requestSender) .transferAndCall(registrar.address, amount, abiEncodedBytes) @@ -521,22 +519,19 @@ describe('AutomationRegistrar2_3', () => { .setAutoApproveAllowedSender(senderAddress, true) //register with auto approve ON - const abiEncodedBytes = registrar.interface.encodeFunctionData( - 'register', - [ - upkeepName, - emptyBytes, - mock.address, - performGas, - await admin.getAddress(), - 0, - emptyBytes, - trigger, - offchainConfig, - amount, - await requestSender.getAddress(), - ], - ) + const abiEncodedBytes = encodeRegistrationParams({ + name: upkeepName, + encryptedEmail: emptyBytes, + upkeepContract: mock.address, + gasLimit: performGas, + adminAddress: await admin.getAddress(), + checkData: emptyBytes, + triggerType: Trigger.CONDITION, + triggerConfig: trigger, + offchainConfig, + amount, + billingToken: linkToken.address, + }) const tx = await linkToken .connect(requestSender) .transferAndCall(registrar.address, amount, abiEncodedBytes) @@ -574,22 +569,19 @@ describe('AutomationRegistrar2_3', () => { .setAutoApproveAllowedSender(senderAddress, false) //register. auto approve shouldn't happen - const abiEncodedBytes = registrar.interface.encodeFunctionData( - 'register', - [ - upkeepName, - emptyBytes, - mock.address, - performGas, - await admin.getAddress(), - 0, - emptyBytes, - trigger, - offchainConfig, - amount, - await requestSender.getAddress(), - ], - ) + const abiEncodedBytes = encodeRegistrationParams({ + name: upkeepName, + encryptedEmail: emptyBytes, + upkeepContract: mock.address, + gasLimit: performGas, + adminAddress: await admin.getAddress(), + checkData: emptyBytes, + triggerType: Trigger.CONDITION, + triggerConfig: trigger, + offchainConfig, + amount, + billingToken: linkToken.address, + }) const tx = await linkToken .connect(requestSender) .transferAndCall(registrar.address, amount, abiEncodedBytes) @@ -619,18 +611,23 @@ describe('AutomationRegistrar2_3', () => { upkeepContract: mock.address, gasLimit: performGas, adminAddress: await admin.getAddress(), - triggerType: 0, + triggerType: Trigger.CONDITION, checkData: emptyBytes, triggerConfig: trigger, offchainConfig: emptyBytes, amount, encryptedEmail: emptyBytes, + billingToken: linkToken.address, }), '', ) }) it('reverts if the amount passed in data is less than configured minimum', async () => { + const amt = minimumRegistrationAmount.sub(1) + + await linkToken.connect(requestSender).approve(registrar.address, amt) + await registrar .connect(registrarOwner) .setTriggerConfig( @@ -639,26 +636,59 @@ describe('AutomationRegistrar2_3', () => { maxAllowedAutoApprove, ) - // amt is one order of magnitude less than minUpkeepSpend - const amt = BigNumber.from('100000000000000000') - await evmRevert( - registrar.connect(someAddress).registerUpkeep({ + registrar.connect(requestSender).registerUpkeep({ name: upkeepName, upkeepContract: mock.address, gasLimit: performGas, adminAddress: await admin.getAddress(), - triggerType: 0, + triggerType: Trigger.CONDITION, checkData: emptyBytes, triggerConfig: trigger, offchainConfig: emptyBytes, amount: amt, encryptedEmail: emptyBytes, + billingToken: linkToken.address, }), 'InsufficientPayment()', ) }) + it('reverts if the billing token is not supported', async () => { + await linkToken + .connect(requestSender) + .approve(registrar.address, minimumRegistrationAmount) + + await registrar + .connect(registrarOwner) + .setTriggerConfig( + Trigger.CONDITION, + autoApproveType_ENABLED_ALL, + maxAllowedAutoApprove, + ) + + await registry + .connect(owner) + .setConfigTypeSafe(keepers, keepers, 1, onchainConfig, 1, '0x', [], []) + + await evmRevert( + registrar.connect(requestSender).registerUpkeep({ + name: upkeepName, + upkeepContract: mock.address, + gasLimit: performGas, + adminAddress: await admin.getAddress(), + triggerType: Trigger.CONDITION, + checkData: emptyBytes, + triggerConfig: trigger, + offchainConfig: emptyBytes, + amount: minimumRegistrationAmount, + encryptedEmail: emptyBytes, + billingToken: linkToken.address, + }), + 'InvalidBillingToken()', + ) + }) + it('Auto Approve ON - registers an upkeep on KeeperRegistry instantly and emits both RegistrationRequested and RegistrationApproved events', async () => { //set auto approve ON with high threshold limits await registrar @@ -676,12 +706,13 @@ describe('AutomationRegistrar2_3', () => { upkeepContract: mock.address, gasLimit: performGas, adminAddress: await admin.getAddress(), - triggerType: 0, + triggerType: Trigger.CONDITION, checkData: emptyBytes, triggerConfig: trigger, offchainConfig, amount, encryptedEmail: emptyBytes, + billingToken: linkToken.address, }) assert.equal((await registry.getState()).state.numUpkeeps.toNumber(), 1) // 0 -> 1 @@ -757,6 +788,7 @@ describe('AutomationRegistrar2_3', () => { describe('#approve', () => { let hash: string + let params: RegistrationParams beforeEach(async () => { await registrar @@ -767,23 +799,22 @@ describe('AutomationRegistrar2_3', () => { maxAllowedAutoApprove, ) + params = { + name: upkeepName, + encryptedEmail: emptyBytes, + upkeepContract: mock.address, + gasLimit: performGas, + adminAddress: await admin.getAddress(), + checkData: emptyBytes, + triggerType: Trigger.CONDITION, + triggerConfig: trigger, + offchainConfig, + amount, + billingToken: linkToken.address, + } + //register with auto approve OFF - const abiEncodedBytes = registrar.interface.encodeFunctionData( - 'register', - [ - upkeepName, - emptyBytes, - mock.address, - performGas, - await admin.getAddress(), - 0, - emptyBytes, - trigger, - offchainConfig, - amount, - await requestSender.getAddress(), - ], - ) + const abiEncodedBytes = encodeRegistrationParams(params) const tx = await linkToken .connect(requestSender) @@ -793,142 +824,145 @@ describe('AutomationRegistrar2_3', () => { }) it('reverts if not called by the owner', async () => { - const tx = registrar - .connect(stranger) - .approve( - upkeepName, - mock.address, - performGas, - await admin.getAddress(), - 0, - emptyBytes, - trigger, - emptyBytes, - hash, - ) + const tx = registrar.connect(stranger).approve( + { + name: upkeepName, + encryptedEmail: emptyBytes, + upkeepContract: mock.address, + gasLimit: performGas, + adminAddress: await admin.getAddress(), + checkData: emptyBytes, + triggerType: Trigger.CONDITION, + triggerConfig: trigger, + offchainConfig: emptyBytes, + amount, + billingToken: linkToken.address, + }, + hash, + ) await evmRevert(tx, 'Only callable by owner') }) it('reverts if the hash does not exist', async () => { - const tx = registrar - .connect(registrarOwner) - .approve( - upkeepName, - mock.address, - performGas, - await admin.getAddress(), - 0, - emptyBytes, - trigger, - emptyBytes, - '0x000000000000000000000000322813fd9a801c5507c9de605d63cea4f2ce6c44', - ) + const tx = registrar.connect(registrarOwner).approve( + { + name: upkeepName, + encryptedEmail: emptyBytes, + upkeepContract: mock.address, + gasLimit: performGas, + adminAddress: await admin.getAddress(), + checkData: emptyBytes, + triggerType: Trigger.CONDITION, + triggerConfig: trigger, + offchainConfig: emptyBytes, + amount, + billingToken: linkToken.address, + }, + '0x000000000000000000000000322813fd9a801c5507c9de605d63cea4f2ce6c44', + ) await evmRevert(tx, errorMsgs.requestNotFound) }) it('reverts if any member of the payload changes', async () => { - let tx = registrar - .connect(registrarOwner) - .approve( - upkeepName, - ethers.Wallet.createRandom().address, - performGas, - await admin.getAddress(), - 0, - emptyBytes, - trigger, - emptyBytes, - hash, - ) - await evmRevert(tx, errorMsgs.hashPayload) - tx = registrar - .connect(registrarOwner) - .approve( - upkeepName, - mock.address, - 10000, - await admin.getAddress(), - 0, - emptyBytes, - trigger, - emptyBytes, - hash, - ) - await evmRevert(tx, errorMsgs.hashPayload) - tx = registrar - .connect(registrarOwner) - .approve( - upkeepName, - mock.address, - performGas, - ethers.Wallet.createRandom().address, - 0, - emptyBytes, - trigger, - emptyBytes, - hash, - ) - await evmRevert(tx, errorMsgs.hashPayload) - tx = registrar - .connect(registrarOwner) - .approve( - upkeepName, - mock.address, - performGas, - await admin.getAddress(), - 0, - '0x1234', - trigger, - emptyBytes, - hash, - ) - await evmRevert(tx, errorMsgs.hashPayload) + const invalidFields: any[] = [ + { + name: 'fake', + }, + { + encryptedEmail: '0xdeadbeef', + }, + { + upkeepContract: ethers.Wallet.createRandom().address, + }, + { + gasLimit: performGas.add(1), + }, + { + adminAddress: randomAddress(), + }, + { + checkData: '0xdeadbeef', + }, + { + triggerType: Trigger.LOG, + }, + { + triggerConfig: '0x1234', + }, + { + offchainConfig: '0xdeadbeef', + }, + { + amount: amount.add(1), + }, + { + billingToken: randomAddress(), + }, + ] + for (let i = 0; i < invalidFields.length; i++) { + const field = invalidFields[i] + const badParams = Object.assign({}, params, field) as RegistrationParams + const tx = registrar.connect(registrarOwner).approve(badParams, hash) + await expect( + tx, + `expected ${JSON.stringify(field)} to cause failure, but succeeded`, + ).to.be.revertedWith(errorMsgs.hashPayload) + } }) it('approves an existing registration request', async () => { - const tx = await registrar - .connect(registrarOwner) - .approve( - upkeepName, - mock.address, - performGas, - await admin.getAddress(), - 0, - emptyBytes, - trigger, + const tx = await registrar.connect(registrarOwner).approve( + { + name: upkeepName, + encryptedEmail: emptyBytes, + upkeepContract: mock.address, + gasLimit: performGas, + adminAddress: await admin.getAddress(), + checkData: emptyBytes, + triggerType: Trigger.CONDITION, + triggerConfig: trigger, offchainConfig, - hash, - ) + amount, + billingToken: linkToken.address, + }, + hash, + ) await expect(tx).to.emit(registrar, 'RegistrationApproved') }) it('deletes the request afterwards / reverts if the request DNE', async () => { - await registrar - .connect(registrarOwner) - .approve( - upkeepName, - mock.address, - performGas, - await admin.getAddress(), - 0, - emptyBytes, - trigger, + await registrar.connect(registrarOwner).approve( + { + name: upkeepName, + encryptedEmail: emptyBytes, + upkeepContract: mock.address, + gasLimit: performGas, + adminAddress: await admin.getAddress(), + checkData: emptyBytes, + triggerType: Trigger.CONDITION, + triggerConfig: trigger, offchainConfig, - hash, - ) - const tx = registrar - .connect(registrarOwner) - .approve( - upkeepName, - mock.address, - performGas, - await admin.getAddress(), - 0, - emptyBytes, - trigger, + amount, + billingToken: linkToken.address, + }, + hash, + ) + const tx = registrar.connect(registrarOwner).approve( + { + name: upkeepName, + encryptedEmail: emptyBytes, + upkeepContract: mock.address, + gasLimit: performGas, + adminAddress: await admin.getAddress(), + checkData: emptyBytes, + triggerType: Trigger.CONDITION, + triggerConfig: trigger, offchainConfig, - hash, - ) + amount, + billingToken: linkToken.address, + }, + hash, + ) await evmRevert(tx, errorMsgs.requestNotFound) }) }) @@ -946,22 +980,19 @@ describe('AutomationRegistrar2_3', () => { ) //register with auto approve OFF - const abiEncodedBytes = registrar.interface.encodeFunctionData( - 'register', - [ - upkeepName, - emptyBytes, - mock.address, - performGas, - await admin.getAddress(), - 0, - emptyBytes, - trigger, - offchainConfig, - amount, - await requestSender.getAddress(), - ], - ) + const abiEncodedBytes = encodeRegistrationParams({ + name: upkeepName, + encryptedEmail: emptyBytes, + upkeepContract: mock.address, + gasLimit: performGas, + adminAddress: await admin.getAddress(), + checkData: emptyBytes, + triggerType: Trigger.CONDITION, + triggerConfig: trigger, + offchainConfig, + amount, + billingToken: linkToken.address, + }) const tx = await linkToken .connect(requestSender) .transferAndCall(registrar.address, amount, abiEncodedBytes) @@ -1007,19 +1038,22 @@ describe('AutomationRegistrar2_3', () => { await registrar.connect(registrarOwner).cancel(hash) let tx = registrar.connect(registrarOwner).cancel(hash) await evmRevert(tx, errorMsgs.requestNotFound) - tx = registrar - .connect(registrarOwner) - .approve( - upkeepName, - mock.address, - performGas, - await admin.getAddress(), - 0, - emptyBytes, - trigger, - emptyBytes, - hash, - ) + tx = registrar.connect(registrarOwner).approve( + { + name: upkeepName, + encryptedEmail: emptyBytes, + upkeepContract: mock.address, + gasLimit: performGas, + adminAddress: await admin.getAddress(), + checkData: emptyBytes, + triggerType: Trigger.CONDITION, + triggerConfig: trigger, + offchainConfig: emptyBytes, + amount, + billingToken: linkToken.address, + }, + hash, + ) await evmRevert(tx, errorMsgs.requestNotFound) }) }) diff --git a/contracts/test/v0.8/automation/AutomationRegistry2_2.test.ts b/contracts/test/v0.8/automation/AutomationRegistry2_2.test.ts index 4b6ef59cb5c..cb63c3a6344 100644 --- a/contracts/test/v0.8/automation/AutomationRegistry2_2.test.ts +++ b/contracts/test/v0.8/automation/AutomationRegistry2_2.test.ts @@ -27,7 +27,7 @@ import { OptimismModule__factory as OptimismModuleFactory } from '../../../typec import { ILogAutomation__factory as ILogAutomationactory } from '../../../typechain/factories/ILogAutomation__factory' import { IAutomationForwarder__factory as IAutomationForwarderFactory } from '../../../typechain/factories/IAutomationForwarder__factory' import { MockArbSys__factory as MockArbSysFactory } from '../../../typechain/factories/MockArbSys__factory' -import { AutomationUtils2_2 as AutomationUtils } from '../../../typechain/AutomationUtils2_2' +import { AutomationCompatibleUtils } from '../../../typechain/AutomationCompatibleUtils' import { MockArbGasInfo } from '../../../typechain/MockArbGasInfo' import { MockOVMGasPriceOracle } from '../../../typechain/MockOVMGasPriceOracle' import { StreamsLookupUpkeep } from '../../../typechain/StreamsLookupUpkeep' @@ -75,11 +75,12 @@ enum Trigger { } // un-exported types that must be extracted from the utils contract -type Report = Parameters[0] -type OnChainConfig = Parameters[0] -type LogTrigger = Parameters[0] -type ConditionalTrigger = Parameters[0] -type Log = Parameters[0] +type Report = Parameters[0] +type LogTrigger = Parameters[0] +type ConditionalTrigger = Parameters< + AutomationCompatibleUtils['_conditionalTrigger'] +>[0] +type Log = Parameters[0] // ----------------------------------------------------------------------------------------------- @@ -170,7 +171,7 @@ let chainModuleBase: ChainModuleBase let arbitrumModule: ArbitrumModule let optimismModule: OptimismModule let streamsLookupUpkeep: StreamsLookupUpkeep -let automationUtils: AutomationUtils +let automationUtils: AutomationCompatibleUtils function now() { return Math.floor(Date.now() / 1000) @@ -200,15 +201,6 @@ const getTriggerType = (upkeepId: BigNumber): Trigger => { return bytes[15] as Trigger } -const encodeConfig = (onchainConfig: OnChainConfig) => { - return ( - '0x' + - automationUtils.interface - .encodeFunctionData('_onChainConfig', [onchainConfig]) - .slice(10) - ) -} - const encodeBlockTrigger = (conditionalTrigger: ConditionalTrigger) => { return ( '0x' + @@ -409,16 +401,18 @@ describe('AutomationRegistry2_2', () => { let config: any let arbConfig: any let opConfig: any - let baseConfig: Parameters - let arbConfigParams: Parameters - let opConfigParams: Parameters + let baseConfig: Parameters + let arbConfigParams: Parameters + let opConfigParams: Parameters let upkeepManager: string before(async () => { personas = (await getUsers()).personas - const utilsFactory = await ethers.getContractFactory('AutomationUtils2_2') - automationUtils = await utilsFactory.deploy() + const convFactory = await ethers.getContractFactory( + 'AutomationCompatibleUtils', + ) + automationUtils = await convFactory.deploy() linkTokenFactory = await ethers.getContractFactory( 'src/v0.4/LinkToken.sol:LinkToken', @@ -625,11 +619,11 @@ describe('AutomationRegistry2_2', () => { .add(chainModuleOverheads.chainModuleFixedOverhead) for (const test of tests) { - await registry.connect(owner).setConfig( + await registry.connect(owner).setConfigTypeSafe( signerAddresses, keeperAddresses, f, - encodeConfig({ + { paymentPremiumPPB: test.premium, flatFeeMicroLink: test.flatFee, checkGasLimit, @@ -647,7 +641,7 @@ describe('AutomationRegistry2_2', () => { upkeepPrivilegeManager: upkeepManager, chainModule: chainModule.address, reorgProtectionEnabled: true, - }), + }, offchainVersion, offchainBytes, ) @@ -915,7 +909,7 @@ describe('AutomationRegistry2_2', () => { signerAddresses, keeperAddresses, f, - encodeConfig(config), + config, offchainVersion, offchainBytes, ] @@ -923,7 +917,7 @@ describe('AutomationRegistry2_2', () => { signerAddresses, keeperAddresses, f, - encodeConfig(arbConfig), + arbConfig, offchainVersion, offchainBytes, ] @@ -931,7 +925,7 @@ describe('AutomationRegistry2_2', () => { signerAddresses, keeperAddresses, f, - encodeConfig(opConfig), + opConfig, offchainVersion, offchainBytes, ] @@ -987,10 +981,10 @@ describe('AutomationRegistry2_2', () => { await registry.getTransmitCalldataPerSignerBytesOverhead() cancellationDelay = (await registry.getCancellationDelay()).toNumber() - await registry.connect(owner).setConfig(...baseConfig) - await mgRegistry.connect(owner).setConfig(...baseConfig) - await arbRegistry.connect(owner).setConfig(...arbConfigParams) - await opRegistry.connect(owner).setConfig(...opConfigParams) + await registry.connect(owner).setConfigTypeSafe(...baseConfig) + await mgRegistry.connect(owner).setConfigTypeSafe(...baseConfig) + await arbRegistry.connect(owner).setConfigTypeSafe(...arbConfigParams) + await opRegistry.connect(owner).setConfigTypeSafe(...opConfigParams) for (const reg of [registry, arbRegistry, opRegistry, mgRegistry]) { await reg.connect(owner).setPayees(payees) await linkToken.connect(admin).approve(reg.address, toWei('1000')) @@ -1326,7 +1320,7 @@ describe('AutomationRegistry2_2', () => { ['conditional', upkeepId], ['log-trigger', logUpkeepId], ] - let newConfig = config + const newConfig = config newConfig.reorgProtectionEnabled = false await registry // used to test initial configurations .connect(owner) @@ -1358,7 +1352,7 @@ describe('AutomationRegistry2_2', () => { }) it('allows very old trigger block numbers when bypassing reorg protection with reorgProtectionEnabled config', async () => { - let newConfig = config + const newConfig = config newConfig.reorgProtectionEnabled = false await registry // used to test initial configurations .connect(owner) @@ -1459,7 +1453,7 @@ describe('AutomationRegistry2_2', () => { }) it('returns early when future block number is provided as trigger, irrespective of reorgProtectionEnabled config', async () => { - let newConfig = config + const newConfig = config newConfig.reorgProtectionEnabled = false await registry // used to test initial configurations .connect(owner) @@ -2892,7 +2886,7 @@ describe('AutomationRegistry2_2', () => { await registry.connect(owner).addFunds(upkeepID, minBalance1) // upkeep check should return false, 2 should return true - let checkUpkeepResult = await registry + const checkUpkeepResult = await registry .connect(zeroAddress) .callStatic['checkUpkeep(uint256)'](upkeepID) assert.equal(checkUpkeepResult.upkeepNeeded, false) @@ -3679,7 +3673,7 @@ describe('AutomationRegistry2_2', () => { const newRegistrars = [randomAddress(), randomAddress()] const upkeepManager = randomAddress() - const newConfig: OnChainConfig = { + const newConfig = { paymentPremiumPPB: payment, flatFeeMicroLink: flatFee, checkGasLimit: maxGas, @@ -5070,7 +5064,7 @@ describe('AutomationRegistry2_2', () => { }) it('reverts if the payee is the zero address', async () => { - await blankRegistry.connect(owner).setConfig(...baseConfig) // used to test initial config + await blankRegistry.connect(owner).setConfigTypeSafe(...baseConfig) // used to test initial config await evmRevert( blankRegistry // used to test initial config @@ -5084,7 +5078,7 @@ describe('AutomationRegistry2_2', () => { 'sets the payees when exisitng payees are zero address', async () => { //Initial payees should be zero address - await blankRegistry.connect(owner).setConfig(...baseConfig) // used to test initial config + await blankRegistry.connect(owner).setConfigTypeSafe(...baseConfig) // used to test initial config for (let i = 0; i < keeperAddresses.length; i++) { const payee = ( diff --git a/contracts/test/v0.8/automation/AutomationRegistry2_3.test.ts b/contracts/test/v0.8/automation/AutomationRegistry2_3.test.ts index a293a5f2544..ad0d85a2eff 100644 --- a/contracts/test/v0.8/automation/AutomationRegistry2_3.test.ts +++ b/contracts/test/v0.8/automation/AutomationRegistry2_3.test.ts @@ -27,7 +27,7 @@ import { OptimismModule__factory as OptimismModuleFactory } from '../../../typec import { ILogAutomation__factory as ILogAutomationactory } from '../../../typechain/factories/ILogAutomation__factory' import { IAutomationForwarder__factory as IAutomationForwarderFactory } from '../../../typechain/factories/IAutomationForwarder__factory' import { MockArbSys__factory as MockArbSysFactory } from '../../../typechain/factories/MockArbSys__factory' -import { AutomationUtils2_3 as AutomationUtils } from '../../../typechain/AutomationUtils2_3' +import { AutomationCompatibleUtils } from '../../../typechain/AutomationCompatibleUtils' import { MockArbGasInfo } from '../../../typechain/MockArbGasInfo' import { MockOVMGasPriceOracle } from '../../../typechain/MockOVMGasPriceOracle' import { StreamsLookupUpkeep } from '../../../typechain/StreamsLookupUpkeep' @@ -40,16 +40,17 @@ import { UpkeepTranscoder } from '../../../typechain/UpkeepTranscoder' import { IChainModule, UpkeepAutoFunder } from '../../../typechain' import { CancelledUpkeepReportEvent, - IAutomationRegistryMaster as IAutomationRegistry, + IAutomationRegistryMaster2_3 as IAutomationRegistry, ReorgedUpkeepReportEvent, StaleUpkeepReportEvent, UpkeepPerformedEvent, -} from '../../../typechain/IAutomationRegistryMaster' +} from '../../../typechain/IAutomationRegistryMaster2_3' import { deployMockContract, MockContract, } from '@ethereum-waffle/mock-contract' import { deployRegistry23 } from './helpers' +import { AutomationUtils2_3 } from '../../../typechain/AutomationUtils2_3' const describeMaybe = process.env.SKIP_SLOW ? describe.skip : describe const itMaybe = process.env.SKIP_SLOW ? it.skip : it @@ -75,11 +76,13 @@ enum Trigger { } // un-exported types that must be extracted from the utils contract -type Report = Parameters[0] -type OnChainConfig = Parameters[0] -type LogTrigger = Parameters[0] -type ConditionalTrigger = Parameters[0] -type Log = Parameters[0] +type Report = Parameters[0] +type LogTrigger = Parameters[0] +type ConditionalTrigger = Parameters< + AutomationCompatibleUtils['_conditionalTrigger'] +>[0] +type Log = Parameters[0] +type OnChainConfig = Parameters[3] // ----------------------------------------------------------------------------------------------- @@ -99,11 +102,12 @@ const gasCalculationMargin = BigNumber.from(5000) // overhead should be larger than actual gas overhead but should not increase beyond this margin const gasEstimationMargin = BigNumber.from(5000) -const linkEth = BigNumber.from(5000000000000000) // 1 Link = 0.005 Eth +// 1 Link = 0.005 Eth +const linkUSD = BigNumber.from('2000000000') // 1 LINK = $20 +const nativeUSD = BigNumber.from('400000000000') // 1 ETH = $4000 const gasWei = BigNumber.from(1000000000) // 1 gwei // ----------------------------------------------------------------------------------------------- // test-wide configs for upkeeps -const linkDivisibility = BigNumber.from('1000000000000000000') const performGas = BigNumber.from('1000000') const paymentPremiumBase = BigNumber.from('1000000000') const paymentPremiumPPB = BigNumber.from('250000000') @@ -121,7 +125,8 @@ const stalenessSeconds = BigNumber.from(43820) const gasCeilingMultiplier = BigNumber.from(2) const checkGasLimit = BigNumber.from(10000000) const fallbackGasPrice = gasWei.mul(BigNumber.from('2')) -const fallbackLinkPrice = linkEth.div(BigNumber.from('2')) +const fallbackLinkPrice = linkUSD.div(BigNumber.from('2')) +const fallbackNativePrice = nativeUSD.div(BigNumber.from('2')) const maxCheckDataSize = BigNumber.from(1000) const maxPerformDataSize = BigNumber.from(1000) const maxRevertDataSize = BigNumber.from(1000) @@ -153,7 +158,8 @@ let personas: Personas // contracts let linkToken: Contract -let linkEthFeed: MockV3Aggregator +let linkUSDFeed: MockV3Aggregator +let nativeUSDFeed: MockV3Aggregator let gasPriceFeed: MockV3Aggregator let registry: IAutomationRegistry // default registry, used for most tests let arbRegistry: IAutomationRegistry // arbitrum registry @@ -170,7 +176,8 @@ let chainModuleBase: ChainModuleBase let arbitrumModule: ArbitrumModule let optimismModule: OptimismModule let streamsLookupUpkeep: StreamsLookupUpkeep -let automationUtils: AutomationUtils +let automationUtils: AutomationCompatibleUtils +let automationUtils2_3: AutomationUtils2_3 function now() { return Math.floor(Date.now() / 1000) @@ -200,15 +207,6 @@ const getTriggerType = (upkeepId: BigNumber): Trigger => { return bytes[15] as Trigger } -const encodeConfig = (onchainConfig: OnChainConfig) => { - return ( - '0x' + - automationUtils.interface - .encodeFunctionData('_onChainConfig', [onchainConfig]) - .slice(10) - ) -} - const encodeBlockTrigger = (conditionalTrigger: ConditionalTrigger) => { return ( '0x' + @@ -236,7 +234,9 @@ const encodeLog = (log: Log) => { const encodeReport = (report: Report) => { return ( '0x' + - automationUtils.interface.encodeFunctionData('_report', [report]).slice(10) + automationUtils2_3.interface + .encodeFunctionData('_report', [report]) + .slice(10) ) } @@ -254,7 +254,7 @@ const makeReport = (upkeeps: UpkeepData[]) => { const performDatas = upkeeps.map((u) => u.performData) return encodeReport({ fastGasWei: gasWei, - linkNative: linkEth, + linkUSD, upkeepIds, gasLimits: performGases, triggers, @@ -396,6 +396,7 @@ describe('AutomationRegistry2_3', () => { let payee3: Signer let payee4: Signer let payee5: Signer + let financeAdmin: Signer let upkeepId: BigNumber // conditional upkeep let afUpkeepId: BigNumber // auto funding upkeep @@ -406,19 +407,24 @@ describe('AutomationRegistry2_3', () => { let payees: string[] let signers: Wallet[] let signerAddresses: string[] - let config: any - let arbConfig: any - let opConfig: any - let baseConfig: Parameters - let arbConfigParams: Parameters - let opConfigParams: Parameters + let config: OnChainConfig + let arbConfig: OnChainConfig + let opConfig: OnChainConfig + let baseConfig: Parameters + let arbConfigParams: Parameters + let opConfigParams: Parameters let upkeepManager: string before(async () => { personas = (await getUsers()).personas + const compatibleUtilsFactory = await ethers.getContractFactory( + 'AutomationCompatibleUtils', + ) + automationUtils = await compatibleUtilsFactory.deploy() + const utilsFactory = await ethers.getContractFactory('AutomationUtils2_3') - automationUtils = await utilsFactory.deploy() + automationUtils2_3 = await utilsFactory.deploy() linkTokenFactory = await ethers.getContractFactory( 'src/v0.4/LinkToken.sol:LinkToken', @@ -455,6 +461,7 @@ describe('AutomationRegistry2_3', () => { payee4 = personas.Eddy payee5 = personas.Carol upkeepManager = await personas.Norbert.getAddress() + financeAdmin = personas.Nick // signers signer1 = new ethers.Wallet( '0x7777777000000000000000000000000000000000000000000000000000000001', @@ -533,20 +540,20 @@ describe('AutomationRegistry2_3', () => { const base = gasWei .mul(gasMultiplier) .mul(gasSpent) - .mul(linkDivisibility) - .div(linkEth) - const l1Fee = l1CostWei.mul(linkDivisibility).div(linkEth) + .mul(nativeUSD) + .div(linkUSD) + const l1Fee = l1CostWei.mul(nativeUSD).div(linkUSD) const gasPayment = base.add(l1Fee) const premium = gasWei .mul(gasMultiplier) .mul(upkeepGasSpent) .add(l1CostWei) - .mul(linkDivisibility) - .div(linkEth) .mul(premiumPPB) + .mul(nativeUSD) + .div(linkUSD) .div(paymentPremiumBase) - .add(BigNumber.from(flatFee).mul('1000000000000')) + .add(flatFee.mul('1000000000000')) return { total: gasPayment.add(premium), @@ -624,37 +631,49 @@ describe('AutomationRegistry2_3', () => { ) .add(chainModuleOverheads.chainModuleFixedOverhead) + const financeAdminAddress = await financeAdmin.getAddress() + for (const test of tests) { - await registry.connect(owner).setConfig( + await registry.connect(owner).setConfigTypeSafe( signerAddresses, keeperAddresses, f, - encodeConfig({ - paymentPremiumPPB: test.premium, - flatFeeMicroLink: test.flatFee, + { checkGasLimit, stalenessSeconds, gasCeilingMultiplier: test.multiplier, - minUpkeepSpend, maxCheckDataSize, maxPerformDataSize, maxRevertDataSize, maxPerformGas, fallbackGasPrice, fallbackLinkPrice, + fallbackNativePrice, transcoder: transcoder.address, registrars: [], upkeepPrivilegeManager: upkeepManager, chainModule: chainModule.address, reorgProtectionEnabled: true, - }), + financeAdmin: financeAdminAddress, + }, offchainVersion, offchainBytes, + [linkToken.address], + [ + { + gasFeePPB: test.premium, + flatFeeMicroLink: test.flatFee, + priceFeed: linkUSDFeed.address, + fallbackPrice: fallbackLinkPrice, + minSpend: minUpkeepSpend, + }, + ], ) const conditionalPrice = await registry.getMaxPaymentForGas( Trigger.CONDITION, test.gas, + linkToken.address, ) expect(conditionalPrice).to.equal( linkForGas( @@ -667,7 +686,11 @@ describe('AutomationRegistry2_3', () => { ).total, ) - const logPrice = await registry.getMaxPaymentForGas(Trigger.LOG, test.gas) + const logPrice = await registry.getMaxPaymentForGas( + Trigger.LOG, + test.gas, + linkToken.address, + ) expect(logPrice).to.equal( linkForGas( BigNumber.from(test.gas), @@ -684,8 +707,9 @@ describe('AutomationRegistry2_3', () => { const verifyConsistentAccounting = async ( maxAllowedSpareChange: BigNumber, ) => { - const expectedLinkBalance = (await registry.getState()).state - .expectedLinkBalance + const expectedLinkBalance = await registry.getReserveAmount( + linkToken.address, + ) const linkTokenBalance = await linkToken.balanceOf(registry.address) const upkeepIdBalance = (await registry.getUpkeep(upkeepId)).balance let totalKeeperBalance = BigNumber.from(0) @@ -694,19 +718,20 @@ describe('AutomationRegistry2_3', () => { (await registry.getTransmitterInfo(keeperAddresses[i])).balance, ) } - const ownerBalance = (await registry.getState()).state.ownerLinkBalance + + const linkAvailableForPayment = await registry.linkAvailableForPayment() assert.isTrue(expectedLinkBalance.eq(linkTokenBalance)) assert.isTrue( upkeepIdBalance .add(totalKeeperBalance) - .add(ownerBalance) + .add(linkAvailableForPayment) .lte(expectedLinkBalance), ) assert.isTrue( expectedLinkBalance .sub(upkeepIdBalance) .sub(totalKeeperBalance) - .sub(ownerBalance) + .sub(linkAvailableForPayment) .lte(maxAllowedSpareChange), ) } @@ -837,9 +862,12 @@ describe('AutomationRegistry2_3', () => { gasPriceFeed = await mockV3AggregatorFactory .connect(owner) .deploy(0, gasWei) - linkEthFeed = await mockV3AggregatorFactory + linkUSDFeed = await mockV3AggregatorFactory + .connect(owner) + .deploy(8, linkUSD) + nativeUSDFeed = await mockV3AggregatorFactory .connect(owner) - .deploy(9, linkEth) + .deploy(8, nativeUSD) const upkeepTranscoderFactory = await ethers.getContractFactory( 'UpkeepTranscoder4_0', ) @@ -885,25 +913,25 @@ describe('AutomationRegistry2_3', () => { '0x0000000000000000000000000000000000000064', arbSysCode, ]) + const financeAdminAddress = await financeAdmin.getAddress() config = { - paymentPremiumPPB, - flatFeeMicroLink, checkGasLimit, stalenessSeconds, gasCeilingMultiplier, - minUpkeepSpend, maxCheckDataSize, maxPerformDataSize, maxRevertDataSize, maxPerformGas, fallbackGasPrice, fallbackLinkPrice, + fallbackNativePrice, transcoder: transcoder.address, registrars: [], upkeepPrivilegeManager: upkeepManager, chainModule: chainModuleBase.address, reorgProtectionEnabled: true, + financeAdmin: financeAdminAddress, } arbConfig = { ...config } @@ -915,66 +943,73 @@ describe('AutomationRegistry2_3', () => { signerAddresses, keeperAddresses, f, - encodeConfig(config), + config, offchainVersion, offchainBytes, + [linkToken.address], + [ + { + gasFeePPB: paymentPremiumPPB, + flatFeeMicroLink, + priceFeed: linkUSDFeed.address, + fallbackPrice: fallbackLinkPrice, + minSpend: minUpkeepSpend, + }, + ], ] + arbConfigParams = [ signerAddresses, keeperAddresses, f, - encodeConfig(arbConfig), + arbConfig, offchainVersion, offchainBytes, + [linkToken.address], + [ + { + gasFeePPB: paymentPremiumPPB, + flatFeeMicroLink, + priceFeed: linkUSDFeed.address, + fallbackPrice: fallbackLinkPrice, + minSpend: minUpkeepSpend, + }, + ], ] + opConfigParams = [ signerAddresses, keeperAddresses, f, - encodeConfig(opConfig), + opConfig, offchainVersion, offchainBytes, + [linkToken.address], + [ + { + gasFeePPB: paymentPremiumPPB, + flatFeeMicroLink, + priceFeed: linkUSDFeed.address, + fallbackPrice: fallbackLinkPrice, + minSpend: minUpkeepSpend, + }, + ], ] - registry = await deployRegistry23( + const registryParams: Parameters = [ owner, linkToken.address, - linkEthFeed.address, + linkUSDFeed.address, + nativeUSDFeed.address, gasPriceFeed.address, zeroAddress, - ) - - arbRegistry = await deployRegistry23( - owner, - linkToken.address, - linkEthFeed.address, - gasPriceFeed.address, - zeroAddress, - ) - - opRegistry = await deployRegistry23( - owner, - linkToken.address, - linkEthFeed.address, - gasPriceFeed.address, - zeroAddress, - ) - - mgRegistry = await deployRegistry23( - owner, - linkToken.address, - linkEthFeed.address, - gasPriceFeed.address, - zeroAddress, - ) + ] - blankRegistry = await deployRegistry23( - owner, - linkToken.address, - linkEthFeed.address, - gasPriceFeed.address, - zeroAddress, - ) + registry = await deployRegistry23(...registryParams) + arbRegistry = await deployRegistry23(...registryParams) + opRegistry = await deployRegistry23(...registryParams) + mgRegistry = await deployRegistry23(...registryParams) + blankRegistry = await deployRegistry23(...registryParams) registryConditionalOverhead = await registry.getConditionalGasOverhead() registryLogOverhead = await registry.getLogGasOverhead() @@ -987,10 +1022,10 @@ describe('AutomationRegistry2_3', () => { await registry.getTransmitCalldataPerSignerBytesOverhead() cancellationDelay = (await registry.getCancellationDelay()).toNumber() - await registry.connect(owner).setConfig(...baseConfig) - await mgRegistry.connect(owner).setConfig(...baseConfig) - await arbRegistry.connect(owner).setConfig(...arbConfigParams) - await opRegistry.connect(owner).setConfig(...opConfigParams) + await registry.connect(owner).setConfigTypeSafe(...baseConfig) + await mgRegistry.connect(owner).setConfigTypeSafe(...baseConfig) + await arbRegistry.connect(owner).setConfigTypeSafe(...arbConfigParams) + await opRegistry.connect(owner).setConfigTypeSafe(...opConfigParams) for (const reg of [registry, arbRegistry, opRegistry, mgRegistry]) { await reg.connect(owner).setPayees(payees) await linkToken.connect(admin).approve(reg.address, toWei('1000')) @@ -1003,9 +1038,16 @@ describe('AutomationRegistry2_3', () => { .transfer(await admin.getAddress(), toWei('1000')) let tx = await registry .connect(owner) - [ - 'registerUpkeep(address,uint32,address,bytes,bytes)' - ](mock.address, performGas, await admin.getAddress(), randomBytes, '0x') + .registerUpkeep( + mock.address, + performGas, + await admin.getAddress(), + Trigger.CONDITION, + linkToken.address, + randomBytes, + '0x', + '0x', + ) upkeepId = await getUpkeepID(tx) autoFunderUpkeep = await upkeepAutoFunderFactory @@ -1013,17 +1055,31 @@ describe('AutomationRegistry2_3', () => { .deploy(linkToken.address, registry.address) tx = await registry .connect(owner) - [ - 'registerUpkeep(address,uint32,address,bytes,bytes)' - ](autoFunderUpkeep.address, performGas, autoFunderUpkeep.address, randomBytes, '0x') + .registerUpkeep( + autoFunderUpkeep.address, + performGas, + autoFunderUpkeep.address, + Trigger.CONDITION, + linkToken.address, + '0x', + '0x', + '0x', + ) afUpkeepId = await getUpkeepID(tx) ltUpkeep = await deployMockContract(owner, ILogAutomationactory.abi) tx = await registry .connect(owner) - [ - 'registerUpkeep(address,uint32,address,uint8,bytes,bytes,bytes)' - ](ltUpkeep.address, performGas, await admin.getAddress(), Trigger.LOG, '0x', logTriggerConfig, emptyBytes) + .registerUpkeep( + ltUpkeep.address, + performGas, + await admin.getAddress(), + Trigger.LOG, + linkToken.address, + '0x', + logTriggerConfig, + emptyBytes, + ) logUpkeepId = await getUpkeepID(tx) await autoFunderUpkeep.setUpkeepId(afUpkeepId) @@ -1034,9 +1090,16 @@ describe('AutomationRegistry2_3', () => { tx = await registry .connect(owner) - [ - 'registerUpkeep(address,uint32,address,bytes,bytes)' - ](streamsLookupUpkeep.address, performGas, await admin.getAddress(), randomBytes, '0x') + .registerUpkeep( + streamsLookupUpkeep.address, + performGas, + await admin.getAddress(), + Trigger.CONDITION, + linkToken.address, + '0x', + '0x', + '0x', + ) streamsLookupUpkeepId = await getUpkeepID(tx) } @@ -1054,9 +1117,16 @@ describe('AutomationRegistry2_3', () => { await mock.setPerformGasToBurn(BigNumber.from('0')) const tx = await registry .connect(owner) - [ - 'registerUpkeep(address,uint32,address,bytes,bytes)' - ](mock.address, performGas, await admin.getAddress(), randomBytes, '0x') + .registerUpkeep( + mock.address, + performGas, + await admin.getAddress(), + Trigger.CONDITION, + linkToken.address, + '0x', + '0x', + '0x', + ) const condUpkeepId = await getUpkeepID(tx) passingConditionalUpkeepIds.push(condUpkeepId) @@ -1069,9 +1139,16 @@ describe('AutomationRegistry2_3', () => { await mock.setPerformGasToBurn(BigNumber.from('0')) const tx = await registry .connect(owner) - [ - 'registerUpkeep(address,uint32,address,uint8,bytes,bytes,bytes)' - ](mock.address, performGas, await admin.getAddress(), Trigger.LOG, '0x', logTriggerConfig, emptyBytes) + .registerUpkeep( + mock.address, + performGas, + await admin.getAddress(), + Trigger.LOG, + linkToken.address, + '0x', + logTriggerConfig, + emptyBytes, + ) const logUpkeepId = await getUpkeepID(tx) passingLogUpkeepIds.push(logUpkeepId) @@ -1084,9 +1161,16 @@ describe('AutomationRegistry2_3', () => { await mock.setPerformGasToBurn(BigNumber.from('0')) const tx = await registry .connect(owner) - [ - 'registerUpkeep(address,uint32,address,bytes,bytes)' - ](mock.address, performGas, await admin.getAddress(), randomBytes, '0x') + .registerUpkeep( + mock.address, + performGas, + await admin.getAddress(), + Trigger.CONDITION, + linkToken.address, + '0x', + '0x', + '0x', + ) const failingUpkeepId = await getUpkeepID(tx) failingUpkeepIds.push(failingUpkeepId) } @@ -1134,7 +1218,7 @@ describe('AutomationRegistry2_3', () => { const report = encodeReport({ fastGasWei: 0, - linkNative: 0, + linkUSD: 0, upkeepIds, gasLimits, triggers, @@ -1326,7 +1410,7 @@ describe('AutomationRegistry2_3', () => { ['conditional', upkeepId], ['log-trigger', logUpkeepId], ] - let newConfig = config + const newConfig = config newConfig.reorgProtectionEnabled = false await registry // used to test initial configurations .connect(owner) @@ -1337,6 +1421,8 @@ describe('AutomationRegistry2_3', () => { newConfig, offchainVersion, offchainBytes, + baseConfig[6], + baseConfig[7], ) for (const [type, id] of tests) { @@ -1358,7 +1444,7 @@ describe('AutomationRegistry2_3', () => { }) it('allows very old trigger block numbers when bypassing reorg protection with reorgProtectionEnabled config', async () => { - let newConfig = config + const newConfig = config newConfig.reorgProtectionEnabled = false await registry // used to test initial configurations .connect(owner) @@ -1369,6 +1455,8 @@ describe('AutomationRegistry2_3', () => { newConfig, offchainVersion, offchainBytes, + baseConfig[6], + baseConfig[7], ) for (let i = 0; i < 256; i++) { await ethers.provider.send('evm_mine', []) @@ -1459,7 +1547,7 @@ describe('AutomationRegistry2_3', () => { }) it('returns early when future block number is provided as trigger, irrespective of reorgProtectionEnabled config', async () => { - let newConfig = config + const newConfig = config newConfig.reorgProtectionEnabled = false await registry // used to test initial configurations .connect(owner) @@ -1470,6 +1558,8 @@ describe('AutomationRegistry2_3', () => { newConfig, offchainVersion, offchainBytes, + baseConfig[6], + baseConfig[7], ) const tests: [string, BigNumber][] = [ ['conditional', upkeepId], @@ -1594,8 +1684,8 @@ describe('AutomationRegistry2_3', () => { }) it('uses actual execution price for payment and premium calculation', async () => { - // Actual multiplier is 2, but we set gasPrice to be 1x gasWei - const gasPrice = gasWei.mul(BigNumber.from('1')) + // Actual multiplier is 2, but we set gasPrice to be == gasWei + const gasPrice = gasWei await mock.setCanPerform(true) const registryPremiumBefore = (await registry.getState()).state .totalPremium @@ -1676,9 +1766,16 @@ describe('AutomationRegistry2_3', () => { let tx = await arbRegistry .connect(owner) - [ - 'registerUpkeep(address,uint32,address,bytes,bytes)' - ](mock.address, performGas, await admin.getAddress(), randomBytes, '0x') + .registerUpkeep( + mock.address, + performGas, + await admin.getAddress(), + Trigger.CONDITION, + linkToken.address, + '0x', + '0x', + '0x', + ) const testUpkeepId = await getUpkeepID(tx) await arbRegistry.connect(owner).addFunds(testUpkeepId, toWei('100')) @@ -1717,6 +1814,7 @@ describe('AutomationRegistry2_3', () => { const maxPayment = await registry.getMaxPaymentForGas( Trigger.CONDITION, performGas, + linkToken.address, ) // First set auto funding amount to 0 and verify that balance is deducted upon performUpkeep @@ -1855,16 +1953,19 @@ describe('AutomationRegistry2_3', () => { config, offchainVersion, offchainBytes, + baseConfig[6], + baseConfig[7], + ) + const tx = await registry.connect(owner).registerUpkeep( + mock.address, + maxPerformGas, // max allowed gas + await admin.getAddress(), + Trigger.CONDITION, + linkToken.address, + '0x', + '0x', + '0x', ) - const tx = await registry - .connect(owner) - ['registerUpkeep(address,uint32,address,bytes,bytes)']( - mock.address, - maxPerformGas, // max allowed gas - await admin.getAddress(), - randomBytes, - '0x', - ) const testUpkeepId = await getUpkeepID(tx) await registry.connect(admin).addFunds(testUpkeepId, toWei('100')) @@ -1900,6 +2001,8 @@ describe('AutomationRegistry2_3', () => { config, offchainVersion, offchainBytes, + baseConfig[6], + baseConfig[7], ) const checkBlock = await ethers.provider.getBlock('latest') @@ -2042,6 +2145,8 @@ describe('AutomationRegistry2_3', () => { config, offchainVersion, offchainBytes, + baseConfig[6], + baseConfig[7], ) tx = await getTransmitTx(registry, keeper1, [upkeepId], { numSigners: newF + 1, @@ -2153,7 +2258,7 @@ describe('AutomationRegistry2_3', () => { }) }) - describe('Gas benchmarking log upkeeps [ @skip-coverage ]', function () { + describe.skip('Gas benchmarking log upkeeps [ @skip-coverage ]', function () { const fs = [1, 10] fs.forEach(function (newF) { it( @@ -2174,6 +2279,8 @@ describe('AutomationRegistry2_3', () => { config, offchainVersion, offchainBytes, + baseConfig[6], + baseConfig[7], ) tx = await getTransmitTx(registry, keeper1, [logUpkeepId], { numSigners: newF + 1, @@ -2271,496 +2378,522 @@ describe('AutomationRegistry2_3', () => { }) }) - describe('#transmit with upkeep batches [ @skip-coverage ]', function () { - const numPassingConditionalUpkeepsArray = [0, 1, 5] - const numPassingLogUpkeepsArray = [0, 1, 5] - const numFailingUpkeepsArray = [0, 3] - - for (let idx = 0; idx < numPassingConditionalUpkeepsArray.length; idx++) { - for (let jdx = 0; jdx < numPassingLogUpkeepsArray.length; jdx++) { - for (let kdx = 0; kdx < numFailingUpkeepsArray.length; kdx++) { - const numPassingConditionalUpkeeps = - numPassingConditionalUpkeepsArray[idx] - const numPassingLogUpkeeps = numPassingLogUpkeepsArray[jdx] - const numFailingUpkeeps = numFailingUpkeepsArray[kdx] - if (numPassingConditionalUpkeeps == 0 && numPassingLogUpkeeps == 0) { - continue - } - it( - '[Conditional:' + - numPassingConditionalUpkeeps + - ',Log:' + - numPassingLogUpkeeps + - ',Failures:' + - numFailingUpkeeps + - '] performs successful upkeeps and does not charge failing upkeeps', - async () => { - const allUpkeeps = await getMultipleUpkeepsDeployedAndFunded( - numPassingConditionalUpkeeps, - numPassingLogUpkeeps, - numFailingUpkeeps, - ) - const passingConditionalUpkeepIds = - allUpkeeps.passingConditionalUpkeepIds - const passingLogUpkeepIds = allUpkeeps.passingLogUpkeepIds - const failingUpkeepIds = allUpkeeps.failingUpkeepIds - - const keeperBefore = await registry.getTransmitterInfo( - await keeper1.getAddress(), - ) - const keeperLinkBefore = await linkToken.balanceOf( - await keeper1.getAddress(), - ) - const registryLinkBefore = await linkToken.balanceOf( - registry.address, - ) - const registryPremiumBefore = (await registry.getState()).state - .totalPremium - const registrationConditionalPassingBefore = await Promise.all( - passingConditionalUpkeepIds.map(async (id) => { - const reg = await registry.getUpkeep(BigNumber.from(id)) - assert.equal(reg.lastPerformedBlockNumber.toString(), '0') - return reg - }), - ) - const registrationLogPassingBefore = await Promise.all( - passingLogUpkeepIds.map(async (id) => { - const reg = await registry.getUpkeep(BigNumber.from(id)) - assert.equal(reg.lastPerformedBlockNumber.toString(), '0') - return reg - }), - ) - const registrationFailingBefore = await Promise.all( - failingUpkeepIds.map(async (id) => { - const reg = await registry.getUpkeep(BigNumber.from(id)) - assert.equal(reg.lastPerformedBlockNumber.toString(), '0') - return reg - }), - ) - - // cancel upkeeps so they will fail in the transmit process - // must call the cancel upkeep as the owner to avoid the CANCELLATION_DELAY - for (let ldx = 0; ldx < failingUpkeepIds.length; ldx++) { - await registry - .connect(owner) - .cancelUpkeep(failingUpkeepIds[ldx]) - } + describeMaybe( + '#transmit with upkeep batches [ @skip-coverage ]', + function () { + const numPassingConditionalUpkeepsArray = [0, 1, 5] + const numPassingLogUpkeepsArray = [0, 1, 5] + const numFailingUpkeepsArray = [0, 3] + + for (let idx = 0; idx < numPassingConditionalUpkeepsArray.length; idx++) { + for (let jdx = 0; jdx < numPassingLogUpkeepsArray.length; jdx++) { + for (let kdx = 0; kdx < numFailingUpkeepsArray.length; kdx++) { + const numPassingConditionalUpkeeps = + numPassingConditionalUpkeepsArray[idx] + const numPassingLogUpkeeps = numPassingLogUpkeepsArray[jdx] + const numFailingUpkeeps = numFailingUpkeepsArray[kdx] + if ( + numPassingConditionalUpkeeps == 0 && + numPassingLogUpkeeps == 0 + ) { + continue + } + it( + '[Conditional:' + + numPassingConditionalUpkeeps + + ',Log:' + + numPassingLogUpkeeps + + ',Failures:' + + numFailingUpkeeps + + '] performs successful upkeeps and does not charge failing upkeeps', + async () => { + const allUpkeeps = await getMultipleUpkeepsDeployedAndFunded( + numPassingConditionalUpkeeps, + numPassingLogUpkeeps, + numFailingUpkeeps, + ) + const passingConditionalUpkeepIds = + allUpkeeps.passingConditionalUpkeepIds + const passingLogUpkeepIds = allUpkeeps.passingLogUpkeepIds + const failingUpkeepIds = allUpkeeps.failingUpkeepIds - const tx = await getTransmitTx( - registry, - keeper1, - passingConditionalUpkeepIds.concat( - passingLogUpkeepIds.concat(failingUpkeepIds), - ), - ) + const keeperBefore = await registry.getTransmitterInfo( + await keeper1.getAddress(), + ) + const keeperLinkBefore = await linkToken.balanceOf( + await keeper1.getAddress(), + ) + const registryLinkBefore = await linkToken.balanceOf( + registry.address, + ) + const registryPremiumBefore = (await registry.getState()).state + .totalPremium + const registrationConditionalPassingBefore = await Promise.all( + passingConditionalUpkeepIds.map(async (id) => { + const reg = await registry.getUpkeep(BigNumber.from(id)) + assert.equal(reg.lastPerformedBlockNumber.toString(), '0') + return reg + }), + ) + const registrationLogPassingBefore = await Promise.all( + passingLogUpkeepIds.map(async (id) => { + const reg = await registry.getUpkeep(BigNumber.from(id)) + assert.equal(reg.lastPerformedBlockNumber.toString(), '0') + return reg + }), + ) + const registrationFailingBefore = await Promise.all( + failingUpkeepIds.map(async (id) => { + const reg = await registry.getUpkeep(BigNumber.from(id)) + assert.equal(reg.lastPerformedBlockNumber.toString(), '0') + return reg + }), + ) - const receipt = await tx.wait() - const upkeepPerformedLogs = parseUpkeepPerformedLogs(receipt) - // exactly numPassingUpkeeps Upkeep Performed should be emitted - assert.equal( - upkeepPerformedLogs.length, - numPassingConditionalUpkeeps + numPassingLogUpkeeps, - ) - const cancelledUpkeepReportLogs = - parseCancelledUpkeepReportLogs(receipt) - // exactly numFailingUpkeeps Upkeep Performed should be emitted - assert.equal(cancelledUpkeepReportLogs.length, numFailingUpkeeps) + // cancel upkeeps so they will fail in the transmit process + // must call the cancel upkeep as the owner to avoid the CANCELLATION_DELAY + for (let ldx = 0; ldx < failingUpkeepIds.length; ldx++) { + await registry + .connect(owner) + .cancelUpkeep(failingUpkeepIds[ldx]) + } - const keeperAfter = await registry.getTransmitterInfo( - await keeper1.getAddress(), - ) - const keeperLinkAfter = await linkToken.balanceOf( - await keeper1.getAddress(), - ) - const registryLinkAfter = await linkToken.balanceOf( - registry.address, - ) - const registrationConditionalPassingAfter = await Promise.all( - passingConditionalUpkeepIds.map(async (id) => { - return await registry.getUpkeep(BigNumber.from(id)) - }), - ) - const registrationLogPassingAfter = await Promise.all( - passingLogUpkeepIds.map(async (id) => { - return await registry.getUpkeep(BigNumber.from(id)) - }), - ) - const registrationFailingAfter = await Promise.all( - failingUpkeepIds.map(async (id) => { - return await registry.getUpkeep(BigNumber.from(id)) - }), - ) - const registryPremiumAfter = (await registry.getState()).state - .totalPremium - const premium = registryPremiumAfter.sub(registryPremiumBefore) - - let netPayment = BigNumber.from('0') - for (let i = 0; i < numPassingConditionalUpkeeps; i++) { - const id = upkeepPerformedLogs[i].args.id - const gasUsed = upkeepPerformedLogs[i].args.gasUsed - const gasOverhead = upkeepPerformedLogs[i].args.gasOverhead - const totalPayment = upkeepPerformedLogs[i].args.totalPayment - - expect(id).to.equal(passingConditionalUpkeepIds[i]) - assert.isTrue(gasUsed.gt(BigNumber.from('0'))) - assert.isTrue(gasOverhead.gt(BigNumber.from('0'))) - assert.isTrue(totalPayment.gt(BigNumber.from('0'))) - - // Balance should be deducted - assert.equal( - registrationConditionalPassingBefore[i].balance - .sub(totalPayment) - .toString(), - registrationConditionalPassingAfter[i].balance.toString(), + const tx = await getTransmitTx( + registry, + keeper1, + passingConditionalUpkeepIds.concat( + passingLogUpkeepIds.concat(failingUpkeepIds), + ), ) - // Amount spent should be updated correctly + const receipt = await tx.wait() + const upkeepPerformedLogs = parseUpkeepPerformedLogs(receipt) + // exactly numPassingUpkeeps Upkeep Performed should be emitted assert.equal( - registrationConditionalPassingAfter[i].amountSpent - .sub(totalPayment) - .toString(), - registrationConditionalPassingBefore[ - i - ].amountSpent.toString(), + upkeepPerformedLogs.length, + numPassingConditionalUpkeeps + numPassingLogUpkeeps, ) - - // Last perform block number should be updated + const cancelledUpkeepReportLogs = + parseCancelledUpkeepReportLogs(receipt) + // exactly numFailingUpkeeps Upkeep Performed should be emitted assert.equal( - registrationConditionalPassingAfter[ - i - ].lastPerformedBlockNumber.toString(), - tx.blockNumber?.toString(), + cancelledUpkeepReportLogs.length, + numFailingUpkeeps, ) - netPayment = netPayment.add(totalPayment) - } - - for (let i = 0; i < numPassingLogUpkeeps; i++) { - const id = - upkeepPerformedLogs[numPassingConditionalUpkeeps + i].args.id - const gasUsed = - upkeepPerformedLogs[numPassingConditionalUpkeeps + i].args - .gasUsed - const gasOverhead = - upkeepPerformedLogs[numPassingConditionalUpkeeps + i].args - .gasOverhead - const totalPayment = - upkeepPerformedLogs[numPassingConditionalUpkeeps + i].args - .totalPayment - - expect(id).to.equal(passingLogUpkeepIds[i]) - assert.isTrue(gasUsed.gt(BigNumber.from('0'))) - assert.isTrue(gasOverhead.gt(BigNumber.from('0'))) - assert.isTrue(totalPayment.gt(BigNumber.from('0'))) - - // Balance should be deducted - assert.equal( - registrationLogPassingBefore[i].balance - .sub(totalPayment) - .toString(), - registrationLogPassingAfter[i].balance.toString(), + const keeperAfter = await registry.getTransmitterInfo( + await keeper1.getAddress(), ) - - // Amount spent should be updated correctly - assert.equal( - registrationLogPassingAfter[i].amountSpent - .sub(totalPayment) - .toString(), - registrationLogPassingBefore[i].amountSpent.toString(), + const keeperLinkAfter = await linkToken.balanceOf( + await keeper1.getAddress(), ) - - // Last perform block number should not be updated for log triggers - assert.equal( - registrationLogPassingAfter[ - i - ].lastPerformedBlockNumber.toString(), - '0', + const registryLinkAfter = await linkToken.balanceOf( + registry.address, + ) + const registrationConditionalPassingAfter = await Promise.all( + passingConditionalUpkeepIds.map(async (id) => { + return await registry.getUpkeep(BigNumber.from(id)) + }), + ) + const registrationLogPassingAfter = await Promise.all( + passingLogUpkeepIds.map(async (id) => { + return await registry.getUpkeep(BigNumber.from(id)) + }), + ) + const registrationFailingAfter = await Promise.all( + failingUpkeepIds.map(async (id) => { + return await registry.getUpkeep(BigNumber.from(id)) + }), ) + const registryPremiumAfter = (await registry.getState()).state + .totalPremium + const premium = registryPremiumAfter.sub(registryPremiumBefore) + + let netPayment = BigNumber.from('0') + for (let i = 0; i < numPassingConditionalUpkeeps; i++) { + const id = upkeepPerformedLogs[i].args.id + const gasUsed = upkeepPerformedLogs[i].args.gasUsed + const gasOverhead = upkeepPerformedLogs[i].args.gasOverhead + const totalPayment = upkeepPerformedLogs[i].args.totalPayment + + expect(id).to.equal(passingConditionalUpkeepIds[i]) + assert.isTrue(gasUsed.gt(BigNumber.from('0'))) + assert.isTrue(gasOverhead.gt(BigNumber.from('0'))) + assert.isTrue(totalPayment.gt(BigNumber.from('0'))) + + // Balance should be deducted + assert.equal( + registrationConditionalPassingBefore[i].balance + .sub(totalPayment) + .toString(), + registrationConditionalPassingAfter[i].balance.toString(), + ) + + // Amount spent should be updated correctly + assert.equal( + registrationConditionalPassingAfter[i].amountSpent + .sub(totalPayment) + .toString(), + registrationConditionalPassingBefore[ + i + ].amountSpent.toString(), + ) + + // Last perform block number should be updated + assert.equal( + registrationConditionalPassingAfter[ + i + ].lastPerformedBlockNumber.toString(), + tx.blockNumber?.toString(), + ) + + netPayment = netPayment.add(totalPayment) + } - netPayment = netPayment.add(totalPayment) - } + for (let i = 0; i < numPassingLogUpkeeps; i++) { + const id = + upkeepPerformedLogs[numPassingConditionalUpkeeps + i].args + .id + const gasUsed = + upkeepPerformedLogs[numPassingConditionalUpkeeps + i].args + .gasUsed + const gasOverhead = + upkeepPerformedLogs[numPassingConditionalUpkeeps + i].args + .gasOverhead + const totalPayment = + upkeepPerformedLogs[numPassingConditionalUpkeeps + i].args + .totalPayment + + expect(id).to.equal(passingLogUpkeepIds[i]) + assert.isTrue(gasUsed.gt(BigNumber.from('0'))) + assert.isTrue(gasOverhead.gt(BigNumber.from('0'))) + assert.isTrue(totalPayment.gt(BigNumber.from('0'))) + + // Balance should be deducted + assert.equal( + registrationLogPassingBefore[i].balance + .sub(totalPayment) + .toString(), + registrationLogPassingAfter[i].balance.toString(), + ) + + // Amount spent should be updated correctly + assert.equal( + registrationLogPassingAfter[i].amountSpent + .sub(totalPayment) + .toString(), + registrationLogPassingBefore[i].amountSpent.toString(), + ) + + // Last perform block number should not be updated for log triggers + assert.equal( + registrationLogPassingAfter[ + i + ].lastPerformedBlockNumber.toString(), + '0', + ) + + netPayment = netPayment.add(totalPayment) + } - for (let i = 0; i < numFailingUpkeeps; i++) { - // CancelledUpkeep log should be emitted - const id = cancelledUpkeepReportLogs[i].args.id - expect(id).to.equal(failingUpkeepIds[i]) + for (let i = 0; i < numFailingUpkeeps; i++) { + // CancelledUpkeep log should be emitted + const id = cancelledUpkeepReportLogs[i].args.id + expect(id).to.equal(failingUpkeepIds[i]) + + // Balance and amount spent should be same + assert.equal( + registrationFailingBefore[i].balance.toString(), + registrationFailingAfter[i].balance.toString(), + ) + assert.equal( + registrationFailingBefore[i].amountSpent.toString(), + registrationFailingAfter[i].amountSpent.toString(), + ) + + // Last perform block number should not be updated + assert.equal( + registrationFailingAfter[ + i + ].lastPerformedBlockNumber.toString(), + '0', + ) + } - // Balance and amount spent should be same - assert.equal( - registrationFailingBefore[i].balance.toString(), - registrationFailingAfter[i].balance.toString(), - ) - assert.equal( - registrationFailingBefore[i].amountSpent.toString(), - registrationFailingAfter[i].amountSpent.toString(), - ) + // Keeper payment is gasPayment + premium / num keepers + const keeperPayment = netPayment + .sub(premium) + .add(premium.div(BigNumber.from(keeperAddresses.length))) - // Last perform block number should not be updated + // Keeper should be paid net payment for all passed upkeeps assert.equal( - registrationFailingAfter[ - i - ].lastPerformedBlockNumber.toString(), - '0', + keeperAfter.balance.sub(keeperPayment).toString(), + keeperBefore.balance.toString(), ) - } - // Keeper payment is gasPayment + premium / num keepers - const keeperPayment = netPayment - .sub(premium) - .add(premium.div(BigNumber.from(keeperAddresses.length))) + assert.isTrue(keeperLinkAfter.eq(keeperLinkBefore)) + assert.isTrue(registryLinkBefore.eq(registryLinkAfter)) + }, + ) - // Keeper should be paid net payment for all passed upkeeps - assert.equal( - keeperAfter.balance.sub(keeperPayment).toString(), - keeperBefore.balance.toString(), - ) + it.skip( + '[Conditional:' + + numPassingConditionalUpkeeps + + ',Log' + + numPassingLogUpkeeps + + ',Failures:' + + numFailingUpkeeps + + '] splits gas overhead appropriately among performed upkeeps [ @skip-coverage ]', + async () => { + const allUpkeeps = await getMultipleUpkeepsDeployedAndFunded( + numPassingConditionalUpkeeps, + numPassingLogUpkeeps, + numFailingUpkeeps, + ) + const passingConditionalUpkeepIds = + allUpkeeps.passingConditionalUpkeepIds + const passingLogUpkeepIds = allUpkeeps.passingLogUpkeepIds + const failingUpkeepIds = allUpkeeps.failingUpkeepIds + + // Perform the upkeeps once to remove non-zero storage slots and have predictable gas measurement + let tx = await getTransmitTx( + registry, + keeper1, + passingConditionalUpkeepIds.concat( + passingLogUpkeepIds.concat(failingUpkeepIds), + ), + ) - assert.isTrue(keeperLinkAfter.eq(keeperLinkBefore)) - assert.isTrue(registryLinkBefore.eq(registryLinkAfter)) - }, - ) + await tx.wait() - it( - '[Conditional:' + - numPassingConditionalUpkeeps + - ',Log' + - numPassingLogUpkeeps + - ',Failures:' + - numFailingUpkeeps + - '] splits gas overhead appropriately among performed upkeeps [ @skip-coverage ]', - async () => { - const allUpkeeps = await getMultipleUpkeepsDeployedAndFunded( - numPassingConditionalUpkeeps, - numPassingLogUpkeeps, - numFailingUpkeeps, - ) - const passingConditionalUpkeepIds = - allUpkeeps.passingConditionalUpkeepIds - const passingLogUpkeepIds = allUpkeeps.passingLogUpkeepIds - const failingUpkeepIds = allUpkeeps.failingUpkeepIds - - // Perform the upkeeps once to remove non-zero storage slots and have predictable gas measurement - let tx = await getTransmitTx( - registry, - keeper1, - passingConditionalUpkeepIds.concat( - passingLogUpkeepIds.concat(failingUpkeepIds), - ), - ) + // cancel upkeeps so they will fail in the transmit process + // must call the cancel upkeep as the owner to avoid the CANCELLATION_DELAY + for (let ldx = 0; ldx < failingUpkeepIds.length; ldx++) { + await registry + .connect(owner) + .cancelUpkeep(failingUpkeepIds[ldx]) + } - await tx.wait() + // Do the actual thing - // cancel upkeeps so they will fail in the transmit process - // must call the cancel upkeep as the owner to avoid the CANCELLATION_DELAY - for (let ldx = 0; ldx < failingUpkeepIds.length; ldx++) { - await registry - .connect(owner) - .cancelUpkeep(failingUpkeepIds[ldx]) - } + tx = await getTransmitTx( + registry, + keeper1, + passingConditionalUpkeepIds.concat( + passingLogUpkeepIds.concat(failingUpkeepIds), + ), + ) - // Do the actual thing + const receipt = await tx.wait() + const upkeepPerformedLogs = parseUpkeepPerformedLogs(receipt) + // exactly numPassingUpkeeps Upkeep Performed should be emitted + assert.equal( + upkeepPerformedLogs.length, + numPassingConditionalUpkeeps + numPassingLogUpkeeps, + ) - tx = await getTransmitTx( - registry, - keeper1, - passingConditionalUpkeepIds.concat( - passingLogUpkeepIds.concat(failingUpkeepIds), - ), - ) + let netGasUsedPlusChargedOverhead = BigNumber.from('0') + for (let i = 0; i < numPassingConditionalUpkeeps; i++) { + const gasUsed = upkeepPerformedLogs[i].args.gasUsed + const chargedGasOverhead = + upkeepPerformedLogs[i].args.gasOverhead - const receipt = await tx.wait() - const upkeepPerformedLogs = parseUpkeepPerformedLogs(receipt) - // exactly numPassingUpkeeps Upkeep Performed should be emitted - assert.equal( - upkeepPerformedLogs.length, - numPassingConditionalUpkeeps + numPassingLogUpkeeps, - ) + assert.isTrue(gasUsed.gt(BigNumber.from('0'))) + assert.isTrue(chargedGasOverhead.gt(BigNumber.from('0'))) - let netGasUsedPlusChargedOverhead = BigNumber.from('0') - for (let i = 0; i < numPassingConditionalUpkeeps; i++) { - const gasUsed = upkeepPerformedLogs[i].args.gasUsed - const chargedGasOverhead = - upkeepPerformedLogs[i].args.gasOverhead + // Overhead should be same for every upkeep + assert.isTrue( + chargedGasOverhead.eq( + upkeepPerformedLogs[0].args.gasOverhead, + ), + ) + netGasUsedPlusChargedOverhead = netGasUsedPlusChargedOverhead + .add(gasUsed) + .add(chargedGasOverhead) + } - assert.isTrue(gasUsed.gt(BigNumber.from('0'))) - assert.isTrue(chargedGasOverhead.gt(BigNumber.from('0'))) + for (let i = 0; i < numPassingLogUpkeeps; i++) { + const gasUsed = + upkeepPerformedLogs[numPassingConditionalUpkeeps + i].args + .gasUsed + const chargedGasOverhead = + upkeepPerformedLogs[numPassingConditionalUpkeeps + i].args + .gasOverhead + + assert.isTrue(gasUsed.gt(BigNumber.from('0'))) + assert.isTrue(chargedGasOverhead.gt(BigNumber.from('0'))) + + // Overhead should be same for every upkeep + assert.isTrue( + chargedGasOverhead.eq( + upkeepPerformedLogs[numPassingConditionalUpkeeps].args + .gasOverhead, + ), + ) + netGasUsedPlusChargedOverhead = netGasUsedPlusChargedOverhead + .add(gasUsed) + .add(chargedGasOverhead) + } - // Overhead should be same for every upkeep - assert.isTrue( - chargedGasOverhead.eq( - upkeepPerformedLogs[0].args.gasOverhead, - ), + console.log( + 'Gas Benchmarking - batching (passedConditionalUpkeeps: ', + numPassingConditionalUpkeeps, + 'passedLogUpkeeps:', + numPassingLogUpkeeps, + 'failedUpkeeps:', + numFailingUpkeeps, + '): ', + numPassingConditionalUpkeeps > 0 + ? 'charged conditional overhead' + : '', + numPassingConditionalUpkeeps > 0 + ? upkeepPerformedLogs[0].args.gasOverhead.toString() + : '', + numPassingLogUpkeeps > 0 ? 'charged log overhead' : '', + numPassingLogUpkeeps > 0 + ? upkeepPerformedLogs[ + numPassingConditionalUpkeeps + ].args.gasOverhead.toString() + : '', + ' margin over gasUsed', + netGasUsedPlusChargedOverhead.sub(receipt.gasUsed).toString(), ) - netGasUsedPlusChargedOverhead = netGasUsedPlusChargedOverhead - .add(gasUsed) - .add(chargedGasOverhead) - } - - for (let i = 0; i < numPassingLogUpkeeps; i++) { - const gasUsed = - upkeepPerformedLogs[numPassingConditionalUpkeeps + i].args - .gasUsed - const chargedGasOverhead = - upkeepPerformedLogs[numPassingConditionalUpkeeps + i].args - .gasOverhead - assert.isTrue(gasUsed.gt(BigNumber.from('0'))) - assert.isTrue(chargedGasOverhead.gt(BigNumber.from('0'))) - - // Overhead should be same for every upkeep + // The total gas charged should be greater than tx gas assert.isTrue( - chargedGasOverhead.eq( - upkeepPerformedLogs[numPassingConditionalUpkeeps].args - .gasOverhead, - ), + netGasUsedPlusChargedOverhead.gt(receipt.gasUsed), + 'Charged gas overhead is too low for batch upkeeps, increase ACCOUNTING_PER_UPKEEP_GAS_OVERHEAD', ) - netGasUsedPlusChargedOverhead = netGasUsedPlusChargedOverhead - .add(gasUsed) - .add(chargedGasOverhead) - } - - console.log( - 'Gas Benchmarking - batching (passedConditionalUpkeeps: ', - numPassingConditionalUpkeeps, - 'passedLogUpkeeps:', - numPassingLogUpkeeps, - 'failedUpkeeps:', - numFailingUpkeeps, - '): ', - numPassingConditionalUpkeeps > 0 - ? 'charged conditional overhead' - : '', - numPassingConditionalUpkeeps > 0 - ? upkeepPerformedLogs[0].args.gasOverhead.toString() - : '', - numPassingLogUpkeeps > 0 ? 'charged log overhead' : '', - numPassingLogUpkeeps > 0 - ? upkeepPerformedLogs[ - numPassingConditionalUpkeeps - ].args.gasOverhead.toString() - : '', - ' margin over gasUsed', - netGasUsedPlusChargedOverhead.sub(receipt.gasUsed).toString(), - ) - - // The total gas charged should be greater than tx gas - assert.isTrue( - netGasUsedPlusChargedOverhead.gt(receipt.gasUsed), - 'Charged gas overhead is too low for batch upkeeps, increase ACCOUNTING_PER_UPKEEP_GAS_OVERHEAD', - ) - }, - ) + }, + ) + } } } - } - it('has enough perform gas overhead for large batches [ @skip-coverage ]', async () => { - const numUpkeeps = 20 - const upkeepIds: BigNumber[] = [] - let totalPerformGas = BigNumber.from('0') - for (let i = 0; i < numUpkeeps; i++) { - const mock = await upkeepMockFactory.deploy() - const tx = await registry - .connect(owner) - [ - 'registerUpkeep(address,uint32,address,bytes,bytes)' - ](mock.address, performGas, await admin.getAddress(), randomBytes, '0x') - const testUpkeepId = await getUpkeepID(tx) - upkeepIds.push(testUpkeepId) + it.skip('has enough perform gas overhead for large batches [ @skip-coverage ]', async () => { + const numUpkeeps = 20 + const upkeepIds: BigNumber[] = [] + let totalPerformGas = BigNumber.from('0') + for (let i = 0; i < numUpkeeps; i++) { + const mock = await upkeepMockFactory.deploy() + const tx = await registry + .connect(owner) + .registerUpkeep( + mock.address, + performGas, + await admin.getAddress(), + Trigger.CONDITION, + linkToken.address, + '0x', + '0x', + '0x', + ) + const testUpkeepId = await getUpkeepID(tx) + upkeepIds.push(testUpkeepId) - // Add funds to passing upkeeps - await registry.connect(owner).addFunds(testUpkeepId, toWei('10')) + // Add funds to passing upkeeps + await registry.connect(owner).addFunds(testUpkeepId, toWei('10')) - await mock.setCanPerform(true) - await mock.setPerformGasToBurn(performGas) + await mock.setCanPerform(true) + await mock.setPerformGasToBurn(performGas) - totalPerformGas = totalPerformGas.add(performGas) - } + totalPerformGas = totalPerformGas.add(performGas) + } - // Should revert with no overhead added - await evmRevert( - getTransmitTx(registry, keeper1, upkeepIds, { - gasLimit: totalPerformGas, - }), - ) - // Should not revert with overhead added - await getTransmitTx(registry, keeper1, upkeepIds, { - gasLimit: totalPerformGas.add(transmitGasOverhead), + // Should revert with no overhead added + await evmRevert( + getTransmitTx(registry, keeper1, upkeepIds, { + gasLimit: totalPerformGas, + }), + ) + // Should not revert with overhead added + await getTransmitTx(registry, keeper1, upkeepIds, { + gasLimit: totalPerformGas.add(transmitGasOverhead), + }) }) - }) - it('splits l2 payment among performed upkeeps according to perform data weight', async () => { - const numUpkeeps = 7 - const upkeepIds: BigNumber[] = [] - const performDataSizes = [0, 10, 1000, 50, 33, 69, 420] - const performDatas: string[] = [] - const upkeepCalldataWeights: BigNumber[] = [] - let totalCalldataWeight = BigNumber.from('0') - // Same as MockArbGasInfo.sol - const l1CostWeiArb = BigNumber.from(1000000) + it('splits l2 payment among performed upkeeps according to perform data weight', async () => { + const numUpkeeps = 7 + const upkeepIds: BigNumber[] = [] + const performDataSizes = [0, 10, 1000, 50, 33, 69, 420] + const performDatas: string[] = [] + const upkeepCalldataWeights: BigNumber[] = [] + let totalCalldataWeight = BigNumber.from('0') + // Same as MockArbGasInfo.sol + const l1CostWeiArb = BigNumber.from(1000000) - for (let i = 0; i < numUpkeeps; i++) { - const mock = await upkeepMockFactory.deploy() - const tx = await arbRegistry - .connect(owner) - [ - 'registerUpkeep(address,uint32,address,bytes,bytes)' - ](mock.address, performGas, await admin.getAddress(), randomBytes, '0x') - const testUpkeepId = await getUpkeepID(tx) - upkeepIds.push(testUpkeepId) + for (let i = 0; i < numUpkeeps; i++) { + const mock = await upkeepMockFactory.deploy() + const tx = await arbRegistry + .connect(owner) + .registerUpkeep( + mock.address, + performGas, + await admin.getAddress(), + Trigger.CONDITION, + linkToken.address, + '0x', + '0x', + '0x', + ) + const testUpkeepId = await getUpkeepID(tx) + upkeepIds.push(testUpkeepId) - // Add funds to passing upkeeps - await arbRegistry.connect(owner).addFunds(testUpkeepId, toWei('100')) + // Add funds to passing upkeeps + await arbRegistry.connect(owner).addFunds(testUpkeepId, toWei('100')) - // Generate performData - let pd = '0x' - for (let j = 0; j < performDataSizes[i]; j++) { - pd += '11' + // Generate performData + let pd = '0x' + for (let j = 0; j < performDataSizes[i]; j++) { + pd += '11' + } + performDatas.push(pd) + const w = BigNumber.from(performDataSizes[i]) + .add(registryTransmitCalldataFixedBytesOverhead) + .add( + registryTransmitCalldataPerSignerBytesOverhead.mul( + BigNumber.from(f + 1), + ), + ) + upkeepCalldataWeights.push(w) + totalCalldataWeight = totalCalldataWeight.add(w) } - performDatas.push(pd) - const w = BigNumber.from(performDataSizes[i]) - .add(registryTransmitCalldataFixedBytesOverhead) - .add( - registryTransmitCalldataPerSignerBytesOverhead.mul( - BigNumber.from(f + 1), - ), - ) - upkeepCalldataWeights.push(w) - totalCalldataWeight = totalCalldataWeight.add(w) - } - // Do the thing - const tx = await getTransmitTx(arbRegistry, keeper1, upkeepIds, { - gasPrice: gasWei.mul('5'), // High gas price so that it gets capped - performDatas, - }) + // Do the thing + const tx = await getTransmitTx(arbRegistry, keeper1, upkeepIds, { + gasPrice: gasWei.mul('5'), // High gas price so that it gets capped + performDatas, + }) - const receipt = await tx.wait() - const upkeepPerformedLogs = parseUpkeepPerformedLogs(receipt) - // exactly numPassingUpkeeps Upkeep Performed should be emitted - assert.equal(upkeepPerformedLogs.length, numUpkeeps) + const receipt = await tx.wait() + const upkeepPerformedLogs = parseUpkeepPerformedLogs(receipt) + // exactly numPassingUpkeeps Upkeep Performed should be emitted + assert.equal(upkeepPerformedLogs.length, numUpkeeps) - for (let i = 0; i < numUpkeeps; i++) { - const upkeepPerformedLog = upkeepPerformedLogs[i] + for (let i = 0; i < numUpkeeps; i++) { + const upkeepPerformedLog = upkeepPerformedLogs[i] - const gasUsed = upkeepPerformedLog.args.gasUsed - const gasOverhead = upkeepPerformedLog.args.gasOverhead - const totalPayment = upkeepPerformedLog.args.totalPayment + const gasUsed = upkeepPerformedLog.args.gasUsed + const gasOverhead = upkeepPerformedLog.args.gasOverhead + const totalPayment = upkeepPerformedLog.args.totalPayment - assert.equal( - linkForGas( - gasUsed, - gasOverhead, - gasCeilingMultiplier, - paymentPremiumPPB, - flatFeeMicroLink, - l1CostWeiArb.mul(upkeepCalldataWeights[i]).div(totalCalldataWeight), - ).total.toString(), - totalPayment.toString(), - ) - } - }) - }) + assert.equal( + linkForGas( + gasUsed, + gasOverhead, + gasCeilingMultiplier, + paymentPremiumPPB, + flatFeeMicroLink, + l1CostWeiArb + .mul(upkeepCalldataWeights[i]) + .div(totalCalldataWeight), + ).total.toString(), + totalPayment.toString(), + ) + } + }) + }, + ) describe('#recoverFunds', () => { const sent = toWei('7') @@ -2774,9 +2907,16 @@ describe('AutomationRegistry2_3', () => { // add funds to upkeep 1 and perform and withdraw some payment const tx = await registry .connect(owner) - [ - 'registerUpkeep(address,uint32,address,bytes,bytes)' - ](mock.address, performGas, await admin.getAddress(), emptyBytes, emptyBytes) + .registerUpkeep( + mock.address, + performGas, + await admin.getAddress(), + Trigger.CONDITION, + linkToken.address, + '0x', + '0x', + '0x', + ) const id1 = await getUpkeepID(tx) await registry.connect(admin).addFunds(id1, toWei('5')) @@ -2798,9 +2938,16 @@ describe('AutomationRegistry2_3', () => { // add funds to upkeep 2 and perform and withdraw some payment const tx2 = await registry .connect(owner) - [ - 'registerUpkeep(address,uint32,address,bytes,bytes)' - ](mock.address, performGas, await admin.getAddress(), emptyBytes, emptyBytes) + .registerUpkeep( + mock.address, + performGas, + await admin.getAddress(), + Trigger.CONDITION, + linkToken.address, + '0x', + '0x', + '0x', + ) const id2 = await getUpkeepID(tx2) await registry.connect(admin).addFunds(id2, toWei('5')) @@ -2827,26 +2974,6 @@ describe('AutomationRegistry2_3', () => { .connect(admin) .withdrawFunds(id1, await nonkeeper.getAddress()) }) - - it('reverts if not called by owner', async () => { - await evmRevert( - registry.connect(keeper1).recoverFunds(), - 'Only callable by owner', - ) - }) - - it('allows any funds that have been accidentally transfered to be moved', async () => { - const balanceBefore = await linkToken.balanceOf(registry.address) - const ownerBefore = await linkToken.balanceOf(await owner.getAddress()) - - await registry.connect(owner).recoverFunds() - - const balanceAfter = await linkToken.balanceOf(registry.address) - const ownerAfter = await linkToken.balanceOf(await owner.getAddress()) - - assert.isTrue(balanceBefore.eq(balanceAfter.add(sent))) - assert.isTrue(ownerAfter.eq(ownerBefore.add(sent))) - }) }) describe('#getMinBalanceForUpkeep / #checkUpkeep / #transmit', () => { @@ -2878,9 +3005,16 @@ describe('AutomationRegistry2_3', () => { it('uses maxPerformData size in checkUpkeep but actual performDataSize in transmit', async () => { const tx = await registry .connect(owner) - [ - 'registerUpkeep(address,uint32,address,bytes,bytes)' - ](mock.address, performGas, await admin.getAddress(), randomBytes, '0x') + .registerUpkeep( + mock.address, + performGas, + await admin.getAddress(), + Trigger.CONDITION, + linkToken.address, + '0x', + '0x', + '0x', + ) const upkeepID = await getUpkeepID(tx) await mock.setCanCheck(true) await mock.setCanPerform(true) @@ -2892,7 +3026,7 @@ describe('AutomationRegistry2_3', () => { await registry.connect(owner).addFunds(upkeepID, minBalance1) // upkeep check should return false, 2 should return true - let checkUpkeepResult = await registry + const checkUpkeepResult = await registry .connect(zeroAddress) .callStatic['checkUpkeep(uint256)'](upkeepID) assert.equal(checkUpkeepResult.upkeepNeeded, false) @@ -2924,9 +3058,16 @@ describe('AutomationRegistry2_3', () => { beforeEach(async () => { const tx = await registry .connect(owner) - [ - 'registerUpkeep(address,uint32,address,bytes,bytes)' - ](mock.address, performGas, await admin.getAddress(), randomBytes, '0x') + .registerUpkeep( + mock.address, + performGas, + await admin.getAddress(), + Trigger.CONDITION, + linkToken.address, + '0x', + '0x', + '0x', + ) upkeepId2 = await getUpkeepID(tx) await registry.connect(admin).addFunds(upkeepId, toWei('100')) @@ -3209,7 +3350,7 @@ describe('AutomationRegistry2_3', () => { expect(checkUpkeepResult.gasLimit).to.equal(performGas) // Feed data should be returned here assert.isTrue(checkUpkeepResult.fastGasWei.gt(BigNumber.from('0'))) - assert.isTrue(checkUpkeepResult.linkNative.gt(BigNumber.from('0'))) + assert.isTrue(checkUpkeepResult.linkUSD.gt(BigNumber.from('0'))) }) it('returns false, error code, and no revert data if the target check revert data exceeds maxRevertDataSize', async () => { @@ -3292,7 +3433,7 @@ describe('AutomationRegistry2_3', () => { assert.isTrue(checkUpkeepResult.gasUsed.gt(BigNumber.from('0'))) // Some gas should be used expect(checkUpkeepResult.gasLimit).to.equal(performGas) assert.isTrue(checkUpkeepResult.fastGasWei.eq(gasWei)) - assert.isTrue(checkUpkeepResult.linkNative.eq(linkEth)) + assert.isTrue(checkUpkeepResult.linkUSD.eq(linkUSD)) }) it('calls checkLog for log-trigger upkeeps', async () => { @@ -3492,7 +3633,11 @@ describe('AutomationRegistry2_3', () => { assert.equal( expectedFallbackMaxPayment.toString(), ( - await registry.getMaxPaymentForGas(Trigger.CONDITION, performGas) + await registry.getMaxPaymentForGas( + Trigger.CONDITION, + performGas, + linkToken.address, + ) ).toString(), ) @@ -3507,7 +3652,11 @@ describe('AutomationRegistry2_3', () => { assert.equal( expectedFallbackMaxPayment.toString(), ( - await registry.getMaxPaymentForGas(Trigger.CONDITION, performGas) + await registry.getMaxPaymentForGas( + Trigger.CONDITION, + performGas, + linkToken.address, + ) ).toString(), ) @@ -3522,7 +3671,11 @@ describe('AutomationRegistry2_3', () => { assert.equal( expectedFallbackMaxPayment.toString(), ( - await registry.getMaxPaymentForGas(Trigger.CONDITION, performGas) + await registry.getMaxPaymentForGas( + Trigger.CONDITION, + performGas, + linkToken.address, + ) ).toString(), ) }) @@ -3558,14 +3711,18 @@ describe('AutomationRegistry2_3', () => { const answer = 100 let updatedAt = 946684800 // New Years 2000 🥳 let startedAt = 946684799 - await linkEthFeed + await linkUSDFeed .connect(owner) .updateRoundData(roundId, answer, updatedAt, startedAt) assert.equal( expectedFallbackMaxPayment.toString(), ( - await registry.getMaxPaymentForGas(Trigger.CONDITION, performGas) + await registry.getMaxPaymentForGas( + Trigger.CONDITION, + performGas, + linkToken.address, + ) ).toString(), ) @@ -3573,14 +3730,18 @@ describe('AutomationRegistry2_3', () => { roundId = 100 updatedAt = now() startedAt = 946684799 - await linkEthFeed + await linkUSDFeed .connect(owner) .updateRoundData(roundId, -100, updatedAt, startedAt) assert.equal( expectedFallbackMaxPayment.toString(), ( - await registry.getMaxPaymentForGas(Trigger.CONDITION, performGas) + await registry.getMaxPaymentForGas( + Trigger.CONDITION, + performGas, + linkToken.address, + ) ).toString(), ) @@ -3588,14 +3749,18 @@ describe('AutomationRegistry2_3', () => { roundId = 101 updatedAt = now() startedAt = 946684799 - await linkEthFeed + await linkUSDFeed .connect(owner) .updateRoundData(roundId, 0, updatedAt, startedAt) assert.equal( expectedFallbackMaxPayment.toString(), ( - await registry.getMaxPaymentForGas(Trigger.CONDITION, performGas) + await registry.getMaxPaymentForGas( + Trigger.CONDITION, + performGas, + linkToken.address, + ) ).toString(), ) }) @@ -3668,35 +3833,35 @@ describe('AutomationRegistry2_3', () => { const maxGas = BigNumber.from(6) const staleness = BigNumber.from(4) const ceiling = BigNumber.from(5) - const newMinUpkeepSpend = BigNumber.from(9) const newMaxCheckDataSize = BigNumber.from(10000) const newMaxPerformDataSize = BigNumber.from(10000) const newMaxRevertDataSize = BigNumber.from(10000) const newMaxPerformGas = BigNumber.from(10000000) const fbGasEth = BigNumber.from(7) const fbLinkEth = BigNumber.from(8) + const fbNativeEth = BigNumber.from(100) const newTranscoder = randomAddress() const newRegistrars = [randomAddress(), randomAddress()] const upkeepManager = randomAddress() + const financeAdminAddress = randomAddress() const newConfig: OnChainConfig = { - paymentPremiumPPB: payment, - flatFeeMicroLink: flatFee, checkGasLimit: maxGas, stalenessSeconds: staleness, gasCeilingMultiplier: ceiling, - minUpkeepSpend: newMinUpkeepSpend, maxCheckDataSize: newMaxCheckDataSize, maxPerformDataSize: newMaxPerformDataSize, maxRevertDataSize: newMaxRevertDataSize, maxPerformGas: newMaxPerformGas, fallbackGasPrice: fbGasEth, fallbackLinkPrice: fbLinkEth, + fallbackNativePrice: fbNativeEth, transcoder: newTranscoder, registrars: newRegistrars, upkeepPrivilegeManager: upkeepManager, chainModule: chainModuleBase.address, reorgProtectionEnabled: true, + financeAdmin: financeAdminAddress, } it('reverts when called by anyone but the proposed owner', async () => { @@ -3710,6 +3875,8 @@ describe('AutomationRegistry2_3', () => { newConfig, offchainVersion, offchainBytes, + baseConfig[6], + baseConfig[7], ), 'Only callable by owner', ) @@ -3731,6 +3898,8 @@ describe('AutomationRegistry2_3', () => { newConfig, offchainVersion, offchainBytes, + baseConfig[6], + baseConfig[7], ), 'InvalidSigner()', ) @@ -3750,6 +3919,8 @@ describe('AutomationRegistry2_3', () => { newConfig, offchainVersion, offchainBytes, + baseConfig[6], + baseConfig[7], ), 'InvalidTransmitter()', ) @@ -3773,6 +3944,8 @@ describe('AutomationRegistry2_3', () => { newConfig, offchainVersion, offchainBytes, + [], + [], ) const updated = await registry.getState() @@ -3782,10 +3955,6 @@ describe('AutomationRegistry2_3', () => { assert.equal(updatedConfig.flatFeeMicroLink, flatFee.toNumber()) assert.equal(updatedConfig.stalenessSeconds, staleness.toNumber()) assert.equal(updatedConfig.gasCeilingMultiplier, ceiling.toNumber()) - assert.equal( - updatedConfig.minUpkeepSpend.toString(), - newMinUpkeepSpend.toString(), - ) assert.equal( updatedConfig.maxCheckDataSize, newMaxCheckDataSize.toNumber(), @@ -3836,6 +4005,8 @@ describe('AutomationRegistry2_3', () => { newConfig, offchainVersion, offchainBytes, + [], + [], ) const updated = await registry.getState() @@ -3852,6 +4023,8 @@ describe('AutomationRegistry2_3', () => { newConfig, offchainVersion, offchainBytes, + [], + [], ) await expect(tx).to.emit(registry, 'ConfigSet') }) @@ -3880,6 +4053,8 @@ describe('AutomationRegistry2_3', () => { config, offchainVersion, offchainBytes, + baseConfig[6], + baseConfig[7], ), 'Only callable by owner', ) @@ -3899,6 +4074,8 @@ describe('AutomationRegistry2_3', () => { config, offchainVersion, offchainBytes, + baseConfig[6], + baseConfig[7], ), 'TooManyOracles()', ) @@ -3915,6 +4092,8 @@ describe('AutomationRegistry2_3', () => { config, offchainVersion, offchainBytes, + baseConfig[6], + baseConfig[7], ), 'IncorrectNumberOfFaultyOracles()', ) @@ -3932,6 +4111,8 @@ describe('AutomationRegistry2_3', () => { config, offchainVersion, offchainBytes, + baseConfig[6], + baseConfig[7], ), 'IncorrectNumberOfSigners()', ) @@ -3949,6 +4130,8 @@ describe('AutomationRegistry2_3', () => { config, offchainVersion, offchainBytes, + baseConfig[6], + baseConfig[7], ), 'IncorrectNumberOfSigners()', ) @@ -3971,6 +4154,8 @@ describe('AutomationRegistry2_3', () => { config, offchainVersion, offchainBytes, + baseConfig[6], + baseConfig[7], ), 'RepeatedSigner()', ) @@ -3993,6 +4178,8 @@ describe('AutomationRegistry2_3', () => { config, offchainVersion, offchainBytes, + baseConfig[6], + baseConfig[7], ), 'RepeatedTransmitter()', ) @@ -4021,6 +4208,8 @@ describe('AutomationRegistry2_3', () => { config, newOffChainVersion, newOffChainConfig, + [], + [], ) const updated = await registry.getState() @@ -4118,9 +4307,16 @@ describe('AutomationRegistry2_3', () => { await evmRevert( registry .connect(owner) - [ - 'registerUpkeep(address,uint32,address,bytes,bytes)' - ](mock.address, performGas, await admin.getAddress(), emptyBytes, '0x'), + .registerUpkeep( + mock.address, + performGas, + await admin.getAddress(), + Trigger.CONDITION, + linkToken.address, + '0x', + '0x', + '0x', + ), 'RegistryPaused()', ) }) @@ -4129,9 +4325,16 @@ describe('AutomationRegistry2_3', () => { await evmRevert( registry .connect(owner) - [ - 'registerUpkeep(address,uint32,address,bytes,bytes)' - ](zeroAddress, performGas, await admin.getAddress(), emptyBytes, '0x'), + .registerUpkeep( + zeroAddress, + performGas, + await admin.getAddress(), + Trigger.CONDITION, + linkToken.address, + '0x', + '0x', + '0x', + ), 'NotAContract()', ) }) @@ -4140,9 +4343,16 @@ describe('AutomationRegistry2_3', () => { await evmRevert( registry .connect(keeper1) - [ - 'registerUpkeep(address,uint32,address,bytes,bytes)' - ](mock.address, performGas, await admin.getAddress(), emptyBytes, '0x'), + .registerUpkeep( + mock.address, + performGas, + await admin.getAddress(), + Trigger.CONDITION, + linkToken.address, + '0x', + '0x', + '0x', + ), 'OnlyCallableByOwnerOrRegistrar()', ) }) @@ -4151,9 +4361,16 @@ describe('AutomationRegistry2_3', () => { await evmRevert( registry .connect(owner) - [ - 'registerUpkeep(address,uint32,address,bytes,bytes)' - ](mock.address, 2299, await admin.getAddress(), emptyBytes, '0x'), + .registerUpkeep( + mock.address, + 2299, + await admin.getAddress(), + Trigger.CONDITION, + linkToken.address, + '0x', + '0x', + '0x', + ), 'GasLimitOutsideRange()', ) }) @@ -4162,9 +4379,16 @@ describe('AutomationRegistry2_3', () => { await evmRevert( registry .connect(owner) - [ - 'registerUpkeep(address,uint32,address,bytes,bytes)' - ](mock.address, 5000001, await admin.getAddress(), emptyBytes, '0x'), + .registerUpkeep( + mock.address, + 5000001, + await admin.getAddress(), + Trigger.CONDITION, + linkToken.address, + '0x', + '0x', + '0x', + ), 'GasLimitOutsideRange()', ) }) @@ -4177,13 +4401,42 @@ describe('AutomationRegistry2_3', () => { await evmRevert( registry .connect(owner) - [ - 'registerUpkeep(address,uint32,address,bytes,bytes)' - ](mock.address, performGas, await admin.getAddress(), longBytes, '0x'), + .registerUpkeep( + mock.address, + performGas, + await admin.getAddress(), + Trigger.CONDITION, + linkToken.address, + longBytes, + '0x', + '0x', + ), 'CheckDataExceedsLimit()', ) }) + it('reverts if the billing token is not configured', async () => { + let longBytes = '0x' + for (let i = 0; i < 10000; i++) { + longBytes += '1' + } + await evmRevert( + registry + .connect(owner) + .registerUpkeep( + mock.address, + performGas, + await admin.getAddress(), + Trigger.CONDITION, + randomAddress(), + '0x', + '0x', + '0x', + ), + 'InvalidBillingToken()', + ) + }) + it('creates a record of the registration', async () => { const performGases = [100000, 500000] const checkDatas = [emptyBytes, '0x12'] @@ -4194,9 +4447,16 @@ describe('AutomationRegistry2_3', () => { const checkData = checkDatas[kdx] const tx = await registry .connect(owner) - [ - 'registerUpkeep(address,uint32,address,bytes,bytes)' - ](mock.address, performGas, await admin.getAddress(), checkData, '0x') + .registerUpkeep( + mock.address, + performGas, + await admin.getAddress(), + Trigger.CONDITION, + linkToken.address, + checkData, + '0x', + '0x', + ) //confirm the upkeep details and verify emitted events const testUpkeepId = await getUpkeepID(tx) @@ -4230,6 +4490,10 @@ describe('AutomationRegistry2_3', () => { assert.equal(registration.paused, false) assert.equal(registration.offchainConfig, '0x') assert(registration.maxValidBlocknumber.eq('0xffffffff')) + assert.equal( + await registry.getBillingToken(testUpkeepId), + linkToken.address, + ) } } }) @@ -4657,42 +4921,52 @@ describe('AutomationRegistry2_3', () => { }) describe('#withdrawOwnerFunds', () => { - it('can only be called by owner', async () => { + it('can only be called by finance admin', async () => { await evmRevert( - registry.connect(keeper1).withdrawOwnerFunds(), - 'Only callable by owner', + registry.connect(keeper1).withdrawLinkFees(zeroAddress, 1), + 'OnlyFinanceAdmin()', ) }) itMaybe('withdraws the collected fees to owner', async () => { await registry.connect(admin).addFunds(upkeepId, toWei('100')) + const financeAdminAddress = await financeAdmin.getAddress() // Very high min spend, whole balance as cancellation fees - const minUpkeepSpend = toWei('1000') + const newMinUpkeepSpend = toWei('1000') await registry.connect(owner).setConfigTypeSafe( signerAddresses, keeperAddresses, f, { - paymentPremiumPPB, - flatFeeMicroLink, checkGasLimit, stalenessSeconds, gasCeilingMultiplier, - minUpkeepSpend, maxCheckDataSize, maxPerformDataSize, maxRevertDataSize, maxPerformGas, fallbackGasPrice, fallbackLinkPrice, + fallbackNativePrice, transcoder: transcoder.address, registrars: [], upkeepPrivilegeManager: upkeepManager, chainModule: chainModuleBase.address, reorgProtectionEnabled: true, + financeAdmin: financeAdminAddress, }, offchainVersion, offchainBytes, + [linkToken.address], + [ + { + gasFeePPB: paymentPremiumPPB, + flatFeeMicroLink, + priceFeed: linkUSDFeed.address, + fallbackPrice: fallbackLinkPrice, + minSpend: newMinUpkeepSpend, + }, + ], ) const upkeepBalance = (await registry.getUpkeep(upkeepId)).balance const ownerBefore = await linkToken.balanceOf(await owner.getAddress()) @@ -4700,14 +4974,15 @@ describe('AutomationRegistry2_3', () => { await registry.connect(owner).cancelUpkeep(upkeepId) // Transfered to owner balance on registry - let ownerRegistryBalance = (await registry.getState()).state - .ownerLinkBalance + let ownerRegistryBalance = await registry.linkAvailableForPayment() assert.isTrue(ownerRegistryBalance.eq(upkeepBalance)) // Now withdraw - await registry.connect(owner).withdrawOwnerFunds() + await registry + .connect(financeAdmin) + .withdrawLinkFees(await owner.getAddress(), ownerRegistryBalance) - ownerRegistryBalance = (await registry.getState()).state.ownerLinkBalance + ownerRegistryBalance = await registry.linkAvailableForPayment() const ownerAfter = await linkToken.balanceOf(await owner.getAddress()) // Owner registry balance should be changed to 0 @@ -4859,9 +5134,16 @@ describe('AutomationRegistry2_3', () => { await evmRevert( registry .connect(owner) - [ - 'registerUpkeep(address,uint32,address,bytes,bytes)' - ](mock.address, performGas, await admin.getAddress(), emptyBytes, '0x'), + .registerUpkeep( + mock.address, + performGas, + await admin.getAddress(), + Trigger.CONDITION, + linkToken.address, + '0x', + '0x', + '0x', + ), 'RegistryPaused()', ) }) @@ -4934,9 +5216,9 @@ describe('AutomationRegistry2_3', () => { expect((await mgRegistry.getUpkeep(upkeepId)).balance).to.equal( toWei('100'), ) - expect( - (await mgRegistry.getState()).state.expectedLinkBalance, - ).to.equal(toWei('100')) + expect(await mgRegistry.getReserveAmount(linkToken.address)).to.equal( + toWei('100'), + ) expect((await mgRegistry.getUpkeep(upkeepId)).checkData).to.equal( randomBytes, ) @@ -4986,9 +5268,9 @@ describe('AutomationRegistry2_3', () => { expect((await mgRegistry.getUpkeep(upkeepId)).checkData).to.equal( randomBytes, ) - expect( - (await mgRegistry.getState()).state.expectedLinkBalance, - ).to.equal(toWei('100')) + expect(await mgRegistry.getReserveAmount(linkToken.address)).to.equal( + toWei('100'), + ) // verify the upkeep is still paused after migration expect((await mgRegistry.getUpkeep(upkeepId)).paused).to.equal(true) }) @@ -5070,7 +5352,7 @@ describe('AutomationRegistry2_3', () => { }) it('reverts if the payee is the zero address', async () => { - await blankRegistry.connect(owner).setConfig(...baseConfig) // used to test initial config + await blankRegistry.connect(owner).setConfigTypeSafe(...baseConfig) // used to test initial config await evmRevert( blankRegistry // used to test initial config @@ -5084,7 +5366,7 @@ describe('AutomationRegistry2_3', () => { 'sets the payees when exisitng payees are zero address', async () => { //Initial payees should be zero address - await blankRegistry.connect(owner).setConfig(...baseConfig) // used to test initial config + await blankRegistry.connect(owner).setConfigTypeSafe(...baseConfig) // used to test initial config for (let i = 0; i < keeperAddresses.length; i++) { const payee = ( @@ -5123,6 +5405,8 @@ describe('AutomationRegistry2_3', () => { config, offchainVersion, offchainBytes, + [], + [], ) // arbitrum registry // set initial payees // optimism registry @@ -5138,6 +5422,8 @@ describe('AutomationRegistry2_3', () => { config, offchainVersion, offchainBytes, + [], + [], ) // arbitrum registry // update payee list // optimism registry // arbitrum registry @@ -5307,44 +5593,54 @@ describe('AutomationRegistry2_3', () => { await getTransmitTx(registry, keeper1, [upkeepId]) }) - it('deducts a cancellation fee from the upkeep and gives to owner', async () => { - const minUpkeepSpend = toWei('10') + it('deducts a cancellation fee from the upkeep and adds to reserve', async () => { + const newMinUpkeepSpend = toWei('10') + const financeAdminAddress = await financeAdmin.getAddress() await registry.connect(owner).setConfigTypeSafe( signerAddresses, keeperAddresses, f, { - paymentPremiumPPB, - flatFeeMicroLink, checkGasLimit, stalenessSeconds, gasCeilingMultiplier, - minUpkeepSpend, maxCheckDataSize, maxPerformDataSize, maxRevertDataSize, maxPerformGas, fallbackGasPrice, fallbackLinkPrice, + fallbackNativePrice, transcoder: transcoder.address, registrars: [], upkeepPrivilegeManager: upkeepManager, chainModule: chainModuleBase.address, reorgProtectionEnabled: true, + financeAdmin: financeAdminAddress, }, offchainVersion, offchainBytes, + [linkToken.address], + [ + { + gasFeePPB: paymentPremiumPPB, + flatFeeMicroLink, + priceFeed: linkUSDFeed.address, + fallbackPrice: fallbackLinkPrice, + minSpend: newMinUpkeepSpend, + }, + ], ) const payee1Before = await linkToken.balanceOf( await payee1.getAddress(), ) const upkeepBefore = (await registry.getUpkeep(upkeepId)).balance - const ownerBefore = (await registry.getState()).state.ownerLinkBalance + const ownerBefore = await registry.linkAvailableForPayment() const amountSpent = toWei('100').sub(upkeepBefore) - const cancellationFee = minUpkeepSpend.sub(amountSpent) + const cancellationFee = newMinUpkeepSpend.sub(amountSpent) await registry.connect(admin).cancelUpkeep(upkeepId) @@ -5352,7 +5648,7 @@ describe('AutomationRegistry2_3', () => { await payee1.getAddress(), ) const upkeepAfter = (await registry.getUpkeep(upkeepId)).balance - const ownerAfter = (await registry.getState()).state.ownerLinkBalance + const ownerAfter = await registry.linkAvailableForPayment() // post upkeep balance should be previous balance minus cancellation fee assert.isTrue(upkeepBefore.sub(cancellationFee).eq(upkeepAfter)) @@ -5364,44 +5660,55 @@ describe('AutomationRegistry2_3', () => { it('deducts up to balance as cancellation fee', async () => { // Very high min spend, should deduct whole balance as cancellation fees - const minUpkeepSpend = toWei('1000') + const newMinUpkeepSpend = toWei('1000') + const financeAdminAddress = await financeAdmin.getAddress() + await registry.connect(owner).setConfigTypeSafe( signerAddresses, keeperAddresses, f, { - paymentPremiumPPB, - flatFeeMicroLink, checkGasLimit, stalenessSeconds, gasCeilingMultiplier, - minUpkeepSpend, maxCheckDataSize, maxPerformDataSize, maxRevertDataSize, maxPerformGas, fallbackGasPrice, fallbackLinkPrice, + fallbackNativePrice, transcoder: transcoder.address, registrars: [], upkeepPrivilegeManager: upkeepManager, chainModule: chainModuleBase.address, reorgProtectionEnabled: true, + financeAdmin: financeAdminAddress, }, offchainVersion, offchainBytes, + [linkToken.address], + [ + { + gasFeePPB: paymentPremiumPPB, + flatFeeMicroLink, + priceFeed: linkUSDFeed.address, + fallbackPrice: fallbackLinkPrice, + minSpend: newMinUpkeepSpend, + }, + ], ) const payee1Before = await linkToken.balanceOf( await payee1.getAddress(), ) const upkeepBefore = (await registry.getUpkeep(upkeepId)).balance - const ownerBefore = (await registry.getState()).state.ownerLinkBalance + const ownerBefore = await registry.linkAvailableForPayment() await registry.connect(admin).cancelUpkeep(upkeepId) const payee1After = await linkToken.balanceOf( await payee1.getAddress(), ) - const ownerAfter = (await registry.getState()).state.ownerLinkBalance + const ownerAfter = await registry.linkAvailableForPayment() const upkeepAfter = (await registry.getUpkeep(upkeepId)).balance // all upkeep balance is deducted for cancellation fee @@ -5412,46 +5719,57 @@ describe('AutomationRegistry2_3', () => { assert.isTrue(ownerAfter.sub(ownerBefore).eq(upkeepBefore)) }) - it('does not deduct cancellation fee if more than minUpkeepSpend is spent', async () => { + it('does not deduct cancellation fee if more than minUpkeepSpendDollars is spent', async () => { // Very low min spend, already spent in one perform upkeep - const minUpkeepSpend = BigNumber.from(420) + const newMinUpkeepSpend = BigNumber.from(420) + const financeAdminAddress = await financeAdmin.getAddress() + await registry.connect(owner).setConfigTypeSafe( signerAddresses, keeperAddresses, f, { - paymentPremiumPPB, - flatFeeMicroLink, checkGasLimit, stalenessSeconds, gasCeilingMultiplier, - minUpkeepSpend, maxCheckDataSize, maxPerformDataSize, maxRevertDataSize, maxPerformGas, fallbackGasPrice, fallbackLinkPrice, + fallbackNativePrice, transcoder: transcoder.address, registrars: [], upkeepPrivilegeManager: upkeepManager, chainModule: chainModuleBase.address, reorgProtectionEnabled: true, + financeAdmin: financeAdminAddress, }, offchainVersion, offchainBytes, + [linkToken.address], + [ + { + gasFeePPB: paymentPremiumPPB, + flatFeeMicroLink, + priceFeed: linkUSDFeed.address, + fallbackPrice: fallbackLinkPrice, + minSpend: newMinUpkeepSpend, + }, + ], ) const payee1Before = await linkToken.balanceOf( await payee1.getAddress(), ) const upkeepBefore = (await registry.getUpkeep(upkeepId)).balance - const ownerBefore = (await registry.getState()).state.ownerLinkBalance + const ownerBefore = await registry.linkAvailableForPayment() await registry.connect(admin).cancelUpkeep(upkeepId) const payee1After = await linkToken.balanceOf( await payee1.getAddress(), ) - const ownerAfter = (await registry.getState()).state.ownerLinkBalance + const ownerAfter = await registry.linkAvailableForPayment() const upkeepAfter = (await registry.getUpkeep(upkeepId)).balance // upkeep does not pay cancellation fee after cancellation because minimum upkeep spent is met @@ -5503,7 +5821,7 @@ describe('AutomationRegistry2_3', () => { const registryLinkBefore = await linkToken.balanceOf(registry.address) const registryPremiumBefore = (await registry.getState()).state .totalPremium - const ownerBefore = (await registry.getState()).state.ownerLinkBalance + const ownerBefore = await registry.linkAvailableForPayment() // Withdrawing for first time, last collected = 0 assert.equal(keeperBefore.lastCollected.toString(), '0') @@ -5521,7 +5839,7 @@ describe('AutomationRegistry2_3', () => { const registryLinkAfter = await linkToken.balanceOf(registry.address) const registryPremiumAfter = (await registry.getState()).state .totalPremium - const ownerAfter = (await registry.getState()).state.ownerLinkBalance + const ownerAfter = await registry.linkAvailableForPayment() // registry total premium should not change assert.isTrue(registryPremiumBefore.eq(registryPremiumAfter)) @@ -5783,102 +6101,104 @@ describe('AutomationRegistry2_3', () => { assert.isTrue(k2New.lastCollected.eq(BigNumber.from(0))) }) - itMaybe( - 'maintains consistent balance information across all parties', - async () => { - // throughout transmits, withdrawals, setConfigs total claim on balances should remain less than expected balance - // some spare change can get lost but it should be less than maxAllowedSpareChange + // itMaybe( + it('maintains consistent balance information across all parties', async () => { + // throughout transmits, withdrawals, setConfigs total claim on balances should remain less than expected balance + // some spare change can get lost but it should be less than maxAllowedSpareChange - let maxAllowedSpareChange = BigNumber.from('0') - await verifyConsistentAccounting(maxAllowedSpareChange) + let maxAllowedSpareChange = BigNumber.from('0') + await verifyConsistentAccounting(maxAllowedSpareChange) - await getTransmitTx(registry, keeper1, [upkeepId]) - maxAllowedSpareChange = maxAllowedSpareChange.add(BigNumber.from('31')) - await verifyConsistentAccounting(maxAllowedSpareChange) - - await registry - .connect(payee1) - .withdrawPayment( - await keeper1.getAddress(), - await nonkeeper.getAddress(), - ) - await verifyConsistentAccounting(maxAllowedSpareChange) - - await registry - .connect(payee2) - .withdrawPayment( - await keeper2.getAddress(), - await nonkeeper.getAddress(), - ) - await verifyConsistentAccounting(maxAllowedSpareChange) + await getTransmitTx(registry, keeper1, [upkeepId]) + maxAllowedSpareChange = maxAllowedSpareChange.add(BigNumber.from('31')) + await verifyConsistentAccounting(maxAllowedSpareChange) - await getTransmitTx(registry, keeper1, [upkeepId]) - maxAllowedSpareChange = maxAllowedSpareChange.add(BigNumber.from('31')) - await verifyConsistentAccounting(maxAllowedSpareChange) + await registry + .connect(payee1) + .withdrawPayment( + await keeper1.getAddress(), + await nonkeeper.getAddress(), + ) + await verifyConsistentAccounting(maxAllowedSpareChange) - await registry.connect(owner).setConfigTypeSafe( - signerAddresses.slice(2, 15), // only use 2-14th index keepers - keeperAddresses.slice(2, 15), - f, - config, - offchainVersion, - offchainBytes, + await registry + .connect(payee2) + .withdrawPayment( + await keeper2.getAddress(), + await nonkeeper.getAddress(), ) - await verifyConsistentAccounting(maxAllowedSpareChange) + await verifyConsistentAccounting(maxAllowedSpareChange) - await getTransmitTx(registry, keeper3, [upkeepId], { - startingSignerIndex: 2, - }) - maxAllowedSpareChange = maxAllowedSpareChange.add(BigNumber.from('13')) - await verifyConsistentAccounting(maxAllowedSpareChange) + await getTransmitTx(registry, keeper1, [upkeepId]) + maxAllowedSpareChange = maxAllowedSpareChange.add(BigNumber.from('31')) + await verifyConsistentAccounting(maxAllowedSpareChange) - await registry - .connect(payee1) - .withdrawPayment( - await keeper1.getAddress(), - await nonkeeper.getAddress(), - ) - await verifyConsistentAccounting(maxAllowedSpareChange) + await registry.connect(owner).setConfigTypeSafe( + signerAddresses.slice(2, 15), // only use 2-14th index keepers + keeperAddresses.slice(2, 15), + f, + config, + offchainVersion, + offchainBytes, + baseConfig[6], + baseConfig[7], + ) + await verifyConsistentAccounting(maxAllowedSpareChange) - await registry - .connect(payee3) - .withdrawPayment( - await keeper3.getAddress(), - await nonkeeper.getAddress(), - ) - await verifyConsistentAccounting(maxAllowedSpareChange) + await getTransmitTx(registry, keeper3, [upkeepId], { + startingSignerIndex: 2, + }) + maxAllowedSpareChange = maxAllowedSpareChange.add(BigNumber.from('13')) + await verifyConsistentAccounting(maxAllowedSpareChange) - await registry.connect(owner).setConfigTypeSafe( - signerAddresses.slice(0, 4), // only use 0-3rd index keepers - keeperAddresses.slice(0, 4), - f, - config, - offchainVersion, - offchainBytes, + await registry + .connect(payee1) + .withdrawPayment( + await keeper1.getAddress(), + await nonkeeper.getAddress(), ) - await verifyConsistentAccounting(maxAllowedSpareChange) - await getTransmitTx(registry, keeper1, [upkeepId]) - maxAllowedSpareChange = maxAllowedSpareChange.add(BigNumber.from('4')) - await getTransmitTx(registry, keeper3, [upkeepId]) - maxAllowedSpareChange = maxAllowedSpareChange.add(BigNumber.from('4')) + await verifyConsistentAccounting(maxAllowedSpareChange) - await verifyConsistentAccounting(maxAllowedSpareChange) - await registry - .connect(payee5) - .withdrawPayment( - await keeper5.getAddress(), - await nonkeeper.getAddress(), - ) - await verifyConsistentAccounting(maxAllowedSpareChange) + await registry + .connect(payee3) + .withdrawPayment( + await keeper3.getAddress(), + await nonkeeper.getAddress(), + ) + await verifyConsistentAccounting(maxAllowedSpareChange) - await registry - .connect(payee1) - .withdrawPayment( - await keeper1.getAddress(), - await nonkeeper.getAddress(), - ) - await verifyConsistentAccounting(maxAllowedSpareChange) - }, - ) + await registry.connect(owner).setConfigTypeSafe( + signerAddresses.slice(0, 4), // only use 0-3rd index keepers + keeperAddresses.slice(0, 4), + f, + config, + offchainVersion, + offchainBytes, + baseConfig[6], + baseConfig[7], + ) + await verifyConsistentAccounting(maxAllowedSpareChange) + await getTransmitTx(registry, keeper1, [upkeepId]) + maxAllowedSpareChange = maxAllowedSpareChange.add(BigNumber.from('4')) + await getTransmitTx(registry, keeper3, [upkeepId]) + maxAllowedSpareChange = maxAllowedSpareChange.add(BigNumber.from('4')) + + await verifyConsistentAccounting(maxAllowedSpareChange) + await registry + .connect(payee5) + .withdrawPayment( + await keeper5.getAddress(), + await nonkeeper.getAddress(), + ) + await verifyConsistentAccounting(maxAllowedSpareChange) + + await registry + .connect(payee1) + .withdrawPayment( + await keeper1.getAddress(), + await nonkeeper.getAddress(), + ) + await verifyConsistentAccounting(maxAllowedSpareChange) + }) }) }) diff --git a/contracts/test/v0.8/automation/IAutomationRegistryMaster2_2.test.ts b/contracts/test/v0.8/automation/IAutomationRegistryMaster2_2.test.ts new file mode 100644 index 00000000000..0c1e34a1167 --- /dev/null +++ b/contracts/test/v0.8/automation/IAutomationRegistryMaster2_2.test.ts @@ -0,0 +1,116 @@ +import fs from 'fs' +import { ethers } from 'hardhat' +import { assert } from 'chai' +import { AutomationRegistry2_2__factory as AutomationRegistryFactory } from '../../../typechain/factories/AutomationRegistry2_2__factory' +import { AutomationRegistryLogicA2_2__factory as AutomationRegistryLogicAFactory } from '../../../typechain/factories/AutomationRegistryLogicA2_2__factory' +import { AutomationRegistryLogicB2_2__factory as AutomationRegistryLogicBFactory } from '../../../typechain/factories/AutomationRegistryLogicB2_2__factory' +import { AutomationRegistryBase2_2__factory as AutomationRegistryBaseFactory } from '../../../typechain/factories/AutomationRegistryBase2_2__factory' +import { Chainable__factory as ChainableFactory } from '../../../typechain/factories/Chainable__factory' +import { IAutomationRegistryMaster__factory as IAutomationRegistryMasterFactory } from '../../../typechain/factories/IAutomationRegistryMaster__factory' +import { IAutomationRegistryConsumer__factory as IAutomationRegistryConsumerFactory } from '../../../typechain/factories/IAutomationRegistryConsumer__factory' +import { MigratableKeeperRegistryInterface__factory as MigratableKeeperRegistryInterfaceFactory } from '../../../typechain/factories/MigratableKeeperRegistryInterface__factory' +import { MigratableKeeperRegistryInterfaceV2__factory as MigratableKeeperRegistryInterfaceV2Factory } from '../../../typechain/factories/MigratableKeeperRegistryInterfaceV2__factory' +import { OCR2Abstract__factory as OCR2AbstractFactory } from '../../../typechain/factories/OCR2Abstract__factory' +import { IAutomationV21PlusCommon__factory as IAutomationV21PlusCommonFactory } from '../../../typechain/factories/IAutomationV21PlusCommon__factory' +import { + assertSatisfiesEvents, + assertSatisfiesInterface, + entryID, +} from './helpers' + +const compositeABIs = [ + AutomationRegistryFactory.abi, + AutomationRegistryLogicAFactory.abi, + AutomationRegistryLogicBFactory.abi, +] + +/** + * @dev because the keeper master interface is a composite of several different contracts, + * it is possible that an interface could be satisfied by functions across different + * contracts, and therefore not enforceable by the compiler directly. Instead, we use this + * test to assert that the master interface satisfies the constraints of an individual interface + */ +describe('IAutomationRegistryMaster2_2', () => { + it('is up to date', async () => { + const checksum = ethers.utils.id(compositeABIs.join('')) + const knownChecksum = fs + .readFileSync( + 'src/v0.8/automation/interfaces/v2_2/IAutomationRegistryMaster.sol', + ) + .toString() + .slice(17, 83) // checksum located at top of file + assert.equal( + checksum, + knownChecksum, + 'master interface is out of date - regenerate using "pnpm ts-node ./scripts/generate-automation-master-interface.ts"', + ) + }) + + it('is generated from composite contracts without competing definitions', async () => { + const sharedEntries = [ + ...ChainableFactory.abi, + ...AutomationRegistryBaseFactory.abi, + ] + const abiSet = new Set() + const sharedSet = new Set() + for (const entry of sharedEntries) { + sharedSet.add(entryID(entry)) + } + for (const abi of compositeABIs) { + for (const entry of abi) { + const id = entryID(entry) + if (!abiSet.has(id)) { + abiSet.add(id) + } else if (!sharedSet.has(id)) { + assert.fail( + `composite contracts contain duplicate entry: ${JSON.stringify( + entry, + )}`, + ) + } + } + } + }) + + it('satisfies the IAutomationRegistryConsumer interface', async () => { + assertSatisfiesInterface( + IAutomationRegistryMasterFactory.abi, + IAutomationRegistryConsumerFactory.abi, + ) + }) + + it('satisfies the MigratableKeeperRegistryInterface interface', async () => { + assertSatisfiesInterface( + IAutomationRegistryMasterFactory.abi, + MigratableKeeperRegistryInterfaceFactory.abi, + ) + }) + + it('satisfies the MigratableKeeperRegistryInterfaceV2 interface', async () => { + assertSatisfiesInterface( + IAutomationRegistryMasterFactory.abi, + MigratableKeeperRegistryInterfaceV2Factory.abi, + ) + }) + + it('satisfies the OCR2Abstract interface', async () => { + assertSatisfiesInterface( + IAutomationRegistryMasterFactory.abi, + OCR2AbstractFactory.abi, + ) + }) + + it('satisfies the IAutomationV2Common interface', async () => { + assertSatisfiesInterface( + IAutomationRegistryMasterFactory.abi, + IAutomationV21PlusCommonFactory.abi, + ) + }) + + it('satisfies the IAutomationV2Common events', async () => { + assertSatisfiesEvents( + IAutomationRegistryMasterFactory.abi, + IAutomationV21PlusCommonFactory.abi, + ) + }) +}) diff --git a/contracts/test/v0.8/automation/IAutomationRegistryMaster2_3.test.ts b/contracts/test/v0.8/automation/IAutomationRegistryMaster2_3.test.ts new file mode 100644 index 00000000000..a7ac4cebd4c --- /dev/null +++ b/contracts/test/v0.8/automation/IAutomationRegistryMaster2_3.test.ts @@ -0,0 +1,118 @@ +import fs from 'fs' +import { ethers } from 'hardhat' +import { assert } from 'chai' +import { AutomationRegistry2_3__factory as AutomationRegistryFactory } from '../../../typechain/factories/AutomationRegistry2_3__factory' +import { AutomationRegistryLogicA2_3__factory as AutomationRegistryLogicAFactory } from '../../../typechain/factories/AutomationRegistryLogicA2_3__factory' +import { AutomationRegistryLogicB2_3__factory as AutomationRegistryLogicBFactory } from '../../../typechain/factories/AutomationRegistryLogicB2_3__factory' +import { AutomationRegistryLogicC2_3__factory as AutomationRegistryLogicCFactory } from '../../../typechain/factories/AutomationRegistryLogicC2_3__factory' +import { AutomationRegistryBase2_3__factory as AutomationRegistryBaseFactory } from '../../../typechain/factories/AutomationRegistryBase2_3__factory' +import { Chainable__factory as ChainableFactory } from '../../../typechain/factories/Chainable__factory' +import { IAutomationRegistryMaster2_3__factory as IAutomationRegistryMasterFactory } from '../../../typechain/factories/IAutomationRegistryMaster2_3__factory' +import { IAutomationRegistryConsumer__factory as IAutomationRegistryConsumerFactory } from '../../../typechain/factories/IAutomationRegistryConsumer__factory' +import { MigratableKeeperRegistryInterface__factory as MigratableKeeperRegistryInterfaceFactory } from '../../../typechain/factories/MigratableKeeperRegistryInterface__factory' +import { MigratableKeeperRegistryInterfaceV2__factory as MigratableKeeperRegistryInterfaceV2Factory } from '../../../typechain/factories/MigratableKeeperRegistryInterfaceV2__factory' +import { OCR2Abstract__factory as OCR2AbstractFactory } from '../../../typechain/factories/OCR2Abstract__factory' +import { IAutomationV21PlusCommon__factory as IAutomationV21PlusCommonFactory } from '../../../typechain/factories/IAutomationV21PlusCommon__factory' +import { + assertSatisfiesEvents, + assertSatisfiesInterface, + entryID, +} from './helpers' + +const compositeABIs = [ + AutomationRegistryFactory.abi, + AutomationRegistryLogicAFactory.abi, + AutomationRegistryLogicBFactory.abi, + AutomationRegistryLogicCFactory.abi, +] + +/** + * @dev because the keeper master interface is a composite of several different contracts, + * it is possible that an interface could be satisfied by functions across different + * contracts, and therefore not enforceable by the compiler directly. Instead, we use this + * test to assert that the master interface satisfies the constraints of an individual interface + */ +describe('IAutomationRegistryMaster2_3', () => { + it('is up to date', async () => { + const checksum = ethers.utils.id(compositeABIs.join('')) + const knownChecksum = fs + .readFileSync( + 'src/v0.8/automation/dev/interfaces/v2_3/IAutomationRegistryMaster2_3.sol', + ) + .toString() + .slice(17, 83) // checksum located at top of file + assert.equal( + checksum, + knownChecksum, + 'master interface is out of date - regenerate using "pnpm ts-node ./scripts/generate-automation-master-interface2_3.ts"', + ) + }) + + it('is generated from composite contracts without competing definitions', async () => { + const sharedEntries = [ + ...ChainableFactory.abi, + ...AutomationRegistryBaseFactory.abi, + ] + const abiSet = new Set() + const sharedSet = new Set() + for (const entry of sharedEntries) { + sharedSet.add(entryID(entry)) + } + for (const abi of compositeABIs) { + for (const entry of abi) { + const id = entryID(entry) + if (!abiSet.has(id)) { + abiSet.add(id) + } else if (!sharedSet.has(id)) { + assert.fail( + `composite contracts contain duplicate entry: ${JSON.stringify( + entry, + )}`, + ) + } + } + } + }) + + it('satisfies the IAutomationRegistryConsumer interface', async () => { + assertSatisfiesInterface( + IAutomationRegistryMasterFactory.abi, + IAutomationRegistryConsumerFactory.abi, + ) + }) + + it('satisfies the MigratableKeeperRegistryInterface interface', async () => { + assertSatisfiesInterface( + IAutomationRegistryMasterFactory.abi, + MigratableKeeperRegistryInterfaceFactory.abi, + ) + }) + + it('satisfies the MigratableKeeperRegistryInterfaceV2 interface', async () => { + assertSatisfiesInterface( + IAutomationRegistryMasterFactory.abi, + MigratableKeeperRegistryInterfaceV2Factory.abi, + ) + }) + + it('satisfies the OCR2Abstract interface', async () => { + assertSatisfiesInterface( + IAutomationRegistryMasterFactory.abi, + OCR2AbstractFactory.abi, + ) + }) + + it('satisfies the IAutomationV2Common interface', async () => { + assertSatisfiesInterface( + IAutomationRegistryMasterFactory.abi, + IAutomationV21PlusCommonFactory.abi, + ) + }) + + it('satisfies the IAutomationV2Common events', async () => { + assertSatisfiesEvents( + IAutomationRegistryMasterFactory.abi, + IAutomationV21PlusCommonFactory.abi, + ) + }) +}) diff --git a/contracts/test/v0.8/automation/IKeeperRegistryMaster.test.ts b/contracts/test/v0.8/automation/IKeeperRegistryMaster.test.ts index bd4b24e54c6..f894aa87cdc 100644 --- a/contracts/test/v0.8/automation/IKeeperRegistryMaster.test.ts +++ b/contracts/test/v0.8/automation/IKeeperRegistryMaster.test.ts @@ -1,7 +1,6 @@ import fs from 'fs' import { ethers } from 'hardhat' import { assert } from 'chai' -import { FunctionFragment } from '@ethersproject/abi' import { KeeperRegistry2_1__factory as KeeperRegistryFactory } from '../../../typechain/factories/KeeperRegistry2_1__factory' import { KeeperRegistryLogicA2_1__factory as KeeperRegistryLogicAFactory } from '../../../typechain/factories/KeeperRegistryLogicA2_1__factory' import { KeeperRegistryLogicB2_1__factory as KeeperRegistryLogicBFactory } from '../../../typechain/factories/KeeperRegistryLogicB2_1__factory' @@ -12,15 +11,12 @@ import { IAutomationRegistryConsumer__factory as IAutomationRegistryConsumerFact import { MigratableKeeperRegistryInterface__factory as MigratableKeeperRegistryInterfaceFactory } from '../../../typechain/factories/MigratableKeeperRegistryInterface__factory' import { MigratableKeeperRegistryInterfaceV2__factory as MigratableKeeperRegistryInterfaceV2Factory } from '../../../typechain/factories/MigratableKeeperRegistryInterfaceV2__factory' import { OCR2Abstract__factory as OCR2AbstractFactory } from '../../../typechain/factories/OCR2Abstract__factory' - -type Entry = { - inputs?: any[] - outputs?: any[] - name?: string - type: string -} - -type InterfaceABI = ConstructorParameters[0] +import { IAutomationV21PlusCommon__factory as IAutomationV21PlusCommonFactory } from '../../../typechain/factories/IAutomationV21PlusCommon__factory' +import { + assertSatisfiesEvents, + assertSatisfiesInterface, + entryID, +} from './helpers' const compositeABIs = [ KeeperRegistryFactory.abi, @@ -28,60 +24,12 @@ const compositeABIs = [ KeeperRegistryLogicBFactory.abi, ] -function entryID(entry: Entry) { - // remove "internal type" and "name" since they don't affect the ability - // of a contract to satisfy an interface - const preimage = Object.assign({}, entry) - if (entry.inputs) { - preimage.inputs = entry.inputs.map(({ type }) => ({ - type, - })) - } - if (entry.outputs) { - preimage.outputs = entry.outputs.map(({ type }) => ({ - type, - })) - } - return ethers.utils.id(JSON.stringify(preimage)) -} - /** - * @dev because the keeper master interface is a composit of several different contracts, - * it is possible that a interface could be satisfied by functions across different - * contracts, and therefore not enforcable by the compiler directly. Instead, we use this - * test to assert that the master interface satisfies the contraints of an individual interface + * @dev because the keeper master interface is a composite of several different contracts, + * it is possible that an interface could be satisfied by functions across different + * contracts, and therefore not enforceable by the compiler directly. Instead, we use this + * test to assert that the master interface satisfies the constraints of an individual interface */ -function assertSatisfiesInterface( - contractABI: InterfaceABI, - expectedABI: InterfaceABI, -) { - const implementer = new ethers.utils.Interface(contractABI) - const expected = new ethers.utils.Interface(expectedABI) - for (const functionName in expected.functions) { - if ( - Object.prototype.hasOwnProperty.call(expected, functionName) && - functionName.match('^.+(.*)$') // only match typed function sigs - ) { - assert.isDefined( - implementer.functions[functionName], - `missing function ${functionName}`, - ) - const propertiesToMatch: (keyof FunctionFragment)[] = [ - 'constant', - 'stateMutability', - 'payable', - ] - for (const property of propertiesToMatch) { - assert.equal( - implementer.functions[functionName][property], - expected.functions[functionName][property], - `property ${property} does not match for function ${functionName}`, - ) - } - } - } -} - describe('IKeeperRegistryMaster', () => { it('is up to date', async () => { const checksum = ethers.utils.id(compositeABIs.join('')) @@ -151,4 +99,18 @@ describe('IKeeperRegistryMaster', () => { OCR2AbstractFactory.abi, ) }) + + it('satisfies the IAutomationV2Common interface', async () => { + assertSatisfiesInterface( + IKeeperRegistryMasterFactory.abi, + IAutomationV21PlusCommonFactory.abi, + ) + }) + + it('satisfies the IAutomationV2Common events', async () => { + assertSatisfiesEvents( + IKeeperRegistryMasterFactory.abi, + IAutomationV21PlusCommonFactory.abi, + ) + }) }) diff --git a/contracts/test/v0.8/automation/KeeperRegistry1_2.test.ts b/contracts/test/v0.8/automation/KeeperRegistry1_2.test.ts index 31d1ba297e0..7da13b9e266 100644 --- a/contracts/test/v0.8/automation/KeeperRegistry1_2.test.ts +++ b/contracts/test/v0.8/automation/KeeperRegistry1_2.test.ts @@ -28,7 +28,7 @@ import { toWei } from '../../test-helpers/helpers' const BYTECODE = KeeperRegistryFactory.bytecode const BYTECODE_CHECKSUM = - '0x8e465b93eae52724b7edbef5bc133c96520dad33f959373e5d026549ca40158c' + '0x4a23953416a64a0fa4c943954d9a92059f862257440f2cbcf5f238314b89f416' describe('KeeperRegistry1_2 - Frozen [ @skip-coverage ]', () => { it('has not changed', () => { diff --git a/contracts/test/v0.8/automation/helpers.ts b/contracts/test/v0.8/automation/helpers.ts index a7b6a582966..5ea612e66f1 100644 --- a/contracts/test/v0.8/automation/helpers.ts +++ b/contracts/test/v0.8/automation/helpers.ts @@ -6,6 +6,11 @@ import { IKeeperRegistryMaster__factory as IKeeperRegistryMasterFactory } from ' import { AutomationRegistryLogicB2_2__factory as AutomationRegistryLogicBFactory } from '../../../typechain/factories/AutomationRegistryLogicB2_2__factory' import { IAutomationRegistryMaster as IAutomationRegistry } from '../../../typechain/IAutomationRegistryMaster' import { IAutomationRegistryMaster__factory as IAutomationRegistryMasterFactory } from '../../../typechain/factories/IAutomationRegistryMaster__factory' +import { assert } from 'chai' +import { FunctionFragment } from '@ethersproject/abi' +import { AutomationRegistryLogicC2_3__factory as AutomationRegistryLogicC2_3Factory } from '../../../typechain/factories/AutomationRegistryLogicC2_3__factory' +import { IAutomationRegistryMaster2_3 as IAutomationRegistry2_3 } from '../../../typechain/IAutomationRegistryMaster2_3' +import { IAutomationRegistryMaster2_3__factory as IAutomationRegistryMaster2_3Factory } from '../../../typechain/factories/IAutomationRegistryMaster2_3__factory' export const deployRegistry21 = async ( from: Signer, @@ -33,6 +38,92 @@ export const deployRegistry21 = async ( return IKeeperRegistryMasterFactory.connect(master.address, from) } +type InterfaceABI = ConstructorParameters[0] +type Entry = { + inputs?: any[] + outputs?: any[] + name?: string + type: string +} + +export const assertSatisfiesEvents = ( + contractABI: InterfaceABI, + expectedABI: InterfaceABI, +) => { + const implementer = new ethers.utils.Interface(contractABI) + const expected = new ethers.utils.Interface(expectedABI) + for (const eventName in expected.events) { + assert.isDefined( + implementer.events[eventName], + `missing event: ${eventName}`, + ) + } +} + +export const entryID = (entry: Entry) => { + // remove "internal type" and "name" since they don't affect the ability + // of a contract to satisfy an interface + const preimage = Object.assign({}, entry) + if (entry.inputs) { + preimage.inputs = entry.inputs.map(({ type }) => ({ + type, + })) + } + if (entry.outputs) { + preimage.outputs = entry.outputs.map(({ type }) => ({ + type, + })) + } + return ethers.utils.id(JSON.stringify(preimage)) +} + +export const assertSatisfiesInterface = ( + contractABI: InterfaceABI, + expectedABI: InterfaceABI, +) => { + const implementer = new ethers.utils.Interface(contractABI) + const expected = new ethers.utils.Interface(expectedABI) + for (const functionName in expected.functions) { + assert.isDefined( + implementer.functions[functionName], + `missing function ${functionName}`, + ) + + // these are technically pure in those interfaces. but in the master interface, they are view functions + // bc the underlying contracts define constants for these values and return them in these getters + if ( + functionName === 'typeAndVersion()' || + functionName === 'upkeepVersion()' || + functionName === 'upkeepTranscoderVersion()' + ) { + assert.equal( + implementer.functions[functionName].constant, + expected.functions[functionName].constant, + `property constant does not match for function ${functionName}`, + ) + assert.equal( + implementer.functions[functionName].payable, + expected.functions[functionName].payable, + `property payable does not match for function ${functionName}`, + ) + continue + } + + const propertiesToMatch: (keyof FunctionFragment)[] = [ + 'constant', + 'stateMutability', + 'payable', + ] + for (const property of propertiesToMatch) { + assert.equal( + implementer.functions[functionName][property], + expected.functions[functionName][property], + `property ${property} does not match for function ${functionName}`, + ) + } + } +} + export const deployRegistry22 = async ( from: Signer, link: Parameters[0], @@ -71,13 +162,17 @@ export const deployRegistry22 = async ( export const deployRegistry23 = async ( from: Signer, - link: Parameters[0], - linkNative: Parameters[1], - fastgas: Parameters[2], + link: Parameters[0], + linkUSD: Parameters[1], + nativeUSD: Parameters[2], + fastgas: Parameters[2], allowedReadOnlyAddress: Parameters< - AutomationRegistryLogicBFactory['deploy'] + AutomationRegistryLogicC2_3Factory['deploy'] >[3], -): Promise => { +): Promise => { + const logicCFactory = await ethers.getContractFactory( + 'AutomationRegistryLogicC2_3', + ) const logicBFactory = await ethers.getContractFactory( 'AutomationRegistryLogicB2_3', ) @@ -91,16 +186,18 @@ export const deployRegistry23 = async ( 'AutomationForwarderLogic', ) const forwarderLogic = await forwarderLogicFactory.connect(from).deploy() - const logicB = await logicBFactory + const logicC = await logicCFactory .connect(from) .deploy( link, - linkNative, + linkUSD, + nativeUSD, fastgas, forwarderLogic.address, allowedReadOnlyAddress, ) + const logicB = await logicBFactory.connect(from).deploy(logicC.address) const logicA = await logicAFactory.connect(from).deploy(logicB.address) const master = await registryFactory.connect(from).deploy(logicA.address) - return IAutomationRegistryMasterFactory.connect(master.address, from) + return IAutomationRegistryMaster2_3Factory.connect(master.address, from) } diff --git a/contracts/test/v0.8/foundry/vrf/VRFV2Plus.t.sol b/contracts/test/v0.8/foundry/vrf/VRFV2Plus.t.sol index 7fbbd788bdd..3a00878f8b2 100644 --- a/contracts/test/v0.8/foundry/vrf/VRFV2Plus.t.sol +++ b/contracts/test/v0.8/foundry/vrf/VRFV2Plus.t.sol @@ -10,8 +10,10 @@ import {SubscriptionAPI} from "../../../../src/v0.8/vrf/dev/SubscriptionAPI.sol" import {BlockhashStore} from "../../../../src/v0.8/vrf/dev/BlockhashStore.sol"; import {VRFV2PlusConsumerExample} from "../../../../src/v0.8/vrf/dev/testhelpers/VRFV2PlusConsumerExample.sol"; import {VRFV2PlusClient} from "../../../../src/v0.8/vrf/dev/libraries/VRFV2PlusClient.sol"; +import {VRFTypes} from "../../../../src/v0.8/vrf/VRFTypes.sol"; import {console} from "forge-std/console.sol"; import {VmSafe} from "forge-std/Vm.sol"; +import {VRFV2PlusLoadTestWithMetrics} from "../../../../src/v0.8/vrf/dev/testhelpers/VRFV2PlusLoadTestWithMetrics.sol"; import "@openzeppelin/contracts/utils/math/Math.sol"; // for Math.ceilDiv /* @@ -25,6 +27,9 @@ import "@openzeppelin/contracts/utils/math/Math.sol"; // for Math.ceilDiv contract VRFV2Plus is BaseTest { address internal constant LINK_WHALE = 0xD883a6A1C22fC4AbFE938a5aDF9B2Cc31b1BF18B; uint64 internal constant GAS_LANE_MAX_GAS = 5000 gwei; + uint16 internal constant MIN_CONFIRMATIONS = 0; + uint32 internal constant CALLBACK_GAS_LIMIT = 1_000_000; + uint32 internal constant NUM_WORDS = 1; // Bytecode for a VRFV2PlusConsumerExample contract. // to calculate: console.logBytes(type(VRFV2PlusConsumerExample).creationCode); @@ -136,7 +141,7 @@ contract VRFV2Plus is BaseTest { ); // Test that setting link discount flat fee higher than native flat fee reverts - vm.expectRevert(abi.encodeWithSelector(VRFCoordinatorV2_5.LinkDiscountTooHigh.selector, uint32(1000), uint32(500))); + vm.expectRevert(abi.encodeWithSelector(VRFCoordinatorV2_5.LinkDiscountTooHigh.selector, uint32(501), uint32(500))); s_testCoordinator.setConfig( 0, @@ -145,10 +150,57 @@ contract VRFV2Plus is BaseTest { 50_000, 500, 500, // fulfillmentFlatFeeNativePPM - 1000, // fulfillmentFlatFeeLinkDiscountPPM + 501, // fulfillmentFlatFeeLinkDiscountPPM 15, // nativePremiumPercentage 10 // linkPremiumPercentage ); + + // // Test that setting link discount flat fee equal to native flat fee does not revert + s_testCoordinator.setConfig( + 0, + 2_500_000, + 1, + 50_000, + 500, + 450, // fulfillmentFlatFeeNativePPM + 450, // fulfillmentFlatFeeLinkDiscountPPM + 15, // nativePremiumPercentage + 10 // linkPremiumPercentage + ); + + // Test that setting native premium percentage higher than 155 will revert + vm.expectRevert( + abi.encodeWithSelector(VRFCoordinatorV2_5.InvalidPremiumPercentage.selector, uint8(156), uint8(155)) + ); + + s_testCoordinator.setConfig( + 0, + 2_500_000, + 1, + 50_000, + 500, + 500_000, // fulfillmentFlatFeeNativePPM + 100_000, // fulfillmentFlatFeeLinkDiscountPPM + 156, // nativePremiumPercentage + 10 // linkPremiumPercentage + ); + + // Test that setting LINK premium percentage higher than 155 will revert + vm.expectRevert( + abi.encodeWithSelector(VRFCoordinatorV2_5.InvalidPremiumPercentage.selector, uint8(202), uint8(155)) + ); + + s_testCoordinator.setConfig( + 0, + 2_500_000, + 1, + 50_000, + 500, + 500_000, // fulfillmentFlatFeeNativePPM + 100_000, // fulfillmentFlatFeeLinkDiscountPPM + 15, // nativePremiumPercentage + 202 // linkPremiumPercentage + ); } function testRegisterProvingKey() public { @@ -179,6 +231,7 @@ contract VRFV2Plus is BaseTest { assertTrue(exists); assertEq(GAS_LANE_MAX_GAS, maxGas); assertEq(s_testCoordinator.s_provingKeyHashes(0), keyHash); + assertEq(keyHash, vrfKeyHash); } function testDeregisterProvingKey() public { @@ -316,11 +369,12 @@ contract VRFV2Plus is BaseTest { bytes extraArgs, bool success ); + event FallbackWeiPerUnitLinkUsed(uint256 requestId, int256 fallbackWeiPerUnitLink); function testRequestAndFulfillRandomWordsNative() public { ( VRF.Proof memory proof, - VRFCoordinatorV2_5.RequestCommitment memory rc, + VRFTypes.RequestCommitmentV2Plus memory rc, uint256 subId, uint256 requestId ) = setupSubAndRequestRandomnessNativePayment(); @@ -356,12 +410,13 @@ contract VRFV2Plus is BaseTest { // 1e15 is less than 1 percent discrepancy assertApproxEqAbs(payment, 5.138 * 1e17, 1e15); assertApproxEqAbs(nativeBalanceAfter, nativeBalanceBefore - 5.138 * 1e17, 1e15); + assertFalse(s_testCoordinator.pendingRequestExists(subId)); } function testRequestAndFulfillRandomWordsLINK() public { ( VRF.Proof memory proof, - VRFCoordinatorV2_5.RequestCommitment memory rc, + VRFTypes.RequestCommitmentV2Plus memory rc, uint256 subId, uint256 requestId ) = setupSubAndRequestRandomnessLINKPayment(); @@ -381,30 +436,52 @@ contract VRFV2Plus is BaseTest { (bool fulfilled, , ) = s_testConsumer.s_requests(requestId); assertEq(fulfilled, true); - // The cost of fulfillRandomWords is approximately 97_000 gas. + // The cost of fulfillRandomWords is approximately 86_000 gas. // gasAfterPaymentCalculation is 50_000. // // The cost of the VRF fulfillment charged to the user is: // paymentNoFee = (weiPerUnitGas * (gasAfterPaymentCalculation + startGas - gasleft() + l1CostWei) / link_native_ratio) - // paymentNoFee = (1e11 * (50_000 + 97_000 + 0)) / .5 - // paymentNoFee = 2.94e16 + // paymentNoFee = (1e11 * (50_000 + 86_000 + 0)) / .5 + // paymentNoFee = 2.72e16 // flatFeeWei = 1e12 * (fulfillmentFlatFeeNativePPM - fulfillmentFlatFeeLinkDiscountPPM) // flatFeeWei = 1e12 * (500_000 - 100_000) // flatFeeJuels = 1e18 * flatFeeWei / link_native_ratio // flatFeeJuels = 4e17 / 0.5 = 8e17 // billed_fee = paymentNoFee * ((100 + 10) / 100) + 8e17 - // billed_fee = 2.94e16 * 1.1 + 8e17 - // billed_fee = 3.234e16 + 8e17 = 8.3234e17 + // billed_fee = 2.72e16 * 1.1 + 8e17 + // billed_fee = 2.992e16 + 8e17 = 8.2992e17 // note: delta is doubled from the native test to account for more variance due to the link/native ratio (uint96 linkBalanceAfter, , , , ) = s_testCoordinator.getSubscription(subId); // 1e15 is less than 1 percent discrepancy - assertApproxEqAbs(payment, 8.3234 * 1e17, 1e15); - assertApproxEqAbs(linkBalanceAfter, linkBalanceBefore - 8.3234 * 1e17, 1e15); + assertApproxEqAbs(payment, 8.2992 * 1e17, 1e15); + assertApproxEqAbs(linkBalanceAfter, linkBalanceBefore - 8.2992 * 1e17, 1e15); + assertFalse(s_testCoordinator.pendingRequestExists(subId)); + } + + function testRequestAndFulfillRandomWordsLINK_FallbackWeiPerUnitLinkUsed() public { + ( + VRF.Proof memory proof, + VRFTypes.RequestCommitmentV2Plus memory rc, + , + uint256 requestId + ) = setupSubAndRequestRandomnessLINKPayment(); + + (, , , uint32 stalenessSeconds, , , , , ) = s_testCoordinator.s_config(); + int256 fallbackWeiPerUnitLink = s_testCoordinator.s_fallbackWeiPerUnitLink(); + + // Set the link feed to be stale. + (uint80 roundId, int256 answer, uint256 startedAt, , ) = s_linkNativeFeed.latestRoundData(); + uint256 timestamp = block.timestamp - stalenessSeconds - 1; + s_linkNativeFeed.updateRoundData(roundId, answer, timestamp, startedAt); + + vm.expectEmit(false, false, false, true, address(s_testCoordinator)); + emit FallbackWeiPerUnitLinkUsed(requestId, fallbackWeiPerUnitLink); + s_testCoordinator.fulfillRandomWords(proof, rc, false); } function setupSubAndRequestRandomnessLINKPayment() internal - returns (VRF.Proof memory proof, VRFCoordinatorV2_5.RequestCommitment memory rc, uint256 subId, uint256 requestId) + returns (VRF.Proof memory proof, VRFTypes.RequestCommitmentV2Plus memory rc, uint256 subId, uint256 requestId) { uint32 requestBlock = 20; vm.roll(requestBlock); @@ -419,21 +496,22 @@ contract VRFV2Plus is BaseTest { // Request random words. vm.expectEmit(true, true, false, true); uint256 preSeed; - (requestId, preSeed) = s_testCoordinator.computeRequestIdExternal(vrfKeyHash, address(s_testConsumer), subId, 2); + (requestId, preSeed) = s_testCoordinator.computeRequestIdExternal(vrfKeyHash, address(s_testConsumer), subId, 1); emit RandomWordsRequested( vrfKeyHash, requestId, preSeed, subId, - 0, // minConfirmations - 1_000_000, // callbackGasLimit - 1, // numWords + MIN_CONFIRMATIONS, + CALLBACK_GAS_LIMIT, + NUM_WORDS, VRFV2PlusClient._argsToBytes(VRFV2PlusClient.ExtraArgsV1({nativePayment: false})), // nativePayment, // nativePayment address(s_testConsumer) // requester ); - s_testConsumer.requestRandomWords(1_000_000, 0, 1, vrfKeyHash, false); + s_testConsumer.requestRandomWords(CALLBACK_GAS_LIMIT, MIN_CONFIRMATIONS, NUM_WORDS, vrfKeyHash, false); (bool fulfilled, , ) = s_testConsumer.s_requests(requestId); assertEq(fulfilled, false); + assertTrue(s_testCoordinator.pendingRequestExists(subId)); // Uncomment these console logs to see info about the request: // console.log("requestId: ", requestId); @@ -451,7 +529,7 @@ contract VRFV2Plus is BaseTest { /* go run . generate-proof-v2-plus \ -key-hash 0x9f2353bde94264dbc3d554a94cceba2d7d2b4fdce4304d3e09a1fea9fbeb1528 \ - -pre-seed 108233140904510496268355288815996296196427471042093167619305836589216327096601 \ + -pre-seed 58424872742560034068603954318478134981993109073728628043159461959392650534066 \ -block-hash 0x0000000000000000000000000000000000000000000000000000000000000014 \ -block-num 20 \ -sender 0x90A8820424CC8a819d14cBdE54D12fD3fbFa9bb2 @@ -462,24 +540,24 @@ contract VRFV2Plus is BaseTest { 62070622898698443831883535403436258712770888294397026493185421712108624767191 ], gamma: [ - 49785247270467418393187938018746488660500261614113251546613288843777654841004, - 8320717868018488740308781441198484312662094766876176838868269181386589318272 + 38041205470219573731614166317842050442610096576830191475863676359766283013831, + 31897503406364148988967447112698248795931483458172800286988696482435433838056 ], - c: 41596204381278553342984662603150353549780558761307588910860350083645227536604, - s: 81592778991188138734863787790226463602813498664606420860910885269124681994753, - seed: 108233140904510496268355288815996296196427471042093167619305836589216327096601, - uWitness: 0x56920892EE71E624d369dCc8dc63B6878C85Ca70, + c: 114706080610174375269579192101772790158458728655229562781479812703475130740224, + s: 91869928024010088265014058436030407245056128545665425448353233998362687232253, + seed: 58424872742560034068603954318478134981993109073728628043159461959392650534066, + uWitness: 0x1514536B09a51E671d070312bcD3653386d5a82b, cGammaWitness: [ - 28250667431035633903490940933503696927659499415200427260709034207157951953043, - 105660182690338773283351292037478192732977803900032569393220726139772041021018 + 90605489216274499662544489893800286859751132311034850249229378789467669572783, + 76568417372883461229305641415175605031997103681542349721251313705711146936024 ], sHashWitness: [ - 18420263847278540234821121001488166570853056146131705862117248292063859054211, - 15740432967529684573970722302302642068194042971767150190061244675457227502736 + 43417948503950579681520475434461454031791886587406480417092620950034789197994, + 100772571879140362396088596211082924128900752544164141322636815729889228000249 ], - zInv: 100579074451139970455673776933943662313989441807178260211316504761358492254052 + zInv: 82374292458278672300647114418593830323283909625362447038989596015264004164958 }); - rc = VRFCoordinatorV2_5.RequestCommitment({ + rc = VRFTypes.RequestCommitmentV2Plus({ blockNum: requestBlock, subId: subId, callbackGasLimit: 1000000, @@ -492,7 +570,7 @@ contract VRFV2Plus is BaseTest { function setupSubAndRequestRandomnessNativePayment() internal - returns (VRF.Proof memory proof, VRFCoordinatorV2_5.RequestCommitment memory rc, uint256 subId, uint256 requestId) + returns (VRF.Proof memory proof, VRFTypes.RequestCommitmentV2Plus memory rc, uint256 subId, uint256 requestId) { uint32 requestBlock = 10; vm.roll(requestBlock); @@ -507,21 +585,22 @@ contract VRFV2Plus is BaseTest { // Request random words. vm.expectEmit(true, true, true, true); uint256 preSeed; - (requestId, preSeed) = s_testCoordinator.computeRequestIdExternal(vrfKeyHash, address(s_testConsumer), subId, 2); + (requestId, preSeed) = s_testCoordinator.computeRequestIdExternal(vrfKeyHash, address(s_testConsumer), subId, 1); emit RandomWordsRequested( vrfKeyHash, requestId, preSeed, subId, - 0, // minConfirmations - 1_000_000, // callbackGasLimit - 1, // numWords + MIN_CONFIRMATIONS, + CALLBACK_GAS_LIMIT, + NUM_WORDS, VRFV2PlusClient._argsToBytes(VRFV2PlusClient.ExtraArgsV1({nativePayment: true})), // nativePayment address(s_testConsumer) // requester ); - s_testConsumer.requestRandomWords(1_000_000, 0, 1, vrfKeyHash, true); + s_testConsumer.requestRandomWords(CALLBACK_GAS_LIMIT, MIN_CONFIRMATIONS, NUM_WORDS, vrfKeyHash, true); (bool fulfilled, , ) = s_testConsumer.s_requests(requestId); assertEq(fulfilled, false); + assertTrue(s_testCoordinator.pendingRequestExists(subId)); // Uncomment these console logs to see info about the request: // console.log("requestId: ", requestId); @@ -539,7 +618,7 @@ contract VRFV2Plus is BaseTest { /* go run . generate-proof-v2-plus \ -key-hash 0x9f2353bde94264dbc3d554a94cceba2d7d2b4fdce4304d3e09a1fea9fbeb1528 \ - -pre-seed 93724884573574303181157854277074121673523280784530506403108144933983063023487 \ + -pre-seed 83266692323404068105564931899467966321583332182309426611016082057597749986430 \ -block-hash 0x000000000000000000000000000000000000000000000000000000000000000a \ -block-num 10 \ -sender 0x90A8820424CC8a819d14cBdE54D12fD3fbFa9bb2 \ @@ -551,27 +630,27 @@ contract VRFV2Plus is BaseTest { 62070622898698443831883535403436258712770888294397026493185421712108624767191 ], gamma: [ - 51111463251706978184511913295560024261167135799300172382907308330135472647507, - 41885656274025752055847945432737871864088659248922821023734315208027501951872 + 47144451677122876068574640250190132179872561942855874114516471019540736524783, + 63001220656590641645486673489302242739512599229187442248048295264418080499391 ], - c: 96917856581077810363012153828220232197567408835708926581335248000925197916153, - s: 103298896676233752268329042222773891728807677368628421408380318882272184455566, - seed: 93724884573574303181157854277074121673523280784530506403108144933983063023487, - uWitness: 0xFCaA10875C6692f6CcC86c64300eb0b52f2D4323, + c: 42928477813589729783511577059394077774341588261592343937605454161333818133643, + s: 14447529458406454898597883219032514356523135029224613793880920230249515634875, + seed: 83266692323404068105564931899467966321583332182309426611016082057597749986430, + uWitness: 0x5Ed3bb2AA8EAFe168a23079644d5dfBf892B1038, cGammaWitness: [ - 61463607927970680172418313129927007099021056249775757132623753443657677198526, - 48686021866486086188742596461341782400160109177829661164208082534005682984658 + 40742088032247467257043132769297935807697466810312051815364187117543257089153, + 110399474382135664619186049639190334359061769014381608543009407662815758204131 ], sHashWitness: [ - 91508089836242281395929619352465003226819385335975246221498243754781593857533, - 63571625936444669399167157725633389238098818902162172059681813608664564703308 + 26556776392895292893984393164594214244553035014769995354896600239759043777485, + 67126706735912782218279556535631175449291035782208850310724682668198932501077 ], - zInv: 97568175302326019383632009699686265453584842953005404815285123863099260038246 + zInv: 88742453392918610091640193378775723954629905126315835248392650970979000380325 }); - rc = VRFCoordinatorV2_5.RequestCommitment({ + rc = VRFTypes.RequestCommitmentV2Plus({ blockNum: requestBlock, subId: subId, - callbackGasLimit: 1_000_000, + callbackGasLimit: CALLBACK_GAS_LIMIT, numWords: 1, sender: address(s_testConsumer), extraArgs: VRFV2PlusClient._argsToBytes(VRFV2PlusClient.ExtraArgsV1({nativePayment: true})) @@ -583,7 +662,7 @@ contract VRFV2Plus is BaseTest { function testRequestAndFulfillRandomWords_NetworkGasPriceExceedsGasLane() public { ( VRF.Proof memory proof, - VRFCoordinatorV2_5.RequestCommitment memory rc, + VRFTypes.RequestCommitmentV2Plus memory rc, , ) = setupSubAndRequestRandomnessNativePayment(); @@ -600,7 +679,7 @@ contract VRFV2Plus is BaseTest { function testRequestAndFulfillRandomWords_OnlyPremium_NativePayment() public { ( VRF.Proof memory proof, - VRFCoordinatorV2_5.RequestCommitment memory rc, + VRFTypes.RequestCommitmentV2Plus memory rc, uint256 subId, uint256 requestId ) = setupSubAndRequestRandomnessNativePayment(); @@ -641,12 +720,13 @@ contract VRFV2Plus is BaseTest { // 1e15 is less than 1 percent discrepancy assertApproxEqAbs(payment, 5.9 * 1e17, 1e15); assertApproxEqAbs(nativeBalanceAfter, nativeBalanceBefore - 5.9 * 1e17, 1e15); + assertFalse(s_testCoordinator.pendingRequestExists(subId)); } function testRequestAndFulfillRandomWords_OnlyPremium_LinkPayment() public { ( VRF.Proof memory proof, - VRFCoordinatorV2_5.RequestCommitment memory rc, + VRFTypes.RequestCommitmentV2Plus memory rc, uint256 subId, uint256 requestId ) = setupSubAndRequestRandomnessLINKPayment(); @@ -670,25 +750,350 @@ contract VRFV2Plus is BaseTest { (bool fulfilled, , ) = s_testConsumer.s_requests(requestId); assertEq(fulfilled, true); - // The cost of fulfillRandomWords is approximately 97_000 gas. + // The cost of fulfillRandomWords is approximately 86_000 gas. // gasAfterPaymentCalculation is 50_000. // // The cost of the VRF fulfillment charged to the user is: // paymentNoFee = (weiPerUnitGas * (gasAfterPaymentCalculation + startGas - gasleft() + l1CostWei) / link_native_ratio) // network gas price is capped at gas lane max gas (5000 gwei) - // paymentNoFee = (5e12 * (50_000 + 97_000 + 0)) / .5 - // paymentNoFee = 1.47e+18 + // paymentNoFee = (5e12 * (50_000 + 86_000 + 0)) / .5 + // paymentNoFee = 1.36e+18 // flatFeeWei = 1e12 * (fulfillmentFlatFeeNativePPM - fulfillmentFlatFeeLinkDiscountPPM) // flatFeeWei = 1e12 * (500_000 - 100_000) // flatFeeJuels = 1e18 * flatFeeWei / link_native_ratio // flatFeeJuels = 4e17 / 0.5 = 8e17 // billed_fee = paymentNoFee * (10 / 100) + 8e17 - // billed_fee = 1.47e+18 * 0.1 + 8e17 - // billed_fee = 9.47e+17 + // billed_fee = 1.36e+18 * 0.1 + 8e17 + // billed_fee = 9.36e+17 // note: delta is doubled from the native test to account for more variance due to the link/native ratio (uint96 linkBalanceAfter, , , , ) = s_testCoordinator.getSubscription(subId); // 1e15 is less than 1 percent discrepancy - assertApproxEqAbs(payment, 9.47 * 1e17, 1e15); - assertApproxEqAbs(linkBalanceAfter, linkBalanceBefore - 9.47 * 1e17, 1e15); + assertApproxEqAbs(payment, 9.36 * 1e17, 1e15); + assertApproxEqAbs(linkBalanceAfter, linkBalanceBefore - 9.36 * 1e17, 1e15); + assertFalse(s_testCoordinator.pendingRequestExists(subId)); + } + + function testRequestRandomWords_InvalidConsumer() public { + address subOwner = makeAddr("subOwner"); + changePrank(subOwner); + uint256 subId = s_testCoordinator.createSubscription(); + VRFV2PlusLoadTestWithMetrics consumer = new VRFV2PlusLoadTestWithMetrics(address(s_testCoordinator)); + + // consumer is not added to the subscription + vm.expectRevert(abi.encodeWithSelector(SubscriptionAPI.InvalidConsumer.selector, subId, address(consumer))); + consumer.requestRandomWords( + subId, + MIN_CONFIRMATIONS, + vrfKeyHash, + CALLBACK_GAS_LIMIT, + true, + NUM_WORDS, + 1 /* requestCount */ + ); + assertFalse(s_testCoordinator.pendingRequestExists(subId)); + } + + function testRequestRandomWords_ReAddConsumer_AssertRequestID() public { + // 1. setup consumer and subscription + setConfig(); + registerProvingKey(); + address subOwner = makeAddr("subOwner"); + changePrank(subOwner); + uint256 subId = s_testCoordinator.createSubscription(); + VRFV2PlusLoadTestWithMetrics consumer = createAndAddLoadTestWithMetricsConsumer(subId); + uint32 requestBlock = 10; + vm.roll(requestBlock); + changePrank(LINK_WHALE); + s_testCoordinator.fundSubscriptionWithNative{value: 10 ether}(subId); + + // 2. Request random words. + changePrank(subOwner); + vm.expectEmit(true, true, false, true); + uint256 requestId; + uint256 preSeed; + (requestId, preSeed) = s_testCoordinator.computeRequestIdExternal(vrfKeyHash, address(consumer), subId, 1); + emit RandomWordsRequested( + vrfKeyHash, + requestId, + preSeed, + subId, + MIN_CONFIRMATIONS, + CALLBACK_GAS_LIMIT, + NUM_WORDS, + VRFV2PlusClient._argsToBytes(VRFV2PlusClient.ExtraArgsV1({nativePayment: true})), + address(consumer) // requester + ); + consumer.requestRandomWords( + subId, + MIN_CONFIRMATIONS, + vrfKeyHash, + CALLBACK_GAS_LIMIT, + true /* nativePayment */, + NUM_WORDS, + 1 /* requestCount */ + ); + assertTrue(s_testCoordinator.pendingRequestExists(subId)); + + // 3. Fulfill the request above + //console.log("requestId: ", requestId); + //console.log("preSeed: ", preSeed); + //console.log("sender: ", address(consumer)); + + // Move on to the next block. + // Store the previous block's blockhash, and assert that it is as expected. + vm.roll(requestBlock + 1); + s_bhs.store(requestBlock); + assertEq(hex"000000000000000000000000000000000000000000000000000000000000000a", s_bhs.getBlockhash(requestBlock)); + + // Fulfill the request. + // Proof generated via the generate-proof-v2-plus script command. Example usage: + /* + go run . generate-proof-v2-plus \ + -key-hash 0x9f2353bde94264dbc3d554a94cceba2d7d2b4fdce4304d3e09a1fea9fbeb1528 \ + -pre-seed 94043941380654896554739370173616551044559721638888689173752661912204412136884 \ + -block-hash 0x000000000000000000000000000000000000000000000000000000000000000a \ + -block-num 10 \ + -sender 0x44CAfC03154A0708F9DCf988681821f648dA74aF \ + -native-payment true + */ + VRF.Proof memory proof = VRF.Proof({ + pk: [ + 72488970228380509287422715226575535698893157273063074627791787432852706183111, + 62070622898698443831883535403436258712770888294397026493185421712108624767191 + ], + gamma: [ + 18593555375562408458806406536059989757338587469093035962641476877033456068708, + 55675218112764789548330682504442195066741636758414578491295297591596761905475 + ], + c: 56595337384472359782910435918403237878894172750128610188222417200315739516270, + s: 60666722370046279064490737533582002977678558769715798604164042022636022215663, + seed: 94043941380654896554739370173616551044559721638888689173752661912204412136884, + uWitness: 0xEdbE15fd105cfEFb9CCcbBD84403d1F62719E50d, + cGammaWitness: [ + 11752391553651713021860307604522059957920042356542944931263270793211985356642, + 14713353048309058367510422609936133400473710094544154206129568172815229277104 + ], + sHashWitness: [ + 109716108880570827107616596438987062129934448629902940427517663799192095060206, + 79378277044196229730810703755304140279837983575681427317104232794580059801930 + ], + zInv: 18898957977631212231148068121702167284572066246731769473720131179584458697812 + }); + VRFTypes.RequestCommitmentV2Plus memory rc = VRFTypes.RequestCommitmentV2Plus({ + blockNum: requestBlock, + subId: subId, + callbackGasLimit: CALLBACK_GAS_LIMIT, + numWords: NUM_WORDS, + sender: address(consumer), + extraArgs: VRFV2PlusClient._argsToBytes(VRFV2PlusClient.ExtraArgsV1({nativePayment: true})) + }); + s_testCoordinator.fulfillRandomWords(proof, rc, true /* onlyPremium */); + assertFalse(s_testCoordinator.pendingRequestExists(subId)); + + // 4. remove consumer and verify request random words doesn't work + s_testCoordinator.removeConsumer(subId, address(consumer)); + vm.expectRevert(abi.encodeWithSelector(SubscriptionAPI.InvalidConsumer.selector, subId, address(consumer))); + consumer.requestRandomWords( + subId, + MIN_CONFIRMATIONS, + vrfKeyHash, + CALLBACK_GAS_LIMIT, + false /* nativePayment */, + NUM_WORDS, + 1 /* requestCount */ + ); + + // 5. re-add consumer and assert requestID nonce starts from 2 (nonce 1 was used before consumer removal) + s_testCoordinator.addConsumer(subId, address(consumer)); + vm.expectEmit(true, true, false, true); + uint256 requestId2; + uint256 preSeed2; + (requestId2, preSeed2) = s_testCoordinator.computeRequestIdExternal(vrfKeyHash, address(consumer), subId, 2); + emit RandomWordsRequested( + vrfKeyHash, + requestId2, + preSeed2, + subId, + MIN_CONFIRMATIONS, + CALLBACK_GAS_LIMIT, + NUM_WORDS, + VRFV2PlusClient._argsToBytes(VRFV2PlusClient.ExtraArgsV1({nativePayment: false})), // nativePayment, // nativePayment + address(consumer) // requester + ); + consumer.requestRandomWords( + subId, + MIN_CONFIRMATIONS, + vrfKeyHash, + CALLBACK_GAS_LIMIT, + false /* nativePayment */, + NUM_WORDS, + 1 /* requestCount */ + ); + assertNotEq(requestId, requestId2); + assertNotEq(preSeed, preSeed2); + assertTrue(s_testCoordinator.pendingRequestExists(subId)); + } + + function testRequestRandomWords_MultipleConsumers_PendingRequestExists() public { + // 1. setup consumer and subscription + setConfig(); + registerProvingKey(); + address subOwner = makeAddr("subOwner"); + changePrank(subOwner); + uint256 subId = s_testCoordinator.createSubscription(); + VRFV2PlusLoadTestWithMetrics consumer1 = createAndAddLoadTestWithMetricsConsumer(subId); + VRFV2PlusLoadTestWithMetrics consumer2 = createAndAddLoadTestWithMetricsConsumer(subId); + uint32 requestBlock = 10; + vm.roll(requestBlock); + changePrank(LINK_WHALE); + s_testCoordinator.fundSubscriptionWithNative{value: 10 ether}(subId); + + // 2. Request random words. + changePrank(subOwner); + (uint256 requestId1, uint256 preSeed1) = s_testCoordinator.computeRequestIdExternal( + vrfKeyHash, + address(consumer1), + subId, + 1 + ); + (uint256 requestId2, uint256 preSeed2) = s_testCoordinator.computeRequestIdExternal( + vrfKeyHash, + address(consumer2), + subId, + 1 + ); + assertNotEq(requestId1, requestId2); + assertNotEq(preSeed1, preSeed2); + consumer1.requestRandomWords( + subId, + MIN_CONFIRMATIONS, + vrfKeyHash, + CALLBACK_GAS_LIMIT, + true /* nativePayment */, + NUM_WORDS, + 1 /* requestCount */ + ); + consumer2.requestRandomWords( + subId, + MIN_CONFIRMATIONS, + vrfKeyHash, + CALLBACK_GAS_LIMIT, + true /* nativePayment */, + NUM_WORDS, + 1 /* requestCount */ + ); + assertTrue(s_testCoordinator.pendingRequestExists(subId)); + + // Move on to the next block. + // Store the previous block's blockhash, and assert that it is as expected. + vm.roll(requestBlock + 1); + s_bhs.store(requestBlock); + assertEq(hex"000000000000000000000000000000000000000000000000000000000000000a", s_bhs.getBlockhash(requestBlock)); + + // 3. Fulfill the 1st request above + console.log("requestId: ", requestId1); + console.log("preSeed: ", preSeed1); + console.log("sender: ", address(consumer1)); + + // Fulfill the request. + // Proof generated via the generate-proof-v2-plus script command. Example usage: + /* + go run . generate-proof-v2-plus \ + -key-hash 0x9f2353bde94264dbc3d554a94cceba2d7d2b4fdce4304d3e09a1fea9fbeb1528 \ + -pre-seed 94043941380654896554739370173616551044559721638888689173752661912204412136884 \ + -block-hash 0x000000000000000000000000000000000000000000000000000000000000000a \ + -block-num 10 \ + -sender 0x44CAfC03154A0708F9DCf988681821f648dA74aF \ + -native-payment true + */ + VRF.Proof memory proof = VRF.Proof({ + pk: [ + 72488970228380509287422715226575535698893157273063074627791787432852706183111, + 62070622898698443831883535403436258712770888294397026493185421712108624767191 + ], + gamma: [ + 18593555375562408458806406536059989757338587469093035962641476877033456068708, + 55675218112764789548330682504442195066741636758414578491295297591596761905475 + ], + c: 56595337384472359782910435918403237878894172750128610188222417200315739516270, + s: 60666722370046279064490737533582002977678558769715798604164042022636022215663, + seed: 94043941380654896554739370173616551044559721638888689173752661912204412136884, + uWitness: 0xEdbE15fd105cfEFb9CCcbBD84403d1F62719E50d, + cGammaWitness: [ + 11752391553651713021860307604522059957920042356542944931263270793211985356642, + 14713353048309058367510422609936133400473710094544154206129568172815229277104 + ], + sHashWitness: [ + 109716108880570827107616596438987062129934448629902940427517663799192095060206, + 79378277044196229730810703755304140279837983575681427317104232794580059801930 + ], + zInv: 18898957977631212231148068121702167284572066246731769473720131179584458697812 + }); + VRFTypes.RequestCommitmentV2Plus memory rc = VRFTypes.RequestCommitmentV2Plus({ + blockNum: requestBlock, + subId: subId, + callbackGasLimit: CALLBACK_GAS_LIMIT, + numWords: NUM_WORDS, + sender: address(consumer1), + extraArgs: VRFV2PlusClient._argsToBytes(VRFV2PlusClient.ExtraArgsV1({nativePayment: true})) + }); + s_testCoordinator.fulfillRandomWords(proof, rc, true /* onlyPremium */); + assertTrue(s_testCoordinator.pendingRequestExists(subId)); + + //4. Fulfill the 2nd request + console.log("requestId: ", requestId2); + console.log("preSeed: ", preSeed2); + console.log("sender: ", address(consumer2)); + + // Fulfill the request. + // Proof generated via the generate-proof-v2-plus script command. Example usage: + /* + go run . generate-proof-v2-plus \ + -key-hash 0x9f2353bde94264dbc3d554a94cceba2d7d2b4fdce4304d3e09a1fea9fbeb1528 \ + -pre-seed 60086281972849674111646805013521068579710860774417505336898013292594859262126 \ + -block-hash 0x000000000000000000000000000000000000000000000000000000000000000a \ + -block-num 10 \ + -sender 0xf5a165378E120f93784395aDF1E08a437e902865 \ + -native-payment true + */ + proof = VRF.Proof({ + pk: [ + 72488970228380509287422715226575535698893157273063074627791787432852706183111, + 62070622898698443831883535403436258712770888294397026493185421712108624767191 + ], + gamma: [ + 8781676794493524976318989249067879326013864868749595045909181134740761572122, + 70144896394968351242907510966944756907625107566821127114847472296460405612124 + ], + c: 67847193668837615807355025316836592349514589069599294392546721746916067719949, + s: 114946531382736685625345450298146929067341928840493664822961336014597880904075, + seed: 60086281972849674111646805013521068579710860774417505336898013292594859262126, + uWitness: 0xe1de4fD69277D0C5516cAE4d760b1d08BC340A28, + cGammaWitness: [ + 90301582727701442026215692513959255065128476395727596945643431833363167168678, + 61501369717028493801369453424028509804064958915788808540582630993703331669978 + ], + sHashWitness: [ + 98738650825542176387169085844714248077697103572877410412808249468787326424906, + 85647963391545223707301702874240345890884970941786094239896961457539737216630 + ], + zInv: 29080001901010358083725892808339807464533563010468652346220922643802059192842 + }); + rc = VRFTypes.RequestCommitmentV2Plus({ + blockNum: requestBlock, + subId: subId, + callbackGasLimit: CALLBACK_GAS_LIMIT, + numWords: NUM_WORDS, + sender: address(consumer2), + extraArgs: VRFV2PlusClient._argsToBytes(VRFV2PlusClient.ExtraArgsV1({nativePayment: true})) + }); + s_testCoordinator.fulfillRandomWords(proof, rc, true /* onlyPremium */); + assertFalse(s_testCoordinator.pendingRequestExists(subId)); + } + + function createAndAddLoadTestWithMetricsConsumer(uint256 subId) internal returns (VRFV2PlusLoadTestWithMetrics) { + VRFV2PlusLoadTestWithMetrics consumer = new VRFV2PlusLoadTestWithMetrics(address(s_testCoordinator)); + s_testCoordinator.addConsumer(subId, address(consumer)); + return consumer; } } diff --git a/contracts/test/v0.8/foundry/vrf/VRFV2PlusSubscriptionAPI.t.sol b/contracts/test/v0.8/foundry/vrf/VRFV2PlusSubscriptionAPI.t.sol index 0df53a12175..9883acdbc23 100644 --- a/contracts/test/v0.8/foundry/vrf/VRFV2PlusSubscriptionAPI.t.sol +++ b/contracts/test/v0.8/foundry/vrf/VRFV2PlusSubscriptionAPI.t.sol @@ -2,10 +2,12 @@ pragma solidity 0.8.6; import "../BaseTest.t.sol"; import {ExposedVRFCoordinatorV2_5} from "../../../../src/v0.8/vrf/dev/testhelpers/ExposedVRFCoordinatorV2_5.sol"; +import {VRFV2PlusLoadTestWithMetrics} from "../../../../src/v0.8/vrf/dev/testhelpers/VRFV2PlusLoadTestWithMetrics.sol"; import {SubscriptionAPI} from "../../../../src/v0.8/vrf/dev/SubscriptionAPI.sol"; import {MockLinkToken} from "../../../../src/v0.8/mocks/MockLinkToken.sol"; import {MockV3Aggregator} from "../../../../src/v0.8/tests/MockV3Aggregator.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; // for Strings.toString +import {VmSafe} from "forge-std/Vm.sol"; contract VRFV2PlusSubscriptionAPITest is BaseTest { event SubscriptionFunded(uint256 indexed subId, uint256 oldBalance, uint256 newBalance); @@ -16,6 +18,7 @@ contract VRFV2PlusSubscriptionAPITest is BaseTest { event SubscriptionOwnerTransferRequested(uint256 indexed subId, address from, address to); event SubscriptionOwnerTransferred(uint256 indexed subId, address from, address to); event SubscriptionConsumerAdded(uint256 indexed subId, address consumer); + event SubscriptionConsumerRemoved(uint256 indexed subId, address consumer); ExposedVRFCoordinatorV2_5 s_subscriptionAPI; @@ -596,6 +599,25 @@ contract VRFV2PlusSubscriptionAPITest is BaseTest { // add consumer again, should be no-op changePrank(subOwner); + VmSafe.Log[] memory events = vm.getRecordedLogs(); + s_subscriptionAPI.addConsumer(subId, consumer); + assertEq(events.length, 0); + assertEq(s_subscriptionAPI.getSubscriptionConfig(subId).consumers.length, 1); + assertEq(s_subscriptionAPI.getSubscriptionConfig(subId).consumers[0], consumer); + + // remove consumer + vm.expectEmit(true, false, false, true); + emit SubscriptionConsumerRemoved(subId, consumer); + s_subscriptionAPI.removeConsumer(subId, consumer); + assertEq(s_subscriptionAPI.getSubscriptionConfig(subId).consumers.length, 0); + + // removing consumer twice should revert + vm.expectRevert(abi.encodeWithSelector(SubscriptionAPI.InvalidConsumer.selector, subId, address(consumer))); + s_subscriptionAPI.removeConsumer(subId, consumer); + + //re-add consumer + vm.expectEmit(true, false, false, true); + emit SubscriptionConsumerAdded(subId, consumer); s_subscriptionAPI.addConsumer(subId, consumer); assertEq(s_subscriptionAPI.getSubscriptionConfig(subId).consumers.length, 1); assertEq(s_subscriptionAPI.getSubscriptionConfig(subId).consumers[0], consumer); diff --git a/contracts/test/v0.8/foundry/vrf/VRFV2Wrapper.t.sol b/contracts/test/v0.8/foundry/vrf/VRFV2PlusWrapper.t.sol similarity index 53% rename from contracts/test/v0.8/foundry/vrf/VRFV2Wrapper.t.sol rename to contracts/test/v0.8/foundry/vrf/VRFV2PlusWrapper.t.sol index a843f31911f..6d8b598efe3 100644 --- a/contracts/test/v0.8/foundry/vrf/VRFV2Wrapper.t.sol +++ b/contracts/test/v0.8/foundry/vrf/VRFV2PlusWrapper.t.sol @@ -8,6 +8,7 @@ import {ExposedVRFCoordinatorV2_5} from "../../../../src/v0.8/vrf/dev/testhelper import {VRFV2PlusWrapperConsumerBase} from "../../../../src/v0.8/vrf/dev/VRFV2PlusWrapperConsumerBase.sol"; import {VRFV2PlusWrapperConsumerExample} from "../../../../src/v0.8/vrf/dev/testhelpers/VRFV2PlusWrapperConsumerExample.sol"; import {VRFCoordinatorV2_5} from "../../../../src/v0.8/vrf/dev/VRFCoordinatorV2_5.sol"; +import {VRFConsumerBaseV2Plus} from "../../../../src/v0.8/vrf/dev/VRFConsumerBaseV2Plus.sol"; import {VRFV2PlusWrapper} from "../../../../src/v0.8/vrf/dev/VRFV2PlusWrapper.sol"; import {VRFV2PlusClient} from "../../../../src/v0.8/vrf/dev/libraries/VRFV2PlusClient.sol"; import {console} from "forge-std/console.sol"; @@ -39,7 +40,7 @@ contract VRFV2PlusWrapperTest is BaseTest { // Deploy coordinator and consumer. s_testCoordinator = new ExposedVRFCoordinatorV2_5(address(0)); s_wrapper = new VRFV2PlusWrapper(address(s_linkToken), address(s_linkNativeFeed), address(s_testCoordinator)); - s_consumer = new VRFV2PlusWrapperConsumerExample(address(s_linkToken), address(s_wrapper)); + s_consumer = new VRFV2PlusWrapperConsumerExample(address(s_wrapper)); // Configure the coordinator. s_testCoordinator.setLINKAndLINKNativeFeed(address(s_linkToken), address(s_linkNativeFeed)); @@ -64,16 +65,19 @@ contract VRFV2PlusWrapperTest is BaseTest { } function setConfigWrapper() internal { + vm.expectEmit(false, false, false, true, address(s_wrapper)); + emit ConfigSet(wrapperGasOverhead, coordinatorGasOverhead, 0, 0, vrfKeyHash, 10, 1, 50000000000000000, 0, 0); s_wrapper.setConfig( wrapperGasOverhead, // wrapper gas overhead coordinatorGasOverhead, // coordinator gas overhead - 0, // premium percentage + 0, // native premium percentage, + 0, // link premium percentage vrfKeyHash, // keyHash 10, // max number of words, 1, // stalenessSeconds 50000000000000000, // fallbackWeiPerUnitLink - 0, // fulfillmentFlatFeeLinkPPM - 0 // fulfillmentFlatFeeNativePPM + 0, // fulfillmentFlatFeeNativePPM + 0 // fulfillmentFlatFeeLinkDiscountPPM ); ( , @@ -82,13 +86,15 @@ contract VRFV2PlusWrapperTest is BaseTest { , uint32 _wrapperGasOverhead, uint32 _coordinatorGasOverhead, - uint8 _wrapperPremiumPercentage, + uint8 _wrapperNativePremiumPercentage, + uint8 _wrapperLinkPremiumPercentage, bytes32 _keyHash, uint8 _maxNumWords ) = s_wrapper.getConfig(); assertEq(_wrapperGasOverhead, wrapperGasOverhead); assertEq(_coordinatorGasOverhead, coordinatorGasOverhead); - assertEq(0, _wrapperPremiumPercentage); + assertEq(0, _wrapperNativePremiumPercentage); + assertEq(0, _wrapperLinkPremiumPercentage); assertEq(vrfKeyHash, _keyHash); assertEq(10, _maxNumWords); } @@ -105,26 +111,56 @@ contract VRFV2PlusWrapperTest is BaseTest { address indexed sender ); - function testSetLinkAndLinkNativeFeed() public { - VRFV2PlusWrapper wrapper = new VRFV2PlusWrapper(address(0), address(0), address(s_testCoordinator)); + // IVRFV2PlusWrapper events + event LinkNativeFeedSet(address linkNativeFeed); + event FulfillmentTxSizeSet(uint32 size); + event ConfigSet( + uint32 wrapperGasOverhead, + uint32 coordinatorGasOverhead, + uint8 wrapperNativePremiumPercentage, + uint8 wrapperLinkPremiumPercentage, + bytes32 keyHash, + uint8 maxNumWords, + uint32 stalenessSeconds, + int256 fallbackWeiPerUnitLink, + uint32 fulfillmentFlatFeeNativePPM, + uint32 fulfillmentFlatFeeLinkDiscountPPM + ); + event FallbackWeiPerUnitLinkUsed(uint256 requestId, int256 fallbackWeiPerUnitLink); + event Withdrawn(address indexed to, uint256 amount); + event NativeWithdrawn(address indexed to, uint256 amount); + event Enabled(); + event Disabled(); + + // VRFV2PlusWrapperConsumerBase events + event LinkTokenSet(address link); + + function testVRFV2PlusWrapper_ZeroAddress() public { + vm.expectRevert(VRFConsumerBaseV2Plus.ZeroAddress.selector); + new VRFV2PlusWrapper(address(0), address(0), address(0)); + } + + function testSetLinkNativeFeed() public { + VRFV2PlusWrapper wrapper = new VRFV2PlusWrapper(address(s_linkToken), address(0), address(s_testCoordinator)); - // Set LINK and LINK/Native feed on wrapper. - wrapper.setLINK(address(s_linkToken)); + // Set LINK/Native feed on wrapper. + vm.expectEmit(false, false, false, true, address(wrapper)); + emit LinkNativeFeedSet(address(s_linkNativeFeed)); wrapper.setLinkNativeFeed(address(s_linkNativeFeed)); - assertEq(address(wrapper.s_link()), address(s_linkToken)); assertEq(address(wrapper.s_linkNativeFeed()), address(s_linkNativeFeed)); + } - // Revert for subsequent assignment. - vm.expectRevert(VRFV2PlusWrapper.LinkAlreadySet.selector); - wrapper.setLINK(address(s_linkToken)); - - // Consumer can set LINK token. - VRFV2PlusWrapperConsumerExample consumer = new VRFV2PlusWrapperConsumerExample(address(0), address(wrapper)); - consumer.setLinkToken(address(s_linkToken)); + function testSetFulfillmentTxSize() public { + uint32 fulfillmentTxSize = 100_000; + vm.expectEmit(false, false, false, true, address(s_wrapper)); + emit FulfillmentTxSizeSet(fulfillmentTxSize); + s_wrapper.setFulfillmentTxSize(fulfillmentTxSize); + assertEq(s_wrapper.s_fulfillmentTxSizeBytes(), fulfillmentTxSize); + } - // Revert for subsequent assignment. - vm.expectRevert(VRFV2PlusWrapperConsumerBase.LINKAlreadySet.selector); - consumer.setLinkToken(address(s_linkToken)); + function testSetCoordinator_ZeroAddress() public { + vm.expectRevert(VRFConsumerBaseV2Plus.ZeroAddress.selector); + s_wrapper.setCoordinator(address(0)); } function testRequestAndFulfillRandomWordsNativeWrapper() public { @@ -136,9 +172,13 @@ contract VRFV2PlusWrapperTest is BaseTest { assertEq(s_wrapper.typeAndVersion(), "VRFV2Wrapper 1.0.0"); // Cannot make request while disabled. + vm.expectEmit(false, false, false, true, address(s_wrapper)); + emit Disabled(); s_wrapper.disable(); vm.expectRevert("wrapper is disabled"); s_consumer.makeRequestNative(500_000, 0, 1); + vm.expectEmit(false, false, false, true, address(s_wrapper)); + emit Enabled(); s_wrapper.enable(); // Request randomness from wrapper. @@ -148,7 +188,7 @@ contract VRFV2PlusWrapperTest is BaseTest { vrfKeyHash, address(s_wrapper), s_wrapper.SUBSCRIPTION_ID(), - 2 + 1 ); uint32 EIP150Overhead = callbackGasLimit / 63 + 1; emit RandomWordsRequested( @@ -189,11 +229,84 @@ contract VRFV2PlusWrapperTest is BaseTest { // Withdraw funds from wrapper. changePrank(LINK_WHALE); uint256 priorWhaleBalance = LINK_WHALE.balance; - s_wrapper.withdrawNative(LINK_WHALE, paid); + vm.expectEmit(true, false, false, true, address(s_wrapper)); + emit NativeWithdrawn(LINK_WHALE, paid); + s_wrapper.withdrawNative(LINK_WHALE); assertEq(LINK_WHALE.balance, priorWhaleBalance + paid); assertEq(address(s_wrapper).balance, 0); } + function testSetConfig_FulfillmentFlatFee_LinkDiscountTooHigh() public { + // Test that setting link discount flat fee higher than native flat fee reverts + vm.expectRevert(abi.encodeWithSelector(VRFV2PlusWrapper.LinkDiscountTooHigh.selector, uint32(501), uint32(500))); + s_wrapper.setConfig( + wrapperGasOverhead, // wrapper gas overhead + coordinatorGasOverhead, // coordinator gas overhead + 0, // native premium percentage, + 0, // link premium percentage + vrfKeyHash, // keyHash + 10, // max number of words, + 1, // stalenessSeconds + 50000000000000000, // fallbackWeiPerUnitLink + 500, // fulfillmentFlatFeeNativePPM + 501 // fulfillmentFlatFeeLinkDiscountPPM + ); + } + + function testSetConfig_FulfillmentFlatFee_LinkDiscountEqualsNative() public { + // 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 + 0, // native premium percentage, + 0, // link premium percentage + vrfKeyHash, // keyHash + 10, // max number of words, + 1, // stalenessSeconds + 50000000000000000, // fallbackWeiPerUnitLink + 450, // fulfillmentFlatFeeNativePPM + 450 // fulfillmentFlatFeeLinkDiscountPPM + ); + } + + function testSetConfig_NativePremiumPercentage_InvalidPremiumPercentage() public { + // Test that setting native premium percentage higher than 155 will revert + vm.expectRevert( + abi.encodeWithSelector(VRFCoordinatorV2_5.InvalidPremiumPercentage.selector, uint8(156), uint8(155)) + ); + s_wrapper.setConfig( + wrapperGasOverhead, // wrapper gas overhead + coordinatorGasOverhead, // coordinator gas overhead + 156, // native premium percentage, + 0, // link premium percentage + vrfKeyHash, // keyHash + 10, // max number of words, + 1, // stalenessSeconds + 50000000000000000, // fallbackWeiPerUnitLink + 0, // fulfillmentFlatFeeNativePPM + 0 // fulfillmentFlatFeeLinkDiscountPPM + ); + } + + function testSetConfig_LinkPremiumPercentage_InvalidPremiumPercentage() public { + // Test that setting LINK premium percentage higher than 155 will revert + vm.expectRevert( + abi.encodeWithSelector(VRFCoordinatorV2_5.InvalidPremiumPercentage.selector, uint8(202), uint8(155)) + ); + s_wrapper.setConfig( + wrapperGasOverhead, // wrapper gas overhead + coordinatorGasOverhead, // coordinator gas overhead + 15, // native premium percentage, + 202, // link premium percentage + vrfKeyHash, // keyHash + 10, // max number of words, + 1, // stalenessSeconds + 50000000000000000, // fallbackWeiPerUnitLink + 0, // fulfillmentFlatFeeNativePPM + 0 // fulfillmentFlatFeeLinkDiscountPPM + ); + } + function testRequestAndFulfillRandomWordsLINKWrapper() public { // Fund subscription. s_linkToken.transferAndCall(address(s_testCoordinator), 10 ether, abi.encode(s_wrapper.SUBSCRIPTION_ID())); @@ -206,7 +319,7 @@ contract VRFV2PlusWrapperTest is BaseTest { vrfKeyHash, address(s_wrapper), s_wrapper.SUBSCRIPTION_ID(), - 2 + 1 ); uint32 EIP150Overhead = callbackGasLimit / 63 + 1; emit RandomWordsRequested( @@ -248,8 +361,65 @@ contract VRFV2PlusWrapperTest is BaseTest { // Withdraw funds from wrapper. changePrank(LINK_WHALE); uint256 priorWhaleBalance = s_linkToken.balanceOf(LINK_WHALE); - s_wrapper.withdraw(LINK_WHALE, paid); + vm.expectEmit(true, false, false, true, address(s_wrapper)); + emit Withdrawn(LINK_WHALE, paid); + s_wrapper.withdraw(LINK_WHALE); assertEq(s_linkToken.balanceOf(LINK_WHALE), priorWhaleBalance + paid); assertEq(s_linkToken.balanceOf(address(s_wrapper)), 0); } + + function testRequestRandomWordsLINKWrapper_FallbackWeiPerUnitLinkUsed() public { + // Fund subscription. + s_linkToken.transferAndCall(address(s_testCoordinator), 10 ether, abi.encode(s_wrapper.SUBSCRIPTION_ID())); + s_linkToken.transfer(address(s_consumer), 10 ether); + + // Set the link feed to be stale. + (, , , uint32 stalenessSeconds, , , , , ) = s_testCoordinator.s_config(); + int256 fallbackWeiPerUnitLink = s_testCoordinator.s_fallbackWeiPerUnitLink(); + (uint80 roundId, int256 answer, uint256 startedAt, , ) = s_linkNativeFeed.latestRoundData(); + uint256 timestamp = block.timestamp - stalenessSeconds - 1; + s_linkNativeFeed.updateRoundData(roundId, answer, timestamp, startedAt); + + // Request randomness from wrapper. + uint32 callbackGasLimit = 1_000_000; + (uint256 requestId, uint256 preSeed) = s_testCoordinator.computeRequestIdExternal( + vrfKeyHash, + address(s_wrapper), + s_wrapper.SUBSCRIPTION_ID(), + 1 + ); + uint32 EIP150Overhead = callbackGasLimit / 63 + 1; + vm.expectEmit(true, true, true, true); + emit FallbackWeiPerUnitLinkUsed(requestId, fallbackWeiPerUnitLink); + emit RandomWordsRequested( + vrfKeyHash, + requestId, + preSeed, + s_wrapper.SUBSCRIPTION_ID(), // subId + 0, // minConfirmations + callbackGasLimit + EIP150Overhead + wrapperGasOverhead, // callbackGasLimit - accounts for EIP 150 + 1, // numWords + VRFV2PlusClient._argsToBytes(VRFV2PlusClient.ExtraArgsV1({nativePayment: false})), // extraArgs + address(s_wrapper) // requester + ); + s_consumer.makeRequest(callbackGasLimit, 0, 1); + } + + function testRequestRandomWordsInNative_NotConfigured() public { + VRFV2PlusWrapper wrapper = new VRFV2PlusWrapper( + address(s_linkToken), + address(s_linkNativeFeed), + address(s_testCoordinator) + ); + + vm.expectRevert("wrapper is not configured"); + wrapper.requestRandomWordsInNative(500_000, 0, 1, ""); + } + + function testRequestRandomWordsInNative_Disabled() public { + s_wrapper.disable(); + + vm.expectRevert("wrapper is disabled"); + s_wrapper.requestRandomWordsInNative(500_000, 0, 1, ""); + } } diff --git a/contracts/test/v0.8/foundry/vrf/VRFV2Wrapper_Migration.t.sol b/contracts/test/v0.8/foundry/vrf/VRFV2PlusWrapper_Migration.t.sol similarity index 92% rename from contracts/test/v0.8/foundry/vrf/VRFV2Wrapper_Migration.t.sol rename to contracts/test/v0.8/foundry/vrf/VRFV2PlusWrapper_Migration.t.sol index 3bf03f4b96d..e8c08d4457c 100644 --- a/contracts/test/v0.8/foundry/vrf/VRFV2Wrapper_Migration.t.sol +++ b/contracts/test/v0.8/foundry/vrf/VRFV2PlusWrapper_Migration.t.sol @@ -13,7 +13,7 @@ import {VRFCoordinatorV2_5} from "../../../../src/v0.8/vrf/dev/VRFCoordinatorV2_ import {VRFV2PlusWrapper} from "../../../../src/v0.8/vrf/dev/VRFV2PlusWrapper.sol"; import {VRFV2PlusClient} from "../../../../src/v0.8/vrf/dev/libraries/VRFV2PlusClient.sol"; -contract VRFV2PlusWrapperTest is BaseTest { +contract VRFV2PlusWrapper_MigrationTest is BaseTest { address internal constant LINK_WHALE = 0xD883a6A1C22fC4AbFE938a5aDF9B2Cc31b1BF18B; uint256 internal constant DEFAULT_NATIVE_FUNDING = 7 ether; // 7 ETH uint256 internal constant DEFAULT_LINK_FUNDING = 10 ether; // 10 ETH @@ -48,7 +48,7 @@ contract VRFV2PlusWrapperTest is BaseTest { // Deploy coordinator and consumer. s_testCoordinator = new ExposedVRFCoordinatorV2_5(address(0)); s_wrapper = new VRFV2PlusWrapper(address(s_linkToken), address(s_linkNativeFeed), address(s_testCoordinator)); - s_consumer = new VRFV2PlusWrapperConsumerExample(address(s_linkToken), address(s_wrapper)); + s_consumer = new VRFV2PlusWrapperConsumerExample(address(s_wrapper)); // Configure the coordinator. s_testCoordinator.setLINKAndLINKNativeFeed(address(s_linkToken), address(s_linkNativeFeed)); @@ -89,13 +89,14 @@ contract VRFV2PlusWrapperTest is BaseTest { s_wrapper.setConfig( wrapperGasOverhead, // wrapper gas overhead coordinatorGasOverhead, // coordinator gas overhead - 0, // premium percentage + 0, // native premium percentage, + 0, // link premium percentage vrfKeyHash, // keyHash 10, // max number of words, 1, // stalenessSeconds 50000000000000000, // fallbackWeiPerUnitLink - 0, // fulfillmentFlatFeeLinkPPM - 0 // fulfillmentFlatFeeNativePPM + 0, // fulfillmentFlatFeeNativePPM + 0 // fulfillmentFlatFeeLinkDiscountPPM ); ( , @@ -104,13 +105,15 @@ contract VRFV2PlusWrapperTest is BaseTest { , uint32 _wrapperGasOverhead, uint32 _coordinatorGasOverhead, - uint8 _wrapperPremiumPercentage, + uint8 _wrapperNativePremiumPercentage, + uint8 _wrapperLinkPremiumPercentage, bytes32 _keyHash, uint8 _maxNumWords ) = s_wrapper.getConfig(); assertEq(_wrapperGasOverhead, wrapperGasOverhead); assertEq(_coordinatorGasOverhead, coordinatorGasOverhead); - assertEq(0, _wrapperPremiumPercentage); + assertEq(0, _wrapperNativePremiumPercentage); + assertEq(0, _wrapperLinkPremiumPercentage); assertEq(vrfKeyHash, _keyHash); assertEq(10, _maxNumWords); } @@ -127,6 +130,13 @@ contract VRFV2PlusWrapperTest is BaseTest { address indexed sender ); + // IVRFV2PlusWrapper events + event Withdrawn(address indexed to, uint256 amount); + event NativeWithdrawn(address indexed to, uint256 amount); + + // IVRFMigratableConsumerV2Plus events + event CoordinatorSet(address vrfCoordinator); + function testMigrateWrapperLINKPayment() public { s_linkToken.transfer(address(s_consumer), DEFAULT_LINK_FUNDING); @@ -199,8 +209,8 @@ contract VRFV2PlusWrapperTest is BaseTest { // Request randomness from wrapper. uint32 callbackGasLimit = 1_000_000; - vm.expectEmit(true, true, true, true); uint256 wrapperCost = s_wrapper.calculateRequestPrice(callbackGasLimit); + vm.expectEmit(true, true, true, true); emit WrapperRequestMade(1, wrapperCost); uint256 requestId = s_consumer.makeRequest(callbackGasLimit, 0, 1); assertEq(requestId, 1); @@ -235,7 +245,9 @@ contract VRFV2PlusWrapperTest is BaseTest { /// Withdraw funds from wrapper. vm.startPrank(LINK_WHALE); uint256 priorWhaleBalance = s_linkToken.balanceOf(LINK_WHALE); - s_wrapper.withdraw(LINK_WHALE, paid); + vm.expectEmit(true, false, false, true, address(s_wrapper)); + emit Withdrawn(LINK_WHALE, paid); + s_wrapper.withdraw(LINK_WHALE); assertEq(s_linkToken.balanceOf(LINK_WHALE), priorWhaleBalance + paid); assertEq(s_linkToken.balanceOf(address(s_wrapper)), 0); @@ -282,6 +294,7 @@ contract VRFV2PlusWrapperTest is BaseTest { true // check data fields ); address newCoordinatorAddr = address(s_newCoordinator); + emit CoordinatorSet(address(s_newCoordinator)); emit MigrationCompleted(newCoordinatorAddr, subID); s_wrapper.migrate(newCoordinatorAddr); @@ -349,7 +362,9 @@ contract VRFV2PlusWrapperTest is BaseTest { // Withdraw funds from wrapper. vm.startPrank(LINK_WHALE); uint256 priorWhaleBalance = LINK_WHALE.balance; - s_wrapper.withdrawNative(LINK_WHALE, paid); + vm.expectEmit(true, false, false, true, address(s_wrapper)); + emit NativeWithdrawn(LINK_WHALE, paid); + s_wrapper.withdrawNative(LINK_WHALE); assertEq(LINK_WHALE.balance, priorWhaleBalance + paid); assertEq(address(s_wrapper).balance, 0); diff --git a/core/capabilities/syncer.go b/core/capabilities/syncer.go new file mode 100644 index 00000000000..a8cfb2c56f8 --- /dev/null +++ b/core/capabilities/syncer.go @@ -0,0 +1,80 @@ +package capabilities + +import ( + "context" + + "github.com/smartcontractkit/chainlink-common/pkg/services" + "github.com/smartcontractkit/chainlink-common/pkg/types" + + "github.com/smartcontractkit/libocr/ragep2p" + ragetypes "github.com/smartcontractkit/libocr/ragep2p/types" + + "github.com/smartcontractkit/chainlink/v2/core/logger" + p2ptypes "github.com/smartcontractkit/chainlink/v2/core/services/p2p/types" +) + +type registrySyncer struct { + peerWrapper p2ptypes.PeerWrapper + registry types.CapabilitiesRegistry + lggr logger.Logger +} + +var _ services.Service = ®istrySyncer{} + +// RegistrySyncer updates local Registry to match its onchain counterpart +func NewRegistrySyncer(peerWrapper p2ptypes.PeerWrapper, registry types.CapabilitiesRegistry, lggr logger.Logger) *registrySyncer { + return ®istrySyncer{ + peerWrapper: peerWrapper, + registry: registry, + lggr: lggr, + } +} + +func (s *registrySyncer) Start(ctx context.Context) error { + // NOTE: temporary hard-coded values + defaultStreamConfig := p2ptypes.StreamConfig{ + IncomingMessageBufferSize: 1000000, + OutgoingMessageBufferSize: 1000000, + MaxMessageLenBytes: 100000, + MessageRateLimiter: ragep2p.TokenBucketParams{ + Rate: 10.0, + Capacity: 1000, + }, + BytesRateLimiter: ragep2p.TokenBucketParams{ + Rate: 10.0, + Capacity: 1000, + }, + } + peerIDs := []string{ + "12D3KooWF3dVeJ6YoT5HFnYhmwQWWMoEwVFzJQ5kKCMX3ZityxMC", + "12D3KooWQsmok6aD8PZqt3RnJhQRrNzKHLficq7zYFRp7kZ1hHP8", + "12D3KooWJbZLiMuGeKw78s3LM5TNgBTJHcF39DraxLu14bucG9RN", + "12D3KooWGqfSPhHKmQycfhRjgUDE2vg9YWZN27Eue8idb2ZUk6EH", + } + peers := make(map[ragetypes.PeerID]p2ptypes.StreamConfig) + for _, peerID := range peerIDs { + var p ragetypes.PeerID + err := p.UnmarshalText([]byte(peerID)) + if err != nil { + return err + } + peers[p] = defaultStreamConfig + } + return s.peerWrapper.GetPeer().UpdateConnections(peers) +} + +func (s *registrySyncer) Close() error { + return s.peerWrapper.GetPeer().UpdateConnections(map[ragetypes.PeerID]p2ptypes.StreamConfig{}) +} + +func (s *registrySyncer) Ready() error { + return nil +} + +func (s *registrySyncer) HealthReport() map[string]error { + return nil +} + +func (s *registrySyncer) Name() string { + return "RegistrySyncer" +} diff --git a/core/capabilities/syncer_test.go b/core/capabilities/syncer_test.go new file mode 100644 index 00000000000..acfe0f00233 --- /dev/null +++ b/core/capabilities/syncer_test.go @@ -0,0 +1,28 @@ +package capabilities_test + +import ( + "testing" + + "github.com/stretchr/testify/mock" + "github.com/stretchr/testify/require" + + commonMocks "github.com/smartcontractkit/chainlink-common/pkg/types/mocks" + coreCapabilities "github.com/smartcontractkit/chainlink/v2/core/capabilities" + "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" + "github.com/smartcontractkit/chainlink/v2/core/logger" + "github.com/smartcontractkit/chainlink/v2/core/services/p2p/types/mocks" +) + +func TestSyncer_CleanStartClose(t *testing.T) { + lggr := logger.TestLogger(t) + ctx := testutils.Context(t) + peer := mocks.NewPeer(t) + peer.On("UpdateConnections", mock.Anything).Return(nil) + wrapper := mocks.NewPeerWrapper(t) + wrapper.On("GetPeer").Return(peer) + registry := commonMocks.NewCapabilitiesRegistry(t) + + syncer := coreCapabilities.NewRegistrySyncer(wrapper, registry, lggr) + require.NoError(t, syncer.Start(ctx)) + require.NoError(t, syncer.Close()) +} diff --git a/core/capabilities/targets/write_target.go b/core/capabilities/targets/write_target.go index 531730cc089..a7452be7fc8 100644 --- a/core/capabilities/targets/write_target.go +++ b/core/capabilities/targets/write_target.go @@ -212,7 +212,7 @@ func (cap *EvmWrite) Execute(ctx context.Context, callback chan<- capabilities.C FromAddress: config.FromAddress().Address(), ToAddress: config.ForwarderAddress().Address(), EncodedPayload: calldata, - FeeLimit: uint32(defaultGasLimit), + FeeLimit: uint64(defaultGasLimit), Meta: txMeta, Strategy: strategy, Checker: checker, diff --git a/core/capabilities/targets/write_target_test.go b/core/capabilities/targets/write_target_test.go index c99e84beb75..c71c84e172e 100644 --- a/core/capabilities/targets/write_target_test.go +++ b/core/capabilities/targets/write_target_test.go @@ -9,7 +9,7 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/capabilities/targets" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/txmgr" txmmocks "github.com/smartcontractkit/chainlink/v2/core/chains/evm/txmgr/mocks" - evmtypes "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" evmmocks "github.com/smartcontractkit/chainlink/v2/core/chains/legacyevm/mocks" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/keystone/generated/forwarder" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" @@ -17,13 +17,12 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/evmtest" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/chainlink" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ethkey" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" ) -var forwardABI = evmtypes.MustGetABI(forwarder.KeystoneForwarderMetaData.ABI) +var forwardABI = types.MustGetABI(forwarder.KeystoneForwarderMetaData.ABI) func TestEvmWrite(t *testing.T) { chain := evmmocks.NewChain(t) @@ -34,12 +33,12 @@ func TestEvmWrite(t *testing.T) { cfg := configtest.NewGeneralConfig(t, func(c *chainlink.Config, s *chainlink.Secrets) { a := testutils.NewAddress() - addr, err := ethkey.NewEIP55Address(a.Hex()) + addr, err := types.NewEIP55Address(a.Hex()) require.NoError(t, err) c.EVM[0].ChainWriter.FromAddress = &addr forwarderA := testutils.NewAddress() - forwarderAddr, err := ethkey.NewEIP55Address(forwarderA.Hex()) + forwarderAddr, err := types.NewEIP55Address(forwarderA.Hex()) require.NoError(t, err) c.EVM[0].ChainWriter.ForwarderAddress = &forwarderAddr }) diff --git a/core/chainlink.goreleaser.Dockerfile b/core/chainlink.goreleaser.Dockerfile index 7774c416f0e..7dab088116e 100644 --- a/core/chainlink.goreleaser.Dockerfile +++ b/core/chainlink.goreleaser.Dockerfile @@ -16,9 +16,21 @@ RUN curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - \ && rm -rf /var/lib/apt/lists/* COPY ./chainlink /usr/local/bin/ + # Copy native libs if cgo is enabled COPY ./tmp/linux_${TARGETARCH}/libs /usr/local/bin/libs +# Copy plugins and enable them +COPY ./tmp/linux_${TARGETARCH}/plugins/* /usr/local/bin/ +# Allow individual plugins to be enabled by supplying their path +ARG CL_MEDIAN_CMD +ARG CL_MERCURY_CMD +ARG CL_SOLANA_CMD +ARG CL_STARKNET_CMD +ENV CL_MEDIAN_CMD=${CL_MEDIAN_CMD} \ + CL_MERCURY_CMD=${CL_MERCURY_CMD} \ + CL_SOLANA_CMD=${CL_SOLANA_CMD} \ + CL_STARKNET_CMD=${CL_STARKNET_CMD} # Temp fix to patch correctly link the libwasmvm.so COPY ./tools/bin/ldd_fix /usr/local/bin/ldd_fix RUN chmod +x /usr/local/bin/ldd_fix diff --git a/core/chains/evm/client/chain_client.go b/core/chains/evm/client/chain_client.go index cd4665aac8c..1eb2347c474 100644 --- a/core/chains/evm/client/chain_client.go +++ b/core/chains/evm/client/chain_client.go @@ -51,20 +51,7 @@ func NewChainClient( chainID *big.Int, chainType config.ChainType, ) Client { - multiNode := commonclient.NewMultiNode[ - *big.Int, - evmtypes.Nonce, - common.Address, - common.Hash, - *types.Transaction, - common.Hash, - types.Log, - ethereum.FilterQuery, - *evmtypes.Receipt, - *assets.Wei, - *evmtypes.Head, - RPCClient, - ]( + multiNode := commonclient.NewMultiNode( lggr, selectionMode, leaseDuration, @@ -278,3 +265,7 @@ func (c *chainClient) TransactionReceipt(ctx context.Context, txHash common.Hash //return rpc.TransactionReceipt(ctx, txHash) return rpc.TransactionReceiptGeth(ctx, txHash) } + +func (c *chainClient) LatestFinalizedBlock(ctx context.Context) (*evmtypes.Head, error) { + return c.multiNode.LatestFinalizedBlock(ctx) +} diff --git a/core/chains/evm/client/chain_client_test.go b/core/chains/evm/client/chain_client_test.go index 1718036641e..13fddf67622 100644 --- a/core/chains/evm/client/chain_client_test.go +++ b/core/chains/evm/client/chain_client_test.go @@ -23,8 +23,9 @@ func newMockRpc(t *testing.T) *mocks.RPCClient { mockRpc.On("Dial", mock.Anything).Return(nil).Once() mockRpc.On("Close").Return(nil).Once() mockRpc.On("ChainID", mock.Anything).Return(testutils.FixtureChainID, nil).Once() - mockRpc.On("Subscribe", mock.Anything, mock.Anything, mock.Anything).Return(client.NewMockSubscription(), nil).Once() - mockRpc.On("SetAliveLoopSub", mock.Anything).Return().Once() + // node does not always manage to fully setup aliveLoop, so we have to make calls optional to avoid flakes + mockRpc.On("Subscribe", mock.Anything, mock.Anything, mock.Anything).Return(client.NewMockSubscription(), nil).Maybe() + mockRpc.On("SetAliveLoopSub", mock.Anything).Return().Maybe() return mockRpc } diff --git a/core/chains/evm/client/client.go b/core/chains/evm/client/client.go index 70d989ae808..ee33db97fd6 100644 --- a/core/chains/evm/client/client.go +++ b/core/chains/evm/client/client.go @@ -63,6 +63,7 @@ type Client interface { HeadByNumber(ctx context.Context, n *big.Int) (*evmtypes.Head, error) HeadByHash(ctx context.Context, n common.Hash) (*evmtypes.Head, error) SubscribeNewHead(ctx context.Context, ch chan<- *evmtypes.Head) (ethereum.Subscription, error) + LatestFinalizedBlock(ctx context.Context) (head *evmtypes.Head, err error) SendTransactionReturnCode(ctx context.Context, tx *types.Transaction, fromAddress common.Address) (commonclient.SendTxReturnCode, error) @@ -366,3 +367,7 @@ func (client *client) SuggestGasTipCap(ctx context.Context) (tipCap *big.Int, er func (client *client) IsL2() bool { return client.pool.ChainType().IsL2() } + +func (client *client) LatestFinalizedBlock(_ context.Context) (*evmtypes.Head, error) { + return nil, pkgerrors.New("not implemented. client was deprecated. New methods are added only to satisfy type constraints while we are migrating to new alternatives") +} diff --git a/core/chains/evm/client/compatibility_helper.go b/core/chains/evm/client/compatibility_helper.go new file mode 100644 index 00000000000..c19c66b7442 --- /dev/null +++ b/core/chains/evm/client/compatibility_helper.go @@ -0,0 +1,57 @@ +package client + +import ( + "fmt" + "math/big" + + "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/common/hexutil" + "github.com/ethereum/go-ethereum/rpc" +) + +// Needed to support Geth servers < v1.11.0 + +// COPIED FROM go-ethereum/ethclient/gethclient - must be kept up to date! +func ToBackwardCompatibleBlockNumArg(number *big.Int) string { + if number == nil { + return "latest" + } + if number.Sign() >= 0 { + return hexutil.EncodeBig(number) + } + // It's negative. + if number.IsInt64() { + return rpc.BlockNumber(number.Int64()).String() + } + // It's negative and large, which is invalid. + return fmt.Sprintf("", number) +} + +// COPIED FROM go-ethereum/ethclient/gethclient - must be kept up to date! +// Modified to include legacy 'data' as well as 'input' in order to support non-compliant servers. +func ToBackwardCompatibleCallArg(msg ethereum.CallMsg) interface{} { + arg := map[string]interface{}{ + "from": msg.From, + "to": msg.To, + } + if len(msg.Data) > 0 { + arg["input"] = hexutil.Bytes(msg.Data) + arg["data"] = hexutil.Bytes(msg.Data) // duplicate legacy field for compatibility + } + if msg.Value != nil { + arg["value"] = (*hexutil.Big)(msg.Value) + } + if msg.Gas != 0 { + arg["gas"] = hexutil.Uint64(msg.Gas) + } + if msg.GasPrice != nil { + arg["gasPrice"] = (*hexutil.Big)(msg.GasPrice) + } + if msg.GasFeeCap != nil { + arg["maxFeePerGas"] = (*hexutil.Big)(msg.GasFeeCap) + } + if msg.GasTipCap != nil { + arg["maxPriorityFeePerGas"] = (*hexutil.Big)(msg.GasTipCap) + } + return arg +} diff --git a/core/chains/evm/client/config_builder.go b/core/chains/evm/client/config_builder.go new file mode 100644 index 00000000000..c004bc4e9c6 --- /dev/null +++ b/core/chains/evm/client/config_builder.go @@ -0,0 +1,100 @@ +package client + +import ( + "fmt" + "net/url" + "time" + + "go.uber.org/multierr" + + commonconfig "github.com/smartcontractkit/chainlink-common/pkg/config" + "github.com/smartcontractkit/chainlink/v2/common/config" + evmconfig "github.com/smartcontractkit/chainlink/v2/core/chains/evm/config" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/config/toml" +) + +type nodeConfig struct { + Name *string + WSURL *string + HTTPURL *string + SendOnly *bool + Order *int32 +} + +// Build the configs needed to initialize the chain client +// Parameters should only be basic go types to make it accessible for external users +// Configs can be stored in a variety of ways +func NewClientConfigs( + selectionMode *string, + leaseDuration time.Duration, + chainType string, + nodeCfgs []nodeConfig, + pollFailureThreshold *uint32, + pollInterval time.Duration, + syncThreshold *uint32, + nodeIsSyncingEnabled *bool, +) (evmconfig.NodePool, []*toml.Node, config.ChainType, error) { + nodes, err := parseNodeConfigs(nodeCfgs) + if err != nil { + return nil, nil, "", err + } + nodePool := toml.NodePool{ + SelectionMode: selectionMode, + LeaseDuration: commonconfig.MustNewDuration(leaseDuration), + PollFailureThreshold: pollFailureThreshold, + PollInterval: commonconfig.MustNewDuration(pollInterval), + SyncThreshold: syncThreshold, + NodeIsSyncingEnabled: nodeIsSyncingEnabled, + } + nodePoolCfg := &evmconfig.NodePoolConfig{C: nodePool} + return nodePoolCfg, nodes, config.ChainType(chainType), nil +} + +func parseNodeConfigs(nodeCfgs []nodeConfig) ([]*toml.Node, error) { + nodes := make([]*toml.Node, len(nodeCfgs)) + for i, nodeCfg := range nodeCfgs { + if nodeCfg.WSURL == nil || nodeCfg.HTTPURL == nil { + return nil, fmt.Errorf("node config [%d]: missing WS or HTTP URL", i) + } + wsUrl := commonconfig.MustParseURL(*nodeCfg.WSURL) + httpUrl := commonconfig.MustParseURL(*nodeCfg.HTTPURL) + node := &toml.Node{ + Name: nodeCfg.Name, + WSURL: wsUrl, + HTTPURL: httpUrl, + SendOnly: nodeCfg.SendOnly, + Order: nodeCfg.Order, + } + nodes[i] = node + } + + if err := validateNodeConfigs(nodes); err != nil { + return nil, err + } + + return nodes, nil +} + +func validateNodeConfigs(nodes []*toml.Node) (err error) { + names := commonconfig.UniqueStrings{} + wsURLs := commonconfig.UniqueStrings{} + httpURLs := commonconfig.UniqueStrings{} + for i, node := range nodes { + if nodeErr := node.ValidateConfig(); nodeErr != nil { + err = multierr.Append(err, nodeErr) + } + if names.IsDupe(node.Name) { + err = multierr.Append(err, commonconfig.NewErrDuplicate(fmt.Sprintf("Nodes.%d.Name", i), *node.Name)) + } + u := (*url.URL)(node.WSURL) + if wsURLs.IsDupeFmt(u) { + err = multierr.Append(err, commonconfig.NewErrDuplicate(fmt.Sprintf("Nodes.%d.WSURL", i), u.String())) + } + u = (*url.URL)(node.HTTPURL) + if httpURLs.IsDupeFmt(u) { + err = multierr.Append(err, commonconfig.NewErrDuplicate(fmt.Sprintf("Nodes.%d.HTTPURL", i), u.String())) + } + } + + return err +} diff --git a/core/chains/evm/client/config_builder_test.go b/core/chains/evm/client/config_builder_test.go new file mode 100644 index 00000000000..cc00029d270 --- /dev/null +++ b/core/chains/evm/client/config_builder_test.go @@ -0,0 +1,181 @@ +package client_test + +import ( + "testing" + "time" + + "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/client" +) + +func TestClientConfigBuilder(t *testing.T) { + t.Parallel() + + selectionMode := ptr("HighestHead") + leaseDuration := 0 * time.Second + pollFailureThreshold := ptr(uint32(5)) + pollInterval := 10 * time.Second + syncThreshold := ptr(uint32(5)) + nodeIsSyncingEnabled := ptr(false) + chainTypeStr := "" + nodeConfigs := []client.TestNodeConfig{ + { + Name: ptr("foo"), + WSURL: ptr("ws://foo.test"), + HTTPURL: ptr("http://foo.test"), + }, + } + nodePool, nodes, chainType, err := client.NewClientConfigs(selectionMode, leaseDuration, chainTypeStr, nodeConfigs, pollFailureThreshold, pollInterval, syncThreshold, nodeIsSyncingEnabled) + require.NoError(t, err) + + // Validate node pool configs + require.Equal(t, *selectionMode, nodePool.SelectionMode()) + require.Equal(t, leaseDuration, nodePool.LeaseDuration()) + require.Equal(t, *pollFailureThreshold, nodePool.PollFailureThreshold()) + require.Equal(t, pollInterval, nodePool.PollInterval()) + require.Equal(t, *syncThreshold, nodePool.SyncThreshold()) + require.Equal(t, *nodeIsSyncingEnabled, nodePool.NodeIsSyncingEnabled()) + + // Validate node configs + require.Equal(t, *nodeConfigs[0].Name, *nodes[0].Name) + require.Equal(t, *nodeConfigs[0].WSURL, (*nodes[0].WSURL).String()) + require.Equal(t, *nodeConfigs[0].HTTPURL, (*nodes[0].HTTPURL).String()) + + // Validate chain type + require.Equal(t, chainTypeStr, string(chainType)) +} + +func TestNodeConfigs(t *testing.T) { + t.Parallel() + + t.Run("parsing unique node configs succeeds", func(t *testing.T) { + nodeConfigs := []client.TestNodeConfig{ + { + Name: ptr("foo1"), + WSURL: ptr("ws://foo1.test"), + HTTPURL: ptr("http://foo1.test"), + }, + { + Name: ptr("foo2"), + WSURL: ptr("ws://foo2.test"), + HTTPURL: ptr("http://foo2.test"), + }, + } + tomlNodes, err := client.ParseTestNodeConfigs(nodeConfigs) + require.NoError(t, err) + require.Len(t, tomlNodes, len(nodeConfigs)) + }) + + t.Run("parsing missing ws url fails", func(t *testing.T) { + nodeConfigs := []client.TestNodeConfig{ + { + Name: ptr("foo1"), + HTTPURL: ptr("http://foo1.test"), + }, + } + _, err := client.ParseTestNodeConfigs(nodeConfigs) + require.Error(t, err) + }) + + t.Run("parsing missing http url fails", func(t *testing.T) { + nodeConfigs := []client.TestNodeConfig{ + { + Name: ptr("foo1"), + WSURL: ptr("ws://foo1.test"), + }, + } + _, err := client.ParseTestNodeConfigs(nodeConfigs) + require.Error(t, err) + }) + + t.Run("parsing invalid ws url fails", func(t *testing.T) { + nodeConfigs := []client.TestNodeConfig{ + { + Name: ptr("foo1"), + WSURL: ptr("http://foo1.test"), + HTTPURL: ptr("http://foo1.test"), + }, + } + _, err := client.ParseTestNodeConfigs(nodeConfigs) + require.Error(t, err) + }) + + t.Run("parsing duplicate http url fails", func(t *testing.T) { + nodeConfigs := []client.TestNodeConfig{ + { + Name: ptr("foo1"), + WSURL: ptr("ws://foo1.test"), + HTTPURL: ptr("ws://foo1.test"), + }, + } + _, err := client.ParseTestNodeConfigs(nodeConfigs) + require.Error(t, err) + }) + + t.Run("parsing duplicate node names fails", func(t *testing.T) { + nodeConfigs := []client.TestNodeConfig{ + { + Name: ptr("foo1"), + WSURL: ptr("ws://foo1.test"), + HTTPURL: ptr("http://foo1.test"), + }, + { + Name: ptr("foo1"), + WSURL: ptr("ws://foo2.test"), + HTTPURL: ptr("http://foo2.test"), + }, + } + _, err := client.ParseTestNodeConfigs(nodeConfigs) + require.Error(t, err) + }) + + t.Run("parsing duplicate node ws urls fails", func(t *testing.T) { + nodeConfigs := []client.TestNodeConfig{ + { + Name: ptr("foo1"), + WSURL: ptr("ws://foo1.test"), + HTTPURL: ptr("http://foo1.test"), + }, + { + Name: ptr("foo2"), + WSURL: ptr("ws://foo2.test"), + HTTPURL: ptr("http://foo1.test"), + }, + } + _, err := client.ParseTestNodeConfigs(nodeConfigs) + require.Error(t, err) + }) + + t.Run("parsing duplicate node http urls fails", func(t *testing.T) { + nodeConfigs := []client.TestNodeConfig{ + { + Name: ptr("foo1"), + WSURL: ptr("ws://foo1.test"), + HTTPURL: ptr("http://foo1.test"), + }, + { + Name: ptr("foo2"), + WSURL: ptr("ws://foo1.test"), + HTTPURL: ptr("http://foo2.test"), + }, + } + _, err := client.ParseTestNodeConfigs(nodeConfigs) + require.Error(t, err) + }) + + t.Run("parsing order too large fails", func(t *testing.T) { + nodeConfigs := []client.TestNodeConfig{ + { + Name: ptr("foo1"), + WSURL: ptr("ws://foo1.test"), + HTTPURL: ptr("http://foo1.test"), + Order: ptr(int32(101)), + }, + } + _, err := client.ParseTestNodeConfigs(nodeConfigs) + require.Error(t, err) + }) +} + +func ptr[T any](t T) *T { return &t } diff --git a/core/chains/evm/client/errors.go b/core/chains/evm/client/errors.go index cedeb37d2e4..8095c122508 100644 --- a/core/chains/evm/client/errors.go +++ b/core/chains/evm/client/errors.go @@ -140,6 +140,7 @@ var arbitrum = ClientErrors{ Fatal: arbitrumFatal, L2FeeTooLow: regexp.MustCompile(`(: |^)max fee per gas less than block base fee(:|$)`), L2Full: regexp.MustCompile(`(: |^)(queue full|sequencer pending tx pool full, please try again)(:|$)`), + ServiceUnavailable: regexp.MustCompile(`(: |^)502 Bad Gateway: [\s\S]*$`), } var celo = ClientErrors{ diff --git a/core/chains/evm/client/errors_test.go b/core/chains/evm/client/errors_test.go index 21b4981ff17..a59d3fbf719 100644 --- a/core/chains/evm/client/errors_test.go +++ b/core/chains/evm/client/errors_test.go @@ -213,6 +213,7 @@ func Test_Eth_Errors(t *testing.T) { t.Run("IsServiceUnavailable", func(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"}, } for _, test := range tests { err = evmclient.NewSendErrorS(test.message) diff --git a/core/chains/evm/client/evm_client.go b/core/chains/evm/client/evm_client.go new file mode 100644 index 00000000000..cd7d4a74b80 --- /dev/null +++ b/core/chains/evm/client/evm_client.go @@ -0,0 +1,37 @@ +package client + +import ( + "math/big" + "net/url" + "time" + + "github.com/smartcontractkit/chainlink-common/pkg/logger" + commonclient "github.com/smartcontractkit/chainlink/v2/common/client" + "github.com/smartcontractkit/chainlink/v2/common/config" + evmconfig "github.com/smartcontractkit/chainlink/v2/core/chains/evm/config" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/config/toml" + evmtypes "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" +) + +func NewEvmClient(cfg evmconfig.NodePool, noNewHeadsThreshold time.Duration, lggr logger.Logger, chainID *big.Int, chainType config.ChainType, nodes []*toml.Node) Client { + var empty url.URL + var primaries []commonclient.Node[*big.Int, *evmtypes.Head, RPCClient] + var sendonlys []commonclient.SendOnlyNode[*big.Int, RPCClient] + for i, node := range nodes { + if node.SendOnly != nil && *node.SendOnly { + rpc := NewRPCClient(lggr, empty, (*url.URL)(node.HTTPURL), *node.Name, int32(i), chainID, + commonclient.Secondary) + sendonly := commonclient.NewSendOnlyNode(lggr, (url.URL)(*node.HTTPURL), + *node.Name, chainID, rpc) + sendonlys = append(sendonlys, sendonly) + } else { + rpc := NewRPCClient(lggr, (url.URL)(*node.WSURL), (*url.URL)(node.HTTPURL), *node.Name, int32(i), + chainID, commonclient.Primary) + primaryNode := commonclient.NewNode(cfg, noNewHeadsThreshold, + lggr, (url.URL)(*node.WSURL), (*url.URL)(node.HTTPURL), *node.Name, int32(i), chainID, *node.Order, + rpc, "EVM") + primaries = append(primaries, primaryNode) + } + } + return NewChainClient(lggr, cfg.SelectionMode(), cfg.LeaseDuration(), noNewHeadsThreshold, primaries, sendonlys, chainID, chainType) +} diff --git a/core/chains/evm/client/evm_client_test.go b/core/chains/evm/client/evm_client_test.go new file mode 100644 index 00000000000..2764a2b3611 --- /dev/null +++ b/core/chains/evm/client/evm_client_test.go @@ -0,0 +1,37 @@ +package client_test + +import ( + "testing" + "time" + + "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/client" + "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" + "github.com/smartcontractkit/chainlink/v2/core/logger" +) + +func TestNewEvmClient(t *testing.T) { + t.Parallel() + + noNewHeadsThreshold := 3 * time.Minute + selectionMode := ptr("HighestHead") + leaseDuration := 0 * time.Second + pollFailureThreshold := ptr(uint32(5)) + pollInterval := 10 * time.Second + syncThreshold := ptr(uint32(5)) + nodeIsSyncingEnabled := ptr(false) + chainTypeStr := "" + nodeConfigs := []client.TestNodeConfig{ + { + Name: ptr("foo"), + WSURL: ptr("ws://foo.test"), + HTTPURL: ptr("http://foo.test"), + }, + } + nodePool, nodes, chainType, err := client.NewClientConfigs(selectionMode, leaseDuration, chainTypeStr, nodeConfigs, pollFailureThreshold, pollInterval, syncThreshold, nodeIsSyncingEnabled) + require.NoError(t, err) + + client := client.NewEvmClient(nodePool, noNewHeadsThreshold, logger.TestLogger(t), testutils.FixtureChainID, chainType, nodes) + require.NotNil(t, client) +} diff --git a/core/chains/evm/client/helpers_test.go b/core/chains/evm/client/helpers_test.go index e400d95bef4..1decf3ed89d 100644 --- a/core/chains/evm/client/helpers_test.go +++ b/core/chains/evm/client/helpers_test.go @@ -14,6 +14,7 @@ import ( commonclient "github.com/smartcontractkit/chainlink/v2/common/client" commonconfig "github.com/smartcontractkit/chainlink/v2/common/config" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/config" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/config/toml" evmtypes "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" ) @@ -185,3 +186,9 @@ func (mes *mockSubscription) Unsubscribe() { mes.unsubscribed = true close(mes.Errors) } + +type TestNodeConfig = nodeConfig + +func ParseTestNodeConfigs(nodes []TestNodeConfig) ([]*toml.Node, error) { + return parseNodeConfigs(nodes) +} diff --git a/core/chains/evm/client/mocks/client.go b/core/chains/evm/client/mocks/client.go index bbaaafd7615..e6c9da1cbe9 100644 --- a/core/chains/evm/client/mocks/client.go +++ b/core/chains/evm/client/mocks/client.go @@ -565,6 +565,36 @@ func (_m *Client) LatestBlockHeight(ctx context.Context) (*big.Int, error) { return r0, r1 } +// LatestFinalizedBlock provides a mock function with given fields: ctx +func (_m *Client) LatestFinalizedBlock(ctx context.Context) (*evmtypes.Head, error) { + ret := _m.Called(ctx) + + if len(ret) == 0 { + panic("no return value specified for LatestFinalizedBlock") + } + + var r0 *evmtypes.Head + var r1 error + if rf, ok := ret.Get(0).(func(context.Context) (*evmtypes.Head, error)); ok { + return rf(ctx) + } + if rf, ok := ret.Get(0).(func(context.Context) *evmtypes.Head); ok { + r0 = rf(ctx) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*evmtypes.Head) + } + } + + if rf, ok := ret.Get(1).(func(context.Context) error); ok { + r1 = rf(ctx) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + // NodeStates provides a mock function with given fields: func (_m *Client) NodeStates() map[string]string { ret := _m.Called() diff --git a/core/chains/evm/client/mocks/rpc_client.go b/core/chains/evm/client/mocks/rpc_client.go index 26d5744a1ab..9fd9d6a9e79 100644 --- a/core/chains/evm/client/mocks/rpc_client.go +++ b/core/chains/evm/client/mocks/rpc_client.go @@ -590,6 +590,36 @@ func (_m *RPCClient) LatestBlockHeight(_a0 context.Context) (*big.Int, error) { return r0, r1 } +// LatestFinalizedBlock provides a mock function with given fields: ctx +func (_m *RPCClient) LatestFinalizedBlock(ctx context.Context) (*types.Head, error) { + ret := _m.Called(ctx) + + if len(ret) == 0 { + panic("no return value specified for LatestFinalizedBlock") + } + + var r0 *types.Head + var r1 error + if rf, ok := ret.Get(0).(func(context.Context) (*types.Head, error)); ok { + return rf(ctx) + } + if rf, ok := ret.Get(0).(func(context.Context) *types.Head); ok { + r0 = rf(ctx) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*types.Head) + } + } + + if rf, ok := ret.Get(1).(func(context.Context) error); ok { + r1 = rf(ctx) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + // PendingCallContract provides a mock function with given fields: ctx, msg func (_m *RPCClient) PendingCallContract(ctx context.Context, msg interface{}) ([]byte, error) { ret := _m.Called(ctx, msg) diff --git a/core/chains/evm/client/null_client.go b/core/chains/evm/client/null_client.go index 3cbae9e9dde..e4bd7d1dd9a 100644 --- a/core/chains/evm/client/null_client.go +++ b/core/chains/evm/client/null_client.go @@ -11,6 +11,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/assets" "github.com/smartcontractkit/chainlink-common/pkg/logger" + commonclient "github.com/smartcontractkit/chainlink/v2/common/client" evmtypes "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" ) @@ -226,3 +227,7 @@ func (nc *NullClient) IsL2() bool { nc.lggr.Debug("IsL2") return false } + +func (nc *NullClient) LatestFinalizedBlock(_ context.Context) (*evmtypes.Head, error) { + return nil, nil +} diff --git a/core/chains/evm/client/rpc_client.go b/core/chains/evm/client/rpc_client.go index 38d6a123f49..255b038037a 100644 --- a/core/chains/evm/client/rpc_client.go +++ b/core/chains/evm/client/rpc_client.go @@ -479,9 +479,17 @@ func (r *rpcClient) HeaderByHash(ctx context.Context, hash common.Hash) (header return } +func (r *rpcClient) LatestFinalizedBlock(ctx context.Context) (head *evmtypes.Head, err error) { + return r.blockByNumber(ctx, rpc.FinalizedBlockNumber.String()) +} + func (r *rpcClient) BlockByNumber(ctx context.Context, number *big.Int) (head *evmtypes.Head, err error) { hex := ToBlockNumArg(number) - err = r.CallContext(ctx, &head, "eth_getBlockByNumber", hex, false) + return r.blockByNumber(ctx, hex) +} + +func (r *rpcClient) blockByNumber(ctx context.Context, number string) (head *evmtypes.Head, err error) { + err = r.CallContext(ctx, &head, "eth_getBlockByNumber", number, false) if err != nil { return nil, err } @@ -777,10 +785,10 @@ func (r *rpcClient) CallContract(ctx context.Context, msg interface{}, blockNumb start := time.Now() var hex hexutil.Bytes if http != nil { - err = http.rpc.CallContext(ctx, &hex, "eth_call", toCallArg(message), toBlockNumArg(blockNumber)) + err = http.rpc.CallContext(ctx, &hex, "eth_call", ToBackwardCompatibleCallArg(message), ToBackwardCompatibleBlockNumArg(blockNumber)) err = r.wrapHTTP(err) } else { - err = ws.rpc.CallContext(ctx, &hex, "eth_call", toCallArg(message), toBlockNumArg(blockNumber)) + err = ws.rpc.CallContext(ctx, &hex, "eth_call", ToBackwardCompatibleCallArg(message), ToBackwardCompatibleBlockNumArg(blockNumber)) err = r.wrapWS(err) } if err == nil { @@ -808,10 +816,10 @@ func (r *rpcClient) PendingCallContract(ctx context.Context, msg interface{}) (v start := time.Now() var hex hexutil.Bytes if http != nil { - err = http.rpc.CallContext(ctx, &hex, "eth_call", toCallArg(message), "pending") + err = http.rpc.CallContext(ctx, &hex, "eth_call", ToBackwardCompatibleCallArg(message), "pending") err = r.wrapHTTP(err) } else { - err = ws.rpc.CallContext(ctx, &hex, "eth_call", toCallArg(message), "pending") + err = ws.rpc.CallContext(ctx, &hex, "eth_call", ToBackwardCompatibleCallArg(message), "pending") err = r.wrapWS(err) } if err == nil { @@ -826,51 +834,6 @@ func (r *rpcClient) PendingCallContract(ctx context.Context, msg interface{}) (v return } -// COPIED FROM go-ethereum/ethclient/gethclient - must be kept up to date! -func toBlockNumArg(number *big.Int) string { - if number == nil { - return "latest" - } - if number.Sign() >= 0 { - return hexutil.EncodeBig(number) - } - // It's negative. - if number.IsInt64() { - return rpc.BlockNumber(number.Int64()).String() - } - // It's negative and large, which is invalid. - return fmt.Sprintf("", number) -} - -// COPIED FROM go-ethereum/ethclient/gethclient - must be kept up to date! -// Modified to include legacy 'data' as well as 'input' in order to support non-compliant servers. -func toCallArg(msg ethereum.CallMsg) interface{} { - arg := map[string]interface{}{ - "from": msg.From, - "to": msg.To, - } - if len(msg.Data) > 0 { - arg["input"] = hexutil.Bytes(msg.Data) - arg["data"] = hexutil.Bytes(msg.Data) // duplicate legacy field for compatibility - } - if msg.Value != nil { - arg["value"] = (*hexutil.Big)(msg.Value) - } - if msg.Gas != 0 { - arg["gas"] = hexutil.Uint64(msg.Gas) - } - if msg.GasPrice != nil { - arg["gasPrice"] = (*hexutil.Big)(msg.GasPrice) - } - if msg.GasFeeCap != nil { - arg["maxFeePerGas"] = (*hexutil.Big)(msg.GasFeeCap) - } - if msg.GasTipCap != nil { - arg["maxPriorityFeePerGas"] = (*hexutil.Big)(msg.GasTipCap) - } - return arg -} - func (r *rpcClient) LatestBlockHeight(ctx context.Context) (*big.Int, error) { var height big.Int h, err := r.BlockNumber(ctx) diff --git a/core/chains/evm/client/simulated_backend_client.go b/core/chains/evm/client/simulated_backend_client.go index c49637e7890..5750887126a 100644 --- a/core/chains/evm/client/simulated_backend_client.go +++ b/core/chains/evm/client/simulated_backend_client.go @@ -18,6 +18,8 @@ import ( "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/rpc" + "github.com/smartcontractkit/chainlink-common/pkg/utils/hex" + "github.com/smartcontractkit/chainlink-common/pkg/assets" "github.com/smartcontractkit/chainlink-common/pkg/logger" @@ -125,6 +127,10 @@ func (c *SimulatedBackendClient) currentBlockNumber() *big.Int { return c.b.Blockchain().CurrentBlock().Number } +func (c *SimulatedBackendClient) finalizedBlockNumber() *big.Int { + return c.b.Blockchain().CurrentFinalBlock().Number +} + func (c *SimulatedBackendClient) TokenBalance(ctx context.Context, address common.Address, contractAddress common.Address) (balance *big.Int, err error) { callData, err := balanceOfABI.Pack("balanceOf", address) if err != nil { @@ -171,6 +177,8 @@ func (c *SimulatedBackendClient) blockNumber(number interface{}) (blockNumber *b case "pending": panic("pending block not supported by simulated backend client") // I don't understand the semantics of this. // return big.NewInt(0).Add(c.currentBlockNumber(), big.NewInt(1)), nil + case "finalized": + return c.finalizedBlockNumber(), nil default: blockNumber, err := hexutil.DecodeBig(n) if err != nil { @@ -179,12 +187,16 @@ func (c *SimulatedBackendClient) blockNumber(number interface{}) (blockNumber *b return blockNumber, nil } case *big.Int: + if n == nil { + return nil, nil + } if n.Sign() < 0 { return nil, fmt.Errorf("block number must be non-negative") } return n, nil + default: + return nil, fmt.Errorf("invalid type %T for block number, must be string or *big.Int", n) } - panic("can never reach here") } // HeadByNumber returns our own header type. @@ -455,20 +467,24 @@ func (c *SimulatedBackendClient) BatchCallContext(ctx context.Context, b []rpc.B } for i, elem := range b { + var method func(context.Context, interface{}, ...interface{}) error switch elem.Method { case "eth_getTransactionReceipt": - b[i].Error = c.ethGetTransactionReceipt(ctx, b[i].Result, b[i].Args...) + method = c.ethGetTransactionReceipt case "eth_getBlockByNumber": - b[i].Error = c.ethGetBlockByNumber(ctx, b[i].Result, b[i].Args...) + method = c.ethGetBlockByNumber case "eth_call": - b[i].Error = c.ethCall(ctx, b[i].Result, b[i].Args...) + method = c.ethCall case "eth_getHeaderByNumber": - b[i].Error = c.ethGetHeaderByNumber(ctx, b[i].Result, b[i].Args...) + method = c.ethGetHeaderByNumber case "eth_estimateGas": - b[i].Error = c.ethEstimateGas(ctx, b[i].Result, b[i].Args...) + method = c.ethEstimateGas + case "eth_getLogs": + method = c.ethGetLogs default: return fmt.Errorf("SimulatedBackendClient got unsupported method %s", elem.Method) } + b[i].Error = method(ctx, b[i].Result, b[i].Args...) } return nil @@ -677,6 +693,87 @@ func (c *SimulatedBackendClient) ethGetHeaderByNumber(ctx context.Context, resul return nil } +func (c *SimulatedBackendClient) LatestFinalizedBlock(ctx context.Context) (*evmtypes.Head, error) { + block := c.b.Blockchain().CurrentFinalBlock() + return &evmtypes.Head{ + EVMChainID: ubig.NewI(c.chainId.Int64()), + Hash: block.Hash(), + Number: block.Number.Int64(), + ParentHash: block.ParentHash, + Timestamp: time.Unix(int64(block.Time), 0), + }, nil +} + +func (c *SimulatedBackendClient) ethGetLogs(ctx context.Context, result interface{}, args ...interface{}) error { + var from, to *big.Int + var hash *common.Hash + var err error + var addresses []common.Address + var topics [][]common.Hash + + params := args[0].(map[string]interface{}) + if blockHash, ok := params["blockHash"]; ok { + hash, err = interfaceToHash(blockHash) + if err != nil { + return fmt.Errorf("SimultaedBackendClient received unexpected 'blockhash' param: %w", err) + } + } + + if fromBlock, ok := params["fromBlock"]; ok { + from, err = c.blockNumber(fromBlock) + if err != nil { + return fmt.Errorf("SimulatedBackendClient expected 'fromBlock' to be a string: %w", err) + } + } + + if toBlock, ok := params["toBlock"]; ok { + to, err = c.blockNumber(toBlock) + if err != nil { + return fmt.Errorf("SimulatedBackendClient expected 'toBlock' to be a string: %w", err) + } + } + + if a, ok := params["addresses"]; ok { + addresses = a.([]common.Address) + } + + if t, ok := params["topics"]; ok { + tt := t.([][]common.Hash) + lastTopic := len(tt) - 1 + for lastTopic >= 0 { + if tt[lastTopic] != nil { + break + } + lastTopic-- + } + // lastTopic is the topic index of the last non-nil topic slice + // We have to drop any nil values in the topics slice after that due to a quirk in FilterLogs(), + // which will only use nil as a wildcard if there are non-nil values after it in the slice + for i := 0; i < lastTopic; i++ { + topics = append(topics, tt[i]) + } + } + + query := ethereum.FilterQuery{ + BlockHash: hash, + FromBlock: from, + ToBlock: to, + Addresses: addresses, + Topics: topics, + } + logs, err := c.b.FilterLogs(ctx, query) + if err != nil { + return err + } + switch r := result.(type) { + case *[]types.Log: + *r = logs + return nil + default: + return fmt.Errorf("SimulatedBackendClient unexpected Type %T", r) + } +} + func toCallMsg(params map[string]interface{}) ethereum.CallMsg { var callMsg ethereum.CallMsg toAddr, err := interfaceToAddress(params["to"]) @@ -778,3 +875,21 @@ func interfaceToAddress(value interface{}) (common.Address, error) { return common.Address{}, fmt.Errorf("unrecognized value type: %T for converting value to common.Address; use hex encoded string, *big.Int, or common.Address", v) } } + +func interfaceToHash(value interface{}) (*common.Hash, error) { + switch v := value.(type) { + case common.Hash: + return &v, nil + case *common.Hash: + return v, nil + case string: + b, err := hex.DecodeString(v) + if err != nil || len(b) != 32 { + return nil, fmt.Errorf("string does not represent a 32-byte hexadecimal number") + } + h := common.Hash(b) + return &h, nil + default: + return nil, fmt.Errorf("unrecognized value type: %T for converting value to common.Hash; use hex encoded string or common.Hash", v) + } +} diff --git a/core/chains/evm/config/chain_scoped.go b/core/chains/evm/config/chain_scoped.go index 9247e77ba9d..aa13b9a2282 100644 --- a/core/chains/evm/config/chain_scoped.go +++ b/core/chains/evm/config/chain_scoped.go @@ -166,7 +166,7 @@ func (e *evmConfig) MinIncomingConfirmations() uint32 { } func (e *evmConfig) NodePool() NodePool { - return &nodePoolConfig{c: e.c.NodePool} + return &NodePoolConfig{C: e.c.NodePool} } func (e *evmConfig) NodeNoNewHeadsThreshold() time.Duration { diff --git a/core/chains/evm/config/chain_scoped_chain_writer.go b/core/chains/evm/config/chain_scoped_chain_writer.go index b84731314e1..1f1cdcecfa7 100644 --- a/core/chains/evm/config/chain_scoped_chain_writer.go +++ b/core/chains/evm/config/chain_scoped_chain_writer.go @@ -2,17 +2,17 @@ package config import ( "github.com/smartcontractkit/chainlink/v2/core/chains/evm/config/toml" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ethkey" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" ) type chainWriterConfig struct { c toml.ChainWriter } -func (b *chainWriterConfig) FromAddress() *ethkey.EIP55Address { +func (b *chainWriterConfig) FromAddress() *types.EIP55Address { return b.c.FromAddress } -func (b *chainWriterConfig) ForwarderAddress() *ethkey.EIP55Address { +func (b *chainWriterConfig) ForwarderAddress() *types.EIP55Address { return b.c.ForwarderAddress } diff --git a/core/chains/evm/config/chain_scoped_gas_estimator.go b/core/chains/evm/config/chain_scoped_gas_estimator.go index 0c52cf0a468..9d7d10356f7 100644 --- a/core/chains/evm/config/chain_scoped_gas_estimator.go +++ b/core/chains/evm/config/chain_scoped_gas_estimator.go @@ -63,11 +63,11 @@ func (g *gasEstimatorConfig) FeeCapDefault() *assets.Wei { return g.c.FeeCapDefault } -func (g *gasEstimatorConfig) LimitDefault() uint32 { +func (g *gasEstimatorConfig) LimitDefault() uint64 { return *g.c.LimitDefault } -func (g *gasEstimatorConfig) LimitMax() uint32 { +func (g *gasEstimatorConfig) LimitMax() uint64 { return *g.c.LimitMax } diff --git a/core/chains/evm/config/chain_scoped_node_pool.go b/core/chains/evm/config/chain_scoped_node_pool.go index fc52caa0aa3..0796d004cae 100644 --- a/core/chains/evm/config/chain_scoped_node_pool.go +++ b/core/chains/evm/config/chain_scoped_node_pool.go @@ -6,30 +6,30 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/chains/evm/config/toml" ) -type nodePoolConfig struct { - c toml.NodePool +type NodePoolConfig struct { + C toml.NodePool } -func (n *nodePoolConfig) PollFailureThreshold() uint32 { - return *n.c.PollFailureThreshold +func (n *NodePoolConfig) PollFailureThreshold() uint32 { + return *n.C.PollFailureThreshold } -func (n *nodePoolConfig) PollInterval() time.Duration { - return n.c.PollInterval.Duration() +func (n *NodePoolConfig) PollInterval() time.Duration { + return n.C.PollInterval.Duration() } -func (n *nodePoolConfig) SelectionMode() string { - return *n.c.SelectionMode +func (n *NodePoolConfig) SelectionMode() string { + return *n.C.SelectionMode } -func (n *nodePoolConfig) SyncThreshold() uint32 { - return *n.c.SyncThreshold +func (n *NodePoolConfig) SyncThreshold() uint32 { + return *n.C.SyncThreshold } -func (n *nodePoolConfig) LeaseDuration() time.Duration { - return n.c.LeaseDuration.Duration() +func (n *NodePoolConfig) LeaseDuration() time.Duration { + return n.C.LeaseDuration.Duration() } -func (n *nodePoolConfig) NodeIsSyncingEnabled() bool { - return *n.c.NodeIsSyncingEnabled +func (n *NodePoolConfig) NodeIsSyncingEnabled() bool { + return *n.C.NodeIsSyncingEnabled } diff --git a/core/chains/evm/config/config.go b/core/chains/evm/config/config.go index c878fea46e9..3c504f63ae7 100644 --- a/core/chains/evm/config/config.go +++ b/core/chains/evm/config/config.go @@ -10,8 +10,8 @@ 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" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ethkey" ) type EVM interface { @@ -97,8 +97,8 @@ type GasEstimator interface { BumpTxDepth() uint32 BumpMin() *assets.Wei FeeCapDefault() *assets.Wei - LimitDefault() uint32 - LimitMax() uint32 + LimitDefault() uint64 + LimitMax() uint64 LimitMultiplier() float32 LimitTransfer() uint32 PriceDefault() *assets.Wei @@ -130,8 +130,8 @@ type BlockHistory interface { } type ChainWriter interface { - FromAddress() *ethkey.EIP55Address - ForwarderAddress() *ethkey.EIP55Address + FromAddress() *types.EIP55Address + ForwarderAddress() *types.EIP55Address } type NodePool interface { diff --git a/core/chains/evm/config/config_test.go b/core/chains/evm/config/config_test.go index f62f540dafc..c0457fbe850 100644 --- a/core/chains/evm/config/config_test.go +++ b/core/chains/evm/config/config_test.go @@ -16,13 +16,13 @@ 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/config/toml" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" ubig "github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils/big" "github.com/smartcontractkit/chainlink/v2/core/config" "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/services/chainlink" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ethkey" ) func TestChainScopedConfig(t *testing.T) { @@ -89,7 +89,7 @@ func TestChainScopedConfig(t *testing.T) { gcfg2 := configtest.NewGeneralConfig(t, func(c *chainlink.Config, s *chainlink.Secrets) { overrides(c, s) c.EVM[0].KeySpecific = toml.KeySpecificConfig{ - {Key: ptr(ethkey.EIP55AddressFromAddress(randomOtherAddr)), + {Key: ptr(types.EIP55AddressFromAddress(randomOtherAddr)), GasEstimator: toml.KeySpecificGasEstimator{ PriceMax: assets.GWei(850), }, @@ -124,7 +124,7 @@ func TestChainScopedConfig(t *testing.T) { t.Run(tt.name, func(t *testing.T) { gcfg3 := configtest.NewGeneralConfig(t, func(c *chainlink.Config, s *chainlink.Secrets) { c.EVM[0].KeySpecific = toml.KeySpecificConfig{ - {Key: ptr(ethkey.EIP55AddressFromAddress(addr)), + {Key: ptr(types.EIP55AddressFromAddress(addr)), GasEstimator: toml.KeySpecificGasEstimator{ PriceMax: tt.val, }, @@ -143,7 +143,7 @@ func TestChainScopedConfig(t *testing.T) { gcfg3 := configtest.NewGeneralConfig(t, func(c *chainlink.Config, s *chainlink.Secrets) { c.EVM[0].GasEstimator.PriceMax = chainSpecificPrice c.EVM[0].KeySpecific = toml.KeySpecificConfig{ - {Key: ptr(ethkey.EIP55AddressFromAddress(addr)), + {Key: ptr(types.EIP55AddressFromAddress(addr)), GasEstimator: toml.KeySpecificGasEstimator{ PriceMax: keySpecificPrice, }, @@ -160,7 +160,7 @@ func TestChainScopedConfig(t *testing.T) { gcfg3 := configtest.NewGeneralConfig(t, func(c *chainlink.Config, s *chainlink.Secrets) { c.EVM[0].GasEstimator.PriceMax = chainSpecificPrice c.EVM[0].KeySpecific = toml.KeySpecificConfig{ - {Key: ptr(ethkey.EIP55AddressFromAddress(addr)), + {Key: ptr(types.EIP55AddressFromAddress(addr)), GasEstimator: toml.KeySpecificGasEstimator{ PriceMax: keySpecificPrice, }, @@ -175,7 +175,7 @@ func TestChainScopedConfig(t *testing.T) { keySpecificPrice := assets.GWei(900) gcfg3 := configtest.NewGeneralConfig(t, func(c *chainlink.Config, s *chainlink.Secrets) { c.EVM[0].KeySpecific = toml.KeySpecificConfig{ - {Key: ptr(ethkey.EIP55AddressFromAddress(addr)), + {Key: ptr(types.EIP55AddressFromAddress(addr)), GasEstimator: toml.KeySpecificGasEstimator{ PriceMax: keySpecificPrice, }, @@ -192,7 +192,7 @@ func TestChainScopedConfig(t *testing.T) { gcfg3 := configtest.NewGeneralConfig(t, func(c *chainlink.Config, s *chainlink.Secrets) { c.EVM[0].GasEstimator.PriceMax = chainSpecificPrice c.EVM[0].KeySpecific = toml.KeySpecificConfig{ - {Key: ptr(ethkey.EIP55AddressFromAddress(addr)), + {Key: ptr(types.EIP55AddressFromAddress(addr)), GasEstimator: toml.KeySpecificGasEstimator{ PriceMax: keySpecificPrice, }, @@ -224,7 +224,7 @@ func TestChainScopedConfig(t *testing.T) { val := testutils.NewAddress() gcfg3 := configtest.NewGeneralConfig(t, func(c *chainlink.Config, s *chainlink.Secrets) { - c.EVM[0].LinkContractAddress = ptr(ethkey.EIP55AddressFromAddress(val)) + c.EVM[0].LinkContractAddress = ptr(types.EIP55AddressFromAddress(val)) }) cfg3 := evmtest.NewChainScopedConfig(t, gcfg3) @@ -241,7 +241,7 @@ func TestChainScopedConfig(t *testing.T) { val := testutils.NewAddress() gcfg3 := configtest.NewGeneralConfig(t, func(c *chainlink.Config, s *chainlink.Secrets) { - c.EVM[0].OperatorFactoryAddress = ptr(ethkey.EIP55AddressFromAddress(val)) + c.EVM[0].OperatorFactoryAddress = ptr(types.EIP55AddressFromAddress(val)) }) cfg3 := evmtest.NewChainScopedConfig(t, gcfg3) @@ -277,8 +277,8 @@ func TestChainScopedConfig_GasEstimator(t *testing.T) { assert.Equal(t, assets.GWei(20), ge.PriceDefault()) assert.Equal(t, assets.GWei(500), ge.PriceMax()) assert.Equal(t, assets.GWei(1), ge.PriceMin()) - assert.Equal(t, uint32(500000), ge.LimitDefault()) - assert.Equal(t, uint32(500000), ge.LimitMax()) + assert.Equal(t, uint64(500000), ge.LimitDefault()) + assert.Equal(t, uint64(500000), ge.LimitMax()) assert.Equal(t, float32(1), ge.LimitMultiplier()) assert.Equal(t, uint32(21000), ge.LimitTransfer()) assert.Equal(t, assets.GWei(5), ge.BumpMin()) @@ -317,7 +317,7 @@ func TestChainScopedConfig_Profiles(t *testing.T) { tests := []struct { name string chainID int64 - expectedGasLimitDefault uint32 + expectedGasLimitDefault uint64 expectedMinimumContractPayment string }{ {"default", 0, 500000, "0.00001"}, @@ -336,7 +336,7 @@ func TestChainScopedConfig_Profiles(t *testing.T) { {"harmonyMainnet", 1666600000, 500000, "0.00001"}, {"harmonyTestnet", 1666700000, 500000, "0.00001"}, - {"xDai", 100, 500000, "0.00001"}, + {"gnosisMainnet", 100, 500000, "0.00001"}, } for _, test := range tests { tt := test diff --git a/core/chains/evm/config/mocks/chain_scoped_config.go b/core/chains/evm/config/mocks/chain_scoped_config.go index badba1d69f3..29b6d6f3f3e 100644 --- a/core/chains/evm/config/mocks/chain_scoped_config.go +++ b/core/chains/evm/config/mocks/chain_scoped_config.go @@ -80,6 +80,26 @@ func (_m *ChainScopedConfig) AutoPprof() 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() diff --git a/core/chains/evm/config/mocks/gas_estimator.go b/core/chains/evm/config/mocks/gas_estimator.go index 69a2c852757..b1b25c0ee41 100644 --- a/core/chains/evm/config/mocks/gas_estimator.go +++ b/core/chains/evm/config/mocks/gas_estimator.go @@ -149,18 +149,18 @@ func (_m *GasEstimator) FeeCapDefault() *assets.Wei { } // LimitDefault provides a mock function with given fields: -func (_m *GasEstimator) LimitDefault() uint32 { +func (_m *GasEstimator) LimitDefault() uint64 { ret := _m.Called() if len(ret) == 0 { panic("no return value specified for LimitDefault") } - var r0 uint32 - if rf, ok := ret.Get(0).(func() uint32); ok { + var r0 uint64 + if rf, ok := ret.Get(0).(func() uint64); ok { r0 = rf() } else { - r0 = ret.Get(0).(uint32) + r0 = ret.Get(0).(uint64) } return r0 @@ -187,18 +187,18 @@ func (_m *GasEstimator) LimitJobType() config.LimitJobType { } // LimitMax provides a mock function with given fields: -func (_m *GasEstimator) LimitMax() uint32 { +func (_m *GasEstimator) LimitMax() uint64 { ret := _m.Called() if len(ret) == 0 { panic("no return value specified for LimitMax") } - var r0 uint32 - if rf, ok := ret.Get(0).(func() uint32); ok { + var r0 uint64 + if rf, ok := ret.Get(0).(func() uint64); ok { r0 = rf() } else { - r0 = ret.Get(0).(uint32) + r0 = ret.Get(0).(uint64) } return r0 diff --git a/core/chains/evm/config/toml/config.go b/core/chains/evm/config/toml/config.go index 1ab4aa20d01..a81ef4d94ff 100644 --- a/core/chains/evm/config/toml/config.go +++ b/core/chains/evm/config/toml/config.go @@ -1,6 +1,7 @@ package toml import ( + "errors" "fmt" "net/url" "slices" @@ -17,13 +18,13 @@ import ( commontypes "github.com/smartcontractkit/chainlink-common/pkg/types" "github.com/smartcontractkit/chainlink/v2/common/config" - "github.com/smartcontractkit/chainlink/v2/core/chains" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/assets" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils/big" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ethkey" ) +var ErrNotFound = errors.New("not found") + type HasEVMConfigs interface { EVMConfigs() EVMConfigs } @@ -145,7 +146,7 @@ func (cs EVMConfigs) Node(name string) (types.Node, error) { } } } - return types.Node{}, fmt.Errorf("node %s: %w", name, chains.ErrNotFound) + return types.Node{}, fmt.Errorf("node %s: %w", name, ErrNotFound) } func (cs EVMConfigs) NodeStatus(name string) (commontypes.NodeStatus, error) { @@ -156,7 +157,7 @@ func (cs EVMConfigs) NodeStatus(name string) (commontypes.NodeStatus, error) { } } } - return commontypes.NodeStatus{}, fmt.Errorf("node %s: %w", name, chains.ErrNotFound) + return commontypes.NodeStatus{}, fmt.Errorf("node %s: %w", name, ErrNotFound) } func legacyNode(n *Node, chainID *big.Big) (v2 types.Node) { @@ -205,7 +206,7 @@ func (cs EVMConfigs) Nodes(chainID string) (ns []types.Node, err error) { } nodes := cs.nodes(chainID) if nodes == nil { - err = fmt.Errorf("no nodes: chain %q: %w", chainID, chains.ErrNotFound) + err = fmt.Errorf("no nodes: chain %q: %w", chainID, ErrNotFound) return } for _, n := range nodes { @@ -347,8 +348,8 @@ type Chain struct { ChainType *string FinalityDepth *uint32 FinalityTagEnabled *bool - FlagsContractAddress *ethkey.EIP55Address - LinkContractAddress *ethkey.EIP55Address + FlagsContractAddress *types.EIP55Address + LinkContractAddress *types.EIP55Address LogBackfillBatchSize *uint32 LogPollInterval *commonconfig.Duration LogKeepBlocksDepth *uint32 @@ -358,7 +359,7 @@ type Chain struct { MinContractPayment *commonassets.Link NonceAutoSync *bool NoNewHeadsThreshold *commonconfig.Duration - OperatorFactoryAddress *ethkey.EIP55Address + OperatorFactoryAddress *types.EIP55Address RPCDefaultBatchSize *uint32 RPCBlockQueryDelay *uint16 @@ -451,8 +452,8 @@ func (a *Automation) setFrom(f *Automation) { } type ChainWriter struct { - FromAddress *ethkey.EIP55Address `toml:",omitempty"` - ForwarderAddress *ethkey.EIP55Address `toml:",omitempty"` + FromAddress *types.EIP55Address `toml:",omitempty"` + ForwarderAddress *types.EIP55Address `toml:",omitempty"` } func (m *ChainWriter) setFrom(f *ChainWriter) { @@ -481,8 +482,8 @@ type GasEstimator struct { PriceMax *assets.Wei PriceMin *assets.Wei - LimitDefault *uint32 - LimitMax *uint32 + LimitDefault *uint64 + LimitMax *uint64 LimitMultiplier *decimal.Decimal LimitTransfer *uint32 LimitJobType GasLimitJobType `toml:",omitempty"` @@ -668,7 +669,7 @@ func (ks KeySpecificConfig) ValidateConfig() (err error) { } type KeySpecific struct { - Key *ethkey.EIP55Address + Key *types.EIP55Address GasEstimator KeySpecificGasEstimator `toml:",omitempty"` } diff --git a/core/chains/evm/config/toml/defaults/Gnosis_Chiado.toml b/core/chains/evm/config/toml/defaults/Gnosis_Chiado.toml index 4770e104fbb..72c4ed13ae0 100644 --- a/core/chains/evm/config/toml/defaults/Gnosis_Chiado.toml +++ b/core/chains/evm/config/toml/defaults/Gnosis_Chiado.toml @@ -1,7 +1,7 @@ ChainID = '10200' # Gnoisis Finality is approx 8 minutes @ 12 blocks per minute, so 96 blocks FinalityDepth = 100 -ChainType = 'xdai' +ChainType = 'gnosis' LogPollInterval = '5s' [GasEstimator] diff --git a/core/chains/evm/config/toml/defaults/Gnosis_Mainnet.toml b/core/chains/evm/config/toml/defaults/Gnosis_Mainnet.toml index cc4e27e7ff4..6e180c52e39 100644 --- a/core/chains/evm/config/toml/defaults/Gnosis_Mainnet.toml +++ b/core/chains/evm/config/toml/defaults/Gnosis_Mainnet.toml @@ -6,7 +6,7 @@ # With xDai's current maximum of 19 validators then 40 blocks is the maximum possible re-org) # The mainnet default of 50 blocks is ok here ChainID = '100' -ChainType = 'xdai' +ChainType = 'gnosis' LinkContractAddress = '0xE2e73A1c69ecF83F464EFCE6A5be353a37cA09b2' LogPollInterval = '5s' diff --git a/core/chains/evm/config/toml/defaults/Optimism_Sepolia.toml b/core/chains/evm/config/toml/defaults/Optimism_Sepolia.toml new file mode 100644 index 00000000000..116ae9d680b --- /dev/null +++ b/core/chains/evm/config/toml/defaults/Optimism_Sepolia.toml @@ -0,0 +1,29 @@ +ChainID = '11155420' +ChainType = 'optimismBedrock' +FinalityDepth = 200 +LogPollInterval = '2s' +NoNewHeadsThreshold = '40s' +MinIncomingConfirmations = 1 + +[GasEstimator] +EIP1559DynamicFees = true +PriceMin = '1 wei' +BumpMin = '100 wei' + +[GasEstimator.BlockHistory] +BlockHistorySize = 60 + +[Transactions] +ResendAfterThreshold = '30s' + +[HeadTracker] +HistoryDepth = 300 + +[NodePool] +SyncThreshold = 10 + +[OCR] +ContractConfirmations = 1 + +[OCR2.Automation] +GasLimit = 6500000 diff --git a/core/chains/evm/config/toml/defaults/Polygon_Zkevm_Cardona.toml b/core/chains/evm/config/toml/defaults/Polygon_Zkevm_Cardona.toml new file mode 100644 index 00000000000..02cc322f19e --- /dev/null +++ b/core/chains/evm/config/toml/defaults/Polygon_Zkevm_Cardona.toml @@ -0,0 +1,23 @@ +ChainID = '2442' +FinalityDepth = 500 +NoNewHeadsThreshold = '12m' +MinIncomingConfirmations = 1 +LogPollInterval = '30s' +RPCDefaultBatchSize = 100 + +[OCR] +ContractConfirmations = 1 + +[Transactions] +ResendAfterThreshold = '3m' + +[GasEstimator] +PriceMin = '50 mwei' +BumpPercent = 40 +BumpMin = '20 mwei' + +[GasEstimator.BlockHistory] +BlockHistorySize = 12 + +[HeadTracker] +HistoryDepth = 2000 diff --git a/core/chains/evm/config/toml/defaults/Polygon_Zkevm_Goerli.toml b/core/chains/evm/config/toml/defaults/Polygon_Zkevm_Goerli.toml index 58451679558..a259e4766f8 100644 --- a/core/chains/evm/config/toml/defaults/Polygon_Zkevm_Goerli.toml +++ b/core/chains/evm/config/toml/defaults/Polygon_Zkevm_Goerli.toml @@ -1,5 +1,5 @@ ChainID = '1442' -FinalityDepth = 1 +FinalityDepth = 500 NoNewHeadsThreshold = '12m' MinIncomingConfirmations = 1 LogPollInterval = '30s' @@ -20,4 +20,4 @@ BumpMin = '20 mwei' BlockHistorySize = 12 [HeadTracker] -HistoryDepth = 50 +HistoryDepth = 2000 diff --git a/core/chains/evm/config/toml/defaults/Polygon_Zkevm_Mainnet.toml b/core/chains/evm/config/toml/defaults/Polygon_Zkevm_Mainnet.toml index 6be91b0e2cc..e8833bc7312 100644 --- a/core/chains/evm/config/toml/defaults/Polygon_Zkevm_Mainnet.toml +++ b/core/chains/evm/config/toml/defaults/Polygon_Zkevm_Mainnet.toml @@ -1,5 +1,5 @@ ChainID = '1101' -FinalityDepth = 1 +FinalityDepth = 500 NoNewHeadsThreshold = '6m' MinIncomingConfirmations = 1 LogPollInterval = '30s' @@ -21,4 +21,5 @@ BumpMin = '100 mwei' BlockHistorySize = 12 [HeadTracker] -HistoryDepth = 50 +# Polygon suffers from a tremendous number of re-orgs, we need to set this to something very large to be conservative enough +HistoryDepth = 2000 diff --git a/core/chains/evm/config/toml/defaults/zkSync_Goerli.toml b/core/chains/evm/config/toml/defaults/zkSync_Goerli.toml index 04529a41b81..be3bc22b812 100644 --- a/core/chains/evm/config/toml/defaults/zkSync_Goerli.toml +++ b/core/chains/evm/config/toml/defaults/zkSync_Goerli.toml @@ -6,7 +6,7 @@ MinIncomingConfirmations = 1 NoNewHeadsThreshold = '1m' [GasEstimator] -LimitDefault = 3_500_000 +LimitDefault = 100_000_000 PriceMax = 18446744073709551615 PriceMin = 0 diff --git a/core/chains/evm/config/toml/defaults/zkSync_Mainnet.toml b/core/chains/evm/config/toml/defaults/zkSync_Mainnet.toml index d7808edd15f..84ddac91db3 100644 --- a/core/chains/evm/config/toml/defaults/zkSync_Mainnet.toml +++ b/core/chains/evm/config/toml/defaults/zkSync_Mainnet.toml @@ -6,7 +6,7 @@ MinIncomingConfirmations = 1 NoNewHeadsThreshold = '1m' [GasEstimator] -LimitDefault = 3_500_000 +LimitDefault = 100_000_000 PriceMax = 18446744073709551615 PriceMin = 0 diff --git a/core/chains/evm/config/toml/defaults/zkSync_Sepolia.toml b/core/chains/evm/config/toml/defaults/zkSync_Sepolia.toml new file mode 100644 index 00000000000..0801e54acc9 --- /dev/null +++ b/core/chains/evm/config/toml/defaults/zkSync_Sepolia.toml @@ -0,0 +1,14 @@ +ChainID = '300' +ChainType = 'zksync' +FinalityDepth = 1 +LogPollInterval = '5s' +MinIncomingConfirmations = 1 +NoNewHeadsThreshold = '1m' + +[GasEstimator] +LimitDefault = 100_000_000 +PriceMax = 18446744073709551615 +PriceMin = 0 + +[HeadTracker] +HistoryDepth = 5 diff --git a/core/chains/evm/forwarders/forwarder_manager.go b/core/chains/evm/forwarders/forwarder_manager.go index 452bb87cae2..f0786c091c4 100644 --- a/core/chains/evm/forwarders/forwarder_manager.go +++ b/core/chains/evm/forwarders/forwarder_manager.go @@ -10,10 +10,9 @@ import ( "github.com/ethereum/go-ethereum/core/types" pkgerrors "github.com/pkg/errors" - "github.com/jmoiron/sqlx" - "github.com/smartcontractkit/chainlink-common/pkg/logger" "github.com/smartcontractkit/chainlink-common/pkg/services" + "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" "github.com/smartcontractkit/chainlink-common/pkg/utils" evmclient "github.com/smartcontractkit/chainlink/v2/core/chains/evm/client" @@ -23,7 +22,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/authorized_forwarder" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/authorized_receiver" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/offchain_aggregator_wrapper" - "github.com/smartcontractkit/chainlink/v2/core/services/pg" ) var forwardABI = evmtypes.MustGetABI(authorized_forwarder.AuthorizedForwarderABI).Methods["forward"] @@ -56,13 +54,13 @@ type FwdMgr struct { wg sync.WaitGroup } -func NewFwdMgr(db *sqlx.DB, client evmclient.Client, logpoller evmlogpoller.LogPoller, l logger.Logger, cfg Config, dbConfig pg.QConfig) *FwdMgr { +func NewFwdMgr(db sqlutil.DataSource, client evmclient.Client, logpoller evmlogpoller.LogPoller, l logger.Logger, cfg Config) *FwdMgr { lggr := logger.Sugared(logger.Named(l, "EVMForwarderManager")) fwdMgr := FwdMgr{ logger: lggr, cfg: cfg, evmClient: client, - ORM: NewORM(db, lggr, dbConfig), + ORM: NewORM(db), logpoller: logpoller, sendersCache: make(map[common.Address][]common.Address), } @@ -80,7 +78,7 @@ func (f *FwdMgr) Start(ctx context.Context) error { f.logger.Debug("Initializing EVM forwarder manager") chainId := f.evmClient.ConfiguredChainID() - fwdrs, err := f.ORM.FindForwardersByChain(big.Big(*chainId)) + fwdrs, err := f.ORM.FindForwardersByChain(ctx, big.Big(*chainId)) if err != nil { return pkgerrors.Wrapf(err, "Failed to retrieve forwarders for chain %d", chainId) } @@ -113,7 +111,7 @@ func FilterName(addr common.Address) string { func (f *FwdMgr) ForwarderFor(addr common.Address) (forwarder common.Address, err error) { // Gets forwarders for current chain. - fwdrs, err := f.ORM.FindForwardersByChain(big.Big(*f.evmClient.ConfiguredChainID())) + fwdrs, err := f.ORM.FindForwardersByChain(f.ctx, big.Big(*f.evmClient.ConfiguredChainID())) if err != nil { return common.Address{}, err } @@ -211,6 +209,7 @@ func (f *FwdMgr) subscribeSendersChangedLogs(addr common.Address) error { } err := f.logpoller.RegisterFilter( + f.ctx, evmlogpoller.Filter{ Name: FilterName(addr), EventSigs: []common.Hash{authChangedTopic}, @@ -251,11 +250,11 @@ func (f *FwdMgr) runLoop() { } logs, err := f.logpoller.LatestLogEventSigsAddrsWithConfs( + f.ctx, f.latestBlock, []common.Hash{authChangedTopic}, addrs, evmlogpoller.Confirmations(f.cfg.FinalityDepth()), - pg.WithParentCtx(f.ctx), ) if err != nil { f.logger.Errorw("Failed to retrieve latest log round", "err", err) diff --git a/core/chains/evm/forwarders/forwarder_manager_test.go b/core/chains/evm/forwarders/forwarder_manager_test.go index 0eb51a535e0..3a515e7ab39 100644 --- a/core/chains/evm/forwarders/forwarder_manager_test.go +++ b/core/chains/evm/forwarders/forwarder_manager_test.go @@ -5,6 +5,8 @@ import ( "testing" "time" + "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" + "github.com/ethereum/go-ethereum/accounts/abi/bind/backends" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core" @@ -26,7 +28,6 @@ import ( "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/services/pg" ) var GetAuthorisedSendersABI = evmtypes.MustGetABI(authorized_receiver.AuthorizedReceiverABI).Methods["getAuthorizedSenders"] @@ -39,6 +40,7 @@ func TestFwdMgr_MaybeForwardTransaction(t *testing.T) { cfg := configtest.NewTestGeneralConfig(t) evmcfg := evmtest.NewChainScopedConfig(t, cfg) owner := testutils.MustNewSimTransactor(t) + ctx := testutils.Context(t) ec := backends.NewSimulatedBackend(map[common.Address]core.GenesisAccount{ owner.From: { @@ -68,13 +70,13 @@ func TestFwdMgr_MaybeForwardTransaction(t *testing.T) { RpcBatchSize: 2, KeepFinalizedBlocksDepth: 1000, } - lp := logpoller.NewLogPoller(logpoller.NewORM(testutils.FixtureChainID, db, lggr, pgtest.NewQConfig(true)), evmClient, lggr, lpOpts) - fwdMgr := forwarders.NewFwdMgr(db, evmClient, lp, lggr, evmcfg.EVM(), evmcfg.Database()) - fwdMgr.ORM = forwarders.NewORM(db, logger.Test(t), cfg.Database()) + lp := logpoller.NewLogPoller(logpoller.NewORM(testutils.FixtureChainID, db, lggr), evmClient, lggr, lpOpts) + fwdMgr := forwarders.NewFwdMgr(db, evmClient, lp, lggr, evmcfg.EVM()) + fwdMgr.ORM = forwarders.NewORM(db) - fwd, err := fwdMgr.ORM.CreateForwarder(forwarderAddr, ubig.Big(*testutils.FixtureChainID)) + fwd, err := fwdMgr.ORM.CreateForwarder(ctx, forwarderAddr, ubig.Big(*testutils.FixtureChainID)) require.NoError(t, err) - lst, err := fwdMgr.ORM.FindForwardersByChain(ubig.Big(*testutils.FixtureChainID)) + lst, err := fwdMgr.ORM.FindForwardersByChain(ctx, ubig.Big(*testutils.FixtureChainID)) require.NoError(t, err) require.Equal(t, len(lst), 1) require.Equal(t, lst[0].Address, forwarderAddr) @@ -87,7 +89,7 @@ func TestFwdMgr_MaybeForwardTransaction(t *testing.T) { require.NoError(t, err) cleanupCalled := false - cleanup := func(tx pg.Queryer, evmChainId int64, addr common.Address) error { + cleanup := func(tx sqlutil.DataSource, evmChainId int64, addr common.Address) error { require.Equal(t, testutils.FixtureChainID.Int64(), evmChainId) require.Equal(t, forwarderAddr, addr) require.NotNil(t, tx) @@ -95,7 +97,7 @@ func TestFwdMgr_MaybeForwardTransaction(t *testing.T) { return nil } - err = fwdMgr.ORM.DeleteForwarder(fwd.ID, cleanup) + err = fwdMgr.ORM.DeleteForwarder(ctx, fwd.ID, cleanup) assert.NoError(t, err) assert.True(t, cleanupCalled) } @@ -103,6 +105,7 @@ func TestFwdMgr_MaybeForwardTransaction(t *testing.T) { func TestFwdMgr_AccountUnauthorizedToForward_SkipsForwarding(t *testing.T) { lggr := logger.Test(t) db := pgtest.NewSqlxDB(t) + ctx := testutils.Context(t) cfg := configtest.NewTestGeneralConfig(t) evmcfg := evmtest.NewChainScopedConfig(t, cfg) owner := testutils.MustNewSimTransactor(t) @@ -128,13 +131,13 @@ func TestFwdMgr_AccountUnauthorizedToForward_SkipsForwarding(t *testing.T) { RpcBatchSize: 2, KeepFinalizedBlocksDepth: 1000, } - lp := logpoller.NewLogPoller(logpoller.NewORM(testutils.FixtureChainID, db, lggr, pgtest.NewQConfig(true)), evmClient, lggr, lpOpts) - fwdMgr := forwarders.NewFwdMgr(db, evmClient, lp, lggr, evmcfg.EVM(), evmcfg.Database()) - fwdMgr.ORM = forwarders.NewORM(db, logger.Test(t), cfg.Database()) + lp := logpoller.NewLogPoller(logpoller.NewORM(testutils.FixtureChainID, db, lggr), evmClient, lggr, lpOpts) + fwdMgr := forwarders.NewFwdMgr(db, evmClient, lp, lggr, evmcfg.EVM()) + fwdMgr.ORM = forwarders.NewORM(db) - _, err = fwdMgr.ORM.CreateForwarder(forwarderAddr, ubig.Big(*testutils.FixtureChainID)) + _, err = fwdMgr.ORM.CreateForwarder(ctx, forwarderAddr, ubig.Big(*testutils.FixtureChainID)) require.NoError(t, err) - lst, err := fwdMgr.ORM.FindForwardersByChain(ubig.Big(*testutils.FixtureChainID)) + lst, err := fwdMgr.ORM.FindForwardersByChain(ctx, ubig.Big(*testutils.FixtureChainID)) require.NoError(t, err) require.Equal(t, len(lst), 1) require.Equal(t, lst[0].Address, forwarderAddr) diff --git a/core/chains/evm/forwarders/mocks/orm.go b/core/chains/evm/forwarders/mocks/orm.go index 691fbce8e9c..795c74e27e9 100644 --- a/core/chains/evm/forwarders/mocks/orm.go +++ b/core/chains/evm/forwarders/mocks/orm.go @@ -6,11 +6,13 @@ import ( common "github.com/ethereum/go-ethereum/common" big "github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils/big" + context "context" + forwarders "github.com/smartcontractkit/chainlink/v2/core/chains/evm/forwarders" mock "github.com/stretchr/testify/mock" - pg "github.com/smartcontractkit/chainlink/v2/core/services/pg" + sqlutil "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" ) // ORM is an autogenerated mock type for the ORM type @@ -18,9 +20,9 @@ type ORM struct { mock.Mock } -// CreateForwarder provides a mock function with given fields: addr, evmChainId -func (_m *ORM) CreateForwarder(addr common.Address, evmChainId big.Big) (forwarders.Forwarder, error) { - ret := _m.Called(addr, evmChainId) +// CreateForwarder provides a mock function with given fields: ctx, addr, evmChainId +func (_m *ORM) CreateForwarder(ctx context.Context, addr common.Address, evmChainId big.Big) (forwarders.Forwarder, error) { + ret := _m.Called(ctx, addr, evmChainId) if len(ret) == 0 { panic("no return value specified for CreateForwarder") @@ -28,17 +30,17 @@ func (_m *ORM) CreateForwarder(addr common.Address, evmChainId big.Big) (forward var r0 forwarders.Forwarder var r1 error - if rf, ok := ret.Get(0).(func(common.Address, big.Big) (forwarders.Forwarder, error)); ok { - return rf(addr, evmChainId) + if rf, ok := ret.Get(0).(func(context.Context, common.Address, big.Big) (forwarders.Forwarder, error)); ok { + return rf(ctx, addr, evmChainId) } - if rf, ok := ret.Get(0).(func(common.Address, big.Big) forwarders.Forwarder); ok { - r0 = rf(addr, evmChainId) + if rf, ok := ret.Get(0).(func(context.Context, common.Address, big.Big) forwarders.Forwarder); ok { + r0 = rf(ctx, addr, evmChainId) } else { r0 = ret.Get(0).(forwarders.Forwarder) } - if rf, ok := ret.Get(1).(func(common.Address, big.Big) error); ok { - r1 = rf(addr, evmChainId) + if rf, ok := ret.Get(1).(func(context.Context, common.Address, big.Big) error); ok { + r1 = rf(ctx, addr, evmChainId) } else { r1 = ret.Error(1) } @@ -46,17 +48,17 @@ func (_m *ORM) CreateForwarder(addr common.Address, evmChainId big.Big) (forward return r0, r1 } -// DeleteForwarder provides a mock function with given fields: id, cleanup -func (_m *ORM) DeleteForwarder(id int64, cleanup func(pg.Queryer, int64, common.Address) error) error { - ret := _m.Called(id, cleanup) +// DeleteForwarder provides a mock function with given fields: ctx, id, cleanup +func (_m *ORM) DeleteForwarder(ctx context.Context, id int64, cleanup func(sqlutil.DataSource, int64, common.Address) error) error { + ret := _m.Called(ctx, id, cleanup) if len(ret) == 0 { panic("no return value specified for DeleteForwarder") } var r0 error - if rf, ok := ret.Get(0).(func(int64, func(pg.Queryer, int64, common.Address) error) error); ok { - r0 = rf(id, cleanup) + if rf, ok := ret.Get(0).(func(context.Context, int64, func(sqlutil.DataSource, int64, common.Address) error) error); ok { + r0 = rf(ctx, id, cleanup) } else { r0 = ret.Error(0) } @@ -64,9 +66,9 @@ func (_m *ORM) DeleteForwarder(id int64, cleanup func(pg.Queryer, int64, common. return r0 } -// FindForwarders provides a mock function with given fields: offset, limit -func (_m *ORM) FindForwarders(offset int, limit int) ([]forwarders.Forwarder, int, error) { - ret := _m.Called(offset, limit) +// FindForwarders provides a mock function with given fields: ctx, offset, limit +func (_m *ORM) FindForwarders(ctx context.Context, offset int, limit int) ([]forwarders.Forwarder, int, error) { + ret := _m.Called(ctx, offset, limit) if len(ret) == 0 { panic("no return value specified for FindForwarders") @@ -75,25 +77,25 @@ func (_m *ORM) FindForwarders(offset int, limit int) ([]forwarders.Forwarder, in var r0 []forwarders.Forwarder var r1 int var r2 error - if rf, ok := ret.Get(0).(func(int, int) ([]forwarders.Forwarder, int, error)); ok { - return rf(offset, limit) + if rf, ok := ret.Get(0).(func(context.Context, int, int) ([]forwarders.Forwarder, int, error)); ok { + return rf(ctx, offset, limit) } - if rf, ok := ret.Get(0).(func(int, int) []forwarders.Forwarder); ok { - r0 = rf(offset, limit) + if rf, ok := ret.Get(0).(func(context.Context, int, int) []forwarders.Forwarder); ok { + r0 = rf(ctx, offset, limit) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]forwarders.Forwarder) } } - if rf, ok := ret.Get(1).(func(int, int) int); ok { - r1 = rf(offset, limit) + if rf, ok := ret.Get(1).(func(context.Context, int, int) int); ok { + r1 = rf(ctx, offset, limit) } else { r1 = ret.Get(1).(int) } - if rf, ok := ret.Get(2).(func(int, int) error); ok { - r2 = rf(offset, limit) + if rf, ok := ret.Get(2).(func(context.Context, int, int) error); ok { + r2 = rf(ctx, offset, limit) } else { r2 = ret.Error(2) } @@ -101,9 +103,9 @@ func (_m *ORM) FindForwarders(offset int, limit int) ([]forwarders.Forwarder, in return r0, r1, r2 } -// FindForwardersByChain provides a mock function with given fields: evmChainId -func (_m *ORM) FindForwardersByChain(evmChainId big.Big) ([]forwarders.Forwarder, error) { - ret := _m.Called(evmChainId) +// FindForwardersByChain provides a mock function with given fields: ctx, evmChainId +func (_m *ORM) FindForwardersByChain(ctx context.Context, evmChainId big.Big) ([]forwarders.Forwarder, error) { + ret := _m.Called(ctx, evmChainId) if len(ret) == 0 { panic("no return value specified for FindForwardersByChain") @@ -111,19 +113,19 @@ func (_m *ORM) FindForwardersByChain(evmChainId big.Big) ([]forwarders.Forwarder var r0 []forwarders.Forwarder var r1 error - if rf, ok := ret.Get(0).(func(big.Big) ([]forwarders.Forwarder, error)); ok { - return rf(evmChainId) + if rf, ok := ret.Get(0).(func(context.Context, big.Big) ([]forwarders.Forwarder, error)); ok { + return rf(ctx, evmChainId) } - if rf, ok := ret.Get(0).(func(big.Big) []forwarders.Forwarder); ok { - r0 = rf(evmChainId) + if rf, ok := ret.Get(0).(func(context.Context, big.Big) []forwarders.Forwarder); ok { + r0 = rf(ctx, evmChainId) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]forwarders.Forwarder) } } - if rf, ok := ret.Get(1).(func(big.Big) error); ok { - r1 = rf(evmChainId) + if rf, ok := ret.Get(1).(func(context.Context, big.Big) error); ok { + r1 = rf(ctx, evmChainId) } else { r1 = ret.Error(1) } @@ -131,9 +133,9 @@ func (_m *ORM) FindForwardersByChain(evmChainId big.Big) ([]forwarders.Forwarder return r0, r1 } -// FindForwardersInListByChain provides a mock function with given fields: evmChainId, addrs -func (_m *ORM) FindForwardersInListByChain(evmChainId big.Big, addrs []common.Address) ([]forwarders.Forwarder, error) { - ret := _m.Called(evmChainId, addrs) +// FindForwardersInListByChain provides a mock function with given fields: ctx, evmChainId, addrs +func (_m *ORM) FindForwardersInListByChain(ctx context.Context, evmChainId big.Big, addrs []common.Address) ([]forwarders.Forwarder, error) { + ret := _m.Called(ctx, evmChainId, addrs) if len(ret) == 0 { panic("no return value specified for FindForwardersInListByChain") @@ -141,19 +143,19 @@ func (_m *ORM) FindForwardersInListByChain(evmChainId big.Big, addrs []common.Ad var r0 []forwarders.Forwarder var r1 error - if rf, ok := ret.Get(0).(func(big.Big, []common.Address) ([]forwarders.Forwarder, error)); ok { - return rf(evmChainId, addrs) + if rf, ok := ret.Get(0).(func(context.Context, big.Big, []common.Address) ([]forwarders.Forwarder, error)); ok { + return rf(ctx, evmChainId, addrs) } - if rf, ok := ret.Get(0).(func(big.Big, []common.Address) []forwarders.Forwarder); ok { - r0 = rf(evmChainId, addrs) + if rf, ok := ret.Get(0).(func(context.Context, big.Big, []common.Address) []forwarders.Forwarder); ok { + r0 = rf(ctx, evmChainId, addrs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]forwarders.Forwarder) } } - if rf, ok := ret.Get(1).(func(big.Big, []common.Address) error); ok { - r1 = rf(evmChainId, addrs) + if rf, ok := ret.Get(1).(func(context.Context, big.Big, []common.Address) error); ok { + r1 = rf(ctx, evmChainId, addrs) } else { r1 = ret.Error(1) } diff --git a/core/chains/evm/forwarders/orm.go b/core/chains/evm/forwarders/orm.go index 8b4ba5273a3..cf498518d6d 100644 --- a/core/chains/evm/forwarders/orm.go +++ b/core/chains/evm/forwarders/orm.go @@ -1,105 +1,108 @@ package forwarders import ( + "context" "database/sql" + "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" + "github.com/ethereum/go-ethereum/common" "github.com/jmoiron/sqlx" pkgerrors "github.com/pkg/errors" - "github.com/smartcontractkit/chainlink-common/pkg/logger" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils/big" - "github.com/smartcontractkit/chainlink/v2/core/services/pg" ) //go:generate mockery --quiet --name ORM --output ./mocks/ --case=underscore type ORM interface { - CreateForwarder(addr common.Address, evmChainId big.Big) (fwd Forwarder, err error) - FindForwarders(offset, limit int) ([]Forwarder, int, error) - FindForwardersByChain(evmChainId big.Big) ([]Forwarder, error) - DeleteForwarder(id int64, cleanup func(tx pg.Queryer, evmChainId int64, addr common.Address) error) error - FindForwardersInListByChain(evmChainId big.Big, addrs []common.Address) ([]Forwarder, error) + CreateForwarder(ctx context.Context, addr common.Address, evmChainId big.Big) (fwd Forwarder, err error) + FindForwarders(ctx context.Context, offset, limit int) ([]Forwarder, int, error) + FindForwardersByChain(ctx context.Context, evmChainId big.Big) ([]Forwarder, error) + DeleteForwarder(ctx context.Context, id int64, cleanup func(tx sqlutil.DataSource, evmChainId int64, addr common.Address) error) error + FindForwardersInListByChain(ctx context.Context, evmChainId big.Big, addrs []common.Address) ([]Forwarder, error) } -type orm struct { - q pg.Q +type DbORM struct { + db sqlutil.DataSource } -var _ ORM = (*orm)(nil) +var _ ORM = &DbORM{} + +func NewORM(db sqlutil.DataSource) *DbORM { + return &DbORM{db: db} +} -func NewORM(db *sqlx.DB, lggr logger.Logger, cfg pg.QConfig) *orm { - return &orm{pg.NewQ(db, lggr, cfg)} +func (o *DbORM) Transaction(ctx context.Context, fn func(*DbORM) error) (err error) { + return sqlutil.Transact(ctx, o.new, o.db, nil, fn) } +// new returns a NewORM like o, but backed by q. +func (o *DbORM) new(q sqlutil.DataSource) *DbORM { return NewORM(q) } + // CreateForwarder creates the Forwarder address associated with the current EVM chain id. -func (o *orm) CreateForwarder(addr common.Address, evmChainId big.Big) (fwd Forwarder, err error) { +func (o *DbORM) CreateForwarder(ctx context.Context, addr common.Address, evmChainId big.Big) (fwd Forwarder, err error) { sql := `INSERT INTO evm.forwarders (address, evm_chain_id, created_at, updated_at) VALUES ($1, $2, now(), now()) RETURNING *` - err = o.q.Get(&fwd, sql, addr, evmChainId) + err = o.db.GetContext(ctx, &fwd, sql, addr, evmChainId) return fwd, err } // DeleteForwarder removes a forwarder address. // If cleanup is non-nil, it can be used to perform any chain- or contract-specific cleanup that need to happen atomically // on forwarder deletion. If cleanup returns an error, forwarder deletion will be aborted. -func (o *orm) DeleteForwarder(id int64, cleanup func(tx pg.Queryer, evmChainID int64, addr common.Address) error) (err error) { - var dest struct { - EvmChainId int64 - Address common.Address - } - - var rowsAffected int64 - err = o.q.Transaction(func(tx pg.Queryer) error { - err = tx.Get(&dest, `SELECT evm_chain_id, address FROM evm.forwarders WHERE id = $1`, id) +func (o *DbORM) DeleteForwarder(ctx context.Context, id int64, cleanup func(tx sqlutil.DataSource, evmChainID int64, addr common.Address) error) (err error) { + return o.Transaction(ctx, func(orm *DbORM) error { + var dest struct { + EvmChainId int64 + Address common.Address + } + err := orm.db.GetContext(ctx, &dest, `SELECT evm_chain_id, address FROM evm.forwarders WHERE id = $1`, id) if err != nil { return err } if cleanup != nil { - if err = cleanup(tx, dest.EvmChainId, dest.Address); err != nil { + if err = cleanup(orm.db, dest.EvmChainId, dest.Address); err != nil { return err } } - result, err2 := o.q.Exec(`DELETE FROM evm.forwarders WHERE id = $1`, id) + result, err := orm.db.ExecContext(ctx, `DELETE FROM evm.forwarders WHERE id = $1`, id) // If the forwarder wasn't found, we still want to delete the filter. // In that case, the transaction must return nil, even though DeleteForwarder // will return sql.ErrNoRows - if err2 != nil && !pkgerrors.Is(err2, sql.ErrNoRows) { - return err2 + if err != nil && !pkgerrors.Is(err, sql.ErrNoRows) { + return err } - rowsAffected, err2 = result.RowsAffected() - - return err2 + rowsAffected, err := result.RowsAffected() + if err == nil && rowsAffected == 0 { + err = sql.ErrNoRows + } + return err }) - - if err == nil && rowsAffected == 0 { - err = sql.ErrNoRows - } - return err } // FindForwarders returns all forwarder addresses from offset up until limit. -func (o *orm) FindForwarders(offset, limit int) (fwds []Forwarder, count int, err error) { +func (o *DbORM) FindForwarders(ctx context.Context, offset, limit int) (fwds []Forwarder, count int, err error) { sql := `SELECT count(*) FROM evm.forwarders` - if err = o.q.Get(&count, sql); err != nil { + if err = o.db.GetContext(ctx, &count, sql); err != nil { return } sql = `SELECT * FROM evm.forwarders ORDER BY created_at DESC, id DESC LIMIT $1 OFFSET $2` - if err = o.q.Select(&fwds, sql, limit, offset); err != nil { + if err = o.db.SelectContext(ctx, &fwds, sql, limit, offset); err != nil { return } return } // FindForwardersByChain returns all forwarder addresses for a chain. -func (o *orm) FindForwardersByChain(evmChainId big.Big) (fwds []Forwarder, err error) { +func (o *DbORM) FindForwardersByChain(ctx context.Context, evmChainId big.Big) (fwds []Forwarder, err error) { sql := `SELECT * FROM evm.forwarders where evm_chain_id = $1 ORDER BY created_at DESC, id DESC` - err = o.q.Select(&fwds, sql, evmChainId) + err = o.db.SelectContext(ctx, &fwds, sql, evmChainId) return } -func (o *orm) FindForwardersInListByChain(evmChainId big.Big, addrs []common.Address) ([]Forwarder, error) { +func (o *DbORM) FindForwardersInListByChain(ctx context.Context, evmChainId big.Big, addrs []common.Address) ([]Forwarder, error) { var fwdrs []Forwarder arg := map[string]interface{}{ @@ -124,8 +127,8 @@ func (o *orm) FindForwardersInListByChain(evmChainId big.Big, addrs []common.Add return nil, pkgerrors.Wrap(err, "Failed to run sqlx.IN on query") } - query = o.q.Rebind(query) - err = o.q.Select(&fwdrs, query, args...) + query = o.db.Rebind(query) + err = o.db.SelectContext(ctx, &fwdrs, query, args...) if err != nil { return nil, pkgerrors.Wrap(err, "Failed to execute query") diff --git a/core/chains/evm/forwarders/orm_test.go b/core/chains/evm/forwarders/orm_test.go index e95ac3778c6..7af55896b16 100644 --- a/core/chains/evm/forwarders/orm_test.go +++ b/core/chains/evm/forwarders/orm_test.go @@ -5,31 +5,28 @@ import ( "errors" "testing" + "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" + "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/smartcontractkit/chainlink-common/pkg/logger" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils/big" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest" - "github.com/smartcontractkit/chainlink/v2/core/services/pg" - - "github.com/jmoiron/sqlx" ) type TestORM struct { ORM - db *sqlx.DB + db sqlutil.DataSource } func setupORM(t *testing.T) *TestORM { t.Helper() var ( - db = pgtest.NewSqlxDB(t) - lggr = logger.Test(t) - orm = NewORM(db, lggr, pgtest.NewQConfig(true)) + db = pgtest.NewSqlxDB(t) + orm = NewORM(db) ) return &TestORM{ORM: orm, db: db} @@ -41,8 +38,9 @@ func Test_DeleteForwarder(t *testing.T) { orm := setupORM(t) addr := testutils.NewAddress() chainID := testutils.FixtureChainID + ctx := testutils.Context(t) - fwd, err := orm.CreateForwarder(addr, *big.New(chainID)) + fwd, err := orm.CreateForwarder(ctx, addr, *big.New(chainID)) require.NoError(t, err) assert.Equal(t, addr, fwd.Address) @@ -56,14 +54,14 @@ func Test_DeleteForwarder(t *testing.T) { rets := []error{ErrCleaningUp, nil, nil, ErrCleaningUp} expected := []error{ErrCleaningUp, nil, sql.ErrNoRows, sql.ErrNoRows} - testCleanupFn := func(q pg.Queryer, evmChainID int64, addr common.Address) error { + testCleanupFn := func(q sqlutil.DataSource, evmChainID int64, addr common.Address) error { require.Less(t, cleanupCalled, len(rets)) cleanupCalled++ return rets[cleanupCalled-1] } for _, expect := range expected { - err = orm.DeleteForwarder(fwd.ID, testCleanupFn) + err = orm.DeleteForwarder(ctx, fwd.ID, testCleanupFn) assert.ErrorIs(t, err, expect) } assert.Equal(t, 2, cleanupCalled) diff --git a/core/chains/evm/gas/arbitrum_estimator.go b/core/chains/evm/gas/arbitrum_estimator.go index 525d439e3e4..40366c5b998 100644 --- a/core/chains/evm/gas/arbitrum_estimator.go +++ b/core/chains/evm/gas/arbitrum_estimator.go @@ -23,7 +23,7 @@ import ( ) type ArbConfig interface { - LimitMax() uint32 + LimitMax() uint64 BumpPercent() uint16 BumpMin() *assets.Wei } @@ -105,7 +105,7 @@ func (a *arbitrumEstimator) HealthReport() map[string]error { // - Limit is computed from the dynamic values perL2Tx and perL1CalldataUnit, provided by the getPricesInArbGas() method // of the precompilie contract at ArbGasInfoAddress. perL2Tx is a constant amount of gas, and perL1CalldataUnit is // multiplied by the length of the tx calldata. The sum of these two values plus the original l2GasLimit is returned. -func (a *arbitrumEstimator) GetLegacyGas(ctx context.Context, calldata []byte, l2GasLimit uint32, maxGasPriceWei *assets.Wei, opts ...feetypes.Opt) (gasPrice *assets.Wei, chainSpecificGasLimit uint32, err error) { +func (a *arbitrumEstimator) GetLegacyGas(ctx context.Context, calldata []byte, l2GasLimit uint64, maxGasPriceWei *assets.Wei, opts ...feetypes.Opt) (gasPrice *assets.Wei, chainSpecificGasLimit uint64, err error) { gasPrice, _, err = a.EvmEstimator.GetLegacyGas(ctx, calldata, l2GasLimit, maxGasPriceWei, opts...) if err != nil { return @@ -134,7 +134,7 @@ func (a *arbitrumEstimator) GetLegacyGas(ctx context.Context, calldata []byte, l } } perL2Tx, perL1CalldataUnit := a.getPricesInArbGas() - chainSpecificGasLimit = l2GasLimit + perL2Tx + uint32(len(calldata))*perL1CalldataUnit + chainSpecificGasLimit = l2GasLimit + uint64(perL2Tx) + uint64(len(calldata))*uint64(perL1CalldataUnit) a.logger.Debugw("GetLegacyGas", "l2GasLimit", l2GasLimit, "calldataLen", len(calldata), "perL2Tx", perL2Tx, "perL1CalldataUnit", perL1CalldataUnit, "chainSpecificGasLimit", chainSpecificGasLimit) }) diff --git a/core/chains/evm/gas/arbitrum_estimator_test.go b/core/chains/evm/gas/arbitrum_estimator_test.go index e5a5af8d4f8..afac9e03276 100644 --- a/core/chains/evm/gas/arbitrum_estimator_test.go +++ b/core/chains/evm/gas/arbitrum_estimator_test.go @@ -23,12 +23,12 @@ import ( ) type arbConfig struct { - v uint32 + v uint64 bumpPercent uint16 bumpMin *assets.Wei } -func (a *arbConfig) LimitMax() uint32 { +func (a *arbConfig) LimitMax() uint64 { return a.v } @@ -44,9 +44,9 @@ func TestArbitrumEstimator(t *testing.T) { t.Parallel() maxGasPrice := assets.NewWeiI(100) - const maxGasLimit uint32 = 500_000 + const maxGasLimit uint64 = 500_000 calldata := []byte{0x00, 0x00, 0x01, 0x02, 0x03} - const gasLimit uint32 = 80000 + const gasLimit uint64 = 80000 const gasPriceBufferPercentage = 50 const bumpPercent = 10 var bumpMin = assets.NewWei(big.NewInt(1)) @@ -109,7 +109,7 @@ func TestArbitrumEstimator(t *testing.T) { require.Error(t, err) assert.EqualError(t, err, "estimated gas price: 42 wei is greater than the maximum gas price configured: 40 wei") assert.Nil(t, gasPrice) - assert.Equal(t, uint32(0), chainSpecificGasLimit) + assert.Equal(t, uint64(0), chainSpecificGasLimit) }) t.Run("gas price is lower than global max gas price", func(t *testing.T) { @@ -133,7 +133,7 @@ func TestArbitrumEstimator(t *testing.T) { gasPrice, chainSpecificGasLimit, err := o.GetLegacyGas(testutils.Context(t), calldata, gasLimit, assets.NewWeiI(110)) assert.EqualError(t, err, "estimated gas price: 120 wei is greater than the maximum gas price configured: 110 wei") assert.Nil(t, gasPrice) - assert.Equal(t, uint32(0), chainSpecificGasLimit) + assert.Equal(t, uint64(0), chainSpecificGasLimit) }) t.Run("calling BumpLegacyGas on unstarted arbitrum estimator returns error", func(t *testing.T) { @@ -195,7 +195,7 @@ func TestArbitrumEstimator(t *testing.T) { perL2Tx = 50_000 perL1Calldata = 10_000 ) - var expLimit = gasLimit + perL2Tx + perL1Calldata*uint32(len(calldata)) + var expLimit = gasLimit + perL2Tx + perL1Calldata*uint64(len(calldata)) var b bytes.Buffer b.Write(common.BigToHash(big.NewInt(perL2Tx)).Bytes()) diff --git a/core/chains/evm/gas/block_history_estimator.go b/core/chains/evm/gas/block_history_estimator.go index 27e20931af8..fcd0d627063 100644 --- a/core/chains/evm/gas/block_history_estimator.go +++ b/core/chains/evm/gas/block_history_estimator.go @@ -248,7 +248,7 @@ func (b *BlockHistoryEstimator) HealthReport() map[string]error { return map[string]error{b.Name(): b.Healthy()} } -func (b *BlockHistoryEstimator) GetLegacyGas(_ context.Context, _ []byte, gasLimit uint32, maxGasPriceWei *assets.Wei, _ ...feetypes.Opt) (gasPrice *assets.Wei, chainSpecificGasLimit uint32, err error) { +func (b *BlockHistoryEstimator) GetLegacyGas(_ context.Context, _ []byte, gasLimit uint64, maxGasPriceWei *assets.Wei, _ ...feetypes.Opt) (gasPrice *assets.Wei, chainSpecificGasLimit uint64, err error) { ok := b.IfStarted(func() { gasPrice = b.getGasPrice() }) @@ -287,7 +287,7 @@ func (b *BlockHistoryEstimator) getTipCap() *assets.Wei { return b.tipCap } -func (b *BlockHistoryEstimator) BumpLegacyGas(_ context.Context, originalGasPrice *assets.Wei, gasLimit uint32, maxGasPriceWei *assets.Wei, attempts []EvmPriorAttempt) (bumpedGasPrice *assets.Wei, chainSpecificGasLimit uint32, err error) { +func (b *BlockHistoryEstimator) BumpLegacyGas(_ context.Context, originalGasPrice *assets.Wei, gasLimit uint64, maxGasPriceWei *assets.Wei, attempts []EvmPriorAttempt) (bumpedGasPrice *assets.Wei, chainSpecificGasLimit uint64, err error) { if b.bhConfig.CheckInclusionBlocks() > 0 { if err = b.checkConnectivity(attempts); err != nil { if pkgerrors.Is(err, commonfee.ErrConnectivity) { @@ -388,7 +388,7 @@ func (b *BlockHistoryEstimator) checkConnectivity(attempts []EvmPriorAttempt) er return nil } -func (b *BlockHistoryEstimator) GetDynamicFee(_ context.Context, gasLimit uint32, maxGasPriceWei *assets.Wei) (fee DynamicFee, chainSpecificGasLimit uint32, err error) { +func (b *BlockHistoryEstimator) GetDynamicFee(_ context.Context, gasLimit uint64, maxGasPriceWei *assets.Wei) (fee DynamicFee, chainSpecificGasLimit uint64, err error) { if !b.eConfig.EIP1559DynamicFees() { return fee, 0, pkgerrors.New("Can't get dynamic fee, EIP1559 is disabled") } @@ -461,7 +461,7 @@ func calcFeeCap(latestAvailableBaseFeePerGas *assets.Wei, bufferBlocks int, tipC return feeCap } -func (b *BlockHistoryEstimator) BumpDynamicFee(_ context.Context, originalFee DynamicFee, originalGasLimit uint32, maxGasPriceWei *assets.Wei, attempts []EvmPriorAttempt) (bumped DynamicFee, chainSpecificGasLimit uint32, err error) { +func (b *BlockHistoryEstimator) BumpDynamicFee(_ context.Context, originalFee DynamicFee, originalGasLimit uint64, maxGasPriceWei *assets.Wei, attempts []EvmPriorAttempt) (bumped DynamicFee, chainSpecificGasLimit uint64, err error) { if b.bhConfig.CheckInclusionBlocks() > 0 { if err = b.checkConnectivity(attempts); err != nil { if pkgerrors.Is(err, commonfee.ErrConnectivity) { @@ -864,7 +864,7 @@ func (b *BlockHistoryEstimator) EffectiveGasPrice(block evmtypes.Block, tx evmty case 0x2, 0x3: return b.getEffectiveGasPrice(block, tx) default: - b.logger.Warnw(fmt.Sprintf("Ignoring unknown transaction type %v", tx.Type), "block", block, "tx", tx) + b.logger.Debugw(fmt.Sprintf("Ignoring unknown transaction type %v", tx.Type), "block", block, "tx", tx) return nil } } @@ -916,7 +916,7 @@ func (b *BlockHistoryEstimator) EffectiveTipCap(block evmtypes.Block, tx evmtype } return effectiveTipCap default: - b.logger.Warnw(fmt.Sprintf("Ignoring unknown transaction type %v", tx.Type), "block", block, "tx", tx) + b.logger.Debugw(fmt.Sprintf("Ignoring unknown transaction type %v", tx.Type), "block", block, "tx", tx) return nil } } diff --git a/core/chains/evm/gas/block_history_estimator_test.go b/core/chains/evm/gas/block_history_estimator_test.go index 7c467d1b36f..f5ab06fc913 100644 --- a/core/chains/evm/gas/block_history_estimator_test.go +++ b/core/chains/evm/gas/block_history_estimator_test.go @@ -886,12 +886,12 @@ func TestBlockHistoryEstimator_Recalculate_NoEIP1559(t *testing.T) { require.Equal(t, assets.NewWeiI(70), price) }) - t.Run("takes into account zero priced transactions if chain is not xDai", func(t *testing.T) { + t.Run("takes into account zero priced transactions if chain is not Gnosis", func(t *testing.T) { // Because everyone loves free gas! ethClient := evmtest.NewEthClientMockWithDefaultChain(t) cfg := gas.NewMockConfig() - bhCfg := newBlockHistoryConfig() + bhCfg := newBlockHistoryConfig() bhCfg.TransactionPercentileF = uint16(50) geCfg := &gas.MockGasEstimatorConfig{} @@ -908,7 +908,7 @@ func TestBlockHistoryEstimator_Recalculate_NoEIP1559(t *testing.T) { Number: 0, Hash: b1Hash, ParentHash: common.Hash{}, - Transactions: cltest.LegacyTransactionsFromGasPrices(0, 0, 0, 0, 100), + Transactions: cltest.LegacyTransactionsFromGasPrices(0, 0, 25, 50, 100), }, } @@ -917,24 +917,22 @@ func TestBlockHistoryEstimator_Recalculate_NoEIP1559(t *testing.T) { bhe.Recalculate(cltest.Head(0)) price := gas.GetGasPrice(bhe) - require.Equal(t, assets.NewWeiI(0), price) + require.Equal(t, assets.NewWeiI(25), price) }) - t.Run("ignores zero priced transactions on xDai", func(t *testing.T) { - chainID := big.NewInt(100) - + t.Run("ignores zero priced transactions only on Gnosis", func(t *testing.T) { ethClient := evmtest.NewEthClientMock(t) cfg := gas.NewMockConfig() - bhCfg := newBlockHistoryConfig() + bhCfg := newBlockHistoryConfig() bhCfg.TransactionPercentileF = uint16(50) geCfg := &gas.MockGasEstimatorConfig{} geCfg.EIP1559DynamicFeesF = false geCfg.PriceMaxF = maxGasPrice - geCfg.PriceMinF = assets.NewWeiI(100) + geCfg.PriceMinF = assets.NewWeiI(11) // Has to be set as Gnosis will only ignore transactions below this price - ibhe := newBlockHistoryEstimatorWithChainID(t, ethClient, cfg, geCfg, bhCfg, *chainID) + ibhe := newBlockHistoryEstimator(t, ethClient, cfg, geCfg, bhCfg) bhe := gas.BlockHistoryEstimatorFromInterface(ibhe) b1Hash := utils.NewHash() @@ -944,16 +942,24 @@ func TestBlockHistoryEstimator_Recalculate_NoEIP1559(t *testing.T) { Number: 0, Hash: b1Hash, ParentHash: common.Hash{}, - Transactions: cltest.LegacyTransactionsFromGasPrices(0, 0, 0, 0, 100), + Transactions: cltest.LegacyTransactionsFromGasPrices(0, 0, 0, 0, 80), }, } - gas.SetRollingBlockHistory(bhe, blocks) + // chainType is not set - GasEstimator should not ignore zero priced transactions and instead default to PriceMin==11 bhe.Recalculate(cltest.Head(0)) + require.Equal(t, assets.NewWeiI(11), gas.GetGasPrice(bhe)) - price := gas.GetGasPrice(bhe) - require.Equal(t, assets.NewWeiI(100), price) + // Set chainType to Gnosis - GasEstimator should now ignore zero priced transactions + cfg.ChainTypeF = string(config.ChainGnosis) + bhe.Recalculate(cltest.Head(0)) + require.Equal(t, assets.NewWeiI(80), gas.GetGasPrice(bhe)) + + // Same for xDai (deprecated) + cfg.ChainTypeF = string(config.ChainXDai) + bhe.Recalculate(cltest.Head(0)) + require.Equal(t, assets.NewWeiI(80), gas.GetGasPrice(bhe)) }) t.Run("handles unreasonably large gas prices (larger than a 64 bit int can hold)", func(t *testing.T) { diff --git a/core/chains/evm/gas/chain_specific.go b/core/chains/evm/gas/chain_specific.go index c989cd0aa98..c64441cc142 100644 --- a/core/chains/evm/gas/chain_specific.go +++ b/core/chains/evm/gas/chain_specific.go @@ -9,9 +9,9 @@ import ( // chainSpecificIsUsable allows for additional logic specific to a particular // Config that determines whether a transaction should be used for gas estimation func chainSpecificIsUsable(tx evmtypes.Transaction, baseFee *assets.Wei, chainType config.ChainType, minGasPriceWei *assets.Wei) bool { - if chainType == config.ChainXDai { + if chainType == config.ChainGnosis || chainType == config.ChainXDai { // GasPrice 0 on most chains is great since it indicates cheap/free transactions. - // However, xDai reserves a special type of "bridge" transaction with 0 gas + // However, Gnosis reserves a special type of "bridge" transaction with 0 gas // price that is always processed at top priority. Ordinary transactions // must be priced at least 1GWei, so we have to discard anything priced // below that (unless the contract is whitelisted). diff --git a/core/chains/evm/gas/cmd/arbgas/main.go b/core/chains/evm/gas/cmd/arbgas/main.go index c457b091c96..dc107a50b52 100644 --- a/core/chains/evm/gas/cmd/arbgas/main.go +++ b/core/chains/evm/gas/cmd/arbgas/main.go @@ -34,7 +34,7 @@ func main() { }) } -func printGetLegacyGas(ctx context.Context, e gas.EvmEstimator, calldata []byte, l2GasLimit uint32, maxGasPrice *assets.Wei, opts ...feetypes.Opt) { +func printGetLegacyGas(ctx context.Context, e gas.EvmEstimator, calldata []byte, l2GasLimit uint64, maxGasPrice *assets.Wei, opts ...feetypes.Opt) { price, limit, err := e.GetLegacyGas(ctx, calldata, l2GasLimit, maxGasPrice, opts...) if err != nil { log.Println("failed to get legacy gas:", err) @@ -67,12 +67,12 @@ func withEstimator(ctx context.Context, lggr logger.SugaredLogger, url string, f var _ gas.ArbConfig = &config{} type config struct { - max uint32 + max uint64 bumpPercent uint16 bumpMin *assets.Wei } -func (c *config) LimitMax() uint32 { +func (c *config) LimitMax() uint64 { return c.max } diff --git a/core/chains/evm/gas/fixed_price_estimator.go b/core/chains/evm/gas/fixed_price_estimator.go index a69be3b0d05..53b7e93a871 100644 --- a/core/chains/evm/gas/fixed_price_estimator.go +++ b/core/chains/evm/gas/fixed_price_estimator.go @@ -58,7 +58,7 @@ func (f *fixedPriceEstimator) Start(context.Context) error { return nil } -func (f *fixedPriceEstimator) GetLegacyGas(_ context.Context, _ []byte, gasLimit uint32, maxGasPriceWei *assets.Wei, _ ...feetypes.Opt) (*assets.Wei, uint32, error) { +func (f *fixedPriceEstimator) GetLegacyGas(_ context.Context, _ []byte, gasLimit uint64, maxGasPriceWei *assets.Wei, _ ...feetypes.Opt) (*assets.Wei, uint64, error) { gasPrice := commonfee.CalculateFee(f.config.PriceDefault().ToInt(), maxGasPriceWei.ToInt(), f.config.PriceMax().ToInt()) chainSpecificGasLimit, err := commonfee.ApplyMultiplier(gasLimit, f.config.LimitMultiplier()) if err != nil { @@ -70,10 +70,10 @@ func (f *fixedPriceEstimator) GetLegacyGas(_ context.Context, _ []byte, gasLimit func (f *fixedPriceEstimator) BumpLegacyGas( _ context.Context, originalGasPrice *assets.Wei, - originalGasLimit uint32, + originalGasLimit uint64, maxGasPriceWei *assets.Wei, _ []EvmPriorAttempt, -) (*assets.Wei, uint32, error) { +) (*assets.Wei, uint64, error) { gasPrice, err := commonfee.CalculateBumpedFee( f.lggr, f.config.PriceDefault().ToInt(), @@ -95,7 +95,7 @@ func (f *fixedPriceEstimator) BumpLegacyGas( return assets.NewWei(gasPrice), chainSpecificGasLimit, err } -func (f *fixedPriceEstimator) GetDynamicFee(_ context.Context, originalGasLimit uint32, maxGasPriceWei *assets.Wei) (d DynamicFee, chainSpecificGasLimit uint32, err error) { +func (f *fixedPriceEstimator) GetDynamicFee(_ context.Context, originalGasLimit uint64, maxGasPriceWei *assets.Wei) (d DynamicFee, chainSpecificGasLimit uint64, err error) { gasTipCap := f.config.TipCapDefault() if gasTipCap == nil { @@ -124,10 +124,10 @@ func (f *fixedPriceEstimator) GetDynamicFee(_ context.Context, originalGasLimit func (f *fixedPriceEstimator) BumpDynamicFee( _ context.Context, originalFee DynamicFee, - originalGasLimit uint32, + originalGasLimit uint64, maxGasPriceWei *assets.Wei, _ []EvmPriorAttempt, -) (bumped DynamicFee, chainSpecificGasLimit uint32, err error) { +) (bumped DynamicFee, chainSpecificGasLimit uint64, err error) { return BumpDynamicFeeOnly( f.config, diff --git a/core/chains/evm/gas/gas_test.go b/core/chains/evm/gas/gas_test.go index 355d39b6ce8..43a1506bc24 100644 --- a/core/chains/evm/gas/gas_test.go +++ b/core/chains/evm/gas/gas_test.go @@ -24,7 +24,7 @@ func Test_BumpLegacyGasPriceOnly(t *testing.T) { bumpMin *assets.Wei priceMax *assets.Wei expectedGasPrice *assets.Wei - originalLimit uint32 + originalLimit uint64 limitMultiplierPercent float32 expectedLimit uint64 }{ @@ -156,7 +156,7 @@ func Test_BumpDynamicFeeOnly(t *testing.T) { bumpMin *assets.Wei priceMax *assets.Wei expectedFee gas.DynamicFee - originalLimit uint32 + originalLimit uint64 limitMultiplierPercent float32 expectedLimit uint64 }{ diff --git a/core/chains/evm/gas/helpers_test.go b/core/chains/evm/gas/helpers_test.go index 9a5076be6d6..908674bbeeb 100644 --- a/core/chains/evm/gas/helpers_test.go +++ b/core/chains/evm/gas/helpers_test.go @@ -143,7 +143,7 @@ type MockGasEstimatorConfig struct { PriceMinF *assets.Wei PriceDefaultF *assets.Wei FeeCapDefaultF *assets.Wei - LimitMaxF uint32 + LimitMaxF uint64 ModeF string } @@ -191,7 +191,7 @@ func (m *MockGasEstimatorConfig) FeeCapDefault() *assets.Wei { return m.FeeCapDefaultF } -func (m *MockGasEstimatorConfig) LimitMax() uint32 { +func (m *MockGasEstimatorConfig) LimitMax() uint64 { return m.LimitMaxF } diff --git a/core/chains/evm/gas/mocks/evm_estimator.go b/core/chains/evm/gas/mocks/evm_estimator.go index 29705b2a5d9..f9ea34b830d 100644 --- a/core/chains/evm/gas/mocks/evm_estimator.go +++ b/core/chains/evm/gas/mocks/evm_estimator.go @@ -22,7 +22,7 @@ type EvmEstimator struct { } // BumpDynamicFee provides a mock function with given fields: ctx, original, gasLimit, maxGasPriceWei, attempts -func (_m *EvmEstimator) BumpDynamicFee(ctx context.Context, original gas.DynamicFee, gasLimit uint32, maxGasPriceWei *assets.Wei, attempts []gas.EvmPriorAttempt) (gas.DynamicFee, uint32, error) { +func (_m *EvmEstimator) BumpDynamicFee(ctx context.Context, original gas.DynamicFee, gasLimit uint64, maxGasPriceWei *assets.Wei, attempts []gas.EvmPriorAttempt) (gas.DynamicFee, uint64, error) { ret := _m.Called(ctx, original, gasLimit, maxGasPriceWei, attempts) if len(ret) == 0 { @@ -30,24 +30,24 @@ func (_m *EvmEstimator) BumpDynamicFee(ctx context.Context, original gas.Dynamic } var r0 gas.DynamicFee - var r1 uint32 + var r1 uint64 var r2 error - if rf, ok := ret.Get(0).(func(context.Context, gas.DynamicFee, uint32, *assets.Wei, []gas.EvmPriorAttempt) (gas.DynamicFee, uint32, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, gas.DynamicFee, uint64, *assets.Wei, []gas.EvmPriorAttempt) (gas.DynamicFee, uint64, error)); ok { return rf(ctx, original, gasLimit, maxGasPriceWei, attempts) } - if rf, ok := ret.Get(0).(func(context.Context, gas.DynamicFee, uint32, *assets.Wei, []gas.EvmPriorAttempt) gas.DynamicFee); ok { + if rf, ok := ret.Get(0).(func(context.Context, gas.DynamicFee, uint64, *assets.Wei, []gas.EvmPriorAttempt) gas.DynamicFee); ok { r0 = rf(ctx, original, gasLimit, maxGasPriceWei, attempts) } else { r0 = ret.Get(0).(gas.DynamicFee) } - if rf, ok := ret.Get(1).(func(context.Context, gas.DynamicFee, uint32, *assets.Wei, []gas.EvmPriorAttempt) uint32); ok { + if rf, ok := ret.Get(1).(func(context.Context, gas.DynamicFee, uint64, *assets.Wei, []gas.EvmPriorAttempt) uint64); ok { r1 = rf(ctx, original, gasLimit, maxGasPriceWei, attempts) } else { - r1 = ret.Get(1).(uint32) + r1 = ret.Get(1).(uint64) } - if rf, ok := ret.Get(2).(func(context.Context, gas.DynamicFee, uint32, *assets.Wei, []gas.EvmPriorAttempt) error); ok { + if rf, ok := ret.Get(2).(func(context.Context, gas.DynamicFee, uint64, *assets.Wei, []gas.EvmPriorAttempt) error); ok { r2 = rf(ctx, original, gasLimit, maxGasPriceWei, attempts) } else { r2 = ret.Error(2) @@ -57,7 +57,7 @@ func (_m *EvmEstimator) BumpDynamicFee(ctx context.Context, original gas.Dynamic } // BumpLegacyGas provides a mock function with given fields: ctx, originalGasPrice, gasLimit, maxGasPriceWei, attempts -func (_m *EvmEstimator) BumpLegacyGas(ctx context.Context, originalGasPrice *assets.Wei, gasLimit uint32, maxGasPriceWei *assets.Wei, attempts []gas.EvmPriorAttempt) (*assets.Wei, uint32, error) { +func (_m *EvmEstimator) BumpLegacyGas(ctx context.Context, originalGasPrice *assets.Wei, gasLimit uint64, maxGasPriceWei *assets.Wei, attempts []gas.EvmPriorAttempt) (*assets.Wei, uint64, error) { ret := _m.Called(ctx, originalGasPrice, gasLimit, maxGasPriceWei, attempts) if len(ret) == 0 { @@ -65,12 +65,12 @@ func (_m *EvmEstimator) BumpLegacyGas(ctx context.Context, originalGasPrice *ass } var r0 *assets.Wei - var r1 uint32 + var r1 uint64 var r2 error - if rf, ok := ret.Get(0).(func(context.Context, *assets.Wei, uint32, *assets.Wei, []gas.EvmPriorAttempt) (*assets.Wei, uint32, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, *assets.Wei, uint64, *assets.Wei, []gas.EvmPriorAttempt) (*assets.Wei, uint64, error)); ok { return rf(ctx, originalGasPrice, gasLimit, maxGasPriceWei, attempts) } - if rf, ok := ret.Get(0).(func(context.Context, *assets.Wei, uint32, *assets.Wei, []gas.EvmPriorAttempt) *assets.Wei); ok { + if rf, ok := ret.Get(0).(func(context.Context, *assets.Wei, uint64, *assets.Wei, []gas.EvmPriorAttempt) *assets.Wei); ok { r0 = rf(ctx, originalGasPrice, gasLimit, maxGasPriceWei, attempts) } else { if ret.Get(0) != nil { @@ -78,13 +78,13 @@ func (_m *EvmEstimator) BumpLegacyGas(ctx context.Context, originalGasPrice *ass } } - if rf, ok := ret.Get(1).(func(context.Context, *assets.Wei, uint32, *assets.Wei, []gas.EvmPriorAttempt) uint32); ok { + if rf, ok := ret.Get(1).(func(context.Context, *assets.Wei, uint64, *assets.Wei, []gas.EvmPriorAttempt) uint64); ok { r1 = rf(ctx, originalGasPrice, gasLimit, maxGasPriceWei, attempts) } else { - r1 = ret.Get(1).(uint32) + r1 = ret.Get(1).(uint64) } - if rf, ok := ret.Get(2).(func(context.Context, *assets.Wei, uint32, *assets.Wei, []gas.EvmPriorAttempt) error); ok { + if rf, ok := ret.Get(2).(func(context.Context, *assets.Wei, uint64, *assets.Wei, []gas.EvmPriorAttempt) error); ok { r2 = rf(ctx, originalGasPrice, gasLimit, maxGasPriceWei, attempts) } else { r2 = ret.Error(2) @@ -112,7 +112,7 @@ func (_m *EvmEstimator) Close() error { } // GetDynamicFee provides a mock function with given fields: ctx, gasLimit, maxGasPriceWei -func (_m *EvmEstimator) GetDynamicFee(ctx context.Context, gasLimit uint32, maxGasPriceWei *assets.Wei) (gas.DynamicFee, uint32, error) { +func (_m *EvmEstimator) GetDynamicFee(ctx context.Context, gasLimit uint64, maxGasPriceWei *assets.Wei) (gas.DynamicFee, uint64, error) { ret := _m.Called(ctx, gasLimit, maxGasPriceWei) if len(ret) == 0 { @@ -120,24 +120,24 @@ func (_m *EvmEstimator) GetDynamicFee(ctx context.Context, gasLimit uint32, maxG } var r0 gas.DynamicFee - var r1 uint32 + var r1 uint64 var r2 error - if rf, ok := ret.Get(0).(func(context.Context, uint32, *assets.Wei) (gas.DynamicFee, uint32, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, uint64, *assets.Wei) (gas.DynamicFee, uint64, error)); ok { return rf(ctx, gasLimit, maxGasPriceWei) } - if rf, ok := ret.Get(0).(func(context.Context, uint32, *assets.Wei) gas.DynamicFee); ok { + if rf, ok := ret.Get(0).(func(context.Context, uint64, *assets.Wei) gas.DynamicFee); ok { r0 = rf(ctx, gasLimit, maxGasPriceWei) } else { r0 = ret.Get(0).(gas.DynamicFee) } - if rf, ok := ret.Get(1).(func(context.Context, uint32, *assets.Wei) uint32); ok { + if rf, ok := ret.Get(1).(func(context.Context, uint64, *assets.Wei) uint64); ok { r1 = rf(ctx, gasLimit, maxGasPriceWei) } else { - r1 = ret.Get(1).(uint32) + r1 = ret.Get(1).(uint64) } - if rf, ok := ret.Get(2).(func(context.Context, uint32, *assets.Wei) error); ok { + if rf, ok := ret.Get(2).(func(context.Context, uint64, *assets.Wei) error); ok { r2 = rf(ctx, gasLimit, maxGasPriceWei) } else { r2 = ret.Error(2) @@ -147,7 +147,7 @@ func (_m *EvmEstimator) GetDynamicFee(ctx context.Context, gasLimit uint32, maxG } // GetLegacyGas provides a mock function with given fields: ctx, calldata, gasLimit, maxGasPriceWei, opts -func (_m *EvmEstimator) GetLegacyGas(ctx context.Context, calldata []byte, gasLimit uint32, maxGasPriceWei *assets.Wei, opts ...types.Opt) (*assets.Wei, uint32, error) { +func (_m *EvmEstimator) GetLegacyGas(ctx context.Context, calldata []byte, gasLimit uint64, maxGasPriceWei *assets.Wei, opts ...types.Opt) (*assets.Wei, uint64, error) { _va := make([]interface{}, len(opts)) for _i := range opts { _va[_i] = opts[_i] @@ -162,12 +162,12 @@ func (_m *EvmEstimator) GetLegacyGas(ctx context.Context, calldata []byte, gasLi } var r0 *assets.Wei - var r1 uint32 + var r1 uint64 var r2 error - if rf, ok := ret.Get(0).(func(context.Context, []byte, uint32, *assets.Wei, ...types.Opt) (*assets.Wei, uint32, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, []byte, uint64, *assets.Wei, ...types.Opt) (*assets.Wei, uint64, error)); ok { return rf(ctx, calldata, gasLimit, maxGasPriceWei, opts...) } - if rf, ok := ret.Get(0).(func(context.Context, []byte, uint32, *assets.Wei, ...types.Opt) *assets.Wei); ok { + if rf, ok := ret.Get(0).(func(context.Context, []byte, uint64, *assets.Wei, ...types.Opt) *assets.Wei); ok { r0 = rf(ctx, calldata, gasLimit, maxGasPriceWei, opts...) } else { if ret.Get(0) != nil { @@ -175,13 +175,13 @@ func (_m *EvmEstimator) GetLegacyGas(ctx context.Context, calldata []byte, gasLi } } - if rf, ok := ret.Get(1).(func(context.Context, []byte, uint32, *assets.Wei, ...types.Opt) uint32); ok { + if rf, ok := ret.Get(1).(func(context.Context, []byte, uint64, *assets.Wei, ...types.Opt) uint64); ok { r1 = rf(ctx, calldata, gasLimit, maxGasPriceWei, opts...) } else { - r1 = ret.Get(1).(uint32) + r1 = ret.Get(1).(uint64) } - if rf, ok := ret.Get(2).(func(context.Context, []byte, uint32, *assets.Wei, ...types.Opt) error); ok { + if rf, ok := ret.Get(2).(func(context.Context, []byte, uint64, *assets.Wei, ...types.Opt) error); ok { r2 = rf(ctx, calldata, gasLimit, maxGasPriceWei, opts...) } else { r2 = ret.Error(2) diff --git a/core/chains/evm/gas/mocks/evm_fee_estimator.go b/core/chains/evm/gas/mocks/evm_fee_estimator.go index 66acbdbf7ff..7ebde8bc0fd 100644 --- a/core/chains/evm/gas/mocks/evm_fee_estimator.go +++ b/core/chains/evm/gas/mocks/evm_fee_estimator.go @@ -26,7 +26,7 @@ type EvmFeeEstimator struct { } // BumpFee provides a mock function with given fields: ctx, originalFee, feeLimit, maxFeePrice, attempts -func (_m *EvmFeeEstimator) BumpFee(ctx context.Context, originalFee gas.EvmFee, feeLimit uint32, maxFeePrice *assets.Wei, attempts []gas.EvmPriorAttempt) (gas.EvmFee, uint32, error) { +func (_m *EvmFeeEstimator) BumpFee(ctx context.Context, originalFee gas.EvmFee, feeLimit uint64, maxFeePrice *assets.Wei, attempts []gas.EvmPriorAttempt) (gas.EvmFee, uint64, error) { ret := _m.Called(ctx, originalFee, feeLimit, maxFeePrice, attempts) if len(ret) == 0 { @@ -34,24 +34,24 @@ func (_m *EvmFeeEstimator) BumpFee(ctx context.Context, originalFee gas.EvmFee, } var r0 gas.EvmFee - var r1 uint32 + var r1 uint64 var r2 error - if rf, ok := ret.Get(0).(func(context.Context, gas.EvmFee, uint32, *assets.Wei, []gas.EvmPriorAttempt) (gas.EvmFee, uint32, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, gas.EvmFee, uint64, *assets.Wei, []gas.EvmPriorAttempt) (gas.EvmFee, uint64, error)); ok { return rf(ctx, originalFee, feeLimit, maxFeePrice, attempts) } - if rf, ok := ret.Get(0).(func(context.Context, gas.EvmFee, uint32, *assets.Wei, []gas.EvmPriorAttempt) gas.EvmFee); ok { + if rf, ok := ret.Get(0).(func(context.Context, gas.EvmFee, uint64, *assets.Wei, []gas.EvmPriorAttempt) gas.EvmFee); ok { r0 = rf(ctx, originalFee, feeLimit, maxFeePrice, attempts) } else { r0 = ret.Get(0).(gas.EvmFee) } - if rf, ok := ret.Get(1).(func(context.Context, gas.EvmFee, uint32, *assets.Wei, []gas.EvmPriorAttempt) uint32); ok { + if rf, ok := ret.Get(1).(func(context.Context, gas.EvmFee, uint64, *assets.Wei, []gas.EvmPriorAttempt) uint64); ok { r1 = rf(ctx, originalFee, feeLimit, maxFeePrice, attempts) } else { - r1 = ret.Get(1).(uint32) + r1 = ret.Get(1).(uint64) } - if rf, ok := ret.Get(2).(func(context.Context, gas.EvmFee, uint32, *assets.Wei, []gas.EvmPriorAttempt) error); ok { + if rf, ok := ret.Get(2).(func(context.Context, gas.EvmFee, uint64, *assets.Wei, []gas.EvmPriorAttempt) error); ok { r2 = rf(ctx, originalFee, feeLimit, maxFeePrice, attempts) } else { r2 = ret.Error(2) @@ -79,7 +79,7 @@ func (_m *EvmFeeEstimator) Close() error { } // GetFee provides a mock function with given fields: ctx, calldata, feeLimit, maxFeePrice, opts -func (_m *EvmFeeEstimator) GetFee(ctx context.Context, calldata []byte, feeLimit uint32, maxFeePrice *assets.Wei, opts ...types.Opt) (gas.EvmFee, uint32, error) { +func (_m *EvmFeeEstimator) GetFee(ctx context.Context, calldata []byte, feeLimit uint64, maxFeePrice *assets.Wei, opts ...types.Opt) (gas.EvmFee, uint64, error) { _va := make([]interface{}, len(opts)) for _i := range opts { _va[_i] = opts[_i] @@ -94,24 +94,24 @@ func (_m *EvmFeeEstimator) GetFee(ctx context.Context, calldata []byte, feeLimit } var r0 gas.EvmFee - var r1 uint32 + var r1 uint64 var r2 error - if rf, ok := ret.Get(0).(func(context.Context, []byte, uint32, *assets.Wei, ...types.Opt) (gas.EvmFee, uint32, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, []byte, uint64, *assets.Wei, ...types.Opt) (gas.EvmFee, uint64, error)); ok { return rf(ctx, calldata, feeLimit, maxFeePrice, opts...) } - if rf, ok := ret.Get(0).(func(context.Context, []byte, uint32, *assets.Wei, ...types.Opt) gas.EvmFee); ok { + if rf, ok := ret.Get(0).(func(context.Context, []byte, uint64, *assets.Wei, ...types.Opt) gas.EvmFee); ok { r0 = rf(ctx, calldata, feeLimit, maxFeePrice, opts...) } else { r0 = ret.Get(0).(gas.EvmFee) } - if rf, ok := ret.Get(1).(func(context.Context, []byte, uint32, *assets.Wei, ...types.Opt) uint32); ok { + if rf, ok := ret.Get(1).(func(context.Context, []byte, uint64, *assets.Wei, ...types.Opt) uint64); ok { r1 = rf(ctx, calldata, feeLimit, maxFeePrice, opts...) } else { - r1 = ret.Get(1).(uint32) + r1 = ret.Get(1).(uint64) } - if rf, ok := ret.Get(2).(func(context.Context, []byte, uint32, *assets.Wei, ...types.Opt) error); ok { + if rf, ok := ret.Get(2).(func(context.Context, []byte, uint64, *assets.Wei, ...types.Opt) error); ok { r2 = rf(ctx, calldata, feeLimit, maxFeePrice, opts...) } else { r2 = ret.Error(2) @@ -121,7 +121,7 @@ func (_m *EvmFeeEstimator) GetFee(ctx context.Context, calldata []byte, feeLimit } // GetMaxCost provides a mock function with given fields: ctx, amount, calldata, feeLimit, maxFeePrice, opts -func (_m *EvmFeeEstimator) GetMaxCost(ctx context.Context, amount assets.Eth, calldata []byte, feeLimit uint32, maxFeePrice *assets.Wei, opts ...types.Opt) (*big.Int, error) { +func (_m *EvmFeeEstimator) GetMaxCost(ctx context.Context, amount assets.Eth, calldata []byte, feeLimit uint64, maxFeePrice *assets.Wei, opts ...types.Opt) (*big.Int, error) { _va := make([]interface{}, len(opts)) for _i := range opts { _va[_i] = opts[_i] @@ -137,10 +137,10 @@ func (_m *EvmFeeEstimator) GetMaxCost(ctx context.Context, amount assets.Eth, ca var r0 *big.Int var r1 error - if rf, ok := ret.Get(0).(func(context.Context, assets.Eth, []byte, uint32, *assets.Wei, ...types.Opt) (*big.Int, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, assets.Eth, []byte, uint64, *assets.Wei, ...types.Opt) (*big.Int, error)); ok { return rf(ctx, amount, calldata, feeLimit, maxFeePrice, opts...) } - if rf, ok := ret.Get(0).(func(context.Context, assets.Eth, []byte, uint32, *assets.Wei, ...types.Opt) *big.Int); ok { + if rf, ok := ret.Get(0).(func(context.Context, assets.Eth, []byte, uint64, *assets.Wei, ...types.Opt) *big.Int); ok { r0 = rf(ctx, amount, calldata, feeLimit, maxFeePrice, opts...) } else { if ret.Get(0) != nil { @@ -148,7 +148,7 @@ func (_m *EvmFeeEstimator) GetMaxCost(ctx context.Context, amount assets.Eth, ca } } - if rf, ok := ret.Get(1).(func(context.Context, assets.Eth, []byte, uint32, *assets.Wei, ...types.Opt) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, assets.Eth, []byte, uint64, *assets.Wei, ...types.Opt) error); ok { r1 = rf(ctx, amount, calldata, feeLimit, maxFeePrice, opts...) } else { r1 = ret.Error(1) diff --git a/core/chains/evm/gas/models.go b/core/chains/evm/gas/models.go index 44e85af37ff..ae041615f53 100644 --- a/core/chains/evm/gas/models.go +++ b/core/chains/evm/gas/models.go @@ -34,11 +34,11 @@ type EvmFeeEstimator interface { // L1Oracle returns the L1 gas price oracle only if the chain has one, e.g. OP stack L2s and Arbitrum. L1Oracle() rollups.L1Oracle - GetFee(ctx context.Context, calldata []byte, feeLimit uint32, maxFeePrice *assets.Wei, opts ...feetypes.Opt) (fee EvmFee, chainSpecificFeeLimit uint32, err error) - BumpFee(ctx context.Context, originalFee EvmFee, feeLimit uint32, maxFeePrice *assets.Wei, attempts []EvmPriorAttempt) (bumpedFee EvmFee, chainSpecificFeeLimit uint32, err error) + GetFee(ctx context.Context, calldata []byte, feeLimit uint64, maxFeePrice *assets.Wei, opts ...feetypes.Opt) (fee EvmFee, chainSpecificFeeLimit uint64, err error) + BumpFee(ctx context.Context, originalFee EvmFee, feeLimit uint64, maxFeePrice *assets.Wei, attempts []EvmPriorAttempt) (bumpedFee EvmFee, chainSpecificFeeLimit uint64, err error) // GetMaxCost returns the total value = max price x fee units + transferred value - GetMaxCost(ctx context.Context, amount assets.Eth, calldata []byte, feeLimit uint32, maxFeePrice *assets.Wei, opts ...feetypes.Opt) (*big.Int, error) + GetMaxCost(ctx context.Context, amount assets.Eth, calldata []byte, feeLimit uint64, maxFeePrice *assets.Wei, opts ...feetypes.Opt) (*big.Int, error) } // NewEstimator returns the estimator for a given config @@ -105,7 +105,7 @@ type DynamicFee struct { } type EvmPriorAttempt struct { - ChainSpecificFeeLimit uint32 + ChainSpecificFeeLimit uint64 BroadcastBeforeBlockNum *int64 TxHash common.Hash TxType int @@ -122,22 +122,22 @@ type EvmEstimator interface { // GetLegacyGas Calculates initial gas fee for non-EIP1559 transaction // maxGasPriceWei parameter is the highest possible gas fee cap that the function will return - GetLegacyGas(ctx context.Context, calldata []byte, gasLimit uint32, maxGasPriceWei *assets.Wei, opts ...feetypes.Opt) (gasPrice *assets.Wei, chainSpecificGasLimit uint32, err error) + GetLegacyGas(ctx context.Context, calldata []byte, gasLimit uint64, maxGasPriceWei *assets.Wei, opts ...feetypes.Opt) (gasPrice *assets.Wei, chainSpecificGasLimit uint64, err error) // BumpLegacyGas Increases gas price and/or limit for non-EIP1559 transactions // if the bumped gas fee is greater than maxGasPriceWei, the method returns an error // attempts must: // - be sorted in order from highest price to lowest price // - all be of transaction type 0x0 or 0x1 - BumpLegacyGas(ctx context.Context, originalGasPrice *assets.Wei, gasLimit uint32, maxGasPriceWei *assets.Wei, attempts []EvmPriorAttempt) (bumpedGasPrice *assets.Wei, chainSpecificGasLimit uint32, err error) + BumpLegacyGas(ctx context.Context, originalGasPrice *assets.Wei, gasLimit uint64, maxGasPriceWei *assets.Wei, attempts []EvmPriorAttempt) (bumpedGasPrice *assets.Wei, chainSpecificGasLimit uint64, err error) // GetDynamicFee Calculates initial gas fee for gas for EIP1559 transactions // maxGasPriceWei parameter is the highest possible gas fee cap that the function will return - GetDynamicFee(ctx context.Context, gasLimit uint32, maxGasPriceWei *assets.Wei) (fee DynamicFee, chainSpecificGasLimit uint32, err error) + GetDynamicFee(ctx context.Context, gasLimit uint64, maxGasPriceWei *assets.Wei) (fee DynamicFee, chainSpecificGasLimit uint64, err error) // BumpDynamicFee Increases gas price and/or limit for non-EIP1559 transactions // if the bumped gas fee or tip caps are greater than maxGasPriceWei, the method returns an error // attempts must: // - be sorted in order from highest price to lowest price // - all be of transaction type 0x2 - BumpDynamicFee(ctx context.Context, original DynamicFee, gasLimit uint32, maxGasPriceWei *assets.Wei, attempts []EvmPriorAttempt) (bumped DynamicFee, chainSpecificGasLimit uint32, err error) + BumpDynamicFee(ctx context.Context, original DynamicFee, gasLimit uint64, maxGasPriceWei *assets.Wei, attempts []EvmPriorAttempt) (bumped DynamicFee, chainSpecificGasLimit uint64, err error) } var _ feetypes.Fee = (*EvmFee)(nil) @@ -241,7 +241,7 @@ func (e *WrappedEvmEstimator) L1Oracle() rollups.L1Oracle { return e.l1Oracle } -func (e *WrappedEvmEstimator) GetFee(ctx context.Context, calldata []byte, feeLimit uint32, maxFeePrice *assets.Wei, opts ...feetypes.Opt) (fee EvmFee, chainSpecificFeeLimit uint32, err error) { +func (e *WrappedEvmEstimator) GetFee(ctx context.Context, calldata []byte, feeLimit uint64, maxFeePrice *assets.Wei, opts ...feetypes.Opt) (fee EvmFee, chainSpecificFeeLimit uint64, err error) { // get dynamic fee if e.EIP1559Enabled { var dynamicFee DynamicFee @@ -256,7 +256,7 @@ func (e *WrappedEvmEstimator) GetFee(ctx context.Context, calldata []byte, feeLi return } -func (e *WrappedEvmEstimator) GetMaxCost(ctx context.Context, amount assets.Eth, calldata []byte, feeLimit uint32, maxFeePrice *assets.Wei, opts ...feetypes.Opt) (*big.Int, error) { +func (e *WrappedEvmEstimator) GetMaxCost(ctx context.Context, amount assets.Eth, calldata []byte, feeLimit uint64, maxFeePrice *assets.Wei, opts ...feetypes.Opt) (*big.Int, error) { fees, gasLimit, err := e.GetFee(ctx, calldata, feeLimit, maxFeePrice, opts...) if err != nil { return nil, err @@ -274,7 +274,7 @@ func (e *WrappedEvmEstimator) GetMaxCost(ctx context.Context, amount assets.Eth, return amountWithFees, nil } -func (e *WrappedEvmEstimator) BumpFee(ctx context.Context, originalFee EvmFee, feeLimit uint32, maxFeePrice *assets.Wei, attempts []EvmPriorAttempt) (bumpedFee EvmFee, chainSpecificFeeLimit uint32, err error) { +func (e *WrappedEvmEstimator) BumpFee(ctx context.Context, originalFee EvmFee, feeLimit uint64, maxFeePrice *assets.Wei, attempts []EvmPriorAttempt) (bumpedFee EvmFee, chainSpecificFeeLimit uint64, err error) { // validate only 1 fee type is present if (!originalFee.ValidDynamic() && originalFee.Legacy == nil) || (originalFee.ValidDynamic() && originalFee.Legacy != nil) { err = pkgerrors.New("only one dynamic or legacy fee can be defined") @@ -315,7 +315,7 @@ type GasEstimatorConfig interface { BumpThreshold() uint64 BumpMin() *assets.Wei FeeCapDefault() *assets.Wei - LimitMax() uint32 + LimitMax() uint64 LimitMultiplier() float32 PriceDefault() *assets.Wei TipCapDefault() *assets.Wei @@ -356,7 +356,7 @@ func HexToInt64(input interface{}) int64 { } // BumpLegacyGasPriceOnly will increase the price and apply multiplier to the gas limit -func BumpLegacyGasPriceOnly(cfg bumpConfig, lggr logger.SugaredLogger, currentGasPrice, originalGasPrice *assets.Wei, originalGasLimit uint32, maxGasPriceWei *assets.Wei) (gasPrice *assets.Wei, chainSpecificGasLimit uint32, err error) { +func BumpLegacyGasPriceOnly(cfg bumpConfig, lggr logger.SugaredLogger, currentGasPrice, originalGasPrice *assets.Wei, originalGasLimit uint64, maxGasPriceWei *assets.Wei) (gasPrice *assets.Wei, chainSpecificGasLimit uint64, err error) { gasPrice, err = bumpGasPrice(cfg, lggr, currentGasPrice, originalGasPrice, maxGasPriceWei) if err != nil { return nil, 0, err @@ -391,7 +391,7 @@ func bumpGasPrice(cfg bumpConfig, lggr logger.SugaredLogger, currentGasPrice, or } // BumpDynamicFeeOnly bumps the tip cap and max gas price if necessary -func BumpDynamicFeeOnly(config bumpConfig, feeCapBufferBlocks uint16, lggr logger.SugaredLogger, currentTipCap, currentBaseFee *assets.Wei, originalFee DynamicFee, originalGasLimit uint32, maxGasPriceWei *assets.Wei) (bumped DynamicFee, chainSpecificGasLimit uint32, err error) { +func BumpDynamicFeeOnly(config bumpConfig, feeCapBufferBlocks uint16, lggr logger.SugaredLogger, currentTipCap, currentBaseFee *assets.Wei, originalFee DynamicFee, originalGasLimit uint64, maxGasPriceWei *assets.Wei) (bumped DynamicFee, chainSpecificGasLimit uint64, err error) { bumped, err = bumpDynamicFee(config, feeCapBufferBlocks, lggr, currentTipCap, currentBaseFee, originalFee, maxGasPriceWei) if err != nil { return bumped, 0, err diff --git a/core/chains/evm/gas/models_test.go b/core/chains/evm/gas/models_test.go index 9c0e63a602b..76666143189 100644 --- a/core/chains/evm/gas/models_test.go +++ b/core/chains/evm/gas/models_test.go @@ -22,7 +22,7 @@ func TestWrappedEvmEstimator(t *testing.T) { ctx := testutils.Context(t) // fee values - gasLimit := uint32(10) + gasLimit := uint64(10) legacyFee := assets.NewWeiI(10) dynamicFee := gas.DynamicFee{ FeeCap: assets.NewWeiI(20), diff --git a/core/chains/evm/gas/rollups/models.go b/core/chains/evm/gas/rollups/models.go index 8158ba2b906..7aa3d4059dd 100644 --- a/core/chains/evm/gas/rollups/models.go +++ b/core/chains/evm/gas/rollups/models.go @@ -6,8 +6,8 @@ import ( "github.com/ethereum/go-ethereum/core/types" + "github.com/smartcontractkit/chainlink-common/pkg/services" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/assets" - "github.com/smartcontractkit/chainlink/v2/core/services" ) // L1Oracle provides interface for fetching L1-specific fee components if the chain is an L2. @@ -15,7 +15,7 @@ import ( // //go:generate mockery --quiet --name L1Oracle --output ./mocks/ --case=underscore type L1Oracle interface { - services.ServiceCtx + services.Service GasPrice(ctx context.Context) (*assets.Wei, error) GetGasCost(ctx context.Context, tx *types.Transaction, blockNum *big.Int) (*assets.Wei, error) diff --git a/core/chains/evm/gas/suggested_price_estimator.go b/core/chains/evm/gas/suggested_price_estimator.go index d58a1155b91..89e497edbd3 100644 --- a/core/chains/evm/gas/suggested_price_estimator.go +++ b/core/chains/evm/gas/suggested_price_estimator.go @@ -154,17 +154,17 @@ func (o *SuggestedPriceEstimator) forceRefresh(ctx context.Context) (err error) func (o *SuggestedPriceEstimator) OnNewLongestChain(context.Context, *evmtypes.Head) {} -func (*SuggestedPriceEstimator) GetDynamicFee(_ context.Context, _ uint32, _ *assets.Wei) (fee DynamicFee, chainSpecificGasLimit uint32, err error) { +func (*SuggestedPriceEstimator) GetDynamicFee(_ context.Context, _ uint64, _ *assets.Wei) (fee DynamicFee, chainSpecificGasLimit uint64, err error) { err = pkgerrors.New("dynamic fees are not implemented for this estimator") return } -func (*SuggestedPriceEstimator) BumpDynamicFee(_ context.Context, _ DynamicFee, _ uint32, _ *assets.Wei, _ []EvmPriorAttempt) (bumped DynamicFee, chainSpecificGasLimit uint32, err error) { +func (*SuggestedPriceEstimator) BumpDynamicFee(_ context.Context, _ DynamicFee, _ uint64, _ *assets.Wei, _ []EvmPriorAttempt) (bumped DynamicFee, chainSpecificGasLimit uint64, err error) { err = pkgerrors.New("dynamic fees are not implemented for this estimator") return } -func (o *SuggestedPriceEstimator) GetLegacyGas(ctx context.Context, _ []byte, GasLimit uint32, maxGasPriceWei *assets.Wei, opts ...feetypes.Opt) (gasPrice *assets.Wei, chainSpecificGasLimit uint32, err error) { +func (o *SuggestedPriceEstimator) GetLegacyGas(ctx context.Context, _ []byte, GasLimit uint64, maxGasPriceWei *assets.Wei, opts ...feetypes.Opt) (gasPrice *assets.Wei, chainSpecificGasLimit uint64, err error) { chainSpecificGasLimit = GasLimit ok := o.IfStarted(func() { if slices.Contains(opts, feetypes.OptForceRefetch) { @@ -192,7 +192,7 @@ func (o *SuggestedPriceEstimator) GetLegacyGas(ctx context.Context, _ []byte, Ga // Adds the larger of BumpPercent and BumpMin configs as a buffer on top of the price returned from the RPC. // The only reason bumping logic would be called on the SuggestedPriceEstimator is if there was a significant price spike // between the last price update and when the tx was submitted. Refreshing the price helps ensure the latest market changes are accounted for. -func (o *SuggestedPriceEstimator) BumpLegacyGas(ctx context.Context, originalFee *assets.Wei, feeLimit uint32, maxGasPriceWei *assets.Wei, _ []EvmPriorAttempt) (newGasPrice *assets.Wei, chainSpecificGasLimit uint32, err error) { +func (o *SuggestedPriceEstimator) BumpLegacyGas(ctx context.Context, originalFee *assets.Wei, feeLimit uint64, maxGasPriceWei *assets.Wei, _ []EvmPriorAttempt) (newGasPrice *assets.Wei, chainSpecificGasLimit uint64, err error) { chainSpecificGasLimit = feeLimit ok := o.IfStarted(func() { // Immediately return error if original fee is greater than or equal to the max gas price diff --git a/core/chains/evm/gas/suggested_price_estimator_test.go b/core/chains/evm/gas/suggested_price_estimator_test.go index c09582774b8..ff5e004031b 100644 --- a/core/chains/evm/gas/suggested_price_estimator_test.go +++ b/core/chains/evm/gas/suggested_price_estimator_test.go @@ -24,7 +24,7 @@ func TestSuggestedPriceEstimator(t *testing.T) { maxGasPrice := assets.NewWeiI(100) calldata := []byte{0x00, 0x00, 0x01, 0x02, 0x03} - const gasLimit uint32 = 80000 + const gasLimit uint64 = 80000 cfg := &gas.MockGasEstimatorConfig{BumpPercentF: 10, BumpMinF: assets.NewWei(big.NewInt(1)), BumpThresholdF: 1} @@ -64,7 +64,7 @@ func TestSuggestedPriceEstimator(t *testing.T) { require.Error(t, err) assert.EqualError(t, err, "estimated gas price: 42 wei is greater than the maximum gas price configured: 40 wei") assert.Nil(t, gasPrice) - assert.Equal(t, uint32(0), chainSpecificGasLimit) + assert.Equal(t, uint64(0), chainSpecificGasLimit) }) t.Run("gas price is lower than global max gas price", func(t *testing.T) { @@ -80,7 +80,7 @@ func TestSuggestedPriceEstimator(t *testing.T) { gasPrice, chainSpecificGasLimit, err := o.GetLegacyGas(testutils.Context(t), calldata, gasLimit, assets.NewWeiI(110)) assert.EqualError(t, err, "estimated gas price: 120 wei is greater than the maximum gas price configured: 110 wei") assert.Nil(t, gasPrice) - assert.Equal(t, uint32(0), chainSpecificGasLimit) + assert.Equal(t, uint64(0), chainSpecificGasLimit) }) t.Run("calling GetLegacyGas on started estimator if initial call failed returns error", func(t *testing.T) { @@ -180,7 +180,7 @@ func TestSuggestedPriceEstimator(t *testing.T) { require.Error(t, err) assert.EqualError(t, err, "estimated gas price: 42 wei is greater than the maximum gas price configured: 40 wei") assert.Nil(t, gasPrice) - assert.Equal(t, uint32(0), chainSpecificGasLimit) + assert.Equal(t, uint64(0), chainSpecificGasLimit) }) t.Run("calling BumpLegacyGas on started estimator returns max gas price when suggested price under max but the buffer exceeds it", func(t *testing.T) { diff --git a/core/chains/evm/headtracker/config.go b/core/chains/evm/headtracker/config.go index 54ccb1f933f..85fe084470d 100644 --- a/core/chains/evm/headtracker/config.go +++ b/core/chains/evm/headtracker/config.go @@ -12,6 +12,7 @@ import ( type Config interface { BlockEmissionIdleWarningThreshold() time.Duration FinalityDepth() uint32 + FinalityTagEnabled() bool } type HeadTrackerConfig interface { diff --git a/core/chains/evm/headtracker/head_broadcaster_test.go b/core/chains/evm/headtracker/head_broadcaster_test.go index dcbb9bd0396..ee9e460b16c 100644 --- a/core/chains/evm/headtracker/head_broadcaster_test.go +++ b/core/chains/evm/headtracker/head_broadcaster_test.go @@ -14,6 +14,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/logger" "github.com/smartcontractkit/chainlink-common/pkg/services/servicetest" "github.com/smartcontractkit/chainlink-common/pkg/utils/mailbox/mailboxtest" + commonhtrk "github.com/smartcontractkit/chainlink/v2/common/headtracker" commonmocks "github.com/smartcontractkit/chainlink/v2/common/types/mocks" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/headtracker" @@ -61,8 +62,8 @@ func TestHeadBroadcaster_Subscribe(t *testing.T) { chchHeaders <- args.Get(1).(chan<- *evmtypes.Head) }). Return(sub, nil) - ethClient.On("HeadByNumber", mock.Anything, mock.Anything).Return(cltest.Head(1), nil).Once() - ethClient.On("HeadByHash", mock.Anything, mock.Anything).Return(cltest.Head(1), nil) + // 2 for initial and 2 for backfill + ethClient.On("HeadByNumber", mock.Anything, mock.Anything).Return(cltest.Head(1), nil).Times(4) sub.On("Unsubscribe").Return() sub.On("Err").Return(nil) @@ -70,7 +71,7 @@ func TestHeadBroadcaster_Subscribe(t *testing.T) { checker1 := &cltest.MockHeadTrackable{} checker2 := &cltest.MockHeadTrackable{} - orm := headtracker.NewORM(db, logger, cfg.Database(), *ethClient.ConfiguredChainID()) + orm := headtracker.NewORM(*ethClient.ConfiguredChainID(), db) hs := headtracker.NewHeadSaver(logger, orm, evmCfg.EVM(), evmCfg.EVM().HeadTracker()) mailMon := mailboxtest.NewMonitor(t) servicetest.Run(t, mailMon) diff --git a/core/chains/evm/headtracker/head_saver.go b/core/chains/evm/headtracker/head_saver.go index 92eedaf153e..218f9d8366f 100644 --- a/core/chains/evm/headtracker/head_saver.go +++ b/core/chains/evm/headtracker/head_saver.go @@ -2,10 +2,12 @@ package headtracker import ( "context" + "fmt" "github.com/ethereum/go-ethereum/common" "github.com/smartcontractkit/chainlink-common/pkg/logger" + commontypes "github.com/smartcontractkit/chainlink/v2/common/types" httypes "github.com/smartcontractkit/chainlink/v2/core/chains/evm/headtracker/types" evmtypes "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" @@ -36,23 +38,26 @@ func (hs *headSaver) Save(ctx context.Context, head *evmtypes.Head) error { return err } - historyDepth := uint(hs.htConfig.HistoryDepth()) - hs.heads.AddHeads(historyDepth, head) + hs.heads.AddHeads(head) - return hs.orm.TrimOldHeads(ctx, historyDepth) + return nil } -func (hs *headSaver) Load(ctx context.Context) (chain *evmtypes.Head, err error) { - historyDepth := uint(hs.htConfig.HistoryDepth()) - heads, err := hs.orm.LatestHeads(ctx, historyDepth) +func (hs *headSaver) Load(ctx context.Context, latestFinalized int64) (chain *evmtypes.Head, err error) { + minBlockNumber := hs.calculateMinBlockToKeep(latestFinalized) + heads, err := hs.orm.LatestHeads(ctx, minBlockNumber) if err != nil { return nil, err } - hs.heads.AddHeads(historyDepth, heads...) + hs.heads.AddHeads(heads...) return hs.heads.LatestHead(), nil } +func (hs *headSaver) calculateMinBlockToKeep(latestFinalized int64) int64 { + return max(latestFinalized-int64(hs.htConfig.HistoryDepth()), 0) +} + func (hs *headSaver) LatestHeadFromDB(ctx context.Context) (head *evmtypes.Head, err error) { return hs.orm.LatestHead(ctx) } @@ -72,12 +77,26 @@ func (hs *headSaver) Chain(hash common.Hash) *evmtypes.Head { return hs.heads.HeadByHash(hash) } +func (hs *headSaver) MarkFinalized(ctx context.Context, finalized *evmtypes.Head) error { + minBlockToKeep := hs.calculateMinBlockToKeep(finalized.BlockNumber()) + if !hs.heads.MarkFinalized(finalized.BlockHash(), minBlockToKeep) { + return fmt.Errorf("failed to find %s block in the canonical chain to mark it as finalized", finalized) + } + + return hs.orm.TrimOldHeads(ctx, minBlockToKeep) +} + var NullSaver httypes.HeadSaver = &nullSaver{} type nullSaver struct{} -func (*nullSaver) Save(ctx context.Context, head *evmtypes.Head) error { return nil } -func (*nullSaver) Load(ctx context.Context) (*evmtypes.Head, error) { return nil, nil } +func (*nullSaver) Save(ctx context.Context, head *evmtypes.Head) error { return nil } +func (*nullSaver) Load(ctx context.Context, latestFinalized int64) (*evmtypes.Head, error) { + return nil, nil +} func (*nullSaver) LatestHeadFromDB(ctx context.Context) (*evmtypes.Head, error) { return nil, nil } func (*nullSaver) LatestChain() *evmtypes.Head { return nil } func (*nullSaver) Chain(hash common.Hash) *evmtypes.Head { return nil } +func (*nullSaver) MarkFinalized(ctx context.Context, latestFinalized *evmtypes.Head) error { + return nil +} diff --git a/core/chains/evm/headtracker/head_saver_test.go b/core/chains/evm/headtracker/head_saver_test.go index f541330bc98..e53ea0cd629 100644 --- a/core/chains/evm/headtracker/head_saver_test.go +++ b/core/chains/evm/headtracker/head_saver_test.go @@ -1,17 +1,22 @@ package headtracker_test import ( + "math/big" "testing" "time" + "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-common/pkg/logger" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/headtracker" httypes "github.com/smartcontractkit/chainlink/v2/core/chains/evm/headtracker/types" + evmtypes "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" + "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/pgtest" ) @@ -34,6 +39,7 @@ func (h *headTrackerConfig) MaxBufferSize() uint32 { type config struct { finalityDepth uint32 blockEmissionIdleWarningThreshold time.Duration + finalityTagEnabled bool } func (c *config) FinalityDepth() uint32 { return c.finalityDepth } @@ -41,20 +47,30 @@ func (c *config) BlockEmissionIdleWarningThreshold() time.Duration { return c.blockEmissionIdleWarningThreshold } -func configureSaver(t *testing.T) (httypes.HeadSaver, headtracker.ORM) { +func (c *config) FinalityTagEnabled() bool { + return c.finalityTagEnabled +} + +type saverOpts struct { + headTrackerConfig *headTrackerConfig +} + +func configureSaver(t *testing.T, opts saverOpts) (httypes.HeadSaver, headtracker.ORM) { + if opts.headTrackerConfig == nil { + opts.headTrackerConfig = &headTrackerConfig{historyDepth: 6} + } db := pgtest.NewSqlxDB(t) lggr := logger.Test(t) - cfg := configtest.NewGeneralConfig(t, nil) htCfg := &config{finalityDepth: uint32(1)} - orm := headtracker.NewORM(db, lggr, cfg.Database(), cltest.FixtureChainID) - saver := headtracker.NewHeadSaver(lggr, orm, htCfg, &headTrackerConfig{historyDepth: 6}) + orm := headtracker.NewORM(cltest.FixtureChainID, db) + saver := headtracker.NewHeadSaver(lggr, orm, htCfg, opts.headTrackerConfig) return saver, orm } func TestHeadSaver_Save(t *testing.T) { t.Parallel() - saver, _ := configureSaver(t) + saver, _ := configureSaver(t, saverOpts{}) head := cltest.Head(1) err := saver.Save(testutils.Context(t), head) @@ -76,19 +92,56 @@ func TestHeadSaver_Save(t *testing.T) { func TestHeadSaver_Load(t *testing.T) { t.Parallel() - saver, orm := configureSaver(t) - - for i := 0; i < 5; i++ { - err := orm.IdempotentInsertHead(testutils.Context(t), cltest.Head(i)) + saver, orm := configureSaver(t, saverOpts{ + headTrackerConfig: &headTrackerConfig{historyDepth: 4}, + }) + + // create chain + // H0 <- H1 <- H2 <- H3 <- H4 <- H5 + // \ + // H2Uncle + // + newHead := func(num int, parent common.Hash) *evmtypes.Head { + h := evmtypes.NewHead(big.NewInt(int64(num)), utils.NewHash(), parent, uint64(time.Now().Unix()), ubig.NewI(0)) + return &h + } + h0 := newHead(0, utils.NewHash()) + h1 := newHead(1, h0.Hash) + h2 := newHead(2, h1.Hash) + h3 := newHead(3, h2.Hash) + h4 := newHead(4, h3.Hash) + h5 := newHead(5, h4.Hash) + h2Uncle := newHead(2, h1.Hash) + + allHeads := []*evmtypes.Head{h0, h1, h2, h2Uncle, h3, h4, h5} + + for _, h := range allHeads { + err := orm.IdempotentInsertHead(testutils.Context(t), h) require.NoError(t, err) } - latestHead, err := saver.Load(testutils.Context(t)) + verifyLatestHead := func(latestHead *evmtypes.Head) { + // latest head matches h5 and chain does not include h0 + require.NotNil(t, latestHead) + require.Equal(t, int64(5), latestHead.Number) + require.Equal(t, uint32(5), latestHead.ChainLength()) + require.Greater(t, latestHead.EarliestHeadInChain().BlockNumber(), int64(0)) + } + + // load all from [h5-historyDepth, h5] + latestHead, err := saver.Load(testutils.Context(t), h5.BlockNumber()) require.NoError(t, err) + // verify latest head loaded from db + verifyLatestHead(latestHead) + + //verify latest head loaded from memory store + latestHead = saver.LatestChain() require.NotNil(t, latestHead) - require.Equal(t, int64(4), latestHead.Number) + verifyLatestHead(latestHead) + + // h2Uncle was loaded and has chain up to h1 + uncleChain := saver.Chain(h2Uncle.Hash) + require.NotNil(t, uncleChain) + require.Equal(t, uint32(2), uncleChain.ChainLength()) // h2Uncle -> h1 - latestChain := saver.LatestChain() - require.NotNil(t, latestChain) - require.Equal(t, int64(4), latestChain.Number) } diff --git a/core/chains/evm/headtracker/head_tracker.go b/core/chains/evm/headtracker/head_tracker.go index 3cddfb71d09..1fed1aa0c51 100644 --- a/core/chains/evm/headtracker/head_tracker.go +++ b/core/chains/evm/headtracker/head_tracker.go @@ -53,7 +53,7 @@ func (*nullTracker) Ready() error { return nil } func (*nullTracker) HealthReport() map[string]error { return map[string]error{} } func (*nullTracker) Name() string { return "" } func (*nullTracker) SetLogLevel(zapcore.Level) {} -func (*nullTracker) Backfill(ctx context.Context, headWithChain *evmtypes.Head, depth uint) (err error) { +func (*nullTracker) Backfill(ctx context.Context, headWithChain, latestFinalized *evmtypes.Head) (err error) { return nil } func (*nullTracker) LatestChain() *evmtypes.Head { return nil } diff --git a/core/chains/evm/headtracker/head_tracker_test.go b/core/chains/evm/headtracker/head_tracker_test.go index 22e931d6d0f..cb554196c87 100644 --- a/core/chains/evm/headtracker/head_tracker_test.go +++ b/core/chains/evm/headtracker/head_tracker_test.go @@ -16,8 +16,12 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" + "go.uber.org/zap" + "go.uber.org/zap/zaptest/observer" "golang.org/x/exp/maps" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" + "github.com/jmoiron/sqlx" commonconfig "github.com/smartcontractkit/chainlink-common/pkg/config" @@ -27,7 +31,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/utils/mailbox/mailboxtest" commonmocks "github.com/smartcontractkit/chainlink/v2/common/types/mocks" - evmclient "github.com/smartcontractkit/chainlink/v2/core/chains/evm/client" + evmclimocks "github.com/smartcontractkit/chainlink/v2/core/chains/evm/client/mocks" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/headtracker" httypes "github.com/smartcontractkit/chainlink/v2/core/chains/evm/headtracker/types" evmtypes "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" @@ -52,12 +56,12 @@ func TestHeadTracker_New(t *testing.T) { t.Parallel() db := pgtest.NewSqlxDB(t) - logger := logger.Test(t) - config := configtest.NewGeneralConfig(t, nil) ethClient := evmtest.NewEthClientMockWithDefaultChain(t) ethClient.On("HeadByNumber", mock.Anything, (*big.Int)(nil)).Return(cltest.Head(0), nil) + // finalized + ethClient.On("HeadByNumber", mock.Anything, big.NewInt(0)).Return(cltest.Head(0), nil) - orm := headtracker.NewORM(db, logger, config.Database(), cltest.FixtureChainID) + orm := headtracker.NewORM(cltest.FixtureChainID, db) assert.Nil(t, orm.IdempotentInsertHead(testutils.Context(t), cltest.Head(1))) last := cltest.Head(16) assert.Nil(t, orm.IdempotentInsertHead(testutils.Context(t), last)) @@ -72,32 +76,37 @@ func TestHeadTracker_New(t *testing.T) { assert.Equal(t, last.Number, latest.Number) } -func TestHeadTracker_Save_InsertsAndTrimsTable(t *testing.T) { +func TestHeadTracker_MarkFinalized_MarksAndTrimsTable(t *testing.T) { t.Parallel() db := pgtest.NewSqlxDB(t) - logger := logger.Test(t) - config := cltest.NewTestChainScopedConfig(t) + gCfg := configtest.NewGeneralConfig(t, func(c *chainlink.Config, _ *chainlink.Secrets) { + c.EVM[0].HeadTracker.HistoryDepth = ptr[uint32](100) + }) + config := evmtest.NewChainScopedConfig(t, gCfg) ethClient := evmtest.NewEthClientMockWithDefaultChain(t) - orm := headtracker.NewORM(db, logger, config.Database(), cltest.FixtureChainID) + orm := headtracker.NewORM(cltest.FixtureChainID, db) for idx := 0; idx < 200; idx++ { assert.Nil(t, orm.IdempotentInsertHead(testutils.Context(t), cltest.Head(idx))) } - ht := createHeadTracker(t, ethClient, config.EVM(), config.EVM().HeadTracker(), orm) + latest := cltest.Head(201) + assert.Nil(t, orm.IdempotentInsertHead(testutils.Context(t), latest)) - h := cltest.Head(200) - require.NoError(t, ht.headSaver.Save(testutils.Context(t), h)) - assert.Equal(t, big.NewInt(200), ht.headSaver.LatestChain().ToInt()) + ht := createHeadTracker(t, ethClient, config.EVM(), config.EVM().HeadTracker(), orm) + _, err := ht.headSaver.Load(testutils.Context(t), latest.Number) + require.NoError(t, err) + require.NoError(t, ht.headSaver.MarkFinalized(testutils.Context(t), latest)) + assert.Equal(t, big.NewInt(201), ht.headSaver.LatestChain().ToInt()) firstHead := firstHead(t, db) assert.Equal(t, big.NewInt(101), firstHead.ToInt()) lastHead, err := orm.LatestHead(testutils.Context(t)) require.NoError(t, err) - assert.Equal(t, int64(200), lastHead.Number) + assert.Equal(t, int64(201), lastHead.Number) } func TestHeadTracker_Get(t *testing.T) { @@ -121,9 +130,8 @@ func TestHeadTracker_Get(t *testing.T) { for _, test := range tests { t.Run(test.name, func(t *testing.T) { db := pgtest.NewSqlxDB(t) - logger := logger.Test(t) config := cltest.NewTestChainScopedConfig(t) - orm := headtracker.NewORM(db, logger, config.Database(), cltest.FixtureChainID) + orm := headtracker.NewORM(cltest.FixtureChainID, db) ethClient := evmtest.NewEthClientMockWithDefaultChain(t) chStarted := make(chan struct{}) @@ -168,15 +176,18 @@ func TestHeadTracker_Start_NewHeads(t *testing.T) { t.Parallel() db := pgtest.NewSqlxDB(t) - logger := logger.Test(t) config := cltest.NewTestChainScopedConfig(t) - orm := headtracker.NewORM(db, logger, config.Database(), cltest.FixtureChainID) + orm := headtracker.NewORM(cltest.FixtureChainID, db) ethClient := evmtest.NewEthClientMockWithDefaultChain(t) chStarted := make(chan struct{}) mockEth := &evmtest.MockEth{EthClient: ethClient} sub := mockEth.NewSub(t) - ethClient.On("HeadByNumber", mock.Anything, (*big.Int)(nil)).Return(cltest.Head(0), nil) + // for initial load + ethClient.On("HeadByNumber", mock.Anything, (*big.Int)(nil)).Return(cltest.Head(0), nil).Once() + ethClient.On("HeadByNumber", mock.Anything, mock.Anything).Return(cltest.Head(0), nil).Once() + // for backfill + ethClient.On("HeadByNumber", mock.Anything, mock.Anything).Return(cltest.Head(0), nil).Maybe() ethClient.On("SubscribeNewHead", mock.Anything, mock.Anything). Run(func(mock.Arguments) { close(chStarted) @@ -189,43 +200,73 @@ func TestHeadTracker_Start_NewHeads(t *testing.T) { <-chStarted } -func TestHeadTracker_Start_CancelContext(t *testing.T) { +func TestHeadTracker_Start(t *testing.T) { t.Parallel() - db := pgtest.NewSqlxDB(t) - logger := logger.Test(t) - config := cltest.NewTestChainScopedConfig(t) - orm := headtracker.NewORM(db, logger, config.Database(), cltest.FixtureChainID) - ethClient := evmtest.NewEthClientMockWithDefaultChain(t) - chStarted := make(chan struct{}) - ethClient.On("HeadByNumber", mock.Anything, (*big.Int)(nil)).Run(func(args mock.Arguments) { - ctx := args.Get(0).(context.Context) - select { - case <-ctx.Done(): - return - case <-time.After(10 * time.Second): - assert.FailNow(t, "context was not cancelled within 10s") - } - }).Return(cltest.Head(0), nil) - mockEth := &evmtest.MockEth{EthClient: ethClient} - sub := mockEth.NewSub(t) - ethClient.On("SubscribeNewHead", mock.Anything, mock.Anything). - Run(func(mock.Arguments) { - close(chStarted) - }). - Return(sub, nil). - Maybe() - - ht := createHeadTracker(t, ethClient, config.EVM(), config.EVM().HeadTracker(), orm) + const historyDepth = 100 + newHeadTracker := func(t *testing.T) *headTrackerUniverse { + db := pgtest.NewSqlxDB(t) + gCfg := configtest.NewGeneralConfig(t, func(c *chainlink.Config, _ *chainlink.Secrets) { + c.EVM[0].FinalityTagEnabled = ptr[bool](true) + c.EVM[0].HeadTracker.HistoryDepth = ptr[uint32](historyDepth) + }) + config := evmtest.NewChainScopedConfig(t, gCfg) + orm := headtracker.NewORM(cltest.FixtureChainID, db) + ethClient := evmtest.NewEthClientMockWithDefaultChain(t) + return createHeadTracker(t, ethClient, config.EVM(), config.EVM().HeadTracker(), orm) + } - ctx, cancel := context.WithCancel(testutils.Context(t)) - go func() { - time.Sleep(1 * time.Second) - cancel() - }() - err := ht.headTracker.Start(ctx) - require.NoError(t, err) - require.NoError(t, ht.headTracker.Close()) + t.Run("Fail start if context was canceled", func(t *testing.T) { + ctx, cancel := context.WithCancel(testutils.Context(t)) + ht := newHeadTracker(t) + ht.ethClient.On("HeadByNumber", mock.Anything, (*big.Int)(nil)).Run(func(args mock.Arguments) { + cancel() + }).Return(cltest.Head(0), context.Canceled) + err := ht.headTracker.Start(ctx) + require.ErrorIs(t, err, context.Canceled) + }) + t.Run("Starts even if failed to get initialHead", func(t *testing.T) { + ht := newHeadTracker(t) + ht.ethClient.On("HeadByNumber", mock.Anything, (*big.Int)(nil)).Return(cltest.Head(0), errors.New("failed to get init head")) + ht.Start(t) + tests.AssertLogEventually(t, ht.observer, "Error handling initial head") + }) + t.Run("Starts even if received invalid head", func(t *testing.T) { + ht := newHeadTracker(t) + ht.ethClient.On("HeadByNumber", mock.Anything, (*big.Int)(nil)).Return(nil, nil) + ht.Start(t) + tests.AssertLogEventually(t, ht.observer, "Got nil initial head") + }) + t.Run("Starts even if fails to get finalizedHead", func(t *testing.T) { + ht := newHeadTracker(t) + head := cltest.Head(1000) + ht.ethClient.On("HeadByNumber", mock.Anything, (*big.Int)(nil)).Return(head, nil).Once() + ht.ethClient.On("LatestFinalizedBlock", mock.Anything).Return(nil, errors.New("failed to load latest finalized")).Once() + ht.Start(t) + tests.AssertLogEventually(t, ht.observer, "Error handling initial head") + }) + t.Run("Starts even if latest finalizedHead is nil", func(t *testing.T) { + ht := newHeadTracker(t) + head := cltest.Head(1000) + ht.ethClient.On("HeadByNumber", mock.Anything, (*big.Int)(nil)).Return(head, nil).Once() + ht.ethClient.On("LatestFinalizedBlock", mock.Anything).Return(nil, nil).Once() + ht.Start(t) + tests.AssertLogEventually(t, ht.observer, "Error handling initial head") + }) + t.Run("Happy path", func(t *testing.T) { + head := cltest.Head(1000) + ht := newHeadTracker(t) + ctx := testutils.Context(t) + require.NoError(t, ht.orm.IdempotentInsertHead(ctx, cltest.Head(799))) + ht.ethClient.On("HeadByNumber", mock.Anything, (*big.Int)(nil)).Return(head, nil).Once() + finalizedHead := cltest.Head(800) + // on start + ht.ethClient.On("LatestFinalizedBlock", mock.Anything).Return(finalizedHead, nil).Once() + // on backfill + ht.ethClient.On("LatestFinalizedBlock", mock.Anything).Return(nil, errors.New("backfill call to finalized failed")).Maybe() + ht.Start(t) + tests.AssertLogEventually(t, ht.observer, "Loaded chain from DB") + }) } func TestHeadTracker_CallsHeadTrackableCallbacks(t *testing.T) { @@ -233,9 +274,8 @@ func TestHeadTracker_CallsHeadTrackableCallbacks(t *testing.T) { g := gomega.NewWithT(t) db := pgtest.NewSqlxDB(t) - logger := logger.Test(t) config := cltest.NewTestChainScopedConfig(t) - orm := headtracker.NewORM(db, logger, config.Database(), cltest.FixtureChainID) + orm := headtracker.NewORM(cltest.FixtureChainID, db) ethClient := evmtest.NewEthClientMockWithDefaultChain(t) @@ -272,9 +312,8 @@ func TestHeadTracker_ReconnectOnError(t *testing.T) { g := gomega.NewWithT(t) db := pgtest.NewSqlxDB(t) - logger := logger.Test(t) config := cltest.NewTestChainScopedConfig(t) - orm := headtracker.NewORM(db, logger, config.Database(), cltest.FixtureChainID) + orm := headtracker.NewORM(cltest.FixtureChainID, db) ethClient := evmtest.NewEthClientMockWithDefaultChain(t) mockEth := &evmtest.MockEth{EthClient: ethClient} @@ -289,7 +328,7 @@ func TestHeadTracker_ReconnectOnError(t *testing.T) { func(ctx context.Context, ch chan<- *evmtypes.Head) ethereum.Subscription { return mockEth.NewSub(t) }, func(ctx context.Context, ch chan<- *evmtypes.Head) error { return nil }, ) - ethClient.On("HeadByNumber", mock.Anything, (*big.Int)(nil)).Return(cltest.Head(0), nil) + ethClient.On("HeadByNumber", mock.Anything, mock.Anything).Return(cltest.Head(0), nil) checker := &cltest.MockHeadTrackable{} ht := createHeadTrackerWithChecker(t, ethClient, config.EVM(), config.EVM().HeadTracker(), orm, checker) @@ -308,9 +347,8 @@ func TestHeadTracker_ResubscribeOnSubscriptionError(t *testing.T) { g := gomega.NewWithT(t) db := pgtest.NewSqlxDB(t) - logger := logger.Test(t) config := cltest.NewTestChainScopedConfig(t) - orm := headtracker.NewORM(db, logger, config.Database(), cltest.FixtureChainID) + orm := headtracker.NewORM(cltest.FixtureChainID, db) ethClient := evmtest.NewEthClientMockWithDefaultChain(t) @@ -325,7 +363,7 @@ func TestHeadTracker_ResubscribeOnSubscriptionError(t *testing.T) { }, func(ctx context.Context, ch chan<- *evmtypes.Head) error { return nil }, ) - ethClient.On("HeadByNumber", mock.Anything, mock.Anything).Return(cltest.Head(0), nil).Once() + ethClient.On("HeadByNumber", mock.Anything, mock.Anything).Return(cltest.Head(0), nil) ethClient.On("HeadByHash", mock.Anything, mock.Anything).Return(cltest.Head(0), nil).Maybe() checker := &cltest.MockHeadTrackable{} @@ -355,7 +393,6 @@ func TestHeadTracker_Start_LoadsLatestChain(t *testing.T) { t.Parallel() db := pgtest.NewSqlxDB(t) - logger := logger.Test(t) config := cltest.NewTestChainScopedConfig(t) ethClient := evmtest.NewEthClientMockWithDefaultChain(t) @@ -373,6 +410,7 @@ func TestHeadTracker_Start_LoadsLatestChain(t *testing.T) { parentHash = heads[i].Hash } ethClient.On("HeadByNumber", mock.Anything, (*big.Int)(nil)).Return(heads[3], nil).Maybe() + ethClient.On("HeadByNumber", mock.Anything, big.NewInt(0)).Return(heads[0], nil).Maybe() ethClient.On("HeadByHash", mock.Anything, heads[2].Hash).Return(heads[2], nil).Maybe() ethClient.On("HeadByHash", mock.Anything, heads[1].Hash).Return(heads[1], nil).Maybe() ethClient.On("HeadByHash", mock.Anything, heads[0].Hash).Return(heads[0], nil).Maybe() @@ -389,7 +427,7 @@ func TestHeadTracker_Start_LoadsLatestChain(t *testing.T) { func(ctx context.Context, ch chan<- *evmtypes.Head) error { return nil }, ) - orm := headtracker.NewORM(db, logger, config.Database(), cltest.FixtureChainID) + orm := headtracker.NewORM(cltest.FixtureChainID, db) trackable := &cltest.MockHeadTrackable{} ht := createHeadTrackerWithChecker(t, ethClient, config.EVM(), config.EVM().HeadTracker(), orm, trackable) @@ -420,7 +458,6 @@ func TestHeadTracker_SwitchesToLongestChainWithHeadSamplingEnabled(t *testing.T) t.Parallel() db := pgtest.NewSqlxDB(t) - logger := logger.Test(t) config := configtest.NewGeneralConfig(t, func(c *chainlink.Config, s *chainlink.Secrets) { c.EVM[0].FinalityDepth = ptr[uint32](50) @@ -432,7 +469,7 @@ func TestHeadTracker_SwitchesToLongestChainWithHeadSamplingEnabled(t *testing.T) ethClient := evmtest.NewEthClientMockWithDefaultChain(t) checker := commonmocks.NewHeadTrackable[*evmtypes.Head, gethCommon.Hash](t) - orm := headtracker.NewORM(db, logger, config.Database(), *evmtest.MustGetDefaultChainID(t, config.EVMConfigs())) + orm := headtracker.NewORM(*evmtest.MustGetDefaultChainID(t, config.EVMConfigs()), db) csCfg := evmtest.NewChainScopedConfig(t, config) ht := createHeadTrackerWithChecker(t, ethClient, csCfg.EVM(), csCfg.EVM().HeadTracker(), orm, checker) @@ -454,6 +491,8 @@ func TestHeadTracker_SwitchesToLongestChainWithHeadSamplingEnabled(t *testing.T) head0 := blocks.Head(0) // Initial query ethClient.On("HeadByNumber", mock.Anything, (*big.Int)(nil)).Return(head0, nil) + // backfill query + ethClient.On("HeadByNumber", mock.Anything, big.NewInt(0)).Return(head0, nil) ht.Start(t) headSeq := cltest.NewHeadBuffer(t) @@ -548,7 +587,6 @@ func TestHeadTracker_SwitchesToLongestChainWithHeadSamplingDisabled(t *testing.T t.Parallel() db := pgtest.NewSqlxDB(t) - logger := logger.Test(t) config := configtest.NewGeneralConfig(t, func(c *chainlink.Config, s *chainlink.Secrets) { c.EVM[0].FinalityDepth = ptr[uint32](50) @@ -560,7 +598,7 @@ func TestHeadTracker_SwitchesToLongestChainWithHeadSamplingDisabled(t *testing.T ethClient := evmtest.NewEthClientMockWithDefaultChain(t) checker := commonmocks.NewHeadTrackable[*evmtypes.Head, gethCommon.Hash](t) - orm := headtracker.NewORM(db, logger, config.Database(), cltest.FixtureChainID) + orm := headtracker.NewORM(cltest.FixtureChainID, db) evmcfg := evmtest.NewChainScopedConfig(t, config) ht := createHeadTrackerWithChecker(t, ethClient, evmcfg.EVM(), evmcfg.EVM().HeadTracker(), orm, checker) @@ -582,6 +620,8 @@ func TestHeadTracker_SwitchesToLongestChainWithHeadSamplingDisabled(t *testing.T head0 := blocks.Head(0) // evmtypes.Head{Number: 0, Hash: utils.NewHash(), ParentHash: utils.NewHash(), Timestamp: time.Unix(0, 0)} // Initial query ethClient.On("HeadByNumber", mock.Anything, (*big.Int)(nil)).Return(head0, nil) + // backfill + ethClient.On("HeadByNumber", mock.Anything, big.NewInt(0)).Return(head0, nil) headSeq := cltest.NewHeadBuffer(t) headSeq.Append(blocks.Head(0)) @@ -773,45 +813,69 @@ func TestHeadTracker_Backfill(t *testing.T) { ctx := testutils.Context(t) - t.Run("does nothing if all the heads are in database", func(t *testing.T) { - db := pgtest.NewSqlxDB(t) + type opts struct { + Heads []evmtypes.Head + } + newHeadTrackerUniverse := func(t *testing.T, opts opts) *headTrackerUniverse { cfg := configtest.NewGeneralConfig(t, nil) - logger := logger.Test(t) - orm := headtracker.NewORM(db, logger, cfg.Database(), cltest.FixtureChainID) - for i := range heads { - require.NoError(t, orm.IdempotentInsertHead(testutils.Context(t), &heads[i])) - } + evmcfg := evmtest.NewChainScopedConfig(t, cfg) + db := pgtest.NewSqlxDB(t) + orm := headtracker.NewORM(cltest.FixtureChainID, db) + for i := range opts.Heads { + require.NoError(t, orm.IdempotentInsertHead(testutils.Context(t), &opts.Heads[i])) + } ethClient := evmtest.NewEthClientMock(t) ethClient.On("ConfiguredChainID", mock.Anything).Return(evmtest.MustGetDefaultChainID(t, cfg.EVMConfigs()), nil) - ht := createHeadTrackerWithNeverSleeper(t, ethClient, cfg, orm) - - err := ht.Backfill(ctx, &h12, 2) + ht := createHeadTracker(t, ethClient, evmcfg.EVM(), evmcfg.EVM().HeadTracker(), orm) + _, err := ht.headSaver.Load(testutils.Context(t), 0) require.NoError(t, err) + return ht + } + + t.Run("returns error if latestFinalized is not valid", func(t *testing.T) { + htu := newHeadTrackerUniverse(t, opts{}) + + err := htu.headTracker.Backfill(ctx, &h12, nil) + require.EqualError(t, err, "can not perform backfill without a valid latestFinalized head") }) + t.Run("Returns error if finalized head is ahead of canonical", func(t *testing.T) { + htu := newHeadTrackerUniverse(t, opts{}) - t.Run("fetches a missing head", func(t *testing.T) { - db := pgtest.NewSqlxDB(t) - cfg := configtest.NewGeneralConfig(t, nil) - logger := logger.Test(t) - orm := headtracker.NewORM(db, logger, cfg.Database(), cltest.FixtureChainID) - for i := range heads { - require.NoError(t, orm.IdempotentInsertHead(testutils.Context(t), &heads[i])) - } + err := htu.headTracker.Backfill(ctx, &h12, &h14Orphaned) + require.EqualError(t, err, "invariant violation: expected head of canonical chain to be ahead of the latestFinalized") + }) + t.Run("Returns error if finalizedHead is not present in the canonical chain", func(t *testing.T) { + htu := newHeadTrackerUniverse(t, opts{Heads: heads}) - ethClient := evmtest.NewEthClientMock(t) - ethClient.On("ConfiguredChainID", mock.Anything).Return(evmtest.MustGetDefaultChainID(t, cfg.EVMConfigs()), nil) - ethClient.On("HeadByHash", mock.Anything, head10.Hash). - Return(&head10, nil) + err := htu.headTracker.Backfill(ctx, &h15, &h14Orphaned) + require.EqualError(t, err, "expected finalized block to be present in canonical chain") + }) + t.Run("Marks all blocks in chain that are older than finalized", func(t *testing.T) { + htu := newHeadTrackerUniverse(t, opts{Heads: heads}) - ht := createHeadTrackerWithNeverSleeper(t, ethClient, cfg, orm) + assertFinalized := func(expectedFinalized bool, msg string, heads ...evmtypes.Head) { + for _, h := range heads { + storedHead := htu.headSaver.Chain(h.Hash) + assert.Equal(t, expectedFinalized, storedHead != nil && storedHead.IsFinalized, msg, "block_number", h.Number) + } + } + + err := htu.headTracker.Backfill(ctx, &h15, &h14) + require.NoError(t, err) + assertFinalized(true, "expected heads to be marked as finalized after backfill", h14, h13, h12, h11) + assertFinalized(false, "expected heads to remain unfinalized", h15, head10) + }) - var depth uint = 3 + t.Run("fetches a missing head", func(t *testing.T) { + htu := newHeadTrackerUniverse(t, opts{Heads: heads}) + htu.ethClient.On("HeadByHash", mock.Anything, head10.Hash). + Return(&head10, nil) - err := ht.Backfill(ctx, &h12, depth) + err := htu.headTracker.Backfill(ctx, &h12, &h9) require.NoError(t, err) - h := ht.headSaver.Chain(h12.Hash) + h := htu.headSaver.Chain(h12.Hash) assert.Equal(t, int64(12), h.Number) require.NotNil(t, h.Parent) @@ -821,37 +885,23 @@ func TestHeadTracker_Backfill(t *testing.T) { require.NotNil(t, h.Parent.Parent.Parent) assert.Equal(t, int64(9), h.Parent.Parent.Parent.Number) - writtenHead, err := orm.HeadByHash(testutils.Context(t), head10.Hash) + writtenHead, err := htu.orm.HeadByHash(testutils.Context(t), head10.Hash) require.NoError(t, err) assert.Equal(t, int64(10), writtenHead.Number) }) t.Run("fetches only heads that are missing", func(t *testing.T) { - db := pgtest.NewSqlxDB(t) - cfg := configtest.NewGeneralConfig(t, nil) - logger := logger.Test(t) - orm := headtracker.NewORM(db, logger, cfg.Database(), cltest.FixtureChainID) - for i := range heads { - require.NoError(t, orm.IdempotentInsertHead(testutils.Context(t), &heads[i])) - } + htu := newHeadTrackerUniverse(t, opts{Heads: heads}) - ethClient := evmtest.NewEthClientMock(t) - ethClient.On("ConfiguredChainID", mock.Anything).Return(evmtest.MustGetDefaultChainID(t, cfg.EVMConfigs()), nil) - - ht := createHeadTrackerWithNeverSleeper(t, ethClient, cfg, orm) - - ethClient.On("HeadByHash", mock.Anything, head10.Hash). + htu.ethClient.On("HeadByHash", mock.Anything, head10.Hash). Return(&head10, nil) - ethClient.On("HeadByHash", mock.Anything, head8.Hash). + htu.ethClient.On("HeadByHash", mock.Anything, head8.Hash). Return(&head8, nil) - // Needs to be 8 because there are 8 heads in chain (15,14,13,12,11,10,9,8) - var depth uint = 8 - - err := ht.Backfill(ctx, &h15, depth) + err := htu.headTracker.Backfill(ctx, &h15, &head8) require.NoError(t, err) - h := ht.headSaver.Chain(h15.Hash) + h := htu.headSaver.Chain(h15.Hash) require.Equal(t, uint32(8), h.ChainLength()) earliestInChain := h.EarliestInChain() @@ -859,77 +909,20 @@ func TestHeadTracker_Backfill(t *testing.T) { assert.Equal(t, head8.Hash, earliestInChain.BlockHash()) }) - t.Run("does not backfill if chain length is already greater than or equal to depth", func(t *testing.T) { - db := pgtest.NewSqlxDB(t) - cfg := configtest.NewGeneralConfig(t, nil) - logger := logger.Test(t) - orm := headtracker.NewORM(db, logger, cfg.Database(), cltest.FixtureChainID) - for i := range heads { - require.NoError(t, orm.IdempotentInsertHead(testutils.Context(t), &heads[i])) - } - - ethClient := evmtest.NewEthClientMock(t) - ethClient.On("ConfiguredChainID", mock.Anything).Return(evmtest.MustGetDefaultChainID(t, cfg.EVMConfigs()), nil) - - ht := createHeadTrackerWithNeverSleeper(t, ethClient, cfg, orm) - - err := ht.Backfill(ctx, &h15, 3) - require.NoError(t, err) - - err = ht.Backfill(ctx, &h15, 5) - require.NoError(t, err) - }) - - t.Run("only backfills to height 0 if chain length would otherwise cause it to try and fetch a negative head", func(t *testing.T) { - db := pgtest.NewSqlxDB(t) - cfg := configtest.NewGeneralConfig(t, nil) - logger := logger.Test(t) - orm := headtracker.NewORM(db, logger, cfg.Database(), cltest.FixtureChainID) - - ethClient := evmtest.NewEthClientMock(t) - ethClient.On("ConfiguredChainID", mock.Anything).Return(evmtest.MustGetDefaultChainID(t, cfg.EVMConfigs()), nil) - ethClient.On("HeadByHash", mock.Anything, head0.Hash). - Return(&head0, nil) - - require.NoError(t, orm.IdempotentInsertHead(testutils.Context(t), &h1)) - - ht := createHeadTrackerWithNeverSleeper(t, ethClient, cfg, orm) - - err := ht.Backfill(ctx, &h1, 400) - require.NoError(t, err) - - h := ht.headSaver.Chain(h1.Hash) - require.NotNil(t, h) - - require.Equal(t, uint32(2), h.ChainLength()) - require.Equal(t, int64(0), h.EarliestInChain().BlockNumber()) - }) - t.Run("abandons backfill and returns error if the eth node returns not found", func(t *testing.T) { - db := pgtest.NewSqlxDB(t) - cfg := configtest.NewGeneralConfig(t, nil) - logger := logger.Test(t) - orm := headtracker.NewORM(db, logger, cfg.Database(), cltest.FixtureChainID) - for i := range heads { - require.NoError(t, orm.IdempotentInsertHead(testutils.Context(t), &heads[i])) - } - - ethClient := evmtest.NewEthClientMock(t) - ethClient.On("ConfiguredChainID", mock.Anything).Return(evmtest.MustGetDefaultChainID(t, cfg.EVMConfigs()), nil) - ethClient.On("HeadByHash", mock.Anything, head10.Hash). + htu := newHeadTrackerUniverse(t, opts{Heads: heads}) + htu.ethClient.On("HeadByHash", mock.Anything, head10.Hash). Return(&head10, nil). Once() - ethClient.On("HeadByHash", mock.Anything, head8.Hash). + htu.ethClient.On("HeadByHash", mock.Anything, head8.Hash). Return(nil, ethereum.NotFound). Once() - ht := createHeadTrackerWithNeverSleeper(t, ethClient, cfg, orm) - - err := ht.Backfill(ctx, &h12, 400) + err := htu.headTracker.Backfill(ctx, &h12, &head8) require.Error(t, err) require.EqualError(t, err, "fetchAndSaveHead failed: not found") - h := ht.headSaver.Chain(h12.Hash) + h := htu.headSaver.Chain(h12.Hash) // Should contain 12, 11, 10, 9 assert.Equal(t, 4, int(h.ChainLength())) @@ -937,28 +930,20 @@ func TestHeadTracker_Backfill(t *testing.T) { }) t.Run("abandons backfill and returns error if the context time budget is exceeded", func(t *testing.T) { - db := pgtest.NewSqlxDB(t) - cfg := configtest.NewGeneralConfig(t, nil) - logger := logger.Test(t) - orm := headtracker.NewORM(db, logger, cfg.Database(), cltest.FixtureChainID) - for i := range heads { - require.NoError(t, orm.IdempotentInsertHead(testutils.Context(t), &heads[i])) - } - - ethClient := evmtest.NewEthClientMock(t) - ethClient.On("ConfiguredChainID", mock.Anything).Return(evmtest.MustGetDefaultChainID(t, cfg.EVMConfigs()), nil) - ethClient.On("HeadByHash", mock.Anything, head10.Hash). + htu := newHeadTrackerUniverse(t, opts{Heads: heads}) + htu.ethClient.On("HeadByHash", mock.Anything, head10.Hash). Return(&head10, nil) - ethClient.On("HeadByHash", mock.Anything, head8.Hash). - Return(nil, context.DeadlineExceeded) - - ht := createHeadTrackerWithNeverSleeper(t, ethClient, cfg, orm) + lctx, cancel := context.WithCancel(ctx) + htu.ethClient.On("HeadByHash", mock.Anything, head8.Hash). + Return(nil, context.DeadlineExceeded).Run(func(args mock.Arguments) { + cancel() + }) - err := ht.Backfill(ctx, &h12, 400) + err := htu.headTracker.Backfill(lctx, &h12, &head8) require.Error(t, err) - require.EqualError(t, err, "fetchAndSaveHead failed: context deadline exceeded") + require.EqualError(t, err, "fetchAndSaveHead failed: context canceled") - h := ht.headSaver.Chain(h12.Hash) + h := htu.headSaver.Chain(h12.Hash) // Should contain 12, 11, 10, 9 assert.Equal(t, 4, int(h.ChainLength())) @@ -966,33 +951,40 @@ func TestHeadTracker_Backfill(t *testing.T) { }) t.Run("abandons backfill and returns error when fetching a block by hash fails, indicating a reorg", func(t *testing.T) { - db := pgtest.NewSqlxDB(t) - cfg := configtest.NewGeneralConfig(t, nil) - logger := logger.Test(t) - orm := headtracker.NewORM(db, logger, cfg.Database(), cltest.FixtureChainID) - ethClient := evmtest.NewEthClientMock(t) - ethClient.On("ConfiguredChainID", mock.Anything).Return(evmtest.MustGetDefaultChainID(t, cfg.EVMConfigs()), nil) - ethClient.On("HeadByHash", mock.Anything, h14.Hash).Return(&h14, nil).Once() - ethClient.On("HeadByHash", mock.Anything, h13.Hash).Return(&h13, nil).Once() - ethClient.On("HeadByHash", mock.Anything, h12.Hash).Return(nil, errors.New("not found")).Once() + htu := newHeadTrackerUniverse(t, opts{}) + htu.ethClient.On("HeadByHash", mock.Anything, h14.Hash).Return(&h14, nil).Once() + htu.ethClient.On("HeadByHash", mock.Anything, h13.Hash).Return(&h13, nil).Once() + htu.ethClient.On("HeadByHash", mock.Anything, h12.Hash).Return(nil, errors.New("not found")).Once() - ht := createHeadTrackerWithNeverSleeper(t, ethClient, cfg, orm) - - err := ht.Backfill(ctx, &h15, 400) + err := htu.headTracker.Backfill(ctx, &h15, &h11) require.Error(t, err) require.EqualError(t, err, "fetchAndSaveHead failed: not found") - h := ht.headSaver.Chain(h14.Hash) + h := htu.headSaver.Chain(h14.Hash) // Should contain 14, 13 (15 was never added). When trying to get the parent of h13 by hash, a reorg happened and backfill exited. assert.Equal(t, 2, int(h.ChainLength())) assert.Equal(t, int64(13), h.EarliestInChain().BlockNumber()) }) + t.Run("marks head as finalized, if latestHead = finalizedHead (0 finality depth)", func(t *testing.T) { + htu := newHeadTrackerUniverse(t, opts{Heads: []evmtypes.Head{h15}}) + finalizedH15 := h15 // copy h15 to have different addresses + err := htu.headTracker.Backfill(ctx, &h15, &finalizedH15) + require.NoError(t, err) + + h := htu.headSaver.LatestChain() + + // Should contain 14, 13 (15 was never added). When trying to get the parent of h13 by hash, a reorg happened and backfill exited. + assert.Equal(t, 1, int(h.ChainLength())) + assert.True(t, h.IsFinalized) + assert.Equal(t, h15.BlockNumber(), h.BlockNumber()) + assert.Equal(t, h15.Hash, h.Hash) + }) } -func createHeadTracker(t *testing.T, ethClient evmclient.Client, config headtracker.Config, htConfig headtracker.HeadTrackerConfig, orm headtracker.ORM) *headTrackerUniverse { - lggr := logger.Test(t) +func createHeadTracker(t *testing.T, ethClient *evmclimocks.Client, config headtracker.Config, htConfig headtracker.HeadTrackerConfig, orm headtracker.ORM) *headTrackerUniverse { + lggr, ob := logger.TestObserved(t, zap.DebugLevel) hb := headtracker.NewHeadBroadcaster(lggr) hs := headtracker.NewHeadSaver(lggr, orm, config, htConfig) mailMon := mailboxtest.NewMonitor(t) @@ -1002,29 +994,14 @@ func createHeadTracker(t *testing.T, ethClient evmclient.Client, config headtrac headBroadcaster: hb, headSaver: hs, mailMon: mailMon, + observer: ob, + orm: orm, + ethClient: ethClient, } } -func createHeadTrackerWithNeverSleeper(t *testing.T, ethClient evmclient.Client, cfg chainlink.GeneralConfig, orm headtracker.ORM) *headTrackerUniverse { - evmcfg := evmtest.NewChainScopedConfig(t, cfg) - lggr := logger.Test(t) - hb := headtracker.NewHeadBroadcaster(lggr) - hs := headtracker.NewHeadSaver(lggr, orm, evmcfg.EVM(), evmcfg.EVM().HeadTracker()) - mailMon := mailboxtest.NewMonitor(t) - ht := headtracker.NewHeadTracker(lggr, ethClient, evmcfg.EVM(), evmcfg.EVM().HeadTracker(), hb, hs, mailMon) - _, err := hs.Load(testutils.Context(t)) - require.NoError(t, err) - return &headTrackerUniverse{ - mu: new(sync.Mutex), - headTracker: ht, - headBroadcaster: hb, - headSaver: hs, - mailMon: mailMon, - } -} - -func createHeadTrackerWithChecker(t *testing.T, ethClient evmclient.Client, config headtracker.Config, htConfig headtracker.HeadTrackerConfig, orm headtracker.ORM, checker httypes.HeadTrackable) *headTrackerUniverse { - lggr := logger.Test(t) +func createHeadTrackerWithChecker(t *testing.T, ethClient *evmclimocks.Client, config headtracker.Config, htConfig headtracker.HeadTrackerConfig, orm headtracker.ORM, checker httypes.HeadTrackable) *headTrackerUniverse { + lggr, ob := logger.TestObserved(t, zap.DebugLevel) hb := headtracker.NewHeadBroadcaster(lggr) hs := headtracker.NewHeadSaver(lggr, orm, config, htConfig) hb.Subscribe(checker) @@ -1036,6 +1013,9 @@ func createHeadTrackerWithChecker(t *testing.T, ethClient evmclient.Client, conf headBroadcaster: hb, headSaver: hs, mailMon: mailMon, + observer: ob, + orm: orm, + ethClient: ethClient, } } @@ -1046,10 +1026,13 @@ type headTrackerUniverse struct { headBroadcaster httypes.HeadBroadcaster headSaver httypes.HeadSaver mailMon *mailbox.Monitor + observer *observer.ObservedLogs + orm headtracker.ORM + ethClient *evmclimocks.Client } -func (u *headTrackerUniverse) Backfill(ctx context.Context, head *evmtypes.Head, depth uint) error { - return u.headTracker.Backfill(ctx, head, depth) +func (u *headTrackerUniverse) Backfill(ctx context.Context, head, finalizedHead *evmtypes.Head) error { + return u.headTracker.Backfill(ctx, head, finalizedHead) } func (u *headTrackerUniverse) Start(t *testing.T) { diff --git a/core/chains/evm/headtracker/heads.go b/core/chains/evm/headtracker/heads.go index ccb7d9b7336..1edfb3e3788 100644 --- a/core/chains/evm/headtracker/heads.go +++ b/core/chains/evm/headtracker/heads.go @@ -17,9 +17,12 @@ type Heads interface { HeadByHash(hash common.Hash) *evmtypes.Head // AddHeads adds newHeads to the collection, eliminates duplicates, // sorts by head number, fixes parents and cuts off old heads (historyDepth). - AddHeads(historyDepth uint, newHeads ...*evmtypes.Head) + AddHeads(newHeads ...*evmtypes.Head) // Count returns number of heads in the collection. Count() int + // MarkFinalized - finds `finalized` in the LatestHead and marks it and all direct ancestors as finalized. + // Trims old blocks whose height is smaller than minBlockToKeep + MarkFinalized(finalized common.Hash, minBlockToKeep int64) bool } type heads struct { @@ -60,31 +63,62 @@ func (h *heads) Count() int { return len(h.heads) } -func (h *heads) AddHeads(historyDepth uint, newHeads ...*evmtypes.Head) { +// MarkFinalized - marks block with has equal to finalized and all it's direct ancestors as finalized. +// Trims old blocks whose height is smaller than minBlockToKeep +func (h *heads) MarkFinalized(finalized common.Hash, minBlockToKeep int64) bool { h.mu.Lock() defer h.mu.Unlock() - headsMap := make(map[common.Hash]*evmtypes.Head, len(h.heads)+len(newHeads)) - for _, head := range append(h.heads, newHeads...) { + if len(h.heads) == 0 { + return false + } + + // deep copy to avoid race on head.Parent + h.heads = deepCopy(h.heads, minBlockToKeep) + + head := h.heads[0] + foundFinalized := false + for head != nil { + if head.Hash == finalized { + foundFinalized = true + } + + // we might see finalized to move back in chain due to request to lagging RPC, + // we should not override the flag in such cases + head.IsFinalized = head.IsFinalized || foundFinalized + head = head.Parent + } + + return foundFinalized +} + +func deepCopy(oldHeads []*evmtypes.Head, minBlockToKeep int64) []*evmtypes.Head { + headsMap := make(map[common.Hash]*evmtypes.Head, len(oldHeads)) + for _, head := range oldHeads { if head.Hash == head.ParentHash { // shouldn't happen but it is untrusted input continue } + if head.BlockNumber() < minBlockToKeep { + // trim redundant blocks + continue + } // copy all head objects to avoid races when a previous head chain is used // elsewhere (since we mutate Parent here) headCopy := *head headCopy.Parent = nil // always build it from scratch in case it points to a head too old to be included // map eliminates duplicates - headsMap[head.Hash] = &headCopy + // prefer head that was already in heads as it might have been marked as finalized on previous run + if _, ok := headsMap[head.Hash]; !ok { + headsMap[head.Hash] = &headCopy + } } - heads := make([]*evmtypes.Head, len(headsMap)) + heads := make([]*evmtypes.Head, 0, len(headsMap)) // unsorted unique heads { - var i int for _, head := range headsMap { - heads[i] = head - i++ + heads = append(heads, head) } } @@ -94,13 +128,8 @@ func (h *heads) AddHeads(historyDepth uint, newHeads ...*evmtypes.Head) { return heads[i].Number > heads[j].Number }) - // cut off the oldest - if uint(len(heads)) > historyDepth { - heads = heads[:historyDepth] - } - // assign parents - for i := 0; i < len(heads)-1; i++ { + for i := 0; i < len(heads); i++ { head := heads[i] parent, exists := headsMap[head.ParentHash] if exists { @@ -108,6 +137,13 @@ func (h *heads) AddHeads(historyDepth uint, newHeads ...*evmtypes.Head) { } } - // set - h.heads = heads + return heads +} + +func (h *heads) AddHeads(newHeads ...*evmtypes.Head) { + h.mu.Lock() + defer h.mu.Unlock() + + // deep copy to avoid race on head.Parent + h.heads = deepCopy(append(h.heads, newHeads...), 0) } diff --git a/core/chains/evm/headtracker/heads_test.go b/core/chains/evm/headtracker/heads_test.go index 9fa5ed4e548..4241b462363 100644 --- a/core/chains/evm/headtracker/heads_test.go +++ b/core/chains/evm/headtracker/heads_test.go @@ -6,6 +6,7 @@ import ( "time" "github.com/ethereum/go-ethereum/common" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/headtracker" @@ -19,18 +20,18 @@ func TestHeads_LatestHead(t *testing.T) { t.Parallel() heads := headtracker.NewHeads() - heads.AddHeads(3, cltest.Head(100), cltest.Head(200), cltest.Head(300)) + heads.AddHeads(cltest.Head(100), cltest.Head(200), cltest.Head(300)) latest := heads.LatestHead() require.NotNil(t, latest) require.Equal(t, int64(300), latest.Number) - heads.AddHeads(3, cltest.Head(250)) + heads.AddHeads(cltest.Head(250)) latest = heads.LatestHead() require.NotNil(t, latest) require.Equal(t, int64(300), latest.Number) - heads.AddHeads(3, cltest.Head(400)) + heads.AddHeads(cltest.Head(400)) latest = heads.LatestHead() require.NotNil(t, latest) require.Equal(t, int64(400), latest.Number) @@ -45,7 +46,7 @@ func TestHeads_HeadByHash(t *testing.T) { cltest.Head(300), } heads := headtracker.NewHeads() - heads.AddHeads(3, testHeads...) + heads.AddHeads(testHeads...) head := heads.HeadByHash(testHeads[1].Hash) require.NotNil(t, head) @@ -61,11 +62,11 @@ func TestHeads_Count(t *testing.T) { heads := headtracker.NewHeads() require.Zero(t, heads.Count()) - heads.AddHeads(3, cltest.Head(100), cltest.Head(200), cltest.Head(300)) + heads.AddHeads(cltest.Head(100), cltest.Head(200), cltest.Head(300)) require.Equal(t, 3, heads.Count()) - heads.AddHeads(1, cltest.Head(400)) - require.Equal(t, 1, heads.Count()) + heads.AddHeads(cltest.Head(400)) + require.Equal(t, 4, heads.Count()) } func TestHeads_AddHeads(t *testing.T) { @@ -88,9 +89,10 @@ func TestHeads_AddHeads(t *testing.T) { parentHash = hash } - heads.AddHeads(6, testHeads...) + heads.AddHeads(testHeads...) + require.Equal(t, 6, heads.Count()) // Add duplicates (should be ignored) - heads.AddHeads(6, testHeads[2:5]...) + heads.AddHeads(testHeads[2:5]...) require.Equal(t, 6, heads.Count()) head := heads.LatestHead() @@ -100,11 +102,62 @@ func TestHeads_AddHeads(t *testing.T) { head = heads.HeadByHash(uncleHash) require.NotNil(t, head) require.Equal(t, 3, int(head.ChainLength())) +} + +func TestHeads_MarkFinalized(t *testing.T) { + t.Parallel() + + heads := headtracker.NewHeads() + + // create chain + // H0 <- H1 <- H2 <- H3 <- H4 <- H5 + // \ \ + // H1Uncle H2Uncle + // + newHead := func(num int, parent common.Hash) *evmtypes.Head { + h := evmtypes.NewHead(big.NewInt(int64(num)), utils.NewHash(), parent, uint64(time.Now().Unix()), ubig.NewI(0)) + return &h + } + h0 := newHead(0, utils.NewHash()) + h1 := newHead(1, h0.Hash) + h1Uncle := newHead(1, h0.Hash) + h2 := newHead(2, h1.Hash) + h3 := newHead(3, h2.Hash) + h4 := newHead(4, h3.Hash) + h5 := newHead(5, h4.Hash) + h2Uncle := newHead(2, h1.Hash) + + allHeads := []*evmtypes.Head{h0, h1, h1Uncle, h2, h2Uncle, h3, h4, h5} + heads.AddHeads(allHeads...) + // mark h3 and all ancestors as finalized + require.True(t, heads.MarkFinalized(h3.Hash, h1.BlockNumber()), "expected MarkFinalized succeed") + + // original heads remain unchanged + for _, h := range allHeads { + assert.False(t, h.IsFinalized, "expected original heads to remain unfinalized") + } + + // h0 is too old. It should not be available directly or through its children + assert.Nil(t, heads.HeadByHash(h0.Hash)) + assert.Nil(t, heads.HeadByHash(h1.Hash).Parent) + assert.Nil(t, heads.HeadByHash(h1Uncle.Hash).Parent) + assert.Nil(t, heads.HeadByHash(h2Uncle.Hash).Parent.Parent) + + require.False(t, heads.MarkFinalized(utils.NewHash(), 0), "expected false if finalized hash was not found in existing LatestHead chain") + + ensureProperFinalization := func(t *testing.T) { + t.Helper() + for _, head := range []*evmtypes.Head{h5, h4} { + require.False(t, heads.HeadByHash(head.Hash).IsFinalized, "expected h4-h5 not to be finalized", head.BlockNumber()) + } + for _, head := range []*evmtypes.Head{h3, h2, h1} { + require.True(t, heads.HeadByHash(head.Hash).IsFinalized, "expected h3 and all ancestors to be finalized", head.BlockNumber()) + } + require.False(t, heads.HeadByHash(h2Uncle.Hash).IsFinalized, "expected uncle block not to be marked as finalized") + + } + t.Run("blocks were correctly marked as finalized", ensureProperFinalization) + heads.AddHeads(h0, h1, h2, h2Uncle, h3, h4, h5) + t.Run("blocks remain finalized after re adding them to the Heads", ensureProperFinalization) - // Adding beyond the limit truncates - heads.AddHeads(2, testHeads...) - require.Equal(t, 2, heads.Count()) - head = heads.LatestHead() - require.NotNil(t, head) - require.Equal(t, 2, int(head.ChainLength())) } diff --git a/core/chains/evm/headtracker/mocks/config.go b/core/chains/evm/headtracker/mocks/config.go index 74376a71362..6cc3900ba42 100644 --- a/core/chains/evm/headtracker/mocks/config.go +++ b/core/chains/evm/headtracker/mocks/config.go @@ -49,6 +49,24 @@ func (_m *Config) FinalityDepth() uint32 { return r0 } +// FinalityTagEnabled provides a mock function with given fields: +func (_m *Config) FinalityTagEnabled() bool { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for FinalityTagEnabled") + } + + var r0 bool + if rf, ok := ret.Get(0).(func() bool); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(bool) + } + + return r0 +} + // NewConfig creates a new instance of Config. 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 NewConfig(t interface { diff --git a/core/chains/evm/headtracker/orm.go b/core/chains/evm/headtracker/orm.go index a1957388b9b..8912bafecdf 100644 --- a/core/chains/evm/headtracker/orm.go +++ b/core/chains/evm/headtracker/orm.go @@ -8,67 +8,59 @@ import ( "github.com/ethereum/go-ethereum/common" pkgerrors "github.com/pkg/errors" - "github.com/jmoiron/sqlx" - - "github.com/smartcontractkit/chainlink-common/pkg/logger" + "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" evmtypes "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" ubig "github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils/big" - "github.com/smartcontractkit/chainlink/v2/core/services/pg" ) type ORM interface { // IdempotentInsertHead inserts a head only if the hash is new. Will do nothing if hash exists already. // No advisory lock required because this is thread safe. IdempotentInsertHead(ctx context.Context, head *evmtypes.Head) error - // TrimOldHeads deletes heads such that only the top N block numbers remain - TrimOldHeads(ctx context.Context, n uint) (err error) + // TrimOldHeads deletes heads such that only blocks >= minBlockNumber remain + TrimOldHeads(ctx context.Context, minBlockNumber int64) (err error) // LatestHead returns the highest seen head LatestHead(ctx context.Context) (head *evmtypes.Head, err error) - // LatestHeads returns the latest heads up to given limit - LatestHeads(ctx context.Context, limit uint) (heads []*evmtypes.Head, err error) + // LatestHeads returns the latest heads with blockNumbers >= minBlockNumber + LatestHeads(ctx context.Context, minBlockNumber int64) (heads []*evmtypes.Head, err error) // HeadByHash fetches the head with the given hash from the db, returns nil if none exists HeadByHash(ctx context.Context, hash common.Hash) (head *evmtypes.Head, err error) } -type orm struct { - q pg.Q +var _ ORM = &DbORM{} + +type DbORM struct { chainID ubig.Big + db sqlutil.DataSource } -func NewORM(db *sqlx.DB, lggr logger.Logger, cfg pg.QConfig, chainID big.Int) ORM { - return &orm{pg.NewQ(db, logger.Named(lggr, "HeadTrackerORM"), cfg), ubig.Big(chainID)} +// NewORM creates an ORM scoped to chainID. +func NewORM(chainID big.Int, db sqlutil.DataSource) *DbORM { + return &DbORM{ + chainID: ubig.Big(chainID), + db: db, + } } -func (orm *orm) IdempotentInsertHead(ctx context.Context, head *evmtypes.Head) error { - // listener guarantees head.EVMChainID to be equal to orm.chainID - q := orm.q.WithOpts(pg.WithParentCtx(ctx)) +func (orm *DbORM) IdempotentInsertHead(ctx context.Context, head *evmtypes.Head) error { + // listener guarantees head.EVMChainID to be equal to DbORM.chainID query := ` INSERT INTO evm.heads (hash, number, parent_hash, created_at, timestamp, l1_block_number, evm_chain_id, base_fee_per_gas) VALUES ( - :hash, :number, :parent_hash, :created_at, :timestamp, :l1_block_number, :evm_chain_id, :base_fee_per_gas) + $1, $2, $3, $4, $5, $6, $7, $8) ON CONFLICT (evm_chain_id, hash) DO NOTHING` - err := q.ExecQNamed(query, head) + _, err := orm.db.ExecContext(ctx, query, head.Hash, head.Number, head.ParentHash, head.CreatedAt, head.Timestamp, head.L1BlockNumber, orm.chainID, head.BaseFeePerGas) return pkgerrors.Wrap(err, "IdempotentInsertHead failed to insert head") } -func (orm *orm) TrimOldHeads(ctx context.Context, n uint) (err error) { - q := orm.q.WithOpts(pg.WithParentCtx(ctx)) - return q.ExecQ(` - DELETE FROM evm.heads - WHERE evm_chain_id = $1 AND number < ( - SELECT min(number) FROM ( - SELECT number - FROM evm.heads - WHERE evm_chain_id = $1 - ORDER BY number DESC - LIMIT $2 - ) numbers - )`, orm.chainID, n) +func (orm *DbORM) TrimOldHeads(ctx context.Context, minBlockNumber int64) (err error) { + query := `DELETE FROM evm.heads WHERE evm_chain_id = $1 AND number < $2` + _, err = orm.db.ExecContext(ctx, query, orm.chainID, minBlockNumber) + return err } -func (orm *orm) LatestHead(ctx context.Context) (head *evmtypes.Head, err error) { +func (orm *DbORM) LatestHead(ctx context.Context) (head *evmtypes.Head, err error) { head = new(evmtypes.Head) - q := orm.q.WithOpts(pg.WithParentCtx(ctx)) - err = q.Get(head, `SELECT * FROM evm.heads WHERE evm_chain_id = $1 ORDER BY number DESC, created_at DESC, id DESC LIMIT 1`, orm.chainID) + err = orm.db.GetContext(ctx, head, `SELECT * FROM evm.heads WHERE evm_chain_id = $1 ORDER BY number DESC, created_at DESC, id DESC LIMIT 1`, orm.chainID) if pkgerrors.Is(err, sql.ErrNoRows) { return nil, nil } @@ -76,17 +68,15 @@ func (orm *orm) LatestHead(ctx context.Context) (head *evmtypes.Head, err error) return } -func (orm *orm) LatestHeads(ctx context.Context, limit uint) (heads []*evmtypes.Head, err error) { - q := orm.q.WithOpts(pg.WithParentCtx(ctx)) - err = q.Select(&heads, `SELECT * FROM evm.heads WHERE evm_chain_id = $1 ORDER BY number DESC, created_at DESC, id DESC LIMIT $2`, orm.chainID, limit) +func (orm *DbORM) LatestHeads(ctx context.Context, minBlockNumer int64) (heads []*evmtypes.Head, err error) { + err = orm.db.SelectContext(ctx, &heads, `SELECT * FROM evm.heads WHERE evm_chain_id = $1 AND number >= $2 ORDER BY number DESC, created_at DESC, id DESC`, orm.chainID, minBlockNumer) err = pkgerrors.Wrap(err, "LatestHeads failed") return } -func (orm *orm) HeadByHash(ctx context.Context, hash common.Hash) (head *evmtypes.Head, err error) { - q := orm.q.WithOpts(pg.WithParentCtx(ctx)) +func (orm *DbORM) HeadByHash(ctx context.Context, hash common.Hash) (head *evmtypes.Head, err error) { head = new(evmtypes.Head) - err = q.Get(head, `SELECT * FROM evm.heads WHERE evm_chain_id = $1 AND hash = $2`, orm.chainID, hash) + err = orm.db.GetContext(ctx, head, `SELECT * FROM evm.heads WHERE evm_chain_id = $1 AND hash = $2`, orm.chainID, hash) if pkgerrors.Is(err, sql.ErrNoRows) { return nil, nil } diff --git a/core/chains/evm/headtracker/orm_test.go b/core/chains/evm/headtracker/orm_test.go index c9a2146daf2..ba164511c19 100644 --- a/core/chains/evm/headtracker/orm_test.go +++ b/core/chains/evm/headtracker/orm_test.go @@ -3,17 +3,13 @@ package headtracker_test import ( "testing" - "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" - "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/configtest" - "github.com/ethereum/go-ethereum/common" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/smartcontractkit/chainlink-common/pkg/logger" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/headtracker" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" + "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest" ) @@ -21,9 +17,7 @@ func TestORM_IdempotentInsertHead(t *testing.T) { t.Parallel() db := pgtest.NewSqlxDB(t) - logger := logger.Test(t) - cfg := configtest.NewGeneralConfig(t, nil) - orm := headtracker.NewORM(db, logger, cfg.Database(), cltest.FixtureChainID) + orm := headtracker.NewORM(cltest.FixtureChainID, db) // Returns nil when inserting first head head := cltest.Head(0) @@ -47,22 +41,24 @@ func TestORM_TrimOldHeads(t *testing.T) { t.Parallel() db := pgtest.NewSqlxDB(t) - logger := logger.Test(t) - cfg := configtest.NewGeneralConfig(t, nil) - orm := headtracker.NewORM(db, logger, cfg.Database(), cltest.FixtureChainID) + orm := headtracker.NewORM(cltest.FixtureChainID, db) for i := 0; i < 10; i++ { head := cltest.Head(i) require.NoError(t, orm.IdempotentInsertHead(testutils.Context(t), head)) } + uncleHead := cltest.Head(5) + require.NoError(t, orm.IdempotentInsertHead(testutils.Context(t), uncleHead)) + err := orm.TrimOldHeads(testutils.Context(t), 5) require.NoError(t, err) - heads, err := orm.LatestHeads(testutils.Context(t), 10) + heads, err := orm.LatestHeads(testutils.Context(t), 0) require.NoError(t, err) - require.Equal(t, 5, len(heads)) + // uncle block was loaded too + require.Equal(t, 6, len(heads)) for i := 0; i < 5; i++ { require.LessOrEqual(t, int64(5), heads[i].Number) } @@ -72,9 +68,7 @@ func TestORM_HeadByHash(t *testing.T) { t.Parallel() db := pgtest.NewSqlxDB(t) - logger := logger.Test(t) - cfg := configtest.NewGeneralConfig(t, nil) - orm := headtracker.NewORM(db, logger, cfg.Database(), cltest.FixtureChainID) + orm := headtracker.NewORM(cltest.FixtureChainID, db) var hash common.Hash for i := 0; i < 10; i++ { @@ -95,9 +89,7 @@ func TestORM_HeadByHash_NotFound(t *testing.T) { t.Parallel() db := pgtest.NewSqlxDB(t) - logger := logger.Test(t) - cfg := configtest.NewGeneralConfig(t, nil) - orm := headtracker.NewORM(db, logger, cfg.Database(), cltest.FixtureChainID) + orm := headtracker.NewORM(cltest.FixtureChainID, db) hash := cltest.Head(123).Hash head, err := orm.HeadByHash(testutils.Context(t), hash) @@ -110,9 +102,7 @@ func TestORM_LatestHeads_NoRows(t *testing.T) { t.Parallel() db := pgtest.NewSqlxDB(t) - logger := logger.Test(t) - cfg := configtest.NewGeneralConfig(t, nil) - orm := headtracker.NewORM(db, logger, cfg.Database(), cltest.FixtureChainID) + orm := headtracker.NewORM(cltest.FixtureChainID, db) heads, err := orm.LatestHeads(testutils.Context(t), 100) diff --git a/core/chains/evm/keystore/eth.go b/core/chains/evm/keystore/eth.go new file mode 100644 index 00000000000..1e2b0c439bc --- /dev/null +++ b/core/chains/evm/keystore/eth.go @@ -0,0 +1,19 @@ +package keystore + +import ( + "context" + "math/big" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" +) + +// Eth is the external interface for EthKeyStore +// +//go:generate mockery --quiet --name Eth --output mocks/ --case=underscore +type Eth interface { + CheckEnabled(ctx context.Context, address common.Address, chainID *big.Int) error + EnabledAddressesForChain(ctx context.Context, chainID *big.Int) (addresses []common.Address, err error) + SignTx(ctx context.Context, fromAddress common.Address, tx *types.Transaction, chainID *big.Int) (*types.Transaction, error) + SubscribeToKeyChanges(ctx context.Context) (ch chan struct{}, unsub func()) +} diff --git a/core/chains/evm/keystore/mocks/eth.go b/core/chains/evm/keystore/mocks/eth.go new file mode 100644 index 00000000000..48bd738fdbe --- /dev/null +++ b/core/chains/evm/keystore/mocks/eth.go @@ -0,0 +1,143 @@ +// Code generated by mockery v2.38.0. DO NOT EDIT. + +package mocks + +import ( + context "context" + big "math/big" + + common "github.com/ethereum/go-ethereum/common" + + mock "github.com/stretchr/testify/mock" + + types "github.com/ethereum/go-ethereum/core/types" +) + +// Eth is an autogenerated mock type for the Eth type +type Eth struct { + mock.Mock +} + +// CheckEnabled provides a mock function with given fields: ctx, address, chainID +func (_m *Eth) CheckEnabled(ctx context.Context, address common.Address, chainID *big.Int) error { + ret := _m.Called(ctx, address, chainID) + + if len(ret) == 0 { + panic("no return value specified for CheckEnabled") + } + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, common.Address, *big.Int) error); ok { + r0 = rf(ctx, address, chainID) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// EnabledAddressesForChain provides a mock function with given fields: ctx, chainID +func (_m *Eth) EnabledAddressesForChain(ctx context.Context, chainID *big.Int) ([]common.Address, error) { + ret := _m.Called(ctx, chainID) + + if len(ret) == 0 { + panic("no return value specified for EnabledAddressesForChain") + } + + var r0 []common.Address + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *big.Int) ([]common.Address, error)); ok { + return rf(ctx, chainID) + } + if rf, ok := ret.Get(0).(func(context.Context, *big.Int) []common.Address); ok { + r0 = rf(ctx, chainID) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]common.Address) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *big.Int) error); ok { + r1 = rf(ctx, chainID) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// SignTx provides a mock function with given fields: ctx, fromAddress, tx, chainID +func (_m *Eth) SignTx(ctx context.Context, fromAddress common.Address, tx *types.Transaction, chainID *big.Int) (*types.Transaction, error) { + ret := _m.Called(ctx, fromAddress, tx, chainID) + + if len(ret) == 0 { + panic("no return value specified for SignTx") + } + + var r0 *types.Transaction + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, common.Address, *types.Transaction, *big.Int) (*types.Transaction, error)); ok { + return rf(ctx, fromAddress, tx, chainID) + } + if rf, ok := ret.Get(0).(func(context.Context, common.Address, *types.Transaction, *big.Int) *types.Transaction); ok { + r0 = rf(ctx, fromAddress, tx, chainID) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*types.Transaction) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, common.Address, *types.Transaction, *big.Int) error); ok { + r1 = rf(ctx, fromAddress, tx, chainID) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// SubscribeToKeyChanges provides a mock function with given fields: ctx +func (_m *Eth) SubscribeToKeyChanges(ctx context.Context) (chan struct{}, func()) { + ret := _m.Called(ctx) + + if len(ret) == 0 { + panic("no return value specified for SubscribeToKeyChanges") + } + + var r0 chan struct{} + var r1 func() + if rf, ok := ret.Get(0).(func(context.Context) (chan struct{}, func())); ok { + return rf(ctx) + } + if rf, ok := ret.Get(0).(func(context.Context) chan struct{}); ok { + r0 = rf(ctx) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(chan struct{}) + } + } + + if rf, ok := ret.Get(1).(func(context.Context) func()); ok { + r1 = rf(ctx) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(func()) + } + } + + return r0, r1 +} + +// NewEth creates a new instance of Eth. 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 NewEth(t interface { + mock.TestingT + Cleanup(func()) +}) *Eth { + mock := &Eth{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/core/chains/evm/log/broadcaster.go b/core/chains/evm/log/broadcaster.go index c4db2a4826c..6a47d823ea6 100644 --- a/core/chains/evm/log/broadcaster.go +++ b/core/chains/evm/log/broadcaster.go @@ -2,6 +2,7 @@ package log import ( "context" + "database/sql" "fmt" "math/big" "sync" @@ -22,7 +23,6 @@ import ( evmtypes "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" evmutils "github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated" - "github.com/smartcontractkit/chainlink/v2/core/null" "github.com/smartcontractkit/chainlink/v2/core/services/pg" ) @@ -69,7 +69,7 @@ type ( BroadcasterInTest interface { Broadcaster - BackfillBlockNumber() null.Int64 + BackfillBlockNumber() sql.NullInt64 TrackedAddressesCount() uint32 // Pause pauses the eventLoop until Resume is called. Pause() @@ -98,7 +98,7 @@ type ( evmChainID big.Int // a block number to start backfill from - backfillBlockNumber null.Int64 + backfillBlockNumber sql.NullInt64 ethSubscriber *ethSubscriber registrations *registrations @@ -327,7 +327,7 @@ func (b *broadcaster) startResubscribeLoop() { if from < 0 { from = 0 } - b.backfillBlockNumber = null.NewInt64(from, true) + b.backfillBlockNumber = sql.NullInt64{Int64: from, Valid: true} } // Remove leftover unconsumed logs, maybe update pending broadcasts, and backfill sooner if necessary. @@ -337,7 +337,8 @@ func (b *broadcaster) startResubscribeLoop() { // No need to worry about r.highestNumConfirmations here because it's // already at minimum this deep due to the latest seen head check above if !b.backfillBlockNumber.Valid || *backfillStart < b.backfillBlockNumber.Int64 { - b.backfillBlockNumber.SetValid(*backfillStart) + b.backfillBlockNumber.Int64 = *backfillStart + b.backfillBlockNumber.Valid = true } } @@ -490,7 +491,8 @@ func (b *broadcaster) onReplayRequest(replayReq replayRequest) { // NOTE: This ignores r.highestNumConfirmations, but it is // generally assumed that this will only be performed rarely and // manually by someone who knows what he is doing - b.backfillBlockNumber.SetValid(replayReq.fromBlock) + b.backfillBlockNumber.Int64 = replayReq.fromBlock + b.backfillBlockNumber.Valid = true if replayReq.forceBroadcast { ctx, cancel := b.chStop.NewCtx() defer cancel() @@ -515,7 +517,8 @@ func (b *broadcaster) invalidatePool() int64 { b.logPool = newLogPool(b.logger) // Note: even if we crash right now, PendingMinBlock is preserved in the database and we will backfill the same. blockNum := int64(min.(Uint64)) - b.backfillBlockNumber.SetValid(blockNum) + b.backfillBlockNumber.Int64 = blockNum + b.backfillBlockNumber.Valid = true return blockNum } return -1 @@ -717,7 +720,7 @@ func (b *broadcaster) TrackedAddressesCount() uint32 { } // test only -func (b *broadcaster) BackfillBlockNumber() null.Int64 { +func (b *broadcaster) BackfillBlockNumber() sql.NullInt64 { return b.backfillBlockNumber } @@ -766,8 +769,8 @@ func (n *NullBroadcaster) Register(listener Listener, opts ListenerOpts) (unsubs // ReplayFromBlock implements the Broadcaster interface. func (n *NullBroadcaster) ReplayFromBlock(number int64, forceBroadcast bool) {} -func (n *NullBroadcaster) BackfillBlockNumber() null.Int64 { - return null.NewInt64(0, false) +func (n *NullBroadcaster) BackfillBlockNumber() sql.NullInt64 { + return sql.NullInt64{Int64: 0, Valid: false} } func (n *NullBroadcaster) TrackedAddressesCount() uint32 { return 0 diff --git a/core/chains/evm/log/eth_subscriber.go b/core/chains/evm/log/eth_subscriber.go index ff20a6e74e8..e5ba202dbf2 100644 --- a/core/chains/evm/log/eth_subscriber.go +++ b/core/chains/evm/log/eth_subscriber.go @@ -2,6 +2,7 @@ package log import ( "context" + "database/sql" "fmt" "math/big" "time" @@ -15,7 +16,6 @@ import ( evmclient "github.com/smartcontractkit/chainlink/v2/core/chains/evm/client" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils" - "github.com/smartcontractkit/chainlink/v2/core/null" ) type ( @@ -39,7 +39,7 @@ func newEthSubscriber(ethClient evmclient.Client, config Config, lggr logger.Log // backfillLogs - fetches earlier logs either from a relatively recent block (latest minus BlockBackfillDepth) or from the given fromBlockOverride // note that the whole operation has no timeout - it relies on BlockBackfillSkip (set outside) to optionally prevent very deep, long backfills // Max runtime is: (10 sec + 1 min * numBlocks/batchSize) * 3 retries -func (sub *ethSubscriber) backfillLogs(fromBlockOverride null.Int64, addresses []common.Address, topics []common.Hash) (chBackfilledLogs chan types.Log, abort bool) { +func (sub *ethSubscriber) backfillLogs(fromBlockOverride sql.NullInt64, addresses []common.Address, topics []common.Hash) (chBackfilledLogs chan types.Log, abort bool) { sub.logger.Infow("backfilling logs", "from", fromBlockOverride, "addresses", addresses) if len(addresses) == 0 { sub.logger.Debug("LogBroadcaster: No addresses to backfill for, returning") diff --git a/core/chains/evm/logpoller/disabled.go b/core/chains/evm/logpoller/disabled.go index 8d92b8d29f6..8287aed22a4 100644 --- a/core/chains/evm/logpoller/disabled.go +++ b/core/chains/evm/logpoller/disabled.go @@ -6,8 +6,6 @@ import ( "github.com/ethereum/go-ethereum/common" pkgerrors "github.com/pkg/errors" - - "github.com/smartcontractkit/chainlink/v2/core/services/pg" ) var ( @@ -33,80 +31,80 @@ func (disabled) Replay(ctx context.Context, fromBlock int64) error { return ErrD func (disabled) ReplayAsync(fromBlock int64) {} -func (disabled) RegisterFilter(filter Filter, qopts ...pg.QOpt) error { return ErrDisabled } +func (disabled) RegisterFilter(ctx context.Context, filter Filter) error { return ErrDisabled } -func (disabled) UnregisterFilter(name string, qopts ...pg.QOpt) error { return ErrDisabled } +func (disabled) UnregisterFilter(ctx context.Context, name string) error { return ErrDisabled } func (disabled) HasFilter(name string) bool { return false } -func (disabled) LatestBlock(qopts ...pg.QOpt) (LogPollerBlock, error) { +func (disabled) LatestBlock(ctx context.Context) (LogPollerBlock, error) { return LogPollerBlock{}, ErrDisabled } -func (disabled) GetBlocksRange(ctx context.Context, numbers []uint64, qopts ...pg.QOpt) ([]LogPollerBlock, error) { +func (disabled) GetBlocksRange(ctx context.Context, numbers []uint64) ([]LogPollerBlock, error) { return nil, ErrDisabled } -func (disabled) Logs(start, end int64, eventSig common.Hash, address common.Address, qopts ...pg.QOpt) ([]Log, error) { +func (disabled) Logs(ctx context.Context, start, end int64, eventSig common.Hash, address common.Address) ([]Log, error) { return nil, ErrDisabled } -func (disabled) LogsWithSigs(start, end int64, eventSigs []common.Hash, address common.Address, qopts ...pg.QOpt) ([]Log, error) { +func (disabled) LogsWithSigs(ctx context.Context, start, end int64, eventSigs []common.Hash, address common.Address) ([]Log, error) { return nil, ErrDisabled } -func (disabled) LatestLogByEventSigWithConfs(eventSig common.Hash, address common.Address, confs Confirmations, qopts ...pg.QOpt) (*Log, error) { +func (disabled) LatestLogByEventSigWithConfs(ctx context.Context, eventSig common.Hash, address common.Address, confs Confirmations) (*Log, error) { return nil, ErrDisabled } -func (disabled) LatestLogEventSigsAddrsWithConfs(fromBlock int64, eventSigs []common.Hash, addresses []common.Address, confs Confirmations, qopts ...pg.QOpt) ([]Log, error) { +func (disabled) LatestLogEventSigsAddrsWithConfs(ctx context.Context, fromBlock int64, eventSigs []common.Hash, addresses []common.Address, confs Confirmations) ([]Log, error) { return nil, ErrDisabled } -func (disabled) IndexedLogs(eventSig common.Hash, address common.Address, topicIndex int, topicValues []common.Hash, confs Confirmations, qopts ...pg.QOpt) ([]Log, error) { +func (disabled) IndexedLogs(ctx context.Context, eventSig common.Hash, address common.Address, topicIndex int, topicValues []common.Hash, confs Confirmations) ([]Log, error) { return nil, ErrDisabled } -func (disabled) IndexedLogsByBlockRange(start, end int64, eventSig common.Hash, address common.Address, topicIndex int, topicValues []common.Hash, qopts ...pg.QOpt) ([]Log, error) { +func (disabled) IndexedLogsByBlockRange(ctx context.Context, start, end int64, eventSig common.Hash, address common.Address, topicIndex int, topicValues []common.Hash) ([]Log, error) { return nil, ErrDisabled } -func (d disabled) IndexedLogsByTxHash(eventSig common.Hash, address common.Address, txHash common.Hash, qopts ...pg.QOpt) ([]Log, error) { +func (d disabled) IndexedLogsByTxHash(ctx context.Context, eventSig common.Hash, address common.Address, txHash common.Hash) ([]Log, error) { return nil, ErrDisabled } -func (disabled) IndexedLogsTopicGreaterThan(eventSig common.Hash, address common.Address, topicIndex int, topicValueMin common.Hash, confs Confirmations, qopts ...pg.QOpt) ([]Log, error) { +func (disabled) IndexedLogsTopicGreaterThan(ctx context.Context, eventSig common.Hash, address common.Address, topicIndex int, topicValueMin common.Hash, confs Confirmations) ([]Log, error) { return nil, ErrDisabled } -func (disabled) IndexedLogsTopicRange(eventSig common.Hash, address common.Address, topicIndex int, topicValueMin common.Hash, topicValueMax common.Hash, confs Confirmations, qopts ...pg.QOpt) ([]Log, error) { +func (disabled) IndexedLogsTopicRange(ctx context.Context, eventSig common.Hash, address common.Address, topicIndex int, topicValueMin common.Hash, topicValueMax common.Hash, confs Confirmations) ([]Log, error) { return nil, ErrDisabled } -func (disabled) LogsDataWordRange(eventSig common.Hash, address common.Address, wordIndex int, wordValueMin, wordValueMax common.Hash, confs Confirmations, qopts ...pg.QOpt) ([]Log, error) { +func (disabled) LogsDataWordRange(ctx context.Context, eventSig common.Hash, address common.Address, wordIndex int, wordValueMin, wordValueMax common.Hash, confs Confirmations) ([]Log, error) { return nil, ErrDisabled } -func (disabled) LogsDataWordGreaterThan(eventSig common.Hash, address common.Address, wordIndex int, wordValueMin common.Hash, confs Confirmations, qopts ...pg.QOpt) ([]Log, error) { +func (disabled) LogsDataWordGreaterThan(ctx context.Context, eventSig common.Hash, address common.Address, wordIndex int, wordValueMin common.Hash, confs Confirmations) ([]Log, error) { return nil, ErrDisabled } -func (d disabled) IndexedLogsWithSigsExcluding(address common.Address, eventSigA, eventSigB common.Hash, topicIndex int, fromBlock, toBlock int64, confs Confirmations, qopts ...pg.QOpt) ([]Log, error) { +func (d disabled) IndexedLogsWithSigsExcluding(ctx context.Context, address common.Address, eventSigA, eventSigB common.Hash, topicIndex int, fromBlock, toBlock int64, confs Confirmations) ([]Log, error) { return nil, ErrDisabled } -func (d disabled) LogsCreatedAfter(eventSig common.Hash, address common.Address, time time.Time, confs Confirmations, qopts ...pg.QOpt) ([]Log, error) { +func (d disabled) LogsCreatedAfter(ctx context.Context, eventSig common.Hash, address common.Address, time time.Time, confs Confirmations) ([]Log, error) { return nil, ErrDisabled } -func (d disabled) IndexedLogsCreatedAfter(eventSig common.Hash, address common.Address, topicIndex int, topicValues []common.Hash, after time.Time, confs Confirmations, qopts ...pg.QOpt) ([]Log, error) { +func (d disabled) IndexedLogsCreatedAfter(ctx context.Context, eventSig common.Hash, address common.Address, topicIndex int, topicValues []common.Hash, after time.Time, confs Confirmations) ([]Log, error) { return nil, ErrDisabled } -func (d disabled) LatestBlockByEventSigsAddrsWithConfs(fromBlock int64, eventSigs []common.Hash, addresses []common.Address, confs Confirmations, qopts ...pg.QOpt) (int64, error) { +func (d disabled) LatestBlockByEventSigsAddrsWithConfs(ctx context.Context, fromBlock int64, eventSigs []common.Hash, addresses []common.Address, confs Confirmations) (int64, error) { return 0, ErrDisabled } -func (d disabled) LogsDataWordBetween(eventSig common.Hash, address common.Address, wordIndexMin, wordIndexMax int, wordValue common.Hash, confs Confirmations, qopts ...pg.QOpt) ([]Log, error) { +func (d disabled) LogsDataWordBetween(ctx context.Context, eventSig common.Hash, address common.Address, wordIndexMin, wordIndexMax int, wordValue common.Hash, confs Confirmations) ([]Log, error) { return nil, ErrDisabled } diff --git a/core/chains/evm/logpoller/helper_test.go b/core/chains/evm/logpoller/helper_test.go index a2a470741f6..3b2a10df6c8 100644 --- a/core/chains/evm/logpoller/helper_test.go +++ b/core/chains/evm/logpoller/helper_test.go @@ -8,6 +8,8 @@ import ( "testing" "time" + pkgerrors "github.com/pkg/errors" + "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/accounts/abi/bind/backends" @@ -15,7 +17,6 @@ import ( "github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/core/rawdb" "github.com/ethereum/go-ethereum/ethdb" - pkgerrors "github.com/pkg/errors" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -26,7 +27,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/log_emitter" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest" - "github.com/smartcontractkit/chainlink/v2/core/services/pg" ) var ( @@ -37,7 +37,7 @@ type TestHarness struct { Lggr logger.Logger // Chain2/ORM2 is just a dummy second chain, doesn't have a client. ChainID, ChainID2 *big.Int - ORM, ORM2 *logpoller.DbORM + ORM, ORM2 logpoller.ORM LogPoller logpoller.LogPollerTest Client *backends.SimulatedBackend Owner *bind.TransactOpts @@ -52,8 +52,8 @@ func SetupTH(t testing.TB, opts logpoller.Opts) TestHarness { chainID2 := testutils.NewRandomEVMChainID() db := pgtest.NewSqlxDB(t) - o := logpoller.NewORM(chainID, db, lggr, pgtest.NewQConfig(true)) - o2 := logpoller.NewORM(chainID2, db, lggr, pgtest.NewQConfig(true)) + o := logpoller.NewORM(chainID, db, lggr) + o2 := logpoller.NewORM(chainID2, db, lggr) owner := testutils.MustNewSimTransactor(t) ethDB := rawdb.NewMemoryDatabase() ec := backends.NewSimulatedBackendWithDatabase(ethDB, map[common.Address]core.GenesisAccount{ @@ -96,20 +96,20 @@ func SetupTH(t testing.TB, opts logpoller.Opts) TestHarness { func (th *TestHarness) PollAndSaveLogs(ctx context.Context, currentBlockNumber int64) int64 { th.LogPoller.PollAndSaveLogs(ctx, currentBlockNumber) - latest, _ := th.LogPoller.LatestBlock(pg.WithParentCtx(ctx)) + latest, _ := th.LogPoller.LatestBlock(ctx) return latest.BlockNumber + 1 } func (th *TestHarness) assertDontHave(t *testing.T, start, end int) { for i := start; i < end; i++ { - _, err := th.ORM.SelectBlockByNumber(int64(i)) + _, err := th.ORM.SelectBlockByNumber(testutils.Context(t), int64(i)) assert.True(t, pkgerrors.Is(err, sql.ErrNoRows)) } } func (th *TestHarness) assertHaveCanonical(t *testing.T, start, end int) { for i := start; i < end; i++ { - blk, err := th.ORM.SelectBlockByNumber(int64(i)) + blk, err := th.ORM.SelectBlockByNumber(testutils.Context(t), int64(i)) require.NoError(t, err, "block %v", i) chainBlk, err := th.Client.BlockByNumber(testutils.Context(t), big.NewInt(int64(i))) require.NoError(t, err) diff --git a/core/chains/evm/logpoller/log_poller.go b/core/chains/evm/logpoller/log_poller.go index 444d0153542..f4a235b3c70 100644 --- a/core/chains/evm/logpoller/log_poller.go +++ b/core/chains/evm/logpoller/log_poller.go @@ -28,7 +28,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/chains/evm/client" evmtypes "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" ubig "github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils/big" - "github.com/smartcontractkit/chainlink/v2/core/services/pg" ) //go:generate mockery --quiet --name LogPoller --output ./mocks/ --case=underscore --structname LogPoller --filename log_poller.go @@ -36,31 +35,31 @@ type LogPoller interface { services.Service Replay(ctx context.Context, fromBlock int64) error ReplayAsync(fromBlock int64) - RegisterFilter(filter Filter, qopts ...pg.QOpt) error - UnregisterFilter(name string, qopts ...pg.QOpt) error + RegisterFilter(ctx context.Context, filter Filter) error + UnregisterFilter(ctx context.Context, name string) error HasFilter(name string) bool - LatestBlock(qopts ...pg.QOpt) (LogPollerBlock, error) - GetBlocksRange(ctx context.Context, numbers []uint64, qopts ...pg.QOpt) ([]LogPollerBlock, error) + LatestBlock(ctx context.Context) (LogPollerBlock, error) + GetBlocksRange(ctx context.Context, numbers []uint64) ([]LogPollerBlock, error) // General querying - Logs(start, end int64, eventSig common.Hash, address common.Address, qopts ...pg.QOpt) ([]Log, error) - LogsWithSigs(start, end int64, eventSigs []common.Hash, address common.Address, qopts ...pg.QOpt) ([]Log, error) - LogsCreatedAfter(eventSig common.Hash, address common.Address, time time.Time, confs Confirmations, qopts ...pg.QOpt) ([]Log, error) - LatestLogByEventSigWithConfs(eventSig common.Hash, address common.Address, confs Confirmations, qopts ...pg.QOpt) (*Log, error) - LatestLogEventSigsAddrsWithConfs(fromBlock int64, eventSigs []common.Hash, addresses []common.Address, confs Confirmations, qopts ...pg.QOpt) ([]Log, error) - LatestBlockByEventSigsAddrsWithConfs(fromBlock int64, eventSigs []common.Hash, addresses []common.Address, confs Confirmations, qopts ...pg.QOpt) (int64, error) + Logs(ctx context.Context, start, end int64, eventSig common.Hash, address common.Address) ([]Log, error) + LogsWithSigs(ctx context.Context, start, end int64, eventSigs []common.Hash, address common.Address) ([]Log, error) + LogsCreatedAfter(ctx context.Context, eventSig common.Hash, address common.Address, time time.Time, confs Confirmations) ([]Log, error) + LatestLogByEventSigWithConfs(ctx context.Context, eventSig common.Hash, address common.Address, confs Confirmations) (*Log, error) + LatestLogEventSigsAddrsWithConfs(ctx context.Context, fromBlock int64, eventSigs []common.Hash, addresses []common.Address, confs Confirmations) ([]Log, error) + LatestBlockByEventSigsAddrsWithConfs(ctx context.Context, fromBlock int64, eventSigs []common.Hash, addresses []common.Address, confs Confirmations) (int64, error) // Content based querying - IndexedLogs(eventSig common.Hash, address common.Address, topicIndex int, topicValues []common.Hash, confs Confirmations, qopts ...pg.QOpt) ([]Log, error) - IndexedLogsByBlockRange(start, end int64, eventSig common.Hash, address common.Address, topicIndex int, topicValues []common.Hash, qopts ...pg.QOpt) ([]Log, error) - IndexedLogsCreatedAfter(eventSig common.Hash, address common.Address, topicIndex int, topicValues []common.Hash, after time.Time, confs Confirmations, qopts ...pg.QOpt) ([]Log, error) - IndexedLogsByTxHash(eventSig common.Hash, address common.Address, txHash common.Hash, qopts ...pg.QOpt) ([]Log, error) - IndexedLogsTopicGreaterThan(eventSig common.Hash, address common.Address, topicIndex int, topicValueMin common.Hash, confs Confirmations, qopts ...pg.QOpt) ([]Log, error) - IndexedLogsTopicRange(eventSig common.Hash, address common.Address, topicIndex int, topicValueMin common.Hash, topicValueMax common.Hash, confs Confirmations, qopts ...pg.QOpt) ([]Log, error) - IndexedLogsWithSigsExcluding(address common.Address, eventSigA, eventSigB common.Hash, topicIndex int, fromBlock, toBlock int64, confs Confirmations, qopts ...pg.QOpt) ([]Log, error) - LogsDataWordRange(eventSig common.Hash, address common.Address, wordIndex int, wordValueMin, wordValueMax common.Hash, confs Confirmations, qopts ...pg.QOpt) ([]Log, error) - LogsDataWordGreaterThan(eventSig common.Hash, address common.Address, wordIndex int, wordValueMin common.Hash, confs Confirmations, qopts ...pg.QOpt) ([]Log, error) - LogsDataWordBetween(eventSig common.Hash, address common.Address, wordIndexMin, wordIndexMax int, wordValue common.Hash, confs Confirmations, qopts ...pg.QOpt) ([]Log, error) + IndexedLogs(ctx context.Context, eventSig common.Hash, address common.Address, topicIndex int, topicValues []common.Hash, confs Confirmations) ([]Log, error) + IndexedLogsByBlockRange(ctx context.Context, start, end int64, eventSig common.Hash, address common.Address, topicIndex int, topicValues []common.Hash) ([]Log, error) + IndexedLogsCreatedAfter(ctx context.Context, eventSig common.Hash, address common.Address, topicIndex int, topicValues []common.Hash, after time.Time, confs Confirmations) ([]Log, error) + IndexedLogsByTxHash(ctx context.Context, eventSig common.Hash, address common.Address, txHash common.Hash) ([]Log, error) + IndexedLogsTopicGreaterThan(ctx context.Context, eventSig common.Hash, address common.Address, topicIndex int, topicValueMin common.Hash, confs Confirmations) ([]Log, error) + IndexedLogsTopicRange(ctx context.Context, eventSig common.Hash, address common.Address, topicIndex int, topicValueMin common.Hash, topicValueMax common.Hash, confs Confirmations) ([]Log, error) + IndexedLogsWithSigsExcluding(ctx context.Context, address common.Address, eventSigA, eventSigB common.Hash, topicIndex int, fromBlock, toBlock int64, confs Confirmations) ([]Log, error) + LogsDataWordRange(ctx context.Context, eventSig common.Hash, address common.Address, wordIndex int, wordValueMin, wordValueMax common.Hash, confs Confirmations) ([]Log, error) + LogsDataWordGreaterThan(ctx context.Context, eventSig common.Hash, address common.Address, wordIndex int, wordValueMin common.Hash, confs Confirmations) ([]Log, error) + LogsDataWordBetween(ctx context.Context, eventSig common.Hash, address common.Address, wordIndexMin, wordIndexMax int, wordValue common.Hash, confs Confirmations) ([]Log, error) } type Confirmations int @@ -237,7 +236,7 @@ func (filter *Filter) Contains(other *Filter) bool { // which means that anonymous events are not supported and log.Topics >= 1 always (log.Topics[0] is the event signature). // The filter may be unregistered later by Filter.Name // Warnings/debug information is keyed by filter name. -func (lp *logPoller) RegisterFilter(filter Filter, qopts ...pg.QOpt) error { +func (lp *logPoller) RegisterFilter(ctx context.Context, filter Filter) error { if len(filter.Addresses) == 0 { return pkgerrors.Errorf("at least one address must be specified") } @@ -268,7 +267,7 @@ func (lp *logPoller) RegisterFilter(filter Filter, qopts ...pg.QOpt) error { lp.lggr.Warnw("Updating existing filter with more events or addresses", "name", filter.Name, "filter", filter) } - if err := lp.orm.InsertFilter(filter, qopts...); err != nil { + if err := lp.orm.InsertFilter(ctx, filter); err != nil { return pkgerrors.Wrap(err, "error inserting filter") } lp.filters[filter.Name] = filter @@ -279,7 +278,7 @@ func (lp *logPoller) RegisterFilter(filter Filter, qopts ...pg.QOpt) error { // UnregisterFilter will remove the filter with the given name. // If the name does not exist, it will log an error but not return an error. // Warnings/debug information is keyed by filter name. -func (lp *logPoller) UnregisterFilter(name string, qopts ...pg.QOpt) error { +func (lp *logPoller) UnregisterFilter(ctx context.Context, name string) error { lp.filterMu.Lock() defer lp.filterMu.Unlock() @@ -289,7 +288,7 @@ func (lp *logPoller) UnregisterFilter(name string, qopts ...pg.QOpt) error { return nil } - if err := lp.orm.DeleteFilter(name, qopts...); err != nil { + if err := lp.orm.DeleteFilter(ctx, name); err != nil { return pkgerrors.Wrap(err, "error deleting filter") } delete(lp.filters, name) @@ -434,7 +433,7 @@ func (lp *logPoller) HealthReport() map[string]error { } func (lp *logPoller) GetReplayFromBlock(ctx context.Context, requested int64) (int64, error) { - lastProcessed, err := lp.orm.SelectLatestBlock(pg.WithParentCtx(ctx)) + lastProcessed, err := lp.orm.SelectLatestBlock(ctx) if err != nil { if !pkgerrors.Is(err, sql.ErrNoRows) { // Real DB error @@ -452,7 +451,7 @@ func (lp *logPoller) GetReplayFromBlock(ctx context.Context, requested int64) (i func (lp *logPoller) loadFilters() error { lp.filterMu.Lock() defer lp.filterMu.Unlock() - filters, err := lp.orm.LoadFilters(pg.WithParentCtx(lp.ctx)) + filters, err := lp.orm.LoadFilters(lp.ctx) if err != nil { return pkgerrors.Wrapf(err, "Failed to load initial filters from db, retrying") @@ -488,7 +487,7 @@ func (lp *logPoller) run() { // Always start from the latest block in the db. var start int64 - lastProcessed, err := lp.orm.SelectLatestBlock(pg.WithParentCtx(lp.ctx)) + lastProcessed, err := lp.orm.SelectLatestBlock(lp.ctx) if err != nil { if !pkgerrors.Is(err, sql.ErrNoRows) { // Assume transient db reading issue, retry forever. @@ -602,7 +601,7 @@ func (lp *logPoller) handleReplayRequest(fromBlockReq int64, filtersLoaded bool) func (lp *logPoller) BackupPollAndSaveLogs(ctx context.Context) { if lp.backupPollerNextBlock == 0 { - lastProcessed, err := lp.orm.SelectLatestBlock(pg.WithParentCtx(ctx)) + lastProcessed, err := lp.orm.SelectLatestBlock(ctx) if err != nil { if pkgerrors.Is(err, sql.ErrNoRows) { lp.lggr.Warnw("Backup log poller ran before first successful log poller run, skipping") @@ -688,7 +687,6 @@ func (lp *logPoller) blocksFromLogs(ctx context.Context, logs []types.Log) (bloc for _, log := range logs { numbers = append(numbers, log.BlockNumber) } - return lp.GetBlocksRange(ctx, numbers) } @@ -729,7 +727,7 @@ func (lp *logPoller) backfill(ctx context.Context, start, end int64) error { } lp.lggr.Debugw("Backfill found logs", "from", from, "to", to, "logs", len(gethLogs), "blocks", blocks) - err = lp.orm.InsertLogsWithBlock(convertLogs(gethLogs, blocks, lp.lggr, lp.ec.ConfiguredChainID()), blocks[len(blocks)-1], pg.WithParentCtx(ctx)) + err = lp.orm.InsertLogsWithBlock(ctx, convertLogs(gethLogs, blocks, lp.lggr, lp.ec.ConfiguredChainID()), blocks[len(blocks)-1]) if err != nil { lp.lggr.Warnw("Unable to insert logs, retrying", "err", err, "from", from, "to", to) return err @@ -767,7 +765,7 @@ func (lp *logPoller) getCurrentBlockMaybeHandleReorg(ctx context.Context, curren } // Does this currentBlock point to the same parent that we have saved? // If not, there was a reorg, so we need to rewind. - expectedParent, err1 := lp.orm.SelectBlockByNumber(currentBlockNumber-1, pg.WithParentCtx(ctx)) + expectedParent, err1 := lp.orm.SelectBlockByNumber(ctx, currentBlockNumber-1) if err1 != nil && !pkgerrors.Is(err1, sql.ErrNoRows) { // If err is not a 'no rows' error, assume transient db issue and retry lp.lggr.Warnw("Unable to read latestBlockNumber currentBlock saved", "err", err1, "currentBlockNumber", currentBlockNumber) @@ -798,7 +796,7 @@ func (lp *logPoller) getCurrentBlockMaybeHandleReorg(ctx context.Context, curren // the canonical set per read. Typically, if an application took action on a log // it would be saved elsewhere e.g. evm.txes, so it seems better to just support the fast reads. // Its also nicely analogous to reading from the chain itself. - err2 = lp.orm.DeleteLogsAndBlocksAfter(blockAfterLCA.Number, pg.WithParentCtx(ctx)) + err2 = lp.orm.DeleteLogsAndBlocksAfter(ctx, blockAfterLCA.Number) if err2 != nil { // If we error on db commit, we can't know if the tx went through or not. // We return an error here which will cause us to restart polling from lastBlockSaved + 1 @@ -885,6 +883,7 @@ func (lp *logPoller) PollAndSaveLogs(ctx context.Context, currentBlockNumber int lp.lggr.Debugw("Unfinalized log query", "logs", len(logs), "currentBlockNumber", currentBlockNumber, "blockHash", currentBlock.Hash, "timestamp", currentBlock.Timestamp.Unix()) block := NewLogPollerBlock(h, currentBlockNumber, currentBlock.Timestamp, latestFinalizedBlockNumber) err = lp.orm.InsertLogsWithBlock( + ctx, convertLogs(logs, []LogPollerBlock{block}, lp.lggr, lp.ec.ConfiguredChainID()), block, ) @@ -953,7 +952,7 @@ func (lp *logPoller) findBlockAfterLCA(ctx context.Context, current *evmtypes.He // If the parent block number becomes < the first finalized block our reorg is too deep. // This can happen only if finalityTag is not enabled and fixed finalityDepth is provided via config. for parent.Number >= latestFinalizedBlockNumber { - ourParentBlockHash, err := lp.orm.SelectBlockByNumber(parent.Number, pg.WithParentCtx(ctx)) + ourParentBlockHash, err := lp.orm.SelectBlockByNumber(ctx, parent.Number) if err != nil { return nil, err } @@ -977,7 +976,7 @@ func (lp *logPoller) findBlockAfterLCA(ctx context.Context, current *evmtypes.He // PruneOldBlocks removes blocks that are > lp.keepFinalizedBlocksDepth behind the latest finalized block. // Returns whether all blocks eligible for pruning were removed. If logPrunePageSize is set to 0, it will always return true. func (lp *logPoller) PruneOldBlocks(ctx context.Context) (bool, error) { - latestBlock, err := lp.orm.SelectLatestBlock(pg.WithParentCtx(ctx)) + latestBlock, err := lp.orm.SelectLatestBlock(ctx) if err != nil { return false, err } @@ -992,9 +991,9 @@ func (lp *logPoller) PruneOldBlocks(ctx context.Context) (bool, error) { // 1-2-3-4-5(finalized)-6-7(latest), keepFinalizedBlocksDepth=3 // Remove <= 2 rowsRemoved, err := lp.orm.DeleteBlocksBefore( + ctx, latestBlock.FinalizedBlockNumber-lp.keepFinalizedBlocksDepth, lp.logPrunePageSize, - pg.WithParentCtx(ctx), ) return lp.logPrunePageSize == 0 || rowsRemoved < lp.logPrunePageSize, err } @@ -1002,66 +1001,66 @@ func (lp *logPoller) PruneOldBlocks(ctx context.Context) (bool, error) { // PruneExpiredLogs logs that are older than their retention period defined in Filter. // Returns whether all logs eligible for pruning were removed. If logPrunePageSize is set to 0, it will always return true. func (lp *logPoller) PruneExpiredLogs(ctx context.Context) (bool, error) { - rowsRemoved, err := lp.orm.DeleteExpiredLogs(lp.logPrunePageSize, pg.WithParentCtx(ctx)) + rowsRemoved, err := lp.orm.DeleteExpiredLogs(ctx, lp.logPrunePageSize) return lp.logPrunePageSize == 0 || rowsRemoved < lp.logPrunePageSize, err } // Logs returns logs matching topics and address (exactly) in the given block range, // which are canonical at time of query. -func (lp *logPoller) Logs(start, end int64, eventSig common.Hash, address common.Address, qopts ...pg.QOpt) ([]Log, error) { - return lp.orm.SelectLogs(start, end, address, eventSig, qopts...) +func (lp *logPoller) Logs(ctx context.Context, start, end int64, eventSig common.Hash, address common.Address) ([]Log, error) { + return lp.orm.SelectLogs(ctx, start, end, address, eventSig) } -func (lp *logPoller) LogsWithSigs(start, end int64, eventSigs []common.Hash, address common.Address, qopts ...pg.QOpt) ([]Log, error) { - return lp.orm.SelectLogsWithSigs(start, end, address, eventSigs, qopts...) +func (lp *logPoller) LogsWithSigs(ctx context.Context, start, end int64, eventSigs []common.Hash, address common.Address) ([]Log, error) { + return lp.orm.SelectLogsWithSigs(ctx, start, end, address, eventSigs) } -func (lp *logPoller) LogsCreatedAfter(eventSig common.Hash, address common.Address, after time.Time, confs Confirmations, qopts ...pg.QOpt) ([]Log, error) { - return lp.orm.SelectLogsCreatedAfter(address, eventSig, after, confs, qopts...) +func (lp *logPoller) LogsCreatedAfter(ctx context.Context, eventSig common.Hash, address common.Address, after time.Time, confs Confirmations) ([]Log, error) { + return lp.orm.SelectLogsCreatedAfter(ctx, address, eventSig, after, confs) } // IndexedLogs finds all the logs that have a topic value in topicValues at index topicIndex. -func (lp *logPoller) IndexedLogs(eventSig common.Hash, address common.Address, topicIndex int, topicValues []common.Hash, confs Confirmations, qopts ...pg.QOpt) ([]Log, error) { - return lp.orm.SelectIndexedLogs(address, eventSig, topicIndex, topicValues, confs, qopts...) +func (lp *logPoller) IndexedLogs(ctx context.Context, eventSig common.Hash, address common.Address, topicIndex int, topicValues []common.Hash, confs Confirmations) ([]Log, error) { + return lp.orm.SelectIndexedLogs(ctx, address, eventSig, topicIndex, topicValues, confs) } // IndexedLogsByBlockRange finds all the logs that have a topic value in topicValues at index topicIndex within the block range -func (lp *logPoller) IndexedLogsByBlockRange(start, end int64, eventSig common.Hash, address common.Address, topicIndex int, topicValues []common.Hash, qopts ...pg.QOpt) ([]Log, error) { - return lp.orm.SelectIndexedLogsByBlockRange(start, end, address, eventSig, topicIndex, topicValues, qopts...) +func (lp *logPoller) IndexedLogsByBlockRange(ctx context.Context, start, end int64, eventSig common.Hash, address common.Address, topicIndex int, topicValues []common.Hash) ([]Log, error) { + return lp.orm.SelectIndexedLogsByBlockRange(ctx, start, end, address, eventSig, topicIndex, topicValues) } -func (lp *logPoller) IndexedLogsCreatedAfter(eventSig common.Hash, address common.Address, topicIndex int, topicValues []common.Hash, after time.Time, confs Confirmations, qopts ...pg.QOpt) ([]Log, error) { - return lp.orm.SelectIndexedLogsCreatedAfter(address, eventSig, topicIndex, topicValues, after, confs, qopts...) +func (lp *logPoller) IndexedLogsCreatedAfter(ctx context.Context, eventSig common.Hash, address common.Address, topicIndex int, topicValues []common.Hash, after time.Time, confs Confirmations) ([]Log, error) { + return lp.orm.SelectIndexedLogsCreatedAfter(ctx, address, eventSig, topicIndex, topicValues, after, confs) } -func (lp *logPoller) IndexedLogsByTxHash(eventSig common.Hash, address common.Address, txHash common.Hash, qopts ...pg.QOpt) ([]Log, error) { - return lp.orm.SelectIndexedLogsByTxHash(address, eventSig, txHash, qopts...) +func (lp *logPoller) IndexedLogsByTxHash(ctx context.Context, eventSig common.Hash, address common.Address, txHash common.Hash) ([]Log, error) { + return lp.orm.SelectIndexedLogsByTxHash(ctx, address, eventSig, txHash) } // LogsDataWordGreaterThan note index is 0 based. -func (lp *logPoller) LogsDataWordGreaterThan(eventSig common.Hash, address common.Address, wordIndex int, wordValueMin common.Hash, confs Confirmations, qopts ...pg.QOpt) ([]Log, error) { - return lp.orm.SelectLogsDataWordGreaterThan(address, eventSig, wordIndex, wordValueMin, confs, qopts...) +func (lp *logPoller) LogsDataWordGreaterThan(ctx context.Context, eventSig common.Hash, address common.Address, wordIndex int, wordValueMin common.Hash, confs Confirmations) ([]Log, error) { + return lp.orm.SelectLogsDataWordGreaterThan(ctx, address, eventSig, wordIndex, wordValueMin, confs) } // LogsDataWordRange note index is 0 based. -func (lp *logPoller) LogsDataWordRange(eventSig common.Hash, address common.Address, wordIndex int, wordValueMin, wordValueMax common.Hash, confs Confirmations, qopts ...pg.QOpt) ([]Log, error) { - return lp.orm.SelectLogsDataWordRange(address, eventSig, wordIndex, wordValueMin, wordValueMax, confs, qopts...) +func (lp *logPoller) LogsDataWordRange(ctx context.Context, eventSig common.Hash, address common.Address, wordIndex int, wordValueMin, wordValueMax common.Hash, confs Confirmations) ([]Log, error) { + return lp.orm.SelectLogsDataWordRange(ctx, address, eventSig, wordIndex, wordValueMin, wordValueMax, confs) } // IndexedLogsTopicGreaterThan finds all the logs that have a topic value greater than topicValueMin at index topicIndex. // Only works for integer topics. -func (lp *logPoller) IndexedLogsTopicGreaterThan(eventSig common.Hash, address common.Address, topicIndex int, topicValueMin common.Hash, confs Confirmations, qopts ...pg.QOpt) ([]Log, error) { - return lp.orm.SelectIndexedLogsTopicGreaterThan(address, eventSig, topicIndex, topicValueMin, confs, qopts...) +func (lp *logPoller) IndexedLogsTopicGreaterThan(ctx context.Context, eventSig common.Hash, address common.Address, topicIndex int, topicValueMin common.Hash, confs Confirmations) ([]Log, error) { + return lp.orm.SelectIndexedLogsTopicGreaterThan(ctx, address, eventSig, topicIndex, topicValueMin, confs) } -func (lp *logPoller) IndexedLogsTopicRange(eventSig common.Hash, address common.Address, topicIndex int, topicValueMin common.Hash, topicValueMax common.Hash, confs Confirmations, qopts ...pg.QOpt) ([]Log, error) { - return lp.orm.SelectIndexedLogsTopicRange(address, eventSig, topicIndex, topicValueMin, topicValueMax, confs, qopts...) +func (lp *logPoller) IndexedLogsTopicRange(ctx context.Context, eventSig common.Hash, address common.Address, topicIndex int, topicValueMin common.Hash, topicValueMax common.Hash, confs Confirmations) ([]Log, error) { + return lp.orm.SelectIndexedLogsTopicRange(ctx, address, eventSig, topicIndex, topicValueMin, topicValueMax, confs) } // LatestBlock returns the latest block the log poller is on. It tracks blocks to be able // to detect reorgs. -func (lp *logPoller) LatestBlock(qopts ...pg.QOpt) (LogPollerBlock, error) { - b, err := lp.orm.SelectLatestBlock(qopts...) +func (lp *logPoller) LatestBlock(ctx context.Context) (LogPollerBlock, error) { + b, err := lp.orm.SelectLatestBlock(ctx) if err != nil { return LogPollerBlock{}, err } @@ -1069,21 +1068,21 @@ func (lp *logPoller) LatestBlock(qopts ...pg.QOpt) (LogPollerBlock, error) { return *b, nil } -func (lp *logPoller) BlockByNumber(n int64, qopts ...pg.QOpt) (*LogPollerBlock, error) { - return lp.orm.SelectBlockByNumber(n, qopts...) +func (lp *logPoller) BlockByNumber(ctx context.Context, n int64) (*LogPollerBlock, error) { + return lp.orm.SelectBlockByNumber(ctx, n) } // LatestLogByEventSigWithConfs finds the latest log that has confs number of blocks on top of the log. -func (lp *logPoller) LatestLogByEventSigWithConfs(eventSig common.Hash, address common.Address, confs Confirmations, qopts ...pg.QOpt) (*Log, error) { - return lp.orm.SelectLatestLogByEventSigWithConfs(eventSig, address, confs, qopts...) +func (lp *logPoller) LatestLogByEventSigWithConfs(ctx context.Context, eventSig common.Hash, address common.Address, confs Confirmations) (*Log, error) { + return lp.orm.SelectLatestLogByEventSigWithConfs(ctx, eventSig, address, confs) } -func (lp *logPoller) LatestLogEventSigsAddrsWithConfs(fromBlock int64, eventSigs []common.Hash, addresses []common.Address, confs Confirmations, qopts ...pg.QOpt) ([]Log, error) { - return lp.orm.SelectLatestLogEventSigsAddrsWithConfs(fromBlock, addresses, eventSigs, confs, qopts...) +func (lp *logPoller) LatestLogEventSigsAddrsWithConfs(ctx context.Context, fromBlock int64, eventSigs []common.Hash, addresses []common.Address, confs Confirmations) ([]Log, error) { + return lp.orm.SelectLatestLogEventSigsAddrsWithConfs(ctx, fromBlock, addresses, eventSigs, confs) } -func (lp *logPoller) LatestBlockByEventSigsAddrsWithConfs(fromBlock int64, eventSigs []common.Hash, addresses []common.Address, confs Confirmations, qopts ...pg.QOpt) (int64, error) { - return lp.orm.SelectLatestBlockByEventSigsAddrsWithConfs(fromBlock, eventSigs, addresses, confs, qopts...) +func (lp *logPoller) LatestBlockByEventSigsAddrsWithConfs(ctx context.Context, fromBlock int64, eventSigs []common.Hash, addresses []common.Address, confs Confirmations) (int64, error) { + return lp.orm.SelectLatestBlockByEventSigsAddrsWithConfs(ctx, fromBlock, eventSigs, addresses, confs) } // LogsDataWordBetween retrieves a slice of Log records that match specific criteria. @@ -1095,13 +1094,13 @@ func (lp *logPoller) LatestBlockByEventSigsAddrsWithConfs(fromBlock int64, event // // This function is particularly useful for filtering logs by data word values and their positions within the event data. // It returns an empty slice if no logs match the provided criteria. -func (lp *logPoller) LogsDataWordBetween(eventSig common.Hash, address common.Address, wordIndexMin, wordIndexMax int, wordValue common.Hash, confs Confirmations, qopts ...pg.QOpt) ([]Log, error) { - return lp.orm.SelectLogsDataWordBetween(address, eventSig, wordIndexMin, wordIndexMax, wordValue, confs, qopts...) +func (lp *logPoller) LogsDataWordBetween(ctx context.Context, eventSig common.Hash, address common.Address, wordIndexMin, wordIndexMax int, wordValue common.Hash, confs Confirmations) ([]Log, error) { + return lp.orm.SelectLogsDataWordBetween(ctx, address, eventSig, wordIndexMin, wordIndexMax, wordValue, confs) } // GetBlocksRange tries to get the specified block numbers from the log pollers // blocks table. It falls back to the RPC for any unfulfilled requested blocks. -func (lp *logPoller) GetBlocksRange(ctx context.Context, numbers []uint64, qopts ...pg.QOpt) ([]LogPollerBlock, error) { +func (lp *logPoller) GetBlocksRange(ctx context.Context, numbers []uint64) ([]LogPollerBlock, error) { var blocks []LogPollerBlock // Do nothing if no blocks are requested. @@ -1117,10 +1116,9 @@ func (lp *logPoller) GetBlocksRange(ctx context.Context, numbers []uint64, qopts // Retrieve all blocks within this range from the log poller. blocksFound := make(map[uint64]LogPollerBlock) - qopts = append(qopts, pg.WithParentCtx(ctx)) minRequestedBlock := int64(mathutil.Min(numbers[0], numbers[1:]...)) maxRequestedBlock := int64(mathutil.Max(numbers[0], numbers[1:]...)) - lpBlocks, err := lp.orm.GetBlocksRange(minRequestedBlock, maxRequestedBlock, qopts...) + lpBlocks, err := lp.orm.GetBlocksRange(ctx, minRequestedBlock, maxRequestedBlock) if err != nil { lp.lggr.Warnw("Error while retrieving blocks from log pollers blocks table. Falling back to RPC...", "requestedBlocks", numbers, "err", err) } else { @@ -1245,8 +1243,8 @@ func (lp *logPoller) batchFetchBlocks(ctx context.Context, blocksRequested []str // // For example, query to retrieve unfulfilled requests by querying request log events without matching fulfillment log events. // The order of events is not significant. Both logs must be inside the block range and have the minimum number of confirmations -func (lp *logPoller) IndexedLogsWithSigsExcluding(address common.Address, eventSigA, eventSigB common.Hash, topicIndex int, fromBlock, toBlock int64, confs Confirmations, qopts ...pg.QOpt) ([]Log, error) { - return lp.orm.SelectIndexedLogsWithSigsExcluding(eventSigA, eventSigB, topicIndex, address, fromBlock, toBlock, confs, qopts...) +func (lp *logPoller) IndexedLogsWithSigsExcluding(ctx context.Context, address common.Address, eventSigA, eventSigB common.Hash, topicIndex int, fromBlock, toBlock int64, confs Confirmations) ([]Log, error) { + return lp.orm.SelectIndexedLogsWithSigsExcluding(ctx, eventSigA, eventSigB, topicIndex, address, fromBlock, toBlock, confs) } func EvmWord(i uint64) common.Hash { diff --git a/core/chains/evm/logpoller/log_poller_internal_test.go b/core/chains/evm/logpoller/log_poller_internal_test.go index af2d9a558e1..7ad48b6a349 100644 --- a/core/chains/evm/logpoller/log_poller_internal_test.go +++ b/core/chains/evm/logpoller/log_poller_internal_test.go @@ -30,7 +30,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/log_emitter" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest" - "github.com/smartcontractkit/chainlink/v2/core/services/pg" ) var ( @@ -38,8 +37,9 @@ var ( ) // Validate that filters stored in log_filters_table match the filters stored in memory -func validateFiltersTable(t *testing.T, lp *logPoller, orm *DbORM) { - filters, err := orm.LoadFilters() +func validateFiltersTable(t *testing.T, lp *logPoller, orm ORM) { + ctx := testutils.Context(t) + filters, err := orm.LoadFilters(ctx) require.NoError(t, err) require.Equal(t, len(filters), len(lp.filters)) for name, dbFilter := range filters { @@ -60,8 +60,9 @@ func TestLogPoller_RegisterFilter(t *testing.T) { lggr, observedLogs := logger.TestObserved(t, zapcore.WarnLevel) chainID := testutils.NewRandomEVMChainID() db := pgtest.NewSqlxDB(t) + ctx := testutils.Context(t) - orm := NewORM(chainID, db, lggr, pgtest.NewQConfig(true)) + orm := NewORM(chainID, db, lggr) // Set up a test chain with a log emitting contract deployed. lpOpts := Opts{ @@ -77,36 +78,36 @@ func TestLogPoller_RegisterFilter(t *testing.T) { require.Equal(t, 1, len(f.Addresses)) assert.Equal(t, common.HexToAddress("0x0000000000000000000000000000000000000000"), f.Addresses[0]) - err := lp.RegisterFilter(Filter{Name: "Emitter Log 1", EventSigs: []common.Hash{EmitterABI.Events["Log1"].ID}, Addresses: []common.Address{a1}}) + err := lp.RegisterFilter(ctx, Filter{Name: "Emitter Log 1", EventSigs: []common.Hash{EmitterABI.Events["Log1"].ID}, Addresses: []common.Address{a1}}) require.NoError(t, err) assert.Equal(t, []common.Address{a1}, lp.Filter(nil, nil, nil).Addresses) assert.Equal(t, [][]common.Hash{{EmitterABI.Events["Log1"].ID}}, lp.Filter(nil, nil, nil).Topics) validateFiltersTable(t, lp, orm) // Should de-dupe EventSigs - err = lp.RegisterFilter(Filter{Name: "Emitter Log 1 + 2", EventSigs: []common.Hash{EmitterABI.Events["Log1"].ID, EmitterABI.Events["Log2"].ID}, Addresses: []common.Address{a2}}) + err = lp.RegisterFilter(ctx, Filter{Name: "Emitter Log 1 + 2", EventSigs: []common.Hash{EmitterABI.Events["Log1"].ID, EmitterABI.Events["Log2"].ID}, Addresses: []common.Address{a2}}) require.NoError(t, err) assert.Equal(t, []common.Address{a1, a2}, lp.Filter(nil, nil, nil).Addresses) assert.Equal(t, [][]common.Hash{{EmitterABI.Events["Log1"].ID, EmitterABI.Events["Log2"].ID}}, lp.Filter(nil, nil, nil).Topics) validateFiltersTable(t, lp, orm) // Should de-dupe Addresses - err = lp.RegisterFilter(Filter{Name: "Emitter Log 1 + 2 dupe", EventSigs: []common.Hash{EmitterABI.Events["Log1"].ID, EmitterABI.Events["Log2"].ID}, Addresses: []common.Address{a2}}) + err = lp.RegisterFilter(ctx, Filter{Name: "Emitter Log 1 + 2 dupe", EventSigs: []common.Hash{EmitterABI.Events["Log1"].ID, EmitterABI.Events["Log2"].ID}, Addresses: []common.Address{a2}}) require.NoError(t, err) assert.Equal(t, []common.Address{a1, a2}, lp.Filter(nil, nil, nil).Addresses) assert.Equal(t, [][]common.Hash{{EmitterABI.Events["Log1"].ID, EmitterABI.Events["Log2"].ID}}, lp.Filter(nil, nil, nil).Topics) validateFiltersTable(t, lp, orm) // Address required. - err = lp.RegisterFilter(Filter{Name: "no address", EventSigs: []common.Hash{EmitterABI.Events["Log1"].ID}}) + err = lp.RegisterFilter(ctx, Filter{Name: "no address", EventSigs: []common.Hash{EmitterABI.Events["Log1"].ID}}) require.Error(t, err) // Event required - err = lp.RegisterFilter(Filter{Name: "No event", Addresses: []common.Address{a1}}) + err = lp.RegisterFilter(ctx, Filter{Name: "No event", Addresses: []common.Address{a1}}) require.Error(t, err) validateFiltersTable(t, lp, orm) // Removing non-existence Filter should log error but return nil - err = lp.UnregisterFilter("Filter doesn't exist") + err = lp.UnregisterFilter(ctx, "Filter doesn't exist") require.NoError(t, err) require.Equal(t, observedLogs.Len(), 1) require.Contains(t, observedLogs.TakeAll()[0].Entry.Message, "not found") @@ -120,19 +121,19 @@ func TestLogPoller_RegisterFilter(t *testing.T) { require.True(t, ok, "'Emitter Log 1 + 2 dupe' Filter missing") // Removing an existing Filter should remove it from both memory and db - err = lp.UnregisterFilter("Emitter Log 1 + 2") + err = lp.UnregisterFilter(ctx, "Emitter Log 1 + 2") require.NoError(t, err) _, ok = lp.filters["Emitter Log 1 + 2"] require.False(t, ok, "'Emitter Log 1 Filter' should have been removed by UnregisterFilter()") require.Len(t, lp.filters, 2) validateFiltersTable(t, lp, orm) - err = lp.UnregisterFilter("Emitter Log 1 + 2 dupe") + err = lp.UnregisterFilter(ctx, "Emitter Log 1 + 2 dupe") require.NoError(t, err) - err = lp.UnregisterFilter("Emitter Log 1") + err = lp.UnregisterFilter(ctx, "Emitter Log 1") require.NoError(t, err) assert.Len(t, lp.filters, 0) - filters, err := lp.orm.LoadFilters() + filters, err := lp.orm.LoadFilters(ctx) require.NoError(t, err) assert.Len(t, filters, 0) @@ -203,7 +204,7 @@ func TestLogPoller_BackupPollerStartup(t *testing.T) { lggr, observedLogs := logger.TestObserved(t, zapcore.WarnLevel) chainID := testutils.FixtureChainID db := pgtest.NewSqlxDB(t) - orm := NewORM(chainID, db, lggr, pgtest.NewQConfig(true)) + orm := NewORM(chainID, db, lggr) head := evmtypes.Head{Number: 3} events := []common.Hash{EmitterABI.Events["Log1"].ID} @@ -237,7 +238,7 @@ func TestLogPoller_BackupPollerStartup(t *testing.T) { lp.PollAndSaveLogs(ctx, 3) - lastProcessed, err := lp.orm.SelectLatestBlock(pg.WithParentCtx(ctx)) + lastProcessed, err := lp.orm.SelectLatestBlock(ctx) require.NoError(t, err) require.Equal(t, int64(3), lastProcessed.BlockNumber) @@ -252,7 +253,8 @@ func TestLogPoller_Replay(t *testing.T) { lggr, observedLogs := logger.TestObserved(t, zapcore.ErrorLevel) chainID := testutils.FixtureChainID db := pgtest.NewSqlxDB(t) - orm := NewORM(chainID, db, lggr, pgtest.NewQConfig(true)) + orm := NewORM(chainID, db, lggr) + ctx := testutils.Context(t) head := evmtypes.Head{Number: 4} events := []common.Hash{EmitterABI.Events["Log1"].ID} @@ -281,8 +283,8 @@ func TestLogPoller_Replay(t *testing.T) { lp := NewLogPoller(orm, ec, lggr, lpOpts) // process 1 log in block 3 - lp.PollAndSaveLogs(testutils.Context(t), 4) - latest, err := lp.LatestBlock() + lp.PollAndSaveLogs(ctx, 4) + latest, err := lp.LatestBlock(ctx) require.NoError(t, err) require.Equal(t, int64(4), latest.BlockNumber) @@ -458,7 +460,8 @@ func Test_latestBlockAndFinalityDepth(t *testing.T) { lggr := logger.Test(t) chainID := testutils.FixtureChainID db := pgtest.NewSqlxDB(t) - orm := NewORM(chainID, db, lggr, pgtest.NewQConfig(true)) + orm := NewORM(chainID, db, lggr) + ctx := testutils.Context(t) lpOpts := Opts{ PollPeriod: time.Hour, @@ -476,7 +479,7 @@ func Test_latestBlockAndFinalityDepth(t *testing.T) { ec.On("HeadByNumber", mock.Anything, mock.Anything).Return(&head, nil) lp := NewLogPoller(orm, ec, lggr, lpOpts) - latestBlock, lastFinalizedBlockNumber, err := lp.latestBlocks(testutils.Context(t)) + latestBlock, lastFinalizedBlockNumber, err := lp.latestBlocks(ctx) require.NoError(t, err) require.Equal(t, latestBlock.Number, head.Number) require.Equal(t, lpOpts.FinalityDepth, latestBlock.Number-lastFinalizedBlockNumber) @@ -502,7 +505,7 @@ func Test_latestBlockAndFinalityDepth(t *testing.T) { lpOpts.UseFinalityTag = true lp := NewLogPoller(orm, ec, lggr, lpOpts) - latestBlock, lastFinalizedBlockNumber, err := lp.latestBlocks(testutils.Context(t)) + latestBlock, lastFinalizedBlockNumber, err := lp.latestBlocks(ctx) require.NoError(t, err) require.Equal(t, expectedLatestBlockNumber, latestBlock.Number) require.Equal(t, expectedLastFinalizedBlockNumber, lastFinalizedBlockNumber) @@ -520,7 +523,7 @@ func Test_latestBlockAndFinalityDepth(t *testing.T) { lpOpts.UseFinalityTag = true lp := NewLogPoller(orm, ec, lggr, lpOpts) - _, _, err := lp.latestBlocks(testutils.Context(t)) + _, _, err := lp.latestBlocks(ctx) require.Error(t, err) }) @@ -529,7 +532,7 @@ func Test_latestBlockAndFinalityDepth(t *testing.T) { ec.On("BatchCallContext", mock.Anything, mock.Anything).Return(fmt.Errorf("some error")) lpOpts.UseFinalityTag = true lp := NewLogPoller(orm, ec, lggr, lpOpts) - _, _, err := lp.latestBlocks(testutils.Context(t)) + _, _, err := lp.latestBlocks(ctx) require.Error(t, err) }) }) @@ -554,7 +557,7 @@ func benchmarkFilter(b *testing.B, nFilters, nAddresses, nEvents int) { for j := 0; j < nEvents; j++ { events = append(events, common.BigToHash(big.NewInt(int64(j+1)))) } - err := lp.RegisterFilter(Filter{Name: "my Filter", EventSigs: events, Addresses: addresses}) + err := lp.RegisterFilter(testutils.Context(b), Filter{Name: "my Filter", EventSigs: events, Addresses: addresses}) require.NoError(b, err) } b.ResetTimer() diff --git a/core/chains/evm/logpoller/log_poller_test.go b/core/chains/evm/logpoller/log_poller_test.go index 21246e24ec0..9ee7cfa85cd 100644 --- a/core/chains/evm/logpoller/log_poller_test.go +++ b/core/chains/evm/logpoller/log_poller_test.go @@ -38,18 +38,18 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/evmtest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest" - "github.com/smartcontractkit/chainlink/v2/core/services/pg" ) func logRuntime(t testing.TB, start time.Time) { t.Log("runtime", time.Since(start)) } -func populateDatabase(t testing.TB, o *logpoller.DbORM, chainID *big.Int) (common.Hash, common.Address, common.Address) { +func populateDatabase(t testing.TB, o logpoller.ORM, chainID *big.Int) (common.Hash, common.Address, common.Address) { event1 := EmitterABI.Events["Log1"].ID address1 := common.HexToAddress("0x2ab9a2Dc53736b361b72d900CdF9F78F9406fbbb") address2 := common.HexToAddress("0x6E225058950f237371261C985Db6bDe26df2200E") startDate := time.Date(2010, 1, 1, 12, 12, 12, 0, time.UTC) + ctx := testutils.Context(t) for j := 1; j < 100; j++ { var logs []logpoller.Log @@ -77,8 +77,8 @@ func populateDatabase(t testing.TB, o *logpoller.DbORM, chainID *big.Int) (commo }) } - require.NoError(t, o.InsertLogs(logs)) - require.NoError(t, o.InsertBlock(utils.RandomHash(), int64((j+1)*1000-1), startDate.Add(time.Duration(j*1000)*time.Hour), 0)) + require.NoError(t, o.InsertLogs(ctx, logs)) + require.NoError(t, o.InsertBlock(ctx, utils.RandomHash(), int64((j+1)*1000-1), startDate.Add(time.Duration(j*1000)*time.Hour), 0)) } return event1, address1, address2 @@ -86,8 +86,9 @@ func populateDatabase(t testing.TB, o *logpoller.DbORM, chainID *big.Int) (commo func BenchmarkSelectLogsCreatedAfter(b *testing.B) { chainId := big.NewInt(137) + ctx := testutils.Context(b) _, db := heavyweight.FullTestDBV2(b, nil) - o := logpoller.NewORM(chainId, db, logger.Test(b), pgtest.NewQConfig(false)) + o := logpoller.NewORM(chainId, db, logger.Test(b)) event, address, _ := populateDatabase(b, o, chainId) // Setting searchDate to pick around 5k logs @@ -96,7 +97,7 @@ func BenchmarkSelectLogsCreatedAfter(b *testing.B) { b.ResetTimer() for i := 0; i < b.N; i++ { - logs, err := o.SelectLogsCreatedAfter(address, event, searchDate, 500) + logs, err := o.SelectLogsCreatedAfter(ctx, address, event, searchDate, 500) require.NotZero(b, len(logs)) require.NoError(b, err) } @@ -105,44 +106,45 @@ func BenchmarkSelectLogsCreatedAfter(b *testing.B) { func TestPopulateLoadedDB(t *testing.T) { t.Skip("Only for local load testing and query analysis") _, db := heavyweight.FullTestDBV2(t, nil) + ctx := testutils.Context(t) chainID := big.NewInt(137) - o := logpoller.NewORM(big.NewInt(137), db, logger.Test(t), pgtest.NewQConfig(true)) + o := logpoller.NewORM(big.NewInt(137), db, logger.Test(t)) event1, address1, address2 := populateDatabase(t, o, chainID) func() { defer logRuntime(t, time.Now()) - _, err1 := o.SelectLogs(750000, 800000, address1, event1) + _, err1 := o.SelectLogs(ctx, 750000, 800000, address1, event1) require.NoError(t, err1) }() func() { defer logRuntime(t, time.Now()) - _, err1 := o.SelectLatestLogEventSigsAddrsWithConfs(0, []common.Address{address1}, []common.Hash{event1}, 0) + _, err1 := o.SelectLatestLogEventSigsAddrsWithConfs(ctx, 0, []common.Address{address1}, []common.Hash{event1}, 0) require.NoError(t, err1) }() // Confirm all the logs. - require.NoError(t, o.InsertBlock(common.HexToHash("0x10"), 1000000, time.Now(), 0)) + require.NoError(t, o.InsertBlock(ctx, common.HexToHash("0x10"), 1000000, time.Now(), 0)) func() { defer logRuntime(t, time.Now()) - lgs, err1 := o.SelectLogsDataWordRange(address1, event1, 0, logpoller.EvmWord(500000), logpoller.EvmWord(500020), 0) + lgs, err1 := o.SelectLogsDataWordRange(ctx, address1, event1, 0, logpoller.EvmWord(50000), logpoller.EvmWord(50020), 0) require.NoError(t, err1) // 10 since every other log is for address1 - assert.Equal(t, 10, len(lgs)) + require.Equal(t, 10, len(lgs)) }() func() { defer logRuntime(t, time.Now()) - lgs, err1 := o.SelectIndexedLogs(address2, event1, 1, []common.Hash{logpoller.EvmWord(500000), logpoller.EvmWord(500020)}, 0) + lgs, err1 := o.SelectIndexedLogs(ctx, address2, event1, 1, []common.Hash{logpoller.EvmWord(50000), logpoller.EvmWord(50020)}, 0) require.NoError(t, err1) - assert.Equal(t, 2, len(lgs)) + require.Equal(t, 2, len(lgs)) }() func() { defer logRuntime(t, time.Now()) - lgs, err1 := o.SelectIndexedLogsTopicRange(address1, event1, 1, logpoller.EvmWord(500000), logpoller.EvmWord(500020), 0) + lgs, err1 := o.SelectIndexedLogsTopicRange(ctx, address1, event1, 1, logpoller.EvmWord(50000), logpoller.EvmWord(50020), 0) require.NoError(t, err1) - assert.Equal(t, 10, len(lgs)) + require.Equal(t, 10, len(lgs)) }() } @@ -156,8 +158,9 @@ func TestLogPoller_Integration(t *testing.T) { } th := SetupTH(t, lpOpts) th.Client.Commit() // Block 2. Ensure we have finality number of blocks + ctx := testutils.Context(t) - require.NoError(t, th.LogPoller.RegisterFilter(logpoller.Filter{Name: "Integration test", EventSigs: []common.Hash{EmitterABI.Events["Log1"].ID}, Addresses: []common.Address{th.EmitterAddress1}})) + require.NoError(t, th.LogPoller.RegisterFilter(ctx, logpoller.Filter{Name: "Integration test", EventSigs: []common.Hash{EmitterABI.Events["Log1"].ID}, Addresses: []common.Address{th.EmitterAddress1}})) require.Len(t, th.LogPoller.Filter(nil, nil, nil).Addresses, 1) require.Len(t, th.LogPoller.Filter(nil, nil, nil).Topics, 1) @@ -181,20 +184,19 @@ func TestLogPoller_Integration(t *testing.T) { require.NoError(t, th.LogPoller.Replay(testutils.Context(t), 4)) // We should immediately have at least logs 4-7 - logs, err := th.LogPoller.Logs(4, 7, EmitterABI.Events["Log1"].ID, th.EmitterAddress1, - pg.WithParentCtx(testutils.Context(t))) + logs, err := th.LogPoller.Logs(ctx, 4, 7, EmitterABI.Events["Log1"].ID, th.EmitterAddress1) require.NoError(t, err) require.Equal(t, 4, len(logs)) // Once the backup poller runs we should also have the log from block 3 testutils.AssertEventually(t, func() bool { - l, err2 := th.LogPoller.Logs(3, 3, EmitterABI.Events["Log1"].ID, th.EmitterAddress1) + l, err2 := th.LogPoller.Logs(ctx, 3, 3, EmitterABI.Events["Log1"].ID, th.EmitterAddress1) require.NoError(t, err2) return len(l) == 1 }) // Now let's update the Filter and replay to get Log2 logs. - err = th.LogPoller.RegisterFilter(logpoller.Filter{ + err = th.LogPoller.RegisterFilter(ctx, logpoller.Filter{ Name: "Emitter - log2", EventSigs: []common.Hash{EmitterABI.Events["Log2"].ID}, Addresses: []common.Address{th.EmitterAddress1}, @@ -205,7 +207,7 @@ func TestLogPoller_Integration(t *testing.T) { assert.Error(t, th.LogPoller.Replay(testutils.Context(t), 20)) // Still shouldn't have any Log2 logs yet - logs, err = th.LogPoller.Logs(2, 7, EmitterABI.Events["Log2"].ID, th.EmitterAddress1) + logs, err = th.LogPoller.Logs(ctx, 2, 7, EmitterABI.Events["Log2"].ID, th.EmitterAddress1) require.NoError(t, err) require.Len(t, logs, 0) @@ -213,8 +215,7 @@ func TestLogPoller_Integration(t *testing.T) { require.NoError(t, th.LogPoller.Replay(testutils.Context(t), 4)) // We should immediately see 4 logs2 logs. - logs, err = th.LogPoller.Logs(2, 7, EmitterABI.Events["Log2"].ID, th.EmitterAddress1, - pg.WithParentCtx(testutils.Context(t))) + logs, err = th.LogPoller.Logs(ctx, 2, 7, EmitterABI.Events["Log2"].ID, th.EmitterAddress1) require.NoError(t, err) assert.Equal(t, 4, len(logs)) @@ -278,15 +279,15 @@ func Test_BackupLogPoller(t *testing.T) { EmitterABI.Events["Log2"].ID}, Addresses: []common.Address{th.EmitterAddress1}, } - err := th.LogPoller.RegisterFilter(filter1) + err := th.LogPoller.RegisterFilter(ctx, filter1) require.NoError(t, err) - filters, err := th.ORM.LoadFilters(pg.WithParentCtx(testutils.Context(t))) + filters, err := th.ORM.LoadFilters(ctx) require.NoError(t, err) require.Equal(t, 1, len(filters)) require.Equal(t, filter1, filters["filter1"]) - err = th.LogPoller.RegisterFilter( + err = th.LogPoller.RegisterFilter(ctx, logpoller.Filter{ Name: "filter2", EventSigs: []common.Hash{EmitterABI.Events["Log1"].ID}, @@ -295,10 +296,10 @@ func Test_BackupLogPoller(t *testing.T) { require.NoError(t, err) defer func() { - assert.NoError(t, th.LogPoller.UnregisterFilter("filter1")) + assert.NoError(t, th.LogPoller.UnregisterFilter(ctx, "filter1")) }() defer func() { - assert.NoError(t, th.LogPoller.UnregisterFilter("filter2")) + assert.NoError(t, th.LogPoller.UnregisterFilter(ctx, "filter2")) }() // generate some tx's with logs @@ -354,8 +355,7 @@ func Test_BackupLogPoller(t *testing.T) { require.Equal(t, 32, len(fLogs)) // logs shouldn't show up yet - logs, err := th.LogPoller.Logs(34, 34, EmitterABI.Events["Log1"].ID, th.EmitterAddress1, - pg.WithParentCtx(testutils.Context(t))) + logs, err := th.LogPoller.Logs(ctx, 34, 34, EmitterABI.Events["Log1"].ID, th.EmitterAddress1) require.NoError(t, err) assert.Equal(t, 0, len(logs)) @@ -364,17 +364,16 @@ func Test_BackupLogPoller(t *testing.T) { markBlockAsFinalized(t, th, 34) // Run ordinary poller + backup poller at least once - currentBlock, _ := th.LogPoller.LatestBlock(pg.WithParentCtx(testutils.Context(t))) + currentBlock, _ := th.LogPoller.LatestBlock(ctx) th.LogPoller.PollAndSaveLogs(ctx, currentBlock.BlockNumber+1) th.LogPoller.BackupPollAndSaveLogs(ctx) - currentBlock, _ = th.LogPoller.LatestBlock(pg.WithParentCtx(testutils.Context(t))) + currentBlock, _ = th.LogPoller.LatestBlock(ctx) require.Equal(t, int64(37), currentBlock.BlockNumber+1) // logs still shouldn't show up, because we don't want to backfill the last finalized log // to help with reorg detection - logs, err = th.LogPoller.Logs(34, 34, EmitterABI.Events["Log1"].ID, th.EmitterAddress1, - pg.WithParentCtx(testutils.Context(t))) + logs, err = th.LogPoller.Logs(ctx, 34, 34, EmitterABI.Events["Log1"].ID, th.EmitterAddress1) require.NoError(t, err) assert.Equal(t, 0, len(logs)) th.Client.Commit() @@ -383,21 +382,18 @@ func Test_BackupLogPoller(t *testing.T) { // Run ordinary poller + backup poller at least once more th.LogPoller.PollAndSaveLogs(ctx, currentBlockNumber+1) th.LogPoller.BackupPollAndSaveLogs(ctx) - currentBlock, _ = th.LogPoller.LatestBlock(pg.WithParentCtx(testutils.Context(t))) + currentBlock, _ = th.LogPoller.LatestBlock(ctx) require.Equal(t, int64(38), currentBlock.BlockNumber+1) // all 3 logs in block 34 should show up now, thanks to backup logger - logs, err = th.LogPoller.Logs(30, 37, EmitterABI.Events["Log1"].ID, th.EmitterAddress1, - pg.WithParentCtx(testutils.Context(t))) + logs, err = th.LogPoller.Logs(ctx, 30, 37, EmitterABI.Events["Log1"].ID, th.EmitterAddress1) require.NoError(t, err) assert.Equal(t, 5, len(logs)) - logs, err = th.LogPoller.Logs(34, 34, EmitterABI.Events["Log2"].ID, th.EmitterAddress1, - pg.WithParentCtx(testutils.Context(t))) + logs, err = th.LogPoller.Logs(ctx, 34, 34, EmitterABI.Events["Log2"].ID, th.EmitterAddress1) require.NoError(t, err) assert.Equal(t, 1, len(logs)) - logs, err = th.LogPoller.Logs(32, 36, EmitterABI.Events["Log1"].ID, th.EmitterAddress2, - pg.WithParentCtx(testutils.Context(t))) + logs, err = th.LogPoller.Logs(ctx, 32, 36, EmitterABI.Events["Log1"].ID, th.EmitterAddress2) require.NoError(t, err) assert.Equal(t, 1, len(logs)) }) @@ -437,7 +433,7 @@ func TestLogPoller_BackupPollAndSaveLogsWithPollerNotWorking(t *testing.T) { // 0 -> 1 -> 2 -> ... -> currentBlock - 10 (finalized) -> .. -> currentBlock markBlockAsFinalized(t, th, currentBlock-10) - err = th.LogPoller.RegisterFilter(logpoller.Filter{ + err = th.LogPoller.RegisterFilter(ctx, logpoller.Filter{ Name: "Test Emitter", EventSigs: []common.Hash{EmitterABI.Events["Log1"].ID}, Addresses: []common.Address{th.EmitterAddress1}, @@ -450,11 +446,11 @@ func TestLogPoller_BackupPollAndSaveLogsWithPollerNotWorking(t *testing.T) { require.NoError(t, err) logs, err := th.LogPoller.Logs( + ctx, 0, currentBlock, EmitterABI.Events["Log1"].ID, th.EmitterAddress1, - pg.WithParentCtx(testutils.Context(t)), ) require.NoError(t, err) require.Len(t, logs, emittedLogs-10) @@ -466,11 +462,11 @@ func TestLogPoller_BackupPollAndSaveLogsWithPollerNotWorking(t *testing.T) { // All emitted logs should be backfilled logs, err = th.LogPoller.Logs( + ctx, 0, currentBlock+1, EmitterABI.Events["Log1"].ID, th.EmitterAddress1, - pg.WithParentCtx(testutils.Context(t)), ) require.NoError(t, err) require.Len(t, logs, emittedLogs) @@ -507,14 +503,14 @@ func TestLogPoller_BackupPollAndSaveLogsWithDeepBlockDelay(t *testing.T) { th.PollAndSaveLogs(ctx, 1) // Check that latest block has the same properties as the head - latestBlock, err := th.LogPoller.LatestBlock() + latestBlock, err := th.LogPoller.LatestBlock(ctx) require.NoError(t, err) assert.Equal(t, latestBlock.BlockNumber, header.Number.Int64()) assert.Equal(t, latestBlock.FinalizedBlockNumber, header.Number.Int64()) assert.Equal(t, latestBlock.BlockHash, header.Hash()) // Register filter - err = th.LogPoller.RegisterFilter(logpoller.Filter{ + err = th.LogPoller.RegisterFilter(ctx, logpoller.Filter{ Name: "Test Emitter", EventSigs: []common.Hash{EmitterABI.Events["Log1"].ID}, Addresses: []common.Address{th.EmitterAddress1}, @@ -527,11 +523,11 @@ func TestLogPoller_BackupPollAndSaveLogsWithDeepBlockDelay(t *testing.T) { // All emitted logs should be backfilled logs, err := th.LogPoller.Logs( + ctx, 0, header.Number.Int64()+1, EmitterABI.Events["Log1"].ID, th.EmitterAddress1, - pg.WithParentCtx(testutils.Context(t)), ) require.NoError(t, err) require.Len(t, logs, emittedLogs) @@ -578,7 +574,7 @@ func TestLogPoller_BackupPollAndSaveLogsSkippingLogsThatAreTooOld(t *testing.T) markBlockAsFinalized(t, th, secondBatchBlock) // Register filter - err := th.LogPoller.RegisterFilter(logpoller.Filter{ + err := th.LogPoller.RegisterFilter(ctx, logpoller.Filter{ Name: "Test Emitter", EventSigs: []common.Hash{EmitterABI.Events["Log1"].ID}, Addresses: []common.Address{th.EmitterAddress1}, @@ -592,11 +588,11 @@ func TestLogPoller_BackupPollAndSaveLogsSkippingLogsThatAreTooOld(t *testing.T) // Only the 2nd batch + 1 log from a previous batch should be backfilled, because we perform backfill starting // from one block behind the latest finalized block logs, err := th.LogPoller.Logs( + ctx, 0, secondBatchBlock, EmitterABI.Events["Log1"].ID, th.EmitterAddress1, - pg.WithParentCtx(testutils.Context(t)), ) require.NoError(t, err) require.Len(t, logs, logsBatch+1) @@ -617,7 +613,7 @@ func TestLogPoller_BlockTimestamps(t *testing.T) { addresses := []common.Address{th.EmitterAddress1, th.EmitterAddress2} events := []common.Hash{EmitterABI.Events["Log1"].ID, EmitterABI.Events["Log2"].ID} - err := th.LogPoller.RegisterFilter(logpoller.Filter{Name: "convertLogs", EventSigs: events, Addresses: addresses}) + err := th.LogPoller.RegisterFilter(ctx, logpoller.Filter{Name: "convertLogs", EventSigs: events, Addresses: addresses}) require.NoError(t, err) blk, err := th.Client.BlockByNumber(ctx, nil) @@ -672,13 +668,11 @@ func TestLogPoller_BlockTimestamps(t *testing.T) { require.NoError(t, err) require.Len(t, gethLogs, 2) - lb, _ := th.LogPoller.LatestBlock(pg.WithParentCtx(testutils.Context(t))) + lb, _ := th.LogPoller.LatestBlock(ctx) th.PollAndSaveLogs(ctx, lb.BlockNumber+1) - lg1, err := th.LogPoller.Logs(0, 20, EmitterABI.Events["Log1"].ID, th.EmitterAddress1, - pg.WithParentCtx(ctx)) + lg1, err := th.LogPoller.Logs(ctx, 0, 20, EmitterABI.Events["Log1"].ID, th.EmitterAddress1) require.NoError(t, err) - lg2, err := th.LogPoller.Logs(0, 20, EmitterABI.Events["Log2"].ID, th.EmitterAddress2, - pg.WithParentCtx(ctx)) + lg2, err := th.LogPoller.Logs(ctx, 0, 20, EmitterABI.Events["Log2"].ID, th.EmitterAddress2) require.NoError(t, err) // Logs should have correct timestamps @@ -708,7 +702,7 @@ func TestLogPoller_SynchronizedWithGeth(t *testing.T) { t.Log("Starting test", mineOrReorg) chainID := testutils.NewRandomEVMChainID() // Set up a test chain with a log emitting contract deployed. - orm := logpoller.NewORM(chainID, db, lggr, pgtest.NewQConfig(true)) + orm := logpoller.NewORM(chainID, db, lggr) // Note this property test is run concurrently and the sim is not threadsafe. ec := backends.NewSimulatedBackend(map[common.Address]core.GenesisAccount{ owner.From: { @@ -731,14 +725,14 @@ func TestLogPoller_SynchronizedWithGeth(t *testing.T) { } currentBlockNumber := int64(1) lp.PollAndSaveLogs(testutils.Context(t), currentBlockNumber) - currentBlock, err := lp.LatestBlock(pg.WithParentCtx(testutils.Context(t))) + currentBlock, err := lp.LatestBlock(testutils.Context(t)) require.NoError(t, err) matchesGeth := func() bool { // Check every block is identical latest, err1 := ec.BlockByNumber(testutils.Context(t), nil) require.NoError(t, err1) for i := 1; i < int(latest.NumberU64()); i++ { - ourBlock, err1 := lp.BlockByNumber(int64(i)) + ourBlock, err1 := lp.BlockByNumber(testutils.Context(t), int64(i)) require.NoError(t, err1) gethBlock, err1 := ec.BlockByNumber(testutils.Context(t), big.NewInt(int64(i))) require.NoError(t, err1) @@ -782,7 +776,7 @@ func TestLogPoller_SynchronizedWithGeth(t *testing.T) { t.Logf("New latest (%v, %x), latest parent %x)\n", latest.NumberU64(), latest.Hash(), latest.ParentHash()) } lp.PollAndSaveLogs(testutils.Context(t), currentBlock.BlockNumber) - currentBlock, err = lp.LatestBlock(pg.WithParentCtx(testutils.Context(t))) + currentBlock, err = lp.LatestBlock(testutils.Context(t)) require.NoError(t, err) } return matchesGeth() @@ -822,7 +816,7 @@ func TestLogPoller_PollAndSaveLogs(t *testing.T) { th := SetupTH(t, lpOpts) // Set up a log poller listening for log emitter logs. - err := th.LogPoller.RegisterFilter(logpoller.Filter{ + err := th.LogPoller.RegisterFilter(testutils.Context(t), logpoller.Filter{ Name: "Test Emitter 1 & 2", EventSigs: []common.Hash{EmitterABI.Events["Log1"].ID, EmitterABI.Events["Log2"].ID}, Addresses: []common.Address{th.EmitterAddress1, th.EmitterAddress2}, @@ -841,7 +835,7 @@ func TestLogPoller_PollAndSaveLogs(t *testing.T) { assert.Equal(t, int64(2), newStart) // We expect to have saved block 1. - lpb, err := th.ORM.SelectBlockByNumber(1) + lpb, err := th.ORM.SelectBlockByNumber(testutils.Context(t), 1) require.NoError(t, err) assert.Equal(t, lpb.BlockHash, b.Hash()) assert.Equal(t, lpb.BlockNumber, int64(b.NumberU64())) @@ -849,7 +843,7 @@ func TestLogPoller_PollAndSaveLogs(t *testing.T) { assert.Equal(t, uint64(10), b.Time()) // No logs. - lgs, err := th.ORM.SelectLogsByBlockRange(1, 1) + lgs, err := th.ORM.SelectLogsByBlockRange(testutils.Context(t), 1, 1) require.NoError(t, err) assert.Equal(t, 0, len(lgs)) th.assertHaveCanonical(t, 1, 1) @@ -857,7 +851,7 @@ func TestLogPoller_PollAndSaveLogs(t *testing.T) { // Polling again should be a noop, since we are at the latest. newStart = th.PollAndSaveLogs(testutils.Context(t), newStart) assert.Equal(t, int64(2), newStart) - latest, err := th.ORM.SelectLatestBlock() + latest, err := th.ORM.SelectLatestBlock(testutils.Context(t)) require.NoError(t, err) assert.Equal(t, int64(1), latest.BlockNumber) th.assertHaveCanonical(t, 1, 1) @@ -872,10 +866,10 @@ func TestLogPoller_PollAndSaveLogs(t *testing.T) { // Polling should get us the L1 log. newStart = th.PollAndSaveLogs(testutils.Context(t), newStart) assert.Equal(t, int64(3), newStart) - latest, err = th.ORM.SelectLatestBlock() + latest, err = th.ORM.SelectLatestBlock(testutils.Context(t)) require.NoError(t, err) assert.Equal(t, int64(2), latest.BlockNumber) - lgs, err = th.ORM.SelectLogsByBlockRange(1, 3) + lgs, err = th.ORM.SelectLogsByBlockRange(testutils.Context(t), 1, 3) require.NoError(t, err) require.Equal(t, 1, len(lgs)) assert.Equal(t, th.EmitterAddress1, lgs[0].Address) @@ -907,10 +901,10 @@ func TestLogPoller_PollAndSaveLogs(t *testing.T) { newStart = th.PollAndSaveLogs(testutils.Context(t), newStart) assert.Equal(t, int64(4), newStart) - latest, err = th.ORM.SelectLatestBlock() + latest, err = th.ORM.SelectLatestBlock(testutils.Context(t)) require.NoError(t, err) assert.Equal(t, int64(3), latest.BlockNumber) - lgs, err = th.ORM.SelectLogsByBlockRange(1, 3) + lgs, err = th.ORM.SelectLogsByBlockRange(testutils.Context(t), 1, 3) require.NoError(t, err) require.Equal(t, 1, len(lgs)) assert.Equal(t, hexutil.MustDecode(`0x0000000000000000000000000000000000000000000000000000000000000002`), lgs[0].Data) @@ -930,10 +924,10 @@ func TestLogPoller_PollAndSaveLogs(t *testing.T) { markBlockAsFinalized(t, th, 1) newStart = th.PollAndSaveLogs(testutils.Context(t), newStart) assert.Equal(t, int64(5), newStart) - latest, err = th.ORM.SelectLatestBlock() + latest, err = th.ORM.SelectLatestBlock(testutils.Context(t)) require.NoError(t, err) assert.Equal(t, int64(4), latest.BlockNumber) - lgs, err = th.ORM.SelectLogsByBlockRange(1, 3) + lgs, err = th.ORM.SelectLogsByBlockRange(testutils.Context(t), 1, 3) require.NoError(t, err) // We expect ONLY L1_1 and L1_3 since L1_2 is reorg'd out. assert.Equal(t, 2, len(lgs)) @@ -966,7 +960,7 @@ func TestLogPoller_PollAndSaveLogs(t *testing.T) { newStart = th.PollAndSaveLogs(testutils.Context(t), newStart) assert.Equal(t, int64(7), newStart) - lgs, err = th.ORM.SelectLogsByBlockRange(4, 6) + lgs, err = th.ORM.SelectLogsByBlockRange(testutils.Context(t), 4, 6) require.NoError(t, err) require.Equal(t, 3, len(lgs)) assert.Equal(t, hexutil.MustDecode(`0x0000000000000000000000000000000000000000000000000000000000000004`), lgs[0].Data) @@ -996,7 +990,7 @@ func TestLogPoller_PollAndSaveLogs(t *testing.T) { newStart = th.PollAndSaveLogs(testutils.Context(t), newStart) assert.Equal(t, int64(11), newStart) - lgs, err = th.ORM.SelectLogsByBlockRange(7, 9) + lgs, err = th.ORM.SelectLogsByBlockRange(testutils.Context(t), 7, 9) require.NoError(t, err) require.Equal(t, 3, len(lgs)) assert.Equal(t, hexutil.MustDecode(`0x0000000000000000000000000000000000000000000000000000000000000007`), lgs[0].Data) @@ -1025,7 +1019,7 @@ func TestLogPoller_PollAndSaveLogs(t *testing.T) { newStart = th.PollAndSaveLogs(testutils.Context(t), newStart) assert.Equal(t, int64(18), newStart) - lgs, err = th.ORM.SelectLogsByBlockRange(11, 17) + lgs, err = th.ORM.SelectLogsByBlockRange(testutils.Context(t), 11, 17) require.NoError(t, err) assert.Equal(t, 7, len(lgs)) th.assertHaveCanonical(t, 14, 16) // Should have last finalized block plus unfinalized blocks @@ -1078,7 +1072,7 @@ func TestLogPoller_PollAndSaveLogsDeepReorg(t *testing.T) { th := SetupTH(t, lpOpts) // Set up a log poller listening for log emitter logs. - err := th.LogPoller.RegisterFilter(logpoller.Filter{ + err := th.LogPoller.RegisterFilter(testutils.Context(t), logpoller.Filter{ Name: "Test Emitter", EventSigs: []common.Hash{EmitterABI.Events["Log1"].ID}, Addresses: []common.Address{th.EmitterAddress1}, @@ -1097,7 +1091,7 @@ func TestLogPoller_PollAndSaveLogsDeepReorg(t *testing.T) { newStart := th.PollAndSaveLogs(testutils.Context(t), 1) assert.Equal(t, int64(3), newStart) // Check that L1_1 has a proper data payload - lgs, err := th.ORM.SelectLogsByBlockRange(2, 2) + lgs, err := th.ORM.SelectLogsByBlockRange(testutils.Context(t), 2, 2) require.NoError(t, err) assert.Equal(t, hexutil.MustDecode(`0x0000000000000000000000000000000000000000000000000000000000000001`), lgs[0].Data) @@ -1123,7 +1117,7 @@ func TestLogPoller_PollAndSaveLogsDeepReorg(t *testing.T) { assert.Equal(t, int64(10), newStart) // Expect L1_2 to be properly updated - lgs, err = th.ORM.SelectLogsByBlockRange(2, 2) + lgs, err = th.ORM.SelectLogsByBlockRange(testutils.Context(t), 2, 2) require.NoError(t, err) assert.Equal(t, hexutil.MustDecode(`0x0000000000000000000000000000000000000000000000000000000000000002`), lgs[0].Data) th.assertHaveCanonical(t, 1, 1) @@ -1167,14 +1161,14 @@ func TestLogPoller_LoadFilters(t *testing.T) { assert.False(t, filter2.Contains(&filter1)) assert.True(t, filter1.Contains(&filter3)) - err := th.LogPoller.RegisterFilter(filter1) + err := th.LogPoller.RegisterFilter(testutils.Context(t), filter1) require.NoError(t, err) - err = th.LogPoller.RegisterFilter(filter2) + err = th.LogPoller.RegisterFilter(testutils.Context(t), filter2) require.NoError(t, err) - err = th.LogPoller.RegisterFilter(filter3) + err = th.LogPoller.RegisterFilter(testutils.Context(t), filter3) require.NoError(t, err) - filters, err := th.ORM.LoadFilters() + filters, err := th.ORM.LoadFilters(testutils.Context(t)) require.NoError(t, err) require.NotNil(t, filters) require.Len(t, filters, 3) @@ -1213,7 +1207,7 @@ func TestLogPoller_GetBlocks_Range(t *testing.T) { } th := SetupTH(t, lpOpts) - err := th.LogPoller.RegisterFilter(logpoller.Filter{ + err := th.LogPoller.RegisterFilter(testutils.Context(t), logpoller.Filter{ Name: "GetBlocks Test", EventSigs: []common.Hash{EmitterABI.Events["Log1"].ID, EmitterABI.Events["Log2"].ID}, Addresses: []common.Address{th.EmitterAddress1, th.EmitterAddress2}, @@ -1245,7 +1239,7 @@ func TestLogPoller_GetBlocks_Range(t *testing.T) { th.Client.Commit() // Assert block 2 is not yet in DB - _, err = th.ORM.SelectBlockByNumber(2) + _, err = th.ORM.SelectBlockByNumber(testutils.Context(t), 2) require.Error(t, err) // getBlocksRange is able to retrieve block 2 by calling RPC @@ -1260,7 +1254,7 @@ func TestLogPoller_GetBlocks_Range(t *testing.T) { th.Client.Commit() // Assert block 3 is not yet in DB - _, err = th.ORM.SelectBlockByNumber(3) + _, err = th.ORM.SelectBlockByNumber(testutils.Context(t), 3) require.Error(t, err) // getBlocksRange is able to retrieve blocks 1 and 3, without retrieving block 2 @@ -1273,10 +1267,10 @@ func TestLogPoller_GetBlocks_Range(t *testing.T) { // after calling PollAndSaveLogs, block 2 & 3 are persisted in DB th.LogPoller.PollAndSaveLogs(testutils.Context(t), 1) - block, err := th.ORM.SelectBlockByNumber(2) + block, err := th.ORM.SelectBlockByNumber(testutils.Context(t), 2) require.NoError(t, err) assert.Equal(t, 2, int(block.BlockNumber)) - block, err = th.ORM.SelectBlockByNumber(3) + block, err = th.ORM.SelectBlockByNumber(testutils.Context(t), 3) require.NoError(t, err) assert.Equal(t, 3, int(block.BlockNumber)) @@ -1312,13 +1306,11 @@ func TestLogPoller_GetBlocks_Range(t *testing.T) { require.Error(t, err) assert.Contains(t, err.Error(), "context canceled") - // test still works when qopts is cancelled - // but context object is not + // test canceled ctx ctx, cancel = context.WithCancel(testutils.Context(t)) - qopts := pg.WithParentCtx(ctx) cancel() - _, err = th.LogPoller.GetBlocksRange(testutils.Context(t), blockNums, qopts) - require.NoError(t, err) + _, err = th.LogPoller.GetBlocksRange(ctx, blockNums) + require.Equal(t, err, context.Canceled) } func TestGetReplayFromBlock(t *testing.T) { @@ -1354,7 +1346,7 @@ func TestGetReplayFromBlock(t *testing.T) { requested = int64(15) fromBlock, err = th.LogPoller.GetReplayFromBlock(testutils.Context(t), requested) require.NoError(t, err) - latest, err := th.LogPoller.LatestBlock(pg.WithParentCtx(testutils.Context(t))) + latest, err := th.LogPoller.LatestBlock(testutils.Context(t)) require.NoError(t, err) assert.Equal(t, latest.BlockNumber, fromBlock) @@ -1372,7 +1364,7 @@ func TestLogPoller_DBErrorHandling(t *testing.T) { chainID1 := testutils.NewRandomEVMChainID() chainID2 := testutils.NewRandomEVMChainID() db := pgtest.NewSqlxDB(t) - o := logpoller.NewORM(chainID1, db, lggr, pgtest.NewQConfig(true)) + o := logpoller.NewORM(chainID1, db, lggr) owner := testutils.MustNewSimTransactor(t) ethDB := rawdb.NewMemoryDatabase() @@ -1413,9 +1405,10 @@ func TestLogPoller_DBErrorHandling(t *testing.T) { time.Sleep(100 * time.Millisecond) require.NoError(t, lp.Start(ctx)) require.Eventually(t, func() bool { - return observedLogs.Len() >= 4 + return observedLogs.Len() >= 2 }, 2*time.Second, 20*time.Millisecond) - lp.Close() + err = lp.Close() + require.NoError(t, err) logMsgs := make(map[string]int) for _, obs := range observedLogs.All() { @@ -1427,7 +1420,6 @@ func TestLogPoller_DBErrorHandling(t *testing.T) { } } - assert.Contains(t, logMsgs, "SQL ERROR") assert.Contains(t, logMsgs, "Failed loading filters in main logpoller loop, retrying later") assert.Contains(t, logMsgs, "Error executing replay, could not get fromBlock") } @@ -1444,7 +1436,8 @@ func TestTooManyLogResults(t *testing.T) { lggr, obs := logger.TestObserved(t, zapcore.DebugLevel) chainID := testutils.NewRandomEVMChainID() db := pgtest.NewSqlxDB(t) - o := logpoller.NewORM(chainID, db, lggr, pgtest.NewQConfig(true)) + + o := logpoller.NewORM(chainID, db, lggr) lpOpts := logpoller.Opts{ PollPeriod: time.Hour, @@ -1482,14 +1475,14 @@ func TestTooManyLogResults(t *testing.T) { }) addr := testutils.NewAddress() - err := lp.RegisterFilter(logpoller.Filter{ + err := lp.RegisterFilter(ctx, logpoller.Filter{ Name: "Integration test", EventSigs: []common.Hash{EmitterABI.Events["Log1"].ID}, Addresses: []common.Address{addr}, }) require.NoError(t, err) lp.PollAndSaveLogs(ctx, 5) - block, err2 := o.SelectLatestBlock() + block, err2 := o.SelectLatestBlock(ctx) require.NoError(t, err2) assert.Equal(t, int64(298), block.BlockNumber) @@ -1520,7 +1513,7 @@ func TestTooManyLogResults(t *testing.T) { }) lp.PollAndSaveLogs(ctx, 298) - block, err2 = o.SelectLatestBlock() + block, err2 = o.SelectLatestBlock(ctx) require.NoError(t, err2) assert.Equal(t, int64(298), block.BlockNumber) warns := obs.FilterMessageSnippet("halving block range").FilterLevelExact(zapcore.WarnLevel).All() @@ -1549,7 +1542,7 @@ func Test_PollAndQueryFinalizedBlocks(t *testing.T) { th := SetupTH(t, lpOpts) eventSig := EmitterABI.Events["Log1"].ID - err := th.LogPoller.RegisterFilter(logpoller.Filter{ + err := th.LogPoller.RegisterFilter(ctx, logpoller.Filter{ Name: "GetBlocks Test", EventSigs: []common.Hash{eventSig}, Addresses: []common.Address{th.EmitterAddress1}}, @@ -1578,6 +1571,7 @@ func Test_PollAndQueryFinalizedBlocks(t *testing.T) { require.Equal(t, int(currentBlock), firstBatchLen+secondBatchLen+2) finalizedLogs, err := th.LogPoller.LogsDataWordGreaterThan( + ctx, eventSig, th.EmitterAddress1, 0, @@ -1589,6 +1583,7 @@ func Test_PollAndQueryFinalizedBlocks(t *testing.T) { numberOfConfirmations := 1 logsByConfs, err := th.LogPoller.LogsDataWordGreaterThan( + ctx, eventSig, th.EmitterAddress1, 0, @@ -1639,7 +1634,7 @@ func Test_PollAndSavePersistsFinalityInBlocks(t *testing.T) { } th := SetupTH(t, lpOpts) // Should return error before the first poll and save - _, err := th.LogPoller.LatestBlock() + _, err := th.LogPoller.LatestBlock(ctx) require.Error(t, err) // Mark first block as finalized @@ -1653,7 +1648,7 @@ func Test_PollAndSavePersistsFinalityInBlocks(t *testing.T) { th.PollAndSaveLogs(ctx, 1) - latestBlock, err := th.LogPoller.LatestBlock() + latestBlock, err := th.LogPoller.LatestBlock(ctx) require.NoError(t, err) require.Equal(t, int64(numberOfBlocks), latestBlock.BlockNumber) require.Equal(t, tt.expectedFinalizedBlock, latestBlock.FinalizedBlockNumber) @@ -1709,7 +1704,7 @@ func Test_CreatedAfterQueriesWithBackfill(t *testing.T) { // First PollAndSave, no filters are registered currentBlock := th.PollAndSaveLogs(ctx, 1) - err = th.LogPoller.RegisterFilter(logpoller.Filter{ + err = th.LogPoller.RegisterFilter(ctx, logpoller.Filter{ Name: "Test Emitter", EventSigs: []common.Hash{EmitterABI.Events["Log1"].ID}, Addresses: []common.Address{th.EmitterAddress1}, @@ -1728,22 +1723,22 @@ func Test_CreatedAfterQueriesWithBackfill(t *testing.T) { // Make sure that all logs are backfilled logs, err := th.LogPoller.Logs( + ctx, 0, currentBlock, EmitterABI.Events["Log1"].ID, th.EmitterAddress1, - pg.WithParentCtx(testutils.Context(t)), ) require.NoError(t, err) require.Len(t, logs, emittedLogs) // We should get all the logs by the block_timestamp logs, err = th.LogPoller.LogsCreatedAfter( + ctx, EmitterABI.Events["Log1"].ID, th.EmitterAddress1, genesisBlockTime, 0, - pg.WithParentCtx(testutils.Context(t)), ) require.NoError(t, err) require.Len(t, logs, emittedLogs) @@ -1792,7 +1787,7 @@ func Test_PruneOldBlocks(t *testing.T) { th := SetupTH(t, lpOpts) for i := 1; i <= tt.blockToCreate; i++ { - err := th.ORM.InsertBlock(utils.RandomBytes32(), int64(i+10), time.Now(), int64(i)) + err := th.ORM.InsertBlock(ctx, utils.RandomBytes32(), int64(i+10), time.Now(), int64(i)) require.NoError(t, err) } @@ -1805,7 +1800,7 @@ func Test_PruneOldBlocks(t *testing.T) { allDeleted, err := th.LogPoller.PruneOldBlocks(ctx) require.NoError(t, err) assert.True(t, allDeleted) - blocks, err := th.ORM.GetBlocksRange(0, math.MaxInt64, pg.WithParentCtx(ctx)) + blocks, err := th.ORM.GetBlocksRange(ctx, 0, math.MaxInt64) require.NoError(t, err) assert.Len(t, blocks, tt.blocksLeft) }) diff --git a/core/chains/evm/logpoller/mocks/log_poller.go b/core/chains/evm/logpoller/mocks/log_poller.go index 65d808b98d5..2bf24881405 100644 --- a/core/chains/evm/logpoller/mocks/log_poller.go +++ b/core/chains/evm/logpoller/mocks/log_poller.go @@ -11,8 +11,6 @@ import ( mock "github.com/stretchr/testify/mock" - pg "github.com/smartcontractkit/chainlink/v2/core/services/pg" - time "time" ) @@ -39,16 +37,9 @@ func (_m *LogPoller) Close() error { return r0 } -// GetBlocksRange provides a mock function with given fields: ctx, numbers, qopts -func (_m *LogPoller) GetBlocksRange(ctx context.Context, numbers []uint64, qopts ...pg.QOpt) ([]logpoller.LogPollerBlock, error) { - _va := make([]interface{}, len(qopts)) - for _i := range qopts { - _va[_i] = qopts[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, numbers) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) +// GetBlocksRange provides a mock function with given fields: ctx, numbers +func (_m *LogPoller) GetBlocksRange(ctx context.Context, numbers []uint64) ([]logpoller.LogPollerBlock, error) { + ret := _m.Called(ctx, numbers) if len(ret) == 0 { panic("no return value specified for GetBlocksRange") @@ -56,19 +47,19 @@ func (_m *LogPoller) GetBlocksRange(ctx context.Context, numbers []uint64, qopts var r0 []logpoller.LogPollerBlock var r1 error - if rf, ok := ret.Get(0).(func(context.Context, []uint64, ...pg.QOpt) ([]logpoller.LogPollerBlock, error)); ok { - return rf(ctx, numbers, qopts...) + if rf, ok := ret.Get(0).(func(context.Context, []uint64) ([]logpoller.LogPollerBlock, error)); ok { + return rf(ctx, numbers) } - if rf, ok := ret.Get(0).(func(context.Context, []uint64, ...pg.QOpt) []logpoller.LogPollerBlock); ok { - r0 = rf(ctx, numbers, qopts...) + if rf, ok := ret.Get(0).(func(context.Context, []uint64) []logpoller.LogPollerBlock); ok { + r0 = rf(ctx, numbers) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]logpoller.LogPollerBlock) } } - if rf, ok := ret.Get(1).(func(context.Context, []uint64, ...pg.QOpt) error); ok { - r1 = rf(ctx, numbers, qopts...) + if rf, ok := ret.Get(1).(func(context.Context, []uint64) error); ok { + r1 = rf(ctx, numbers) } else { r1 = ret.Error(1) } @@ -114,16 +105,9 @@ func (_m *LogPoller) HealthReport() map[string]error { return r0 } -// IndexedLogs provides a mock function with given fields: eventSig, address, topicIndex, topicValues, confs, qopts -func (_m *LogPoller) IndexedLogs(eventSig common.Hash, address common.Address, topicIndex int, topicValues []common.Hash, confs logpoller.Confirmations, qopts ...pg.QOpt) ([]logpoller.Log, error) { - _va := make([]interface{}, len(qopts)) - for _i := range qopts { - _va[_i] = qopts[_i] - } - var _ca []interface{} - _ca = append(_ca, eventSig, address, topicIndex, topicValues, confs) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) +// IndexedLogs provides a mock function with given fields: ctx, eventSig, address, topicIndex, topicValues, confs +func (_m *LogPoller) IndexedLogs(ctx context.Context, eventSig common.Hash, address common.Address, topicIndex int, topicValues []common.Hash, confs logpoller.Confirmations) ([]logpoller.Log, error) { + ret := _m.Called(ctx, eventSig, address, topicIndex, topicValues, confs) if len(ret) == 0 { panic("no return value specified for IndexedLogs") @@ -131,19 +115,19 @@ func (_m *LogPoller) IndexedLogs(eventSig common.Hash, address common.Address, t var r0 []logpoller.Log var r1 error - if rf, ok := ret.Get(0).(func(common.Hash, common.Address, int, []common.Hash, logpoller.Confirmations, ...pg.QOpt) ([]logpoller.Log, error)); ok { - return rf(eventSig, address, topicIndex, topicValues, confs, qopts...) + if rf, ok := ret.Get(0).(func(context.Context, common.Hash, common.Address, int, []common.Hash, logpoller.Confirmations) ([]logpoller.Log, error)); ok { + return rf(ctx, eventSig, address, topicIndex, topicValues, confs) } - if rf, ok := ret.Get(0).(func(common.Hash, common.Address, int, []common.Hash, logpoller.Confirmations, ...pg.QOpt) []logpoller.Log); ok { - r0 = rf(eventSig, address, topicIndex, topicValues, confs, qopts...) + if rf, ok := ret.Get(0).(func(context.Context, common.Hash, common.Address, int, []common.Hash, logpoller.Confirmations) []logpoller.Log); ok { + r0 = rf(ctx, eventSig, address, topicIndex, topicValues, confs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]logpoller.Log) } } - if rf, ok := ret.Get(1).(func(common.Hash, common.Address, int, []common.Hash, logpoller.Confirmations, ...pg.QOpt) error); ok { - r1 = rf(eventSig, address, topicIndex, topicValues, confs, qopts...) + if rf, ok := ret.Get(1).(func(context.Context, common.Hash, common.Address, int, []common.Hash, logpoller.Confirmations) error); ok { + r1 = rf(ctx, eventSig, address, topicIndex, topicValues, confs) } else { r1 = ret.Error(1) } @@ -151,16 +135,9 @@ func (_m *LogPoller) IndexedLogs(eventSig common.Hash, address common.Address, t return r0, r1 } -// IndexedLogsByBlockRange provides a mock function with given fields: start, end, eventSig, address, topicIndex, topicValues, qopts -func (_m *LogPoller) IndexedLogsByBlockRange(start int64, end int64, eventSig common.Hash, address common.Address, topicIndex int, topicValues []common.Hash, qopts ...pg.QOpt) ([]logpoller.Log, error) { - _va := make([]interface{}, len(qopts)) - for _i := range qopts { - _va[_i] = qopts[_i] - } - var _ca []interface{} - _ca = append(_ca, start, end, eventSig, address, topicIndex, topicValues) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) +// IndexedLogsByBlockRange provides a mock function with given fields: ctx, start, end, eventSig, address, topicIndex, topicValues +func (_m *LogPoller) IndexedLogsByBlockRange(ctx context.Context, start int64, end int64, eventSig common.Hash, address common.Address, topicIndex int, topicValues []common.Hash) ([]logpoller.Log, error) { + ret := _m.Called(ctx, start, end, eventSig, address, topicIndex, topicValues) if len(ret) == 0 { panic("no return value specified for IndexedLogsByBlockRange") @@ -168,19 +145,19 @@ func (_m *LogPoller) IndexedLogsByBlockRange(start int64, end int64, eventSig co var r0 []logpoller.Log var r1 error - if rf, ok := ret.Get(0).(func(int64, int64, common.Hash, common.Address, int, []common.Hash, ...pg.QOpt) ([]logpoller.Log, error)); ok { - return rf(start, end, eventSig, address, topicIndex, topicValues, qopts...) + if rf, ok := ret.Get(0).(func(context.Context, int64, int64, common.Hash, common.Address, int, []common.Hash) ([]logpoller.Log, error)); ok { + return rf(ctx, start, end, eventSig, address, topicIndex, topicValues) } - if rf, ok := ret.Get(0).(func(int64, int64, common.Hash, common.Address, int, []common.Hash, ...pg.QOpt) []logpoller.Log); ok { - r0 = rf(start, end, eventSig, address, topicIndex, topicValues, qopts...) + if rf, ok := ret.Get(0).(func(context.Context, int64, int64, common.Hash, common.Address, int, []common.Hash) []logpoller.Log); ok { + r0 = rf(ctx, start, end, eventSig, address, topicIndex, topicValues) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]logpoller.Log) } } - if rf, ok := ret.Get(1).(func(int64, int64, common.Hash, common.Address, int, []common.Hash, ...pg.QOpt) error); ok { - r1 = rf(start, end, eventSig, address, topicIndex, topicValues, qopts...) + if rf, ok := ret.Get(1).(func(context.Context, int64, int64, common.Hash, common.Address, int, []common.Hash) error); ok { + r1 = rf(ctx, start, end, eventSig, address, topicIndex, topicValues) } else { r1 = ret.Error(1) } @@ -188,16 +165,9 @@ func (_m *LogPoller) IndexedLogsByBlockRange(start int64, end int64, eventSig co return r0, r1 } -// IndexedLogsByTxHash provides a mock function with given fields: eventSig, address, txHash, qopts -func (_m *LogPoller) IndexedLogsByTxHash(eventSig common.Hash, address common.Address, txHash common.Hash, qopts ...pg.QOpt) ([]logpoller.Log, error) { - _va := make([]interface{}, len(qopts)) - for _i := range qopts { - _va[_i] = qopts[_i] - } - var _ca []interface{} - _ca = append(_ca, eventSig, address, txHash) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) +// IndexedLogsByTxHash provides a mock function with given fields: ctx, eventSig, address, txHash +func (_m *LogPoller) IndexedLogsByTxHash(ctx context.Context, eventSig common.Hash, address common.Address, txHash common.Hash) ([]logpoller.Log, error) { + ret := _m.Called(ctx, eventSig, address, txHash) if len(ret) == 0 { panic("no return value specified for IndexedLogsByTxHash") @@ -205,19 +175,19 @@ func (_m *LogPoller) IndexedLogsByTxHash(eventSig common.Hash, address common.Ad var r0 []logpoller.Log var r1 error - if rf, ok := ret.Get(0).(func(common.Hash, common.Address, common.Hash, ...pg.QOpt) ([]logpoller.Log, error)); ok { - return rf(eventSig, address, txHash, qopts...) + if rf, ok := ret.Get(0).(func(context.Context, common.Hash, common.Address, common.Hash) ([]logpoller.Log, error)); ok { + return rf(ctx, eventSig, address, txHash) } - if rf, ok := ret.Get(0).(func(common.Hash, common.Address, common.Hash, ...pg.QOpt) []logpoller.Log); ok { - r0 = rf(eventSig, address, txHash, qopts...) + if rf, ok := ret.Get(0).(func(context.Context, common.Hash, common.Address, common.Hash) []logpoller.Log); ok { + r0 = rf(ctx, eventSig, address, txHash) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]logpoller.Log) } } - if rf, ok := ret.Get(1).(func(common.Hash, common.Address, common.Hash, ...pg.QOpt) error); ok { - r1 = rf(eventSig, address, txHash, qopts...) + if rf, ok := ret.Get(1).(func(context.Context, common.Hash, common.Address, common.Hash) error); ok { + r1 = rf(ctx, eventSig, address, txHash) } else { r1 = ret.Error(1) } @@ -225,16 +195,9 @@ func (_m *LogPoller) IndexedLogsByTxHash(eventSig common.Hash, address common.Ad return r0, r1 } -// IndexedLogsCreatedAfter provides a mock function with given fields: eventSig, address, topicIndex, topicValues, after, confs, qopts -func (_m *LogPoller) IndexedLogsCreatedAfter(eventSig common.Hash, address common.Address, topicIndex int, topicValues []common.Hash, after time.Time, confs logpoller.Confirmations, qopts ...pg.QOpt) ([]logpoller.Log, error) { - _va := make([]interface{}, len(qopts)) - for _i := range qopts { - _va[_i] = qopts[_i] - } - var _ca []interface{} - _ca = append(_ca, eventSig, address, topicIndex, topicValues, after, confs) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) +// IndexedLogsCreatedAfter provides a mock function with given fields: ctx, eventSig, address, topicIndex, topicValues, after, confs +func (_m *LogPoller) IndexedLogsCreatedAfter(ctx context.Context, eventSig common.Hash, address common.Address, topicIndex int, topicValues []common.Hash, after time.Time, confs logpoller.Confirmations) ([]logpoller.Log, error) { + ret := _m.Called(ctx, eventSig, address, topicIndex, topicValues, after, confs) if len(ret) == 0 { panic("no return value specified for IndexedLogsCreatedAfter") @@ -242,19 +205,19 @@ func (_m *LogPoller) IndexedLogsCreatedAfter(eventSig common.Hash, address commo var r0 []logpoller.Log var r1 error - if rf, ok := ret.Get(0).(func(common.Hash, common.Address, int, []common.Hash, time.Time, logpoller.Confirmations, ...pg.QOpt) ([]logpoller.Log, error)); ok { - return rf(eventSig, address, topicIndex, topicValues, after, confs, qopts...) + if rf, ok := ret.Get(0).(func(context.Context, common.Hash, common.Address, int, []common.Hash, time.Time, logpoller.Confirmations) ([]logpoller.Log, error)); ok { + return rf(ctx, eventSig, address, topicIndex, topicValues, after, confs) } - if rf, ok := ret.Get(0).(func(common.Hash, common.Address, int, []common.Hash, time.Time, logpoller.Confirmations, ...pg.QOpt) []logpoller.Log); ok { - r0 = rf(eventSig, address, topicIndex, topicValues, after, confs, qopts...) + if rf, ok := ret.Get(0).(func(context.Context, common.Hash, common.Address, int, []common.Hash, time.Time, logpoller.Confirmations) []logpoller.Log); ok { + r0 = rf(ctx, eventSig, address, topicIndex, topicValues, after, confs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]logpoller.Log) } } - if rf, ok := ret.Get(1).(func(common.Hash, common.Address, int, []common.Hash, time.Time, logpoller.Confirmations, ...pg.QOpt) error); ok { - r1 = rf(eventSig, address, topicIndex, topicValues, after, confs, qopts...) + if rf, ok := ret.Get(1).(func(context.Context, common.Hash, common.Address, int, []common.Hash, time.Time, logpoller.Confirmations) error); ok { + r1 = rf(ctx, eventSig, address, topicIndex, topicValues, after, confs) } else { r1 = ret.Error(1) } @@ -262,16 +225,9 @@ func (_m *LogPoller) IndexedLogsCreatedAfter(eventSig common.Hash, address commo return r0, r1 } -// IndexedLogsTopicGreaterThan provides a mock function with given fields: eventSig, address, topicIndex, topicValueMin, confs, qopts -func (_m *LogPoller) IndexedLogsTopicGreaterThan(eventSig common.Hash, address common.Address, topicIndex int, topicValueMin common.Hash, confs logpoller.Confirmations, qopts ...pg.QOpt) ([]logpoller.Log, error) { - _va := make([]interface{}, len(qopts)) - for _i := range qopts { - _va[_i] = qopts[_i] - } - var _ca []interface{} - _ca = append(_ca, eventSig, address, topicIndex, topicValueMin, confs) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) +// IndexedLogsTopicGreaterThan provides a mock function with given fields: ctx, eventSig, address, topicIndex, topicValueMin, confs +func (_m *LogPoller) IndexedLogsTopicGreaterThan(ctx context.Context, eventSig common.Hash, address common.Address, topicIndex int, topicValueMin common.Hash, confs logpoller.Confirmations) ([]logpoller.Log, error) { + ret := _m.Called(ctx, eventSig, address, topicIndex, topicValueMin, confs) if len(ret) == 0 { panic("no return value specified for IndexedLogsTopicGreaterThan") @@ -279,19 +235,19 @@ func (_m *LogPoller) IndexedLogsTopicGreaterThan(eventSig common.Hash, address c var r0 []logpoller.Log var r1 error - if rf, ok := ret.Get(0).(func(common.Hash, common.Address, int, common.Hash, logpoller.Confirmations, ...pg.QOpt) ([]logpoller.Log, error)); ok { - return rf(eventSig, address, topicIndex, topicValueMin, confs, qopts...) + if rf, ok := ret.Get(0).(func(context.Context, common.Hash, common.Address, int, common.Hash, logpoller.Confirmations) ([]logpoller.Log, error)); ok { + return rf(ctx, eventSig, address, topicIndex, topicValueMin, confs) } - if rf, ok := ret.Get(0).(func(common.Hash, common.Address, int, common.Hash, logpoller.Confirmations, ...pg.QOpt) []logpoller.Log); ok { - r0 = rf(eventSig, address, topicIndex, topicValueMin, confs, qopts...) + if rf, ok := ret.Get(0).(func(context.Context, common.Hash, common.Address, int, common.Hash, logpoller.Confirmations) []logpoller.Log); ok { + r0 = rf(ctx, eventSig, address, topicIndex, topicValueMin, confs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]logpoller.Log) } } - if rf, ok := ret.Get(1).(func(common.Hash, common.Address, int, common.Hash, logpoller.Confirmations, ...pg.QOpt) error); ok { - r1 = rf(eventSig, address, topicIndex, topicValueMin, confs, qopts...) + if rf, ok := ret.Get(1).(func(context.Context, common.Hash, common.Address, int, common.Hash, logpoller.Confirmations) error); ok { + r1 = rf(ctx, eventSig, address, topicIndex, topicValueMin, confs) } else { r1 = ret.Error(1) } @@ -299,16 +255,9 @@ func (_m *LogPoller) IndexedLogsTopicGreaterThan(eventSig common.Hash, address c return r0, r1 } -// IndexedLogsTopicRange provides a mock function with given fields: eventSig, address, topicIndex, topicValueMin, topicValueMax, confs, qopts -func (_m *LogPoller) IndexedLogsTopicRange(eventSig common.Hash, address common.Address, topicIndex int, topicValueMin common.Hash, topicValueMax common.Hash, confs logpoller.Confirmations, qopts ...pg.QOpt) ([]logpoller.Log, error) { - _va := make([]interface{}, len(qopts)) - for _i := range qopts { - _va[_i] = qopts[_i] - } - var _ca []interface{} - _ca = append(_ca, eventSig, address, topicIndex, topicValueMin, topicValueMax, confs) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) +// IndexedLogsTopicRange provides a mock function with given fields: ctx, eventSig, address, topicIndex, topicValueMin, topicValueMax, confs +func (_m *LogPoller) IndexedLogsTopicRange(ctx context.Context, eventSig common.Hash, address common.Address, topicIndex int, topicValueMin common.Hash, topicValueMax common.Hash, confs logpoller.Confirmations) ([]logpoller.Log, error) { + ret := _m.Called(ctx, eventSig, address, topicIndex, topicValueMin, topicValueMax, confs) if len(ret) == 0 { panic("no return value specified for IndexedLogsTopicRange") @@ -316,19 +265,19 @@ func (_m *LogPoller) IndexedLogsTopicRange(eventSig common.Hash, address common. var r0 []logpoller.Log var r1 error - if rf, ok := ret.Get(0).(func(common.Hash, common.Address, int, common.Hash, common.Hash, logpoller.Confirmations, ...pg.QOpt) ([]logpoller.Log, error)); ok { - return rf(eventSig, address, topicIndex, topicValueMin, topicValueMax, confs, qopts...) + if rf, ok := ret.Get(0).(func(context.Context, common.Hash, common.Address, int, common.Hash, common.Hash, logpoller.Confirmations) ([]logpoller.Log, error)); ok { + return rf(ctx, eventSig, address, topicIndex, topicValueMin, topicValueMax, confs) } - if rf, ok := ret.Get(0).(func(common.Hash, common.Address, int, common.Hash, common.Hash, logpoller.Confirmations, ...pg.QOpt) []logpoller.Log); ok { - r0 = rf(eventSig, address, topicIndex, topicValueMin, topicValueMax, confs, qopts...) + if rf, ok := ret.Get(0).(func(context.Context, common.Hash, common.Address, int, common.Hash, common.Hash, logpoller.Confirmations) []logpoller.Log); ok { + r0 = rf(ctx, eventSig, address, topicIndex, topicValueMin, topicValueMax, confs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]logpoller.Log) } } - if rf, ok := ret.Get(1).(func(common.Hash, common.Address, int, common.Hash, common.Hash, logpoller.Confirmations, ...pg.QOpt) error); ok { - r1 = rf(eventSig, address, topicIndex, topicValueMin, topicValueMax, confs, qopts...) + if rf, ok := ret.Get(1).(func(context.Context, common.Hash, common.Address, int, common.Hash, common.Hash, logpoller.Confirmations) error); ok { + r1 = rf(ctx, eventSig, address, topicIndex, topicValueMin, topicValueMax, confs) } else { r1 = ret.Error(1) } @@ -336,16 +285,9 @@ func (_m *LogPoller) IndexedLogsTopicRange(eventSig common.Hash, address common. return r0, r1 } -// IndexedLogsWithSigsExcluding provides a mock function with given fields: address, eventSigA, eventSigB, topicIndex, fromBlock, toBlock, confs, qopts -func (_m *LogPoller) IndexedLogsWithSigsExcluding(address common.Address, eventSigA common.Hash, eventSigB common.Hash, topicIndex int, fromBlock int64, toBlock int64, confs logpoller.Confirmations, qopts ...pg.QOpt) ([]logpoller.Log, error) { - _va := make([]interface{}, len(qopts)) - for _i := range qopts { - _va[_i] = qopts[_i] - } - var _ca []interface{} - _ca = append(_ca, address, eventSigA, eventSigB, topicIndex, fromBlock, toBlock, confs) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) +// IndexedLogsWithSigsExcluding provides a mock function with given fields: ctx, address, eventSigA, eventSigB, topicIndex, fromBlock, toBlock, confs +func (_m *LogPoller) IndexedLogsWithSigsExcluding(ctx context.Context, address common.Address, eventSigA common.Hash, eventSigB common.Hash, topicIndex int, fromBlock int64, toBlock int64, confs logpoller.Confirmations) ([]logpoller.Log, error) { + ret := _m.Called(ctx, address, eventSigA, eventSigB, topicIndex, fromBlock, toBlock, confs) if len(ret) == 0 { panic("no return value specified for IndexedLogsWithSigsExcluding") @@ -353,19 +295,19 @@ func (_m *LogPoller) IndexedLogsWithSigsExcluding(address common.Address, eventS var r0 []logpoller.Log var r1 error - if rf, ok := ret.Get(0).(func(common.Address, common.Hash, common.Hash, int, int64, int64, logpoller.Confirmations, ...pg.QOpt) ([]logpoller.Log, error)); ok { - return rf(address, eventSigA, eventSigB, topicIndex, fromBlock, toBlock, confs, qopts...) + if rf, ok := ret.Get(0).(func(context.Context, common.Address, common.Hash, common.Hash, int, int64, int64, logpoller.Confirmations) ([]logpoller.Log, error)); ok { + return rf(ctx, address, eventSigA, eventSigB, topicIndex, fromBlock, toBlock, confs) } - if rf, ok := ret.Get(0).(func(common.Address, common.Hash, common.Hash, int, int64, int64, logpoller.Confirmations, ...pg.QOpt) []logpoller.Log); ok { - r0 = rf(address, eventSigA, eventSigB, topicIndex, fromBlock, toBlock, confs, qopts...) + if rf, ok := ret.Get(0).(func(context.Context, common.Address, common.Hash, common.Hash, int, int64, int64, logpoller.Confirmations) []logpoller.Log); ok { + r0 = rf(ctx, address, eventSigA, eventSigB, topicIndex, fromBlock, toBlock, confs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]logpoller.Log) } } - if rf, ok := ret.Get(1).(func(common.Address, common.Hash, common.Hash, int, int64, int64, logpoller.Confirmations, ...pg.QOpt) error); ok { - r1 = rf(address, eventSigA, eventSigB, topicIndex, fromBlock, toBlock, confs, qopts...) + if rf, ok := ret.Get(1).(func(context.Context, common.Address, common.Hash, common.Hash, int, int64, int64, logpoller.Confirmations) error); ok { + r1 = rf(ctx, address, eventSigA, eventSigB, topicIndex, fromBlock, toBlock, confs) } else { r1 = ret.Error(1) } @@ -373,15 +315,9 @@ func (_m *LogPoller) IndexedLogsWithSigsExcluding(address common.Address, eventS return r0, r1 } -// LatestBlock provides a mock function with given fields: qopts -func (_m *LogPoller) LatestBlock(qopts ...pg.QOpt) (logpoller.LogPollerBlock, error) { - _va := make([]interface{}, len(qopts)) - for _i := range qopts { - _va[_i] = qopts[_i] - } - var _ca []interface{} - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) +// LatestBlock provides a mock function with given fields: ctx +func (_m *LogPoller) LatestBlock(ctx context.Context) (logpoller.LogPollerBlock, error) { + ret := _m.Called(ctx) if len(ret) == 0 { panic("no return value specified for LatestBlock") @@ -389,17 +325,17 @@ func (_m *LogPoller) LatestBlock(qopts ...pg.QOpt) (logpoller.LogPollerBlock, er var r0 logpoller.LogPollerBlock var r1 error - if rf, ok := ret.Get(0).(func(...pg.QOpt) (logpoller.LogPollerBlock, error)); ok { - return rf(qopts...) + if rf, ok := ret.Get(0).(func(context.Context) (logpoller.LogPollerBlock, error)); ok { + return rf(ctx) } - if rf, ok := ret.Get(0).(func(...pg.QOpt) logpoller.LogPollerBlock); ok { - r0 = rf(qopts...) + if rf, ok := ret.Get(0).(func(context.Context) logpoller.LogPollerBlock); ok { + r0 = rf(ctx) } else { r0 = ret.Get(0).(logpoller.LogPollerBlock) } - if rf, ok := ret.Get(1).(func(...pg.QOpt) error); ok { - r1 = rf(qopts...) + if rf, ok := ret.Get(1).(func(context.Context) error); ok { + r1 = rf(ctx) } else { r1 = ret.Error(1) } @@ -407,16 +343,9 @@ func (_m *LogPoller) LatestBlock(qopts ...pg.QOpt) (logpoller.LogPollerBlock, er return r0, r1 } -// LatestBlockByEventSigsAddrsWithConfs provides a mock function with given fields: fromBlock, eventSigs, addresses, confs, qopts -func (_m *LogPoller) LatestBlockByEventSigsAddrsWithConfs(fromBlock int64, eventSigs []common.Hash, addresses []common.Address, confs logpoller.Confirmations, qopts ...pg.QOpt) (int64, error) { - _va := make([]interface{}, len(qopts)) - for _i := range qopts { - _va[_i] = qopts[_i] - } - var _ca []interface{} - _ca = append(_ca, fromBlock, eventSigs, addresses, confs) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) +// LatestBlockByEventSigsAddrsWithConfs provides a mock function with given fields: ctx, fromBlock, eventSigs, addresses, confs +func (_m *LogPoller) LatestBlockByEventSigsAddrsWithConfs(ctx context.Context, fromBlock int64, eventSigs []common.Hash, addresses []common.Address, confs logpoller.Confirmations) (int64, error) { + ret := _m.Called(ctx, fromBlock, eventSigs, addresses, confs) if len(ret) == 0 { panic("no return value specified for LatestBlockByEventSigsAddrsWithConfs") @@ -424,17 +353,17 @@ func (_m *LogPoller) LatestBlockByEventSigsAddrsWithConfs(fromBlock int64, event var r0 int64 var r1 error - if rf, ok := ret.Get(0).(func(int64, []common.Hash, []common.Address, logpoller.Confirmations, ...pg.QOpt) (int64, error)); ok { - return rf(fromBlock, eventSigs, addresses, confs, qopts...) + if rf, ok := ret.Get(0).(func(context.Context, int64, []common.Hash, []common.Address, logpoller.Confirmations) (int64, error)); ok { + return rf(ctx, fromBlock, eventSigs, addresses, confs) } - if rf, ok := ret.Get(0).(func(int64, []common.Hash, []common.Address, logpoller.Confirmations, ...pg.QOpt) int64); ok { - r0 = rf(fromBlock, eventSigs, addresses, confs, qopts...) + if rf, ok := ret.Get(0).(func(context.Context, int64, []common.Hash, []common.Address, logpoller.Confirmations) int64); ok { + r0 = rf(ctx, fromBlock, eventSigs, addresses, confs) } else { r0 = ret.Get(0).(int64) } - if rf, ok := ret.Get(1).(func(int64, []common.Hash, []common.Address, logpoller.Confirmations, ...pg.QOpt) error); ok { - r1 = rf(fromBlock, eventSigs, addresses, confs, qopts...) + if rf, ok := ret.Get(1).(func(context.Context, int64, []common.Hash, []common.Address, logpoller.Confirmations) error); ok { + r1 = rf(ctx, fromBlock, eventSigs, addresses, confs) } else { r1 = ret.Error(1) } @@ -442,16 +371,9 @@ func (_m *LogPoller) LatestBlockByEventSigsAddrsWithConfs(fromBlock int64, event return r0, r1 } -// LatestLogByEventSigWithConfs provides a mock function with given fields: eventSig, address, confs, qopts -func (_m *LogPoller) LatestLogByEventSigWithConfs(eventSig common.Hash, address common.Address, confs logpoller.Confirmations, qopts ...pg.QOpt) (*logpoller.Log, error) { - _va := make([]interface{}, len(qopts)) - for _i := range qopts { - _va[_i] = qopts[_i] - } - var _ca []interface{} - _ca = append(_ca, eventSig, address, confs) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) +// LatestLogByEventSigWithConfs provides a mock function with given fields: ctx, eventSig, address, confs +func (_m *LogPoller) LatestLogByEventSigWithConfs(ctx context.Context, eventSig common.Hash, address common.Address, confs logpoller.Confirmations) (*logpoller.Log, error) { + ret := _m.Called(ctx, eventSig, address, confs) if len(ret) == 0 { panic("no return value specified for LatestLogByEventSigWithConfs") @@ -459,19 +381,19 @@ func (_m *LogPoller) LatestLogByEventSigWithConfs(eventSig common.Hash, address var r0 *logpoller.Log var r1 error - if rf, ok := ret.Get(0).(func(common.Hash, common.Address, logpoller.Confirmations, ...pg.QOpt) (*logpoller.Log, error)); ok { - return rf(eventSig, address, confs, qopts...) + if rf, ok := ret.Get(0).(func(context.Context, common.Hash, common.Address, logpoller.Confirmations) (*logpoller.Log, error)); ok { + return rf(ctx, eventSig, address, confs) } - if rf, ok := ret.Get(0).(func(common.Hash, common.Address, logpoller.Confirmations, ...pg.QOpt) *logpoller.Log); ok { - r0 = rf(eventSig, address, confs, qopts...) + if rf, ok := ret.Get(0).(func(context.Context, common.Hash, common.Address, logpoller.Confirmations) *logpoller.Log); ok { + r0 = rf(ctx, eventSig, address, confs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*logpoller.Log) } } - if rf, ok := ret.Get(1).(func(common.Hash, common.Address, logpoller.Confirmations, ...pg.QOpt) error); ok { - r1 = rf(eventSig, address, confs, qopts...) + if rf, ok := ret.Get(1).(func(context.Context, common.Hash, common.Address, logpoller.Confirmations) error); ok { + r1 = rf(ctx, eventSig, address, confs) } else { r1 = ret.Error(1) } @@ -479,16 +401,9 @@ func (_m *LogPoller) LatestLogByEventSigWithConfs(eventSig common.Hash, address return r0, r1 } -// LatestLogEventSigsAddrsWithConfs provides a mock function with given fields: fromBlock, eventSigs, addresses, confs, qopts -func (_m *LogPoller) LatestLogEventSigsAddrsWithConfs(fromBlock int64, eventSigs []common.Hash, addresses []common.Address, confs logpoller.Confirmations, qopts ...pg.QOpt) ([]logpoller.Log, error) { - _va := make([]interface{}, len(qopts)) - for _i := range qopts { - _va[_i] = qopts[_i] - } - var _ca []interface{} - _ca = append(_ca, fromBlock, eventSigs, addresses, confs) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) +// LatestLogEventSigsAddrsWithConfs provides a mock function with given fields: ctx, fromBlock, eventSigs, addresses, confs +func (_m *LogPoller) LatestLogEventSigsAddrsWithConfs(ctx context.Context, fromBlock int64, eventSigs []common.Hash, addresses []common.Address, confs logpoller.Confirmations) ([]logpoller.Log, error) { + ret := _m.Called(ctx, fromBlock, eventSigs, addresses, confs) if len(ret) == 0 { panic("no return value specified for LatestLogEventSigsAddrsWithConfs") @@ -496,19 +411,19 @@ func (_m *LogPoller) LatestLogEventSigsAddrsWithConfs(fromBlock int64, eventSigs var r0 []logpoller.Log var r1 error - if rf, ok := ret.Get(0).(func(int64, []common.Hash, []common.Address, logpoller.Confirmations, ...pg.QOpt) ([]logpoller.Log, error)); ok { - return rf(fromBlock, eventSigs, addresses, confs, qopts...) + if rf, ok := ret.Get(0).(func(context.Context, int64, []common.Hash, []common.Address, logpoller.Confirmations) ([]logpoller.Log, error)); ok { + return rf(ctx, fromBlock, eventSigs, addresses, confs) } - if rf, ok := ret.Get(0).(func(int64, []common.Hash, []common.Address, logpoller.Confirmations, ...pg.QOpt) []logpoller.Log); ok { - r0 = rf(fromBlock, eventSigs, addresses, confs, qopts...) + if rf, ok := ret.Get(0).(func(context.Context, int64, []common.Hash, []common.Address, logpoller.Confirmations) []logpoller.Log); ok { + r0 = rf(ctx, fromBlock, eventSigs, addresses, confs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]logpoller.Log) } } - if rf, ok := ret.Get(1).(func(int64, []common.Hash, []common.Address, logpoller.Confirmations, ...pg.QOpt) error); ok { - r1 = rf(fromBlock, eventSigs, addresses, confs, qopts...) + if rf, ok := ret.Get(1).(func(context.Context, int64, []common.Hash, []common.Address, logpoller.Confirmations) error); ok { + r1 = rf(ctx, fromBlock, eventSigs, addresses, confs) } else { r1 = ret.Error(1) } @@ -516,16 +431,9 @@ func (_m *LogPoller) LatestLogEventSigsAddrsWithConfs(fromBlock int64, eventSigs return r0, r1 } -// Logs provides a mock function with given fields: start, end, eventSig, address, qopts -func (_m *LogPoller) Logs(start int64, end int64, eventSig common.Hash, address common.Address, qopts ...pg.QOpt) ([]logpoller.Log, error) { - _va := make([]interface{}, len(qopts)) - for _i := range qopts { - _va[_i] = qopts[_i] - } - var _ca []interface{} - _ca = append(_ca, start, end, eventSig, address) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) +// Logs provides a mock function with given fields: ctx, start, end, eventSig, address +func (_m *LogPoller) Logs(ctx context.Context, start int64, end int64, eventSig common.Hash, address common.Address) ([]logpoller.Log, error) { + ret := _m.Called(ctx, start, end, eventSig, address) if len(ret) == 0 { panic("no return value specified for Logs") @@ -533,19 +441,19 @@ func (_m *LogPoller) Logs(start int64, end int64, eventSig common.Hash, address var r0 []logpoller.Log var r1 error - if rf, ok := ret.Get(0).(func(int64, int64, common.Hash, common.Address, ...pg.QOpt) ([]logpoller.Log, error)); ok { - return rf(start, end, eventSig, address, qopts...) + if rf, ok := ret.Get(0).(func(context.Context, int64, int64, common.Hash, common.Address) ([]logpoller.Log, error)); ok { + return rf(ctx, start, end, eventSig, address) } - if rf, ok := ret.Get(0).(func(int64, int64, common.Hash, common.Address, ...pg.QOpt) []logpoller.Log); ok { - r0 = rf(start, end, eventSig, address, qopts...) + if rf, ok := ret.Get(0).(func(context.Context, int64, int64, common.Hash, common.Address) []logpoller.Log); ok { + r0 = rf(ctx, start, end, eventSig, address) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]logpoller.Log) } } - if rf, ok := ret.Get(1).(func(int64, int64, common.Hash, common.Address, ...pg.QOpt) error); ok { - r1 = rf(start, end, eventSig, address, qopts...) + if rf, ok := ret.Get(1).(func(context.Context, int64, int64, common.Hash, common.Address) error); ok { + r1 = rf(ctx, start, end, eventSig, address) } else { r1 = ret.Error(1) } @@ -553,16 +461,9 @@ func (_m *LogPoller) Logs(start int64, end int64, eventSig common.Hash, address return r0, r1 } -// LogsCreatedAfter provides a mock function with given fields: eventSig, address, _a2, confs, qopts -func (_m *LogPoller) LogsCreatedAfter(eventSig common.Hash, address common.Address, _a2 time.Time, confs logpoller.Confirmations, qopts ...pg.QOpt) ([]logpoller.Log, error) { - _va := make([]interface{}, len(qopts)) - for _i := range qopts { - _va[_i] = qopts[_i] - } - var _ca []interface{} - _ca = append(_ca, eventSig, address, _a2, confs) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) +// LogsCreatedAfter provides a mock function with given fields: ctx, eventSig, address, _a3, confs +func (_m *LogPoller) LogsCreatedAfter(ctx context.Context, eventSig common.Hash, address common.Address, _a3 time.Time, confs logpoller.Confirmations) ([]logpoller.Log, error) { + ret := _m.Called(ctx, eventSig, address, _a3, confs) if len(ret) == 0 { panic("no return value specified for LogsCreatedAfter") @@ -570,19 +471,19 @@ func (_m *LogPoller) LogsCreatedAfter(eventSig common.Hash, address common.Addre var r0 []logpoller.Log var r1 error - if rf, ok := ret.Get(0).(func(common.Hash, common.Address, time.Time, logpoller.Confirmations, ...pg.QOpt) ([]logpoller.Log, error)); ok { - return rf(eventSig, address, _a2, confs, qopts...) + if rf, ok := ret.Get(0).(func(context.Context, common.Hash, common.Address, time.Time, logpoller.Confirmations) ([]logpoller.Log, error)); ok { + return rf(ctx, eventSig, address, _a3, confs) } - if rf, ok := ret.Get(0).(func(common.Hash, common.Address, time.Time, logpoller.Confirmations, ...pg.QOpt) []logpoller.Log); ok { - r0 = rf(eventSig, address, _a2, confs, qopts...) + if rf, ok := ret.Get(0).(func(context.Context, common.Hash, common.Address, time.Time, logpoller.Confirmations) []logpoller.Log); ok { + r0 = rf(ctx, eventSig, address, _a3, confs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]logpoller.Log) } } - if rf, ok := ret.Get(1).(func(common.Hash, common.Address, time.Time, logpoller.Confirmations, ...pg.QOpt) error); ok { - r1 = rf(eventSig, address, _a2, confs, qopts...) + if rf, ok := ret.Get(1).(func(context.Context, common.Hash, common.Address, time.Time, logpoller.Confirmations) error); ok { + r1 = rf(ctx, eventSig, address, _a3, confs) } else { r1 = ret.Error(1) } @@ -590,16 +491,9 @@ func (_m *LogPoller) LogsCreatedAfter(eventSig common.Hash, address common.Addre return r0, r1 } -// LogsDataWordBetween provides a mock function with given fields: eventSig, address, wordIndexMin, wordIndexMax, wordValue, confs, qopts -func (_m *LogPoller) LogsDataWordBetween(eventSig common.Hash, address common.Address, wordIndexMin int, wordIndexMax int, wordValue common.Hash, confs logpoller.Confirmations, qopts ...pg.QOpt) ([]logpoller.Log, error) { - _va := make([]interface{}, len(qopts)) - for _i := range qopts { - _va[_i] = qopts[_i] - } - var _ca []interface{} - _ca = append(_ca, eventSig, address, wordIndexMin, wordIndexMax, wordValue, confs) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) +// LogsDataWordBetween provides a mock function with given fields: ctx, eventSig, address, wordIndexMin, wordIndexMax, wordValue, confs +func (_m *LogPoller) LogsDataWordBetween(ctx context.Context, eventSig common.Hash, address common.Address, wordIndexMin int, wordIndexMax int, wordValue common.Hash, confs logpoller.Confirmations) ([]logpoller.Log, error) { + ret := _m.Called(ctx, eventSig, address, wordIndexMin, wordIndexMax, wordValue, confs) if len(ret) == 0 { panic("no return value specified for LogsDataWordBetween") @@ -607,19 +501,19 @@ func (_m *LogPoller) LogsDataWordBetween(eventSig common.Hash, address common.Ad var r0 []logpoller.Log var r1 error - if rf, ok := ret.Get(0).(func(common.Hash, common.Address, int, int, common.Hash, logpoller.Confirmations, ...pg.QOpt) ([]logpoller.Log, error)); ok { - return rf(eventSig, address, wordIndexMin, wordIndexMax, wordValue, confs, qopts...) + if rf, ok := ret.Get(0).(func(context.Context, common.Hash, common.Address, int, int, common.Hash, logpoller.Confirmations) ([]logpoller.Log, error)); ok { + return rf(ctx, eventSig, address, wordIndexMin, wordIndexMax, wordValue, confs) } - if rf, ok := ret.Get(0).(func(common.Hash, common.Address, int, int, common.Hash, logpoller.Confirmations, ...pg.QOpt) []logpoller.Log); ok { - r0 = rf(eventSig, address, wordIndexMin, wordIndexMax, wordValue, confs, qopts...) + if rf, ok := ret.Get(0).(func(context.Context, common.Hash, common.Address, int, int, common.Hash, logpoller.Confirmations) []logpoller.Log); ok { + r0 = rf(ctx, eventSig, address, wordIndexMin, wordIndexMax, wordValue, confs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]logpoller.Log) } } - if rf, ok := ret.Get(1).(func(common.Hash, common.Address, int, int, common.Hash, logpoller.Confirmations, ...pg.QOpt) error); ok { - r1 = rf(eventSig, address, wordIndexMin, wordIndexMax, wordValue, confs, qopts...) + if rf, ok := ret.Get(1).(func(context.Context, common.Hash, common.Address, int, int, common.Hash, logpoller.Confirmations) error); ok { + r1 = rf(ctx, eventSig, address, wordIndexMin, wordIndexMax, wordValue, confs) } else { r1 = ret.Error(1) } @@ -627,16 +521,9 @@ func (_m *LogPoller) LogsDataWordBetween(eventSig common.Hash, address common.Ad return r0, r1 } -// LogsDataWordGreaterThan provides a mock function with given fields: eventSig, address, wordIndex, wordValueMin, confs, qopts -func (_m *LogPoller) LogsDataWordGreaterThan(eventSig common.Hash, address common.Address, wordIndex int, wordValueMin common.Hash, confs logpoller.Confirmations, qopts ...pg.QOpt) ([]logpoller.Log, error) { - _va := make([]interface{}, len(qopts)) - for _i := range qopts { - _va[_i] = qopts[_i] - } - var _ca []interface{} - _ca = append(_ca, eventSig, address, wordIndex, wordValueMin, confs) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) +// LogsDataWordGreaterThan provides a mock function with given fields: ctx, eventSig, address, wordIndex, wordValueMin, confs +func (_m *LogPoller) LogsDataWordGreaterThan(ctx context.Context, eventSig common.Hash, address common.Address, wordIndex int, wordValueMin common.Hash, confs logpoller.Confirmations) ([]logpoller.Log, error) { + ret := _m.Called(ctx, eventSig, address, wordIndex, wordValueMin, confs) if len(ret) == 0 { panic("no return value specified for LogsDataWordGreaterThan") @@ -644,19 +531,19 @@ func (_m *LogPoller) LogsDataWordGreaterThan(eventSig common.Hash, address commo var r0 []logpoller.Log var r1 error - if rf, ok := ret.Get(0).(func(common.Hash, common.Address, int, common.Hash, logpoller.Confirmations, ...pg.QOpt) ([]logpoller.Log, error)); ok { - return rf(eventSig, address, wordIndex, wordValueMin, confs, qopts...) + if rf, ok := ret.Get(0).(func(context.Context, common.Hash, common.Address, int, common.Hash, logpoller.Confirmations) ([]logpoller.Log, error)); ok { + return rf(ctx, eventSig, address, wordIndex, wordValueMin, confs) } - if rf, ok := ret.Get(0).(func(common.Hash, common.Address, int, common.Hash, logpoller.Confirmations, ...pg.QOpt) []logpoller.Log); ok { - r0 = rf(eventSig, address, wordIndex, wordValueMin, confs, qopts...) + if rf, ok := ret.Get(0).(func(context.Context, common.Hash, common.Address, int, common.Hash, logpoller.Confirmations) []logpoller.Log); ok { + r0 = rf(ctx, eventSig, address, wordIndex, wordValueMin, confs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]logpoller.Log) } } - if rf, ok := ret.Get(1).(func(common.Hash, common.Address, int, common.Hash, logpoller.Confirmations, ...pg.QOpt) error); ok { - r1 = rf(eventSig, address, wordIndex, wordValueMin, confs, qopts...) + if rf, ok := ret.Get(1).(func(context.Context, common.Hash, common.Address, int, common.Hash, logpoller.Confirmations) error); ok { + r1 = rf(ctx, eventSig, address, wordIndex, wordValueMin, confs) } else { r1 = ret.Error(1) } @@ -664,16 +551,9 @@ func (_m *LogPoller) LogsDataWordGreaterThan(eventSig common.Hash, address commo return r0, r1 } -// LogsDataWordRange provides a mock function with given fields: eventSig, address, wordIndex, wordValueMin, wordValueMax, confs, qopts -func (_m *LogPoller) LogsDataWordRange(eventSig common.Hash, address common.Address, wordIndex int, wordValueMin common.Hash, wordValueMax common.Hash, confs logpoller.Confirmations, qopts ...pg.QOpt) ([]logpoller.Log, error) { - _va := make([]interface{}, len(qopts)) - for _i := range qopts { - _va[_i] = qopts[_i] - } - var _ca []interface{} - _ca = append(_ca, eventSig, address, wordIndex, wordValueMin, wordValueMax, confs) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) +// LogsDataWordRange provides a mock function with given fields: ctx, eventSig, address, wordIndex, wordValueMin, wordValueMax, confs +func (_m *LogPoller) LogsDataWordRange(ctx context.Context, eventSig common.Hash, address common.Address, wordIndex int, wordValueMin common.Hash, wordValueMax common.Hash, confs logpoller.Confirmations) ([]logpoller.Log, error) { + ret := _m.Called(ctx, eventSig, address, wordIndex, wordValueMin, wordValueMax, confs) if len(ret) == 0 { panic("no return value specified for LogsDataWordRange") @@ -681,19 +561,19 @@ func (_m *LogPoller) LogsDataWordRange(eventSig common.Hash, address common.Addr var r0 []logpoller.Log var r1 error - if rf, ok := ret.Get(0).(func(common.Hash, common.Address, int, common.Hash, common.Hash, logpoller.Confirmations, ...pg.QOpt) ([]logpoller.Log, error)); ok { - return rf(eventSig, address, wordIndex, wordValueMin, wordValueMax, confs, qopts...) + if rf, ok := ret.Get(0).(func(context.Context, common.Hash, common.Address, int, common.Hash, common.Hash, logpoller.Confirmations) ([]logpoller.Log, error)); ok { + return rf(ctx, eventSig, address, wordIndex, wordValueMin, wordValueMax, confs) } - if rf, ok := ret.Get(0).(func(common.Hash, common.Address, int, common.Hash, common.Hash, logpoller.Confirmations, ...pg.QOpt) []logpoller.Log); ok { - r0 = rf(eventSig, address, wordIndex, wordValueMin, wordValueMax, confs, qopts...) + if rf, ok := ret.Get(0).(func(context.Context, common.Hash, common.Address, int, common.Hash, common.Hash, logpoller.Confirmations) []logpoller.Log); ok { + r0 = rf(ctx, eventSig, address, wordIndex, wordValueMin, wordValueMax, confs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]logpoller.Log) } } - if rf, ok := ret.Get(1).(func(common.Hash, common.Address, int, common.Hash, common.Hash, logpoller.Confirmations, ...pg.QOpt) error); ok { - r1 = rf(eventSig, address, wordIndex, wordValueMin, wordValueMax, confs, qopts...) + if rf, ok := ret.Get(1).(func(context.Context, common.Hash, common.Address, int, common.Hash, common.Hash, logpoller.Confirmations) error); ok { + r1 = rf(ctx, eventSig, address, wordIndex, wordValueMin, wordValueMax, confs) } else { r1 = ret.Error(1) } @@ -701,16 +581,9 @@ func (_m *LogPoller) LogsDataWordRange(eventSig common.Hash, address common.Addr return r0, r1 } -// LogsWithSigs provides a mock function with given fields: start, end, eventSigs, address, qopts -func (_m *LogPoller) LogsWithSigs(start int64, end int64, eventSigs []common.Hash, address common.Address, qopts ...pg.QOpt) ([]logpoller.Log, error) { - _va := make([]interface{}, len(qopts)) - for _i := range qopts { - _va[_i] = qopts[_i] - } - var _ca []interface{} - _ca = append(_ca, start, end, eventSigs, address) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) +// LogsWithSigs provides a mock function with given fields: ctx, start, end, eventSigs, address +func (_m *LogPoller) LogsWithSigs(ctx context.Context, start int64, end int64, eventSigs []common.Hash, address common.Address) ([]logpoller.Log, error) { + ret := _m.Called(ctx, start, end, eventSigs, address) if len(ret) == 0 { panic("no return value specified for LogsWithSigs") @@ -718,19 +591,19 @@ func (_m *LogPoller) LogsWithSigs(start int64, end int64, eventSigs []common.Has var r0 []logpoller.Log var r1 error - if rf, ok := ret.Get(0).(func(int64, int64, []common.Hash, common.Address, ...pg.QOpt) ([]logpoller.Log, error)); ok { - return rf(start, end, eventSigs, address, qopts...) + if rf, ok := ret.Get(0).(func(context.Context, int64, int64, []common.Hash, common.Address) ([]logpoller.Log, error)); ok { + return rf(ctx, start, end, eventSigs, address) } - if rf, ok := ret.Get(0).(func(int64, int64, []common.Hash, common.Address, ...pg.QOpt) []logpoller.Log); ok { - r0 = rf(start, end, eventSigs, address, qopts...) + if rf, ok := ret.Get(0).(func(context.Context, int64, int64, []common.Hash, common.Address) []logpoller.Log); ok { + r0 = rf(ctx, start, end, eventSigs, address) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]logpoller.Log) } } - if rf, ok := ret.Get(1).(func(int64, int64, []common.Hash, common.Address, ...pg.QOpt) error); ok { - r1 = rf(start, end, eventSigs, address, qopts...) + if rf, ok := ret.Get(1).(func(context.Context, int64, int64, []common.Hash, common.Address) error); ok { + r1 = rf(ctx, start, end, eventSigs, address) } else { r1 = ret.Error(1) } @@ -774,24 +647,17 @@ func (_m *LogPoller) Ready() error { return r0 } -// RegisterFilter provides a mock function with given fields: filter, qopts -func (_m *LogPoller) RegisterFilter(filter logpoller.Filter, qopts ...pg.QOpt) error { - _va := make([]interface{}, len(qopts)) - for _i := range qopts { - _va[_i] = qopts[_i] - } - var _ca []interface{} - _ca = append(_ca, filter) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) +// RegisterFilter provides a mock function with given fields: ctx, filter +func (_m *LogPoller) RegisterFilter(ctx context.Context, filter logpoller.Filter) error { + ret := _m.Called(ctx, filter) if len(ret) == 0 { panic("no return value specified for RegisterFilter") } var r0 error - if rf, ok := ret.Get(0).(func(logpoller.Filter, ...pg.QOpt) error); ok { - r0 = rf(filter, qopts...) + if rf, ok := ret.Get(0).(func(context.Context, logpoller.Filter) error); ok { + r0 = rf(ctx, filter) } else { r0 = ret.Error(0) } @@ -840,24 +706,17 @@ func (_m *LogPoller) Start(_a0 context.Context) error { return r0 } -// UnregisterFilter provides a mock function with given fields: name, qopts -func (_m *LogPoller) UnregisterFilter(name string, qopts ...pg.QOpt) error { - _va := make([]interface{}, len(qopts)) - for _i := range qopts { - _va[_i] = qopts[_i] - } - var _ca []interface{} - _ca = append(_ca, name) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) +// UnregisterFilter provides a mock function with given fields: ctx, name +func (_m *LogPoller) UnregisterFilter(ctx context.Context, name string) error { + ret := _m.Called(ctx, name) if len(ret) == 0 { panic("no return value specified for UnregisterFilter") } var r0 error - if rf, ok := ret.Get(0).(func(string, ...pg.QOpt) error); ok { - r0 = rf(name, qopts...) + if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { + r0 = rf(ctx, name) } else { r0 = ret.Error(0) } diff --git a/core/chains/evm/logpoller/observability.go b/core/chains/evm/logpoller/observability.go index abb3246585b..07a0f58ce78 100644 --- a/core/chains/evm/logpoller/observability.go +++ b/core/chains/evm/logpoller/observability.go @@ -1,17 +1,16 @@ package logpoller import ( + "context" "math/big" "time" "github.com/ethereum/go-ethereum/common" - "github.com/jmoiron/sqlx" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" "github.com/smartcontractkit/chainlink-common/pkg/logger" - - "github.com/smartcontractkit/chainlink/v2/core/services/pg" + "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" ) type queryType string @@ -77,9 +76,9 @@ type ObservedORM struct { // NewObservedORM creates an observed version of log poller's ORM created by NewORM // Please see ObservedLogPoller for more details on how latencies are measured -func NewObservedORM(chainID *big.Int, db *sqlx.DB, lggr logger.Logger, cfg pg.QConfig) *ObservedORM { +func NewObservedORM(chainID *big.Int, db sqlutil.DataSource, lggr logger.Logger) *ObservedORM { return &ObservedORM{ - ORM: NewORM(chainID, db, lggr, cfg), + ORM: NewORM(chainID, db, lggr), queryDuration: lpQueryDuration, datasetSize: lpQueryDataSets, logsInserted: lpLogsInserted, @@ -88,169 +87,169 @@ func NewObservedORM(chainID *big.Int, db *sqlx.DB, lggr logger.Logger, cfg pg.QC } } -func (o *ObservedORM) InsertLogs(logs []Log, qopts ...pg.QOpt) error { +func (o *ObservedORM) InsertLogs(ctx context.Context, logs []Log) error { err := withObservedExec(o, "InsertLogs", create, func() error { - return o.ORM.InsertLogs(logs, qopts...) + return o.ORM.InsertLogs(ctx, logs) }) trackInsertedLogsAndBlock(o, logs, nil, err) return err } -func (o *ObservedORM) InsertLogsWithBlock(logs []Log, block LogPollerBlock, qopts ...pg.QOpt) error { +func (o *ObservedORM) InsertLogsWithBlock(ctx context.Context, logs []Log, block LogPollerBlock) error { err := withObservedExec(o, "InsertLogsWithBlock", create, func() error { - return o.ORM.InsertLogsWithBlock(logs, block, qopts...) + return o.ORM.InsertLogsWithBlock(ctx, logs, block) }) trackInsertedLogsAndBlock(o, logs, &block, err) return err } -func (o *ObservedORM) InsertFilter(filter Filter, qopts ...pg.QOpt) error { +func (o *ObservedORM) InsertFilter(ctx context.Context, filter Filter) error { return withObservedExec(o, "InsertFilter", create, func() error { - return o.ORM.InsertFilter(filter, qopts...) + return o.ORM.InsertFilter(ctx, filter) }) } -func (o *ObservedORM) LoadFilters(qopts ...pg.QOpt) (map[string]Filter, error) { +func (o *ObservedORM) LoadFilters(ctx context.Context) (map[string]Filter, error) { return withObservedQuery(o, "LoadFilters", func() (map[string]Filter, error) { - return o.ORM.LoadFilters(qopts...) + return o.ORM.LoadFilters(ctx) }) } -func (o *ObservedORM) DeleteFilter(name string, qopts ...pg.QOpt) error { +func (o *ObservedORM) DeleteFilter(ctx context.Context, name string) error { return withObservedExec(o, "DeleteFilter", del, func() error { - return o.ORM.DeleteFilter(name, qopts...) + return o.ORM.DeleteFilter(ctx, name) }) } -func (o *ObservedORM) DeleteBlocksBefore(end int64, limit int64, qopts ...pg.QOpt) (int64, error) { +func (o *ObservedORM) DeleteBlocksBefore(ctx context.Context, end int64, limit int64) (int64, error) { return withObservedExecAndRowsAffected(o, "DeleteBlocksBefore", del, func() (int64, error) { - return o.ORM.DeleteBlocksBefore(end, limit, qopts...) + return o.ORM.DeleteBlocksBefore(ctx, end, limit) }) } -func (o *ObservedORM) DeleteLogsAndBlocksAfter(start int64, qopts ...pg.QOpt) error { +func (o *ObservedORM) DeleteLogsAndBlocksAfter(ctx context.Context, start int64) error { return withObservedExec(o, "DeleteLogsAndBlocksAfter", del, func() error { - return o.ORM.DeleteLogsAndBlocksAfter(start, qopts...) + return o.ORM.DeleteLogsAndBlocksAfter(ctx, start) }) } -func (o *ObservedORM) DeleteExpiredLogs(limit int64, qopts ...pg.QOpt) (int64, error) { +func (o *ObservedORM) DeleteExpiredLogs(ctx context.Context, limit int64) (int64, error) { return withObservedExecAndRowsAffected(o, "DeleteExpiredLogs", del, func() (int64, error) { - return o.ORM.DeleteExpiredLogs(limit, qopts...) + return o.ORM.DeleteExpiredLogs(ctx, limit) }) } -func (o *ObservedORM) SelectBlockByNumber(n int64, qopts ...pg.QOpt) (*LogPollerBlock, error) { +func (o *ObservedORM) SelectBlockByNumber(ctx context.Context, n int64) (*LogPollerBlock, error) { return withObservedQuery(o, "SelectBlockByNumber", func() (*LogPollerBlock, error) { - return o.ORM.SelectBlockByNumber(n, qopts...) + return o.ORM.SelectBlockByNumber(ctx, n) }) } -func (o *ObservedORM) SelectLatestBlock(qopts ...pg.QOpt) (*LogPollerBlock, error) { +func (o *ObservedORM) SelectLatestBlock(ctx context.Context) (*LogPollerBlock, error) { return withObservedQuery(o, "SelectLatestBlock", func() (*LogPollerBlock, error) { - return o.ORM.SelectLatestBlock(qopts...) + return o.ORM.SelectLatestBlock(ctx) }) } -func (o *ObservedORM) SelectLatestLogByEventSigWithConfs(eventSig common.Hash, address common.Address, confs Confirmations, qopts ...pg.QOpt) (*Log, error) { +func (o *ObservedORM) SelectLatestLogByEventSigWithConfs(ctx context.Context, eventSig common.Hash, address common.Address, confs Confirmations) (*Log, error) { return withObservedQuery(o, "SelectLatestLogByEventSigWithConfs", func() (*Log, error) { - return o.ORM.SelectLatestLogByEventSigWithConfs(eventSig, address, confs, qopts...) + return o.ORM.SelectLatestLogByEventSigWithConfs(ctx, eventSig, address, confs) }) } -func (o *ObservedORM) SelectLogsWithSigs(start, end int64, address common.Address, eventSigs []common.Hash, qopts ...pg.QOpt) ([]Log, error) { +func (o *ObservedORM) SelectLogsWithSigs(ctx context.Context, start, end int64, address common.Address, eventSigs []common.Hash) ([]Log, error) { return withObservedQueryAndResults(o, "SelectLogsWithSigs", func() ([]Log, error) { - return o.ORM.SelectLogsWithSigs(start, end, address, eventSigs, qopts...) + return o.ORM.SelectLogsWithSigs(ctx, start, end, address, eventSigs) }) } -func (o *ObservedORM) SelectLogsCreatedAfter(address common.Address, eventSig common.Hash, after time.Time, confs Confirmations, qopts ...pg.QOpt) ([]Log, error) { +func (o *ObservedORM) SelectLogsCreatedAfter(ctx context.Context, address common.Address, eventSig common.Hash, after time.Time, confs Confirmations) ([]Log, error) { return withObservedQueryAndResults(o, "SelectLogsCreatedAfter", func() ([]Log, error) { - return o.ORM.SelectLogsCreatedAfter(address, eventSig, after, confs, qopts...) + return o.ORM.SelectLogsCreatedAfter(ctx, address, eventSig, after, confs) }) } -func (o *ObservedORM) SelectIndexedLogs(address common.Address, eventSig common.Hash, topicIndex int, topicValues []common.Hash, confs Confirmations, qopts ...pg.QOpt) ([]Log, error) { +func (o *ObservedORM) SelectIndexedLogs(ctx context.Context, address common.Address, eventSig common.Hash, topicIndex int, topicValues []common.Hash, confs Confirmations) ([]Log, error) { return withObservedQueryAndResults(o, "SelectIndexedLogs", func() ([]Log, error) { - return o.ORM.SelectIndexedLogs(address, eventSig, topicIndex, topicValues, confs, qopts...) + return o.ORM.SelectIndexedLogs(ctx, address, eventSig, topicIndex, topicValues, confs) }) } -func (o *ObservedORM) SelectIndexedLogsByBlockRange(start, end int64, address common.Address, eventSig common.Hash, topicIndex int, topicValues []common.Hash, qopts ...pg.QOpt) ([]Log, error) { +func (o *ObservedORM) SelectIndexedLogsByBlockRange(ctx context.Context, start, end int64, address common.Address, eventSig common.Hash, topicIndex int, topicValues []common.Hash) ([]Log, error) { return withObservedQueryAndResults(o, "SelectIndexedLogsByBlockRange", func() ([]Log, error) { - return o.ORM.SelectIndexedLogsByBlockRange(start, end, address, eventSig, topicIndex, topicValues, qopts...) + return o.ORM.SelectIndexedLogsByBlockRange(ctx, start, end, address, eventSig, topicIndex, topicValues) }) } -func (o *ObservedORM) SelectIndexedLogsCreatedAfter(address common.Address, eventSig common.Hash, topicIndex int, topicValues []common.Hash, after time.Time, confs Confirmations, qopts ...pg.QOpt) ([]Log, error) { +func (o *ObservedORM) SelectIndexedLogsCreatedAfter(ctx context.Context, address common.Address, eventSig common.Hash, topicIndex int, topicValues []common.Hash, after time.Time, confs Confirmations) ([]Log, error) { return withObservedQueryAndResults(o, "SelectIndexedLogsCreatedAfter", func() ([]Log, error) { - return o.ORM.SelectIndexedLogsCreatedAfter(address, eventSig, topicIndex, topicValues, after, confs, qopts...) + return o.ORM.SelectIndexedLogsCreatedAfter(ctx, address, eventSig, topicIndex, topicValues, after, confs) }) } -func (o *ObservedORM) SelectIndexedLogsWithSigsExcluding(sigA, sigB common.Hash, topicIndex int, address common.Address, startBlock, endBlock int64, confs Confirmations, qopts ...pg.QOpt) ([]Log, error) { +func (o *ObservedORM) SelectIndexedLogsWithSigsExcluding(ctx context.Context, sigA, sigB common.Hash, topicIndex int, address common.Address, startBlock, endBlock int64, confs Confirmations) ([]Log, error) { return withObservedQueryAndResults(o, "SelectIndexedLogsWithSigsExcluding", func() ([]Log, error) { - return o.ORM.SelectIndexedLogsWithSigsExcluding(sigA, sigB, topicIndex, address, startBlock, endBlock, confs, qopts...) + return o.ORM.SelectIndexedLogsWithSigsExcluding(ctx, sigA, sigB, topicIndex, address, startBlock, endBlock, confs) }) } -func (o *ObservedORM) SelectLogs(start, end int64, address common.Address, eventSig common.Hash, qopts ...pg.QOpt) ([]Log, error) { +func (o *ObservedORM) SelectLogs(ctx context.Context, start, end int64, address common.Address, eventSig common.Hash) ([]Log, error) { return withObservedQueryAndResults(o, "SelectLogs", func() ([]Log, error) { - return o.ORM.SelectLogs(start, end, address, eventSig, qopts...) + return o.ORM.SelectLogs(ctx, start, end, address, eventSig) }) } -func (o *ObservedORM) SelectIndexedLogsByTxHash(address common.Address, eventSig common.Hash, txHash common.Hash, qopts ...pg.QOpt) ([]Log, error) { +func (o *ObservedORM) SelectIndexedLogsByTxHash(ctx context.Context, address common.Address, eventSig common.Hash, txHash common.Hash) ([]Log, error) { return withObservedQueryAndResults(o, "SelectIndexedLogsByTxHash", func() ([]Log, error) { - return o.ORM.SelectIndexedLogsByTxHash(address, eventSig, txHash, qopts...) + return o.ORM.SelectIndexedLogsByTxHash(ctx, address, eventSig, txHash) }) } -func (o *ObservedORM) GetBlocksRange(start int64, end int64, qopts ...pg.QOpt) ([]LogPollerBlock, error) { +func (o *ObservedORM) GetBlocksRange(ctx context.Context, start int64, end int64) ([]LogPollerBlock, error) { return withObservedQueryAndResults(o, "GetBlocksRange", func() ([]LogPollerBlock, error) { - return o.ORM.GetBlocksRange(start, end, qopts...) + return o.ORM.GetBlocksRange(ctx, start, end) }) } -func (o *ObservedORM) SelectLatestLogEventSigsAddrsWithConfs(fromBlock int64, addresses []common.Address, eventSigs []common.Hash, confs Confirmations, qopts ...pg.QOpt) ([]Log, error) { +func (o *ObservedORM) SelectLatestLogEventSigsAddrsWithConfs(ctx context.Context, fromBlock int64, addresses []common.Address, eventSigs []common.Hash, confs Confirmations) ([]Log, error) { return withObservedQueryAndResults(o, "SelectLatestLogEventSigsAddrsWithConfs", func() ([]Log, error) { - return o.ORM.SelectLatestLogEventSigsAddrsWithConfs(fromBlock, addresses, eventSigs, confs, qopts...) + return o.ORM.SelectLatestLogEventSigsAddrsWithConfs(ctx, fromBlock, addresses, eventSigs, confs) }) } -func (o *ObservedORM) SelectLatestBlockByEventSigsAddrsWithConfs(fromBlock int64, eventSigs []common.Hash, addresses []common.Address, confs Confirmations, qopts ...pg.QOpt) (int64, error) { +func (o *ObservedORM) SelectLatestBlockByEventSigsAddrsWithConfs(ctx context.Context, fromBlock int64, eventSigs []common.Hash, addresses []common.Address, confs Confirmations) (int64, error) { return withObservedQuery(o, "SelectLatestBlockByEventSigsAddrsWithConfs", func() (int64, error) { - return o.ORM.SelectLatestBlockByEventSigsAddrsWithConfs(fromBlock, eventSigs, addresses, confs, qopts...) + return o.ORM.SelectLatestBlockByEventSigsAddrsWithConfs(ctx, fromBlock, eventSigs, addresses, confs) }) } -func (o *ObservedORM) SelectLogsDataWordRange(address common.Address, eventSig common.Hash, wordIndex int, wordValueMin, wordValueMax common.Hash, confs Confirmations, qopts ...pg.QOpt) ([]Log, error) { +func (o *ObservedORM) SelectLogsDataWordRange(ctx context.Context, address common.Address, eventSig common.Hash, wordIndex int, wordValueMin, wordValueMax common.Hash, confs Confirmations) ([]Log, error) { return withObservedQueryAndResults(o, "SelectLogsDataWordRange", func() ([]Log, error) { - return o.ORM.SelectLogsDataWordRange(address, eventSig, wordIndex, wordValueMin, wordValueMax, confs, qopts...) + return o.ORM.SelectLogsDataWordRange(ctx, address, eventSig, wordIndex, wordValueMin, wordValueMax, confs) }) } -func (o *ObservedORM) SelectLogsDataWordGreaterThan(address common.Address, eventSig common.Hash, wordIndex int, wordValueMin common.Hash, confs Confirmations, qopts ...pg.QOpt) ([]Log, error) { +func (o *ObservedORM) SelectLogsDataWordGreaterThan(ctx context.Context, address common.Address, eventSig common.Hash, wordIndex int, wordValueMin common.Hash, confs Confirmations) ([]Log, error) { return withObservedQueryAndResults(o, "SelectLogsDataWordGreaterThan", func() ([]Log, error) { - return o.ORM.SelectLogsDataWordGreaterThan(address, eventSig, wordIndex, wordValueMin, confs, qopts...) + return o.ORM.SelectLogsDataWordGreaterThan(ctx, address, eventSig, wordIndex, wordValueMin, confs) }) } -func (o *ObservedORM) SelectLogsDataWordBetween(address common.Address, eventSig common.Hash, wordIndexMin int, wordIndexMax int, wordValue common.Hash, confs Confirmations, qopts ...pg.QOpt) ([]Log, error) { +func (o *ObservedORM) SelectLogsDataWordBetween(ctx context.Context, address common.Address, eventSig common.Hash, wordIndexMin int, wordIndexMax int, wordValue common.Hash, confs Confirmations) ([]Log, error) { return withObservedQueryAndResults(o, "SelectLogsDataWordBetween", func() ([]Log, error) { - return o.ORM.SelectLogsDataWordBetween(address, eventSig, wordIndexMin, wordIndexMax, wordValue, confs, qopts...) + return o.ORM.SelectLogsDataWordBetween(ctx, address, eventSig, wordIndexMin, wordIndexMax, wordValue, confs) }) } -func (o *ObservedORM) SelectIndexedLogsTopicGreaterThan(address common.Address, eventSig common.Hash, topicIndex int, topicValueMin common.Hash, confs Confirmations, qopts ...pg.QOpt) ([]Log, error) { +func (o *ObservedORM) SelectIndexedLogsTopicGreaterThan(ctx context.Context, address common.Address, eventSig common.Hash, topicIndex int, topicValueMin common.Hash, confs Confirmations) ([]Log, error) { return withObservedQueryAndResults(o, "SelectIndexedLogsTopicGreaterThan", func() ([]Log, error) { - return o.ORM.SelectIndexedLogsTopicGreaterThan(address, eventSig, topicIndex, topicValueMin, confs, qopts...) + return o.ORM.SelectIndexedLogsTopicGreaterThan(ctx, address, eventSig, topicIndex, topicValueMin, confs) }) } -func (o *ObservedORM) SelectIndexedLogsTopicRange(address common.Address, eventSig common.Hash, topicIndex int, topicValueMin, topicValueMax common.Hash, confs Confirmations, qopts ...pg.QOpt) ([]Log, error) { +func (o *ObservedORM) SelectIndexedLogsTopicRange(ctx context.Context, address common.Address, eventSig common.Hash, topicIndex int, topicValueMin, topicValueMax common.Hash, confs Confirmations) ([]Log, error) { return withObservedQueryAndResults(o, "SelectIndexedLogsTopicRange", func() ([]Log, error) { - return o.ORM.SelectIndexedLogsTopicRange(address, eventSig, topicIndex, topicValueMin, topicValueMax, confs, qopts...) + return o.ORM.SelectIndexedLogsTopicRange(ctx, address, eventSig, topicIndex, topicValueMin, topicValueMax, confs) }) } diff --git a/core/chains/evm/logpoller/observability_test.go b/core/chains/evm/logpoller/observability_test.go index eb81273af2c..78c27b4b8f7 100644 --- a/core/chains/evm/logpoller/observability_test.go +++ b/core/chains/evm/logpoller/observability_test.go @@ -20,7 +20,6 @@ import ( ubig "github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils/big" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest" - "github.com/smartcontractkit/chainlink/v2/core/services/pg" ) func TestMultipleMetricsArePublished(t *testing.T) { @@ -29,19 +28,19 @@ func TestMultipleMetricsArePublished(t *testing.T) { t.Cleanup(func() { resetMetrics(*orm) }) require.Equal(t, 0, testutil.CollectAndCount(orm.queryDuration)) - _, _ = orm.SelectIndexedLogs(common.Address{}, common.Hash{}, 1, []common.Hash{}, 1, pg.WithParentCtx(ctx)) - _, _ = orm.SelectIndexedLogsByBlockRange(0, 1, common.Address{}, common.Hash{}, 1, []common.Hash{}, pg.WithParentCtx(ctx)) - _, _ = orm.SelectIndexedLogsTopicGreaterThan(common.Address{}, common.Hash{}, 1, common.Hash{}, 1, pg.WithParentCtx(ctx)) - _, _ = orm.SelectIndexedLogsTopicRange(common.Address{}, common.Hash{}, 1, common.Hash{}, common.Hash{}, 1, pg.WithParentCtx(ctx)) - _, _ = orm.SelectIndexedLogsWithSigsExcluding(common.Hash{}, common.Hash{}, 1, common.Address{}, 0, 1, 1, pg.WithParentCtx(ctx)) - _, _ = orm.SelectLogsDataWordRange(common.Address{}, common.Hash{}, 0, common.Hash{}, common.Hash{}, 1, pg.WithParentCtx(ctx)) - _, _ = orm.SelectLogsDataWordGreaterThan(common.Address{}, common.Hash{}, 0, common.Hash{}, 1, pg.WithParentCtx(ctx)) - _, _ = orm.SelectLogsCreatedAfter(common.Address{}, common.Hash{}, time.Now(), 0, pg.WithParentCtx(ctx)) - _, _ = orm.SelectLatestLogByEventSigWithConfs(common.Hash{}, common.Address{}, 0, pg.WithParentCtx(ctx)) - _, _ = orm.SelectLatestLogEventSigsAddrsWithConfs(0, []common.Address{{}}, []common.Hash{{}}, 1, pg.WithParentCtx(ctx)) - _, _ = orm.SelectIndexedLogsCreatedAfter(common.Address{}, common.Hash{}, 1, []common.Hash{}, time.Now(), 0, pg.WithParentCtx(ctx)) - _ = orm.InsertLogs([]Log{}, pg.WithParentCtx(ctx)) - _ = orm.InsertLogsWithBlock([]Log{}, NewLogPollerBlock(common.Hash{}, 1, time.Now(), 0), pg.WithParentCtx(ctx)) + _, _ = orm.SelectIndexedLogs(ctx, common.Address{}, common.Hash{}, 1, []common.Hash{}, 1) + _, _ = orm.SelectIndexedLogsByBlockRange(ctx, 0, 1, common.Address{}, common.Hash{}, 1, []common.Hash{}) + _, _ = orm.SelectIndexedLogsTopicGreaterThan(ctx, common.Address{}, common.Hash{}, 1, common.Hash{}, 1) + _, _ = orm.SelectIndexedLogsTopicRange(ctx, common.Address{}, common.Hash{}, 1, common.Hash{}, common.Hash{}, 1) + _, _ = orm.SelectIndexedLogsWithSigsExcluding(ctx, common.Hash{}, common.Hash{}, 1, common.Address{}, 0, 1, 1) + _, _ = orm.SelectLogsDataWordRange(ctx, common.Address{}, common.Hash{}, 0, common.Hash{}, common.Hash{}, 1) + _, _ = orm.SelectLogsDataWordGreaterThan(ctx, common.Address{}, common.Hash{}, 0, common.Hash{}, 1) + _, _ = orm.SelectLogsCreatedAfter(ctx, common.Address{}, common.Hash{}, time.Now(), 0) + _, _ = orm.SelectLatestLogByEventSigWithConfs(ctx, common.Hash{}, common.Address{}, 0) + _, _ = orm.SelectLatestLogEventSigsAddrsWithConfs(ctx, 0, []common.Address{{}}, []common.Hash{{}}, 1) + _, _ = orm.SelectIndexedLogsCreatedAfter(ctx, common.Address{}, common.Hash{}, 1, []common.Hash{}, time.Now(), 0) + _ = orm.InsertLogs(ctx, []Log{}) + _ = orm.InsertLogsWithBlock(ctx, []Log{}, NewLogPollerBlock(common.Hash{}, 1, time.Now(), 0)) require.Equal(t, 13, testutil.CollectAndCount(orm.queryDuration)) require.Equal(t, 10, testutil.CollectAndCount(orm.datasetSize)) @@ -53,7 +52,7 @@ func TestShouldPublishDurationInCaseOfError(t *testing.T) { t.Cleanup(func() { resetMetrics(*orm) }) require.Equal(t, 0, testutil.CollectAndCount(orm.queryDuration)) - _, err := orm.SelectLatestLogByEventSigWithConfs(common.Hash{}, common.Address{}, 0, pg.WithParentCtx(ctx)) + _, err := orm.SelectLatestLogByEventSigWithConfs(ctx, common.Hash{}, common.Address{}, 0) require.Error(t, err) require.Equal(t, 1, testutil.CollectAndCount(orm.queryDuration)) @@ -100,25 +99,26 @@ func TestMetricsAreProperlyPopulatedForWrites(t *testing.T) { } func TestCountersAreProperlyPopulatedForWrites(t *testing.T) { + ctx := testutils.Context(t) orm := createObservedORM(t, 420) logs := generateRandomLogs(420, 20) // First insert 10 logs - require.NoError(t, orm.InsertLogs(logs[:10])) + require.NoError(t, orm.InsertLogs(ctx, logs[:10])) assert.Equal(t, float64(10), testutil.ToFloat64(orm.logsInserted.WithLabelValues("420"))) // Insert 5 more logs with block - require.NoError(t, orm.InsertLogsWithBlock(logs[10:15], NewLogPollerBlock(utils.RandomBytes32(), 10, time.Now(), 5))) + require.NoError(t, orm.InsertLogsWithBlock(ctx, logs[10:15], NewLogPollerBlock(utils.RandomBytes32(), 10, time.Now(), 5))) assert.Equal(t, float64(15), testutil.ToFloat64(orm.logsInserted.WithLabelValues("420"))) assert.Equal(t, float64(1), testutil.ToFloat64(orm.blocksInserted.WithLabelValues("420"))) // Insert 5 more logs with block - require.NoError(t, orm.InsertLogsWithBlock(logs[15:], NewLogPollerBlock(utils.RandomBytes32(), 15, time.Now(), 5))) + require.NoError(t, orm.InsertLogsWithBlock(ctx, logs[15:], NewLogPollerBlock(utils.RandomBytes32(), 15, time.Now(), 5))) assert.Equal(t, float64(20), testutil.ToFloat64(orm.logsInserted.WithLabelValues("420"))) assert.Equal(t, float64(2), testutil.ToFloat64(orm.blocksInserted.WithLabelValues("420"))) // Don't update counters in case of an error - require.Error(t, orm.InsertLogsWithBlock(logs, NewLogPollerBlock(utils.RandomBytes32(), 0, time.Now(), 0))) + require.Error(t, orm.InsertLogsWithBlock(ctx, logs, NewLogPollerBlock(utils.RandomBytes32(), 0, time.Now(), 0))) assert.Equal(t, float64(20), testutil.ToFloat64(orm.logsInserted.WithLabelValues("420"))) assert.Equal(t, float64(2), testutil.ToFloat64(orm.blocksInserted.WithLabelValues("420"))) } @@ -146,9 +146,7 @@ func generateRandomLogs(chainId, count int) []Log { func createObservedORM(t *testing.T, chainId int64) *ObservedORM { lggr, _ := logger.TestObserved(t, zapcore.ErrorLevel) db := pgtest.NewSqlxDB(t) - return NewObservedORM( - big.NewInt(chainId), db, lggr, pgtest.NewQConfig(true), - ) + return NewObservedORM(big.NewInt(chainId), db, lggr) } func resetMetrics(lp ObservedORM) { diff --git a/core/chains/evm/logpoller/orm.go b/core/chains/evm/logpoller/orm.go index 777cf3546cb..ebba3cffc08 100644 --- a/core/chains/evm/logpoller/orm.go +++ b/core/chains/evm/logpoller/orm.go @@ -9,73 +9,82 @@ import ( "time" "github.com/ethereum/go-ethereum/common" - "github.com/jmoiron/sqlx" pkgerrors "github.com/pkg/errors" "github.com/smartcontractkit/chainlink-common/pkg/logger" + "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" ubig "github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils/big" - "github.com/smartcontractkit/chainlink/v2/core/services/pg" ) // ORM represents the persistent data access layer used by the log poller. At this moment, it's a bit leaky abstraction, because // it exposes some of the database implementation details (e.g. pg.Q). Ideally it should be agnostic and could be applied to any persistence layer. // What is more, LogPoller should not be aware of the underlying database implementation and delegate all the queries to the ORM. type ORM interface { - InsertLogs(logs []Log, qopts ...pg.QOpt) error - InsertLogsWithBlock(logs []Log, block LogPollerBlock, qopts ...pg.QOpt) error - InsertFilter(filter Filter, qopts ...pg.QOpt) error - - LoadFilters(qopts ...pg.QOpt) (map[string]Filter, error) - DeleteFilter(name string, qopts ...pg.QOpt) error - - DeleteBlocksBefore(end int64, limit int64, qopts ...pg.QOpt) (int64, error) - DeleteLogsAndBlocksAfter(start int64, qopts ...pg.QOpt) error - DeleteExpiredLogs(limit int64, qopts ...pg.QOpt) (int64, error) - - GetBlocksRange(start int64, end int64, qopts ...pg.QOpt) ([]LogPollerBlock, error) - SelectBlockByNumber(blockNumber int64, qopts ...pg.QOpt) (*LogPollerBlock, error) - SelectLatestBlock(qopts ...pg.QOpt) (*LogPollerBlock, error) - - SelectLogs(start, end int64, address common.Address, eventSig common.Hash, qopts ...pg.QOpt) ([]Log, error) - SelectLogsWithSigs(start, end int64, address common.Address, eventSigs []common.Hash, qopts ...pg.QOpt) ([]Log, error) - SelectLogsCreatedAfter(address common.Address, eventSig common.Hash, after time.Time, confs Confirmations, qopts ...pg.QOpt) ([]Log, error) - SelectLatestLogByEventSigWithConfs(eventSig common.Hash, address common.Address, confs Confirmations, qopts ...pg.QOpt) (*Log, error) - SelectLatestLogEventSigsAddrsWithConfs(fromBlock int64, addresses []common.Address, eventSigs []common.Hash, confs Confirmations, qopts ...pg.QOpt) ([]Log, error) - SelectLatestBlockByEventSigsAddrsWithConfs(fromBlock int64, eventSigs []common.Hash, addresses []common.Address, confs Confirmations, qopts ...pg.QOpt) (int64, error) - - SelectIndexedLogs(address common.Address, eventSig common.Hash, topicIndex int, topicValues []common.Hash, confs Confirmations, qopts ...pg.QOpt) ([]Log, error) - SelectIndexedLogsByBlockRange(start, end int64, address common.Address, eventSig common.Hash, topicIndex int, topicValues []common.Hash, qopts ...pg.QOpt) ([]Log, error) - SelectIndexedLogsCreatedAfter(address common.Address, eventSig common.Hash, topicIndex int, topicValues []common.Hash, after time.Time, confs Confirmations, qopts ...pg.QOpt) ([]Log, error) - SelectIndexedLogsTopicGreaterThan(address common.Address, eventSig common.Hash, topicIndex int, topicValueMin common.Hash, confs Confirmations, qopts ...pg.QOpt) ([]Log, error) - SelectIndexedLogsTopicRange(address common.Address, eventSig common.Hash, topicIndex int, topicValueMin, topicValueMax common.Hash, confs Confirmations, qopts ...pg.QOpt) ([]Log, error) - SelectIndexedLogsWithSigsExcluding(sigA, sigB common.Hash, topicIndex int, address common.Address, startBlock, endBlock int64, confs Confirmations, qopts ...pg.QOpt) ([]Log, error) - SelectIndexedLogsByTxHash(address common.Address, eventSig common.Hash, txHash common.Hash, qopts ...pg.QOpt) ([]Log, error) - SelectLogsDataWordRange(address common.Address, eventSig common.Hash, wordIndex int, wordValueMin, wordValueMax common.Hash, confs Confirmations, qopts ...pg.QOpt) ([]Log, error) - SelectLogsDataWordGreaterThan(address common.Address, eventSig common.Hash, wordIndex int, wordValueMin common.Hash, confs Confirmations, qopts ...pg.QOpt) ([]Log, error) - SelectLogsDataWordBetween(address common.Address, eventSig common.Hash, wordIndexMin int, wordIndexMax int, wordValue common.Hash, confs Confirmations, qopts ...pg.QOpt) ([]Log, error) + InsertLogs(ctx context.Context, logs []Log) error + InsertLogsWithBlock(ctx context.Context, logs []Log, block LogPollerBlock) error + InsertFilter(ctx context.Context, filter Filter) error + + LoadFilters(ctx context.Context) (map[string]Filter, error) + DeleteFilter(ctx context.Context, name string) error + + InsertBlock(ctx context.Context, blockHash common.Hash, blockNumber int64, blockTimestamp time.Time, finalizedBlock int64) error + DeleteBlocksBefore(ctx context.Context, end int64, limit int64) (int64, error) + DeleteLogsAndBlocksAfter(ctx context.Context, start int64) error + DeleteExpiredLogs(ctx context.Context, limit int64) (int64, error) + + GetBlocksRange(ctx context.Context, start int64, end int64) ([]LogPollerBlock, error) + SelectBlockByNumber(ctx context.Context, blockNumber int64) (*LogPollerBlock, error) + SelectBlockByHash(ctx context.Context, hash common.Hash) (*LogPollerBlock, error) + SelectLatestBlock(ctx context.Context) (*LogPollerBlock, error) + + SelectLogs(ctx context.Context, start, end int64, address common.Address, eventSig common.Hash) ([]Log, error) + SelectLogsWithSigs(ctx context.Context, start, end int64, address common.Address, eventSigs []common.Hash) ([]Log, error) + SelectLogsCreatedAfter(ctx context.Context, address common.Address, eventSig common.Hash, after time.Time, confs Confirmations) ([]Log, error) + SelectLatestLogByEventSigWithConfs(ctx context.Context, eventSig common.Hash, address common.Address, confs Confirmations) (*Log, error) + SelectLatestLogEventSigsAddrsWithConfs(ctx context.Context, fromBlock int64, addresses []common.Address, eventSigs []common.Hash, confs Confirmations) ([]Log, error) + SelectLatestBlockByEventSigsAddrsWithConfs(ctx context.Context, fromBlock int64, eventSigs []common.Hash, addresses []common.Address, confs Confirmations) (int64, error) + SelectLogsByBlockRange(ctx context.Context, start, end int64) ([]Log, error) + + SelectIndexedLogs(ctx context.Context, address common.Address, eventSig common.Hash, topicIndex int, topicValues []common.Hash, confs Confirmations) ([]Log, error) + SelectIndexedLogsByBlockRange(ctx context.Context, start, end int64, address common.Address, eventSig common.Hash, topicIndex int, topicValues []common.Hash) ([]Log, error) + SelectIndexedLogsCreatedAfter(ctx context.Context, address common.Address, eventSig common.Hash, topicIndex int, topicValues []common.Hash, after time.Time, confs Confirmations) ([]Log, error) + SelectIndexedLogsTopicGreaterThan(ctx context.Context, address common.Address, eventSig common.Hash, topicIndex int, topicValueMin common.Hash, confs Confirmations) ([]Log, error) + SelectIndexedLogsTopicRange(ctx context.Context, address common.Address, eventSig common.Hash, topicIndex int, topicValueMin, topicValueMax common.Hash, confs Confirmations) ([]Log, error) + SelectIndexedLogsWithSigsExcluding(ctx context.Context, sigA, sigB common.Hash, topicIndex int, address common.Address, startBlock, endBlock int64, confs Confirmations) ([]Log, error) + SelectIndexedLogsByTxHash(ctx context.Context, address common.Address, eventSig common.Hash, txHash common.Hash) ([]Log, error) + SelectLogsDataWordRange(ctx context.Context, address common.Address, eventSig common.Hash, wordIndex int, wordValueMin, wordValueMax common.Hash, confs Confirmations) ([]Log, error) + SelectLogsDataWordGreaterThan(ctx context.Context, address common.Address, eventSig common.Hash, wordIndex int, wordValueMin common.Hash, confs Confirmations) ([]Log, error) + SelectLogsDataWordBetween(ctx context.Context, address common.Address, eventSig common.Hash, wordIndexMin int, wordIndexMax int, wordValue common.Hash, confs Confirmations) ([]Log, error) } type DbORM struct { chainID *big.Int - q pg.Q + db sqlutil.DataSource lggr logger.Logger } -// NewORM creates a DbORM scoped to chainID. -func NewORM(chainID *big.Int, db *sqlx.DB, lggr logger.Logger, cfg pg.QConfig) *DbORM { - namedLogger := logger.Named(lggr, "Configs") - q := pg.NewQ(db, namedLogger, cfg) +var _ ORM = &DbORM{} + +// NewORM creates an DbORM scoped to chainID. +func NewORM(chainID *big.Int, db sqlutil.DataSource, lggr logger.Logger) *DbORM { return &DbORM{ chainID: chainID, - q: q, + db: db, lggr: lggr, } } +func (o *DbORM) Transaction(ctx context.Context, fn func(*DbORM) error) (err error) { + return sqlutil.Transact(ctx, o.new, o.db, nil, fn) +} + +// new returns a NewORM like o, but backed by q. +func (o *DbORM) new(q sqlutil.DataSource) *DbORM { return NewORM(o.chainID, q, o.lggr) } + // InsertBlock is idempotent to support replays. -func (o *DbORM) InsertBlock(blockHash common.Hash, blockNumber int64, blockTimestamp time.Time, finalizedBlock int64, qopts ...pg.QOpt) error { +func (o *DbORM) InsertBlock(ctx context.Context, blockHash common.Hash, blockNumber int64, blockTimestamp time.Time, finalizedBlock int64) error { args, err := newQueryArgs(o.chainID). withCustomHashArg("block_hash", blockHash). withCustomArg("block_number", blockNumber). @@ -85,18 +94,24 @@ func (o *DbORM) InsertBlock(blockHash common.Hash, blockNumber int64, blockTimes if err != nil { return err } - return o.q.WithOpts(qopts...).ExecQNamed(` - INSERT INTO evm.log_poller_blocks + query := `INSERT INTO evm.log_poller_blocks (evm_chain_id, block_hash, block_number, block_timestamp, finalized_block_number, created_at) VALUES (:evm_chain_id, :block_hash, :block_number, :block_timestamp, :finalized_block_number, NOW()) - ON CONFLICT DO NOTHING`, args) + ON CONFLICT DO NOTHING` + query, sqlArgs, err := o.db.BindNamed(query, args) + if err != nil { + return err + } + + _, err = o.db.ExecContext(ctx, query, sqlArgs...) + return err } // InsertFilter is idempotent. // // Each address/event pair must have a unique job id, so it may be removed when the job is deleted. // If a second job tries to overwrite the same pair, this should fail. -func (o *DbORM) InsertFilter(filter Filter, qopts ...pg.QOpt) (err error) { +func (o *DbORM) InsertFilter(ctx context.Context, filter Filter) (err error) { topicArrays := []types.HashArray{filter.Topic2, filter.Topic3, filter.Topic4} args, err := newQueryArgs(o.chainID). withCustomArg("name", filter.Name). @@ -110,8 +125,6 @@ func (o *DbORM) InsertFilter(filter Filter, qopts ...pg.QOpt) (err error) { if err != nil { return err } - // '::' has to be escaped in the query string - // https://github.com/jmoiron/sqlx/issues/91, https://github.com/jmoiron/sqlx/issues/428 var topicsColumns, topicsSql strings.Builder for n, topicValues := range topicArrays { if len(topicValues) != 0 { @@ -120,6 +133,8 @@ func (o *DbORM) InsertFilter(filter Filter, qopts ...pg.QOpt) (err error) { fmt.Fprintf(&topicsSql, ",\n(SELECT unnest(:%s ::::BYTEA[]) %s) t%d", topicCol, topicCol, n+2) } } + // '::' has to be escaped in the query string + // https://github.com/jmoiron/sqlx/issues/91, https://github.com/jmoiron/sqlx/issues/428 query := fmt.Sprintf(` INSERT INTO evm.log_poller_filters (name, evm_chain_id, retention, max_logs_kept, logs_per_block, created_at, address, event %s) @@ -132,20 +147,28 @@ func (o *DbORM) InsertFilter(filter Filter, qopts ...pg.QOpt) (err error) { DO UPDATE SET retention=:retention ::::BIGINT, max_logs_kept=:max_logs_kept ::::NUMERIC, logs_per_block=:logs_per_block ::::NUMERIC`, topicsColumns.String(), topicsSql.String()) - return o.q.WithOpts(qopts...).ExecQNamed(query, args) + + query, sqlArgs, err := o.db.BindNamed(query, args) + if err != nil { + return err + } + + _, err = o.db.ExecContext(ctx, query, sqlArgs...) + return err } // DeleteFilter removes all events,address pairs associated with the Filter -func (o *DbORM) DeleteFilter(name string, qopts ...pg.QOpt) error { - q := o.q.WithOpts(qopts...) - return q.ExecQ(`DELETE FROM evm.log_poller_filters WHERE name = $1 AND evm_chain_id = $2`, name, ubig.New(o.chainID)) +func (o *DbORM) DeleteFilter(ctx context.Context, name string) error { + _, err := o.db.ExecContext(ctx, + `DELETE FROM evm.log_poller_filters WHERE name = $1 AND evm_chain_id = $2`, + name, ubig.New(o.chainID)) + return err + } -// LoadFiltersForChain returns all filters for this chain -func (o *DbORM) LoadFilters(qopts ...pg.QOpt) (map[string]Filter, error) { - q := o.q.WithOpts(qopts...) - rows := make([]Filter, 0) - err := q.Select(&rows, `SELECT name, +// LoadFilters returns all filters for this chain +func (o *DbORM) LoadFilters(ctx context.Context) (map[string]Filter, error) { + query := `SELECT name, ARRAY_AGG(DISTINCT address)::BYTEA[] AS addresses, ARRAY_AGG(DISTINCT event)::BYTEA[] AS event_sigs, ARRAY_AGG(DISTINCT topic2 ORDER BY topic2) FILTER(WHERE topic2 IS NOT NULL) AS topic2, @@ -155,43 +178,41 @@ func (o *DbORM) LoadFilters(qopts ...pg.QOpt) (map[string]Filter, error) { MAX(retention) AS retention, MAX(max_logs_kept) AS max_logs_kept FROM evm.log_poller_filters WHERE evm_chain_id = $1 - GROUP BY name`, ubig.New(o.chainID)) + GROUP BY name` + var rows []Filter + err := o.db.SelectContext(ctx, &rows, query, ubig.New(o.chainID)) filters := make(map[string]Filter) for _, filter := range rows { filters[filter.Name] = filter } - return filters, err } -func (o *DbORM) SelectBlockByHash(hash common.Hash, qopts ...pg.QOpt) (*LogPollerBlock, error) { - q := o.q.WithOpts(qopts...) +func (o *DbORM) SelectBlockByHash(ctx context.Context, hash common.Hash) (*LogPollerBlock, error) { var b LogPollerBlock - if err := q.Get(&b, `SELECT * FROM evm.log_poller_blocks WHERE block_hash = $1 AND evm_chain_id = $2`, hash, ubig.New(o.chainID)); err != nil { + if err := o.db.GetContext(ctx, &b, `SELECT * FROM evm.log_poller_blocks WHERE block_hash = $1 AND evm_chain_id = $2`, hash.Bytes(), ubig.New(o.chainID)); err != nil { return nil, err } return &b, nil } -func (o *DbORM) SelectBlockByNumber(n int64, qopts ...pg.QOpt) (*LogPollerBlock, error) { - q := o.q.WithOpts(qopts...) +func (o *DbORM) SelectBlockByNumber(ctx context.Context, n int64) (*LogPollerBlock, error) { var b LogPollerBlock - if err := q.Get(&b, `SELECT * FROM evm.log_poller_blocks WHERE block_number = $1 AND evm_chain_id = $2`, n, ubig.New(o.chainID)); err != nil { + if err := o.db.GetContext(ctx, &b, `SELECT * FROM evm.log_poller_blocks WHERE block_number = $1 AND evm_chain_id = $2`, n, ubig.New(o.chainID)); err != nil { return nil, err } return &b, nil } -func (o *DbORM) SelectLatestBlock(qopts ...pg.QOpt) (*LogPollerBlock, error) { - q := o.q.WithOpts(qopts...) +func (o *DbORM) SelectLatestBlock(ctx context.Context) (*LogPollerBlock, error) { var b LogPollerBlock - if err := q.Get(&b, `SELECT * FROM evm.log_poller_blocks WHERE evm_chain_id = $1 ORDER BY block_number DESC LIMIT 1`, ubig.New(o.chainID)); err != nil { + if err := o.db.GetContext(ctx, &b, `SELECT * FROM evm.log_poller_blocks WHERE evm_chain_id = $1 ORDER BY block_number DESC LIMIT 1`, ubig.New(o.chainID)); err != nil { return nil, err } return &b, nil } -func (o *DbORM) SelectLatestLogByEventSigWithConfs(eventSig common.Hash, address common.Address, confs Confirmations, qopts ...pg.QOpt) (*Log, error) { +func (o *DbORM) SelectLatestLogByEventSigWithConfs(ctx context.Context, eventSig common.Hash, address common.Address, confs Confirmations) (*Log, error) { args, err := newQueryArgsForEvent(o.chainID, address, eventSig). withConfs(confs). toArgs() @@ -206,7 +227,12 @@ func (o *DbORM) SelectLatestLogByEventSigWithConfs(eventSig common.Hash, address AND block_number <= %s ORDER BY (block_number, log_index) DESC LIMIT 1`, nestedBlockNumberQuery(confs)) var l Log - if err := o.q.WithOpts(qopts...).GetNamed(query, &l, args); err != nil { + + query, sqlArgs, err := o.db.BindNamed(query, args) + if err != nil { + return nil, err + } + if err = o.db.GetContext(ctx, &l, query, sqlArgs...); err != nil { return nil, err } return &l, nil @@ -214,10 +240,9 @@ func (o *DbORM) SelectLatestLogByEventSigWithConfs(eventSig common.Hash, address // DeleteBlocksBefore delete blocks before and including end. When limit is set, it will delete at most limit blocks. // Otherwise, it will delete all blocks at once. -func (o *DbORM) DeleteBlocksBefore(end int64, limit int64, qopts ...pg.QOpt) (int64, error) { - q := o.q.WithOpts(qopts...) +func (o *DbORM) DeleteBlocksBefore(ctx context.Context, end int64, limit int64) (int64, error) { if limit > 0 { - return q.ExecQWithRowsAffected( + result, err := o.db.ExecContext(ctx, `DELETE FROM evm.log_poller_blocks WHERE block_number IN ( SELECT block_number FROM evm.log_poller_blocks @@ -226,44 +251,46 @@ func (o *DbORM) DeleteBlocksBefore(end int64, limit int64, qopts ...pg.QOpt) (in LIMIT $3 ) AND evm_chain_id = $2`, - end, ubig.New(o.chainID), limit, - ) - } - return q.ExecQWithRowsAffected( - `DELETE FROM evm.log_poller_blocks - WHERE block_number <= $1 AND evm_chain_id = $2`, - end, ubig.New(o.chainID), - ) -} - -func (o *DbORM) DeleteLogsAndBlocksAfter(start int64, qopts ...pg.QOpt) error { - return o.q.WithOpts(qopts...).Transaction(func(tx pg.Queryer) error { - args, err := newQueryArgs(o.chainID). - withStartBlock(start). - toArgs() + end, ubig.New(o.chainID), limit) if err != nil { - o.lggr.Error("Cant build args for DeleteLogsAndBlocksAfter queries", "err", err) - return err + return 0, err } + return result.RowsAffected() + } + result, err := o.db.ExecContext(ctx, `DELETE FROM evm.log_poller_blocks + WHERE block_number <= $1 AND evm_chain_id = $2`, end, ubig.New(o.chainID)) + if err != nil { + return 0, err + } + return result.RowsAffected() +} +func (o *DbORM) DeleteLogsAndBlocksAfter(ctx context.Context, start int64) error { + // These deletes are bounded by reorg depth, so they are + // fast and should not slow down the log readers. + return o.Transaction(ctx, func(orm *DbORM) error { // Applying upper bound filter is critical for Postgres performance (especially for evm.logs table) // because it allows the planner to properly estimate the number of rows to be scanned. // If not applied, these queries can become very slow. After some critical number // of logs, Postgres will try to scan all the logs in the index by block_number. // Latency without upper bound filter can be orders of magnitude higher for large number of logs. - _, err = tx.NamedExec(`DELETE FROM evm.log_poller_blocks - WHERE evm_chain_id = :evm_chain_id - AND block_number >= :start_block - AND block_number <= (SELECT MAX(block_number) FROM evm.log_poller_blocks WHERE evm_chain_id = :evm_chain_id)`, args) + _, err := o.db.ExecContext(ctx, `DELETE FROM evm.log_poller_blocks + WHERE evm_chain_id = $1 + AND block_number >= $2 + AND block_number <= (SELECT MAX(block_number) + FROM evm.log_poller_blocks + WHERE evm_chain_id = $1)`, + ubig.New(o.chainID), start) if err != nil { o.lggr.Warnw("Unable to clear reorged blocks, retrying", "err", err) return err } - _, err = tx.NamedExec(`DELETE FROM evm.logs - WHERE evm_chain_id = :evm_chain_id - AND block_number >= :start_block - AND block_number <= (SELECT MAX(block_number) FROM evm.logs WHERE evm_chain_id = :evm_chain_id)`, args) + _, err = o.db.ExecContext(ctx, `DELETE FROM evm.logs + WHERE evm_chain_id = $1 + AND block_number >= $2 + AND block_number <= (SELECT MAX(block_number) FROM evm.logs WHERE evm_chain_id = $1)`, + ubig.New(o.chainID), start) if err != nil { o.lggr.Warnw("Unable to clear reorged logs, retrying", "err", err) return err @@ -280,12 +307,11 @@ type Exp struct { ShouldDelete bool } -func (o *DbORM) DeleteExpiredLogs(limit int64, qopts ...pg.QOpt) (int64, error) { - qopts = append(qopts, pg.WithLongQueryTimeout()) - q := o.q.WithOpts(qopts...) - +func (o *DbORM) DeleteExpiredLogs(ctx context.Context, limit int64) (int64, error) { + var err error + var result sql.Result if limit > 0 { - return q.ExecQWithRowsAffected(` + result, err = o.db.ExecContext(ctx, ` DELETE FROM evm.logs WHERE (evm_chain_id, address, event_sig, block_number) IN ( SELECT l.evm_chain_id, l.address, l.event_sig, l.block_number @@ -299,35 +325,38 @@ func (o *DbORM) DeleteExpiredLogs(limit int64, qopts ...pg.QOpt) (int64, error) ) r ON l.evm_chain_id = $1 AND l.address = r.address AND l.event_sig = r.event AND l.block_timestamp <= STATEMENT_TIMESTAMP() - (r.retention / 10^9 * interval '1 second') LIMIT $2 - )`, - ubig.New(o.chainID), limit) - } - - return q.ExecQWithRowsAffected(`WITH r AS + )`, ubig.New(o.chainID), limit) + } else { + result, err = o.db.ExecContext(ctx, `WITH r AS ( SELECT address, event, MAX(retention) AS retention FROM evm.log_poller_filters WHERE evm_chain_id=$1 GROUP BY evm_chain_id,address, event HAVING NOT 0 = ANY(ARRAY_AGG(retention)) ) DELETE FROM evm.logs l USING r WHERE l.evm_chain_id = $1 AND l.address=r.address AND l.event_sig=r.event AND l.block_timestamp <= STATEMENT_TIMESTAMP() - (r.retention / 10^9 * interval '1 second')`, // retention is in nanoseconds (time.Duration aka BIGINT) - ubig.New(o.chainID)) + ubig.New(o.chainID)) + } + + if err != nil { + return 0, err + } + return result.RowsAffected() } // InsertLogs is idempotent to support replays. -func (o *DbORM) InsertLogs(logs []Log, qopts ...pg.QOpt) error { +func (o *DbORM) InsertLogs(ctx context.Context, logs []Log) error { if err := o.validateLogs(logs); err != nil { return err } - - return o.q.WithOpts(qopts...).Transaction(func(tx pg.Queryer) error { - return o.insertLogsWithinTx(logs, tx) + return o.Transaction(ctx, func(orm *DbORM) error { + return orm.insertLogsWithinTx(ctx, logs, orm.db) }) } -func (o *DbORM) InsertLogsWithBlock(logs []Log, block LogPollerBlock, qopts ...pg.QOpt) error { +func (o *DbORM) InsertLogsWithBlock(ctx context.Context, logs []Log, block LogPollerBlock) error { // Optimization, don't open TX when there is only a block to be persisted if len(logs) == 0 { - return o.InsertBlock(block.BlockHash, block.BlockNumber, block.BlockTimestamp, block.FinalizedBlockNumber, qopts...) + return o.InsertBlock(ctx, block.BlockHash, block.BlockNumber, block.BlockTimestamp, block.FinalizedBlockNumber) } if err := o.validateLogs(logs); err != nil { @@ -335,15 +364,16 @@ func (o *DbORM) InsertLogsWithBlock(logs []Log, block LogPollerBlock, qopts ...p } // Block and logs goes with the same TX to ensure atomicity - return o.q.WithOpts(qopts...).Transaction(func(tx pg.Queryer) error { - if err := o.InsertBlock(block.BlockHash, block.BlockNumber, block.BlockTimestamp, block.FinalizedBlockNumber, pg.WithQueryer(tx)); err != nil { + return o.Transaction(ctx, func(orm *DbORM) error { + err := orm.InsertBlock(ctx, block.BlockHash, block.BlockNumber, block.BlockTimestamp, block.FinalizedBlockNumber) + if err != nil { return err } - return o.insertLogsWithinTx(logs, tx) + return orm.insertLogsWithinTx(ctx, logs, orm.db) }) } -func (o *DbORM) insertLogsWithinTx(logs []Log, tx pg.Queryer) error { +func (o *DbORM) insertLogsWithinTx(ctx context.Context, logs []Log, tx sqlutil.DataSource) error { batchInsertSize := 4000 for i := 0; i < len(logs); i += batchInsertSize { start, end := i, i+batchInsertSize @@ -351,15 +381,18 @@ func (o *DbORM) insertLogsWithinTx(logs []Log, tx pg.Queryer) error { end = len(logs) } - _, err := tx.NamedExec(` - INSERT INTO evm.logs + query := `INSERT INTO evm.logs (evm_chain_id, log_index, block_hash, block_number, block_timestamp, address, event_sig, topics, tx_hash, data, created_at) VALUES (:evm_chain_id, :log_index, :block_hash, :block_number, :block_timestamp, :address, :event_sig, :topics, :tx_hash, :data, NOW()) - ON CONFLICT DO NOTHING`, - logs[start:end], - ) + ON CONFLICT DO NOTHING` + query, sqlArgs, err := o.db.BindNamed(query, logs[start:end]) + if err != nil { + return err + } + + _, err = tx.ExecContext(ctx, query, sqlArgs...) if err != nil { if pkgerrors.Is(err, context.DeadlineExceeded) && batchInsertSize > 500 { // In case of DB timeouts, try to insert again with a smaller batch upto a limit @@ -382,7 +415,7 @@ func (o *DbORM) validateLogs(logs []Log) error { return nil } -func (o *DbORM) SelectLogsByBlockRange(start, end int64) ([]Log, error) { +func (o *DbORM) SelectLogsByBlockRange(ctx context.Context, start, end int64) ([]Log, error) { args, err := newQueryArgs(o.chainID). withStartBlock(start). withEndBlock(end). @@ -391,21 +424,27 @@ func (o *DbORM) SelectLogsByBlockRange(start, end int64) ([]Log, error) { return nil, err } - var logs []Log - err = o.q.SelectNamed(&logs, ` - SELECT * FROM evm.logs + query := `SELECT * FROM evm.logs WHERE evm_chain_id = :evm_chain_id AND block_number >= :start_block AND block_number <= :end_block - ORDER BY (block_number, log_index)`, args) + ORDER BY (block_number, log_index)` + + var logs []Log + query, sqlArgs, err := o.db.BindNamed(query, args) + if err != nil { + return nil, err + } + + err = o.db.SelectContext(ctx, &logs, query, sqlArgs...) if err != nil { return nil, err } return logs, nil } -// SelectLogsByBlockRangeFilter finds the logs in a given block range. -func (o *DbORM) SelectLogs(start, end int64, address common.Address, eventSig common.Hash, qopts ...pg.QOpt) ([]Log, error) { +// SelectLogs finds the logs in a given block range. +func (o *DbORM) SelectLogs(ctx context.Context, start, end int64, address common.Address, eventSig common.Hash) ([]Log, error) { args, err := newQueryArgsForEvent(o.chainID, address, eventSig). withStartBlock(start). withEndBlock(end). @@ -413,15 +452,22 @@ func (o *DbORM) SelectLogs(start, end int64, address common.Address, eventSig co if err != nil { return nil, err } - var logs []Log - err = o.q.WithOpts(qopts...).SelectNamed(&logs, ` - SELECT * FROM evm.logs + + query := `SELECT * FROM evm.logs WHERE evm_chain_id = :evm_chain_id AND address = :address AND event_sig = :event_sig AND block_number >= :start_block AND block_number <= :end_block - ORDER BY (block_number, log_index)`, args) + ORDER BY (block_number, log_index)` + + var logs []Log + query, sqlArgs, err := o.db.BindNamed(query, args) + if err != nil { + return nil, err + } + + err = o.db.SelectContext(ctx, &logs, query, sqlArgs...) if err != nil { return nil, err } @@ -429,7 +475,7 @@ func (o *DbORM) SelectLogs(start, end int64, address common.Address, eventSig co } // SelectLogsCreatedAfter finds logs created after some timestamp. -func (o *DbORM) SelectLogsCreatedAfter(address common.Address, eventSig common.Hash, after time.Time, confs Confirmations, qopts ...pg.QOpt) ([]Log, error) { +func (o *DbORM) SelectLogsCreatedAfter(ctx context.Context, address common.Address, eventSig common.Hash, after time.Time, confs Confirmations) ([]Log, error) { args, err := newQueryArgsForEvent(o.chainID, address, eventSig). withBlockTimestampAfter(after). withConfs(confs). @@ -448,15 +494,20 @@ func (o *DbORM) SelectLogsCreatedAfter(address common.Address, eventSig common.H ORDER BY (block_number, log_index)`, nestedBlockNumberQuery(confs)) var logs []Log - if err = o.q.WithOpts(qopts...).SelectNamed(&logs, query, args); err != nil { + query, sqlArgs, err := o.db.BindNamed(query, args) + if err != nil { + return nil, err + } + + if err = o.db.SelectContext(ctx, &logs, query, sqlArgs...); err != nil { return nil, err } return logs, nil } -// SelectLogsWithSigsByBlockRangeFilter finds the logs in the given block range with the given event signatures +// SelectLogsWithSigs finds the logs in the given block range with the given event signatures // emitted from the given address. -func (o *DbORM) SelectLogsWithSigs(start, end int64, address common.Address, eventSigs []common.Hash, qopts ...pg.QOpt) (logs []Log, err error) { +func (o *DbORM) SelectLogsWithSigs(ctx context.Context, start, end int64, address common.Address, eventSigs []common.Hash) (logs []Log, err error) { args, err := newQueryArgs(o.chainID). withAddress(address). withEventSigArray(eventSigs). @@ -467,21 +518,26 @@ func (o *DbORM) SelectLogsWithSigs(start, end int64, address common.Address, eve return nil, err } - q := o.q.WithOpts(qopts...) - err = q.SelectNamed(&logs, ` - SELECT * FROM evm.logs + query := `SELECT * FROM evm.logs WHERE evm_chain_id = :evm_chain_id AND address = :address AND event_sig = ANY(:event_sig_array) AND block_number BETWEEN :start_block AND :end_block - ORDER BY (block_number, log_index)`, args) + ORDER BY (block_number, log_index)` + + query, sqlArgs, err := o.db.BindNamed(query, args) + if err != nil { + return nil, err + } + + err = o.db.SelectContext(ctx, &logs, query, sqlArgs...) if pkgerrors.Is(err, sql.ErrNoRows) { return nil, nil } return logs, err } -func (o *DbORM) GetBlocksRange(start int64, end int64, qopts ...pg.QOpt) ([]LogPollerBlock, error) { +func (o *DbORM) GetBlocksRange(ctx context.Context, start int64, end int64) ([]LogPollerBlock, error) { args, err := newQueryArgs(o.chainID). withStartBlock(start). withEndBlock(end). @@ -489,13 +545,20 @@ func (o *DbORM) GetBlocksRange(start int64, end int64, qopts ...pg.QOpt) ([]LogP if err != nil { return nil, err } - var blocks []LogPollerBlock - err = o.q.WithOpts(qopts...).SelectNamed(&blocks, ` - SELECT * FROM evm.log_poller_blocks + + query := `SELECT * FROM evm.log_poller_blocks WHERE block_number >= :start_block AND block_number <= :end_block AND evm_chain_id = :evm_chain_id - ORDER BY block_number ASC`, args) + ORDER BY block_number ASC` + + var blocks []LogPollerBlock + query, sqlArgs, err := o.db.BindNamed(query, args) + if err != nil { + return nil, err + } + + err = o.db.SelectContext(ctx, &blocks, query, sqlArgs...) if err != nil { return nil, err } @@ -503,7 +566,7 @@ func (o *DbORM) GetBlocksRange(start int64, end int64, qopts ...pg.QOpt) ([]LogP } // SelectLatestLogEventSigsAddrsWithConfs finds the latest log by (address, event) combination that matches a list of Addresses and list of events -func (o *DbORM) SelectLatestLogEventSigsAddrsWithConfs(fromBlock int64, addresses []common.Address, eventSigs []common.Hash, confs Confirmations, qopts ...pg.QOpt) ([]Log, error) { +func (o *DbORM) SelectLatestLogEventSigsAddrsWithConfs(ctx context.Context, fromBlock int64, addresses []common.Address, eventSigs []common.Hash, confs Confirmations) ([]Log, error) { args, err := newQueryArgs(o.chainID). withAddressArray(addresses). withEventSigArray(eventSigs). @@ -513,6 +576,7 @@ func (o *DbORM) SelectLatestLogEventSigsAddrsWithConfs(fromBlock int64, addresse if err != nil { return nil, err } + query := fmt.Sprintf(` SELECT * FROM evm.logs WHERE (block_number, address, event_sig) IN ( SELECT MAX(block_number), address, event_sig FROM evm.logs @@ -524,15 +588,21 @@ func (o *DbORM) SelectLatestLogEventSigsAddrsWithConfs(fromBlock int64, addresse GROUP BY event_sig, address ) ORDER BY block_number ASC`, nestedBlockNumberQuery(confs)) + var logs []Log - if err := o.q.WithOpts(qopts...).SelectNamed(&logs, query, args); err != nil { + query, sqlArgs, err := o.db.BindNamed(query, args) + if err != nil { + return nil, err + } + + if err = o.db.SelectContext(ctx, &logs, query, sqlArgs...); err != nil { return nil, pkgerrors.Wrap(err, "failed to execute query") } return logs, nil } -// SelectLatestBlockNumberEventSigsAddrsWithConfs finds the latest block number that matches a list of Addresses and list of events. It returns 0 if there is no matching block -func (o *DbORM) SelectLatestBlockByEventSigsAddrsWithConfs(fromBlock int64, eventSigs []common.Hash, addresses []common.Address, confs Confirmations, qopts ...pg.QOpt) (int64, error) { +// SelectLatestBlockByEventSigsAddrsWithConfs finds the latest block number that matches a list of Addresses and list of events. It returns 0 if there is no matching block +func (o *DbORM) SelectLatestBlockByEventSigsAddrsWithConfs(ctx context.Context, fromBlock int64, eventSigs []common.Hash, addresses []common.Address, confs Confirmations) (int64, error) { args, err := newQueryArgs(o.chainID). withEventSigArray(eventSigs). withAddressArray(addresses). @@ -549,14 +619,20 @@ func (o *DbORM) SelectLatestBlockByEventSigsAddrsWithConfs(fromBlock int64, even AND address = ANY(:address_array) AND block_number > :start_block AND block_number <= %s`, nestedBlockNumberQuery(confs)) + var blockNumber int64 - if err := o.q.WithOpts(qopts...).GetNamed(query, &blockNumber, args); err != nil { + query, sqlArgs, err := o.db.BindNamed(query, args) + if err != nil { + return 0, err + } + + if err = o.db.GetContext(ctx, &blockNumber, query, sqlArgs...); err != nil { return 0, err } return blockNumber, nil } -func (o *DbORM) SelectLogsDataWordRange(address common.Address, eventSig common.Hash, wordIndex int, wordValueMin, wordValueMax common.Hash, confs Confirmations, qopts ...pg.QOpt) ([]Log, error) { +func (o *DbORM) SelectLogsDataWordRange(ctx context.Context, address common.Address, eventSig common.Hash, wordIndex int, wordValueMin, wordValueMax common.Hash, confs Confirmations) ([]Log, error) { args, err := newQueryArgsForEvent(o.chainID, address, eventSig). withWordIndex(wordIndex). withWordValueMin(wordValueMin). @@ -566,6 +642,7 @@ func (o *DbORM) SelectLogsDataWordRange(address common.Address, eventSig common. if err != nil { return nil, err } + query := fmt.Sprintf(`SELECT * FROM evm.logs WHERE evm_chain_id = :evm_chain_id AND address = :address @@ -574,14 +651,20 @@ func (o *DbORM) SelectLogsDataWordRange(address common.Address, eventSig common. AND substring(data from 32*:word_index+1 for 32) <= :word_value_max AND block_number <= %s ORDER BY (block_number, log_index)`, nestedBlockNumberQuery(confs)) + var logs []Log - if err := o.q.WithOpts(qopts...).SelectNamed(&logs, query, args); err != nil { + query, sqlArgs, err := o.db.BindNamed(query, args) + if err != nil { + return nil, err + } + + if err := o.db.SelectContext(ctx, &logs, query, sqlArgs...); err != nil { return nil, err } return logs, nil } -func (o *DbORM) SelectLogsDataWordGreaterThan(address common.Address, eventSig common.Hash, wordIndex int, wordValueMin common.Hash, confs Confirmations, qopts ...pg.QOpt) ([]Log, error) { +func (o *DbORM) SelectLogsDataWordGreaterThan(ctx context.Context, address common.Address, eventSig common.Hash, wordIndex int, wordValueMin common.Hash, confs Confirmations) ([]Log, error) { args, err := newQueryArgsForEvent(o.chainID, address, eventSig). withWordIndex(wordIndex). withWordValueMin(wordValueMin). @@ -590,6 +673,7 @@ func (o *DbORM) SelectLogsDataWordGreaterThan(address common.Address, eventSig c if err != nil { return nil, err } + query := fmt.Sprintf(` SELECT * FROM evm.logs WHERE evm_chain_id = :evm_chain_id @@ -598,14 +682,20 @@ func (o *DbORM) SelectLogsDataWordGreaterThan(address common.Address, eventSig c AND substring(data from 32*:word_index+1 for 32) >= :word_value_min AND block_number <= %s ORDER BY (block_number, log_index)`, nestedBlockNumberQuery(confs)) + var logs []Log - if err = o.q.WithOpts(qopts...).SelectNamed(&logs, query, args); err != nil { + query, sqlArgs, err := o.db.BindNamed(query, args) + if err != nil { + return nil, err + } + + if err := o.db.SelectContext(ctx, &logs, query, sqlArgs...); err != nil { return nil, err } return logs, nil } -func (o *DbORM) SelectLogsDataWordBetween(address common.Address, eventSig common.Hash, wordIndexMin int, wordIndexMax int, wordValue common.Hash, confs Confirmations, qopts ...pg.QOpt) ([]Log, error) { +func (o *DbORM) SelectLogsDataWordBetween(ctx context.Context, address common.Address, eventSig common.Hash, wordIndexMin int, wordIndexMax int, wordValue common.Hash, confs Confirmations) ([]Log, error) { args, err := newQueryArgsForEvent(o.chainID, address, eventSig). withWordIndexMin(wordIndexMin). withWordIndexMax(wordIndexMax). @@ -624,14 +714,20 @@ func (o *DbORM) SelectLogsDataWordBetween(address common.Address, eventSig commo AND substring(data from 32*:word_index_max+1 for 32) >= :word_value AND block_number <= %s ORDER BY (block_number, log_index)`, nestedBlockNumberQuery(confs)) + var logs []Log - if err = o.q.WithOpts(qopts...).SelectNamed(&logs, query, args); err != nil { + query, sqlArgs, err := o.db.BindNamed(query, args) + if err != nil { + return nil, err + } + + if err := o.db.SelectContext(ctx, &logs, query, sqlArgs...); err != nil { return nil, err } return logs, nil } -func (o *DbORM) SelectIndexedLogsTopicGreaterThan(address common.Address, eventSig common.Hash, topicIndex int, topicValueMin common.Hash, confs Confirmations, qopts ...pg.QOpt) ([]Log, error) { +func (o *DbORM) SelectIndexedLogsTopicGreaterThan(ctx context.Context, address common.Address, eventSig common.Hash, topicIndex int, topicValueMin common.Hash, confs Confirmations) ([]Log, error) { args, err := newQueryArgsForEvent(o.chainID, address, eventSig). withTopicIndex(topicIndex). withTopicValueMin(topicValueMin). @@ -640,6 +736,7 @@ func (o *DbORM) SelectIndexedLogsTopicGreaterThan(address common.Address, eventS if err != nil { return nil, err } + query := fmt.Sprintf(` SELECT * FROM evm.logs WHERE evm_chain_id = :evm_chain_id @@ -648,14 +745,20 @@ func (o *DbORM) SelectIndexedLogsTopicGreaterThan(address common.Address, eventS AND topics[:topic_index] >= :topic_value_min AND block_number <= %s ORDER BY (block_number, log_index)`, nestedBlockNumberQuery(confs)) + var logs []Log - if err = o.q.WithOpts(qopts...).SelectNamed(&logs, query, args); err != nil { + query, sqlArgs, err := o.db.BindNamed(query, args) + if err != nil { + return nil, err + } + + if err := o.db.SelectContext(ctx, &logs, query, sqlArgs...); err != nil { return nil, err } return logs, nil } -func (o *DbORM) SelectIndexedLogsTopicRange(address common.Address, eventSig common.Hash, topicIndex int, topicValueMin, topicValueMax common.Hash, confs Confirmations, qopts ...pg.QOpt) ([]Log, error) { +func (o *DbORM) SelectIndexedLogsTopicRange(ctx context.Context, address common.Address, eventSig common.Hash, topicIndex int, topicValueMin, topicValueMax common.Hash, confs Confirmations) ([]Log, error) { args, err := newQueryArgsForEvent(o.chainID, address, eventSig). withTopicIndex(topicIndex). withTopicValueMin(topicValueMin). @@ -665,6 +768,7 @@ func (o *DbORM) SelectIndexedLogsTopicRange(address common.Address, eventSig com if err != nil { return nil, err } + query := fmt.Sprintf(` SELECT * FROM evm.logs WHERE evm_chain_id = :evm_chain_id @@ -674,14 +778,20 @@ func (o *DbORM) SelectIndexedLogsTopicRange(address common.Address, eventSig com AND topics[:topic_index] <= :topic_value_max AND block_number <= %s ORDER BY (evm.logs.block_number, evm.logs.log_index)`, nestedBlockNumberQuery(confs)) + var logs []Log - if err := o.q.WithOpts(qopts...).SelectNamed(&logs, query, args); err != nil { + query, sqlArgs, err := o.db.BindNamed(query, args) + if err != nil { + return nil, err + } + + if err := o.db.SelectContext(ctx, &logs, query, sqlArgs...); err != nil { return nil, err } return logs, nil } -func (o *DbORM) SelectIndexedLogs(address common.Address, eventSig common.Hash, topicIndex int, topicValues []common.Hash, confs Confirmations, qopts ...pg.QOpt) ([]Log, error) { +func (o *DbORM) SelectIndexedLogs(ctx context.Context, address common.Address, eventSig common.Hash, topicIndex int, topicValues []common.Hash, confs Confirmations) ([]Log, error) { args, err := newQueryArgsForEvent(o.chainID, address, eventSig). withTopicIndex(topicIndex). withTopicValues(topicValues). @@ -690,6 +800,7 @@ func (o *DbORM) SelectIndexedLogs(address common.Address, eventSig common.Hash, if err != nil { return nil, err } + query := fmt.Sprintf(` SELECT * FROM evm.logs WHERE evm_chain_id = :evm_chain_id @@ -698,15 +809,21 @@ func (o *DbORM) SelectIndexedLogs(address common.Address, eventSig common.Hash, AND topics[:topic_index] = ANY(:topic_values) AND block_number <= %s ORDER BY (block_number, log_index)`, nestedBlockNumberQuery(confs)) + var logs []Log - if err := o.q.WithOpts(qopts...).SelectNamed(&logs, query, args); err != nil { + query, sqlArgs, err := o.db.BindNamed(query, args) + if err != nil { + return nil, err + } + + if err := o.db.SelectContext(ctx, &logs, query, sqlArgs...); err != nil { return nil, err } return logs, nil } -// SelectIndexedLogsByBlockRangeFilter finds the indexed logs in a given block range. -func (o *DbORM) SelectIndexedLogsByBlockRange(start, end int64, address common.Address, eventSig common.Hash, topicIndex int, topicValues []common.Hash, qopts ...pg.QOpt) ([]Log, error) { +// SelectIndexedLogsByBlockRange finds the indexed logs in a given block range. +func (o *DbORM) SelectIndexedLogsByBlockRange(ctx context.Context, start, end int64, address common.Address, eventSig common.Hash, topicIndex int, topicValues []common.Hash) ([]Log, error) { args, err := newQueryArgsForEvent(o.chainID, address, eventSig). withTopicIndex(topicIndex). withTopicValues(topicValues). @@ -716,23 +833,30 @@ func (o *DbORM) SelectIndexedLogsByBlockRange(start, end int64, address common.A if err != nil { return nil, err } - var logs []Log - err = o.q.WithOpts(qopts...).SelectNamed(&logs, ` - SELECT * FROM evm.logs + + query := `SELECT * FROM evm.logs WHERE evm_chain_id = :evm_chain_id AND address = :address AND event_sig = :event_sig AND topics[:topic_index] = ANY(:topic_values) AND block_number >= :start_block AND block_number <= :end_block - ORDER BY (block_number, log_index)`, args) + ORDER BY (block_number, log_index)` + + var logs []Log + query, sqlArgs, err := o.db.BindNamed(query, args) + if err != nil { + return nil, err + } + + err = o.db.SelectContext(ctx, &logs, query, sqlArgs...) if err != nil { return nil, err } return logs, nil } -func (o *DbORM) SelectIndexedLogsCreatedAfter(address common.Address, eventSig common.Hash, topicIndex int, topicValues []common.Hash, after time.Time, confs Confirmations, qopts ...pg.QOpt) ([]Log, error) { +func (o *DbORM) SelectIndexedLogsCreatedAfter(ctx context.Context, address common.Address, eventSig common.Hash, topicIndex int, topicValues []common.Hash, after time.Time, confs Confirmations) ([]Log, error) { args, err := newQueryArgsForEvent(o.chainID, address, eventSig). withBlockTimestampAfter(after). withConfs(confs). @@ -754,13 +878,18 @@ func (o *DbORM) SelectIndexedLogsCreatedAfter(address common.Address, eventSig c ORDER BY (block_number, log_index)`, nestedBlockNumberQuery(confs)) var logs []Log - if err = o.q.WithOpts(qopts...).SelectNamed(&logs, query, args); err != nil { + query, sqlArgs, err := o.db.BindNamed(query, args) + if err != nil { + return nil, err + } + + if err := o.db.SelectContext(ctx, &logs, query, sqlArgs...); err != nil { return nil, err } return logs, nil } -func (o *DbORM) SelectIndexedLogsByTxHash(address common.Address, eventSig common.Hash, txHash common.Hash, qopts ...pg.QOpt) ([]Log, error) { +func (o *DbORM) SelectIndexedLogsByTxHash(ctx context.Context, address common.Address, eventSig common.Hash, txHash common.Hash) ([]Log, error) { args, err := newQueryArgs(o.chainID). withTxHash(txHash). withAddress(address). @@ -769,14 +898,21 @@ func (o *DbORM) SelectIndexedLogsByTxHash(address common.Address, eventSig commo if err != nil { return nil, err } - var logs []Log - err = o.q.WithOpts(qopts...).SelectNamed(&logs, ` - SELECT * FROM evm.logs + + query := `SELECT * FROM evm.logs WHERE evm_chain_id = :evm_chain_id AND address = :address - AND event_sig = :event_sig + AND event_sig = :event_sig AND tx_hash = :tx_hash - ORDER BY (block_number, log_index)`, args) + ORDER BY (block_number, log_index)` + + var logs []Log + query, sqlArgs, err := o.db.BindNamed(query, args) + if err != nil { + return nil, err + } + + err = o.db.SelectContext(ctx, &logs, query, sqlArgs...) if err != nil { return nil, err } @@ -784,7 +920,7 @@ func (o *DbORM) SelectIndexedLogsByTxHash(address common.Address, eventSig commo } // SelectIndexedLogsWithSigsExcluding query's for logs that have signature A and exclude logs that have a corresponding signature B, matching is done based on the topic index both logs should be inside the block range and have the minimum number of confirmations -func (o *DbORM) SelectIndexedLogsWithSigsExcluding(sigA, sigB common.Hash, topicIndex int, address common.Address, startBlock, endBlock int64, confs Confirmations, qopts ...pg.QOpt) ([]Log, error) { +func (o *DbORM) SelectIndexedLogsWithSigsExcluding(ctx context.Context, sigA, sigB common.Hash, topicIndex int, address common.Address, startBlock, endBlock int64, confs Confirmations) ([]Log, error) { args, err := newQueryArgs(o.chainID). withAddress(address). withTopicIndex(topicIndex). @@ -817,8 +953,14 @@ func (o *DbORM) SelectIndexedLogsWithSigsExcluding(sigA, sigB common.Hash, topic AND b.block_number BETWEEN :start_block AND :end_block AND b.block_number <= %s ORDER BY block_number,log_index ASC`, nestedQuery, nestedQuery) + var logs []Log - if err := o.q.WithOpts(qopts...).SelectNamed(&logs, query, args); err != nil { + query, sqlArgs, err := o.db.BindNamed(query, args) + if err != nil { + return nil, err + } + + if err := o.db.SelectContext(ctx, &logs, query, sqlArgs...); err != nil { return nil, err } return logs, nil @@ -839,5 +981,4 @@ func nestedBlockNumberQuery(confs Confirmations) string { FROM evm.log_poller_blocks WHERE evm_chain_id = :evm_chain_id ORDER BY block_number DESC LIMIT 1) ` - } diff --git a/core/chains/evm/logpoller/orm_test.go b/core/chains/evm/logpoller/orm_test.go index 5bc26ed62b4..8a45ff2f1c5 100644 --- a/core/chains/evm/logpoller/orm_test.go +++ b/core/chains/evm/logpoller/orm_test.go @@ -10,6 +10,8 @@ import ( "testing" "time" + "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest" + "github.com/ethereum/go-ethereum/common" "github.com/jackc/pgx/v4" pkgerrors "github.com/pkg/errors" @@ -24,8 +26,6 @@ import ( ubig "github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils/big" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest/heavyweight" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" - "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest" - "github.com/smartcontractkit/chainlink/v2/core/services/pg" ) type block struct { @@ -77,6 +77,7 @@ func GenLogWithData(chainID *big.Int, address common.Address, eventSig common.Ha func TestLogPoller_Batching(t *testing.T) { t.Parallel() + ctx := testutils.Context(t) th := SetupTH(t, lpOpts) var logs []logpoller.Log // Inserts are limited to 65535 parameters. A log being 10 parameters this results in @@ -85,8 +86,8 @@ func TestLogPoller_Batching(t *testing.T) { for i := 0; i < 15000; i++ { logs = append(logs, GenLog(th.ChainID, int64(i+1), 1, "0x3", EmitterABI.Events["Log1"].ID.Bytes(), th.EmitterAddress1)) } - require.NoError(t, th.ORM.InsertLogs(logs)) - lgs, err := th.ORM.SelectLogsByBlockRange(1, 1) + require.NoError(t, th.ORM.InsertLogs(ctx, logs)) + lgs, err := th.ORM.SelectLogsByBlockRange(ctx, 1, 1) require.NoError(t, err) // Make sure all logs are inserted require.Equal(t, len(logs), len(lgs)) @@ -95,6 +96,7 @@ func TestLogPoller_Batching(t *testing.T) { func TestORM_GetBlocks_From_Range(t *testing.T) { th := SetupTH(t, lpOpts) o1 := th.ORM + ctx := testutils.Context(t) // Insert many blocks and read them back together blocks := []block{ { @@ -124,7 +126,7 @@ func TestORM_GetBlocks_From_Range(t *testing.T) { }, } for _, b := range blocks { - require.NoError(t, o1.InsertBlock(b.hash, b.number, time.Unix(b.timestamp, 0).UTC(), 0)) + require.NoError(t, o1.InsertBlock(ctx, b.hash, b.number, time.Unix(b.timestamp, 0).UTC(), 0)) } var blockNumbers []int64 @@ -132,17 +134,17 @@ func TestORM_GetBlocks_From_Range(t *testing.T) { blockNumbers = append(blockNumbers, b.number) } - lpBlocks, err := o1.GetBlocksRange(blockNumbers[0], blockNumbers[len(blockNumbers)-1]) + lpBlocks, err := o1.GetBlocksRange(ctx, blockNumbers[0], blockNumbers[len(blockNumbers)-1]) require.NoError(t, err) assert.Len(t, lpBlocks, len(blocks)) // Ignores non-existent block - lpBlocks2, err := o1.GetBlocksRange(blockNumbers[0], 15) + lpBlocks2, err := o1.GetBlocksRange(ctx, blockNumbers[0], 15) require.NoError(t, err) assert.Len(t, lpBlocks2, len(blocks)) // Only non-existent blocks - lpBlocks3, err := o1.GetBlocksRange(15, 15) + lpBlocks3, err := o1.GetBlocksRange(ctx, 15, 15) require.NoError(t, err) assert.Len(t, lpBlocks3, 0) } @@ -150,13 +152,14 @@ func TestORM_GetBlocks_From_Range(t *testing.T) { func TestORM_GetBlocks_From_Range_Recent_Blocks(t *testing.T) { th := SetupTH(t, lpOpts) o1 := th.ORM + ctx := testutils.Context(t) // Insert many blocks and read them back together var recentBlocks []block for i := 1; i <= 256; i++ { recentBlocks = append(recentBlocks, block{number: int64(i), hash: common.HexToHash(fmt.Sprintf("0x%d", i))}) } for _, b := range recentBlocks { - require.NoError(t, o1.InsertBlock(b.hash, b.number, time.Now(), 0)) + require.NoError(t, o1.InsertBlock(ctx, b.hash, b.number, time.Now(), 0)) } var blockNumbers []int64 @@ -164,17 +167,17 @@ func TestORM_GetBlocks_From_Range_Recent_Blocks(t *testing.T) { blockNumbers = append(blockNumbers, b.number) } - lpBlocks, err := o1.GetBlocksRange(blockNumbers[0], blockNumbers[len(blockNumbers)-1]) + lpBlocks, err := o1.GetBlocksRange(ctx, blockNumbers[0], blockNumbers[len(blockNumbers)-1]) require.NoError(t, err) assert.Len(t, lpBlocks, len(recentBlocks)) // Ignores non-existent block - lpBlocks2, err := o1.GetBlocksRange(blockNumbers[0], 257) + lpBlocks2, err := o1.GetBlocksRange(ctx, blockNumbers[0], 257) require.NoError(t, err) assert.Len(t, lpBlocks2, len(recentBlocks)) // Only non-existent blocks - lpBlocks3, err := o1.GetBlocksRange(257, 257) + lpBlocks3, err := o1.GetBlocksRange(ctx, 257, 257) require.NoError(t, err) assert.Len(t, lpBlocks3, 0) } @@ -183,51 +186,52 @@ func TestORM(t *testing.T) { th := SetupTH(t, lpOpts) o1 := th.ORM o2 := th.ORM2 + ctx := testutils.Context(t) // Insert and read back a block. - require.NoError(t, o1.InsertBlock(common.HexToHash("0x1234"), 10, time.Now(), 0)) - b, err := o1.SelectBlockByHash(common.HexToHash("0x1234")) + require.NoError(t, o1.InsertBlock(ctx, common.HexToHash("0x1234"), 10, time.Now(), 0)) + b, err := o1.SelectBlockByHash(ctx, common.HexToHash("0x1234")) require.NoError(t, err) assert.Equal(t, b.BlockNumber, int64(10)) assert.Equal(t, b.BlockHash.Bytes(), common.HexToHash("0x1234").Bytes()) assert.Equal(t, b.EvmChainId.String(), th.ChainID.String()) // Insert blocks from a different chain - require.NoError(t, o2.InsertBlock(common.HexToHash("0x1234"), 11, time.Now(), 0)) - require.NoError(t, o2.InsertBlock(common.HexToHash("0x1235"), 12, time.Now(), 0)) - b2, err := o2.SelectBlockByHash(common.HexToHash("0x1234")) + require.NoError(t, o2.InsertBlock(ctx, common.HexToHash("0x1234"), 11, time.Now(), 0)) + require.NoError(t, o2.InsertBlock(ctx, common.HexToHash("0x1235"), 12, time.Now(), 0)) + b2, err := o2.SelectBlockByHash(ctx, common.HexToHash("0x1234")) require.NoError(t, err) assert.Equal(t, b2.BlockNumber, int64(11)) assert.Equal(t, b2.BlockHash.Bytes(), common.HexToHash("0x1234").Bytes()) assert.Equal(t, b2.EvmChainId.String(), th.ChainID2.String()) - latest, err := o1.SelectLatestBlock() + latest, err := o1.SelectLatestBlock(ctx) require.NoError(t, err) assert.Equal(t, int64(10), latest.BlockNumber) - latest, err = o2.SelectLatestBlock() + latest, err = o2.SelectLatestBlock(ctx) require.NoError(t, err) assert.Equal(t, int64(12), latest.BlockNumber) // Delete a block (only 10 on chain). - require.NoError(t, o1.DeleteLogsAndBlocksAfter(10)) - _, err = o1.SelectBlockByHash(common.HexToHash("0x1234")) + require.NoError(t, o1.DeleteLogsAndBlocksAfter(ctx, 10)) + _, err = o1.SelectBlockByHash(ctx, common.HexToHash("0x1234")) require.Error(t, err) assert.True(t, pkgerrors.Is(err, sql.ErrNoRows)) // Delete blocks from another chain. - require.NoError(t, o2.DeleteLogsAndBlocksAfter(11)) - _, err = o2.SelectBlockByHash(common.HexToHash("0x1234")) + require.NoError(t, o2.DeleteLogsAndBlocksAfter(ctx, 11)) + _, err = o2.SelectBlockByHash(ctx, common.HexToHash("0x1234")) require.Error(t, err) assert.True(t, pkgerrors.Is(err, sql.ErrNoRows)) // Delete blocks after should also delete block 12. - _, err = o2.SelectBlockByHash(common.HexToHash("0x1235")) + _, err = o2.SelectBlockByHash(ctx, common.HexToHash("0x1235")) require.Error(t, err) assert.True(t, pkgerrors.Is(err, sql.ErrNoRows)) // Should be able to insert and read back a log. topic := common.HexToHash("0x1599") topic2 := common.HexToHash("0x1600") - require.NoError(t, o1.InsertLogs([]logpoller.Log{ + require.NoError(t, o1.InsertLogs(ctx, []logpoller.Log{ { EvmChainId: ubig.New(th.ChainID), LogIndex: 1, @@ -327,86 +331,86 @@ func TestORM(t *testing.T) { })) t.Log(latest.BlockNumber) - logs, err := o1.SelectLogsByBlockRange(1, 17) + logs, err := o1.SelectLogsByBlockRange(ctx, 1, 17) require.NoError(t, err) require.Len(t, logs, 8) - logs, err = o1.SelectLogsByBlockRange(10, 10) + logs, err = o1.SelectLogsByBlockRange(ctx, 10, 10) require.NoError(t, err) require.Equal(t, 1, len(logs)) assert.Equal(t, []byte("hello"), logs[0].Data) - logs, err = o1.SelectLogs(1, 1, common.HexToAddress("0x1234"), topic) + logs, err = o1.SelectLogs(ctx, 1, 1, common.HexToAddress("0x1234"), topic) require.NoError(t, err) assert.Equal(t, 0, len(logs)) - logs, err = o1.SelectLogs(10, 10, common.HexToAddress("0x1234"), topic) + logs, err = o1.SelectLogs(ctx, 10, 10, common.HexToAddress("0x1234"), topic) require.NoError(t, err) require.Equal(t, 1, len(logs)) // With no blocks, should be an error - _, err = o1.SelectLatestLogByEventSigWithConfs(topic, common.HexToAddress("0x1234"), 0) + _, err = o1.SelectLatestLogByEventSigWithConfs(ctx, topic, common.HexToAddress("0x1234"), 0) require.Error(t, err) - assert.True(t, pkgerrors.Is(err, sql.ErrNoRows)) + require.True(t, pkgerrors.Is(err, sql.ErrNoRows)) // With block 10, only 0 confs should work - require.NoError(t, o1.InsertBlock(common.HexToHash("0x1234"), 10, time.Now(), 0)) - log, err := o1.SelectLatestLogByEventSigWithConfs(topic, common.HexToAddress("0x1234"), 0) + require.NoError(t, o1.InsertBlock(ctx, common.HexToHash("0x1234"), 10, time.Now(), 0)) + log, err := o1.SelectLatestLogByEventSigWithConfs(ctx, topic, common.HexToAddress("0x1234"), 0) require.NoError(t, err) assert.Equal(t, int64(10), log.BlockNumber) - _, err = o1.SelectLatestLogByEventSigWithConfs(topic, common.HexToAddress("0x1234"), 1) + _, err = o1.SelectLatestLogByEventSigWithConfs(ctx, topic, common.HexToAddress("0x1234"), 1) require.Error(t, err) assert.True(t, pkgerrors.Is(err, sql.ErrNoRows)) // With block 12, anything <=2 should work - require.NoError(t, o1.InsertBlock(common.HexToHash("0x1234"), 11, time.Now(), 0)) - require.NoError(t, o1.InsertBlock(common.HexToHash("0x1235"), 12, time.Now(), 0)) - _, err = o1.SelectLatestLogByEventSigWithConfs(topic, common.HexToAddress("0x1234"), 0) + require.NoError(t, o1.InsertBlock(ctx, common.HexToHash("0x1234"), 11, time.Now(), 0)) + require.NoError(t, o1.InsertBlock(ctx, common.HexToHash("0x1235"), 12, time.Now(), 0)) + _, err = o1.SelectLatestLogByEventSigWithConfs(ctx, topic, common.HexToAddress("0x1234"), 0) require.NoError(t, err) - _, err = o1.SelectLatestLogByEventSigWithConfs(topic, common.HexToAddress("0x1234"), 1) + _, err = o1.SelectLatestLogByEventSigWithConfs(ctx, topic, common.HexToAddress("0x1234"), 1) require.NoError(t, err) - _, err = o1.SelectLatestLogByEventSigWithConfs(topic, common.HexToAddress("0x1234"), 2) + _, err = o1.SelectLatestLogByEventSigWithConfs(ctx, topic, common.HexToAddress("0x1234"), 2) require.NoError(t, err) - _, err = o1.SelectLatestLogByEventSigWithConfs(topic, common.HexToAddress("0x1234"), 3) + _, err = o1.SelectLatestLogByEventSigWithConfs(ctx, topic, common.HexToAddress("0x1234"), 3) require.Error(t, err) assert.True(t, pkgerrors.Is(err, sql.ErrNoRows)) // Required for confirmations to work - require.NoError(t, o1.InsertBlock(common.HexToHash("0x1234"), 13, time.Now(), 0)) - require.NoError(t, o1.InsertBlock(common.HexToHash("0x1235"), 14, time.Now(), 0)) - require.NoError(t, o1.InsertBlock(common.HexToHash("0x1236"), 15, time.Now(), 0)) + require.NoError(t, o1.InsertBlock(ctx, common.HexToHash("0x1234"), 13, time.Now(), 0)) + require.NoError(t, o1.InsertBlock(ctx, common.HexToHash("0x1235"), 14, time.Now(), 0)) + require.NoError(t, o1.InsertBlock(ctx, common.HexToHash("0x1236"), 15, time.Now(), 0)) // Latest log for topic for addr "0x1234" is @ block 11 - lgs, err := o1.SelectLatestLogEventSigsAddrsWithConfs(0 /* startBlock */, []common.Address{common.HexToAddress("0x1234")}, []common.Hash{topic}, 0) + lgs, err := o1.SelectLatestLogEventSigsAddrsWithConfs(ctx, 0 /* startBlock */, []common.Address{common.HexToAddress("0x1234")}, []common.Hash{topic}, 0) require.NoError(t, err) require.Equal(t, 1, len(lgs)) require.Equal(t, int64(11), lgs[0].BlockNumber) // should return two entries one for each address with the latest update - lgs, err = o1.SelectLatestLogEventSigsAddrsWithConfs(0 /* startBlock */, []common.Address{common.HexToAddress("0x1234"), common.HexToAddress("0x1235")}, []common.Hash{topic}, 0) + lgs, err = o1.SelectLatestLogEventSigsAddrsWithConfs(ctx, 0 /* startBlock */, []common.Address{common.HexToAddress("0x1234"), common.HexToAddress("0x1235")}, []common.Hash{topic}, 0) require.NoError(t, err) require.Equal(t, 2, len(lgs)) // should return two entries one for each topic for addr 0x1234 - lgs, err = o1.SelectLatestLogEventSigsAddrsWithConfs(0 /* startBlock */, []common.Address{common.HexToAddress("0x1234")}, []common.Hash{topic, topic2}, 0) + lgs, err = o1.SelectLatestLogEventSigsAddrsWithConfs(ctx, 0 /* startBlock */, []common.Address{common.HexToAddress("0x1234")}, []common.Hash{topic, topic2}, 0) require.NoError(t, err) require.Equal(t, 2, len(lgs)) // should return 4 entries one for each (address,topic) combination - lgs, err = o1.SelectLatestLogEventSigsAddrsWithConfs(0 /* startBlock */, []common.Address{common.HexToAddress("0x1234"), common.HexToAddress("0x1235")}, []common.Hash{topic, topic2}, 0) + lgs, err = o1.SelectLatestLogEventSigsAddrsWithConfs(ctx, 0 /* startBlock */, []common.Address{common.HexToAddress("0x1234"), common.HexToAddress("0x1235")}, []common.Hash{topic, topic2}, 0) require.NoError(t, err) require.Equal(t, 4, len(lgs)) // should return 3 entries of logs with atleast 1 confirmation - lgs, err = o1.SelectLatestLogEventSigsAddrsWithConfs(0 /* startBlock */, []common.Address{common.HexToAddress("0x1234"), common.HexToAddress("0x1235")}, []common.Hash{topic, topic2}, 1) + lgs, err = o1.SelectLatestLogEventSigsAddrsWithConfs(ctx, 0 /* startBlock */, []common.Address{common.HexToAddress("0x1234"), common.HexToAddress("0x1235")}, []common.Hash{topic, topic2}, 1) require.NoError(t, err) require.Equal(t, 3, len(lgs)) // should return 2 entries of logs with atleast 2 confirmation - lgs, err = o1.SelectLatestLogEventSigsAddrsWithConfs(0 /* startBlock */, []common.Address{common.HexToAddress("0x1234"), common.HexToAddress("0x1235")}, []common.Hash{topic, topic2}, 2) + lgs, err = o1.SelectLatestLogEventSigsAddrsWithConfs(ctx, 0 /* startBlock */, []common.Address{common.HexToAddress("0x1234"), common.HexToAddress("0x1235")}, []common.Hash{topic, topic2}, 2) require.NoError(t, err) require.Equal(t, 2, len(lgs)) - require.NoError(t, o1.InsertBlock(common.HexToHash("0x1237"), 16, time.Now(), 0)) - require.NoError(t, o1.InsertBlock(common.HexToHash("0x1238"), 17, time.Now(), 0)) + require.NoError(t, o1.InsertBlock(ctx, common.HexToHash("0x1237"), 16, time.Now(), 0)) + require.NoError(t, o1.InsertBlock(ctx, common.HexToHash("0x1238"), 17, time.Now(), 0)) filter0 := logpoller.Filter{ Name: "permanent retention filter", @@ -428,30 +432,30 @@ func TestORM(t *testing.T) { } // Test inserting filters and reading them back - require.NoError(t, o1.InsertFilter(filter0)) - require.NoError(t, o1.InsertFilter(filter12)) - require.NoError(t, o1.InsertFilter(filter2)) + require.NoError(t, o1.InsertFilter(ctx, filter0)) + require.NoError(t, o1.InsertFilter(ctx, filter12)) + require.NoError(t, o1.InsertFilter(ctx, filter2)) - filters, err := o1.LoadFilters() + filters, err := o1.LoadFilters(ctx) require.NoError(t, err) require.Len(t, filters, 3) assert.Equal(t, filter0, filters["permanent retention filter"]) assert.Equal(t, filter12, filters["short retention filter"]) assert.Equal(t, filter2, filters["long retention filter"]) - latest, err = o1.SelectLatestBlock() + latest, err = o1.SelectLatestBlock(ctx) require.NoError(t, err) require.Equal(t, int64(17), latest.BlockNumber) - logs, err = o1.SelectLogsByBlockRange(1, latest.BlockNumber) + logs, err = o1.SelectLogsByBlockRange(ctx, 1, latest.BlockNumber) require.NoError(t, err) require.Len(t, logs, 8) // Delete expired logs time.Sleep(2 * time.Millisecond) // just in case we haven't reached the end of the 1ms retention period - deleted, err := o1.DeleteExpiredLogs(0, pg.WithParentCtx(testutils.Context(t))) + deleted, err := o1.DeleteExpiredLogs(ctx, 0) require.NoError(t, err) assert.Equal(t, int64(1), deleted) - logs, err = o1.SelectLogsByBlockRange(1, latest.BlockNumber) + logs, err = o1.SelectLogsByBlockRange(ctx, 1, latest.BlockNumber) require.NoError(t, err) // The only log which should be deleted is the one which matches filter1 (ret=1ms) but not filter12 (ret=1 hour) // Importantly, it shouldn't delete any logs matching only filter0 (ret=0 meaning permanent retention). Anything @@ -459,9 +463,9 @@ func TestORM(t *testing.T) { assert.Len(t, logs, 7) // Delete logs after should delete all logs. - err = o1.DeleteLogsAndBlocksAfter(1) + err = o1.DeleteLogsAndBlocksAfter(ctx, 1) require.NoError(t, err) - logs, err = o1.SelectLogsByBlockRange(1, latest.BlockNumber) + logs, err = o1.SelectLogsByBlockRange(ctx, 1, latest.BlockNumber) require.NoError(t, err) require.Zero(t, len(logs)) } @@ -483,7 +487,7 @@ func TestLogPollerFilters(t *testing.T) { chainID := testutils.NewRandomEVMChainID() dbx := pgtest.NewSqlxDB(t) - orm := logpoller.NewORM(chainID, dbx, lggr, pgtest.NewQConfig(true)) + orm := logpoller.NewORM(chainID, dbx, lggr) event1 := EmitterABI.Events["Log1"].ID event2 := EmitterABI.Events["Log2"].ID @@ -493,6 +497,8 @@ func TestLogPollerFilters(t *testing.T) { topicC := common.HexToHash("0x3333") topicD := common.HexToHash("0x4444") + ctx := testutils.Context(t) + filters := []logpoller.Filter{{ Name: "filter by topic2", EventSigs: types.HashArray{event1, event2}, @@ -530,7 +536,7 @@ func TestLogPollerFilters(t *testing.T) { for _, filter := range filters { t.Run("Save filter: "+filter.Name, func(t *testing.T) { var count int - err := orm.InsertFilter(filter) + err := orm.InsertFilter(ctx, filter) require.NoError(t, err) err = dbx.Get(&count, `SELECT COUNT(*) FROM evm.log_poller_filters WHERE evm_chain_id = $1 AND name = $2`, ubig.New(chainID), filter.Name) require.NoError(t, err) @@ -550,7 +556,7 @@ func TestLogPollerFilters(t *testing.T) { // Make sure they all come back the same when we reload them t.Run("Load filters", func(t *testing.T) { - loadedFilters, err := orm.LoadFilters() + loadedFilters, err := orm.LoadFilters(ctx) require.NoError(t, err) for _, filter := range filters { loadedFilter, ok := loadedFilters[filter.Name] @@ -560,7 +566,7 @@ func TestLogPollerFilters(t *testing.T) { }) } -func insertLogsTopicValueRange(t *testing.T, chainID *big.Int, o *logpoller.DbORM, addr common.Address, blockNumber int, eventSig common.Hash, start, stop int) { +func insertLogsTopicValueRange(t *testing.T, chainID *big.Int, o logpoller.ORM, addr common.Address, blockNumber int, eventSig common.Hash, start, stop int) { var lgs []logpoller.Log for i := start; i <= stop; i++ { lgs = append(lgs, logpoller.Log{ @@ -575,66 +581,67 @@ func insertLogsTopicValueRange(t *testing.T, chainID *big.Int, o *logpoller.DbOR Data: []byte("hello"), }) } - require.NoError(t, o.InsertLogs(lgs)) + require.NoError(t, o.InsertLogs(testutils.Context(t), lgs)) } func TestORM_IndexedLogs(t *testing.T) { th := SetupTH(t, lpOpts) o1 := th.ORM + ctx := testutils.Context(t) eventSig := common.HexToHash("0x1599") addr := common.HexToAddress("0x1234") - require.NoError(t, o1.InsertBlock(common.HexToHash("0x1"), 1, time.Now(), 0)) + require.NoError(t, o1.InsertBlock(ctx, common.HexToHash("0x1"), 1, time.Now(), 0)) insertLogsTopicValueRange(t, th.ChainID, o1, addr, 1, eventSig, 1, 3) insertLogsTopicValueRange(t, th.ChainID, o1, addr, 2, eventSig, 4, 4) // unconfirmed - lgs, err := o1.SelectIndexedLogs(addr, eventSig, 1, []common.Hash{logpoller.EvmWord(1)}, 0) + lgs, err := o1.SelectIndexedLogs(ctx, addr, eventSig, 1, []common.Hash{logpoller.EvmWord(1)}, 0) require.NoError(t, err) require.Equal(t, 1, len(lgs)) assert.Equal(t, logpoller.EvmWord(1).Bytes(), lgs[0].GetTopics()[1].Bytes()) - lgs, err = o1.SelectIndexedLogs(addr, eventSig, 1, []common.Hash{logpoller.EvmWord(1), logpoller.EvmWord(2)}, 0) + lgs, err = o1.SelectIndexedLogs(ctx, addr, eventSig, 1, []common.Hash{logpoller.EvmWord(1), logpoller.EvmWord(2)}, 0) require.NoError(t, err) assert.Equal(t, 2, len(lgs)) - lgs, err = o1.SelectIndexedLogsByBlockRange(1, 1, addr, eventSig, 1, []common.Hash{logpoller.EvmWord(1)}) + lgs, err = o1.SelectIndexedLogsByBlockRange(ctx, 1, 1, addr, eventSig, 1, []common.Hash{logpoller.EvmWord(1)}) require.NoError(t, err) assert.Equal(t, 1, len(lgs)) - lgs, err = o1.SelectIndexedLogsByBlockRange(1, 2, addr, eventSig, 1, []common.Hash{logpoller.EvmWord(2)}) + lgs, err = o1.SelectIndexedLogsByBlockRange(ctx, 1, 2, addr, eventSig, 1, []common.Hash{logpoller.EvmWord(2)}) require.NoError(t, err) assert.Equal(t, 1, len(lgs)) - lgs, err = o1.SelectIndexedLogsByBlockRange(1, 2, addr, eventSig, 1, []common.Hash{logpoller.EvmWord(1)}) + lgs, err = o1.SelectIndexedLogsByBlockRange(ctx, 1, 2, addr, eventSig, 1, []common.Hash{logpoller.EvmWord(1)}) require.NoError(t, err) assert.Equal(t, 1, len(lgs)) - _, err = o1.SelectIndexedLogsByBlockRange(1, 2, addr, eventSig, 0, []common.Hash{logpoller.EvmWord(1)}) + _, err = o1.SelectIndexedLogsByBlockRange(ctx, 1, 2, addr, eventSig, 0, []common.Hash{logpoller.EvmWord(1)}) require.Error(t, err) assert.Contains(t, err.Error(), "invalid index for topic: 0") - _, err = o1.SelectIndexedLogsByBlockRange(1, 2, addr, eventSig, 4, []common.Hash{logpoller.EvmWord(1)}) + _, err = o1.SelectIndexedLogsByBlockRange(ctx, 1, 2, addr, eventSig, 4, []common.Hash{logpoller.EvmWord(1)}) require.Error(t, err) assert.Contains(t, err.Error(), "invalid index for topic: 4") - lgs, err = o1.SelectIndexedLogsTopicGreaterThan(addr, eventSig, 1, logpoller.EvmWord(2), 0) + lgs, err = o1.SelectIndexedLogsTopicGreaterThan(ctx, addr, eventSig, 1, logpoller.EvmWord(2), 0) require.NoError(t, err) assert.Equal(t, 2, len(lgs)) - lgs, err = o1.SelectIndexedLogsTopicRange(addr, eventSig, 1, logpoller.EvmWord(3), logpoller.EvmWord(3), 0) + lgs, err = o1.SelectIndexedLogsTopicRange(ctx, addr, eventSig, 1, logpoller.EvmWord(3), logpoller.EvmWord(3), 0) require.NoError(t, err) assert.Equal(t, 1, len(lgs)) assert.Equal(t, logpoller.EvmWord(3).Bytes(), lgs[0].GetTopics()[1].Bytes()) - lgs, err = o1.SelectIndexedLogsTopicRange(addr, eventSig, 1, logpoller.EvmWord(1), logpoller.EvmWord(3), 0) + lgs, err = o1.SelectIndexedLogsTopicRange(ctx, addr, eventSig, 1, logpoller.EvmWord(1), logpoller.EvmWord(3), 0) require.NoError(t, err) assert.Equal(t, 3, len(lgs)) // Check confirmations work as expected. - require.NoError(t, o1.InsertBlock(common.HexToHash("0x2"), 2, time.Now(), 0)) - lgs, err = o1.SelectIndexedLogsTopicRange(addr, eventSig, 1, logpoller.EvmWord(4), logpoller.EvmWord(4), 1) + require.NoError(t, o1.InsertBlock(ctx, common.HexToHash("0x2"), 2, time.Now(), 0)) + lgs, err = o1.SelectIndexedLogsTopicRange(ctx, addr, eventSig, 1, logpoller.EvmWord(4), logpoller.EvmWord(4), 1) require.NoError(t, err) assert.Equal(t, 0, len(lgs)) - require.NoError(t, o1.InsertBlock(common.HexToHash("0x3"), 3, time.Now(), 0)) - lgs, err = o1.SelectIndexedLogsTopicRange(addr, eventSig, 1, logpoller.EvmWord(4), logpoller.EvmWord(4), 1) + require.NoError(t, o1.InsertBlock(ctx, common.HexToHash("0x3"), 3, time.Now(), 0)) + lgs, err = o1.SelectIndexedLogsTopicRange(ctx, addr, eventSig, 1, logpoller.EvmWord(4), logpoller.EvmWord(4), 1) require.NoError(t, err) assert.Equal(t, 1, len(lgs)) } @@ -642,11 +649,12 @@ func TestORM_IndexedLogs(t *testing.T) { func TestORM_SelectIndexedLogsByTxHash(t *testing.T) { th := SetupTH(t, lpOpts) o1 := th.ORM + ctx := testutils.Context(t) eventSig := common.HexToHash("0x1599") txHash := common.HexToHash("0x1888") addr := common.HexToAddress("0x1234") - require.NoError(t, o1.InsertBlock(common.HexToHash("0x1"), 1, time.Now(), 0)) + require.NoError(t, o1.InsertBlock(ctx, common.HexToHash("0x1"), 1, time.Now(), 0)) logs := []logpoller.Log{ { EvmChainId: ubig.New(th.ChainID), @@ -695,9 +703,9 @@ func TestORM_SelectIndexedLogsByTxHash(t *testing.T) { Data: append(logpoller.EvmWord(2).Bytes(), logpoller.EvmWord(3).Bytes()...), }, } - require.NoError(t, o1.InsertLogs(logs)) + require.NoError(t, o1.InsertLogs(ctx, logs)) - retrievedLogs, err := o1.SelectIndexedLogsByTxHash(addr, eventSig, txHash) + retrievedLogs, err := o1.SelectIndexedLogsByTxHash(ctx, addr, eventSig, txHash) require.NoError(t, err) require.Equal(t, 2, len(retrievedLogs)) @@ -708,10 +716,11 @@ func TestORM_SelectIndexedLogsByTxHash(t *testing.T) { func TestORM_DataWords(t *testing.T) { th := SetupTH(t, lpOpts) o1 := th.ORM + ctx := testutils.Context(t) eventSig := common.HexToHash("0x1599") addr := common.HexToAddress("0x1234") - require.NoError(t, o1.InsertBlock(common.HexToHash("0x1"), 1, time.Now(), 0)) - require.NoError(t, o1.InsertLogs([]logpoller.Log{ + require.NoError(t, o1.InsertBlock(ctx, common.HexToHash("0x1"), 1, time.Now(), 0)) + require.NoError(t, o1.InsertLogs(ctx, []logpoller.Log{ { EvmChainId: ubig.New(th.ChainID), LogIndex: int64(0), @@ -737,33 +746,33 @@ func TestORM_DataWords(t *testing.T) { }, })) // Outside range should fail. - lgs, err := o1.SelectLogsDataWordRange(addr, eventSig, 0, logpoller.EvmWord(2), logpoller.EvmWord(2), 0) + lgs, err := o1.SelectLogsDataWordRange(ctx, addr, eventSig, 0, logpoller.EvmWord(2), logpoller.EvmWord(2), 0) require.NoError(t, err) - assert.Equal(t, 0, len(lgs)) + require.Equal(t, 0, len(lgs)) // Range including log should succeed - lgs, err = o1.SelectLogsDataWordRange(addr, eventSig, 0, logpoller.EvmWord(1), logpoller.EvmWord(2), 0) + lgs, err = o1.SelectLogsDataWordRange(ctx, addr, eventSig, 0, logpoller.EvmWord(1), logpoller.EvmWord(2), 0) require.NoError(t, err) - assert.Equal(t, 1, len(lgs)) + require.Equal(t, 1, len(lgs)) // Range only covering log should succeed - lgs, err = o1.SelectLogsDataWordRange(addr, eventSig, 0, logpoller.EvmWord(1), logpoller.EvmWord(1), 0) + lgs, err = o1.SelectLogsDataWordRange(ctx, addr, eventSig, 0, logpoller.EvmWord(1), logpoller.EvmWord(1), 0) require.NoError(t, err) - assert.Equal(t, 1, len(lgs)) + require.Equal(t, 1, len(lgs)) // Cannot query for unconfirmed second log. - lgs, err = o1.SelectLogsDataWordRange(addr, eventSig, 1, logpoller.EvmWord(3), logpoller.EvmWord(3), 0) + lgs, err = o1.SelectLogsDataWordRange(ctx, addr, eventSig, 1, logpoller.EvmWord(3), logpoller.EvmWord(3), 0) require.NoError(t, err) - assert.Equal(t, 0, len(lgs)) + require.Equal(t, 0, len(lgs)) // Confirm it, then can query. - require.NoError(t, o1.InsertBlock(common.HexToHash("0x2"), 2, time.Now(), 0)) - lgs, err = o1.SelectLogsDataWordRange(addr, eventSig, 1, logpoller.EvmWord(3), logpoller.EvmWord(3), 0) + require.NoError(t, o1.InsertBlock(ctx, common.HexToHash("0x2"), 2, time.Now(), 0)) + lgs, err = o1.SelectLogsDataWordRange(ctx, addr, eventSig, 1, logpoller.EvmWord(3), logpoller.EvmWord(3), 0) require.NoError(t, err) - assert.Equal(t, 1, len(lgs)) - assert.Equal(t, lgs[0].Data, append(logpoller.EvmWord(2).Bytes(), logpoller.EvmWord(3).Bytes()...)) + require.Equal(t, 1, len(lgs)) + require.Equal(t, lgs[0].Data, append(logpoller.EvmWord(2).Bytes(), logpoller.EvmWord(3).Bytes()...)) // Check greater than 1 yields both logs. - lgs, err = o1.SelectLogsDataWordGreaterThan(addr, eventSig, 0, logpoller.EvmWord(1), 0) + lgs, err = o1.SelectLogsDataWordGreaterThan(ctx, addr, eventSig, 0, logpoller.EvmWord(1), 0) require.NoError(t, err) assert.Equal(t, 2, len(lgs)) } @@ -771,6 +780,7 @@ func TestORM_DataWords(t *testing.T) { func TestORM_SelectLogsWithSigsByBlockRangeFilter(t *testing.T) { th := SetupTH(t, lpOpts) o1 := th.ORM + ctx := testutils.Context(t) // Insert logs on different topics, should be able to read them // back using SelectLogsWithSigs and specifying @@ -846,10 +856,10 @@ func TestORM_SelectLogsWithSigsByBlockRangeFilter(t *testing.T) { Data: []byte("hello6"), }, } - require.NoError(t, o1.InsertLogs(inputLogs)) + require.NoError(t, o1.InsertLogs(ctx, inputLogs)) startBlock, endBlock := int64(10), int64(15) - logs, err := o1.SelectLogsWithSigs(startBlock, endBlock, sourceAddr, []common.Hash{ + logs, err := o1.SelectLogsWithSigs(ctx, startBlock, endBlock, sourceAddr, []common.Hash{ topic, topic2, }) @@ -865,31 +875,33 @@ func TestORM_SelectLogsWithSigsByBlockRangeFilter(t *testing.T) { func TestORM_DeleteBlocksBefore(t *testing.T) { th := SetupTH(t, lpOpts) o1 := th.ORM - require.NoError(t, o1.InsertBlock(common.HexToHash("0x1234"), 1, time.Now(), 0)) - require.NoError(t, o1.InsertBlock(common.HexToHash("0x1235"), 2, time.Now(), 0)) - deleted, err := o1.DeleteBlocksBefore(1, 0) + ctx := testutils.Context(t) + require.NoError(t, o1.InsertBlock(ctx, common.HexToHash("0x1234"), 1, time.Now(), 0)) + require.NoError(t, o1.InsertBlock(ctx, common.HexToHash("0x1235"), 2, time.Now(), 0)) + deleted, err := o1.DeleteBlocksBefore(ctx, 1, 0) require.NoError(t, err) - assert.Equal(t, int64(1), deleted) + require.Equal(t, int64(1), deleted) // 1 should be gone. - _, err = o1.SelectBlockByNumber(1) + _, err = o1.SelectBlockByNumber(ctx, 1) require.Equal(t, err, sql.ErrNoRows) - b, err := o1.SelectBlockByNumber(2) + b, err := o1.SelectBlockByNumber(ctx, 2) require.NoError(t, err) assert.Equal(t, int64(2), b.BlockNumber) // Clear multiple - require.NoError(t, o1.InsertBlock(common.HexToHash("0x1236"), 3, time.Now(), 0)) - require.NoError(t, o1.InsertBlock(common.HexToHash("0x1237"), 4, time.Now(), 0)) - deleted, err = o1.DeleteBlocksBefore(3, 0) + require.NoError(t, o1.InsertBlock(ctx, common.HexToHash("0x1236"), 3, time.Now(), 0)) + require.NoError(t, o1.InsertBlock(ctx, common.HexToHash("0x1237"), 4, time.Now(), 0)) + deleted, err = o1.DeleteBlocksBefore(ctx, 3, 0) require.NoError(t, err) assert.Equal(t, int64(2), deleted) - _, err = o1.SelectBlockByNumber(2) + _, err = o1.SelectBlockByNumber(ctx, 2) require.Equal(t, err, sql.ErrNoRows) - _, err = o1.SelectBlockByNumber(3) + _, err = o1.SelectBlockByNumber(ctx, 3) require.Equal(t, err, sql.ErrNoRows) } func TestLogPoller_Logs(t *testing.T) { t.Parallel() + ctx := testutils.Context(t) th := SetupTH(t, lpOpts) event1 := EmitterABI.Events["Log1"].ID event2 := EmitterABI.Events["Log2"].ID @@ -897,7 +909,7 @@ func TestLogPoller_Logs(t *testing.T) { address2 := common.HexToAddress("0x6E225058950f237371261C985Db6bDe26df2200E") // Block 1-3 - require.NoError(t, th.ORM.InsertLogs([]logpoller.Log{ + require.NoError(t, th.ORM.InsertLogs(ctx, []logpoller.Log{ GenLog(th.ChainID, 1, 1, "0x3", event1[:], address1), GenLog(th.ChainID, 2, 1, "0x3", event2[:], address2), GenLog(th.ChainID, 1, 2, "0x4", event1[:], address2), @@ -907,7 +919,7 @@ func TestLogPoller_Logs(t *testing.T) { })) // Select for all Addresses - lgs, err := th.ORM.SelectLogsByBlockRange(1, 3) + lgs, err := th.ORM.SelectLogsByBlockRange(ctx, 1, 3) require.NoError(t, err) require.Equal(t, 6, len(lgs)) assert.Equal(t, "0x0000000000000000000000000000000000000000000000000000000000000003", lgs[0].BlockHash.String()) @@ -918,7 +930,7 @@ func TestLogPoller_Logs(t *testing.T) { assert.Equal(t, "0x0000000000000000000000000000000000000000000000000000000000000005", lgs[5].BlockHash.String()) // Filter by Address and topic - lgs, err = th.ORM.SelectLogs(1, 3, address1, event1) + lgs, err = th.ORM.SelectLogs(ctx, 1, 3, address1, event1) require.NoError(t, err) require.Equal(t, 2, len(lgs)) assert.Equal(t, "0x0000000000000000000000000000000000000000000000000000000000000003", lgs[0].BlockHash.String()) @@ -928,7 +940,7 @@ func TestLogPoller_Logs(t *testing.T) { assert.Equal(t, address1, lgs[1].Address) // Filter by block - lgs, err = th.ORM.SelectLogs(2, 2, address2, event1) + lgs, err = th.ORM.SelectLogs(ctx, 2, 2, address2, event1) require.NoError(t, err) require.Equal(t, 1, len(lgs)) assert.Equal(t, "0x0000000000000000000000000000000000000000000000000000000000000004", lgs[0].BlockHash.String()) @@ -940,6 +952,7 @@ func TestLogPoller_Logs(t *testing.T) { func BenchmarkLogs(b *testing.B) { th := SetupTH(b, lpOpts) o := th.ORM + ctx := testutils.Context(b) var lgs []logpoller.Log addr := common.HexToAddress("0x1234") for i := 0; i < 10_000; i++ { @@ -955,17 +968,20 @@ func BenchmarkLogs(b *testing.B) { Data: common.HexToHash(fmt.Sprintf("0x%d", i)).Bytes(), }) } - require.NoError(b, o.InsertLogs(lgs)) + require.NoError(b, o.InsertLogs(ctx, lgs)) b.ResetTimer() for n := 0; n < b.N; n++ { - _, err := o.SelectLogsDataWordRange(addr, EmitterABI.Events["Log1"].ID, 0, logpoller.EvmWord(8000), logpoller.EvmWord(8002), 0) + lgs, err := o.SelectLogsDataWordRange(ctx, addr, EmitterABI.Events["Log1"].ID, 0, logpoller.EvmWord(8000), logpoller.EvmWord(8002), 0) require.NoError(b, err) + // TODO: Why is SelectLogsDataWordRange not returning any logs?! + fmt.Println("len logs:", len(lgs)) } } func TestSelectLogsWithSigsExcluding(t *testing.T) { th := SetupTH(t, lpOpts) orm := th.ORM + ctx := testutils.Context(t) addressA := common.HexToAddress("0x11111") addressB := common.HexToAddress("0x22222") addressC := common.HexToAddress("0x33333") @@ -981,7 +997,7 @@ func TestSelectLogsWithSigsExcluding(t *testing.T) { topicD := common.HexToHash("0x000d") //Insert two logs that mimics an oracle request from 2 different addresses (matching will be on topic index 1) - require.NoError(t, orm.InsertLogs([]logpoller.Log{ + require.NoError(t, orm.InsertLogs(ctx, []logpoller.Log{ { EvmChainId: (*ubig.Big)(th.ChainID), LogIndex: 1, @@ -1007,22 +1023,22 @@ func TestSelectLogsWithSigsExcluding(t *testing.T) { Data: []byte("requestID-B1"), }, })) - require.NoError(t, orm.InsertBlock(common.HexToHash("0x1"), 1, time.Now(), 0)) + require.NoError(t, orm.InsertBlock(ctx, common.HexToHash("0x1"), 1, time.Now(), 0)) //Get any requestSigA from addressA that do not have a equivalent responseSigA - logs, err := orm.SelectIndexedLogsWithSigsExcluding(requestSigA, responseSigA, 1, addressA, 0, 3, 0) + logs, err := orm.SelectIndexedLogsWithSigsExcluding(ctx, requestSigA, responseSigA, 1, addressA, 0, 3, 0) require.NoError(t, err) require.Len(t, logs, 1) require.Equal(t, logs[0].Data, []byte("requestID-A1")) //Get any requestSigB from addressB that do not have a equivalent responseSigB - logs, err = orm.SelectIndexedLogsWithSigsExcluding(requestSigB, responseSigB, 1, addressB, 0, 3, 0) + logs, err = orm.SelectIndexedLogsWithSigsExcluding(ctx, requestSigB, responseSigB, 1, addressB, 0, 3, 0) require.NoError(t, err) require.Len(t, logs, 1) require.Equal(t, logs[0].Data, []byte("requestID-B1")) //Insert a log that mimics response for requestID-A1 - require.NoError(t, orm.InsertLogs([]logpoller.Log{ + require.NoError(t, orm.InsertLogs(ctx, []logpoller.Log{ { EvmChainId: (*ubig.Big)(th.ChainID), LogIndex: 3, @@ -1036,21 +1052,21 @@ func TestSelectLogsWithSigsExcluding(t *testing.T) { Data: []byte("responseID-A1"), }, })) - require.NoError(t, orm.InsertBlock(common.HexToHash("0x2"), 2, time.Now(), 0)) + require.NoError(t, orm.InsertBlock(ctx, common.HexToHash("0x2"), 2, time.Now(), 0)) //Should return nothing as requestID-A1 has been fulfilled - logs, err = orm.SelectIndexedLogsWithSigsExcluding(requestSigA, responseSigA, 1, addressA, 0, 3, 0) + logs, err = orm.SelectIndexedLogsWithSigsExcluding(ctx, requestSigA, responseSigA, 1, addressA, 0, 3, 0) require.NoError(t, err) require.Len(t, logs, 0) //requestID-B1 should still be unfulfilled - logs, err = orm.SelectIndexedLogsWithSigsExcluding(requestSigB, responseSigB, 1, addressB, 0, 3, 0) + logs, err = orm.SelectIndexedLogsWithSigsExcluding(ctx, requestSigB, responseSigB, 1, addressB, 0, 3, 0) require.NoError(t, err) require.Len(t, logs, 1) require.Equal(t, logs[0].Data, []byte("requestID-B1")) //Insert 3 request from addressC (matching will be on topic index 3) - require.NoError(t, orm.InsertLogs([]logpoller.Log{ + require.NoError(t, orm.InsertLogs(ctx, []logpoller.Log{ { EvmChainId: (*ubig.Big)(th.ChainID), LogIndex: 5, @@ -1087,10 +1103,10 @@ func TestSelectLogsWithSigsExcluding(t *testing.T) { Data: []byte("requestID-C3"), }, })) - require.NoError(t, orm.InsertBlock(common.HexToHash("0x3"), 3, time.Now(), 0)) + require.NoError(t, orm.InsertBlock(ctx, common.HexToHash("0x3"), 3, time.Now(), 0)) //Get all unfulfilled requests from addressC, match on topic index 3 - logs, err = orm.SelectIndexedLogsWithSigsExcluding(requestSigB, responseSigB, 3, addressC, 0, 4, 0) + logs, err = orm.SelectIndexedLogsWithSigsExcluding(ctx, requestSigB, responseSigB, 3, addressC, 0, 4, 0) require.NoError(t, err) require.Len(t, logs, 3) require.Equal(t, logs[0].Data, []byte("requestID-C1")) @@ -1098,7 +1114,7 @@ func TestSelectLogsWithSigsExcluding(t *testing.T) { require.Equal(t, logs[2].Data, []byte("requestID-C3")) //Fulfill requestID-C2 - require.NoError(t, orm.InsertLogs([]logpoller.Log{ + require.NoError(t, orm.InsertLogs(ctx, []logpoller.Log{ { EvmChainId: (*ubig.Big)(th.ChainID), LogIndex: 8, @@ -1114,14 +1130,14 @@ func TestSelectLogsWithSigsExcluding(t *testing.T) { })) //Verify that requestID-C2 is now fulfilled (not returned) - logs, err = orm.SelectIndexedLogsWithSigsExcluding(requestSigB, responseSigB, 3, addressC, 0, 4, 0) + logs, err = orm.SelectIndexedLogsWithSigsExcluding(ctx, requestSigB, responseSigB, 3, addressC, 0, 4, 0) require.NoError(t, err) require.Len(t, logs, 2) require.Equal(t, logs[0].Data, []byte("requestID-C1")) require.Equal(t, logs[1].Data, []byte("requestID-C3")) //Fulfill requestID-C3 - require.NoError(t, orm.InsertLogs([]logpoller.Log{ + require.NoError(t, orm.InsertLogs(ctx, []logpoller.Log{ { EvmChainId: (*ubig.Big)(th.ChainID), LogIndex: 9, @@ -1137,26 +1153,26 @@ func TestSelectLogsWithSigsExcluding(t *testing.T) { })) //Verify that requestID-C3 is now fulfilled (not returned) - logs, err = orm.SelectIndexedLogsWithSigsExcluding(requestSigB, responseSigB, 3, addressC, 0, 4, 0) + logs, err = orm.SelectIndexedLogsWithSigsExcluding(ctx, requestSigB, responseSigB, 3, addressC, 0, 4, 0) require.NoError(t, err) require.Len(t, logs, 1) require.Equal(t, logs[0].Data, []byte("requestID-C1")) //Should return no logs as the number of confirmations is not satisfied - logs, err = orm.SelectIndexedLogsWithSigsExcluding(requestSigB, responseSigB, 3, addressC, 0, 4, 3) + logs, err = orm.SelectIndexedLogsWithSigsExcluding(ctx, requestSigB, responseSigB, 3, addressC, 0, 4, 3) require.NoError(t, err) require.Len(t, logs, 0) - require.NoError(t, orm.InsertBlock(common.HexToHash("0x4"), 4, time.Now(), 0)) - require.NoError(t, orm.InsertBlock(common.HexToHash("0x5"), 5, time.Now(), 0)) - require.NoError(t, orm.InsertBlock(common.HexToHash("0x6"), 6, time.Now(), 0)) - require.NoError(t, orm.InsertBlock(common.HexToHash("0x7"), 7, time.Now(), 0)) - require.NoError(t, orm.InsertBlock(common.HexToHash("0x8"), 8, time.Now(), 0)) - require.NoError(t, orm.InsertBlock(common.HexToHash("0x9"), 9, time.Now(), 0)) - require.NoError(t, orm.InsertBlock(common.HexToHash("0x10"), 10, time.Now(), 0)) + require.NoError(t, orm.InsertBlock(ctx, common.HexToHash("0x4"), 4, time.Now(), 0)) + require.NoError(t, orm.InsertBlock(ctx, common.HexToHash("0x5"), 5, time.Now(), 0)) + require.NoError(t, orm.InsertBlock(ctx, common.HexToHash("0x6"), 6, time.Now(), 0)) + require.NoError(t, orm.InsertBlock(ctx, common.HexToHash("0x7"), 7, time.Now(), 0)) + require.NoError(t, orm.InsertBlock(ctx, common.HexToHash("0x8"), 8, time.Now(), 0)) + require.NoError(t, orm.InsertBlock(ctx, common.HexToHash("0x9"), 9, time.Now(), 0)) + require.NoError(t, orm.InsertBlock(ctx, common.HexToHash("0x10"), 10, time.Now(), 0)) //Fulfill requestID-C3 - require.NoError(t, orm.InsertLogs([]logpoller.Log{ + require.NoError(t, orm.InsertLogs(ctx, []logpoller.Log{ { EvmChainId: (*ubig.Big)(th.ChainID), LogIndex: 10, @@ -1172,57 +1188,58 @@ func TestSelectLogsWithSigsExcluding(t *testing.T) { })) //All logs for addressC should be fulfilled, query should return 0 logs - logs, err = orm.SelectIndexedLogsWithSigsExcluding(requestSigB, responseSigB, 3, addressC, 0, 10, 0) + logs, err = orm.SelectIndexedLogsWithSigsExcluding(ctx, requestSigB, responseSigB, 3, addressC, 0, 10, 0) require.NoError(t, err) require.Len(t, logs, 0) //Should return 1 log as it does not satisfy the required number of confirmations - logs, err = orm.SelectIndexedLogsWithSigsExcluding(requestSigB, responseSigB, 3, addressC, 0, 10, 3) + logs, err = orm.SelectIndexedLogsWithSigsExcluding(ctx, requestSigB, responseSigB, 3, addressC, 0, 10, 3) require.NoError(t, err) require.Len(t, logs, 1) require.Equal(t, logs[0].Data, []byte("requestID-C1")) //Insert 3 more blocks so that the requestID-C1 has enough confirmations - require.NoError(t, orm.InsertBlock(common.HexToHash("0x11"), 11, time.Now(), 0)) - require.NoError(t, orm.InsertBlock(common.HexToHash("0x12"), 12, time.Now(), 0)) - require.NoError(t, orm.InsertBlock(common.HexToHash("0x13"), 13, time.Now(), 0)) + require.NoError(t, orm.InsertBlock(ctx, common.HexToHash("0x11"), 11, time.Now(), 0)) + require.NoError(t, orm.InsertBlock(ctx, common.HexToHash("0x12"), 12, time.Now(), 0)) + require.NoError(t, orm.InsertBlock(ctx, common.HexToHash("0x13"), 13, time.Now(), 0)) - logs, err = orm.SelectIndexedLogsWithSigsExcluding(requestSigB, responseSigB, 3, addressC, 0, 10, 0) + logs, err = orm.SelectIndexedLogsWithSigsExcluding(ctx, requestSigB, responseSigB, 3, addressC, 0, 10, 0) require.NoError(t, err) require.Len(t, logs, 0) //AddressB should still have an unfulfilled log (requestID-B1) - logs, err = orm.SelectIndexedLogsWithSigsExcluding(requestSigB, responseSigB, 1, addressB, 0, 3, 0) + logs, err = orm.SelectIndexedLogsWithSigsExcluding(ctx, requestSigB, responseSigB, 1, addressB, 0, 3, 0) require.NoError(t, err) require.Len(t, logs, 1) require.Equal(t, logs[0].Data, []byte("requestID-B1")) //Should return requestID-A1 as the fulfillment event is out of the block range - logs, err = orm.SelectIndexedLogsWithSigsExcluding(requestSigA, responseSigA, 1, addressA, 0, 1, 10) + logs, err = orm.SelectIndexedLogsWithSigsExcluding(ctx, requestSigA, responseSigA, 1, addressA, 0, 1, 10) require.NoError(t, err) require.Len(t, logs, 1) require.Equal(t, logs[0].Data, []byte("requestID-A1")) //Should return nothing as requestID-B1 is before the block range - logs, err = orm.SelectIndexedLogsWithSigsExcluding(requestSigB, responseSigB, 1, addressB, 2, 13, 0) + logs, err = orm.SelectIndexedLogsWithSigsExcluding(ctx, requestSigB, responseSigB, 1, addressB, 2, 13, 0) require.NoError(t, err) require.Len(t, logs, 0) } func TestSelectLatestBlockNumberEventSigsAddrsWithConfs(t *testing.T) { + ctx := testutils.Context(t) th := SetupTH(t, lpOpts) event1 := EmitterABI.Events["Log1"].ID event2 := EmitterABI.Events["Log2"].ID address1 := utils.RandomAddress() address2 := utils.RandomAddress() - require.NoError(t, th.ORM.InsertLogs([]logpoller.Log{ + require.NoError(t, th.ORM.InsertLogs(ctx, []logpoller.Log{ GenLog(th.ChainID, 1, 1, utils.RandomAddress().String(), event1[:], address1), GenLog(th.ChainID, 2, 1, utils.RandomAddress().String(), event2[:], address2), GenLog(th.ChainID, 2, 2, utils.RandomAddress().String(), event2[:], address2), GenLog(th.ChainID, 2, 3, utils.RandomAddress().String(), event2[:], address2), })) - require.NoError(t, th.ORM.InsertBlock(utils.RandomHash(), 3, time.Now(), 1)) + require.NoError(t, th.ORM.InsertBlock(ctx, utils.RandomHash(), 3, time.Now(), 1)) tests := []struct { name string @@ -1299,7 +1316,7 @@ func TestSelectLatestBlockNumberEventSigsAddrsWithConfs(t *testing.T) { } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - blockNumber, err := th.ORM.SelectLatestBlockByEventSigsAddrsWithConfs(tt.fromBlock, tt.events, tt.addrs, tt.confs) + blockNumber, err := th.ORM.SelectLatestBlockByEventSigsAddrsWithConfs(ctx, tt.fromBlock, tt.events, tt.addrs, tt.confs) require.NoError(t, err) assert.Equal(t, tt.expectedBlockNumber, blockNumber) }) @@ -1307,6 +1324,7 @@ func TestSelectLatestBlockNumberEventSigsAddrsWithConfs(t *testing.T) { } func TestSelectLogsCreatedAfter(t *testing.T) { + ctx := testutils.Context(t) th := SetupTH(t, lpOpts) event := EmitterABI.Events["Log1"].ID address := utils.RandomAddress() @@ -1315,15 +1333,15 @@ func TestSelectLogsCreatedAfter(t *testing.T) { block2ts := time.Date(2020, 1, 1, 12, 12, 12, 0, time.UTC) block3ts := time.Date(2030, 1, 1, 12, 12, 12, 0, time.UTC) - require.NoError(t, th.ORM.InsertLogs([]logpoller.Log{ + require.NoError(t, th.ORM.InsertLogs(ctx, []logpoller.Log{ GenLogWithTimestamp(th.ChainID, 1, 1, utils.RandomAddress().String(), event[:], address, block1ts), GenLogWithTimestamp(th.ChainID, 1, 2, utils.RandomAddress().String(), event[:], address, block2ts), GenLogWithTimestamp(th.ChainID, 2, 2, utils.RandomAddress().String(), event[:], address, block2ts), GenLogWithTimestamp(th.ChainID, 1, 3, utils.RandomAddress().String(), event[:], address, block3ts), })) - require.NoError(t, th.ORM.InsertBlock(utils.RandomHash(), 1, block1ts, 0)) - require.NoError(t, th.ORM.InsertBlock(utils.RandomHash(), 2, block2ts, 1)) - require.NoError(t, th.ORM.InsertBlock(utils.RandomHash(), 3, block3ts, 2)) + require.NoError(t, th.ORM.InsertBlock(ctx, utils.RandomHash(), 1, block1ts, 0)) + require.NoError(t, th.ORM.InsertBlock(ctx, utils.RandomHash(), 2, block2ts, 1)) + require.NoError(t, th.ORM.InsertBlock(ctx, utils.RandomHash(), 3, block3ts, 2)) type expectedLog struct { block int64 @@ -1387,7 +1405,7 @@ func TestSelectLogsCreatedAfter(t *testing.T) { } for _, tt := range tests { t.Run("SelectLogsCreatedAfter"+tt.name, func(t *testing.T) { - logs, err := th.ORM.SelectLogsCreatedAfter(address, event, tt.after, tt.confs) + logs, err := th.ORM.SelectLogsCreatedAfter(ctx, address, event, tt.after, tt.confs) require.NoError(t, err) require.Len(t, logs, len(tt.expectedLogs)) @@ -1398,7 +1416,7 @@ func TestSelectLogsCreatedAfter(t *testing.T) { }) t.Run("SelectIndexedLogsCreatedAfter"+tt.name, func(t *testing.T) { - logs, err := th.ORM.SelectIndexedLogsCreatedAfter(address, event, 1, []common.Hash{event}, tt.after, tt.confs) + logs, err := th.ORM.SelectIndexedLogsCreatedAfter(ctx, address, event, 1, []common.Hash{event}, tt.after, tt.confs) require.NoError(t, err) require.Len(t, logs, len(tt.expectedLogs)) @@ -1411,29 +1429,30 @@ func TestSelectLogsCreatedAfter(t *testing.T) { } func TestNestedLogPollerBlocksQuery(t *testing.T) { + ctx := testutils.Context(t) th := SetupTH(t, lpOpts) event := EmitterABI.Events["Log1"].ID address := utils.RandomAddress() - require.NoError(t, th.ORM.InsertLogs([]logpoller.Log{ + require.NoError(t, th.ORM.InsertLogs(ctx, []logpoller.Log{ GenLog(th.ChainID, 1, 8, utils.RandomAddress().String(), event[:], address), })) // Empty logs when block are not persisted - logs, err := th.ORM.SelectIndexedLogs(address, event, 1, []common.Hash{event}, logpoller.Unconfirmed) + logs, err := th.ORM.SelectIndexedLogs(ctx, address, event, 1, []common.Hash{event}, logpoller.Unconfirmed) require.NoError(t, err) require.Len(t, logs, 0) // Persist block - require.NoError(t, th.ORM.InsertBlock(utils.RandomHash(), 10, time.Now(), 0)) + require.NoError(t, th.ORM.InsertBlock(ctx, utils.RandomHash(), 10, time.Now(), 0)) // Check if query actually works well with provided dataset - logs, err = th.ORM.SelectIndexedLogs(address, event, 1, []common.Hash{event}, logpoller.Unconfirmed) + logs, err = th.ORM.SelectIndexedLogs(ctx, address, event, 1, []common.Hash{event}, logpoller.Unconfirmed) require.NoError(t, err) require.Len(t, logs, 1) // Empty logs when number of confirmations is too deep - logs, err = th.ORM.SelectIndexedLogs(address, event, 1, []common.Hash{event}, logpoller.Confirmations(4)) + logs, err = th.ORM.SelectIndexedLogs(ctx, address, event, 1, []common.Hash{event}, logpoller.Confirmations(4)) require.NoError(t, err) require.Len(t, logs, 0) } @@ -1442,12 +1461,13 @@ func TestInsertLogsWithBlock(t *testing.T) { chainID := testutils.NewRandomEVMChainID() event := utils.RandomBytes32() address := utils.RandomAddress() + ctx := testutils.Context(t) // We need full db here, because we want to test transaction rollbacks. // Using pgtest.NewSqlxDB(t) will run all tests in TXs which is not desired for this type of test // (inner tx rollback will rollback outer tx, blocking rest of execution) _, db := heavyweight.FullTestDBV2(t, nil) - o := logpoller.NewORM(chainID, db, logger.Test(t), pgtest.NewQConfig(true)) + o := logpoller.NewORM(chainID, db, logger.Test(t)) correctLog := GenLog(chainID, 1, 1, utils.RandomAddress().String(), event[:], address) invalidLog := GenLog(chainID, -10, -10, utils.RandomAddress().String(), event[:], address) @@ -1489,11 +1509,11 @@ func TestInsertLogsWithBlock(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { // clean all logs and blocks between test cases - defer func() { _ = o.DeleteLogsAndBlocksAfter(0) }() - insertError := o.InsertLogsWithBlock(tt.logs, tt.block) + defer func() { _ = o.DeleteLogsAndBlocksAfter(ctx, 0) }() + insertError := o.InsertLogsWithBlock(ctx, tt.logs, tt.block) - logs, logsErr := o.SelectLogs(0, math.MaxInt, address, event) - block, blockErr := o.SelectLatestBlock() + logs, logsErr := o.SelectLogs(ctx, 0, math.MaxInt, address, event) + block, blockErr := o.SelectLatestBlock(ctx) if tt.shouldRollback { assert.Error(t, insertError) @@ -1520,10 +1540,11 @@ func TestInsertLogsInTx(t *testing.T) { event := utils.RandomBytes32() address := utils.RandomAddress() maxLogsSize := 9000 + ctx := testutils.Context(t) // We need full db here, because we want to test transaction rollbacks. _, db := heavyweight.FullTestDBV2(t, nil) - o := logpoller.NewORM(chainID, db, logger.Test(t), pgtest.NewQConfig(true)) + o := logpoller.NewORM(chainID, db, logger.Test(t)) logs := make([]logpoller.Log, maxLogsSize, maxLogsSize+1) for i := 0; i < maxLogsSize; i++ { @@ -1553,8 +1574,8 @@ func TestInsertLogsInTx(t *testing.T) { // clean all logs and blocks between test cases defer func() { _, _ = db.Exec("truncate evm.logs") }() - insertErr := o.InsertLogs(tt.logs) - logsFromDb, err := o.SelectLogs(0, math.MaxInt, address, event) + insertErr := o.InsertLogs(ctx, tt.logs) + logsFromDb, err := o.SelectLogs(ctx, 0, math.MaxInt, address, event) assert.NoError(t, err) if tt.shouldRollback { @@ -1569,6 +1590,7 @@ func TestInsertLogsInTx(t *testing.T) { } func TestSelectLogsDataWordBetween(t *testing.T) { + ctx := testutils.Context(t) address := utils.RandomAddress() eventSig := utils.RandomBytes32() th := SetupTH(t, lpOpts) @@ -1581,7 +1603,7 @@ func TestSelectLogsDataWordBetween(t *testing.T) { secondLogData = append(secondLogData, logpoller.EvmWord(5).Bytes()...) secondLogData = append(secondLogData, logpoller.EvmWord(20).Bytes()...) - err := th.ORM.InsertLogsWithBlock( + err := th.ORM.InsertLogsWithBlock(ctx, []logpoller.Log{ GenLogWithData(th.ChainID, address, eventSig, 1, 1, firstLogData), GenLogWithData(th.ChainID, address, eventSig, 2, 2, secondLogData), @@ -1619,7 +1641,7 @@ func TestSelectLogsDataWordBetween(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - logs, err1 := th.ORM.SelectLogsDataWordBetween(address, eventSig, 0, 1, logpoller.EvmWord(tt.wordValue), logpoller.Unconfirmed) + logs, err1 := th.ORM.SelectLogsDataWordBetween(ctx, address, eventSig, 0, 1, logpoller.EvmWord(tt.wordValue), logpoller.Unconfirmed) assert.NoError(t, err1) assert.Len(t, logs, len(tt.expectedLogs)) @@ -1633,7 +1655,8 @@ func TestSelectLogsDataWordBetween(t *testing.T) { func Benchmark_LogsDataWordBetween(b *testing.B) { chainId := big.NewInt(137) _, db := heavyweight.FullTestDBV2(b, nil) - o := logpoller.NewORM(chainId, db, logger.Test(b), pgtest.NewQConfig(false)) + o := logpoller.NewORM(chainId, db, logger.Test(b)) + ctx := testutils.Context(b) numberOfReports := 100_000 numberOfMessagesPerReport := 256 @@ -1663,13 +1686,13 @@ func Benchmark_LogsDataWordBetween(b *testing.B) { CreatedAt: time.Now(), }) } - require.NoError(b, o.InsertBlock(utils.RandomHash(), int64(numberOfReports*numberOfMessagesPerReport), time.Now(), int64(numberOfReports*numberOfMessagesPerReport))) - require.NoError(b, o.InsertLogs(dbLogs)) + require.NoError(b, o.InsertBlock(ctx, utils.RandomHash(), int64(numberOfReports*numberOfMessagesPerReport), time.Now(), int64(numberOfReports*numberOfMessagesPerReport))) + require.NoError(b, o.InsertLogs(ctx, dbLogs)) b.ResetTimer() for i := 0; i < b.N; i++ { - logs, err := o.SelectLogsDataWordBetween( + logs, err := o.SelectLogsDataWordBetween(ctx, commitStoreAddress, commitReportAccepted, 2, @@ -1685,7 +1708,8 @@ func Benchmark_LogsDataWordBetween(b *testing.B) { func Benchmark_DeleteExpiredLogs(b *testing.B) { chainId := big.NewInt(137) _, db := heavyweight.FullTestDBV2(b, nil) - o := logpoller.NewORM(chainId, db, logger.Test(b), pgtest.NewQConfig(false)) + o := logpoller.NewORM(chainId, db, logger.Test(b)) + ctx := testutils.Context(b) numberOfReports := 200_000 commitStoreAddress := utils.RandomAddress() @@ -1693,7 +1717,7 @@ func Benchmark_DeleteExpiredLogs(b *testing.B) { past := time.Now().Add(-1 * time.Hour) - err := o.InsertFilter(logpoller.Filter{ + err := o.InsertFilter(ctx, logpoller.Filter{ Name: "test filter", EventSigs: []common.Hash{commitReportAccepted}, Addresses: []common.Address{commitStoreAddress}, @@ -1719,7 +1743,7 @@ func Benchmark_DeleteExpiredLogs(b *testing.B) { CreatedAt: past, }) } - require.NoError(b, o.InsertLogs(dbLogs)) + require.NoError(b, o.InsertLogs(ctx, dbLogs)) } b.ResetTimer() @@ -1728,7 +1752,7 @@ func Benchmark_DeleteExpiredLogs(b *testing.B) { tx, err1 := db.Beginx() assert.NoError(b, err1) - _, err1 = o.DeleteExpiredLogs(0, pg.WithQueryer(tx)) + _, err1 = o.DeleteExpiredLogs(ctx, 0) assert.NoError(b, err1) err1 = tx.Rollback() diff --git a/core/chains/evm/logpoller/query.go b/core/chains/evm/logpoller/query.go index d8112459743..6aabe59045d 100644 --- a/core/chains/evm/logpoller/query.go +++ b/core/chains/evm/logpoller/query.go @@ -7,7 +7,6 @@ import ( "time" "github.com/ethereum/go-ethereum/common" - "github.com/lib/pq" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" ubig "github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils/big" @@ -17,7 +16,7 @@ type bytesProducer interface { Bytes() []byte } -func concatBytes[T bytesProducer](byteSlice []T) pq.ByteaArray { +func concatBytes[T bytesProducer](byteSlice []T) [][]byte { var output [][]byte for _, b := range byteSlice { output = append(output, b.Bytes()) diff --git a/core/chains/evm/logpoller/query_test.go b/core/chains/evm/logpoller/query_test.go index 70ace713228..832cbbfcb00 100644 --- a/core/chains/evm/logpoller/query_test.go +++ b/core/chains/evm/logpoller/query_test.go @@ -5,7 +5,6 @@ import ( "testing" "github.com/ethereum/go-ethereum/common" - "github.com/lib/pq" "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils" @@ -50,7 +49,7 @@ func Test_QueryArgs(t *testing.T) { name: "hash array converted to bytes array", queryArgs: newEmptyArgs().withEventSigArray([]common.Hash{{}, {}}), want: map[string]interface{}{ - "event_sig_array": pq.ByteaArray{make([]byte, 32), make([]byte, 32)}, + "event_sig_array": [][]byte{make([]byte, 32), make([]byte, 32)}, }, }, { diff --git a/core/chains/evm/monitor/balance.go b/core/chains/evm/monitor/balance.go index 16e2fd527bf..28bcdd9abdf 100644 --- a/core/chains/evm/monitor/balance.go +++ b/core/chains/evm/monitor/balance.go @@ -20,8 +20,8 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/chains/evm/assets" evmclient "github.com/smartcontractkit/chainlink/v2/core/chains/evm/client" httypes "github.com/smartcontractkit/chainlink/v2/core/chains/evm/headtracker/types" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/keystore" evmtypes "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore" ) //go:generate mockery --quiet --name BalanceMonitor --output ../mocks/ --case=underscore diff --git a/core/chains/evm/txmgr/attempts.go b/core/chains/evm/txmgr/attempts.go index 892920c0f67..aa1fa8cdeb2 100644 --- a/core/chains/evm/txmgr/attempts.go +++ b/core/chains/evm/txmgr/attempts.go @@ -45,7 +45,7 @@ func NewEvmTxAttemptBuilder(chainID big.Int, feeConfig evmTxAttemptBuilderFeeCon // NewTxAttempt builds an new attempt using the configured fee estimator + using the EIP1559 config to determine tx type // used for when a brand new transaction is being created in the txm -func (c *evmTxAttemptBuilder) NewTxAttempt(ctx context.Context, etx Tx, lggr logger.Logger, opts ...feetypes.Opt) (attempt TxAttempt, fee gas.EvmFee, feeLimit uint32, retryable bool, err error) { +func (c *evmTxAttemptBuilder) NewTxAttempt(ctx context.Context, etx Tx, lggr logger.Logger, opts ...feetypes.Opt) (attempt TxAttempt, fee gas.EvmFee, feeLimit uint64, retryable bool, err error) { txType := 0x0 if c.feeConfig.EIP1559DynamicFees() { txType = 0x2 @@ -55,7 +55,7 @@ func (c *evmTxAttemptBuilder) NewTxAttempt(ctx context.Context, etx Tx, lggr log // NewTxAttemptWithType builds a new attempt with a new fee estimation where the txType can be specified by the caller // used for L2 re-estimation on broadcasting (note EIP1559 must be disabled otherwise this will fail with mismatched fees + tx type) -func (c *evmTxAttemptBuilder) NewTxAttemptWithType(ctx context.Context, etx Tx, lggr logger.Logger, txType int, opts ...feetypes.Opt) (attempt TxAttempt, fee gas.EvmFee, feeLimit uint32, retryable bool, err error) { +func (c *evmTxAttemptBuilder) NewTxAttemptWithType(ctx context.Context, etx Tx, lggr logger.Logger, txType int, opts ...feetypes.Opt) (attempt TxAttempt, fee gas.EvmFee, feeLimit uint64, retryable bool, err error) { keySpecificMaxGasPriceWei := c.feeConfig.PriceMaxKey(etx.FromAddress) fee, feeLimit, err = c.EvmFeeEstimator.GetFee(ctx, etx.EncodedPayload, etx.FeeLimit, keySpecificMaxGasPriceWei, opts...) if err != nil { @@ -68,7 +68,7 @@ func (c *evmTxAttemptBuilder) NewTxAttemptWithType(ctx context.Context, etx Tx, // NewBumpTxAttempt builds a new attempt with a bumped fee - based on the previous attempt tx type // used in the txm broadcaster + confirmer when tx ix rejected for too low fee or is not included in a timely manner -func (c *evmTxAttemptBuilder) NewBumpTxAttempt(ctx context.Context, etx Tx, previousAttempt TxAttempt, priorAttempts []TxAttempt, lggr logger.Logger) (attempt TxAttempt, bumpedFee gas.EvmFee, bumpedFeeLimit uint32, retryable bool, err error) { +func (c *evmTxAttemptBuilder) NewBumpTxAttempt(ctx context.Context, etx Tx, previousAttempt TxAttempt, priorAttempts []TxAttempt, lggr logger.Logger) (attempt TxAttempt, bumpedFee gas.EvmFee, bumpedFeeLimit uint64, retryable bool, err error) { keySpecificMaxGasPriceWei := c.feeConfig.PriceMaxKey(etx.FromAddress) bumpedFee, bumpedFeeLimit, err = c.EvmFeeEstimator.BumpFee(ctx, previousAttempt.TxFee, etx.FeeLimit, keySpecificMaxGasPriceWei, newEvmPriorAttempts(priorAttempts)) @@ -82,7 +82,7 @@ func (c *evmTxAttemptBuilder) NewBumpTxAttempt(ctx context.Context, etx Tx, prev // NewCustomTxAttempt is the lowest level func where the fee parameters + tx type must be passed in // used in the txm for force rebroadcast where fees and tx type are pre-determined without an estimator -func (c *evmTxAttemptBuilder) NewCustomTxAttempt(ctx context.Context, etx Tx, fee gas.EvmFee, gasLimit uint32, txType int, lggr logger.Logger) (attempt TxAttempt, retryable bool, err error) { +func (c *evmTxAttemptBuilder) NewCustomTxAttempt(ctx context.Context, etx Tx, fee gas.EvmFee, gasLimit uint64, txType int, lggr logger.Logger) (attempt TxAttempt, retryable bool, err error) { switch txType { case 0x0: // legacy if fee.Legacy == nil { @@ -112,7 +112,7 @@ func (c *evmTxAttemptBuilder) NewCustomTxAttempt(ctx context.Context, etx Tx, fe } // NewEmptyTxAttempt is used in ForceRebroadcast to create a signed tx with zero value sent to the zero address -func (c *evmTxAttemptBuilder) NewEmptyTxAttempt(ctx context.Context, nonce evmtypes.Nonce, feeLimit uint32, fee gas.EvmFee, fromAddress common.Address) (attempt TxAttempt, err error) { +func (c *evmTxAttemptBuilder) NewEmptyTxAttempt(ctx context.Context, nonce evmtypes.Nonce, feeLimit uint64, fee gas.EvmFee, fromAddress common.Address) (attempt TxAttempt, err error) { value := big.NewInt(0) payload := []byte{} @@ -141,8 +141,8 @@ func (c *evmTxAttemptBuilder) NewEmptyTxAttempt(ctx context.Context, nonce evmty } -func (c *evmTxAttemptBuilder) newDynamicFeeAttempt(ctx context.Context, etx Tx, fee gas.DynamicFee, gasLimit uint32) (attempt TxAttempt, err error) { - if err = validateDynamicFeeGas(c.feeConfig, c.feeConfig.TipCapMin(), fee, gasLimit, etx); err != nil { +func (c *evmTxAttemptBuilder) newDynamicFeeAttempt(ctx context.Context, etx Tx, fee gas.DynamicFee, gasLimit uint64) (attempt TxAttempt, err error) { + if err = validateDynamicFeeGas(c.feeConfig, c.feeConfig.TipCapMin(), fee, etx); err != nil { return attempt, pkgerrors.Wrap(err, "error validating gas") } @@ -178,7 +178,7 @@ type keySpecificEstimator interface { // validateDynamicFeeGas is a sanity check - we have other checks elsewhere, but this // makes sure we _never_ create an invalid attempt -func validateDynamicFeeGas(kse keySpecificEstimator, tipCapMinimum *assets.Wei, fee gas.DynamicFee, gasLimit uint32, etx Tx) error { +func validateDynamicFeeGas(kse keySpecificEstimator, tipCapMinimum *assets.Wei, fee gas.DynamicFee, etx Tx) error { gasTipCap, gasFeeCap := fee.TipCap, fee.FeeCap if gasTipCap == nil { @@ -213,21 +213,21 @@ func validateDynamicFeeGas(kse keySpecificEstimator, tipCapMinimum *assets.Wei, return nil } -func newDynamicFeeTransaction(nonce uint64, to common.Address, value *big.Int, gasLimit uint32, chainID *big.Int, gasTipCap, gasFeeCap *assets.Wei, data []byte) types.DynamicFeeTx { +func newDynamicFeeTransaction(nonce uint64, to common.Address, value *big.Int, gasLimit uint64, chainID *big.Int, gasTipCap, gasFeeCap *assets.Wei, data []byte) types.DynamicFeeTx { return types.DynamicFeeTx{ ChainID: chainID, Nonce: nonce, GasTipCap: gasTipCap.ToInt(), GasFeeCap: gasFeeCap.ToInt(), - Gas: uint64(gasLimit), + Gas: gasLimit, To: &to, Value: value, Data: data, } } -func (c *evmTxAttemptBuilder) newLegacyAttempt(ctx context.Context, etx Tx, gasPrice *assets.Wei, gasLimit uint32) (attempt TxAttempt, err error) { - if err = validateLegacyGas(ctx, c.feeConfig, c.feeConfig.PriceMin(), gasPrice, gasLimit, etx); err != nil { +func (c *evmTxAttemptBuilder) newLegacyAttempt(ctx context.Context, etx Tx, gasPrice *assets.Wei, gasLimit uint64) (attempt TxAttempt, err error) { + if err = validateLegacyGas(c.feeConfig, c.feeConfig.PriceMin(), gasPrice, etx); err != nil { return attempt, pkgerrors.Wrap(err, "error validating gas") } @@ -260,7 +260,7 @@ func (c *evmTxAttemptBuilder) newLegacyAttempt(ctx context.Context, etx Tx, gasP // validateLegacyGas is a sanity check - we have other checks elsewhere, but this // makes sure we _never_ create an invalid attempt -func validateLegacyGas(ctx context.Context, kse keySpecificEstimator, minGasPriceWei, gasPrice *assets.Wei, gasLimit uint32, etx Tx) error { +func validateLegacyGas(kse keySpecificEstimator, minGasPriceWei, gasPrice *assets.Wei, etx Tx) error { if gasPrice == nil { panic("gas price missing") } @@ -290,12 +290,12 @@ func (c *evmTxAttemptBuilder) newSignedAttempt(ctx context.Context, etx Tx, tx * return attempt, nil } -func newLegacyTransaction(nonce uint64, to common.Address, value *big.Int, gasLimit uint32, gasPrice *assets.Wei, data []byte) types.LegacyTx { +func newLegacyTransaction(nonce uint64, to common.Address, value *big.Int, gasLimit uint64, gasPrice *assets.Wei, data []byte) types.LegacyTx { return types.LegacyTx{ Nonce: nonce, To: &to, Value: value, - Gas: uint64(gasLimit), + Gas: gasLimit, GasPrice: gasPrice.ToInt(), Data: data, } diff --git a/core/chains/evm/txmgr/attempts_test.go b/core/chains/evm/txmgr/attempts_test.go index b1e24984c37..d5c8f577ce1 100644 --- a/core/chains/evm/txmgr/attempts_test.go +++ b/core/chains/evm/txmgr/attempts_test.go @@ -18,13 +18,13 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/chains/evm/assets" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/gas" gasmocks "github.com/smartcontractkit/chainlink/v2/core/chains/evm/gas/mocks" + ksmocks "github.com/smartcontractkit/chainlink/v2/core/chains/evm/keystore/mocks" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/txmgr" evmtypes "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" "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/services/chainlink" - ksmocks "github.com/smartcontractkit/chainlink/v2/core/services/keystore/mocks" ) func NewEvmAddress() gethcommon.Address { @@ -257,8 +257,8 @@ func TestTxm_NewCustomTxAttempt_NonRetryableErrors(t *testing.T) { func TestTxm_EvmTxAttemptBuilder_RetryableEstimatorError(t *testing.T) { est := gasmocks.NewEvmFeeEstimator(t) - est.On("GetFee", mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(gas.EvmFee{}, uint32(0), pkgerrors.New("fail")) - est.On("BumpFee", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(gas.EvmFee{}, uint32(0), pkgerrors.New("fail")) + est.On("GetFee", mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(gas.EvmFee{}, uint64(0), pkgerrors.New("fail")) + est.On("BumpFee", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(gas.EvmFee{}, uint64(0), pkgerrors.New("fail")) kst := ksmocks.NewEth(t) lggr := logger.Test(t) diff --git a/core/chains/evm/txmgr/broadcaster_test.go b/core/chains/evm/txmgr/broadcaster_test.go index 2af22d76a66..cb40fecc55f 100644 --- a/core/chains/evm/txmgr/broadcaster_test.go +++ b/core/chains/evm/txmgr/broadcaster_test.go @@ -35,11 +35,10 @@ import ( evmconfig "github.com/smartcontractkit/chainlink/v2/core/chains/evm/config" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/gas" gasmocks "github.com/smartcontractkit/chainlink/v2/core/chains/evm/gas/mocks" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/keystore" + ksmocks "github.com/smartcontractkit/chainlink/v2/core/chains/evm/keystore/mocks" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/txmgr" - "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" evmtypes "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" - "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/cltest/heavyweight" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" @@ -47,8 +46,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/evmtest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest" "github.com/smartcontractkit/chainlink/v2/core/services/chainlink" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore" - ksmocks "github.com/smartcontractkit/chainlink/v2/core/services/keystore/mocks" ) // NewEthBroadcaster creates a new txmgr.EthBroadcaster for use in testing. @@ -60,6 +57,7 @@ func NewTestEthBroadcaster( config evmconfig.ChainScopedConfig, checkerFactory txmgr.TransmitCheckerFactory, nonceAutoSync bool, + nonceTracker txmgr.NonceTracker, ) *txmgr.Broadcaster { t.Helper() @@ -69,8 +67,7 @@ func NewTestEthBroadcaster( return gas.NewFixedPriceEstimator(config.EVM().GasEstimator(), ge.BlockHistory(), lggr) }, ge.EIP1559DynamicFees(), nil) txBuilder := txmgr.NewEvmTxAttemptBuilder(*ethClient.ConfiguredChainID(), ge, keyStore, estimator) - txNonceSyncer := txmgr.NewNonceSyncer(txStore, lggr, ethClient) - ethBroadcaster := txmgr.NewEvmBroadcaster(txStore, txmgr.NewEvmTxmClient(ethClient), txmgr.NewEvmTxmConfig(config.EVM()), txmgr.NewEvmTxmFeeConfig(config.EVM().GasEstimator()), config.EVM().Transactions(), config.Database().Listener(), keyStore, txBuilder, txNonceSyncer, lggr, checkerFactory, nonceAutoSync) + 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) // Mark instance as test ethBroadcaster.XXXTestDisableUnstartedTxAutoProcessing() @@ -87,17 +84,17 @@ 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) ethClient.On("PendingNonceAt", mock.Anything, mock.Anything).Return(uint64(0), nil) eb := txmgr.NewEvmBroadcaster( txStore, - txmgr.NewEvmTxmClient(ethClient), + txmClient, txmgr.NewEvmTxmConfig(evmcfg.EVM()), txmgr.NewEvmTxmFeeConfig(evmcfg.EVM().GasEstimator()), evmcfg.EVM().Transactions(), evmcfg.Database().Listener(), ethKeyStore, txBuilder, - nil, logger.Test(t), &testCheckerFactory{}, false, @@ -146,16 +143,16 @@ 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) eb := txmgr.NewEvmBroadcaster( txStore, - txmgr.NewEvmTxmClient(ethClient), + txmClient, txmgr.NewEvmTxmConfig(evmcfg.EVM()), txmgr.NewEvmTxmFeeConfig(evmcfg.EVM().GasEstimator()), evmcfg.EVM().Transactions(), evmcfg.Database().Listener(), ethKeyStore, txBuilder, - nil, logger.Test(t), &testCheckerFactory{}, false, @@ -181,14 +178,16 @@ 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() - eb := NewTestEthBroadcaster(t, txStore, ethClient, ethKeyStore, evmcfg, checkerFactory, false) + lggr := logger.Test(t) + nonceTracker := txmgr.NewNonceTracker(lggr, txStore, txmgr.NewEvmTxmClient(ethClient)) + eb := NewTestEthBroadcaster(t, txStore, ethClient, ethKeyStore, evmcfg, checkerFactory, false, nonceTracker) toAddress := gethCommon.HexToAddress("0x6C03DDA95a2AEd917EeCc6eddD4b9D16E6380411") timeNow := time.Now() encodedPayload := []byte{1, 2, 3} value := big.Int(assets.NewEthValue(142)) - gasLimit := uint32(242) + gasLimit := uint64(242) checker := txmgr.TransmitCheckerSpec{ CheckerType: txmgr.TransmitCheckerTypeSimulate, } @@ -276,7 +275,7 @@ func TestEthBroadcaster_ProcessUnstartedEthTxs_Success(t *testing.T) { return false } require.Equal(t, evmcfg.EVM().ChainID(), tx.ChainId()) - require.Equal(t, uint64(gasLimit), tx.Gas()) + require.Equal(t, gasLimit, tx.Gas()) require.Equal(t, evmcfg.EVM().GasEstimator().PriceDefault().ToInt(), tx.GasPrice()) require.Equal(t, toAddress, *tx.To()) require.Equal(t, value.String(), tx.Value().String()) @@ -299,7 +298,7 @@ func TestEthBroadcaster_ProcessUnstartedEthTxs_Success(t *testing.T) { return false } require.Equal(t, evmcfg.EVM().ChainID(), tx.ChainId()) - require.Equal(t, uint64(gasLimit), tx.Gas()) + require.Equal(t, gasLimit, tx.Gas()) require.Equal(t, evmcfg.EVM().GasEstimator().PriceDefault().ToInt(), tx.GasPrice()) require.Equal(t, toAddress, *tx.To()) require.Equal(t, value.String(), tx.Value().String()) @@ -381,7 +380,8 @@ func TestEthBroadcaster_ProcessUnstartedEthTxs_Success(t *testing.T) { }) evmcfg = evmtest.NewChainScopedConfig(t, cfg) ethClient.On("PendingNonceAt", mock.Anything, otherAddress).Return(uint64(1), nil).Once() - eb = NewTestEthBroadcaster(t, txStore, ethClient, ethKeyStore, evmcfg, checkerFactory, false) + nonceTracker = txmgr.NewNonceTracker(lggr, txStore, txmgr.NewEvmTxmClient(ethClient)) + eb = NewTestEthBroadcaster(t, txStore, ethClient, ethKeyStore, 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 { @@ -529,7 +529,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() - eb := NewTestEthBroadcaster(t, txStore, ethClient, ethKeyStore, evmcfg, checkerFactory, false) + nonceTracker := txmgr.NewNonceTracker(logger.Test(t), txStore, txmgr.NewEvmTxmClient(ethClient)) + eb := NewTestEthBroadcaster(t, txStore, ethClient, ethKeyStore, evmcfg, checkerFactory, false, nonceTracker) checker := txmgr.TransmitCheckerSpec{ CheckerType: txmgr.TransmitCheckerTypeSimulate, @@ -615,21 +616,21 @@ func TestEthBroadcaster_ProcessUnstartedEthTxs_OptimisticLockingOnEthTx(t *testi chStartEstimate := make(chan struct{}) chBlock := make(chan struct{}) - estimator.On("GetFee", mock.Anything, mock.Anything, mock.Anything, ccfg.EVM().GasEstimator().PriceMaxKey(fromAddress)).Return(gas.EvmFee{Legacy: assets.GWei(32)}, uint32(500), nil).Run(func(_ mock.Arguments) { + estimator.On("GetFee", mock.Anything, mock.Anything, mock.Anything, ccfg.EVM().GasEstimator().PriceMaxKey(fromAddress)).Return(gas.EvmFee{Legacy: assets.GWei(32)}, uint64(500), nil).Run(func(_ mock.Arguments) { close(chStartEstimate) <-chBlock }).Once() ethClient.On("PendingNonceAt", mock.Anything, fromAddress).Return(uint64(0), nil) + txmClient := txmgr.NewEvmTxmClient(ethClient) eb := txmgr.NewEvmBroadcaster( txStore, - txmgr.NewEvmTxmClient(ethClient), + txmClient, evmcfg, txmgr.NewEvmTxmFeeConfig(ccfg.EVM().GasEstimator()), ccfg.EVM().Transactions(), cfg.Database().Listener(), ethKeyStore, txBuilder, - nil, logger.Test(t), &testCheckerFactory{}, false, @@ -677,7 +678,8 @@ func TestEthBroadcaster_ProcessUnstartedEthTxs_Success_WithMultiplier(t *testing ethClient := evmtest.NewEthClientMockWithDefaultChain(t) ethClient.On("PendingNonceAt", mock.Anything, fromAddress).Return(uint64(0), nil).Once() - eb := NewTestEthBroadcaster(t, txStore, ethClient, ethKeyStore, evmcfg, &testCheckerFactory{}, false) + nonceTracker := txmgr.NewNonceTracker(logger.Test(t), txStore, txmgr.NewEvmTxmClient(ethClient)) + eb := NewTestEthBroadcaster(t, txStore, ethClient, ethKeyStore, evmcfg, &testCheckerFactory{}, false, nonceTracker) ethClient.On("SendTransactionReturnCode", mock.Anything, mock.MatchedBy(func(tx *gethTypes.Transaction) bool { assert.Equal(t, int(1600), int(tx.Gas())) @@ -705,7 +707,7 @@ func TestEthBroadcaster_ProcessUnstartedEthTxs_Success_WithMultiplier(t *testing func TestEthBroadcaster_ProcessUnstartedEthTxs_ResumingFromCrash(t *testing.T) { toAddress := gethCommon.HexToAddress("0x6C03DDA95a2AEd917EeCc6eddD4b9D16E6380411") value := big.Int(assets.NewEthValue(142)) - gasLimit := uint32(242) + gasLimit := uint64(242) encodedPayload := []byte{0, 1} nextNonce := evmtypes.Nonce(916714082576372851) firstNonce := nextNonce @@ -757,7 +759,8 @@ func TestEthBroadcaster_ProcessUnstartedEthTxs_ResumingFromCrash(t *testing.T) { ethClient := evmtest.NewEthClientMockWithDefaultChain(t) ethClient.On("PendingNonceAt", mock.Anything, fromAddress).Return(uint64(0), nil).Once() - eb := NewTestEthBroadcaster(t, txStore, ethClient, ethKeyStore, evmcfg, &testCheckerFactory{}, false) + nonceTracker := txmgr.NewNonceTracker(logger.Test(t), txStore, txmgr.NewEvmTxmClient(ethClient)) + eb := NewTestEthBroadcaster(t, txStore, ethClient, ethKeyStore, 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 @@ -795,7 +798,8 @@ func TestEthBroadcaster_ProcessUnstartedEthTxs_ResumingFromCrash(t *testing.T) { ethClient := evmtest.NewEthClientMockWithDefaultChain(t) ethClient.On("PendingNonceAt", mock.Anything, fromAddress).Return(uint64(0), nil).Once() - eb := NewTestEthBroadcaster(t, txStore, ethClient, ethKeyStore, evmcfg, &testCheckerFactory{}, false) + nonceTracker := txmgr.NewNonceTracker(logger.Test(t), txStore, txmgr.NewEvmTxmClient(ethClient)) + eb := NewTestEthBroadcaster(t, txStore, ethClient, ethKeyStore, 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) @@ -831,7 +835,8 @@ func TestEthBroadcaster_ProcessUnstartedEthTxs_ResumingFromCrash(t *testing.T) { ethClient := evmtest.NewEthClientMockWithDefaultChain(t) ethClient.On("PendingNonceAt", mock.Anything, fromAddress).Return(uint64(0), nil).Once() - eb := NewTestEthBroadcaster(t, txStore, ethClient, ethKeyStore, evmcfg, &testCheckerFactory{}, false) + nonceTracker := txmgr.NewNonceTracker(logger.Test(t), txStore, txmgr.NewEvmTxmClient(ethClient)) + eb := NewTestEthBroadcaster(t, txStore, ethClient, ethKeyStore, 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) @@ -866,7 +871,8 @@ func TestEthBroadcaster_ProcessUnstartedEthTxs_ResumingFromCrash(t *testing.T) { ethClient := evmtest.NewEthClientMockWithDefaultChain(t) ethClient.On("PendingNonceAt", mock.Anything, fromAddress).Return(uint64(0), nil).Once() - eb := NewTestEthBroadcaster(t, txStore, ethClient, ethKeyStore, evmcfg, &testCheckerFactory{}, false) + nonceTracker := txmgr.NewNonceTracker(logger.Test(t), txStore, txmgr.NewEvmTxmClient(ethClient)) + eb := NewTestEthBroadcaster(t, txStore, ethClient, ethKeyStore, 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) @@ -903,7 +909,8 @@ func TestEthBroadcaster_ProcessUnstartedEthTxs_ResumingFromCrash(t *testing.T) { ethClient := evmtest.NewEthClientMockWithDefaultChain(t) ethClient.On("PendingNonceAt", mock.Anything, fromAddress).Return(uint64(0), nil).Once() - eb := NewTestEthBroadcaster(t, txStore, ethClient, ethKeyStore, evmcfg, &testCheckerFactory{}, false) + nonceTracker := txmgr.NewNonceTracker(logger.Test(t), txStore, txmgr.NewEvmTxmClient(ethClient)) + eb := NewTestEthBroadcaster(t, txStore, ethClient, ethKeyStore, 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) @@ -944,7 +951,8 @@ func TestEthBroadcaster_ProcessUnstartedEthTxs_ResumingFromCrash(t *testing.T) { ethClient := evmtest.NewEthClientMockWithDefaultChain(t) ethClient.On("PendingNonceAt", mock.Anything, fromAddress).Return(uint64(0), nil).Once() - eb := NewTestEthBroadcaster(t, txStore, ethClient, ethKeyStore, evmcfg, &testCheckerFactory{}, false) + nonceTracker := txmgr.NewNonceTracker(logger.Test(t), txStore, txmgr.NewEvmTxmClient(ethClient)) + eb := NewTestEthBroadcaster(t, txStore, ethClient, ethKeyStore, 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) @@ -981,8 +989,8 @@ func TestEthBroadcaster_ProcessUnstartedEthTxs_ResumingFromCrash(t *testing.T) { }) } -func getLocalNextNonce(t *testing.T, eb *txmgr.Broadcaster, fromAddress gethCommon.Address) uint64 { - n, err := eb.GetNextSequence(testutils.Context(t), fromAddress) +func getLocalNextNonce(t *testing.T, nonceTracker txmgr.NonceTracker, fromAddress gethCommon.Address) uint64 { + n, err := nonceTracker.GetNextSequence(testutils.Context(t), fromAddress) require.NoError(t, err) require.NotNil(t, n) return uint64(n) @@ -994,7 +1002,7 @@ func getLocalNextNonce(t *testing.T, eb *txmgr.Broadcaster, fromAddress gethComm func TestEthBroadcaster_ProcessUnstartedEthTxs_Errors(t *testing.T) { toAddress := gethCommon.HexToAddress("0x6C03DDA95a2AEd917EeCc6eddD4b9D16E6380411") value := big.Int(assets.NewEthValue(142)) - gasLimit := uint32(242) + gasLimit := uint64(242) encodedPayload := []byte{0, 1} db := pgtest.NewSqlxDB(t) @@ -1007,7 +1015,10 @@ func TestEthBroadcaster_ProcessUnstartedEthTxs_Errors(t *testing.T) { evmcfg := evmtest.NewChainScopedConfig(t, cfg) ethClient := evmtest.NewEthClientMockWithDefaultChain(t) ethClient.On("PendingNonceAt", mock.Anything, fromAddress).Return(uint64(0), nil).Once() - eb := NewTestEthBroadcaster(t, txStore, ethClient, ethKeyStore, evmcfg, &testCheckerFactory{}, false) + lggr := logger.Test(t) + txmClient := txmgr.NewEvmTxmClient(ethClient) + nonceTracker := txmgr.NewNonceTracker(lggr, txStore, txmClient) + eb := NewTestEthBroadcaster(t, txStore, ethClient, ethKeyStore, evmcfg, &testCheckerFactory{}, false, nonceTracker) ctx := testutils.Context(t) require.NoError(t, commonutils.JustError(db.Exec(`SET CONSTRAINTS pipeline_runs_pipeline_spec_id_fkey DEFERRED`))) @@ -1040,7 +1051,7 @@ func TestEthBroadcaster_ProcessUnstartedEthTxs_Errors(t *testing.T) { assert.Len(t, etx1.TxAttempts, 1) // Check that the local nonce was incremented by one - finalNextNonce := getLocalNextNonce(t, eb, fromAddress) + finalNextNonce := getLocalNextNonce(t, nonceTracker, fromAddress) require.NoError(t, err) require.NotNil(t, finalNextNonce) require.Equal(t, int64(1), int64(finalNextNonce)) @@ -1048,7 +1059,7 @@ func TestEthBroadcaster_ProcessUnstartedEthTxs_Errors(t *testing.T) { t.Run("geth Client returns an error in the fatal errors category", func(t *testing.T) { fatalErrorExample := "exceeds block gas limit" - localNextNonce := getLocalNextNonce(t, eb, fromAddress) + localNextNonce := getLocalNextNonce(t, nonceTracker, fromAddress) t.Run("without callback", func(t *testing.T) { etx := mustCreateUnstartedTx(t, txStore, fromAddress, toAddress, encodedPayload, gasLimit, value, &cltest.FixtureChainID) @@ -1073,7 +1084,7 @@ func TestEthBroadcaster_ProcessUnstartedEthTxs_Errors(t *testing.T) { // Check that the key had its nonce reset var nonce evmtypes.Nonce - nonce, err = eb.GetNextSequence(ctx, fromAddress) + nonce, err = nonceTracker.GetNextSequence(ctx, fromAddress) require.NoError(t, err) // Saved NextNonce must be the same as before because this transaction // was not accepted by the eth node and never can be @@ -1136,14 +1147,12 @@ func TestEthBroadcaster_ProcessUnstartedEthTxs_Errors(t *testing.T) { // same as the parent test, but callback is set by ctor t.Run("callback set by ctor", func(t *testing.T) { - lggr := logger.Test(t) estimator := gas.NewWrappedEvmEstimator(lggr, func(lggr logger.Logger) gas.EvmEstimator { return gas.NewFixedPriceEstimator(evmcfg.EVM().GasEstimator(), evmcfg.EVM().GasEstimator().BlockHistory(), lggr) }, evmcfg.EVM().GasEstimator().EIP1559DynamicFees(), nil) txBuilder := txmgr.NewEvmTxAttemptBuilder(*ethClient.ConfiguredChainID(), evmcfg.EVM().GasEstimator(), ethKeyStore, estimator) - localNextNonce = getLocalNextNonce(t, eb, fromAddress) - ethClient.On("PendingNonceAt", mock.Anything, fromAddress).Return(localNextNonce, nil).Once() - eb2 := txmgr.NewEvmBroadcaster(txStore, txmgr.NewEvmTxmClient(ethClient), txmgr.NewEvmTxmConfig(evmcfg.EVM()), txmgr.NewEvmTxmFeeConfig(evmcfg.EVM().GasEstimator()), evmcfg.EVM().Transactions(), evmcfg.Database().Listener(), ethKeyStore, txBuilder, nil, lggr, &testCheckerFactory{}, false) + 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) retryable, err := eb2.ProcessUnstartedTxs(ctx, fromAddress) assert.NoError(t, err) assert.False(t, retryable) @@ -1156,7 +1165,8 @@ func TestEthBroadcaster_ProcessUnstartedEthTxs_Errors(t *testing.T) { t.Run("geth Client fails with error indicating that the transaction was too expensive", func(t *testing.T) { TxFeeExceedsCapError := "tx fee (1.10 ether) exceeds the configured cap (1.00 ether)" - localNextNonce := getLocalNextNonce(t, eb, fromAddress) + localNextNonce := getLocalNextNonce(t, nonceTracker, fromAddress) + ethClient.On("PendingNonceAt", mock.Anything, fromAddress).Return(localNextNonce, nil).Once() etx := mustCreateUnstartedTx(t, txStore, fromAddress, toAddress, encodedPayload, gasLimit, value, &cltest.FixtureChainID) ethClient.On("SendTransactionReturnCode", mock.Anything, mock.MatchedBy(func(tx *gethTypes.Transaction) bool { return tx.Nonce() == localNextNonce @@ -1186,7 +1196,7 @@ func TestEthBroadcaster_ProcessUnstartedEthTxs_Errors(t *testing.T) { // Check that the key had its nonce reset var nonce evmtypes.Nonce - nonce, err = eb.GetNextSequence(ctx, fromAddress) + nonce, err = nonceTracker.GetNextSequence(ctx, fromAddress) require.NoError(t, err) // Saved NextNonce must be the same as before because this transaction // was not accepted by the eth node and never can be @@ -1214,7 +1224,7 @@ func TestEthBroadcaster_ProcessUnstartedEthTxs_Errors(t *testing.T) { t.Run("eth Client call fails with an unexpected random error, and transaction was not accepted into mempool", func(t *testing.T) { retryableErrorExample := "some unknown error" - localNextNonce := getLocalNextNonce(t, eb, fromAddress) + localNextNonce := getLocalNextNonce(t, nonceTracker, fromAddress) etx := mustCreateUnstartedTx(t, txStore, fromAddress, toAddress, encodedPayload, gasLimit, value, &cltest.FixtureChainID) ethClient.On("SendTransactionReturnCode", mock.Anything, mock.MatchedBy(func(tx *gethTypes.Transaction) bool { return tx.Nonce() == localNextNonce @@ -1266,7 +1276,7 @@ func TestEthBroadcaster_ProcessUnstartedEthTxs_Errors(t *testing.T) { t.Run("eth client call fails with an unexpected random error, and the nonce check also subsequently fails", func(t *testing.T) { retryableErrorExample := "some unknown error" - localNextNonce := getLocalNextNonce(t, eb, fromAddress) + localNextNonce := getLocalNextNonce(t, nonceTracker, fromAddress) etx := mustCreateUnstartedTx(t, txStore, fromAddress, toAddress, encodedPayload, gasLimit, value, &cltest.FixtureChainID) ethClient.On("SendTransactionReturnCode", mock.Anything, mock.MatchedBy(func(tx *gethTypes.Transaction) bool { return tx.Nonce() == localNextNonce @@ -1318,7 +1328,7 @@ func TestEthBroadcaster_ProcessUnstartedEthTxs_Errors(t *testing.T) { t.Run("eth Client call fails with an unexpected random error, and transaction was accepted into mempool", func(t *testing.T) { retryableErrorExample := "some strange RPC returns an unexpected thing" - localNextNonce := getLocalNextNonce(t, eb, fromAddress) + localNextNonce := getLocalNextNonce(t, nonceTracker, fromAddress) etx := mustCreateUnstartedTx(t, txStore, fromAddress, toAddress, encodedPayload, gasLimit, value, &cltest.FixtureChainID) ethClient.On("SendTransactionReturnCode", mock.Anything, mock.MatchedBy(func(tx *gethTypes.Transaction) bool { return tx.Nonce() == localNextNonce @@ -1350,7 +1360,7 @@ func TestEthBroadcaster_ProcessUnstartedEthTxs_Errors(t *testing.T) { // configured for the transaction pool. // This is a configuration error by the node operator, since it means they set the base gas level too low. underpricedError := "transaction underpriced" - localNextNonce := getLocalNextNonce(t, eb, fromAddress) + localNextNonce := getLocalNextNonce(t, nonceTracker, fromAddress) etx := mustCreateUnstartedTx(t, txStore, fromAddress, toAddress, encodedPayload, gasLimit, value, &cltest.FixtureChainID) // First was underpriced @@ -1398,7 +1408,7 @@ func TestEthBroadcaster_ProcessUnstartedEthTxs_Errors(t *testing.T) { t.Run("failed to reach node for some reason", func(t *testing.T) { failedToReachNodeError := context.DeadlineExceeded - localNextNonce := getLocalNextNonce(t, eb, fromAddress) + localNextNonce := getLocalNextNonce(t, nonceTracker, fromAddress) ethClient.On("SendTransactionReturnCode", mock.Anything, mock.MatchedBy(func(tx *gethTypes.Transaction) bool { return tx.Nonce() == localNextNonce @@ -1427,7 +1437,7 @@ func TestEthBroadcaster_ProcessUnstartedEthTxs_Errors(t *testing.T) { // This happens if parity is rejecting transactions that are not priced high enough to even get into the mempool at all // It should pretend it was accepted into the mempool and hand off to ethConfirmer to bump gas as normal temporarilyUnderpricedError := "There are too many transactions in the queue. Your transaction was dropped due to limit. Try increasing the fee." - localNextNonce := getLocalNextNonce(t, eb, fromAddress) + localNextNonce := getLocalNextNonce(t, nonceTracker, fromAddress) // Re-use the previously unfinished transaction, no need to insert new @@ -1458,7 +1468,7 @@ func TestEthBroadcaster_ProcessUnstartedEthTxs_Errors(t *testing.T) { // configured for the transaction pool. // This is a configuration error by the node operator, since it means they set the base gas level too low. underpricedError := "transaction underpriced" - localNextNonce := getLocalNextNonce(t, eb, fromAddress) + localNextNonce := getLocalNextNonce(t, nonceTracker, fromAddress) // In this scenario the node operator REALLY fucked up and set the bump // to zero (even though that should not be possible due to config // validation) @@ -1466,8 +1476,7 @@ func TestEthBroadcaster_ProcessUnstartedEthTxs_Errors(t *testing.T) { c.EVM[0].GasEstimator.BumpMin = assets.NewWeiI(0) c.EVM[0].GasEstimator.BumpPercent = ptr[uint16](0) })) - ethClient.On("PendingNonceAt", mock.Anything, fromAddress).Return(localNextNonce, nil).Once() - eb2 := NewTestEthBroadcaster(t, txStore, ethClient, ethKeyStore, evmcfg2, &testCheckerFactory{}, false) + eb2 := NewTestEthBroadcaster(t, txStore, ethClient, ethKeyStore, evmcfg2, &testCheckerFactory{}, false, nonceTracker) mustCreateUnstartedTx(t, txStore, fromAddress, toAddress, encodedPayload, gasLimit, value, &cltest.FixtureChainID) // First was underpriced @@ -1487,7 +1496,7 @@ func TestEthBroadcaster_ProcessUnstartedEthTxs_Errors(t *testing.T) { t.Run("eth tx is left in progress if eth node returns insufficient eth", func(t *testing.T) { insufficientEthError := "insufficient funds for transfer" - localNextNonce := getLocalNextNonce(t, eb, fromAddress) + localNextNonce := getLocalNextNonce(t, nonceTracker, fromAddress) etx := mustCreateUnstartedTx(t, txStore, fromAddress, toAddress, encodedPayload, gasLimit, value, &cltest.FixtureChainID) ethClient.On("SendTransactionReturnCode", mock.Anything, mock.MatchedBy(func(tx *gethTypes.Transaction) bool { return tx.Nonce() == localNextNonce @@ -1516,7 +1525,7 @@ func TestEthBroadcaster_ProcessUnstartedEthTxs_Errors(t *testing.T) { pgtest.MustExec(t, db, `DELETE FROM evm.txes`) t.Run("eth tx is left in progress if nonce is too high", func(t *testing.T) { - localNextNonce := getLocalNextNonce(t, eb, fromAddress) + localNextNonce := getLocalNextNonce(t, nonceTracker, fromAddress) nonceGapError := "NonceGap, Future nonce. Expected nonce: " + strconv.FormatUint(localNextNonce, 10) etx := mustCreateUnstartedTx(t, txStore, fromAddress, toAddress, encodedPayload, gasLimit, value, &cltest.FixtureChainID) ethClient.On("SendTransactionReturnCode", mock.Anything, mock.MatchedBy(func(tx *gethTypes.Transaction) bool { @@ -1557,12 +1566,12 @@ func TestEthBroadcaster_ProcessUnstartedEthTxs_Errors(t *testing.T) { c.EVM[0].GasEstimator.BumpMin = assets.NewWeiI(0) c.EVM[0].GasEstimator.BumpPercent = ptr[uint16](0) })) - localNextNonce := getLocalNextNonce(t, eb, fromAddress) + localNextNonce := getLocalNextNonce(t, nonceTracker, fromAddress) ethClient.On("PendingNonceAt", mock.Anything, fromAddress).Return(localNextNonce, nil).Once() - eb2 := NewTestEthBroadcaster(t, txStore, ethClient, ethKeyStore, evmcfg2, &testCheckerFactory{}, false) + eb2 := NewTestEthBroadcaster(t, txStore, ethClient, ethKeyStore, evmcfg2, &testCheckerFactory{}, false, nonceTracker) mustCreateUnstartedTx(t, txStore, fromAddress, toAddress, encodedPayload, gasLimit, value, &cltest.FixtureChainID) underpricedError := "transaction underpriced" - localNextNonce = getLocalNextNonce(t, eb, fromAddress) + localNextNonce = getLocalNextNonce(t, nonceTracker, fromAddress) ethClient.On("SendTransactionReturnCode", mock.Anything, mock.MatchedBy(func(tx *gethTypes.Transaction) bool { return tx.Nonce() == localNextNonce && tx.GasTipCap().Cmp(big.NewInt(1)) == 0 }), fromAddress).Return(commonclient.Underpriced, errors.New(underpricedError)).Once() @@ -1581,7 +1590,7 @@ func TestEthBroadcaster_ProcessUnstartedEthTxs_Errors(t *testing.T) { // configured for the transaction pool. // This is a configuration error by the node operator, since it means they set the base gas level too low. underpricedError := "transaction underpriced" - localNextNonce := getLocalNextNonce(t, eb, fromAddress) + localNextNonce := getLocalNextNonce(t, nonceTracker, fromAddress) mustCreateUnstartedTx(t, txStore, fromAddress, toAddress, encodedPayload, gasLimit, value, &cltest.FixtureChainID) // Check gas tip cap verification @@ -1590,7 +1599,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) + eb2 := NewTestEthBroadcaster(t, txStore, ethClient, ethKeyStore, evmcfg2, &testCheckerFactory{}, false, nonceTracker) retryable, err := eb2.ProcessUnstartedTxs(ctx, fromAddress) require.Error(t, err) @@ -1603,8 +1612,9 @@ func TestEthBroadcaster_ProcessUnstartedEthTxs_Errors(t *testing.T) { c.EVM[0].GasEstimator.EIP1559DynamicFees = ptr(true) c.EVM[0].GasEstimator.TipCapDefault = gasTipCapDefault })) - localNextNonce = getLocalNextNonce(t, eb, fromAddress) - eb2 = NewTestEthBroadcaster(t, txStore, ethClient, ethKeyStore, evmcfg2, &testCheckerFactory{}, false) + 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) // Second was underpriced but above minimum ethClient.On("SendTransactionReturnCode", mock.Anything, mock.MatchedBy(func(tx *gethTypes.Transaction) bool { @@ -1632,7 +1642,7 @@ func TestEthBroadcaster_ProcessUnstartedEthTxs_Errors(t *testing.T) { func TestEthBroadcaster_ProcessUnstartedEthTxs_KeystoreErrors(t *testing.T) { toAddress := gethCommon.HexToAddress("0x6C03DDA95a2AEd917EeCc6eddD4b9D16E6380411") value := big.Int(assets.NewEthValue(142)) - gasLimit := uint32(242) + gasLimit := uint64(242) encodedPayload := []byte{0, 1} localNonce := 0 @@ -1650,9 +1660,11 @@ func TestEthBroadcaster_ProcessUnstartedEthTxs_KeystoreErrors(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() - eb := NewTestEthBroadcaster(t, txStore, ethClient, kst, evmcfg, &testCheckerFactory{}, false) + lggr := logger.Test(t) + nonceTracker := txmgr.NewNonceTracker(lggr, txStore, txmgr.NewEvmTxmClient(ethClient)) + eb := NewTestEthBroadcaster(t, txStore, ethClient, kst, evmcfg, &testCheckerFactory{}, false, nonceTracker) ctx := testutils.Context(t) - _, err := eb.GetNextSequence(ctx, fromAddress) + _, err := nonceTracker.GetNextSequence(ctx, fromAddress) require.NoError(t, err) t.Run("tx signing fails", func(t *testing.T) { @@ -1679,56 +1691,13 @@ func TestEthBroadcaster_ProcessUnstartedEthTxs_KeystoreErrors(t *testing.T) { assert.Len(t, etx.TxAttempts, 0) // Check that the key did not have its nonce incremented - var nonce types.Nonce - nonce, err = eb.GetNextSequence(ctx, fromAddress) + var nonce evmtypes.Nonce + nonce, err = nonceTracker.GetNextSequence(ctx, fromAddress) require.NoError(t, err) require.Equal(t, int64(localNonce), int64(nonce)) }) } -func TestEthBroadcaster_GetNextNonce(t *testing.T) { - db := pgtest.NewSqlxDB(t) - cfg := configtest.NewGeneralConfig(t, nil) - txStore := cltest.NewTestTxStore(t, db, cfg.Database()) - fromAddress := testutils.NewAddress() - evmcfg := evmtest.NewChainScopedConfig(t, cfg) - ethClient := evmtest.NewEthClientMockWithDefaultChain(t) - - kst := ksmocks.NewEth(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() - eb := NewTestEthBroadcaster(t, txStore, ethClient, kst, evmcfg, &testCheckerFactory{}, false) - nonce := getLocalNextNonce(t, eb, fromAddress) - require.NotNil(t, nonce) - assert.Equal(t, int64(0), int64(nonce)) -} - -func TestEthBroadcaster_IncrementNextNonce(t *testing.T) { - db := pgtest.NewSqlxDB(t) - cfg := configtest.NewGeneralConfig(t, nil) - txStore := cltest.NewTestTxStore(t, db, cfg.Database()) - kst := ksmocks.NewEth(t) - fromAddress := testutils.NewAddress() - evmcfg := evmtest.NewChainScopedConfig(t, cfg) - ethClient := evmtest.NewEthClientMockWithDefaultChain(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() - eb := NewTestEthBroadcaster(t, txStore, ethClient, kst, evmcfg, &testCheckerFactory{}, false) - - ctx := testutils.Context(t) - nonce, err := eb.GetNextSequence(ctx, fromAddress) - require.NoError(t, err) - eb.IncrementNextSequence(fromAddress, nonce) - - // Nonce bumped to 1 - nonce, err = eb.GetNextSequence(ctx, fromAddress) - require.NoError(t, err) - require.Equal(t, int64(1), int64(nonce)) -} - func TestEthBroadcaster_Trigger(t *testing.T) { t.Parallel() @@ -1739,7 +1708,10 @@ func TestEthBroadcaster_Trigger(t *testing.T) { txStore := cltest.NewTestTxStore(t, db, cfg.Database()) evmcfg := evmtest.NewChainScopedConfig(t, cfg) ethKeyStore := cltest.NewKeyStore(t, db, cfg.Database()).Eth() - eb := NewTestEthBroadcaster(t, txStore, evmtest.NewEthClientMockWithDefaultChain(t), ethKeyStore, evmcfg, &testCheckerFactory{}, false) + 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) eb.Trigger(testutils.NewAddress()) eb.Trigger(testutils.NewAddress()) @@ -1760,9 +1732,6 @@ func TestEthBroadcaster_SyncNonce(t *testing.T) { kst := cltest.NewKeyStore(t, db, cfg.Database()).Eth() _, fromAddress := cltest.RandomKey{Disabled: false}.MustInsertWithState(t, kst) - _, disabledAddress := cltest.RandomKey{Disabled: true}.MustInsertWithState(t, kst) - - ethNodeNonce := uint64(22) estimator := gas.NewWrappedEvmEstimator(lggr, func(lggr logger.Logger) gas.EvmEstimator { return gas.NewFixedPriceEstimator(evmcfg.EVM().GasEstimator(), evmcfg.EVM().GasEstimator().BlockHistory(), lggr) @@ -1779,7 +1748,8 @@ 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() - eb := txmgr.NewEvmBroadcaster(txStore, txmgr.NewEvmTxmClient(ethClient), evmTxmCfg, txmgr.NewEvmTxmFeeConfig(ge), evmcfg.EVM().Transactions(), cfg.Database().Listener(), kst, txBuilder, nil, lggr, checkerFactory, false) + txmClient := txmgr.NewEvmTxmClient(ethClient) + 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,236 +1757,45 @@ func TestEthBroadcaster_SyncNonce(t *testing.T) { testutils.WaitForLogMessage(t, observed, "Skipping sequence auto-sync") }) - - t.Run("when nonce syncer returns new nonce, successfully sets nonce", func(t *testing.T) { - ethClient := evmtest.NewEthClientMockWithDefaultChain(t) - txBuilder := txmgr.NewEvmTxAttemptBuilder(*ethClient.ConfiguredChainID(), ge, kst, estimator) - - txNonceSyncer := txmgr.NewNonceSyncer(txStore, lggr, ethClient) - kst := ksmocks.NewEth(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() - eb := txmgr.NewEvmBroadcaster(txStore, txmgr.NewEvmTxmClient(ethClient), evmTxmCfg, txmgr.NewEvmTxmFeeConfig(ge), evmcfg.EVM().Transactions(), cfg.Database().Listener(), kst, txBuilder, txNonceSyncer, lggr, checkerFactory, true) - - ethClient.On("PendingNonceAt", mock.Anything, fromAddress).Return(ethNodeNonce, nil).Once() - servicetest.Run(t, eb) - - testutils.WaitForLogMessage(t, observed, "Fast-forward sequence") - - // Check nextSequenceMap to make sure it has correct nonce assigned - nonce, err := eb.GetNextSequence(ctx, fromAddress) - require.NoError(t, err) - require.Equal(t, strconv.FormatUint(ethNodeNonce, 10), nonce.String()) - - // The disabled key did not get updated - _, err = eb.GetNextSequence(ctx, disabledAddress) - require.Error(t, err) - }) - - ethNodeNonce++ - observed.TakeAll() - - t.Run("when nonce syncer returns error, retries and successfully sets nonce", func(t *testing.T) { - ethClient := evmtest.NewEthClientMockWithDefaultChain(t) - txBuilder := txmgr.NewEvmTxAttemptBuilder(*ethClient.ConfiguredChainID(), ge, kst, estimator) - txNonceSyncer := txmgr.NewNonceSyncer(txStore, lggr, ethClient) - - kst := ksmocks.NewEth(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() - - eb := txmgr.NewEvmBroadcaster(txStore, txmgr.NewEvmTxmClient(ethClient), evmTxmCfg, txmgr.NewEvmTxmFeeConfig(evmcfg.EVM().GasEstimator()), evmcfg.EVM().Transactions(), cfg.Database().Listener(), kst, txBuilder, txNonceSyncer, lggr, checkerFactory, true) - eb.XXXTestDisableUnstartedTxAutoProcessing() - - ethClient.On("PendingNonceAt", mock.Anything, fromAddress).Return(uint64(0), errors.New("something exploded")).Once() - ethClient.On("PendingNonceAt", mock.Anything, fromAddress).Return(ethNodeNonce, nil) - - servicetest.Run(t, eb) - - testutils.WaitForLogMessage(t, observed, "Fast-forward sequence") - - // Check keyState to make sure it has correct nonce assigned - nonce, err := eb.GetNextSequence(ctx, fromAddress) - require.NoError(t, err) - assert.Equal(t, int64(ethNodeNonce), int64(nonce)) - - // The disabled key did not get updated - _, err = eb.GetNextSequence(ctx, disabledAddress) - require.Error(t, err) - }) } -func Test_LoadSequenceMap(t *testing.T) { - t.Parallel() - ctx := testutils.Context(t) - t.Run("set next nonce using entries from tx table", func(t *testing.T) { - db := pgtest.NewSqlxDB(t) - cfg := configtest.NewTestGeneralConfig(t) - txStore := cltest.NewTestTxStore(t, db, cfg.Database()) - ks := cltest.NewKeyStore(t, db, cfg.Database()).Eth() - - ethClient := evmtest.NewEthClientMockWithDefaultChain(t) - evmcfg := evmtest.NewChainScopedConfig(t, cfg) - checkerFactory := &txmgr.CheckerFactory{Client: ethClient} - _, fromAddress := cltest.MustInsertRandomKey(t, ks) - cltest.MustInsertUnconfirmedEthTx(t, txStore, int64(0), fromAddress) - cltest.MustInsertUnconfirmedEthTx(t, txStore, int64(1), fromAddress) - eb := NewTestEthBroadcaster(t, txStore, ethClient, ks, evmcfg, checkerFactory, false) - - nonce, err := eb.GetNextSequence(ctx, fromAddress) - require.NoError(t, err) - require.Equal(t, int64(2), int64(nonce)) - }) - - t.Run("set next nonce using client when not found in tx table", func(t *testing.T) { - db := pgtest.NewSqlxDB(t) - cfg := configtest.NewTestGeneralConfig(t) - txStore := cltest.NewTestTxStore(t, db, cfg.Database()) - ks := cltest.NewKeyStore(t, db, cfg.Database()).Eth() - - ethClient := evmtest.NewEthClientMockWithDefaultChain(t) - evmcfg := evmtest.NewChainScopedConfig(t, cfg) - checkerFactory := &txmgr.CheckerFactory{Client: ethClient} - _, fromAddress := cltest.MustInsertRandomKey(t, ks) - ethClient.On("PendingNonceAt", mock.Anything, fromAddress).Return(uint64(10), nil).Once() - eb := NewTestEthBroadcaster(t, txStore, ethClient, ks, evmcfg, checkerFactory, false) - - nonce, err := eb.GetNextSequence(ctx, fromAddress) - require.NoError(t, err) - require.Equal(t, int64(10), int64(nonce)) - }) -} - -func Test_NextNonce(t *testing.T) { - t.Parallel() - - db := pgtest.NewSqlxDB(t) - cfg := configtest.NewTestGeneralConfig(t) - txStore := cltest.NewTestTxStore(t, db, cfg.Database()) - ks := cltest.NewKeyStore(t, db, cfg.Database()).Eth() - - ethClient := evmtest.NewEthClientMockWithDefaultChain(t) - evmcfg := evmtest.NewChainScopedConfig(t, cfg) - checkerFactory := &txmgr.CheckerFactory{Client: ethClient} - randNonce := testutils.NewRandomPositiveInt64() - _, addr1 := cltest.MustInsertRandomKey(t, ks) - ethClient.On("PendingNonceAt", mock.Anything, addr1).Return(uint64(randNonce), nil).Once() - eb := NewTestEthBroadcaster(t, txStore, ethClient, ks, evmcfg, checkerFactory, false) - ctx := testutils.Context(t) - cltest.MustInsertRandomKey(t, ks, *ubig.New(testutils.FixtureChainID)) - - nonce, err := eb.GetNextSequence(ctx, addr1) - require.NoError(t, err) - require.Equal(t, randNonce, int64(nonce)) - - randAddr1 := utils.RandomAddress() - _, err = eb.GetNextSequence(ctx, randAddr1) - require.Error(t, err) - require.Contains(t, err.Error(), fmt.Sprintf("address disabled: %s", randAddr1.Hex())) - - randAddr2 := utils.RandomAddress() - _, err = eb.GetNextSequence(ctx, randAddr2) - require.Error(t, err) - require.Contains(t, err.Error(), fmt.Sprintf("address disabled: %s", randAddr2.Hex())) - -} - -func Test_SetNonceAfterInit(t *testing.T) { - t.Parallel() - - db := pgtest.NewSqlxDB(t) - cfg := configtest.NewTestGeneralConfig(t) - txStore := cltest.NewTestTxStore(t, db, cfg.Database()) - ks := cltest.NewKeyStore(t, db, cfg.Database()).Eth() - - ethClient := evmtest.NewEthClientMockWithDefaultChain(t) - evmcfg := evmtest.NewChainScopedConfig(t, cfg) - checkerFactory := &txmgr.CheckerFactory{Client: ethClient} - randNonce := testutils.NewRandomPositiveInt64() - _, addr1 := cltest.MustInsertRandomKey(t, ks) - ethClient.On("PendingNonceAt", mock.Anything, addr1).Return(uint64(0), errors.New("failed to retrieve nonce at startup")).Once() - ethClient.On("PendingNonceAt", mock.Anything, addr1).Return(uint64(randNonce), nil).Once() - eb := NewTestEthBroadcaster(t, txStore, ethClient, ks, evmcfg, checkerFactory, false) - - ctx := testutils.Context(t) - nonce, err := eb.GetNextSequence(ctx, addr1) - require.NoError(t, err) - require.Equal(t, randNonce, int64(nonce)) - - // Test that the new nonce is set in the map and does not need a client call to retrieve on subsequent calls - nonce, err = eb.GetNextSequence(ctx, addr1) - require.NoError(t, err) - require.Equal(t, randNonce, int64(nonce)) -} - -func Test_IncrementNextNonce(t *testing.T) { +func TestEthBroadcaster_NonceTracker_InProgressTx(t *testing.T) { t.Parallel() db := pgtest.NewSqlxDB(t) cfg := configtest.NewTestGeneralConfig(t) txStore := cltest.NewTestTxStore(t, db, cfg.Database()) - ks := cltest.NewKeyStore(t, db, cfg.Database()).Eth() + ethKeyStore := cltest.NewKeyStore(t, db, cfg.Database()).Eth() + _, fromAddress := cltest.MustInsertRandomKey(t, ethKeyStore) ethClient := evmtest.NewEthClientMockWithDefaultChain(t) evmcfg := evmtest.NewChainScopedConfig(t, cfg) checkerFactory := &txmgr.CheckerFactory{Client: ethClient} - randNonce := testutils.NewRandomPositiveInt64() - _, addr1 := cltest.MustInsertRandomKey(t, ks) - ethClient.On("PendingNonceAt", mock.Anything, addr1).Return(uint64(randNonce), nil).Once() - eb := NewTestEthBroadcaster(t, txStore, ethClient, ks, evmcfg, checkerFactory, false) + lggr := logger.Test(t) ctx := testutils.Context(t) - nonce, err := eb.GetNextSequence(ctx, addr1) - require.NoError(t, err) - eb.IncrementNextSequence(addr1, nonce) - - nonce, err = eb.GetNextSequence(ctx, addr1) - require.NoError(t, err) - assert.Equal(t, randNonce+1, int64(nonce)) - eb.IncrementNextSequence(addr1, nonce) - nonce, err = eb.GetNextSequence(ctx, addr1) - require.NoError(t, err) - assert.Equal(t, randNonce+2, int64(nonce)) - - randAddr1 := utils.RandomAddress() - _, err = eb.GetNextSequence(ctx, randAddr1) - require.Error(t, err) - assert.Contains(t, err.Error(), fmt.Sprintf("address disabled: %s", randAddr1.Hex())) + t.Run("maintains the proper nonce if there is an in-progress tx during startup", func(t *testing.T) { + inProgressTxNonce := uint64(0) + ethClient.On("SendTransactionReturnCode", mock.Anything, mock.MatchedBy(func(tx *gethTypes.Transaction) bool { + return tx.Nonce() == inProgressTxNonce + }), fromAddress).Return(commonclient.Successful, nil).Once() - // verify it didnt get changed by any erroring calls - nonce, err = eb.GetNextSequence(ctx, addr1) - require.NoError(t, err) - assert.Equal(t, randNonce+2, int64(nonce)) -} + // 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) -func Test_SetNextNonce(t *testing.T) { - t.Parallel() + // Check the local nonce map was set to 1 higher than in-progress tx nonce + nonce := getLocalNextNonce(t, nonceTracker, fromAddress) + require.Equal(t, inProgressTxNonce+1, nonce) - db := pgtest.NewSqlxDB(t) - cfg := configtest.NewTestGeneralConfig(t) - txStore := cltest.NewTestTxStore(t, db, cfg.Database()) - ks := cltest.NewKeyStore(t, db, cfg.Database()).Eth() - - ethClient := evmtest.NewEthClientMockWithDefaultChain(t) - evmcfg := evmtest.NewChainScopedConfig(t, cfg) - checkerFactory := &txmgr.CheckerFactory{Client: ethClient} - _, fromAddress := cltest.MustInsertRandomKey(t, ks) - ethClient.On("PendingNonceAt", mock.Anything, fromAddress).Return(uint64(0), nil).Once() - eb := NewTestEthBroadcaster(t, txStore, ethClient, ks, evmcfg, checkerFactory, false) - ctx := testutils.Context(t) - - t.Run("update next nonce", func(t *testing.T) { - nonce, err := eb.GetNextSequence(ctx, fromAddress) + _, err := eb.ProcessUnstartedTxs(ctx, fromAddress) require.NoError(t, err) - assert.Equal(t, int64(0), int64(nonce)) - eb.SetNextSequence(fromAddress, evmtypes.Nonce(24)) - newNextNonce, err := eb.GetNextSequence(ctx, fromAddress) - require.NoError(t, err) - assert.Equal(t, int64(24), int64(newNextNonce)) + // Check the local nonce map maintained nonce 1 higher than in-progress tx nonce + nonce = getLocalNextNonce(t, nonceTracker, fromAddress) + require.Equal(t, inProgressTxNonce+1, nonce) }) } diff --git a/core/chains/evm/txmgr/builder.go b/core/chains/evm/txmgr/builder.go index f0cbcbf8d92..ba5b54ad29f 100644 --- a/core/chains/evm/txmgr/builder.go +++ b/core/chains/evm/txmgr/builder.go @@ -7,20 +7,22 @@ import ( "github.com/jmoiron/sqlx" "github.com/smartcontractkit/chainlink-common/pkg/logger" + "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" "github.com/smartcontractkit/chainlink/v2/common/txmgr" txmgrtypes "github.com/smartcontractkit/chainlink/v2/common/txmgr/types" evmclient "github.com/smartcontractkit/chainlink/v2/core/chains/evm/client" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/config" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/forwarders" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/gas" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/keystore" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/logpoller" evmtypes "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore" ) // NewTxm constructs the necessary dependencies for the EvmTxm (broadcaster, confirmer, etc) and returns a new EvmTxManager func NewTxm( - db *sqlx.DB, + sqlxDB *sqlx.DB, + db sqlutil.DataSource, chainConfig ChainConfig, fCfg FeeConfig, txConfig config.Transactions, @@ -37,28 +39,27 @@ func NewTxm( var fwdMgr FwdMgr if txConfig.ForwardersEnabled() { - fwdMgr = forwarders.NewFwdMgr(db, client, logPoller, lggr, chainConfig, dbConfig) + fwdMgr = forwarders.NewFwdMgr(db, client, logPoller, lggr, chainConfig) } else { lggr.Info("EvmForwarderManager: Disabled") } checker := &CheckerFactory{Client: client} // create tx attempt builder txAttemptBuilder := NewEvmTxAttemptBuilder(*client.ConfiguredChainID(), fCfg, keyStore, estimator) - txStore := NewTxStore(db, lggr, dbConfig) - txNonceSyncer := NewNonceSyncer(txStore, lggr, client) + txStore := NewTxStore(sqlxDB, lggr, dbConfig) txmCfg := NewEvmTxmConfig(chainConfig) // wrap Evm specific config feeCfg := NewEvmTxmFeeConfig(fCfg) // wrap Evm specific config txmClient := NewEvmTxmClient(client) // wrap Evm specific client chainID := txmClient.ConfiguredChainID() - evmBroadcaster := NewEvmBroadcaster(txStore, txmClient, txmCfg, feeCfg, txConfig, listenerConfig, keyStore, txAttemptBuilder, txNonceSyncer, lggr, checker, chainConfig.NonceAutoSync()) + evmBroadcaster := NewEvmBroadcaster(txStore, txmClient, txmCfg, feeCfg, txConfig, listenerConfig, keyStore, txAttemptBuilder, lggr, checker, chainConfig.NonceAutoSync()) evmTracker := NewEvmTracker(txStore, keyStore, chainID, lggr) evmConfirmer := NewEvmConfirmer(txStore, txmClient, txmCfg, feeCfg, txConfig, dbConfig, keyStore, txAttemptBuilder, lggr) var evmResender *Resender if txConfig.ResendAfterThreshold() > 0 { evmResender = NewEvmResender(lggr, txStore, txmClient, evmTracker, keyStore, txmgr.DefaultResenderPollInterval, chainConfig, txConfig) } - txm = NewEvmTxm(chainID, txmCfg, txConfig, keyStore, lggr, checker, fwdMgr, txAttemptBuilder, txStore, txNonceSyncer, evmBroadcaster, evmConfirmer, evmResender, evmTracker) + txm = NewEvmTxm(chainID, txmCfg, txConfig, keyStore, lggr, checker, fwdMgr, txAttemptBuilder, txStore, evmBroadcaster, evmConfirmer, evmResender, evmTracker) return txm, nil } @@ -73,13 +74,12 @@ func NewEvmTxm( fwdMgr FwdMgr, txAttemptBuilder TxAttemptBuilder, txStore TxStore, - nonceSyncer NonceSyncer, broadcaster *Broadcaster, confirmer *Confirmer, resender *Resender, tracker *Tracker, ) *Txm { - return txmgr.NewTxm(chainId, cfg, txCfg, keyStore, lggr, checkerFactory, fwdMgr, txAttemptBuilder, txStore, nonceSyncer, broadcaster, confirmer, resender, tracker) + return txmgr.NewTxm(chainId, cfg, txCfg, keyStore, lggr, checkerFactory, fwdMgr, txAttemptBuilder, txStore, broadcaster, confirmer, resender, tracker) } // NewEvmResender creates a new concrete EvmResender @@ -136,10 +136,10 @@ func NewEvmBroadcaster( listenerConfig txmgrtypes.BroadcasterListenerConfig, keystore KeyStore, txAttemptBuilder TxAttemptBuilder, - nonceSyncer NonceSyncer, logger logger.Logger, checkerFactory TransmitCheckerFactory, autoSyncNonce bool, ) *Broadcaster { - return txmgr.NewBroadcaster(txStore, client, chainConfig, feeConfig, txConfig, listenerConfig, keystore, txAttemptBuilder, nonceSyncer, logger, checkerFactory, autoSyncNonce, evmtypes.GenerateNextNonce) + nonceTracker := NewNonceTracker(logger, txStore, client) + return txmgr.NewBroadcaster(txStore, client, chainConfig, feeConfig, txConfig, listenerConfig, keystore, txAttemptBuilder, nonceTracker, logger, checkerFactory, autoSyncNonce) } diff --git a/core/chains/evm/txmgr/client.go b/core/chains/evm/txmgr/client.go index e794f56ba31..89375e2d017 100644 --- a/core/chains/evm/txmgr/client.go +++ b/core/chains/evm/txmgr/client.go @@ -145,9 +145,9 @@ func (c *evmTxmClient) BatchGetReceipts(ctx context.Context, attempts []TxAttemp // May be useful for clearing stuck nonces func (c *evmTxmClient) SendEmptyTransaction( ctx context.Context, - newTxAttempt func(ctx context.Context, seq evmtypes.Nonce, feeLimit uint32, fee gas.EvmFee, fromAddress common.Address) (attempt TxAttempt, err error), + newTxAttempt func(ctx context.Context, seq evmtypes.Nonce, feeLimit uint64, fee gas.EvmFee, fromAddress common.Address) (attempt TxAttempt, err error), seq evmtypes.Nonce, - gasLimit uint32, + gasLimit uint64, fee gas.EvmFee, fromAddress common.Address, ) (txhash string, err error) { @@ -171,7 +171,7 @@ func (c *evmTxmClient) CallContract(ctx context.Context, a TxAttempt, blockNumbe _, errCall := c.client.CallContract(ctx, ethereum.CallMsg{ From: a.Tx.FromAddress, To: &a.Tx.ToAddress, - Gas: uint64(a.Tx.FeeLimit), + Gas: a.Tx.FeeLimit, GasPrice: a.TxFee.Legacy.ToInt(), GasFeeCap: a.TxFee.DynamicFeeCap.ToInt(), GasTipCap: a.TxFee.DynamicTipCap.ToInt(), diff --git a/core/chains/evm/txmgr/config.go b/core/chains/evm/txmgr/config.go index 8346a0d0551..b41753a070b 100644 --- a/core/chains/evm/txmgr/config.go +++ b/core/chains/evm/txmgr/config.go @@ -27,7 +27,7 @@ type FeeConfig interface { BumpPercent() uint16 BumpThreshold() uint64 BumpTxDepth() uint32 - LimitDefault() uint32 + LimitDefault() uint64 PriceDefault() *assets.Wei TipCapMin() *assets.Wei PriceMax() *assets.Wei diff --git a/core/chains/evm/txmgr/confirmer_test.go b/core/chains/evm/txmgr/confirmer_test.go index 1860b557335..7307f5c35bb 100644 --- a/core/chains/evm/txmgr/confirmer_test.go +++ b/core/chains/evm/txmgr/confirmer_test.go @@ -31,6 +31,8 @@ import ( evmconfig "github.com/smartcontractkit/chainlink/v2/core/chains/evm/config" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/gas" gasmocks "github.com/smartcontractkit/chainlink/v2/core/chains/evm/gas/mocks" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/keystore" + ksmocks "github.com/smartcontractkit/chainlink/v2/core/chains/evm/keystore/mocks" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/txmgr" evmtypes "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils" @@ -40,8 +42,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/evmtest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest" "github.com/smartcontractkit/chainlink/v2/core/services/chainlink" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore" - ksmocks "github.com/smartcontractkit/chainlink/v2/core/services/keystore/mocks" ) func newTestChainScopedConfig(t *testing.T) evmconfig.ChainScopedConfig { @@ -1641,7 +1641,7 @@ func TestEthConfirmer_RebroadcastWhereNecessary_WithConnectivityCheck(t *testing estimator := gasmocks.NewEvmEstimator(t) newEst := func(logger.Logger) gas.EvmEstimator { return estimator } - estimator.On("BumpLegacyGas", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil, uint32(0), pkgerrors.Wrapf(commonfee.ErrConnectivity, "transaction...")) + estimator.On("BumpLegacyGas", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil, uint64(0), pkgerrors.Wrapf(commonfee.ErrConnectivity, "transaction...")) ge := ccfg.EVM().GasEstimator() feeEstimator := gas.NewWrappedEvmEstimator(lggr, newEst, ge.EIP1559DynamicFees(), nil) txBuilder := txmgr.NewEvmTxAttemptBuilder(*ethClient.ConfiguredChainID(), ge, kst, feeEstimator) @@ -1686,7 +1686,7 @@ func TestEthConfirmer_RebroadcastWhereNecessary_WithConnectivityCheck(t *testing kst := ksmocks.NewEth(t) estimator := gasmocks.NewEvmEstimator(t) - estimator.On("BumpDynamicFee", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(gas.DynamicFee{}, uint32(0), pkgerrors.Wrapf(commonfee.ErrConnectivity, "transaction...")) + estimator.On("BumpDynamicFee", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(gas.DynamicFee{}, uint64(0), pkgerrors.Wrapf(commonfee.ErrConnectivity, "transaction...")) newEst := func(logger.Logger) gas.EvmEstimator { return estimator } // Create confirmer with necessary state ge := ccfg.EVM().GasEstimator() @@ -2839,7 +2839,7 @@ func TestEthConfirmer_ForceRebroadcast(t *testing.T) { etx2 := cltest.MustInsertUnconfirmedEthTxWithBroadcastLegacyAttempt(t, txStore, 2, fromAddress) gasPriceWei := gas.EvmFee{Legacy: assets.GWei(52)} - overrideGasLimit := uint32(20000) + overrideGasLimit := uint64(20000) t.Run("rebroadcasts one eth_tx if it falls within in nonce range", func(t *testing.T) { ethClient := evmtest.NewEthClientMockWithDefaultChain(t) @@ -2848,7 +2848,7 @@ func TestEthConfirmer_ForceRebroadcast(t *testing.T) { 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() == uint64(overrideGasLimit) && + tx.Gas() == overrideGasLimit && reflect.DeepEqual(tx.Data(), etx1.EncodedPayload) && tx.To().String() == etx1.ToAddress.String() }), mock.Anything).Return(commonclient.Successful, nil).Once() @@ -2863,7 +2863,7 @@ func TestEthConfirmer_ForceRebroadcast(t *testing.T) { 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() == uint64(etx1.FeeLimit) && + tx.Gas() == etx1.FeeLimit && reflect.DeepEqual(tx.Data(), etx1.EncodedPayload) && tx.To().String() == etx1.ToAddress.String() }), mock.Anything).Return(commonclient.Successful, nil).Once() @@ -2876,10 +2876,10 @@ func TestEthConfirmer_ForceRebroadcast(t *testing.T) { ec := newEthConfirmer(t, txStore, ethClient, 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() == uint64(overrideGasLimit) + return tx.Nonce() == uint64(*etx1.Sequence) && tx.GasPrice().Int64() == gasPriceWei.Legacy.Int64() && tx.Gas() == overrideGasLimit }), mock.Anything).Return(commonclient.Successful, nil).Once() ethClient.On("SendTransactionReturnCode", mock.Anything, mock.MatchedBy(func(tx *types.Transaction) bool { - return tx.Nonce() == uint64(*etx2.Sequence) && tx.GasPrice().Int64() == gasPriceWei.Legacy.Int64() && tx.Gas() == uint64(overrideGasLimit) + return tx.Nonce() == uint64(*etx2.Sequence) && tx.GasPrice().Int64() == gasPriceWei.Legacy.Int64() && tx.Gas() == overrideGasLimit }), mock.Anything).Return(commonclient.Successful, nil).Once() require.NoError(t, ec.ForceRebroadcast(testutils.Context(t), []evmtypes.Nonce{(1), (2)}, gasPriceWei, fromAddress, overrideGasLimit)) @@ -2900,7 +2900,7 @@ func TestEthConfirmer_ForceRebroadcast(t *testing.T) { ethClient.On("SendTransactionReturnCode", mock.Anything, mock.MatchedBy(func(tx *types.Transaction) bool { return tx.Nonce() == uint64(nonce) && tx.GasPrice().Int64() == gasPriceWei.Legacy.Int64() && - tx.Gas() == uint64(overrideGasLimit) && + tx.Gas() == overrideGasLimit && *tx.To() == fromAddress && tx.Value().Cmp(big.NewInt(0)) == 0 && len(tx.Data()) == 0 @@ -2916,7 +2916,7 @@ func TestEthConfirmer_ForceRebroadcast(t *testing.T) { ec := newEthConfirmer(t, txStore, ethClient, 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() && uint32(tx.Gas()) == config.EVM().GasEstimator().LimitDefault() + return tx.Nonce() == uint64(0) && tx.GasPrice().Int64() == gasPriceWei.Legacy.Int64() && tx.Gas() == config.EVM().GasEstimator().LimitDefault() }), mock.Anything).Return(commonclient.Successful, nil).Once() require.NoError(t, ec.ForceRebroadcast(testutils.Context(t), []evmtypes.Nonce{(0)}, gasPriceWei, fromAddress, 0)) diff --git a/core/chains/evm/txmgr/evm_tx_store.go b/core/chains/evm/txmgr/evm_tx_store.go index 29651d5ae51..016b3069282 100644 --- a/core/chains/evm/txmgr/evm_tx_store.go +++ b/core/chains/evm/txmgr/evm_tx_store.go @@ -167,7 +167,7 @@ type DbEthTx struct { Value assets.Eth // GasLimit on the EthTx is always the conceptual gas limit, which is not // necessarily the same as the on-chain encoded value (i.e. Optimism) - GasLimit uint32 + GasLimit uint64 Error nullv4.String // BroadcastAt is updated every time an attempt for this eth_tx is re-sent // In almost all cases it will be within a second or so of the actual send time. @@ -276,7 +276,7 @@ type DbEthTxAttempt struct { BroadcastBeforeBlockNum *int64 State string CreatedAt time.Time - ChainSpecificGasLimit uint32 + ChainSpecificGasLimit uint64 TxType int GasTipCap *assets.Wei GasFeeCap *assets.Wei @@ -1742,26 +1742,6 @@ func (o *evmTxStore) HasInProgressTransaction(ctx context.Context, account commo return exists, pkgerrors.Wrap(err, "hasInProgressTransaction failed") } -func (o *evmTxStore) UpdateKeyNextSequence(newNextNonce, currentNextNonce evmtypes.Nonce, address common.Address, chainID *big.Int, qopts ...pg.QOpt) error { - qq := o.q.WithOpts(qopts...) - return qq.Transaction(func(tx pg.Queryer) error { - // We filter by next_nonce here as an optimistic lock to make sure it - // didn't get changed out from under us. Shouldn't happen but can't hurt. - res, err := tx.Exec(`UPDATE evm.key_states SET next_nonce = $1, updated_at = $2 WHERE address = $3 AND next_nonce = $4 AND evm_chain_id = $5`, newNextNonce.Int64(), time.Now(), address, currentNextNonce.Int64(), chainID.String()) - if err != nil { - return pkgerrors.Wrap(err, "NonceSyncer#fastForwardNonceIfNecessary failed to update keys.next_nonce") - } - rowsAffected, err := res.RowsAffected() - if err != nil { - return pkgerrors.Wrap(err, "NonceSyncer#fastForwardNonceIfNecessary failed to get RowsAffected") - } - if rowsAffected == 0 { - return ErrKeyNotUpdated - } - return nil - }) -} - func (o *evmTxStore) countTransactionsWithState(ctx context.Context, fromAddress common.Address, state txmgrtypes.TxState, chainID *big.Int) (count uint32, err error) { var cancel context.CancelFunc ctx, cancel = o.mergeContexts(ctx) diff --git a/core/chains/evm/txmgr/evm_tx_store_test.go b/core/chains/evm/txmgr/evm_tx_store_test.go index 0994268037f..9d0143d2eda 100644 --- a/core/chains/evm/txmgr/evm_tx_store_test.go +++ b/core/chains/evm/txmgr/evm_tx_store_test.go @@ -1389,7 +1389,7 @@ func TestORM_UpdateTxUnstartedToInProgress(t *testing.T) { evmTxmCfg := txmgr.NewEvmTxmConfig(ccfg.EVM()) ec := evmtest.NewEthClientMockWithDefaultChain(t) txMgr := txmgr.NewEvmTxm(ec.ConfiguredChainID(), evmTxmCfg, ccfg.EVM().Transactions(), nil, logger.Test(t), nil, nil, - nil, txStore, nil, nil, nil, nil, nil) + nil, txStore, nil, nil, nil, nil) err := txMgr.XXXTestAbandon(fromAddress) // mark transaction as abandoned require.NoError(t, err) @@ -1620,7 +1620,7 @@ func TestORM_CheckTxQueueCapacity(t *testing.T) { toAddress := testutils.NewAddress() encodedPayload := []byte{1, 2, 3} - feeLimit := uint32(1000000000) + feeLimit := uint64(1000000000) value := big.Int(assets.NewEthValue(142)) var maxUnconfirmedTransactions uint64 = 2 @@ -1713,7 +1713,7 @@ func TestORM_CreateTransaction(t *testing.T) { _, fromAddress := cltest.MustInsertRandomKey(t, kst.Eth()) toAddress := testutils.NewAddress() - gasLimit := uint32(1000) + gasLimit := uint64(1000) payload := []byte{1, 2, 3} ethClient := evmtest.NewEthClientMockWithDefaultChain(t) diff --git a/core/chains/evm/txmgr/models.go b/core/chains/evm/txmgr/models.go index 4c622ec945a..be06f5dd5e9 100644 --- a/core/chains/evm/txmgr/models.go +++ b/core/chains/evm/txmgr/models.go @@ -11,8 +11,8 @@ import ( "github.com/smartcontractkit/chainlink/v2/common/txmgr" txmgrtypes "github.com/smartcontractkit/chainlink/v2/common/txmgr/types" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/gas" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/keystore" evmtypes "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore" ) // Type aliases for EVM @@ -26,7 +26,7 @@ type ( TransactionStore = txmgrtypes.TransactionStore[common.Address, *big.Int, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee] KeyStore = txmgrtypes.KeyStore[common.Address, *big.Int, evmtypes.Nonce] TxAttemptBuilder = txmgrtypes.TxAttemptBuilder[*big.Int, *evmtypes.Head, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee] - NonceSyncer = txmgr.SequenceSyncer[common.Address, common.Hash, common.Hash, evmtypes.Nonce] + NonceTracker = txmgrtypes.SequenceTracker[common.Address, evmtypes.Nonce] TransmitCheckerFactory = txmgr.TransmitCheckerFactory[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee] Txm = txmgr.Txm[*big.Int, *evmtypes.Head, common.Address, common.Hash, common.Hash, *evmtypes.Receipt, evmtypes.Nonce, gas.EvmFee] TxManager = txmgr.TxManager[*big.Int, *evmtypes.Head, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee] diff --git a/core/chains/evm/txmgr/nonce_syncer.go b/core/chains/evm/txmgr/nonce_syncer.go deleted file mode 100644 index 0cb52a1321e..00000000000 --- a/core/chains/evm/txmgr/nonce_syncer.go +++ /dev/null @@ -1,106 +0,0 @@ -package txmgr - -import ( - "context" - "fmt" - "math/big" - - "github.com/ethereum/go-ethereum/common" - pkgerrors "github.com/pkg/errors" - - "github.com/smartcontractkit/chainlink-common/pkg/logger" - "github.com/smartcontractkit/chainlink/v2/common/txmgr" - evmclient "github.com/smartcontractkit/chainlink/v2/core/chains/evm/client" - "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" -) - -// NonceSyncer manages the delicate task of syncing the local nonce with the -// chain nonce in case of divergence. -// -// On startup, we check each key for the nonce value on chain and compare -// it to our local value. -// -// Usually the on-chain nonce will be the same as (or lower than) the -// highest sequence in the DB, in which case we do nothing. -// -// If we are restoring from a backup however, or another wallet has used the -// account, the chain nonce might be higher than our local one. In this -// scenario, we must fastforward the local nonce to match the chain nonce. -// -// The problem with doing this is that now Chainlink does not have any -// ownership or control over potentially pending transactions with nonces -// between our local highest nonce and the chain nonce. If one of those -// transactions is pushed out of the mempool or re-org'd out of the chain, -// we run the risk of being stuck with a gap in the nonce sequence that -// will never be filled. -// -// The solution is to query the chain for our own transactions and take -// ownership of them by writing them to the database and letting the -// EthConfirmer handle them as it would any other transaction. -// -// This is not quite as straightforward as one might expect. We cannot -// query transactions from our account to infinite depth (geth does not -// support this). The best we can do is to query for all transactions sent -// within the past EVM.FinalityDepth blocks and find the ones sent by our -// address(es). -// -// This gives us re-org protection up to EVM.FinalityDepth deep in the -// worst case, which is in line with our other guarantees. -var _ txmgr.SequenceSyncer[common.Address, common.Hash, common.Hash, types.Nonce] = &nonceSyncerImpl{} - -type nonceSyncerImpl struct { - txStore EvmTxStore - client TxmClient - chainID *big.Int - logger logger.Logger -} - -// NewNonceSyncer returns a new syncer -func NewNonceSyncer( - txStore EvmTxStore, - lggr logger.Logger, - ethClient evmclient.Client, -) NonceSyncer { - lggr = logger.Named(lggr, "NonceSyncer") - return &nonceSyncerImpl{ - txStore: txStore, - client: NewEvmTxmClient(ethClient), - chainID: ethClient.ConfiguredChainID(), - logger: lggr, - } -} - -// SyncAll syncs nonces for all enabled keys in parallel -// -// This should only be called once, before the EthBroadcaster has started. -// Calling it later is not safe and could lead to races. -func (s nonceSyncerImpl) Sync(ctx context.Context, addr common.Address, localNonce types.Nonce) (nonce types.Nonce, err error) { - nonce, err = s.fastForwardNonceIfNecessary(ctx, addr, localNonce) - return nonce, pkgerrors.Wrap(err, "NonceSyncer#fastForwardNoncesIfNecessary failed") -} - -func (s nonceSyncerImpl) fastForwardNonceIfNecessary(ctx context.Context, address common.Address, localNonce types.Nonce) (types.Nonce, error) { - chainNonce, err := s.pendingNonceFromEthClient(ctx, address) - if err != nil { - return localNonce, pkgerrors.Wrap(err, "GetNextNonce failed to loadInitialNonceFromEthClient") - } - if chainNonce == 0 { - return localNonce, nil - } - if chainNonce <= localNonce { - return localNonce, nil - } - s.logger.Warnw(fmt.Sprintf("address %s has been used before, either by an external wallet or a different Chainlink node. "+ - "Local nonce is %v but the on-chain nonce for this account was %v. "+ - "It's possible that this node was restored from a backup. If so, transactions sent by the previous node will NOT be re-org protected and in rare cases may need to be manually bumped/resubmitted. "+ - "Please note that using the chainlink keys with an external wallet is NOT SUPPORTED and can lead to missed or stuck transactions. ", - address, localNonce, chainNonce), - "address", address.String(), "localNonce", localNonce, "chainNonce", chainNonce) - - return chainNonce, nil -} - -func (s nonceSyncerImpl) pendingNonceFromEthClient(ctx context.Context, account common.Address) (types.Nonce, error) { - nextNonce, err := s.client.PendingSequenceAt(ctx, account) - return nextNonce, pkgerrors.WithStack(err) -} diff --git a/core/chains/evm/txmgr/nonce_syncer_test.go b/core/chains/evm/txmgr/nonce_syncer_test.go deleted file mode 100644 index d9a741fb3c5..00000000000 --- a/core/chains/evm/txmgr/nonce_syncer_test.go +++ /dev/null @@ -1,114 +0,0 @@ -package txmgr_test - -import ( - "testing" - - "github.com/smartcontractkit/chainlink-common/pkg/logger" - "github.com/smartcontractkit/chainlink/v2/core/chains/evm/txmgr" - "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" - "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" - - pkgerrors "github.com/pkg/errors" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/mock" - "github.com/stretchr/testify/require" -) - -func Test_NonceSyncer_Sync(t *testing.T) { - t.Parallel() - - t.Run("returns error if PendingNonceAt fails", func(t *testing.T) { - db := pgtest.NewSqlxDB(t) - cfg := configtest.NewTestGeneralConfig(t) - txStore := cltest.NewTestTxStore(t, db, cfg.Database()) - ethClient := evmtest.NewEthClientMockWithDefaultChain(t) - ethKeyStore := cltest.NewKeyStore(t, db, cfg.Database()).Eth() - - _, from := cltest.MustInsertRandomKey(t, ethKeyStore) - - ns := txmgr.NewNonceSyncer(txStore, logger.Test(t), ethClient) - - ethClient.On("PendingNonceAt", mock.Anything, from).Return(uint64(0), pkgerrors.New("something exploded")) - _, err := ns.Sync(testutils.Context(t), from, types.Nonce(0)) - require.Error(t, err) - assert.Contains(t, err.Error(), "something exploded") - - cltest.AssertCount(t, db, "evm.txes", 0) - cltest.AssertCount(t, db, "evm.tx_attempts", 0) - }) - - t.Run("does nothing if chain nonce reflects local nonce", func(t *testing.T) { - db := pgtest.NewSqlxDB(t) - cfg := configtest.NewTestGeneralConfig(t) - txStore := cltest.NewTestTxStore(t, db, cfg.Database()) - ethClient := evmtest.NewEthClientMockWithDefaultChain(t) - ethKeyStore := cltest.NewKeyStore(t, db, cfg.Database()).Eth() - - _, from := cltest.MustInsertRandomKey(t, ethKeyStore) - - ns := txmgr.NewNonceSyncer(txStore, logger.Test(t), ethClient) - - ethClient.On("PendingNonceAt", mock.Anything, from).Return(uint64(0), nil) - - nonce, err := ns.Sync(testutils.Context(t), from, 0) - require.Equal(t, nonce.Int64(), int64(0)) - require.NoError(t, err) - - cltest.AssertCount(t, db, "evm.txes", 0) - cltest.AssertCount(t, db, "evm.tx_attempts", 0) - }) - - t.Run("does nothing if chain nonce is behind local nonce", func(t *testing.T) { - db := pgtest.NewSqlxDB(t) - cfg := configtest.NewTestGeneralConfig(t) - txStore := cltest.NewTestTxStore(t, db, cfg.Database()) - ks := cltest.NewKeyStore(t, db, cfg.Database()).Eth() - - ethClient := evmtest.NewEthClientMockWithDefaultChain(t) - - _, fromAddress := cltest.RandomKey{Nonce: 32}.MustInsert(t, ks) - - ns := txmgr.NewNonceSyncer(txStore, logger.Test(t), ethClient) - - // Used to mock the chain nonce - ethClient.On("PendingNonceAt", mock.Anything, fromAddress).Return(uint64(5), nil) - nonce, err := ns.Sync(testutils.Context(t), fromAddress, types.Nonce(32)) - require.Equal(t, nonce.Int64(), int64(32)) - require.NoError(t, err) - - cltest.AssertCount(t, db, "evm.txes", 0) - cltest.AssertCount(t, db, "evm.tx_attempts", 0) - }) - - t.Run("fast forwards if chain nonce is ahead of local nonce", func(t *testing.T) { - db := pgtest.NewSqlxDB(t) - cfg := configtest.NewTestGeneralConfig(t) - txStore := cltest.NewTestTxStore(t, db, cfg.Database()) - ethClient := evmtest.NewEthClientMockWithDefaultChain(t) - ethKeyStore := cltest.NewKeyStore(t, db, cfg.Database()).Eth() - - _, key1 := cltest.MustInsertRandomKey(t, ethKeyStore) - _, key2 := cltest.RandomKey{Nonce: 32}.MustInsert(t, ethKeyStore) - - key1LocalNonce := types.Nonce(0) - key2LocalNonce := types.Nonce(32) - - ns := txmgr.NewNonceSyncer(txStore, logger.Test(t), ethClient) - - // Used to mock the chain nonce - ethClient.On("PendingNonceAt", mock.Anything, key1).Return(uint64(5), nil).Once() - ethClient.On("PendingNonceAt", mock.Anything, key2).Return(uint64(32), nil).Once() - - syncerNonce, err := ns.Sync(testutils.Context(t), key1, key1LocalNonce) - require.NoError(t, err) - require.Greater(t, syncerNonce, key1LocalNonce) - - syncerNonce, err = ns.Sync(testutils.Context(t), key2, key2LocalNonce) - require.NoError(t, err) - require.Equal(t, syncerNonce, key2LocalNonce) - }) -} diff --git a/core/chains/evm/txmgr/nonce_tracker.go b/core/chains/evm/txmgr/nonce_tracker.go new file mode 100644 index 00000000000..6fb708ed876 --- /dev/null +++ b/core/chains/evm/txmgr/nonce_tracker.go @@ -0,0 +1,186 @@ +package txmgr + +import ( + "context" + "fmt" + "math/big" + "slices" + "sync" + "time" + + "github.com/ethereum/go-ethereum/common" + "github.com/jpillora/backoff" + + "github.com/smartcontractkit/chainlink-common/pkg/logger" + "github.com/smartcontractkit/chainlink-common/pkg/services" + evmtypes "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" +) + +type NonceTrackerTxStore interface { + FindLatestSequence(context.Context, common.Address, *big.Int) (evmtypes.Nonce, error) +} + +type NonceTrackerClient interface { + ConfiguredChainID() *big.Int + PendingSequenceAt(context.Context, common.Address) (evmtypes.Nonce, error) +} + +type nonceTracker struct { + lggr logger.SugaredLogger + nextSequenceMap map[common.Address]evmtypes.Nonce + txStore NonceTrackerTxStore + chainID *big.Int + client NonceTrackerClient + enabledAddresses []common.Address + + sequenceLock sync.RWMutex +} + +func NewNonceTracker(lggr logger.Logger, txStore NonceTrackerTxStore, client NonceTrackerClient) *nonceTracker { + lggr = logger.Named(lggr, "NonceTracker") + return &nonceTracker{ + lggr: logger.Sugared(lggr), + txStore: txStore, + chainID: client.ConfiguredChainID(), + client: client, + } +} + +func (s *nonceTracker) LoadNextSequences(ctx context.Context, addresses []common.Address) { + s.sequenceLock.Lock() + defer s.sequenceLock.Unlock() + + s.enabledAddresses = addresses + + s.nextSequenceMap = make(map[common.Address]evmtypes.Nonce) + for _, address := range addresses { + seq, err := s.getSequenceForAddr(ctx, address) + if err == nil { + s.nextSequenceMap[address] = seq + } + } +} + +func (s *nonceTracker) getSequenceForAddr(ctx context.Context, address common.Address) (seq evmtypes.Nonce, err error) { + // Get the highest sequence from the tx table + // Will need to be incremented since this sequence is already used + seq, err = s.txStore.FindLatestSequence(ctx, address, s.chainID) + if err == nil { + seq++ + return seq, nil + } + // Look for nonce on-chain if no tx found for address in TxStore or if error occurred + // Returns the nonce that should be used for the next transaction so no need to increment + nonce, err := s.client.PendingSequenceAt(ctx, address) + if err == nil { + return nonce, nil + } + s.lggr.Criticalw("failed to retrieve next sequence from on-chain for address: ", "address", address.String()) + return seq, err + +} + +// syncSequence tries to sync the key sequence, retrying indefinitely until success or stop signal is sent +func (s *nonceTracker) SyncSequence(ctx context.Context, addr common.Address, chStop services.StopChan) { + sequenceSyncRetryBackoff := backoff.Backoff{ + Min: 100 * time.Millisecond, + Max: 5 * time.Second, + Jitter: true, + } + + localSequence, err := s.GetNextSequence(ctx, addr) + // Address not found in map so skip sync + if err != nil { + s.lggr.Criticalw("Failed to retrieve local next sequence for address", "address", addr.String(), "err", err) + return + } + + // Enter loop with retries + var attempt int + for { + select { + case <-chStop: + return + case <-time.After(sequenceSyncRetryBackoff.Duration()): + attempt++ + err := s.SyncOnChain(ctx, addr, localSequence) + if err != nil { + if attempt > 5 { + s.lggr.Criticalw("Failed to sync with on-chain sequence", "address", addr.String(), "attempt", attempt, "err", err) + } else { + s.lggr.Warnw("Failed to sync with on-chain sequence", "address", addr.String(), "attempt", attempt, "err", err) + } + continue + } + return + } + } +} + +func (s *nonceTracker) SyncOnChain(ctx context.Context, addr common.Address, localSequence evmtypes.Nonce) error { + nonce, err := s.client.PendingSequenceAt(ctx, addr) + if err != nil { + return err + } + if nonce > localSequence { + s.lggr.Warnw(fmt.Sprintf("address %s has been used before, either by an external wallet or a different Chainlink node. "+ + "Local nonce is %v but the on-chain nonce for this account was %v. "+ + "It's possible that this node was restored from a backup. If so, transactions sent by the previous node will NOT be re-org protected and in rare cases may need to be manually bumped/resubmitted. "+ + "Please note that using the chainlink keys with an external wallet is NOT SUPPORTED and can lead to missed or stuck transactions. ", + addr, localSequence, nonce), + "address", addr.String(), "localNonce", localSequence, "chainNonce", nonce) + + s.lggr.Infow("Fast-forward sequence", "address", addr, "newNextSequence", nonce, "oldNextSequence", localSequence) + } + + s.sequenceLock.Lock() + defer s.sequenceLock.Unlock() + s.nextSequenceMap[addr] = max(localSequence, nonce) + return nil +} + +func (s *nonceTracker) GetNextSequence(ctx context.Context, address common.Address) (seq evmtypes.Nonce, err error) { + s.sequenceLock.Lock() + defer s.sequenceLock.Unlock() + // Get next sequence from map + seq, exists := s.nextSequenceMap[address] + if exists { + return seq, nil + } + + s.lggr.Infow("address not found in local next sequence map. Attempting to search and populate sequence.", "address", address.String()) + // Check if address is in the enabled address list + if !slices.Contains(s.enabledAddresses, address) { + return seq, fmt.Errorf("address disabled: %s", address) + } + + // Try to retrieve next sequence from tx table or on-chain to load the map + // A scenario could exist where loading the map during startup failed (e.g. All configured RPC's are unreachable at start) + // The expectation is that the node does not fail startup so sequences need to be loaded during runtime + foundSeq, err := s.getSequenceForAddr(ctx, address) + if err != nil { + return seq, fmt.Errorf("failed to find next sequence for address: %s", address) + } + + // Set sequence in map + s.nextSequenceMap[address] = foundSeq + return foundSeq, nil +} + +func (s *nonceTracker) GenerateNextSequence(address common.Address, nonceUsed evmtypes.Nonce) { + s.sequenceLock.Lock() + defer s.sequenceLock.Unlock() + currentNonce := s.nextSequenceMap[address] + + // In most cases, currentNonce would equal nonceUsed + // There is a chance currentNonce is 1 ahead of nonceUsed if the DB contains an in-progress tx during startup + // Incrementing currentNonce, which is already set to the next usable nonce, could lead to a nonce gap. Set the map to the incremented nonceUsed instead. + if currentNonce == nonceUsed || currentNonce == nonceUsed+1 { + s.nextSequenceMap[address] = nonceUsed + 1 + return + } + + // If currentNonce is ahead of even the incremented nonceUsed, maintain the unchanged currentNonce in the map + // This scenario should never occur but logging this discrepancy for visibility + s.lggr.Warnf("Local nonce map value %d for address %s is ahead of the nonce transmitted %d. Maintaining the existing value in the map without incrementing.", currentNonce, address.String(), nonceUsed) +} diff --git a/core/chains/evm/txmgr/nonce_tracker_test.go b/core/chains/evm/txmgr/nonce_tracker_test.go new file mode 100644 index 00000000000..95347c2d580 --- /dev/null +++ b/core/chains/evm/txmgr/nonce_tracker_test.go @@ -0,0 +1,293 @@ +package txmgr_test + +import ( + "errors" + "fmt" + "math/big" + "testing" + + "github.com/stretchr/testify/mock" + "github.com/stretchr/testify/require" + + "github.com/ethereum/go-ethereum/common" + + "github.com/smartcontractkit/chainlink-common/pkg/logger" + "github.com/smartcontractkit/chainlink-common/pkg/services" + + clientmock "github.com/smartcontractkit/chainlink/v2/core/chains/evm/client/mocks" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/txmgr" + txstoremock "github.com/smartcontractkit/chainlink/v2/core/chains/evm/txmgr/mocks" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" + "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/pgtest" +) + +func TestNonceTracker_LoadSequenceMap(t *testing.T) { + t.Parallel() + + ctx := testutils.Context(t) + chainID := big.NewInt(0) + txStore := txstoremock.NewEvmTxStore(t) + + client := clientmock.NewClient(t) + client.On("ConfiguredChainID").Return(chainID) + + nonceTracker := txmgr.NewNonceTracker(logger.Test(t), txStore, txmgr.NewEvmTxmClient(client)) + + addr1 := common.HexToAddress("0xd5e099c71b797516c10ed0f0d895f429c2781142") + addr2 := common.HexToAddress("0xd5e099c71b797516c10ed0f0d895f429c2781140") + enabledAddresses := []common.Address{addr1, addr2} + + t.Run("set next nonce using entries from tx table", func(t *testing.T) { + randNonce1 := testutils.NewRandomPositiveInt64() + randNonce2 := testutils.NewRandomPositiveInt64() + txStore.On("FindLatestSequence", mock.Anything, addr1, chainID).Return(types.Nonce(randNonce1), nil).Once() + txStore.On("FindLatestSequence", mock.Anything, addr2, chainID).Return(types.Nonce(randNonce2), nil).Once() + + nonceTracker.LoadNextSequences(ctx, enabledAddresses) + seq, err := nonceTracker.GetNextSequence(ctx, addr1) + require.NoError(t, err) + require.Equal(t, types.Nonce(randNonce1+1), seq) + seq, err = nonceTracker.GetNextSequence(ctx, addr2) + require.NoError(t, err) + require.Equal(t, types.Nonce(randNonce2+1), seq) + }) + + t.Run("set next nonce using client when not found in tx table", func(t *testing.T) { + var emptyNonce types.Nonce + txStore.On("FindLatestSequence", mock.Anything, addr1, chainID).Return(emptyNonce, errors.New("no rows")).Once() + txStore.On("FindLatestSequence", mock.Anything, addr2, chainID).Return(emptyNonce, errors.New("no rows")).Once() + + randNonce1 := testutils.NewRandomPositiveInt64() + randNonce2 := testutils.NewRandomPositiveInt64() + client.On("PendingNonceAt", mock.Anything, addr1).Return(uint64(randNonce1), nil).Once() + client.On("PendingNonceAt", mock.Anything, addr2).Return(uint64(randNonce2), nil).Once() + + nonceTracker.LoadNextSequences(ctx, enabledAddresses) + seq, err := nonceTracker.GetNextSequence(ctx, addr1) + require.NoError(t, err) + require.Equal(t, types.Nonce(randNonce1), seq) + seq, err = nonceTracker.GetNextSequence(ctx, addr2) + require.NoError(t, err) + require.Equal(t, types.Nonce(randNonce2), seq) + }) + +} + +func TestNonceTracker_syncOnChain(t *testing.T) { + t.Parallel() + + ctx := testutils.Context(t) + chainID := big.NewInt(0) + txStore := txstoremock.NewEvmTxStore(t) + + client := clientmock.NewClient(t) + client.On("ConfiguredChainID").Return(chainID) + + nonceTracker := txmgr.NewNonceTracker(logger.Test(t), txStore, txmgr.NewEvmTxmClient(client)) + + addr := common.HexToAddress("0xd5e099c71b797516c10ed0f0d895f429c2781142") + + t.Run("throws error if RPC call fails", func(t *testing.T) { + client.On("PendingNonceAt", mock.Anything, addr).Return(uint64(0), errors.New("RPC unavailable")).Once() + + err := nonceTracker.SyncOnChain(ctx, addr, types.Nonce(2)) + require.Error(t, err) + }) + + t.Run("uses local nonce instead of on-chain nonce if on-chain nonce is lower", func(t *testing.T) { + nonce := 2 + newNonce := 5 + client.On("PendingNonceAt", mock.Anything, addr).Return(uint64(nonce), nil).Once() + + enabledAddresses := []common.Address{} + nonceTracker.LoadNextSequences(ctx, enabledAddresses) + + // syncOnChain will set the next sequence even if the address is not present in the map + err := nonceTracker.SyncOnChain(ctx, addr, types.Nonce(newNonce)) + require.NoError(t, err) + + seq, err := nonceTracker.GetNextSequence(ctx, addr) + require.NoError(t, err) + require.Equal(t, types.Nonce(newNonce), seq) + }) + + t.Run("fast forwards nonce if on-chain nonce is higher than local nonce", func(t *testing.T) { + nonce := 10 + onChainNonce := 5 + client.On("PendingNonceAt", mock.Anything, addr).Return(uint64(nonce), nil).Once() + + enabledAddresses := []common.Address{} + nonceTracker.LoadNextSequences(ctx, enabledAddresses) + + // syncOnChain will set the next sequence even if the address is not present in the map + err := nonceTracker.SyncOnChain(ctx, addr, types.Nonce(onChainNonce)) + require.NoError(t, err) + + seq, err := nonceTracker.GetNextSequence(ctx, addr) + require.NoError(t, err) + require.Equal(t, types.Nonce(nonce), seq) + }) + +} + +func TestNonceTracker_SyncSequence(t *testing.T) { + t.Parallel() + + ctx := testutils.Context(t) + chainID := big.NewInt(0) + txStore := txstoremock.NewEvmTxStore(t) + + client := clientmock.NewClient(t) + client.On("ConfiguredChainID").Return(chainID) + + nonceTracker := txmgr.NewNonceTracker(logger.Test(t), txStore, txmgr.NewEvmTxmClient(client)) + + addr := common.HexToAddress("0xd5e099c71b797516c10ed0f0d895f429c2781142") + enabledAddresses := []common.Address{addr} + + t.Run("syncs sequence successfully", func(t *testing.T) { + txStoreNonce := 2 + onChainNonce := 3 + txStore.On("FindLatestSequence", mock.Anything, addr, chainID).Return(types.Nonce(txStoreNonce), nil).Once() + nonceTracker.LoadNextSequences(ctx, enabledAddresses) + + var chStop services.StopChan + client.On("PendingNonceAt", mock.Anything, addr).Return(uint64(onChainNonce), nil).Once() + nonceTracker.SyncSequence(ctx, addr, chStop) + + seq, err := nonceTracker.GetNextSequence(ctx, addr) + require.NoError(t, err) + require.Equal(t, types.Nonce(onChainNonce), seq) + }) + + t.Run("retries if on-chain syncing fails", func(t *testing.T) { + txStoreNonce := 2 + onChainNonce := 3 + txStore.On("FindLatestSequence", mock.Anything, addr, chainID).Return(types.Nonce(txStoreNonce), nil).Once() + nonceTracker.LoadNextSequences(ctx, enabledAddresses) + + var chStop services.StopChan + client.On("PendingNonceAt", mock.Anything, addr).Return(uint64(0), errors.New("RPC unavailable")).Once() + client.On("PendingNonceAt", mock.Anything, addr).Return(uint64(onChainNonce), nil).Once() + nonceTracker.SyncSequence(ctx, addr, chStop) + + seq, err := nonceTracker.GetNextSequence(ctx, addr) + require.NoError(t, err) + require.Equal(t, types.Nonce(onChainNonce), seq) + }) +} + +func TestNonceTracker_GetNextSequence(t *testing.T) { + t.Parallel() + + ctx := testutils.Context(t) + chainID := big.NewInt(0) + txStore := txstoremock.NewEvmTxStore(t) + + client := clientmock.NewClient(t) + client.On("ConfiguredChainID").Return(chainID) + + nonceTracker := txmgr.NewNonceTracker(logger.Test(t), txStore, txmgr.NewEvmTxmClient(client)) + + addr := common.HexToAddress("0xd5e099c71b797516c10ed0f0d895f429c2781142") + + t.Run("fails to get sequence if address doesn't exist in map", func(t *testing.T) { + _, err := nonceTracker.GetNextSequence(ctx, addr) + require.Error(t, err) + + }) + + t.Run("fails to get sequence if address doesn't exist in map and is disabled", func(t *testing.T) { + _, err := nonceTracker.GetNextSequence(ctx, addr) + require.Error(t, err) + require.Contains(t, err.Error(), fmt.Sprintf("address disabled: %s", addr.Hex())) + }) + + t.Run("fails to get sequence if address is enabled, doesn't exist in map, and getSequenceForAddr fails", func(t *testing.T) { + enabledAddresses := []common.Address{addr} + txStore.On("FindLatestSequence", mock.Anything, addr, chainID).Return(types.Nonce(0), errors.New("no rows")).Twice() + client.On("PendingNonceAt", mock.Anything, addr).Return(uint64(0), errors.New("RPC unavailable")).Twice() + nonceTracker.LoadNextSequences(ctx, enabledAddresses) + + _, err := nonceTracker.GetNextSequence(ctx, addr) + require.Error(t, err) + require.Contains(t, err.Error(), fmt.Sprintf("failed to find next sequence for address: %s", addr.Hex())) + }) + + t.Run("gets next sequence successfully if there is no entry in map but address is enabled and getSequenceForAddr is successful", func(t *testing.T) { + txStoreNonce := 4 + enabledAddresses := []common.Address{addr} + txStore.On("FindLatestSequence", mock.Anything, addr, chainID).Return(types.Nonce(0), errors.New("no rows")).Once() + client.On("PendingNonceAt", mock.Anything, addr).Return(uint64(0), errors.New("RPC unavailable")).Once() + nonceTracker.LoadNextSequences(ctx, enabledAddresses) + + txStore.On("FindLatestSequence", mock.Anything, addr, chainID).Return(types.Nonce(txStoreNonce), nil).Once() + seq, err := nonceTracker.GetNextSequence(ctx, addr) + require.NoError(t, err) + require.Equal(t, types.Nonce(txStoreNonce+1), seq) + + }) +} + +func TestNonceTracker_GenerateNextSequence(t *testing.T) { + t.Parallel() + + ctx := testutils.Context(t) + chainID := big.NewInt(0) + txStore := txstoremock.NewEvmTxStore(t) + + client := clientmock.NewClient(t) + client.On("ConfiguredChainID").Return(chainID) + + nonceTracker := txmgr.NewNonceTracker(logger.Test(t), txStore, txmgr.NewEvmTxmClient(client)) + + addr := common.HexToAddress("0xd5e099c71b797516c10ed0f0d895f429c2781142") + enabledAddresses := []common.Address{addr} + + randNonce := testutils.NewRandomPositiveInt64() + txStore.On("FindLatestSequence", mock.Anything, addr, chainID).Return(types.Nonce(randNonce), nil).Once() + nonceTracker.LoadNextSequences(ctx, enabledAddresses) + seq, err := nonceTracker.GetNextSequence(ctx, addr) + require.NoError(t, err) + require.Equal(t, types.Nonce(randNonce+1), seq) // Local nonce should be highest nonce in DB + 1 + + nonceTracker.GenerateNextSequence(addr, types.Nonce(randNonce+1)) + + seq, err = nonceTracker.GetNextSequence(ctx, addr) + require.NoError(t, err) + require.Equal(t, types.Nonce(randNonce+2), seq) // GenerateNextSequence increases local nonce by 1 +} + +func Test_SetNonceAfterInit(t *testing.T) { + t.Parallel() + + ctx := testutils.Context(t) + chainID := big.NewInt(0) + db := pgtest.NewSqlxDB(t) + cfg := configtest.NewTestGeneralConfig(t) + txStore := cltest.NewTestTxStore(t, db, cfg.Database()) + + client := clientmock.NewClient(t) + client.On("ConfiguredChainID").Return(chainID) + + nonceTracker := txmgr.NewNonceTracker(logger.Test(t), txStore, txmgr.NewEvmTxmClient(client)) + + addr := common.HexToAddress("0xd5e099c71b797516c10ed0f0d895f429c2781142") + enabledAddresses := []common.Address{addr} + randNonce := testutils.NewRandomPositiveInt64() + client.On("PendingNonceAt", mock.Anything, addr).Return(uint64(0), errors.New("failed to retrieve nonce at startup")).Once() + client.On("PendingNonceAt", mock.Anything, addr).Return(uint64(randNonce), nil).Once() + nonceTracker.LoadNextSequences(ctx, enabledAddresses) + + nonce, err := nonceTracker.GetNextSequence(ctx, addr) + require.NoError(t, err) + require.Equal(t, randNonce, int64(nonce)) + + // Test that the new nonce is set in the map and does not need a client call to retrieve on subsequent calls + nonce, err = nonceTracker.GetNextSequence(ctx, addr) + require.NoError(t, err) + require.Equal(t, randNonce, int64(nonce)) +} diff --git a/core/chains/evm/txmgr/test_helpers.go b/core/chains/evm/txmgr/test_helpers.go index e279dddf5fa..8cb771943b0 100644 --- a/core/chains/evm/txmgr/test_helpers.go +++ b/core/chains/evm/txmgr/test_helpers.go @@ -68,7 +68,7 @@ func (g *TestGasEstimatorConfig) BlockHistory() evmconfig.BlockHistory { } func (g *TestGasEstimatorConfig) EIP1559DynamicFees() bool { return false } -func (g *TestGasEstimatorConfig) LimitDefault() uint32 { return 42 } +func (g *TestGasEstimatorConfig) LimitDefault() uint64 { return 42 } func (g *TestGasEstimatorConfig) BumpPercent() uint16 { return 42 } func (g *TestGasEstimatorConfig) BumpThreshold() uint64 { return g.bumpThreshold } func (g *TestGasEstimatorConfig) BumpMin() *assets.Wei { return assets.NewWeiI(42) } @@ -76,7 +76,7 @@ func (g *TestGasEstimatorConfig) FeeCapDefault() *assets.Wei { return assets.New func (g *TestGasEstimatorConfig) PriceDefault() *assets.Wei { return assets.NewWeiI(42) } func (g *TestGasEstimatorConfig) TipCapDefault() *assets.Wei { return assets.NewWeiI(42) } func (g *TestGasEstimatorConfig) TipCapMin() *assets.Wei { return assets.NewWeiI(42) } -func (g *TestGasEstimatorConfig) LimitMax() uint32 { return 0 } +func (g *TestGasEstimatorConfig) LimitMax() uint64 { return 0 } func (g *TestGasEstimatorConfig) LimitMultiplier() float32 { return 0 } func (g *TestGasEstimatorConfig) BumpTxDepth() uint32 { return 42 } func (g *TestGasEstimatorConfig) LimitTransfer() uint32 { return 42 } diff --git a/core/chains/evm/txmgr/tracker_test.go b/core/chains/evm/txmgr/tracker_test.go index d3083372789..ce249f9ea1f 100644 --- a/core/chains/evm/txmgr/tracker_test.go +++ b/core/chains/evm/txmgr/tracker_test.go @@ -6,13 +6,13 @@ import ( "testing" "time" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/keystore" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/txmgr" 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/evmtest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest" "github.com/smartcontractkit/chainlink/v2/core/logger" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore" "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/require" @@ -26,17 +26,12 @@ func newTestEvmTrackerSetup(t *testing.T) (*txmgr.Tracker, txmgr.TestEvmTxStore, txStore := cltest.NewTestTxStore(t, db, cfg.Database()) ethKeyStore := cltest.NewKeyStore(t, db, cfg.Database()).Eth() chainID := big.NewInt(0) - enabledAddresses := generateEnabledAddresses(t, ethKeyStore, chainID) - lggr := logger.TestLogger(t) - return txmgr.NewEvmTracker(txStore, ethKeyStore, chainID, lggr), txStore, ethKeyStore, enabledAddresses -} - -func generateEnabledAddresses(t *testing.T, keyStore keystore.Eth, chainID *big.Int) []common.Address { var enabledAddresses []common.Address - _, addr1 := cltest.MustInsertRandomKey(t, keyStore, *ubig.NewI(chainID.Int64())) - _, addr2 := cltest.MustInsertRandomKey(t, keyStore, *ubig.NewI(chainID.Int64())) + _, addr1 := cltest.MustInsertRandomKey(t, ethKeyStore, *ubig.NewI(chainID.Int64())) + _, addr2 := cltest.MustInsertRandomKey(t, ethKeyStore, *ubig.NewI(chainID.Int64())) enabledAddresses = append(enabledAddresses, addr1, addr2) - return enabledAddresses + lggr := logger.TestLogger(t) + return txmgr.NewEvmTracker(txStore, ethKeyStore, chainID, lggr), txStore, ethKeyStore, enabledAddresses } func containsID(txes []*txmgr.Tx, id int64) bool { diff --git a/core/chains/evm/txmgr/txmgr_test.go b/core/chains/evm/txmgr/txmgr_test.go index da18c592a55..7120a77728e 100644 --- a/core/chains/evm/txmgr/txmgr_test.go +++ b/core/chains/evm/txmgr/txmgr_test.go @@ -32,6 +32,8 @@ import ( evmconfig "github.com/smartcontractkit/chainlink/v2/core/chains/evm/config" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/forwarders" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/gas" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/keystore" + ksmocks "github.com/smartcontractkit/chainlink/v2/core/chains/evm/keystore/mocks" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/logpoller" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/txmgr" evmtypes "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" @@ -42,8 +44,6 @@ import ( "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/services/keystore" - ksmocks "github.com/smartcontractkit/chainlink/v2/core/services/keystore/mocks" "github.com/smartcontractkit/chainlink/v2/core/services/pg" ) @@ -57,7 +57,7 @@ func makeTestEvmTxm( RpcBatchSize: 2, KeepFinalizedBlocksDepth: 1000, } - lp := logpoller.NewLogPoller(logpoller.NewORM(testutils.FixtureChainID, db, lggr, pgtest.NewQConfig(true)), ethClient, lggr, lpOpts) + lp := logpoller.NewLogPoller(logpoller.NewORM(testutils.FixtureChainID, db, lggr), ethClient, lggr, lpOpts) // logic for building components (from evm/evm_txm.go) ------- lggr.Infow("Initializing EVM transaction manager", @@ -69,6 +69,7 @@ func makeTestEvmTxm( ) return txmgr.NewTxm( + db, db, ccfg, fcfg, @@ -113,7 +114,7 @@ func TestTxm_CreateTransaction(t *testing.T) { _, fromAddress := cltest.MustInsertRandomKey(t, kst.Eth()) toAddress := testutils.NewAddress() - gasLimit := uint32(1000) + gasLimit := uint64(1000) payload := []byte{1, 2, 3} config, dbConfig, evmConfig := txmgr.MakeTestConfigs(t) @@ -309,9 +310,9 @@ func TestTxm_CreateTransaction(t *testing.T) { evmConfig.MaxQueued = uint64(1) // Create mock forwarder, mock authorizedsenders call. - form := forwarders.NewORM(db, logger.Test(t), cfg.Database()) + form := forwarders.NewORM(db) fwdrAddr := testutils.NewAddress() - fwdr, err := form.CreateForwarder(fwdrAddr, ubig.Big(cltest.FixtureChainID)) + fwdr, err := form.CreateForwarder(testutils.Context(t), fwdrAddr, ubig.Big(cltest.FixtureChainID)) require.NoError(t, err) require.Equal(t, fwdr.Address, fwdrAddr) @@ -396,7 +397,7 @@ func TestTxm_CreateTransaction_OutOfEth(t *testing.T) { fromAddress := thisKey.Address evmFromAddress := fromAddress - gasLimit := uint32(1000) + gasLimit := uint64(1000) toAddress := testutils.NewAddress() config, dbConfig, evmConfig := txmgr.MakeTestConfigs(t) @@ -784,13 +785,13 @@ func withDefaults() func(*txmgr.TxRequest) { tx.ToAddress = testutils.NewAddress() tx.EncodedPayload = []byte{1, 2, 3} tx.Value = big.Int(assets.NewEthValue(142)) - tx.FeeLimit = uint32(1000000000) + tx.FeeLimit = uint64(1000000000) tx.Strategy = txmgrcommon.NewSendEveryStrategy() // Set default values for other fields if needed } } -func mustCreateUnstartedTx(t testing.TB, txStore txmgr.EvmTxStore, fromAddress common.Address, toAddress common.Address, encodedPayload []byte, gasLimit uint32, value big.Int, chainID *big.Int, opts ...interface{}) (tx txmgr.Tx) { +func mustCreateUnstartedTx(t testing.TB, txStore txmgr.EvmTxStore, fromAddress common.Address, toAddress common.Address, encodedPayload []byte, gasLimit uint64, value big.Int, chainID *big.Int) (tx txmgr.Tx) { txRequest := txmgr.TxRequest{ FromAddress: fromAddress, ToAddress: toAddress, diff --git a/core/services/keystore/keys/ethkey/address.go b/core/chains/evm/types/address.go similarity index 99% rename from core/services/keystore/keys/ethkey/address.go rename to core/chains/evm/types/address.go index 0d93a4cdb29..4a77ce5f8db 100644 --- a/core/services/keystore/keys/ethkey/address.go +++ b/core/chains/evm/types/address.go @@ -1,4 +1,4 @@ -package ethkey +package types import ( "database/sql/driver" diff --git a/core/services/keystore/keys/ethkey/address_test.go b/core/chains/evm/types/address_test.go similarity index 76% rename from core/services/keystore/keys/ethkey/address_test.go rename to core/chains/evm/types/address_test.go index 15b502d1785..e6e6a4f37c9 100644 --- a/core/services/keystore/keys/ethkey/address_test.go +++ b/core/chains/evm/types/address_test.go @@ -1,4 +1,4 @@ -package ethkey_test +package types_test import ( "encoding/json" @@ -8,13 +8,13 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/assert" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ethkey" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" ) func TestEIP55Address(t *testing.T) { t.Parallel() - address := ethkey.EIP55Address("0xa0788FC17B1dEe36f057c42B6F373A34B014687e") + address := types.EIP55Address("0xa0788FC17B1dEe36f057c42B6F373A34B014687e") assert.Equal(t, []byte{ 0xa0, 0x78, 0x8f, 0xc1, 0x7b, 0x1d, 0xee, 0x36, @@ -35,12 +35,12 @@ func TestEIP55Address(t *testing.T) { assert.Equal(t, "0xa0788FC17B1dEe36f057c42B6F373A34B014687e", address.String()) - zeroAddress := ethkey.EIP55Address("") + zeroAddress := types.EIP55Address("") err := json.Unmarshal([]byte(`"0xa0788FC17B1dEe36f057c42B6F373A34B014687e"`), &zeroAddress) assert.NoError(t, err) assert.Equal(t, "0xa0788FC17B1dEe36f057c42B6F373A34B014687e", zeroAddress.String()) - zeroAddress = ethkey.EIP55Address("") + zeroAddress = types.EIP55Address("") err = zeroAddress.UnmarshalText([]byte("0xa0788FC17B1dEe36f057c42B6F373A34B014687e")) assert.NoError(t, err) assert.Equal(t, "0xa0788FC17B1dEe36f057c42B6F373A34B014687e", zeroAddress.String()) @@ -64,7 +64,7 @@ func TestValidateEIP55Address(t *testing.T) { for _, test := range tests { t.Run(test.name, func(t *testing.T) { - _, err := ethkey.NewEIP55Address(test.input) + _, err := types.NewEIP55Address(test.input) valid := err == nil assert.Equal(t, test.valid, valid) }) @@ -75,20 +75,20 @@ func TestEIP55AddressFromAddress(t *testing.T) { t.Parallel() addr := common.HexToAddress("0xa0788FC17B1dEe36f057c42B6F373A34B014687e") - eip55 := ethkey.EIP55AddressFromAddress(addr) + eip55 := types.EIP55AddressFromAddress(addr) assert.Equal(t, addr, eip55.Address()) } func TestEIP55Address_Scan_Value(t *testing.T) { t.Parallel() - eip55, err := ethkey.NewEIP55Address("0xa0788FC17B1dEe36f057c42B6F373A34B014687e") + eip55, err := types.NewEIP55Address("0xa0788FC17B1dEe36f057c42B6F373A34B014687e") assert.NoError(t, err) val, err := eip55.Value() assert.NoError(t, err) - var eip55New ethkey.EIP55Address + var eip55New types.EIP55Address err = eip55New.Scan(val) assert.NoError(t, err) @@ -98,15 +98,15 @@ func TestEIP55Address_Scan_Value(t *testing.T) { func TestEIP55AddressCollection_Scan_Value(t *testing.T) { t.Parallel() - collection := ethkey.EIP55AddressCollection{ - ethkey.EIP55Address("0xa0788FC17B1dEe36f057c42B6F373A34B0146111"), - ethkey.EIP55Address("0xa0788FC17B1dEe36f057c42B6F373A34B0146222"), + collection := types.EIP55AddressCollection{ + types.EIP55Address("0xa0788FC17B1dEe36f057c42B6F373A34B0146111"), + types.EIP55Address("0xa0788FC17B1dEe36f057c42B6F373A34B0146222"), } val, err := collection.Value() assert.NoError(t, err) - var collectionNew ethkey.EIP55AddressCollection + var collectionNew types.EIP55AddressCollection err = collectionNew.Scan(val) assert.NoError(t, err) @@ -116,9 +116,9 @@ func TestEIP55AddressCollection_Scan_Value(t *testing.T) { func TestEIP55Address_IsZero(t *testing.T) { t.Parallel() - eip55 := ethkey.EIP55AddressFromAddress(common.HexToAddress("0x0")) + eip55 := types.EIP55AddressFromAddress(common.HexToAddress("0x0")) assert.True(t, eip55.IsZero()) - eip55 = ethkey.EIP55AddressFromAddress(common.HexToAddress("0x1")) + eip55 = types.EIP55AddressFromAddress(common.HexToAddress("0x1")) assert.False(t, eip55.IsZero()) } diff --git a/core/chains/evm/types/head_test.go b/core/chains/evm/types/head_test.go new file mode 100644 index 00000000000..b4f1de25c6e --- /dev/null +++ b/core/chains/evm/types/head_test.go @@ -0,0 +1,51 @@ +package types + +import ( + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func TestHead_LatestFinalizedHead(t *testing.T) { + t.Parallel() + cases := []struct { + Name string + Head *Head + Finalized *Head + }{ + { + Name: "Empty chain returns nil on finalized", + Head: nil, + Finalized: nil, + }, + { + Name: "Chain without finalized returns nil", + Head: &Head{Parent: &Head{Parent: &Head{}}}, + Finalized: nil, + }, + { + Name: "Returns head if it's finalized", + Head: &Head{Number: 2, IsFinalized: true, Parent: &Head{Number: 1, IsFinalized: true}}, + Finalized: &Head{Number: 2}, + }, + { + Name: "Returns first block in chain if it's finalized", + Head: &Head{Number: 3, IsFinalized: false, Parent: &Head{Number: 2, IsFinalized: true, Parent: &Head{Number: 1, IsFinalized: true}}}, + Finalized: &Head{Number: 2}, + }, + } + + for _, tc := range cases { + t.Run(tc.Name, func(t *testing.T) { + actual := tc.Head.LatestFinalizedHead() + if tc.Finalized == nil { + assert.Nil(t, actual) + } else { + require.NotNil(t, actual) + assert.Equal(t, tc.Finalized.Number, actual.BlockNumber()) + } + }) + } + +} diff --git a/core/chains/evm/types/models.go b/core/chains/evm/types/models.go index 464eb901005..4aeaec511d1 100644 --- a/core/chains/evm/types/models.go +++ b/core/chains/evm/types/models.go @@ -2,6 +2,7 @@ package types import ( "bytes" + "database/sql" "database/sql/driver" "encoding/json" "fmt" @@ -17,13 +18,13 @@ import ( "github.com/ugorji/go/codec" "github.com/smartcontractkit/chainlink-common/pkg/utils/hex" + htrktypes "github.com/smartcontractkit/chainlink/v2/common/headtracker/types" commontypes "github.com/smartcontractkit/chainlink/v2/common/types" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/assets" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types/internal/blocks" "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/null" ) // Head represents a BlockNumber, BlockHash. @@ -31,7 +32,7 @@ type Head struct { ID uint64 Hash common.Hash Number int64 - L1BlockNumber null.Int64 + L1BlockNumber sql.NullInt64 ParentHash common.Hash Parent *Head EVMChainID *ubig.Big @@ -43,6 +44,7 @@ type Head struct { StateRoot common.Hash Difficulty *big.Int TotalDifficulty *big.Int + IsFinalized bool } var _ commontypes.Head[common.Hash] = &Head{} @@ -165,6 +167,14 @@ func (h *Head) ChainHashes() []common.Hash { return hashes } +func (h *Head) LatestFinalizedHead() commontypes.Head[common.Hash] { + for h != nil && !h.IsFinalized { + h = h.Parent + } + + return h +} + func (h *Head) ChainID() *big.Int { return h.EVMChainID.ToInt() } @@ -275,7 +285,7 @@ func (h *Head) UnmarshalJSON(bs []byte) error { h.Timestamp = time.Unix(int64(jsonHead.Timestamp), 0).UTC() h.BaseFeePerGas = assets.NewWei((*big.Int)(jsonHead.BaseFeePerGas)) if jsonHead.L1BlockNumber != nil { - h.L1BlockNumber = null.Int64From((*big.Int)(jsonHead.L1BlockNumber).Int64()) + h.L1BlockNumber = sql.NullInt64{Int64: (*big.Int)(jsonHead.L1BlockNumber).Int64(), Valid: true} } h.ReceiptsRoot = jsonHead.ReceiptsRoot h.TransactionsRoot = jsonHead.TransactionsRoot diff --git a/core/chains/evm/types/models_test.go b/core/chains/evm/types/models_test.go index 4fc986ae9d3..38dbfa76a0a 100644 --- a/core/chains/evm/types/models_test.go +++ b/core/chains/evm/types/models_test.go @@ -2,6 +2,7 @@ package types_test import ( "bytes" + "database/sql" "encoding/json" "fmt" "math" @@ -17,6 +18,7 @@ import ( "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-common/pkg/utils/hex" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/assets" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/txmgr" evmtypes "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" @@ -25,7 +27,6 @@ import ( "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/pgtest" - "github.com/smartcontractkit/chainlink/v2/core/null" ) func TestHead_NewHead(t *testing.T) { @@ -329,7 +330,20 @@ func TestHead_UnmarshalJSON(t *testing.T) { Number: 0x15156, ParentHash: common.HexToHash("0x923ad1e27c1d43cb2d2fb09e26d2502ca4b4914a2e0599161d279c6c06117d34"), Timestamp: time.Unix(0x60d0952d, 0).UTC(), - L1BlockNumber: null.Int64From(0x8652f9), + L1BlockNumber: sql.NullInt64{Int64: 0x8652f9, Valid: true}, + ReceiptsRoot: common.HexToHash("0x2c292672b8fc9d223647a2569e19721f0757c96a1421753a93e141f8e56cf504"), + TransactionsRoot: common.HexToHash("0x71448077f5ce420a8e24db62d4d58e8d8e6ad2c7e76318868e089d41f7e0faf3"), + StateRoot: common.HexToHash("0x0000000000000000000000000000000000000000000000000000000000000000"), + }, + }, + {"arbitrum_empty_l1BlockNumber", + `{"number":"0x15156","hash":"0x752dab43f7a2482db39227d46cd307623b26167841e2207e93e7566ab7ab7871","parentHash":"0x923ad1e27c1d43cb2d2fb09e26d2502ca4b4914a2e0599161d279c6c06117d34","mixHash":"0x0000000000000000000000000000000000000000000000000000000000000000","nonce":"0x0000000000000000","sha3Uncles":"0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347","logsBloom":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","transactionsRoot":"0x71448077f5ce420a8e24db62d4d58e8d8e6ad2c7e76318868e089d41f7e0faf3","stateRoot":"0x0000000000000000000000000000000000000000000000000000000000000000","receiptsRoot":"0x2c292672b8fc9d223647a2569e19721f0757c96a1421753a93e141f8e56cf504","miner":"0x0000000000000000000000000000000000000000","difficulty":"0x0","totalDifficulty":"0x0","extraData":"0x","size":"0x0","gasLimit":"0x11278208","gasUsed":"0x3d1fe9","timestamp":"0x60d0952d","transactions":["0xa1ea93556b93ed3b45cb24f21c8deb584e6a9049c35209242651bf3533c23b98","0xfc6593c45ba92351d17173aa1381e84734d252ab0169887783039212c4a41024","0x85ee9d04fd0ebb5f62191eeb53cb45d9c0945d43eba444c3548de2ac8421682f","0x50d120936473e5b75f6e04829ad4eeca7a1df7d3c5026ebb5d34af936a39b29c"],"uncles":[]}`, + evmtypes.Head{ + Hash: common.HexToHash("0x752dab43f7a2482db39227d46cd307623b26167841e2207e93e7566ab7ab7871"), + Number: 0x15156, + ParentHash: common.HexToHash("0x923ad1e27c1d43cb2d2fb09e26d2502ca4b4914a2e0599161d279c6c06117d34"), + Timestamp: time.Unix(0x60d0952d, 0).UTC(), + L1BlockNumber: sql.NullInt64{Int64: 0, Valid: false}, ReceiptsRoot: common.HexToHash("0x2c292672b8fc9d223647a2569e19721f0757c96a1421753a93e141f8e56cf504"), TransactionsRoot: common.HexToHash("0x71448077f5ce420a8e24db62d4d58e8d8e6ad2c7e76318868e089d41f7e0faf3"), StateRoot: common.HexToHash("0x0000000000000000000000000000000000000000000000000000000000000000"), diff --git a/core/chains/evm/types/nonce.go b/core/chains/evm/types/nonce.go index be295bdd2a9..0c3256dc545 100644 --- a/core/chains/evm/types/nonce.go +++ b/core/chains/evm/types/nonce.go @@ -17,7 +17,3 @@ func (n Nonce) Int64() int64 { func (n Nonce) String() string { return strconv.FormatInt(n.Int64(), 10) } - -func GenerateNextNonce(prev Nonce) Nonce { - return prev + 1 -} diff --git a/core/chains/legacyevm/chain.go b/core/chains/legacyevm/chain.go index 50e6d3914c6..e7aac4701c3 100644 --- a/core/chains/legacyevm/chain.go +++ b/core/chains/legacyevm/chain.go @@ -5,8 +5,6 @@ import ( "errors" "fmt" "math/big" - "net/url" - "time" gotoml "github.com/pelletier/go-toml/v2" "go.uber.org/multierr" @@ -15,19 +13,18 @@ import ( common "github.com/smartcontractkit/chainlink-common/pkg/chains" "github.com/smartcontractkit/chainlink-common/pkg/services" + "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" "github.com/smartcontractkit/chainlink-common/pkg/types" "github.com/smartcontractkit/chainlink-common/pkg/utils/mailbox" - commonclient "github.com/smartcontractkit/chainlink/v2/common/client" - commonconfig "github.com/smartcontractkit/chainlink/v2/common/config" "github.com/smartcontractkit/chainlink/v2/core/chains" - "github.com/smartcontractkit/chainlink/v2/core/chains/evm/client" evmclient "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/config/toml" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/gas" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/headtracker" httypes "github.com/smartcontractkit/chainlink/v2/core/chains/evm/headtracker/types" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/keystore" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/log" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/logpoller" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/monitor" @@ -36,7 +33,6 @@ import ( ubig "github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils/big" "github.com/smartcontractkit/chainlink/v2/core/config" "github.com/smartcontractkit/chainlink/v2/core/logger" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore" ) //go:generate mockery --quiet --name Chain --output ./mocks/ --case=underscore @@ -166,11 +162,12 @@ type ChainOpts struct { MailMon *mailbox.Monitor GasEstimator gas.EvmFeeEstimator - *sqlx.DB + SqlxDB *sqlx.DB // Deprecated: use DB instead + DB sqlutil.DataSource // TODO BCF-2513 remove test code from the API // Gen-functions are useful for dependency injection by tests - GenEthClient func(*big.Int) client.Client + GenEthClient func(*big.Int) evmclient.Client GenLogBroadcaster func(*big.Int) log.Broadcaster GenLogPoller func(*big.Int) logpoller.LogPoller GenHeadTracker func(*big.Int, httypes.HeadBroadcaster) httypes.HeadTracker @@ -187,6 +184,9 @@ func (o ChainOpts) Validate() error { if o.MailMon == nil { err = errors.Join(err, errors.New("nil MailMon")) } + if o.SqlxDB == nil { + err = errors.Join(err, errors.New("nil SqlxDB")) + } if o.DB == nil { err = errors.Join(err, errors.New("nil DB")) } @@ -218,19 +218,18 @@ func newChain(ctx context.Context, cfg *evmconfig.ChainScoped, nodes []*toml.Nod if !cfg.EVMRPCEnabled() { client = evmclient.NewNullClient(chainID, l) } else if opts.GenEthClient == nil { - client = newEthClientFromCfg(cfg.EVM().NodePool(), cfg.EVM().NodeNoNewHeadsThreshold(), l, chainID, chainType, nodes) + client = evmclient.NewEvmClient(cfg.EVM().NodePool(), cfg.EVM().NodeNoNewHeadsThreshold(), l, chainID, chainType, nodes) } else { client = opts.GenEthClient(chainID) } - db := opts.DB headBroadcaster := headtracker.NewHeadBroadcaster(l) headSaver := headtracker.NullSaver var headTracker httypes.HeadTracker if !cfg.EVMRPCEnabled() { headTracker = headtracker.NullTracker } else if opts.GenHeadTracker == nil { - orm := headtracker.NewORM(db, l, cfg.Database(), *chainID) + orm := headtracker.NewORM(*chainID, opts.DB) headSaver = headtracker.NewHeadSaver(l, orm, cfg.EVM(), cfg.EVM().HeadTracker()) headTracker = headtracker.NewHeadTracker(l, client, cfg.EVM(), cfg.EVM().HeadTracker(), headBroadcaster, headSaver, opts.MailMon) } else { @@ -252,12 +251,12 @@ func newChain(ctx context.Context, cfg *evmconfig.ChainScoped, nodes []*toml.Nod LogPrunePageSize: int64(cfg.EVM().LogPrunePageSize()), BackupPollerBlockDelay: int64(cfg.EVM().BackupLogPollerBlockDelay()), } - logPoller = logpoller.NewLogPoller(logpoller.NewObservedORM(chainID, db, l, cfg.Database()), client, l, lpOpts) + logPoller = logpoller.NewLogPoller(logpoller.NewObservedORM(chainID, opts.DB, l), client, l, lpOpts) } } // note: gas estimator is started as a part of the txm - txm, gasEstimator, err := newEvmTxm(db, cfg.EVM(), cfg.EVMRPCEnabled(), cfg.Database(), cfg.Database().Listener(), client, l, logPoller, opts) + txm, gasEstimator, err := newEvmTxm(opts.SqlxDB, opts.DB, cfg.EVM(), cfg.EVMRPCEnabled(), cfg.Database(), cfg.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) } @@ -280,7 +279,7 @@ func newChain(ctx context.Context, cfg *evmconfig.ChainScoped, nodes []*toml.Nod if !cfg.EVMRPCEnabled() { logBroadcaster = &log.NullBroadcaster{ErrMsg: fmt.Sprintf("Ethereum is disabled for chain %d", chainID)} } else if opts.GenLogBroadcaster == nil { - logORM := log.NewORM(db, l, cfg.Database(), *chainID) + logORM := log.NewORM(opts.SqlxDB, l, cfg.Database(), *chainID) logBroadcaster = log.NewBroadcaster(logORM, client, cfg.EVM(), l, highestSeenHead, opts.MailMon) } else { logBroadcaster = opts.GenLogBroadcaster(chainID) @@ -468,26 +467,3 @@ func (c *chain) HeadTracker() httypes.HeadTracker { return c.headTracker func (c *chain) Logger() logger.Logger { return c.logger } func (c *chain) BalanceMonitor() monitor.BalanceMonitor { return c.balanceMonitor } func (c *chain) GasEstimator() gas.EvmFeeEstimator { return c.gasEstimator } - -func newEthClientFromCfg(cfg evmconfig.NodePool, noNewHeadsThreshold time.Duration, lggr logger.Logger, chainID *big.Int, chainType commonconfig.ChainType, nodes []*toml.Node) evmclient.Client { - var empty url.URL - var primaries []commonclient.Node[*big.Int, *evmtypes.Head, evmclient.RPCClient] - var sendonlys []commonclient.SendOnlyNode[*big.Int, evmclient.RPCClient] - for i, node := range nodes { - if node.SendOnly != nil && *node.SendOnly { - rpc := evmclient.NewRPCClient(lggr, empty, (*url.URL)(node.HTTPURL), *node.Name, int32(i), chainID, - commonclient.Secondary) - sendonly := commonclient.NewSendOnlyNode[*big.Int, evmclient.RPCClient](lggr, (url.URL)(*node.HTTPURL), - *node.Name, chainID, rpc) - sendonlys = append(sendonlys, sendonly) - } else { - rpc := evmclient.NewRPCClient(lggr, (url.URL)(*node.WSURL), (*url.URL)(node.HTTPURL), *node.Name, int32(i), - chainID, commonclient.Primary) - primaryNode := commonclient.NewNode[*big.Int, *evmtypes.Head, evmclient.RPCClient](cfg, noNewHeadsThreshold, - lggr, (url.URL)(*node.WSURL), (*url.URL)(node.HTTPURL), *node.Name, int32(i), chainID, *node.Order, - rpc, "EVM") - primaries = append(primaries, primaryNode) - } - } - return evmclient.NewChainClient(lggr, cfg.SelectionMode(), cfg.LeaseDuration(), noNewHeadsThreshold, primaries, sendonlys, chainID, chainType) -} diff --git a/core/chains/legacyevm/chain_test.go b/core/chains/legacyevm/chain_test.go index e639db6e7cc..5dd7eb1c6ed 100644 --- a/core/chains/legacyevm/chain_test.go +++ b/core/chains/legacyevm/chain_test.go @@ -65,6 +65,7 @@ func TestChainOpts_Validate(t *testing.T) { o := legacyevm.ChainOpts{ AppConfig: tt.fields.AppConfig, MailMon: tt.fields.MailMon, + SqlxDB: tt.fields.DB, DB: tt.fields.DB, } if err := o.Validate(); (err != nil) != tt.wantErr { diff --git a/core/chains/legacyevm/evm_txm.go b/core/chains/legacyevm/evm_txm.go index 1606ea1b244..c4959b78a47 100644 --- a/core/chains/legacyevm/evm_txm.go +++ b/core/chains/legacyevm/evm_txm.go @@ -5,6 +5,7 @@ import ( "github.com/jmoiron/sqlx" + "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" evmclient "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" @@ -14,7 +15,8 @@ import ( ) func newEvmTxm( - db *sqlx.DB, + sqlxDB *sqlx.DB, + db sqlutil.DataSource, cfg evmconfig.EVM, evmRPCEnabled bool, databaseConfig txmgr.DatabaseConfig, @@ -51,6 +53,7 @@ func newEvmTxm( if opts.GenTxManager == nil { txm, err = txmgr.NewTxm( + sqlxDB, db, cfg, txmgr.NewEvmTxmFeeConfig(cfg.GasEstimator()), diff --git a/core/cmd/app.go b/core/cmd/app.go index 8e61380156c..27757ae4d24 100644 --- a/core/cmd/app.go +++ b/core/cmd/app.go @@ -1,11 +1,13 @@ package cmd import ( + "cmp" "fmt" "net/url" "os" "path/filepath" "regexp" + "slices" "github.com/pkg/errors" "github.com/urfave/cli" @@ -309,6 +311,14 @@ func NewApp(s *Shell) *cli.App { Usage: "Commands for managing forwarder addresses.", Subcommands: initFowardersSubCmds(s), }, + { + Name: "help-all", + Usage: "Shows a list of all commands and sub-commands", + Action: func(c *cli.Context) error { + printCommands("", c.App.Commands) + return nil + }, + }, }...) return app } @@ -327,3 +337,18 @@ func initServerConfig(opts *chainlink.GeneralConfigOpts, configFiles []string, s } return opts.New() } + +func printCommands(parent string, cs cli.Commands) { + slices.SortFunc(cs, func(a, b cli.Command) int { + return cmp.Compare(a.Name, b.Name) + }) + for i := range cs { + c := cs[i] + name := c.Name + if parent != "" { + name = parent + " " + name + } + fmt.Printf("%s # %s\n", name, c.Usage) + printCommands(name, c.Subcommands) + } +} diff --git a/core/cmd/ocr2vrf_configure_commands.go b/core/cmd/ocr2vrf_configure_commands.go index 906c27374c8..1f9e3f0bc98 100644 --- a/core/cmd/ocr2vrf_configure_commands.go +++ b/core/cmd/ocr2vrf_configure_commands.go @@ -209,7 +209,7 @@ func (s *Shell) ConfigureOCR2VRFNode(c *cli.Context, owner *bind.TransactOpts, e if err != nil { return nil, err } - err = s.authorizeForwarder(c, ldb.DB(), lggr, chainID, ec, owner, sendingKeysAddresses) + err = s.authorizeForwarder(c, ldb.DB(), chainID, ec, owner, sendingKeysAddresses) if err != nil { return nil, err } @@ -319,7 +319,7 @@ func (s *Shell) appendForwarders(ctx context.Context, chainID int64, ks keystore return sendingKeys, sendingKeysAddresses, nil } -func (s *Shell) authorizeForwarder(c *cli.Context, db *sqlx.DB, lggr logger.Logger, chainID int64, ec *ethclient.Client, owner *bind.TransactOpts, sendingKeysAddresses []common.Address) error { +func (s *Shell) authorizeForwarder(c *cli.Context, db *sqlx.DB, chainID int64, ec *ethclient.Client, owner *bind.TransactOpts, sendingKeysAddresses []common.Address) error { ctx := s.ctx() // Replace the transmitter ID with the forwarder address. forwarderAddress := c.String("forwarder-address") @@ -342,8 +342,8 @@ func (s *Shell) authorizeForwarder(c *cli.Context, db *sqlx.DB, lggr logger.Logg } // Create forwarder for management in forwarder_manager.go. - orm := forwarders.NewORM(db, lggr, s.Config.Database()) - _, err = orm.CreateForwarder(common.HexToAddress(forwarderAddress), *ubig.NewI(chainID)) + orm := forwarders.NewORM(db) + _, err = orm.CreateForwarder(ctx, common.HexToAddress(forwarderAddress), *ubig.NewI(chainID)) if err != nil { return err } diff --git a/core/cmd/shell.go b/core/cmd/shell.go index 5ca938b1b40..7662ef5d781 100644 --- a/core/cmd/shell.go +++ b/core/cmd/shell.go @@ -33,7 +33,9 @@ import ( "github.com/jmoiron/sqlx" "github.com/smartcontractkit/chainlink-common/pkg/loop" + "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" "github.com/smartcontractkit/chainlink-common/pkg/utils/mailbox" + "github.com/smartcontractkit/chainlink/v2/core/services/pg" "github.com/smartcontractkit/chainlink/v2/core/build" "github.com/smartcontractkit/chainlink/v2/core/chains/legacyevm" @@ -143,7 +145,7 @@ type AppFactory interface { type ChainlinkAppFactory struct{} // NewApplication returns a new instance of the node with the given config. -func (n ChainlinkAppFactory) NewApplication(ctx context.Context, cfg chainlink.GeneralConfig, appLggr logger.Logger, db *sqlx.DB) (app chainlink.Application, err error) { +func (n ChainlinkAppFactory) NewApplication(ctx context.Context, cfg chainlink.GeneralConfig, appLggr logger.Logger, sqlxDB *sqlx.DB) (app chainlink.Application, err error) { err = initGlobals(cfg.Prometheus(), cfg.Tracing(), appLggr) if err != nil { appLggr.Errorf("Failed to initialize globals: %v", err) @@ -154,12 +156,14 @@ func (n ChainlinkAppFactory) NewApplication(ctx context.Context, cfg chainlink.G return nil, err } - err = handleNodeVersioning(ctx, db, appLggr, cfg.RootDir(), cfg.Database(), cfg.WebServer().HTTPPort()) + db := sqlutil.WrapDataSource(sqlxDB, appLggr, sqlutil.TimeoutHook(pg.DefaultQueryTimeout), sqlutil.MonitorHook(cfg.Database().LogSQL)) + + err = handleNodeVersioning(ctx, sqlxDB, appLggr, cfg.RootDir(), cfg.Database(), cfg.WebServer().HTTPPort()) if err != nil { return nil, err } - keyStore := keystore.New(db, utils.GetScryptParams(cfg), appLggr, cfg.Database()) + keyStore := keystore.New(sqlxDB, utils.GetScryptParams(cfg), appLggr, cfg.Database()) mailMon := mailbox.NewMonitor(cfg.AppID().String(), appLggr.Named("Mailbox")) loopRegistry := plugins.NewLoopRegistry(appLggr, cfg.Tracing()) @@ -180,7 +184,7 @@ func (n ChainlinkAppFactory) NewApplication(ctx context.Context, cfg chainlink.G evmFactoryCfg := chainlink.EVMFactoryConfig{ CSAETHKeystore: keyStore, - ChainOpts: legacyevm.ChainOpts{AppConfig: cfg, MailMon: mailMon, DB: db}, + ChainOpts: legacyevm.ChainOpts{AppConfig: cfg, MailMon: mailMon, SqlxDB: sqlxDB, DB: sqlxDB}, } // evm always enabled for backward compatibility // TODO BCF-2510 this needs to change in order to clear the path for EVM extraction @@ -190,7 +194,7 @@ func (n ChainlinkAppFactory) NewApplication(ctx context.Context, cfg chainlink.G cosmosCfg := chainlink.CosmosFactoryConfig{ Keystore: keyStore.Cosmos(), TOMLConfigs: cfg.CosmosConfigs(), - DB: db, + DB: sqlxDB, QConfig: cfg.Database(), } initOps = append(initOps, chainlink.InitCosmos(ctx, relayerFactory, cosmosCfg)) @@ -224,10 +228,11 @@ func (n ChainlinkAppFactory) NewApplication(ctx context.Context, cfg chainlink.G restrictedClient := clhttp.NewRestrictedHTTPClient(cfg.Database(), appLggr) unrestrictedClient := clhttp.NewUnrestrictedHTTPClient() - externalInitiatorManager := webhook.NewExternalInitiatorManager(db, unrestrictedClient, appLggr, cfg.Database()) + externalInitiatorManager := webhook.NewExternalInitiatorManager(sqlxDB, unrestrictedClient, appLggr, cfg.Database()) return chainlink.NewApplication(chainlink.ApplicationOpts{ Config: cfg, - SqlxDB: db, + SqlxDB: sqlxDB, + DB: db, KeyStore: keyStore, RelayerChainInteroperators: relayChainInterops, MailMon: mailMon, diff --git a/core/cmd/shell_local.go b/core/cmd/shell_local.go index 7e03fe719e1..8391e3bc70b 100644 --- a/core/cmd/shell_local.go +++ b/core/cmd/shell_local.go @@ -641,7 +641,7 @@ func (s *Shell) RebroadcastTransactions(c *cli.Context) (err error) { for i := int64(0); i < totalNonces; i++ { nonces[i] = evmtypes.Nonce(beginningNonce + i) } - err = ec.ForceRebroadcast(ctx, nonces, gas.EvmFee{Legacy: assets.NewWeiI(int64(gasPriceWei))}, address, uint32(overrideGasLimit)) + err = ec.ForceRebroadcast(ctx, nonces, gas.EvmFee{Legacy: assets.NewWeiI(int64(gasPriceWei))}, address, uint64(overrideGasLimit)) return s.errorOut(err) } diff --git a/core/cmd/shell_local_test.go b/core/cmd/shell_local_test.go index d6f4946dd9d..0dcf77d0f8e 100644 --- a/core/cmd/shell_local_test.go +++ b/core/cmd/shell_local_test.go @@ -91,6 +91,7 @@ func TestShell_RunNodeWithPasswords(t *testing.T) { ChainOpts: legacyevm.ChainOpts{ AppConfig: cfg, MailMon: &mailbox.Monitor{}, + SqlxDB: db, DB: db, }, } @@ -195,6 +196,7 @@ func TestShell_RunNodeWithAPICredentialsFile(t *testing.T) { ChainOpts: legacyevm.ChainOpts{ AppConfig: cfg, MailMon: &mailbox.Monitor{}, + SqlxDB: db, DB: db, }, } diff --git a/core/config/app_config.go b/core/config/app_config.go index 290e14dcc45..869477218db 100644 --- a/core/config/app_config.go +++ b/core/config/app_config.go @@ -35,6 +35,7 @@ type AppConfig interface { AuditLogger() AuditLogger AutoPprof() AutoPprof + Capabilities() Capabilities Database() Database Feature() Feature FluxMonitor() FluxMonitor diff --git a/core/config/capabilities_config.go b/core/config/capabilities_config.go new file mode 100644 index 00000000000..8cde986ccb7 --- /dev/null +++ b/core/config/capabilities_config.go @@ -0,0 +1,6 @@ +package config + +type Capabilities interface { + Peering() P2P + // NOTE: RegistrySyncer will need config with relay ID, chain ID and contract address when implemented +} diff --git a/core/config/docs/chains-evm.toml b/core/config/docs/chains-evm.toml index 5359fe4b22b..dcf2f6e688e 100644 --- a/core/config/docs/chains-evm.toml +++ b/core/config/docs/chains-evm.toml @@ -14,14 +14,16 @@ BlockBackfillDepth = 10 # Default # BlockBackfillSkip enables skipping of very long backfills. BlockBackfillSkip = false # Default # ChainType is automatically detected from chain ID. Set this to force a certain chain type regardless of chain ID. -# Available types: arbitrum, metis, optimismBedrock, xdai, celo, kroma, wemix, zksync, scroll +# Available types: `arbitrum`, `celo`, `gnosis`, `kroma`, `metis`, `optimismBedrock`, `scroll`, `wemix`, `zksync` +# +# `xdai` has been deprecated and will be removed in v2.13.0, use `gnosis` instead. ChainType = 'arbitrum' # Example -# FinalityDepth is the number of blocks after which an ethereum transaction is considered "final". Note that the default is automatically set based on chain ID so it should not be necessary to change this under normal operation. +# FinalityDepth is the number of blocks after which an ethereum transaction is considered "final". Note that the default is automatically set based on chain ID, so it should not be necessary to change this under normal operation. # BlocksConsideredFinal determines how deeply we look back to ensure that transactions are confirmed onto the longest chain # There is not a large performance penalty to setting this relatively high (on the order of hundreds) # It is practically limited by the number of heads we store in the database and should be less than this with a comfortable margin. # If a transaction is mined in a block more than this many blocks ago, and is reorged out, we will NOT retransmit this transaction and undefined behaviour can occur including gaps in the nonce sequence that require manual intervention to fix. -# Therefore this number represents a number of blocks we consider large enough that no re-org this deep will ever feasibly happen. +# Therefore, this number represents a number of blocks we consider large enough that no re-org this deep will ever feasibly happen. # # Special cases: # `FinalityDepth`=0 would imply that transactions can be final even before they were mined into a block. This is not supported. @@ -229,7 +231,7 @@ FeeCapDefault = '100 gwei' # Default TipCapDefault = '1 wei' # Default # TipCapMinimum is the minimum gas tip to use when submitting transactions to the blockchain. # -# Only applies to EIP-1559 transactions) +# (Only applies to EIP-1559 transactions) TipCapMin = '1 wei' # Default [EVM.GasEstimator.LimitJobType] @@ -267,7 +269,7 @@ CheckInclusionPercentile = 90 # Default # **ADVANCED** # EIP1559FeeCapBufferBlocks controls the buffer blocks to add to the current base fee when sending a transaction. By default, the gas bumping threshold + 1 block is used. # -# Only applies to EIP-1559 transactions) +# (Only applies to EIP-1559 transactions) EIP1559FeeCapBufferBlocks = 13 # Example # TransactionPercentile specifies gas price to choose. E.g. if the block history contains four transactions with gas prices `[100, 200, 300, 400]` then picking 25 for this number will give a value of 200. If the calculated gas price is higher than `GasPriceDefault` then the higher price will be used as the base price for new transactions. # @@ -286,8 +288,8 @@ TransactionPercentile = 60 # Default # # In addition to these settings, it log warnings if `EVM.NoNewHeadsThreshold` is exceeded without any new blocks being emitted. [EVM.HeadTracker] -# HistoryDepth tracks the top N block numbers to keep in the `heads` database table. -# Note that this can easily result in MORE than N records since in the case of re-orgs we keep multiple heads for a particular block height. +# HistoryDepth tracks the top N blocks on top of the latest finalized block to keep in the `heads` database table. +# Note that this can easily result in MORE than `N + finality depth` records since in the case of re-orgs we keep multiple heads for a particular block height. # This number should be at least as large as `FinalityDepth`. # There may be a small performance penalty to setting this to something very large (10,000+) HistoryDepth = 100 # Default diff --git a/core/config/docs/core.toml b/core/config/docs/core.toml index 95d59cca062..73d6ce86be2 100644 --- a/core/config/docs/core.toml +++ b/core/config/docs/core.toml @@ -280,6 +280,12 @@ ReaperThreshold = '24h' # Default # **ADVANCED** # ResultWriteQueueDepth controls how many writes will be buffered before subsequent writes are dropped, for jobs that write results asynchronously for performance reasons, such as OCR. ResultWriteQueueDepth = 100 # Default +# VerboseLogging enables detailed logging of pipeline execution steps. +# This is disabled by default because it increases log volume for pipeline +# runs, but can be useful for debugging failed runs without relying on the UI +# or database. Consider enabling this if you disabled run saving by setting +# MaxSuccessfulRuns to zero. +VerboseLogging = false # Default [JobPipeline.HTTPRequest] # DefaultTimeout defines the default timeout for HTTP requests made by `http` and `bridge` adapters. @@ -434,6 +440,47 @@ DeltaReconcile = '1m' # Default # but the host and port must be fully specified and cannot be empty. You can specify `0.0.0.0` (IPv4) or `::` (IPv6) to listen on all interfaces, but that is not recommended. ListenAddresses = ['1.2.3.4:9999', '[a52d:0:a88:1274::abcd]:1337'] # Example +[Capabilities.Peering] +# IncomingMessageBufferSize is the per-remote number of incoming +# messages to buffer. Any additional messages received on top of those +# already in the queue will be dropped. +IncomingMessageBufferSize = 10 # Default +# OutgoingMessageBufferSize is the per-remote number of outgoing +# messages to buffer. Any additional messages send on top of those +# already in the queue will displace the oldest. +# NOTE: OutgoingMessageBufferSize should be comfortably smaller than remote's +# IncomingMessageBufferSize to give the remote enough space to process +# them all in case we regained connection and now send a bunch at once +OutgoingMessageBufferSize = 10 # Default +# PeerID is the default peer ID to use for OCR jobs. If unspecified, uses the first available peer ID. +PeerID = '12D3KooWMoejJznyDuEk5aX6GvbjaG12UzeornPCBNzMRqdwrFJw' # Example +# TraceLogging enables trace level logging. +TraceLogging = false # Default + +[Capabilities.Peering.V2] +# Enabled enables P2P V2. +Enabled = false # Default +# AnnounceAddresses is the addresses the peer will advertise on the network in `host:port` form as accepted by the TCP version of Go’s `net.Dial`. +# The addresses should be reachable by other nodes on the network. When attempting to connect to another node, +# a node will attempt to dial all of the other node’s AnnounceAddresses in round-robin fashion. +AnnounceAddresses = ['1.2.3.4:9999', '[a52d:0:a88:1274::abcd]:1337'] # Example +# DefaultBootstrappers is the default bootstrapper peers for libocr's v2 networking stack. +# +# Oracle nodes typically only know each other’s PeerIDs, but not their hostnames, IP addresses, or ports. +# DefaultBootstrappers are special nodes that help other nodes discover each other’s `AnnounceAddresses` so they can communicate. +# Nodes continuously attempt to connect to bootstrappers configured in here. When a node wants to connect to another node +# (which it knows only by PeerID, but not by address), it discovers the other node’s AnnounceAddresses from communications +# received from its DefaultBootstrappers or other discovered nodes. To facilitate discovery, +# nodes will regularly broadcast signed announcements containing their PeerID and AnnounceAddresses. +DefaultBootstrappers = ['12D3KooWMHMRLQkgPbFSYHwD3NBuwtS1AmxhvKVUrcfyaGDASR4U@1.2.3.4:9999', '12D3KooWM55u5Swtpw9r8aFLQHEtw7HR4t44GdNs654ej5gRs2Dh@example.com:1234'] # Example +# DeltaDial controls how far apart Dial attempts are +DeltaDial = '15s' # Default +# DeltaReconcile controls how often a Reconcile message is sent to every peer. +DeltaReconcile = '1m' # Default +# ListenAddresses is the addresses the peer will listen to on the network in `host:port` form as accepted by `net.Listen()`, +# but the host and port must be fully specified and cannot be empty. You can specify `0.0.0.0` (IPv4) or `::` (IPv6) to listen on all interfaces, but that is not recommended. +ListenAddresses = ['1.2.3.4:9999', '[a52d:0:a88:1274::abcd]:1337'] # Example + [Keeper] # **ADVANCED** # DefaultTransactionQueueDepth controls the queue size for `DropOldestStrategy` in Keeper. Set to 0 to use `SendEvery` strategy instead. diff --git a/core/config/docs/docs_test.go b/core/config/docs/docs_test.go index 919113e1d93..35a78762e64 100644 --- a/core/config/docs/docs_test.go +++ b/core/config/docs/docs_test.go @@ -17,10 +17,10 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/config" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/assets" evmcfg "github.com/smartcontractkit/chainlink/v2/core/chains/evm/config/toml" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" "github.com/smartcontractkit/chainlink/v2/core/config/docs" "github.com/smartcontractkit/chainlink/v2/core/services/chainlink" "github.com/smartcontractkit/chainlink/v2/core/services/chainlink/cfgtest" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ethkey" ) func TestDoc(t *testing.T) { @@ -51,7 +51,7 @@ func TestDoc(t *testing.T) { // clean up KeySpecific as a special case require.Equal(t, 1, len(docDefaults.KeySpecific)) - ks := evmcfg.KeySpecific{Key: new(ethkey.EIP55Address), + ks := evmcfg.KeySpecific{Key: new(types.EIP55Address), GasEstimator: evmcfg.KeySpecificGasEstimator{PriceMax: new(assets.Wei)}} require.Equal(t, ks, docDefaults.KeySpecific[0]) docDefaults.KeySpecific = nil diff --git a/core/config/job_pipeline_config.go b/core/config/job_pipeline_config.go index d4a01dbed03..9b1fdc6d090 100644 --- a/core/config/job_pipeline_config.go +++ b/core/config/job_pipeline_config.go @@ -15,4 +15,5 @@ type JobPipeline interface { ReaperThreshold() time.Duration ResultWriteQueueDepth() uint64 ExternalInitiatorsEnabled() bool + VerboseLogging() bool } diff --git a/core/config/ocr_config.go b/core/config/ocr_config.go index 9f891511dd3..bde2142c846 100644 --- a/core/config/ocr_config.go +++ b/core/config/ocr_config.go @@ -3,7 +3,7 @@ package config import ( "time" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ethkey" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" ) // OCR is a subset of global config relevant to OCR v1. @@ -16,7 +16,7 @@ type OCR interface { KeyBundleID() (string, error) ObservationTimeout() time.Duration SimulateTransactions() bool - TransmitterAddress() (ethkey.EIP55Address, error) // OCR2 can support non-evm changes + TransmitterAddress() (types.EIP55Address, error) // OCR2 can support non-evm changes // OCR1 config, cannot override in jobs TraceLogging() bool DefaultTransactionQueueDepth() uint32 diff --git a/core/config/toml/types.go b/core/config/toml/types.go index 08ebf68f59b..ed52c21e34e 100644 --- a/core/config/toml/types.go +++ b/core/config/toml/types.go @@ -15,10 +15,11 @@ import ( ocrcommontypes "github.com/smartcontractkit/libocr/commontypes" commonconfig "github.com/smartcontractkit/chainlink-common/pkg/config" + "github.com/smartcontractkit/chainlink/v2/core/build" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" "github.com/smartcontractkit/chainlink/v2/core/config" "github.com/smartcontractkit/chainlink/v2/core/config/parse" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ethkey" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/p2pkey" "github.com/smartcontractkit/chainlink/v2/core/sessions" "github.com/smartcontractkit/chainlink/v2/core/store/dialects" @@ -55,6 +56,7 @@ type Core struct { Insecure Insecure `toml:",omitempty"` Tracing Tracing `toml:",omitempty"` Mercury Mercury `toml:",omitempty"` + Capabilities Capabilities `toml:",omitempty"` } // SetFrom updates c with any non-nil values from f. (currently TOML field only!) @@ -84,6 +86,7 @@ func (c *Core) SetFrom(f *Core) { c.P2P.setFrom(&f.P2P) c.Keeper.setFrom(&f.Keeper) c.Mercury.setFrom(&f.Mercury) + c.Capabilities.setFrom(&f.Capabilities) c.AutoPprof.setFrom(&f.AutoPprof) c.Pyroscope.setFrom(&f.Pyroscope) @@ -851,6 +854,7 @@ type JobPipeline struct { ReaperInterval *commonconfig.Duration ReaperThreshold *commonconfig.Duration ResultWriteQueueDepth *uint32 + VerboseLogging *bool HTTPRequest JobPipelineHTTPRequest `toml:",omitempty"` } @@ -874,6 +878,9 @@ func (j *JobPipeline) setFrom(f *JobPipeline) { if v := f.ResultWriteQueueDepth; v != nil { j.ResultWriteQueueDepth = v } + if v := f.VerboseLogging; v != nil { + j.VerboseLogging = v + } j.HTTPRequest.setFrom(&f.HTTPRequest) } @@ -974,7 +981,7 @@ type OCR struct { // Optional KeyBundleID *models.Sha256Hash SimulateTransactions *bool - TransmitterAddress *ethkey.EIP55Address + TransmitterAddress *types.EIP55Address CaptureEATelemetry *bool TraceLogging *bool } @@ -1386,6 +1393,14 @@ func (m *MercurySecrets) ValidateConfig() (err error) { return err } +type Capabilities struct { + Peering P2P `toml:",omitempty"` +} + +func (c *Capabilities) setFrom(f *Capabilities) { + c.Peering.setFrom(&f.Peering) +} + type ThresholdKeyShareSecrets struct { ThresholdKeyShare *models.Secret } diff --git a/core/gethwrappers/functions/generated/functions_allow_list/functions_allow_list.go b/core/gethwrappers/functions/generated/functions_allow_list/functions_allow_list.go index 023956b7314..2f98ae1623d 100644 --- a/core/gethwrappers/functions/generated/functions_allow_list/functions_allow_list.go +++ b/core/gethwrappers/functions/generated/functions_allow_list/functions_allow_list.go @@ -37,7 +37,7 @@ type TermsOfServiceAllowListConfig struct { var TermsOfServiceAllowListMetaData = &bind.MetaData{ ABI: "[{\"inputs\":[{\"components\":[{\"internalType\":\"bool\",\"name\":\"enabled\",\"type\":\"bool\"},{\"internalType\":\"address\",\"name\":\"signerPublicKey\",\"type\":\"address\"}],\"internalType\":\"structTermsOfServiceAllowListConfig\",\"name\":\"config\",\"type\":\"tuple\"},{\"internalType\":\"address[]\",\"name\":\"initialAllowedSenders\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"initialBlockedSenders\",\"type\":\"address[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"InvalidCalldata\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidSignature\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidUsage\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RecipientIsBlocked\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"}],\"name\":\"AddedAccess\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"}],\"name\":\"BlockedAccess\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"bool\",\"name\":\"enabled\",\"type\":\"bool\"},{\"internalType\":\"address\",\"name\":\"signerPublicKey\",\"type\":\"address\"}],\"indexed\":false,\"internalType\":\"structTermsOfServiceAllowListConfig\",\"name\":\"config\",\"type\":\"tuple\"}],\"name\":\"ConfigUpdated\",\"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\":\"user\",\"type\":\"address\"}],\"name\":\"UnblockedAccess\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"acceptor\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"}],\"name\":\"acceptTermsOfService\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"blockSender\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAllAllowedSenders\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAllowedSendersCount\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"allowedSenderIdxStart\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"allowedSenderIdxEnd\",\"type\":\"uint64\"}],\"name\":\"getAllowedSendersInRange\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"allowedSenders\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getBlockedSendersCount\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"blockedSenderIdxStart\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"blockedSenderIdxEnd\",\"type\":\"uint64\"}],\"name\":\"getBlockedSendersInRange\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"blockedSenders\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getConfig\",\"outputs\":[{\"components\":[{\"internalType\":\"bool\",\"name\":\"enabled\",\"type\":\"bool\"},{\"internalType\":\"address\",\"name\":\"signerPublicKey\",\"type\":\"address\"}],\"internalType\":\"structTermsOfServiceAllowListConfig\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"acceptor\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"}],\"name\":\"getMessage\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"hasAccess\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"isBlockedSender\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"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\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"unblockSender\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bool\",\"name\":\"enabled\",\"type\":\"bool\"},{\"internalType\":\"address\",\"name\":\"signerPublicKey\",\"type\":\"address\"}],\"internalType\":\"structTermsOfServiceAllowListConfig\",\"name\":\"config\",\"type\":\"tuple\"}],\"name\":\"updateConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x60806040523480156200001157600080fd5b5060405162001a3038038062001a308339810160408190526200003491620004d9565b33806000816200008b5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000be57620000be81620001d4565b505050620000d2836200027f60201b60201c565b60005b8251811015620001255762000111838281518110620000f857620000f8620005a8565b602002602001015160026200030660201b90919060201c565b506200011d81620005be565b9050620000d5565b5060005b8151811015620001ca57620001658282815181106200014c576200014c620005a8565b602002602001015160026200032660201b90919060201c565b156200018457604051638129bbcd60e01b815260040160405180910390fd5b620001b68282815181106200019d576200019d620005a8565b602002602001015160046200030660201b90919060201c565b50620001c281620005be565b905062000129565b50505050620005e6565b336001600160a01b038216036200022e5760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000082565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6200028962000349565b805160068054602080850180516001600160a81b0319909316941515610100600160a81b03198116959095176101006001600160a01b039485160217909355604080519485529251909116908301527f0d22b8a99f411b3dd338c961284f608489ca0dab9cdad17366a343c361bcf80a910160405180910390a150565b60006200031d836001600160a01b038416620003a7565b90505b92915050565b6001600160a01b038116600090815260018301602052604081205415156200031d565b6000546001600160a01b03163314620003a55760405162461bcd60e51b815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e657200000000000000000000604482015260640162000082565b565b6000818152600183016020526040812054620003f05750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915562000320565b50600062000320565b634e487b7160e01b600052604160045260246000fd5b80516001600160a01b03811681146200042757600080fd5b919050565b600082601f8301126200043e57600080fd5b815160206001600160401b03808311156200045d576200045d620003f9565b8260051b604051601f19603f83011681018181108482111715620004855762000485620003f9565b604052938452858101830193838101925087851115620004a457600080fd5b83870191505b84821015620004ce57620004be826200040f565b83529183019190830190620004aa565b979650505050505050565b60008060008385036080811215620004f057600080fd5b6040811215620004ff57600080fd5b50604080519081016001600160401b038082118383101715620005265762000526620003f9565b816040528651915081151582146200053d57600080fd5b8183526200054e602088016200040f565b60208401526040870151929550808311156200056957600080fd5b62000577888489016200042c565b945060608701519250808311156200058e57600080fd5b50506200059e868287016200042c565b9150509250925092565b634e487b7160e01b600052603260045260246000fd5b600060018201620005df57634e487b7160e01b600052601160045260246000fd5b5060010190565b61143a80620005f66000396000f3fe608060405234801561001057600080fd5b506004361061011b5760003560e01c8063817ef62e116100b2578063a39b06e311610081578063c3f909d411610066578063c3f909d4146102c3578063cc7ebf4914610322578063f2fde38b1461032a57600080fd5b8063a39b06e314610237578063a5e1d61d146102b057600080fd5b8063817ef62e146101e157806382184c7b146101e957806389f9a2c4146101fc5780638da5cb5b1461020f57600080fd5b80633908c4d4116100ee5780633908c4d41461018e57806347663acb146101a35780636b14daf8146101b657806379ba5097146101d957600080fd5b806301a05958146101205780630a8c9c2414610146578063181f5a771461016657806320229a861461017b575b600080fd5b61012861033d565b60405167ffffffffffffffff90911681526020015b60405180910390f35b610159610154366004610fd6565b61034e565b60405161013d9190611009565b61016e6104bc565b60405161013d9190611063565b610159610189366004610fd6565b6104d8565b6101a161019c3660046110f3565b61063e565b005b6101a16101b1366004611154565b6108e9565b6101c96101c436600461116f565b61094a565b604051901515815260200161013d565b6101a1610974565b610159610a76565b6101a16101f7366004611154565b610a82565b6101a161020a366004611221565b610ae8565b60005460405173ffffffffffffffffffffffffffffffffffffffff909116815260200161013d565b6102a26102453660046112aa565b6040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606084811b8216602084015283901b16603482015260009060480160405160208183030381529060405280519060200120905092915050565b60405190815260200161013d565b6101c96102be366004611154565b610ba3565b60408051808201825260008082526020918201528151808301835260065460ff8116151580835273ffffffffffffffffffffffffffffffffffffffff61010090920482169284019283528451908152915116918101919091520161013d565b610128610bc3565b6101a1610338366004611154565b610bcf565b60006103496004610be3565b905090565b60608167ffffffffffffffff168367ffffffffffffffff16118061038557506103776002610be3565b8267ffffffffffffffff1610155b8061039757506103956002610be3565b155b156103ce576040517f8129bbcd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6103d88383611303565b6103e3906001611324565b67ffffffffffffffff1667ffffffffffffffff811115610405576104056111f2565b60405190808252806020026020018201604052801561042e578160200160208202803683370190505b50905060005b61043e8484611303565b67ffffffffffffffff1681116104b45761046d6104658267ffffffffffffffff8716611345565b600290610bed565b82828151811061047f5761047f611358565b73ffffffffffffffffffffffffffffffffffffffff909216602092830291909101909101526104ad81611387565b9050610434565b505b92915050565b6040518060600160405280602c8152602001611402602c913981565b60608167ffffffffffffffff168367ffffffffffffffff16118061050f57506105016004610be3565b8267ffffffffffffffff1610155b80610521575061051f6004610be3565b155b15610558576040517f8129bbcd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6105628383611303565b61056d906001611324565b67ffffffffffffffff1667ffffffffffffffff81111561058f5761058f6111f2565b6040519080825280602002602001820160405280156105b8578160200160208202803683370190505b50905060005b6105c88484611303565b67ffffffffffffffff1681116104b4576105f76105ef8267ffffffffffffffff8716611345565b600490610bed565b82828151811061060957610609611358565b73ffffffffffffffffffffffffffffffffffffffff9092166020928302919091019091015261063781611387565b90506105be565b610649600485610bf9565b15610680576040517f62b7a34d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60408051606087811b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000009081166020808501919091529188901b16603483015282516028818403018152604890920190925280519101206000906040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c810191909152605c01604080518083037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe001815282825280516020918201206006546000855291840180845281905260ff8616928401929092526060830187905260808301869052909250610100900473ffffffffffffffffffffffffffffffffffffffff169060019060a0016020604051602081039080840390855afa1580156107b4573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff161461080b576040517f8baa579f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff861614158061085057503373ffffffffffffffffffffffffffffffffffffffff8716148015906108505750333b155b15610887576040517f381cfcbd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610892600286610c28565b156108e15760405173ffffffffffffffffffffffffffffffffffffffff861681527f87286ad1f399c8e82bf0c4ef4fcdc570ea2e1e92176e5c848b6413545b885db49060200160405180910390a15b505050505050565b6108f1610c4a565b6108fc600482610ccd565b5060405173ffffffffffffffffffffffffffffffffffffffff821681527f28bbd0761309a99e8fb5e5d02ada0b7b2db2e5357531ff5dbfc205c3f5b6592b906020015b60405180910390a150565b60065460009060ff1661095f5750600161096d565b61096a600285610bf9565b90505b9392505050565b60015473ffffffffffffffffffffffffffffffffffffffff1633146109fa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e65720000000000000000000060448201526064015b60405180910390fd5b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b60606103496002610cef565b610a8a610c4a565b610a95600282610ccd565b50610aa1600482610c28565b5060405173ffffffffffffffffffffffffffffffffffffffff821681527f337cd0f3f594112b6d830afb510072d3b08556b446514f73b8109162fd1151e19060200161093f565b610af0610c4a565b805160068054602080850180517fffffffffffffffffffffff0000000000000000000000000000000000000000009093169415157fffffffffffffffffffffff0000000000000000000000000000000000000000ff81169590951761010073ffffffffffffffffffffffffffffffffffffffff9485160217909355604080519485529251909116908301527f0d22b8a99f411b3dd338c961284f608489ca0dab9cdad17366a343c361bcf80a910161093f565b60065460009060ff16610bb857506000919050565b6104b6600483610bf9565b60006103496002610be3565b610bd7610c4a565b610be081610cfc565b50565b60006104b6825490565b600061096d8383610df1565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600183016020526040812054151561096d565b600061096d8373ffffffffffffffffffffffffffffffffffffffff8416610e1b565b60005473ffffffffffffffffffffffffffffffffffffffff163314610ccb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e65720000000000000000000060448201526064016109f1565b565b600061096d8373ffffffffffffffffffffffffffffffffffffffff8416610e6a565b6060600061096d83610f5d565b3373ffffffffffffffffffffffffffffffffffffffff821603610d7b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c6600000000000000000060448201526064016109f1565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6000826000018281548110610e0857610e08611358565b9060005260206000200154905092915050565b6000818152600183016020526040812054610e62575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556104b6565b5060006104b6565b60008181526001830160205260408120548015610f53576000610e8e6001836113bf565b8554909150600090610ea2906001906113bf565b9050818114610f07576000866000018281548110610ec257610ec2611358565b9060005260206000200154905080876000018481548110610ee557610ee5611358565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080610f1857610f186113d2565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506104b6565b60009150506104b6565b606081600001805480602002602001604051908101604052809291908181526020018280548015610fad57602002820191906000526020600020905b815481526020019060010190808311610f99575b50505050509050919050565b803567ffffffffffffffff81168114610fd157600080fd5b919050565b60008060408385031215610fe957600080fd5b610ff283610fb9565b915061100060208401610fb9565b90509250929050565b6020808252825182820181905260009190848201906040850190845b8181101561105757835173ffffffffffffffffffffffffffffffffffffffff1683529284019291840191600101611025565b50909695505050505050565b600060208083528351808285015260005b8181101561109057858101830151858201604001528201611074565b5060006040828601015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8301168501019250505092915050565b803573ffffffffffffffffffffffffffffffffffffffff81168114610fd157600080fd5b600080600080600060a0868803121561110b57600080fd5b611114866110cf565b9450611122602087016110cf565b93506040860135925060608601359150608086013560ff8116811461114657600080fd5b809150509295509295909350565b60006020828403121561116657600080fd5b61096d826110cf565b60008060006040848603121561118457600080fd5b61118d846110cf565b9250602084013567ffffffffffffffff808211156111aa57600080fd5b818601915086601f8301126111be57600080fd5b8135818111156111cd57600080fd5b8760208285010111156111df57600080fd5b6020830194508093505050509250925092565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60006040828403121561123357600080fd5b6040516040810181811067ffffffffffffffff8211171561127d577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040528235801515811461129057600080fd5b815261129e602084016110cf565b60208201529392505050565b600080604083850312156112bd57600080fd5b6112c6836110cf565b9150611000602084016110cf565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b67ffffffffffffffff8281168282160390808211156104b4576104b46112d4565b67ffffffffffffffff8181168382160190808211156104b4576104b46112d4565b808201808211156104b6576104b66112d4565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036113b8576113b86112d4565b5060010190565b818103818111156104b6576104b66112d4565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfe46756e6374696f6e73205465726d73206f66205365727669636520416c6c6f77204c6973742076312e312e30a164736f6c6343000813000a", + Bin: "0x60806040523480156200001157600080fd5b5060405162001a1e38038062001a1e8339810160408190526200003491620004d9565b33806000816200008b5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000be57620000be81620001d4565b505050620000d2836200027f60201b60201c565b60005b8251811015620001255762000111838281518110620000f857620000f8620005a8565b602002602001015160026200030660201b90919060201c565b506200011d81620005be565b9050620000d5565b5060005b8151811015620001ca57620001658282815181106200014c576200014c620005a8565b602002602001015160026200032660201b90919060201c565b156200018457604051638129bbcd60e01b815260040160405180910390fd5b620001b68282815181106200019d576200019d620005a8565b602002602001015160046200030660201b90919060201c565b50620001c281620005be565b905062000129565b50505050620005e6565b336001600160a01b038216036200022e5760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000082565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6200028962000349565b805160068054602080850180516001600160a81b0319909316941515610100600160a81b03198116959095176101006001600160a01b039485160217909355604080519485529251909116908301527f0d22b8a99f411b3dd338c961284f608489ca0dab9cdad17366a343c361bcf80a910160405180910390a150565b60006200031d836001600160a01b038416620003a7565b90505b92915050565b6001600160a01b038116600090815260018301602052604081205415156200031d565b6000546001600160a01b03163314620003a55760405162461bcd60e51b815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e657200000000000000000000604482015260640162000082565b565b6000818152600183016020526040812054620003f05750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915562000320565b50600062000320565b634e487b7160e01b600052604160045260246000fd5b80516001600160a01b03811681146200042757600080fd5b919050565b600082601f8301126200043e57600080fd5b815160206001600160401b03808311156200045d576200045d620003f9565b8260051b604051601f19603f83011681018181108482111715620004855762000485620003f9565b604052938452858101830193838101925087851115620004a457600080fd5b83870191505b84821015620004ce57620004be826200040f565b83529183019190830190620004aa565b979650505050505050565b60008060008385036080811215620004f057600080fd5b6040811215620004ff57600080fd5b50604080519081016001600160401b038082118383101715620005265762000526620003f9565b816040528651915081151582146200053d57600080fd5b8183526200054e602088016200040f565b60208401526040870151929550808311156200056957600080fd5b62000577888489016200042c565b945060608701519250808311156200058e57600080fd5b50506200059e868287016200042c565b9150509250925092565b634e487b7160e01b600052603260045260246000fd5b600060018201620005df57634e487b7160e01b600052601160045260246000fd5b5060010190565b61142880620005f66000396000f3fe608060405234801561001057600080fd5b506004361061011b5760003560e01c8063817ef62e116100b2578063a39b06e311610081578063c3f909d411610066578063c3f909d4146102c3578063cc7ebf4914610322578063f2fde38b1461032a57600080fd5b8063a39b06e314610237578063a5e1d61d146102b057600080fd5b8063817ef62e146101e157806382184c7b146101e957806389f9a2c4146101fc5780638da5cb5b1461020f57600080fd5b80633908c4d4116100ee5780633908c4d41461018e57806347663acb146101a35780636b14daf8146101b657806379ba5097146101d957600080fd5b806301a05958146101205780630a8c9c2414610146578063181f5a771461016657806320229a861461017b575b600080fd5b61012861033d565b60405167ffffffffffffffff90911681526020015b60405180910390f35b610159610154366004610fc4565b61034e565b60405161013d9190610ff7565b61016e6104aa565b60405161013d9190611051565b610159610189366004610fc4565b6104c6565b6101a161019c3660046110e1565b61062c565b005b6101a16101b1366004611142565b6108d7565b6101c96101c436600461115d565b610938565b604051901515815260200161013d565b6101a1610962565b610159610a64565b6101a16101f7366004611142565b610a70565b6101a161020a36600461120f565b610ad6565b60005460405173ffffffffffffffffffffffffffffffffffffffff909116815260200161013d565b6102a2610245366004611298565b6040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606084811b8216602084015283901b16603482015260009060480160405160208183030381529060405280519060200120905092915050565b60405190815260200161013d565b6101c96102be366004611142565b610b91565b60408051808201825260008082526020918201528151808301835260065460ff8116151580835273ffffffffffffffffffffffffffffffffffffffff61010090920482169284019283528451908152915116918101919091520161013d565b610128610bb1565b6101a1610338366004611142565b610bbd565b60006103496004610bd1565b905090565b60608167ffffffffffffffff168367ffffffffffffffff16118061038557506103776002610bd1565b8267ffffffffffffffff1610155b156103bc576040517f8129bbcd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6103c683836112f1565b6103d1906001611312565b67ffffffffffffffff1667ffffffffffffffff8111156103f3576103f36111e0565b60405190808252806020026020018201604052801561041c578160200160208202803683370190505b50905060005b61042c84846112f1565b67ffffffffffffffff1681116104a25761045b6104538267ffffffffffffffff8716611333565b600290610bdb565b82828151811061046d5761046d611346565b73ffffffffffffffffffffffffffffffffffffffff9092166020928302919091019091015261049b81611375565b9050610422565b505b92915050565b6040518060600160405280602c81526020016113f0602c913981565b60608167ffffffffffffffff168367ffffffffffffffff1611806104fd57506104ef6004610bd1565b8267ffffffffffffffff1610155b8061050f575061050d6004610bd1565b155b15610546576040517f8129bbcd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61055083836112f1565b61055b906001611312565b67ffffffffffffffff1667ffffffffffffffff81111561057d5761057d6111e0565b6040519080825280602002602001820160405280156105a6578160200160208202803683370190505b50905060005b6105b684846112f1565b67ffffffffffffffff1681116104a2576105e56105dd8267ffffffffffffffff8716611333565b600490610bdb565b8282815181106105f7576105f7611346565b73ffffffffffffffffffffffffffffffffffffffff9092166020928302919091019091015261062581611375565b90506105ac565b610637600485610be7565b1561066e576040517f62b7a34d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60408051606087811b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000009081166020808501919091529188901b16603483015282516028818403018152604890920190925280519101206000906040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c810191909152605c01604080518083037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe001815282825280516020918201206006546000855291840180845281905260ff8616928401929092526060830187905260808301869052909250610100900473ffffffffffffffffffffffffffffffffffffffff169060019060a0016020604051602081039080840390855afa1580156107a2573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff16146107f9576040517f8baa579f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff861614158061083e57503373ffffffffffffffffffffffffffffffffffffffff87161480159061083e5750333b155b15610875576040517f381cfcbd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610880600286610c16565b156108cf5760405173ffffffffffffffffffffffffffffffffffffffff861681527f87286ad1f399c8e82bf0c4ef4fcdc570ea2e1e92176e5c848b6413545b885db49060200160405180910390a15b505050505050565b6108df610c38565b6108ea600482610cbb565b5060405173ffffffffffffffffffffffffffffffffffffffff821681527f28bbd0761309a99e8fb5e5d02ada0b7b2db2e5357531ff5dbfc205c3f5b6592b906020015b60405180910390a150565b60065460009060ff1661094d5750600161095b565b610958600285610be7565b90505b9392505050565b60015473ffffffffffffffffffffffffffffffffffffffff1633146109e8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e65720000000000000000000060448201526064015b60405180910390fd5b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b60606103496002610cdd565b610a78610c38565b610a83600282610cbb565b50610a8f600482610c16565b5060405173ffffffffffffffffffffffffffffffffffffffff821681527f337cd0f3f594112b6d830afb510072d3b08556b446514f73b8109162fd1151e19060200161092d565b610ade610c38565b805160068054602080850180517fffffffffffffffffffffff0000000000000000000000000000000000000000009093169415157fffffffffffffffffffffff0000000000000000000000000000000000000000ff81169590951761010073ffffffffffffffffffffffffffffffffffffffff9485160217909355604080519485529251909116908301527f0d22b8a99f411b3dd338c961284f608489ca0dab9cdad17366a343c361bcf80a910161092d565b60065460009060ff16610ba657506000919050565b6104a4600483610be7565b60006103496002610bd1565b610bc5610c38565b610bce81610cea565b50565b60006104a4825490565b600061095b8383610ddf565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600183016020526040812054151561095b565b600061095b8373ffffffffffffffffffffffffffffffffffffffff8416610e09565b60005473ffffffffffffffffffffffffffffffffffffffff163314610cb9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e65720000000000000000000060448201526064016109df565b565b600061095b8373ffffffffffffffffffffffffffffffffffffffff8416610e58565b6060600061095b83610f4b565b3373ffffffffffffffffffffffffffffffffffffffff821603610d69576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c6600000000000000000060448201526064016109df565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6000826000018281548110610df657610df6611346565b9060005260206000200154905092915050565b6000818152600183016020526040812054610e50575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556104a4565b5060006104a4565b60008181526001830160205260408120548015610f41576000610e7c6001836113ad565b8554909150600090610e90906001906113ad565b9050818114610ef5576000866000018281548110610eb057610eb0611346565b9060005260206000200154905080876000018481548110610ed357610ed3611346565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080610f0657610f066113c0565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506104a4565b60009150506104a4565b606081600001805480602002602001604051908101604052809291908181526020018280548015610f9b57602002820191906000526020600020905b815481526020019060010190808311610f87575b50505050509050919050565b803567ffffffffffffffff81168114610fbf57600080fd5b919050565b60008060408385031215610fd757600080fd5b610fe083610fa7565b9150610fee60208401610fa7565b90509250929050565b6020808252825182820181905260009190848201906040850190845b8181101561104557835173ffffffffffffffffffffffffffffffffffffffff1683529284019291840191600101611013565b50909695505050505050565b600060208083528351808285015260005b8181101561107e57858101830151858201604001528201611062565b5060006040828601015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8301168501019250505092915050565b803573ffffffffffffffffffffffffffffffffffffffff81168114610fbf57600080fd5b600080600080600060a086880312156110f957600080fd5b611102866110bd565b9450611110602087016110bd565b93506040860135925060608601359150608086013560ff8116811461113457600080fd5b809150509295509295909350565b60006020828403121561115457600080fd5b61095b826110bd565b60008060006040848603121561117257600080fd5b61117b846110bd565b9250602084013567ffffffffffffffff8082111561119857600080fd5b818601915086601f8301126111ac57600080fd5b8135818111156111bb57600080fd5b8760208285010111156111cd57600080fd5b6020830194508093505050509250925092565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60006040828403121561122157600080fd5b6040516040810181811067ffffffffffffffff8211171561126b577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040528235801515811461127e57600080fd5b815261128c602084016110bd565b60208201529392505050565b600080604083850312156112ab57600080fd5b6112b4836110bd565b9150610fee602084016110bd565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b67ffffffffffffffff8281168282160390808211156104a2576104a26112c2565b67ffffffffffffffff8181168382160190808211156104a2576104a26112c2565b808201808211156104a4576104a46112c2565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036113a6576113a66112c2565b5060010190565b818103818111156104a4576104a46112c2565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfe46756e6374696f6e73205465726d73206f66205365727669636520416c6c6f77204c6973742076312e312e30a164736f6c6343000813000a", } var TermsOfServiceAllowListABI = TermsOfServiceAllowListMetaData.ABI diff --git a/core/gethwrappers/functions/generated/functions_coordinator/functions_coordinator.go b/core/gethwrappers/functions/generated/functions_coordinator/functions_coordinator.go index 6099c541c69..286cb1befd6 100644 --- a/core/gethwrappers/functions/generated/functions_coordinator/functions_coordinator.go +++ b/core/gethwrappers/functions/generated/functions_coordinator/functions_coordinator.go @@ -75,7 +75,7 @@ type FunctionsResponseRequestMeta struct { var FunctionsCoordinatorMetaData = &bind.MetaData{ ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"router\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint32\",\"name\":\"fulfillmentGasPriceOverEstimationBP\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"feedStalenessSeconds\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"gasOverheadBeforeCallback\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"gasOverheadAfterCallback\",\"type\":\"uint32\"},{\"internalType\":\"uint40\",\"name\":\"minimumEstimateGasPriceWei\",\"type\":\"uint40\"},{\"internalType\":\"uint16\",\"name\":\"maxSupportedRequestDataVersion\",\"type\":\"uint16\"},{\"internalType\":\"uint64\",\"name\":\"fallbackUsdPerUnitLink\",\"type\":\"uint64\"},{\"internalType\":\"uint8\",\"name\":\"fallbackUsdPerUnitLinkDecimals\",\"type\":\"uint8\"},{\"internalType\":\"uint224\",\"name\":\"fallbackNativePerUnitLink\",\"type\":\"uint224\"},{\"internalType\":\"uint32\",\"name\":\"requestTimeoutSeconds\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"donFeeCentsUsd\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"operationFeeCentsUsd\",\"type\":\"uint16\"}],\"internalType\":\"structFunctionsBillingConfig\",\"name\":\"config\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"linkToNativeFeed\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"linkToUsdFeed\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"EmptyPublicKey\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InconsistentReportData\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficientBalance\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidCalldata\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"message\",\"type\":\"string\"}],\"name\":\"InvalidConfig\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"int256\",\"name\":\"linkWei\",\"type\":\"int256\"}],\"name\":\"InvalidLinkWeiPrice\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidSubscription\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"int256\",\"name\":\"usdLink\",\"type\":\"int256\"}],\"name\":\"InvalidUsdLinkPrice\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"MustBeSubOwner\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NoTransmittersSet\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableByRouter\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableByRouterOwner\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PaymentTooLarge\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"message\",\"type\":\"string\"}],\"name\":\"ReportInvalid\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RouterMustBeSet\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnauthorizedPublicKeyChange\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnauthorizedSender\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnsupportedRequestDataVersion\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"requestId\",\"type\":\"bytes32\"}],\"name\":\"CommitmentDeleted\",\"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\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"fulfillmentGasPriceOverEstimationBP\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"feedStalenessSeconds\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"gasOverheadBeforeCallback\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"gasOverheadAfterCallback\",\"type\":\"uint32\"},{\"internalType\":\"uint40\",\"name\":\"minimumEstimateGasPriceWei\",\"type\":\"uint40\"},{\"internalType\":\"uint16\",\"name\":\"maxSupportedRequestDataVersion\",\"type\":\"uint16\"},{\"internalType\":\"uint64\",\"name\":\"fallbackUsdPerUnitLink\",\"type\":\"uint64\"},{\"internalType\":\"uint8\",\"name\":\"fallbackUsdPerUnitLinkDecimals\",\"type\":\"uint8\"},{\"internalType\":\"uint224\",\"name\":\"fallbackNativePerUnitLink\",\"type\":\"uint224\"},{\"internalType\":\"uint32\",\"name\":\"requestTimeoutSeconds\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"donFeeCentsUsd\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"operationFeeCentsUsd\",\"type\":\"uint16\"}],\"indexed\":false,\"internalType\":\"structFunctionsBillingConfig\",\"name\":\"config\",\"type\":\"tuple\"}],\"name\":\"ConfigUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"requestId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"requestingContract\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"requestInitiator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"subscriptionId\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"subscriptionOwner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"dataVersion\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"flags\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"callbackGasLimit\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"requestId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"coordinator\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"estimatedTotalCostJuels\",\"type\":\"uint96\"},{\"internalType\":\"address\",\"name\":\"client\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"subscriptionId\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint72\",\"name\":\"adminFee\",\"type\":\"uint72\"},{\"internalType\":\"uint72\",\"name\":\"donFee\",\"type\":\"uint72\"},{\"internalType\":\"uint40\",\"name\":\"gasOverheadBeforeCallback\",\"type\":\"uint40\"},{\"internalType\":\"uint40\",\"name\":\"gasOverheadAfterCallback\",\"type\":\"uint40\"},{\"internalType\":\"uint32\",\"name\":\"timeoutTimestamp\",\"type\":\"uint32\"}],\"indexed\":false,\"internalType\":\"structFunctionsResponse.Commitment\",\"name\":\"commitment\",\"type\":\"tuple\"}],\"name\":\"OracleRequest\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"requestId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"transmitter\",\"type\":\"address\"}],\"name\":\"OracleResponse\",\"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\":\"bytes32\",\"name\":\"requestId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"juelsPerGas\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"l1FeeShareWei\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"callbackCostJuels\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint72\",\"name\":\"donFeeJuels\",\"type\":\"uint72\"},{\"indexed\":false,\"internalType\":\"uint72\",\"name\":\"adminFeeJuels\",\"type\":\"uint72\"},{\"indexed\":false,\"internalType\":\"uint72\",\"name\":\"operationFeeJuels\",\"type\":\"uint72\"}],\"name\":\"RequestBilled\",\"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\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"requestId\",\"type\":\"bytes32\"}],\"name\":\"deleteCommitment\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"subscriptionId\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"uint32\",\"name\":\"callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"gasPriceWei\",\"type\":\"uint256\"}],\"name\":\"estimateCost\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAdminFeeJuels\",\"outputs\":[{\"internalType\":\"uint72\",\"name\":\"\",\"type\":\"uint72\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getConfig\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"fulfillmentGasPriceOverEstimationBP\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"feedStalenessSeconds\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"gasOverheadBeforeCallback\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"gasOverheadAfterCallback\",\"type\":\"uint32\"},{\"internalType\":\"uint40\",\"name\":\"minimumEstimateGasPriceWei\",\"type\":\"uint40\"},{\"internalType\":\"uint16\",\"name\":\"maxSupportedRequestDataVersion\",\"type\":\"uint16\"},{\"internalType\":\"uint64\",\"name\":\"fallbackUsdPerUnitLink\",\"type\":\"uint64\"},{\"internalType\":\"uint8\",\"name\":\"fallbackUsdPerUnitLinkDecimals\",\"type\":\"uint8\"},{\"internalType\":\"uint224\",\"name\":\"fallbackNativePerUnitLink\",\"type\":\"uint224\"},{\"internalType\":\"uint32\",\"name\":\"requestTimeoutSeconds\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"donFeeCentsUsd\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"operationFeeCentsUsd\",\"type\":\"uint16\"}],\"internalType\":\"structFunctionsBillingConfig\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"getDONFeeJuels\",\"outputs\":[{\"internalType\":\"uint72\",\"name\":\"\",\"type\":\"uint72\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getDONPublicKey\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getOperationFeeJuels\",\"outputs\":[{\"internalType\":\"uint72\",\"name\":\"\",\"type\":\"uint72\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getThresholdPublicKey\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getUsdPerUnitLink\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getWeiPerUnitLink\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"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\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"oracleWithdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"oracleWithdrawAll\",\"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\":\"_onchainConfig\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"_offchainConfigVersion\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"_offchainConfig\",\"type\":\"bytes\"}],\"name\":\"setConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"donPublicKey\",\"type\":\"bytes\"}],\"name\":\"setDONPublicKey\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"thresholdPublicKey\",\"type\":\"bytes\"}],\"name\":\"setThresholdPublicKey\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"bytes32\",\"name\":\"flags\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"requestingContract\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"availableBalance\",\"type\":\"uint96\"},{\"internalType\":\"uint72\",\"name\":\"adminFee\",\"type\":\"uint72\"},{\"internalType\":\"uint64\",\"name\":\"subscriptionId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"initiatedRequests\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"dataVersion\",\"type\":\"uint16\"},{\"internalType\":\"uint64\",\"name\":\"completedRequests\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"subscriptionOwner\",\"type\":\"address\"}],\"internalType\":\"structFunctionsResponse.RequestMeta\",\"name\":\"request\",\"type\":\"tuple\"}],\"name\":\"startRequest\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"requestId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"coordinator\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"estimatedTotalCostJuels\",\"type\":\"uint96\"},{\"internalType\":\"address\",\"name\":\"client\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"subscriptionId\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint72\",\"name\":\"adminFee\",\"type\":\"uint72\"},{\"internalType\":\"uint72\",\"name\":\"donFee\",\"type\":\"uint72\"},{\"internalType\":\"uint40\",\"name\":\"gasOverheadBeforeCallback\",\"type\":\"uint40\"},{\"internalType\":\"uint40\",\"name\":\"gasOverheadAfterCallback\",\"type\":\"uint40\"},{\"internalType\":\"uint32\",\"name\":\"timeoutTimestamp\",\"type\":\"uint32\"}],\"internalType\":\"structFunctionsResponse.Commitment\",\"name\":\"commitment\",\"type\":\"tuple\"}],\"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\":\"report\",\"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\":\"transmitters\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"typeAndVersion\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"fulfillmentGasPriceOverEstimationBP\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"feedStalenessSeconds\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"gasOverheadBeforeCallback\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"gasOverheadAfterCallback\",\"type\":\"uint32\"},{\"internalType\":\"uint40\",\"name\":\"minimumEstimateGasPriceWei\",\"type\":\"uint40\"},{\"internalType\":\"uint16\",\"name\":\"maxSupportedRequestDataVersion\",\"type\":\"uint16\"},{\"internalType\":\"uint64\",\"name\":\"fallbackUsdPerUnitLink\",\"type\":\"uint64\"},{\"internalType\":\"uint8\",\"name\":\"fallbackUsdPerUnitLinkDecimals\",\"type\":\"uint8\"},{\"internalType\":\"uint224\",\"name\":\"fallbackNativePerUnitLink\",\"type\":\"uint224\"},{\"internalType\":\"uint32\",\"name\":\"requestTimeoutSeconds\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"donFeeCentsUsd\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"operationFeeCentsUsd\",\"type\":\"uint16\"}],\"internalType\":\"structFunctionsBillingConfig\",\"name\":\"config\",\"type\":\"tuple\"}],\"name\":\"updateConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x60a06040523480156200001157600080fd5b506040516200601f3803806200601f8339810160408190526200003491620004db565b83838383833380600081620000905760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000c357620000c3816200014e565b5050506001600160a01b038116620000ee57604051632530e88560e11b815260040160405180910390fd5b6001600160a01b03908116608052600c80546001600160601b03166c0100000000000000000000000085841602179055600d80546001600160a01b0319169183169190911790556200014083620001f9565b505050505050505062000742565b336001600160a01b03821603620001a85760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000087565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b620002036200039e565b80516008805460208401516040808601516060870151608088015160a089015160c08a015160e08b015160ff16600160f81b026001600160f81b036001600160401b03909216600160b81b02919091166001600160b81b0361ffff938416600160a81b0261ffff60a81b1964ffffffffff909616600160801b029590951666ffffffffffffff60801b1963ffffffff9788166c010000000000000000000000000263ffffffff60601b19998916680100000000000000000299909916600160401b600160801b03199b8916640100000000026001600160401b0319909d169e89169e909e179b909b17999099169b909b1795909517979097169590951717969096161792909217909255610100840151610120850151909316600160e01b026001600160e01b0390931692909217600955610140830151600a80546101608601518416620100000263ffffffff19919091169290931691909117919091179055517f2e2c8535dcc25459d519f2300c114d2d2128bf6399722d04eca078461a3bf33a906200039390839062000639565b60405180910390a150565b620003a8620003aa565b565b6000546001600160a01b03163314620003a85760405162461bcd60e51b815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e657200000000000000000000604482015260640162000087565b80516001600160a01b03811681146200041e57600080fd5b919050565b60405161018081016001600160401b03811182821017156200045557634e487b7160e01b600052604160045260246000fd5b60405290565b805163ffffffff811681146200041e57600080fd5b805164ffffffffff811681146200041e57600080fd5b805161ffff811681146200041e57600080fd5b80516001600160401b03811681146200041e57600080fd5b805160ff811681146200041e57600080fd5b80516001600160e01b03811681146200041e57600080fd5b6000806000808486036101e0811215620004f457600080fd5b620004ff8662000406565b945061018080601f19830112156200051657600080fd5b6200052062000423565b915062000530602088016200045b565b825262000540604088016200045b565b602083015262000553606088016200045b565b604083015262000566608088016200045b565b60608301526200057960a0880162000470565b60808301526200058c60c0880162000486565b60a08301526200059f60e0880162000499565b60c0830152610100620005b4818901620004b1565b60e0840152610120620005c9818a01620004c3565b828501526101409150620005df828a016200045b565b90840152610160620005f389820162000486565b8285015262000604838a0162000486565b90840152509093506200061d90506101a0860162000406565b91506200062e6101c0860162000406565b905092959194509250565b815163ffffffff1681526101808101602083015162000660602084018263ffffffff169052565b50604083015162000679604084018263ffffffff169052565b50606083015162000692606084018263ffffffff169052565b506080830151620006ac608084018264ffffffffff169052565b5060a0830151620006c360a084018261ffff169052565b5060c0830151620006df60c08401826001600160401b03169052565b5060e0830151620006f560e084018260ff169052565b50610100838101516001600160e01b0316908301526101208084015163ffffffff16908301526101408084015161ffff908116918401919091526101609384015116929091019190915290565b608051615897620007886000396000818161079c01528181610c7d01528181610f110152818161102701528181611b2d015281816129eb015261396901526158976000f3fe608060405234801561001057600080fd5b50600436106101a35760003560e01c80638da5cb5b116100ee578063d227d24511610097578063e4ddcea611610071578063e4ddcea6146105d5578063f2f22ef1146105eb578063f2fde38b146105f3578063f6ea41f61461060657600080fd5b8063d227d2451461058a578063d328a91e146105ba578063e3d0e712146105c257600080fd5b8063b1dc65a4116100c8578063b1dc65a414610396578063ba9c924d146103a9578063c3f909d4146103bc57600080fd5b80638da5cb5b1461032e578063a631571e14610356578063afcb95d71461037657600080fd5b80637d4807871161015057806381f1b9381161012a57806381f1b938146102a657806381ff7048146102ae57806385b214cf1461031b57600080fd5b80637d480787146102765780637f15e1661461027e578063814118341461029157600080fd5b806366316d8d1161018157806366316d8d1461023c5780637212762f1461024f57806379ba50971461026e57600080fd5b8063083a5466146101a8578063181f5a77146101bd578063626f458c1461020f575b600080fd5b6101bb6101b6366004614010565b61060e565b005b6101f96040518060400160405280601c81526020017f46756e6374696f6e7320436f6f7264696e61746f722076312e332e300000000081525081565b60405161020691906140c0565b60405180910390f35b61022261021d36600461422d565b610663565b60405168ffffffffffffffffff9091168152602001610206565b6101bb61024a3660046142b4565b6106a0565b610257610859565b6040805192835260ff909116602083015201610206565b6101bb610a6c565b6101bb610b69565b6101bb61028c366004614010565b610d69565b610299610db9565b604051610206919061433e565b6101f9610e28565b6102f860015460025463ffffffff74010000000000000000000000000000000000000000830481169378010000000000000000000000000000000000000000000000009093041691565b6040805163ffffffff948516815293909216602084015290820152606001610206565b6101bb610329366004614351565b610ef9565b60005460405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610206565b61036961036436600461436a565b610fb6565b60405161020691906144bf565b604080516001815260006020820181905291810191909152606001610206565b6101bb6103a4366004614513565b611247565b6101bb6103b736600461467e565b61185e565b61057d6040805161018081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e0810182905261010081018290526101208101829052610140810182905261016081019190915250604080516101808101825260085463ffffffff80821683526401000000008204811660208401526801000000000000000082048116938301939093526c01000000000000000000000000810483166060830152700100000000000000000000000000000000810464ffffffffff1660808301527501000000000000000000000000000000000000000000810461ffff90811660a084015277010000000000000000000000000000000000000000000000820467ffffffffffffffff1660c08401527f010000000000000000000000000000000000000000000000000000000000000090910460ff1660e08301526009547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff81166101008401527c01000000000000000000000000000000000000000000000000000000009004909216610120820152600a5480831661014083015262010000900490911661016082015290565b604051610206919061476a565b61059d610598366004614887565b611b29565b6040516bffffffffffffffffffffffff9091168152602001610206565b6101f9611c97565b6101bb6105d036600461498f565b611cee565b6105dd61286a565b604051908152602001610206565b6102226129ae565b6101bb610601366004614a5c565b6129d3565b6102226129e7565b610616612a78565b6000819003610651576040517f4f42be3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600f61065e828483614b0c565b505050565b600a5460009061069a9060649061067d9061ffff16612afb565b6106879190614c85565b6bffffffffffffffffffffffff16612b48565b92915050565b6106a8612be7565b806bffffffffffffffffffffffff166000036106e25750336000908152600b60205260409020546bffffffffffffffffffffffff1661073c565b336000908152600b60205260409020546bffffffffffffffffffffffff8083169116101561073c576040517ff4d678b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336000908152600b6020526040812080548392906107699084906bffffffffffffffffffffffff16614cb0565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055506107be7f000000000000000000000000000000000000000000000000000000000000000090565b6040517f66316d8d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84811660048301526bffffffffffffffffffffffff8416602483015291909116906366316d8d90604401600060405180830381600087803b15801561083d57600080fd5b505af1158015610851573d6000803e3d6000fd5b505050505050565b600080600080600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa1580156108cc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108f09190614cf6565b5093505092505080426109039190614d46565b600854640100000000900463ffffffff161080156109305750600854640100000000900463ffffffff1615155b1561098d57505060085477010000000000000000000000000000000000000000000000810467ffffffffffffffff16937f010000000000000000000000000000000000000000000000000000000000000090910460ff1692509050565b600082136109cf576040517f56b22ab8000000000000000000000000000000000000000000000000000000008152600481018390526024015b60405180910390fd5b600d54604080517f313ce5670000000000000000000000000000000000000000000000000000000081529051849273ffffffffffffffffffffffffffffffffffffffff169163313ce5679160048083019260209291908290030181865afa158015610a3e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a629190614d59565b9350935050509091565b60015473ffffffffffffffffffffffffffffffffffffffff163314610aed576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e65720000000000000000000060448201526064016109c6565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b610b71612d93565b610b79612be7565b6000610b83610db9565b905060005b8151811015610d65576000600b6000848481518110610ba957610ba9614d76565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff168252810191909152604001600020546bffffffffffffffffffffffff1690508015610d54576000600b6000858581518110610c0857610c08614d76565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550610c9f7f000000000000000000000000000000000000000000000000000000000000000090565b73ffffffffffffffffffffffffffffffffffffffff166366316d8d848481518110610ccc57610ccc614d76565b6020026020010151836040518363ffffffff1660e01b8152600401610d2192919073ffffffffffffffffffffffffffffffffffffffff9290921682526bffffffffffffffffffffffff16602082015260400190565b600060405180830381600087803b158015610d3b57600080fd5b505af1158015610d4f573d6000803e3d6000fd5b505050505b50610d5e81614da5565b9050610b88565b5050565b610d71612a78565b6000819003610dac576040517f4f42be3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600e61065e828483614b0c565b60606006805480602002602001604051908101604052809291908181526020018280548015610e1e57602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311610df3575b5050505050905090565b6060600f8054610e3790614a79565b9050600003610e72576040517f4f42be3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600f8054610e7f90614a79565b80601f0160208091040260200160405190810160405280929190818152602001828054610eab90614a79565b8015610e1e5780601f10610ecd57610100808354040283529160200191610e1e565b820191906000526020600020905b815481529060010190602001808311610edb57509395945050505050565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610f68576040517fc41a5b0900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008181526007602052604080822091909155517f8a4b97add3359bd6bcf5e82874363670eb5ad0f7615abddbd0ed0a3a98f0f41690610fab9083815260200190565b60405180910390a150565b6040805161016081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101829052610100810182905261012081018290526101408101919091523373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161461107e576040517fc41a5b0900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061109161108c84614dff565b612d9b565b90925090506110a66060840160408501614a5c565b825173ffffffffffffffffffffffffffffffffffffffff91909116907fbf50768ccf13bd0110ca6d53a9c4f1f3271abdd4c24a56878863ed25b20598ff326110f460c0880160a08901614eec565b61110661016089016101408a01614a5c565b6111108980614f09565b6111226101208c016101008d01614f6e565b60208c01356111386101008e0160e08f01614f89565b6040518061016001604052808e6000015181526020018e6020015173ffffffffffffffffffffffffffffffffffffffff1681526020018e604001516bffffffffffffffffffffffff1681526020018e6060015173ffffffffffffffffffffffffffffffffffffffff1681526020018e6080015167ffffffffffffffff1681526020018e60a0015163ffffffff1681526020018d68ffffffffffffffffff1681526020018e60e0015168ffffffffffffffffff1681526020018e610100015164ffffffffff1681526020018e610120015164ffffffffff1681526020018e610140015163ffffffff1681525060405161123899989796959493929190614fa6565b60405180910390a3505b919050565b600080611254898961314d565b915091508115611265575050611854565b604080518b3580825262ffffff6020808f0135600881901c9290921690840152909290917fb04e63db38c49950639fa09d29872f21f5d49d614f3a969d8adf3d4b52e41a62910160405180910390a16112c28b8b8b8b8b8b6132d6565b6003546000906002906112e09060ff8082169161010090041661505c565b6112ea9190615075565b6112f590600161505c565b60ff169050888114611363576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f77726f6e67206e756d626572206f66207369676e61747572657300000000000060448201526064016109c6565b8887146113f2576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f7265706f727420727320616e64207373206d757374206265206f66206571756160448201527f6c206c656e67746800000000000000000000000000000000000000000000000060648201526084016109c6565b3360009081526004602090815260408083208151808301909252805460ff8082168452929391929184019161010090910416600281111561143557611435615097565b600281111561144657611446615097565b905250905060028160200151600281111561146357611463615097565b141580156114ac57506006816000015160ff168154811061148657611486614d76565b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff163314155b15611513576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f756e617574686f72697a6564207472616e736d6974746572000000000000000060448201526064016109c6565b5050505061151f613faf565b60008a8a6040516115319291906150c6565b604051908190038120611548918e906020016150d6565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181528282528051602091820120838301909252600080845290830152915060005b898110156118445760006001848984602081106115b1576115b1614d76565b6115be91901a601b61505c565b8e8e868181106115d0576115d0614d76565b905060200201358d8d878181106115e9576115e9614d76565b9050602002013560405160008152602001604052604051611626949392919093845260ff9290921660208401526040830152606082015260800190565b6020604051602081039080840390855afa158015611648573d6000803e3d6000fd5b5050604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081015173ffffffffffffffffffffffffffffffffffffffff811660009081526004602090815290849020838501909452835460ff808216855292965092945084019161010090041660028111156116c8576116c8615097565b60028111156116d9576116d9615097565b90525092506001836020015160028111156116f6576116f6615097565b1461175d576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f61646472657373206e6f7420617574686f72697a656420746f207369676e000060448201526064016109c6565b8251600090869060ff16601f811061177757611777614d76565b602002015173ffffffffffffffffffffffffffffffffffffffff16146117f9576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f6e6f6e2d756e69717565207369676e617475726500000000000000000000000060448201526064016109c6565b8085846000015160ff16601f811061181357611813614d76565b73ffffffffffffffffffffffffffffffffffffffff90921660209290920201525061183d81614da5565b9050611592565b5050506118508261338d565b5050505b5050505050505050565b611866612d93565b80516008805460208401516040808601516060870151608088015160a089015160c08a015160e08b015160ff167f0100000000000000000000000000000000000000000000000000000000000000027effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff67ffffffffffffffff90921677010000000000000000000000000000000000000000000000029190911676ffffffffffffffffffffffffffffffffffffffffffffff61ffff9384167501000000000000000000000000000000000000000000027fffffffffffffffffff0000ffffffffffffffffffffffffffffffffffffffffff64ffffffffff90961670010000000000000000000000000000000002959095167fffffffffffffffffff00000000000000ffffffffffffffffffffffffffffffff63ffffffff9788166c01000000000000000000000000027fffffffffffffffffffffffffffffffff00000000ffffffffffffffffffffffff9989166801000000000000000002999099167fffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff9b8916640100000000027fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000909d169e89169e909e179b909b17999099169b909b17959095179790971695909517179690961617929092179092556101008401516101208501519093167c0100000000000000000000000000000000000000000000000000000000027bffffffffffffffffffffffffffffffffffffffffffffffffffffffff90931692909217600955610140830151600a8054610160860151841662010000027fffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000919091169290931691909117919091179055517f2e2c8535dcc25459d519f2300c114d2d2128bf6399722d04eca078461a3bf33a90610fab90839061476a565b60007f00000000000000000000000000000000000000000000000000000000000000006040517f10fc49c100000000000000000000000000000000000000000000000000000000815267ffffffffffffffff8816600482015263ffffffff8516602482015273ffffffffffffffffffffffffffffffffffffffff91909116906310fc49c19060440160006040518083038186803b158015611bc957600080fd5b505afa158015611bdd573d6000803e3d6000fd5b5050505066038d7ea4c68000821115611c22576040517f8129bbcd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000611c2c6129e7565b90506000611c6f87878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061066392505050565b90506000611c7b6129ae565b9050611c8a86868486856134dc565b9998505050505050505050565b6060600e8054611ca690614a79565b9050600003611ce1576040517f4f42be3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600e8054610e7f90614a79565b855185518560ff16601f831115611d61576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f746f6f206d616e79207369676e6572730000000000000000000000000000000060448201526064016109c6565b80600003611dcb576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f66206d75737420626520706f736974697665000000000000000000000000000060448201526064016109c6565b818314611e59576040517f89a61989000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f6f7261636c6520616464726573736573206f7574206f6620726567697374726160448201527f74696f6e0000000000000000000000000000000000000000000000000000000060648201526084016109c6565b611e648160036150ea565b8311611ecc576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f6661756c74792d6f7261636c65206620746f6f2068696768000000000000000060448201526064016109c6565b611ed4612a78565b6040805160c0810182528a8152602081018a905260ff89169181018290526060810188905267ffffffffffffffff8716608082015260a0810186905290611f1b9088613658565b600554156120d057600554600090611f3590600190614d46565b9050600060058281548110611f4c57611f4c614d76565b60009182526020822001546006805473ffffffffffffffffffffffffffffffffffffffff90921693509084908110611f8657611f86614d76565b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff85811684526004909252604080842080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00009081169091559290911680845292208054909116905560058054919250908061200657612006615101565b60008281526020902081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90810180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055019055600680548061206f5761206f615101565b60008281526020902081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90810180547fffffffffffffffffffffffff000000000000000000000000000000000000000016905501905550611f1b915050565b60005b815151811015612687578151805160009190839081106120f5576120f5614d76565b602002602001015173ffffffffffffffffffffffffffffffffffffffff160361217a576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f7369676e6572206d757374206e6f7420626520656d707479000000000000000060448201526064016109c6565b600073ffffffffffffffffffffffffffffffffffffffff16826020015182815181106121a8576121a8614d76565b602002602001015173ffffffffffffffffffffffffffffffffffffffff160361222d576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f7472616e736d6974746572206d757374206e6f7420626520656d70747900000060448201526064016109c6565b6000600460008460000151848151811061224957612249614d76565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff16825281019190915260400160002054610100900460ff16600281111561229357612293615097565b146122fa576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f7265706561746564207369676e6572206164647265737300000000000000000060448201526064016109c6565b6040805180820190915260ff8216815260016020820152825180516004916000918590811061232b5761232b614d76565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff168252818101929092526040016000208251815460ff9091167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0082168117835592840151919283917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000016176101008360028111156123cc576123cc615097565b0217905550600091506123dc9050565b60046000846020015184815181106123f6576123f6614d76565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff16825281019190915260400160002054610100900460ff16600281111561244057612440615097565b146124a7576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f7265706561746564207472616e736d697474657220616464726573730000000060448201526064016109c6565b6040805180820190915260ff8216815260208101600281525060046000846020015184815181106124da576124da614d76565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff168252818101929092526040016000208251815460ff9091167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0082168117835592840151919283917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000161761010083600281111561257b5761257b615097565b02179055505082518051600592508390811061259957612599614d76565b602090810291909101810151825460018101845560009384529282902090920180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909316929092179091558201518051600691908390811061261557612615614d76565b60209081029190910181015182546001810184556000938452919092200180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9092169190911790558061267f81614da5565b9150506120d3565b506040810151600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660ff909216919091179055600180547fffffffff00000000ffffffffffffffffffffffffffffffffffffffffffffffff8116780100000000000000000000000000000000000000000000000063ffffffff438116820292909217808555920481169291829160149161273f91849174010000000000000000000000000000000000000000900416615130565b92506101000a81548163ffffffff021916908363ffffffff16021790555061279e4630600160149054906101000a900463ffffffff1663ffffffff16856000015186602001518760400151886060015189608001518a60a00151613671565b600281905582518051600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1661010060ff9093169290920291909117905560015460208501516040808701516060880151608089015160a08a015193517f1591690b8638f5fb2dbec82ac741805ac5da8b45dc5263f4875b0496fdce4e0598612855988b9891977401000000000000000000000000000000000000000090920463ffffffff1696909591949193919261514d565b60405180910390a15050505050505050505050565b6000806000600c8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa1580156128da573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128fe9190614cf6565b5093505092505080426129119190614d46565b600854640100000000900463ffffffff1610801561293e5750600854640100000000900463ffffffff1615155b1561296b5750506009547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16919050565b600082136129a8576040517f43d4cf66000000000000000000000000000000000000000000000000000000008152600481018390526024016109c6565b50919050565b600a546000906129ce9060649061067d9062010000900461ffff16612afb565b905090565b6129db612a78565b6129e48161371c565b50565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16632a905ccc6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612a54573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129ce91906151ee565b60005473ffffffffffffffffffffffffffffffffffffffff163314612af9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e65720000000000000000000060448201526064016109c6565b565b6000806000612b08610859565b9092509050612b4082612b1c83601261505c565b612b2790600a61532b565b612b3190876150ea565b612b3b919061533a565b613811565b949350505050565b600068ffffffffffffffffff821115612be3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203760448201527f322062697473000000000000000000000000000000000000000000000000000060648201526084016109c6565b5090565b600c546bffffffffffffffffffffffff16600003612c0157565b6000612c0b610db9565b80519091506000819003612c4b576040517f30274b3a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600c54600090612c6a9083906bffffffffffffffffffffffff16614c85565b905060005b82811015612d355781600b6000868481518110612c8e57612c8e614d76565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282829054906101000a90046bffffffffffffffffffffffff16612cf6919061534e565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff16021790555080612d2e90614da5565b9050612c6f565b50612d408282615373565b600c8054600090612d609084906bffffffffffffffffffffffff16614cb0565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550505050565b612af9612a78565b6040805161016081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e081018290526101008101829052610120810182905261014081019190915260085461010083015160009161ffff7501000000000000000000000000000000000000000000909104811691161115612e59576040517fdada758700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000612e688460000151610663565b9050612e726129ae565b91506000612e8b8560e001513a848860800151876134dc565b9050806bffffffffffffffffffffffff1685606001516bffffffffffffffffffffffff161015612ee7576040517ff4d678b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600954600090612f1d907c0100000000000000000000000000000000000000000000000000000000900463ffffffff164261539b565b905060003087604001518860a001518960c001516001612f3d91906153ae565b8a5180516020918201206101008d015160e08e0151604051612ff198979695948c918c9132910173ffffffffffffffffffffffffffffffffffffffff9a8b168152988a1660208a015267ffffffffffffffff97881660408a0152959096166060880152608087019390935261ffff9190911660a086015263ffffffff90811660c08601526bffffffffffffffffffffffff9190911660e0850152919091166101008301529091166101208201526101400190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815282825280516020918201206101608401835280845230848301526bffffffffffffffffffffffff8716848401528a83015173ffffffffffffffffffffffffffffffffffffffff16606085015260a0808c015167ffffffffffffffff1660808087019190915260e0808e015163ffffffff90811693880193909352908d015168ffffffffffffffffff90811660c08801528a169086015260085468010000000000000000810482166101008701526c0100000000000000000000000090048116610120860152861661014085015291519298509092506130fd918891016144bf565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181528151602092830120600093845260079092529091205550929491935090915050565b60006131816040518060a0016040528060608152602001606081526020016060815260200160608152602001606081525090565b600080808080613193888a018a6154aa565b84519499509297509095509350915060ff168015806131b3575084518114155b806131bf575083518114155b806131cb575082518114155b806131d7575081518114155b1561323e576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f4669656c6473206d75737420626520657175616c206c656e677468000000000060448201526064016109c6565b60005b818110156132a45761327a87828151811061325e5761325e614d76565b6020026020010151600090815260076020526040902054151590565b6132a457613289600183614d46565b810361329457600198505b61329d81614da5565b9050613241565b50506040805160a0810182529586526020860194909452928401919091526060830152608082015290505b9250929050565b60006132e38260206150ea565b6132ee8560206150ea565b6132fa8861014461539b565b613304919061539b565b61330e919061539b565b61331990600061539b565b9050368114613384576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f63616c6c64617461206c656e677468206d69736d61746368000000000000000060448201526064016109c6565b50505050505050565b80515160ff1660005b8181101561065e57600061343f846000015183815181106133b9576133b9614d76565b6020026020010151856020015184815181106133d7576133d7614d76565b6020026020010151866040015185815181106133f5576133f5614d76565b60200260200101518760600151868151811061341357613413614d76565b60200260200101518860800151878151811061343157613431614d76565b6020026020010151886138af565b9050600081600681111561345557613455615097565b14806134725750600181600681111561347057613470615097565b145b156134cb57835180518390811061348b5761348b614d76565b60209081029190910181015160405133815290917fc708e0440951fd63499c0f7a73819b469ee5dd3ecc356c0ab4eb7f18389009d9910160405180910390a25b506134d581614da5565b9050613396565b600854600090700100000000000000000000000000000000900464ffffffffff1685101561352557600854700100000000000000000000000000000000900464ffffffffff1694505b6008546000906127109061353f9063ffffffff16886150ea565b613549919061533a565b613553908761539b565b600854909150600090889061358c9063ffffffff6c01000000000000000000000000820481169168010000000000000000900416615130565b6135969190615130565b63ffffffff16905060006135e06000368080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250613d7392505050565b90506000613601826135f285876150ea565b6135fc919061539b565b613eb5565b905060008668ffffffffffffffffff168868ffffffffffffffffff168a68ffffffffffffffffff16613633919061534e565b61363d919061534e565b9050613649818361534e565b9b9a5050505050505050505050565b6000613662610db9565b511115610d6557610d65612be7565b6000808a8a8a8a8a8a8a8a8a6040516020016136959998979695949392919061557c565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291905280516020909101207dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167e01000000000000000000000000000000000000000000000000000000000000179150509998505050505050505050565b3373ffffffffffffffffffffffffffffffffffffffff82160361379b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c6600000000000000000060448201526064016109c6565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b60006bffffffffffffffffffffffff821115612be3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203960448201527f362062697473000000000000000000000000000000000000000000000000000060648201526084016109c6565b600080848060200190518101906138c69190615648565b905060003a8261012001518361010001516138e19190615710565b64ffffffffff166138f291906150ea565b905060008460ff1661393a6000368080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250613d7392505050565b613944919061533a565b905060006139556135fc838561539b565b905060006139623a613eb5565b90506000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663330605298e8e868b60c0015168ffffffffffffffffff168c60e0015168ffffffffffffffffff168a6139d1919061534e565b6139db919061534e565b336040518061016001604052808f6000015181526020018f6020015173ffffffffffffffffffffffffffffffffffffffff1681526020018f604001516bffffffffffffffffffffffff1681526020018f6060015173ffffffffffffffffffffffffffffffffffffffff1681526020018f6080015167ffffffffffffffff1681526020018f60a0015163ffffffff168152602001600068ffffffffffffffffff1681526020018f60e0015168ffffffffffffffffff1681526020018f610100015164ffffffffff1681526020018f610120015164ffffffffff1681526020018f610140015163ffffffff168152506040518763ffffffff1660e01b8152600401613ae99695949392919061572e565b60408051808303816000875af1158015613b07573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613b2b91906157aa565b90925090506000826006811115613b4457613b44615097565b1480613b6157506001826006811115613b5f57613b5f615097565b145b15613d625760008e815260076020526040812055613b7f818561534e565b336000908152600b602052604081208054909190613bac9084906bffffffffffffffffffffffff1661534e565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055508660e0015168ffffffffffffffffff16600c60008282829054906101000a90046bffffffffffffffffffffffff16613c12919061534e565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055508660c0015168ffffffffffffffffff16600b6000613c5c613ed4565b73ffffffffffffffffffffffffffffffffffffffff168152602081019190915260400160009081208054909190613ca29084906bffffffffffffffffffffffff1661534e565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055508d7f08a4a0761e3c98d288cb4af9342660f49550d83139fb3b762b70d34bed6273688487848b60e0015160008d60c00151604051613d59969594939291906bffffffffffffffffffffffff9687168152602081019590955292909416604084015268ffffffffffffffffff9081166060840152928316608083015290911660a082015260c00190565b60405180910390a25b509c9b505050505050505050505050565b600046613d7f81613f45565b15613dfb57606c73ffffffffffffffffffffffffffffffffffffffff1663c6f7de0e6040518163ffffffff1660e01b8152600401602060405180830381865afa158015613dd0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613df491906157dd565b9392505050565b613e0481613f68565b15613eac5773420000000000000000000000000000000000000f73ffffffffffffffffffffffffffffffffffffffff166349948e0e8460405180608001604052806048815260200161584360489139604051602001613e649291906157f6565b6040516020818303038152906040526040518263ffffffff1660e01b8152600401613e8f91906140c0565b602060405180830381865afa158015613dd0573d6000803e3d6000fd5b50600092915050565b600061069a613ec261286a565b612b3184670de0b6b3a76400006150ea565b60003073ffffffffffffffffffffffffffffffffffffffff16638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015613f21573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129ce9190615825565b600061a4b1821480613f59575062066eed82145b8061069a57505062066eee1490565b6000600a821480613f7a57506101a482145b80613f87575062aa37dc82145b80613f93575061210582145b80613fa0575062014a3382145b8061069a57505062014a341490565b604051806103e00160405280601f906020820280368337509192915050565b60008083601f840112613fe057600080fd5b50813567ffffffffffffffff811115613ff857600080fd5b6020830191508360208285010111156132cf57600080fd5b6000806020838503121561402357600080fd5b823567ffffffffffffffff81111561403a57600080fd5b61404685828601613fce565b90969095509350505050565b60005b8381101561406d578181015183820152602001614055565b50506000910152565b6000815180845261408e816020860160208601614052565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000613df46020830184614076565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051610180810167ffffffffffffffff81118282101715614126576141266140d3565b60405290565b604051610160810167ffffffffffffffff81118282101715614126576141266140d3565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715614197576141976140d3565b604052919050565b600082601f8301126141b057600080fd5b813567ffffffffffffffff8111156141ca576141ca6140d3565b6141fb60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601614150565b81815284602083860101111561421057600080fd5b816020850160208301376000918101602001919091529392505050565b60006020828403121561423f57600080fd5b813567ffffffffffffffff81111561425657600080fd5b612b408482850161419f565b73ffffffffffffffffffffffffffffffffffffffff811681146129e457600080fd5b803561124281614262565b6bffffffffffffffffffffffff811681146129e457600080fd5b80356112428161428f565b600080604083850312156142c757600080fd5b82356142d281614262565b915060208301356142e28161428f565b809150509250929050565b600081518084526020808501945080840160005b8381101561433357815173ffffffffffffffffffffffffffffffffffffffff1687529582019590820190600101614301565b509495945050505050565b602081526000613df460208301846142ed565b60006020828403121561436357600080fd5b5035919050565b60006020828403121561437c57600080fd5b813567ffffffffffffffff81111561439357600080fd5b82016101608185031215613df457600080fd5b8051825260208101516143d1602084018273ffffffffffffffffffffffffffffffffffffffff169052565b5060408101516143f160408401826bffffffffffffffffffffffff169052565b506060810151614419606084018273ffffffffffffffffffffffffffffffffffffffff169052565b506080810151614435608084018267ffffffffffffffff169052565b5060a081015161444d60a084018263ffffffff169052565b5060c081015161446a60c084018268ffffffffffffffffff169052565b5060e081015161448760e084018268ffffffffffffffffff169052565b506101008181015164ffffffffff9081169184019190915261012080830151909116908301526101409081015163ffffffff16910152565b610160810161069a82846143a6565b60008083601f8401126144e057600080fd5b50813567ffffffffffffffff8111156144f857600080fd5b6020830191508360208260051b85010111156132cf57600080fd5b60008060008060008060008060e0898b03121561452f57600080fd5b606089018a81111561454057600080fd5b8998503567ffffffffffffffff8082111561455a57600080fd5b6145668c838d01613fce565b909950975060808b013591508082111561457f57600080fd5b61458b8c838d016144ce565b909750955060a08b01359150808211156145a457600080fd5b506145b18b828c016144ce565b999c989b50969995989497949560c00135949350505050565b63ffffffff811681146129e457600080fd5b8035611242816145ca565b64ffffffffff811681146129e457600080fd5b8035611242816145e7565b803561ffff8116811461124257600080fd5b67ffffffffffffffff811681146129e457600080fd5b803561124281614617565b60ff811681146129e457600080fd5b803561124281614638565b80357bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8116811461124257600080fd5b6000610180828403121561469157600080fd5b614699614102565b6146a2836145dc565b81526146b0602084016145dc565b60208201526146c1604084016145dc565b60408201526146d2606084016145dc565b60608201526146e3608084016145fa565b60808201526146f460a08401614605565b60a082015261470560c0840161462d565b60c082015261471660e08401614647565b60e0820152610100614729818501614652565b9082015261012061473b8482016145dc565b9082015261014061474d848201614605565b9082015261016061475f848201614605565b908201529392505050565b815163ffffffff16815261018081016020830151614790602084018263ffffffff169052565b5060408301516147a8604084018263ffffffff169052565b5060608301516147c0606084018263ffffffff169052565b5060808301516147d9608084018264ffffffffff169052565b5060a08301516147ef60a084018261ffff169052565b5060c083015161480b60c084018267ffffffffffffffff169052565b5060e083015161482060e084018260ff169052565b50610100838101517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16908301526101208084015163ffffffff16908301526101408084015161ffff908116918401919091526101608085015191821681850152905b505092915050565b60008060008060006080868803121561489f57600080fd5b85356148aa81614617565b9450602086013567ffffffffffffffff8111156148c657600080fd5b6148d288828901613fce565b90955093505060408601356148e6816145ca565b949793965091946060013592915050565b600067ffffffffffffffff821115614911576149116140d3565b5060051b60200190565b600082601f83011261492c57600080fd5b8135602061494161493c836148f7565b614150565b82815260059290921b8401810191818101908684111561496057600080fd5b8286015b8481101561498457803561497781614262565b8352918301918301614964565b509695505050505050565b60008060008060008060c087890312156149a857600080fd5b863567ffffffffffffffff808211156149c057600080fd5b6149cc8a838b0161491b565b975060208901359150808211156149e257600080fd5b6149ee8a838b0161491b565b96506149fc60408a01614647565b95506060890135915080821115614a1257600080fd5b614a1e8a838b0161419f565b9450614a2c60808a0161462d565b935060a0890135915080821115614a4257600080fd5b50614a4f89828a0161419f565b9150509295509295509295565b600060208284031215614a6e57600080fd5b8135613df481614262565b600181811c90821680614a8d57607f821691505b6020821081036129a8577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b601f82111561065e57600081815260208120601f850160051c81016020861015614aed5750805b601f850160051c820191505b8181101561085157828155600101614af9565b67ffffffffffffffff831115614b2457614b246140d3565b614b3883614b328354614a79565b83614ac6565b6000601f841160018114614b8a5760008515614b545750838201355b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b1c1916600186901b178355614c20565b6000838152602090207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0861690835b82811015614bd95786850135825560209485019460019092019101614bb9565b5086821015614c14577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006bffffffffffffffffffffffff80841680614ca457614ca4614c27565b92169190910492915050565b6bffffffffffffffffffffffff828116828216039080821115614cd557614cd5614c56565b5092915050565b805169ffffffffffffffffffff8116811461124257600080fd5b600080600080600060a08688031215614d0e57600080fd5b614d1786614cdc565b9450602086015193506040860151925060608601519150614d3a60808701614cdc565b90509295509295909350565b8181038181111561069a5761069a614c56565b600060208284031215614d6b57600080fd5b8151613df481614638565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203614dd657614dd6614c56565b5060010190565b68ffffffffffffffffff811681146129e457600080fd5b803561124281614ddd565b60006101608236031215614e1257600080fd5b614e1a61412c565b823567ffffffffffffffff811115614e3157600080fd5b614e3d3682860161419f565b82525060208301356020820152614e5660408401614284565b6040820152614e67606084016142a9565b6060820152614e7860808401614df4565b6080820152614e8960a0840161462d565b60a0820152614e9a60c0840161462d565b60c0820152614eab60e084016145dc565b60e0820152610100614ebe818501614605565b90820152610120614ed084820161462d565b90820152610140614ee2848201614284565b9082015292915050565b600060208284031215614efe57600080fd5b8135613df481614617565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112614f3e57600080fd5b83018035915067ffffffffffffffff821115614f5957600080fd5b6020019150368190038213156132cf57600080fd5b600060208284031215614f8057600080fd5b613df482614605565b600060208284031215614f9b57600080fd5b8135613df4816145ca565b73ffffffffffffffffffffffffffffffffffffffff8a8116825267ffffffffffffffff8a166020830152881660408201526102406060820181905281018690526000610260878982850137600083890182015261ffff8716608084015260a0830186905263ffffffff851660c0840152601f88017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016830101905061504e60e08301846143a6565b9a9950505050505050505050565b60ff818116838216019081111561069a5761069a614c56565b600060ff83168061508857615088614c27565b8060ff84160491505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b8183823760009101908152919050565b828152606082602083013760800192915050565b808202811582820484141761069a5761069a614c56565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b63ffffffff818116838216019080821115614cd557614cd5614c56565b600061012063ffffffff808d1684528b6020850152808b1660408501525080606084015261517d8184018a6142ed565b9050828103608084015261519181896142ed565b905060ff871660a084015282810360c08401526151ae8187614076565b905067ffffffffffffffff851660e08401528281036101008401526151d38185614076565b9c9b505050505050505050505050565b805161124281614ddd565b60006020828403121561520057600080fd5b8151613df481614ddd565b600181815b8085111561526457817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0482111561524a5761524a614c56565b8085161561525757918102915b93841c9390800290615210565b509250929050565b60008261527b5750600161069a565b816152885750600061069a565b816001811461529e57600281146152a8576152c4565b600191505061069a565b60ff8411156152b9576152b9614c56565b50506001821b61069a565b5060208310610133831016604e8410600b84101617156152e7575081810a61069a565b6152f1838361520b565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0482111561532357615323614c56565b029392505050565b6000613df460ff84168361526c565b60008261534957615349614c27565b500490565b6bffffffffffffffffffffffff818116838216019080821115614cd557614cd5614c56565b6bffffffffffffffffffffffff81811683821602808216919082811461487f5761487f614c56565b8082018082111561069a5761069a614c56565b67ffffffffffffffff818116838216019080821115614cd557614cd5614c56565b600082601f8301126153e057600080fd5b813560206153f061493c836148f7565b82815260059290921b8401810191818101908684111561540f57600080fd5b8286015b848110156149845780358352918301918301615413565b600082601f83011261543b57600080fd5b8135602061544b61493c836148f7565b82815260059290921b8401810191818101908684111561546a57600080fd5b8286015b8481101561498457803567ffffffffffffffff81111561548e5760008081fd5b61549c8986838b010161419f565b84525091830191830161546e565b600080600080600060a086880312156154c257600080fd5b853567ffffffffffffffff808211156154da57600080fd5b6154e689838a016153cf565b965060208801359150808211156154fc57600080fd5b61550889838a0161542a565b9550604088013591508082111561551e57600080fd5b61552a89838a0161542a565b9450606088013591508082111561554057600080fd5b61554c89838a0161542a565b9350608088013591508082111561556257600080fd5b5061556f8882890161542a565b9150509295509295909350565b60006101208b835273ffffffffffffffffffffffffffffffffffffffff8b16602084015267ffffffffffffffff808b1660408501528160608501526155c38285018b6142ed565b915083820360808501526155d7828a6142ed565b915060ff881660a085015283820360c08501526155f48288614076565b90861660e085015283810361010085015290506151d38185614076565b805161124281614262565b80516112428161428f565b805161124281614617565b8051611242816145ca565b8051611242816145e7565b6000610160828403121561565b57600080fd5b61566361412c565b8251815261567360208401615611565b60208201526156846040840161561c565b604082015261569560608401615611565b60608201526156a660808401615627565b60808201526156b760a08401615632565b60a08201526156c860c084016151e3565b60c08201526156d960e084016151e3565b60e08201526101006156ec81850161563d565b908201526101206156fe84820161563d565b9082015261014061475f848201615632565b64ffffffffff818116838216019080821115614cd557614cd5614c56565b60006102008083526157428184018a614076565b905082810360208401526157568189614076565b6bffffffffffffffffffffffff88811660408601528716606085015273ffffffffffffffffffffffffffffffffffffffff86166080850152915061579f905060a08301846143a6565b979650505050505050565b600080604083850312156157bd57600080fd5b8251600781106157cc57600080fd5b60208401519092506142e28161428f565b6000602082840312156157ef57600080fd5b5051919050565b60008351615808818460208801614052565b83519083019061581c818360208801614052565b01949350505050565b60006020828403121561583757600080fd5b8151613df48161426256fe307866666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666a164736f6c6343000813000a", + Bin: "0x60a06040523480156200001157600080fd5b506040516200603a3803806200603a8339810160408190526200003491620004db565b83838383833380600081620000905760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000c357620000c3816200014e565b5050506001600160a01b038116620000ee57604051632530e88560e11b815260040160405180910390fd5b6001600160a01b03908116608052600c80546001600160601b03166c0100000000000000000000000085841602179055600d80546001600160a01b0319169183169190911790556200014083620001f9565b505050505050505062000742565b336001600160a01b03821603620001a85760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000087565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b620002036200039e565b80516008805460208401516040808601516060870151608088015160a089015160c08a015160e08b015160ff16600160f81b026001600160f81b036001600160401b03909216600160b81b02919091166001600160b81b0361ffff938416600160a81b0261ffff60a81b1964ffffffffff909616600160801b029590951666ffffffffffffff60801b1963ffffffff9788166c010000000000000000000000000263ffffffff60601b19998916680100000000000000000299909916600160401b600160801b03199b8916640100000000026001600160401b0319909d169e89169e909e179b909b17999099169b909b1795909517979097169590951717969096161792909217909255610100840151610120850151909316600160e01b026001600160e01b0390931692909217600955610140830151600a80546101608601518416620100000263ffffffff19919091169290931691909117919091179055517f2e2c8535dcc25459d519f2300c114d2d2128bf6399722d04eca078461a3bf33a906200039390839062000639565b60405180910390a150565b620003a8620003aa565b565b6000546001600160a01b03163314620003a85760405162461bcd60e51b815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e657200000000000000000000604482015260640162000087565b80516001600160a01b03811681146200041e57600080fd5b919050565b60405161018081016001600160401b03811182821017156200045557634e487b7160e01b600052604160045260246000fd5b60405290565b805163ffffffff811681146200041e57600080fd5b805164ffffffffff811681146200041e57600080fd5b805161ffff811681146200041e57600080fd5b80516001600160401b03811681146200041e57600080fd5b805160ff811681146200041e57600080fd5b80516001600160e01b03811681146200041e57600080fd5b6000806000808486036101e0811215620004f457600080fd5b620004ff8662000406565b945061018080601f19830112156200051657600080fd5b6200052062000423565b915062000530602088016200045b565b825262000540604088016200045b565b602083015262000553606088016200045b565b604083015262000566608088016200045b565b60608301526200057960a0880162000470565b60808301526200058c60c0880162000486565b60a08301526200059f60e0880162000499565b60c0830152610100620005b4818901620004b1565b60e0840152610120620005c9818a01620004c3565b828501526101409150620005df828a016200045b565b90840152610160620005f389820162000486565b8285015262000604838a0162000486565b90840152509093506200061d90506101a0860162000406565b91506200062e6101c0860162000406565b905092959194509250565b815163ffffffff1681526101808101602083015162000660602084018263ffffffff169052565b50604083015162000679604084018263ffffffff169052565b50606083015162000692606084018263ffffffff169052565b506080830151620006ac608084018264ffffffffff169052565b5060a0830151620006c360a084018261ffff169052565b5060c0830151620006df60c08401826001600160401b03169052565b5060e0830151620006f560e084018260ff169052565b50610100838101516001600160e01b0316908301526101208084015163ffffffff16908301526101408084015161ffff908116918401919091526101609384015116929091019190915290565b6080516158b2620007886000396000818161079c01528181610c7d01528181610f110152818161102701528181611b2d015281816129eb015261398401526158b26000f3fe608060405234801561001057600080fd5b50600436106101a35760003560e01c80638da5cb5b116100ee578063d227d24511610097578063e4ddcea611610071578063e4ddcea6146105d5578063f2f22ef1146105eb578063f2fde38b146105f3578063f6ea41f61461060657600080fd5b8063d227d2451461058a578063d328a91e146105ba578063e3d0e712146105c257600080fd5b8063b1dc65a4116100c8578063b1dc65a414610396578063ba9c924d146103a9578063c3f909d4146103bc57600080fd5b80638da5cb5b1461032e578063a631571e14610356578063afcb95d71461037657600080fd5b80637d4807871161015057806381f1b9381161012a57806381f1b938146102a657806381ff7048146102ae57806385b214cf1461031b57600080fd5b80637d480787146102765780637f15e1661461027e578063814118341461029157600080fd5b806366316d8d1161018157806366316d8d1461023c5780637212762f1461024f57806379ba50971461026e57600080fd5b8063083a5466146101a8578063181f5a77146101bd578063626f458c1461020f575b600080fd5b6101bb6101b636600461402b565b61060e565b005b6101f96040518060400160405280601c81526020017f46756e6374696f6e7320436f6f7264696e61746f722076312e332e300000000081525081565b60405161020691906140db565b60405180910390f35b61022261021d366004614248565b610663565b60405168ffffffffffffffffff9091168152602001610206565b6101bb61024a3660046142cf565b6106a0565b610257610859565b6040805192835260ff909116602083015201610206565b6101bb610a6c565b6101bb610b69565b6101bb61028c36600461402b565b610d69565b610299610db9565b6040516102069190614359565b6101f9610e28565b6102f860015460025463ffffffff74010000000000000000000000000000000000000000830481169378010000000000000000000000000000000000000000000000009093041691565b6040805163ffffffff948516815293909216602084015290820152606001610206565b6101bb61032936600461436c565b610ef9565b60005460405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610206565b610369610364366004614385565b610fb6565b60405161020691906144da565b604080516001815260006020820181905291810191909152606001610206565b6101bb6103a436600461452e565b611247565b6101bb6103b7366004614699565b61185e565b61057d6040805161018081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e0810182905261010081018290526101208101829052610140810182905261016081019190915250604080516101808101825260085463ffffffff80821683526401000000008204811660208401526801000000000000000082048116938301939093526c01000000000000000000000000810483166060830152700100000000000000000000000000000000810464ffffffffff1660808301527501000000000000000000000000000000000000000000810461ffff90811660a084015277010000000000000000000000000000000000000000000000820467ffffffffffffffff1660c08401527f010000000000000000000000000000000000000000000000000000000000000090910460ff1660e08301526009547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff81166101008401527c01000000000000000000000000000000000000000000000000000000009004909216610120820152600a5480831661014083015262010000900490911661016082015290565b6040516102069190614785565b61059d6105983660046148a2565b611b29565b6040516bffffffffffffffffffffffff9091168152602001610206565b6101f9611c97565b6101bb6105d03660046149aa565b611cee565b6105dd61286a565b604051908152602001610206565b6102226129ae565b6101bb610601366004614a77565b6129d3565b6102226129e7565b610616612a78565b6000819003610651576040517f4f42be3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600f61065e828483614b27565b505050565b600a5460009061069a9060649061067d9061ffff16612afb565b6106879190614ca0565b6bffffffffffffffffffffffff16612b48565b92915050565b6106a8612be7565b806bffffffffffffffffffffffff166000036106e25750336000908152600b60205260409020546bffffffffffffffffffffffff1661073c565b336000908152600b60205260409020546bffffffffffffffffffffffff8083169116101561073c576040517ff4d678b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336000908152600b6020526040812080548392906107699084906bffffffffffffffffffffffff16614ccb565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055506107be7f000000000000000000000000000000000000000000000000000000000000000090565b6040517f66316d8d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84811660048301526bffffffffffffffffffffffff8416602483015291909116906366316d8d90604401600060405180830381600087803b15801561083d57600080fd5b505af1158015610851573d6000803e3d6000fd5b505050505050565b600080600080600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa1580156108cc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108f09190614d11565b5093505092505080426109039190614d61565b600854640100000000900463ffffffff161080156109305750600854640100000000900463ffffffff1615155b1561098d57505060085477010000000000000000000000000000000000000000000000810467ffffffffffffffff16937f010000000000000000000000000000000000000000000000000000000000000090910460ff1692509050565b600082136109cf576040517f56b22ab8000000000000000000000000000000000000000000000000000000008152600481018390526024015b60405180910390fd5b600d54604080517f313ce5670000000000000000000000000000000000000000000000000000000081529051849273ffffffffffffffffffffffffffffffffffffffff169163313ce5679160048083019260209291908290030181865afa158015610a3e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a629190614d74565b9350935050509091565b60015473ffffffffffffffffffffffffffffffffffffffff163314610aed576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e65720000000000000000000060448201526064016109c6565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b610b71612dae565b610b79612be7565b6000610b83610db9565b905060005b8151811015610d65576000600b6000848481518110610ba957610ba9614d91565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff168252810191909152604001600020546bffffffffffffffffffffffff1690508015610d54576000600b6000858581518110610c0857610c08614d91565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550610c9f7f000000000000000000000000000000000000000000000000000000000000000090565b73ffffffffffffffffffffffffffffffffffffffff166366316d8d848481518110610ccc57610ccc614d91565b6020026020010151836040518363ffffffff1660e01b8152600401610d2192919073ffffffffffffffffffffffffffffffffffffffff9290921682526bffffffffffffffffffffffff16602082015260400190565b600060405180830381600087803b158015610d3b57600080fd5b505af1158015610d4f573d6000803e3d6000fd5b505050505b50610d5e81614dc0565b9050610b88565b5050565b610d71612a78565b6000819003610dac576040517f4f42be3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600e61065e828483614b27565b60606006805480602002602001604051908101604052809291908181526020018280548015610e1e57602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311610df3575b5050505050905090565b6060600f8054610e3790614a94565b9050600003610e72576040517f4f42be3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600f8054610e7f90614a94565b80601f0160208091040260200160405190810160405280929190818152602001828054610eab90614a94565b8015610e1e5780601f10610ecd57610100808354040283529160200191610e1e565b820191906000526020600020905b815481529060010190602001808311610edb57509395945050505050565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610f68576040517fc41a5b0900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008181526007602052604080822091909155517f8a4b97add3359bd6bcf5e82874363670eb5ad0f7615abddbd0ed0a3a98f0f41690610fab9083815260200190565b60405180910390a150565b6040805161016081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101829052610100810182905261012081018290526101408101919091523373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161461107e576040517fc41a5b0900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061109161108c84614e1a565b612db6565b90925090506110a66060840160408501614a77565b825173ffffffffffffffffffffffffffffffffffffffff91909116907fbf50768ccf13bd0110ca6d53a9c4f1f3271abdd4c24a56878863ed25b20598ff326110f460c0880160a08901614f07565b61110661016089016101408a01614a77565b6111108980614f24565b6111226101208c016101008d01614f89565b60208c01356111386101008e0160e08f01614fa4565b6040518061016001604052808e6000015181526020018e6020015173ffffffffffffffffffffffffffffffffffffffff1681526020018e604001516bffffffffffffffffffffffff1681526020018e6060015173ffffffffffffffffffffffffffffffffffffffff1681526020018e6080015167ffffffffffffffff1681526020018e60a0015163ffffffff1681526020018d68ffffffffffffffffff1681526020018e60e0015168ffffffffffffffffff1681526020018e610100015164ffffffffff1681526020018e610120015164ffffffffff1681526020018e610140015163ffffffff1681525060405161123899989796959493929190614fc1565b60405180910390a3505b919050565b6000806112548989613168565b915091508115611265575050611854565b604080518b3580825262ffffff6020808f0135600881901c9290921690840152909290917fb04e63db38c49950639fa09d29872f21f5d49d614f3a969d8adf3d4b52e41a62910160405180910390a16112c28b8b8b8b8b8b6132f1565b6003546000906002906112e09060ff80821691610100900416615077565b6112ea9190615090565b6112f5906001615077565b60ff169050888114611363576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f77726f6e67206e756d626572206f66207369676e61747572657300000000000060448201526064016109c6565b8887146113f2576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f7265706f727420727320616e64207373206d757374206265206f66206571756160448201527f6c206c656e67746800000000000000000000000000000000000000000000000060648201526084016109c6565b3360009081526004602090815260408083208151808301909252805460ff80821684529293919291840191610100909104166002811115611435576114356150b2565b6002811115611446576114466150b2565b9052509050600281602001516002811115611463576114636150b2565b141580156114ac57506006816000015160ff168154811061148657611486614d91565b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff163314155b15611513576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f756e617574686f72697a6564207472616e736d6974746572000000000000000060448201526064016109c6565b5050505061151f613fca565b60008a8a6040516115319291906150e1565b604051908190038120611548918e906020016150f1565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181528282528051602091820120838301909252600080845290830152915060005b898110156118445760006001848984602081106115b1576115b1614d91565b6115be91901a601b615077565b8e8e868181106115d0576115d0614d91565b905060200201358d8d878181106115e9576115e9614d91565b9050602002013560405160008152602001604052604051611626949392919093845260ff9290921660208401526040830152606082015260800190565b6020604051602081039080840390855afa158015611648573d6000803e3d6000fd5b5050604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081015173ffffffffffffffffffffffffffffffffffffffff811660009081526004602090815290849020838501909452835460ff808216855292965092945084019161010090041660028111156116c8576116c86150b2565b60028111156116d9576116d96150b2565b90525092506001836020015160028111156116f6576116f66150b2565b1461175d576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f61646472657373206e6f7420617574686f72697a656420746f207369676e000060448201526064016109c6565b8251600090869060ff16601f811061177757611777614d91565b602002015173ffffffffffffffffffffffffffffffffffffffff16146117f9576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f6e6f6e2d756e69717565207369676e617475726500000000000000000000000060448201526064016109c6565b8085846000015160ff16601f811061181357611813614d91565b73ffffffffffffffffffffffffffffffffffffffff90921660209290920201525061183d81614dc0565b9050611592565b505050611850826133a8565b5050505b5050505050505050565b611866612dae565b80516008805460208401516040808601516060870151608088015160a089015160c08a015160e08b015160ff167f0100000000000000000000000000000000000000000000000000000000000000027effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff67ffffffffffffffff90921677010000000000000000000000000000000000000000000000029190911676ffffffffffffffffffffffffffffffffffffffffffffff61ffff9384167501000000000000000000000000000000000000000000027fffffffffffffffffff0000ffffffffffffffffffffffffffffffffffffffffff64ffffffffff90961670010000000000000000000000000000000002959095167fffffffffffffffffff00000000000000ffffffffffffffffffffffffffffffff63ffffffff9788166c01000000000000000000000000027fffffffffffffffffffffffffffffffff00000000ffffffffffffffffffffffff9989166801000000000000000002999099167fffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff9b8916640100000000027fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000909d169e89169e909e179b909b17999099169b909b17959095179790971695909517179690961617929092179092556101008401516101208501519093167c0100000000000000000000000000000000000000000000000000000000027bffffffffffffffffffffffffffffffffffffffffffffffffffffffff90931692909217600955610140830151600a8054610160860151841662010000027fffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000919091169290931691909117919091179055517f2e2c8535dcc25459d519f2300c114d2d2128bf6399722d04eca078461a3bf33a90610fab908390614785565b60007f00000000000000000000000000000000000000000000000000000000000000006040517f10fc49c100000000000000000000000000000000000000000000000000000000815267ffffffffffffffff8816600482015263ffffffff8516602482015273ffffffffffffffffffffffffffffffffffffffff91909116906310fc49c19060440160006040518083038186803b158015611bc957600080fd5b505afa158015611bdd573d6000803e3d6000fd5b5050505066038d7ea4c68000821115611c22576040517f8129bbcd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000611c2c6129e7565b90506000611c6f87878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061066392505050565b90506000611c7b6129ae565b9050611c8a86868486856134f7565b9998505050505050505050565b6060600e8054611ca690614a94565b9050600003611ce1576040517f4f42be3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600e8054610e7f90614a94565b855185518560ff16601f831115611d61576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f746f6f206d616e79207369676e6572730000000000000000000000000000000060448201526064016109c6565b80600003611dcb576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f66206d75737420626520706f736974697665000000000000000000000000000060448201526064016109c6565b818314611e59576040517f89a61989000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f6f7261636c6520616464726573736573206f7574206f6620726567697374726160448201527f74696f6e0000000000000000000000000000000000000000000000000000000060648201526084016109c6565b611e64816003615105565b8311611ecc576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f6661756c74792d6f7261636c65206620746f6f2068696768000000000000000060448201526064016109c6565b611ed4612a78565b6040805160c0810182528a8152602081018a905260ff89169181018290526060810188905267ffffffffffffffff8716608082015260a0810186905290611f1b9088613673565b600554156120d057600554600090611f3590600190614d61565b9050600060058281548110611f4c57611f4c614d91565b60009182526020822001546006805473ffffffffffffffffffffffffffffffffffffffff90921693509084908110611f8657611f86614d91565b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff85811684526004909252604080842080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000908116909155929091168084529220805490911690556005805491925090806120065761200661511c565b60008281526020902081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90810180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055019055600680548061206f5761206f61511c565b60008281526020902081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90810180547fffffffffffffffffffffffff000000000000000000000000000000000000000016905501905550611f1b915050565b60005b815151811015612687578151805160009190839081106120f5576120f5614d91565b602002602001015173ffffffffffffffffffffffffffffffffffffffff160361217a576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f7369676e6572206d757374206e6f7420626520656d707479000000000000000060448201526064016109c6565b600073ffffffffffffffffffffffffffffffffffffffff16826020015182815181106121a8576121a8614d91565b602002602001015173ffffffffffffffffffffffffffffffffffffffff160361222d576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f7472616e736d6974746572206d757374206e6f7420626520656d70747900000060448201526064016109c6565b6000600460008460000151848151811061224957612249614d91565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff16825281019190915260400160002054610100900460ff166002811115612293576122936150b2565b146122fa576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f7265706561746564207369676e6572206164647265737300000000000000000060448201526064016109c6565b6040805180820190915260ff8216815260016020820152825180516004916000918590811061232b5761232b614d91565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff168252818101929092526040016000208251815460ff9091167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0082168117835592840151919283917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000016176101008360028111156123cc576123cc6150b2565b0217905550600091506123dc9050565b60046000846020015184815181106123f6576123f6614d91565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff16825281019190915260400160002054610100900460ff166002811115612440576124406150b2565b146124a7576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f7265706561746564207472616e736d697474657220616464726573730000000060448201526064016109c6565b6040805180820190915260ff8216815260208101600281525060046000846020015184815181106124da576124da614d91565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff168252818101929092526040016000208251815460ff9091167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0082168117835592840151919283917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000161761010083600281111561257b5761257b6150b2565b02179055505082518051600592508390811061259957612599614d91565b602090810291909101810151825460018101845560009384529282902090920180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909316929092179091558201518051600691908390811061261557612615614d91565b60209081029190910181015182546001810184556000938452919092200180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9092169190911790558061267f81614dc0565b9150506120d3565b506040810151600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660ff909216919091179055600180547fffffffff00000000ffffffffffffffffffffffffffffffffffffffffffffffff8116780100000000000000000000000000000000000000000000000063ffffffff438116820292909217808555920481169291829160149161273f9184917401000000000000000000000000000000000000000090041661514b565b92506101000a81548163ffffffff021916908363ffffffff16021790555061279e4630600160149054906101000a900463ffffffff1663ffffffff16856000015186602001518760400151886060015189608001518a60a0015161368c565b600281905582518051600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1661010060ff9093169290920291909117905560015460208501516040808701516060880151608089015160a08a015193517f1591690b8638f5fb2dbec82ac741805ac5da8b45dc5263f4875b0496fdce4e0598612855988b9891977401000000000000000000000000000000000000000090920463ffffffff16969095919491939192615168565b60405180910390a15050505050505050505050565b6000806000600c8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa1580156128da573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128fe9190614d11565b5093505092505080426129119190614d61565b600854640100000000900463ffffffff1610801561293e5750600854640100000000900463ffffffff1615155b1561296b5750506009547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16919050565b600082136129a8576040517f43d4cf66000000000000000000000000000000000000000000000000000000008152600481018390526024016109c6565b50919050565b600a546000906129ce9060649061067d9062010000900461ffff16612afb565b905090565b6129db612a78565b6129e481613737565b50565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16632a905ccc6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612a54573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129ce9190615209565b60005473ffffffffffffffffffffffffffffffffffffffff163314612af9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e65720000000000000000000060448201526064016109c6565b565b6000806000612b08610859565b9092509050612b4082612b1c836012615077565b612b2790600a615346565b612b319087615105565b612b3b9190615355565b61382c565b949350505050565b600068ffffffffffffffffff821115612be3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203760448201527f322062697473000000000000000000000000000000000000000000000000000060648201526084016109c6565b5090565b600c546bffffffffffffffffffffffff16600003612c0157565b6000612c0b610db9565b80519091506000819003612c4b576040517f30274b3a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600c54600090612c6a9083906bffffffffffffffffffffffff16614ca0565b9050806bffffffffffffffffffffffff16600003612c8757505050565b60005b82811015612d505781600b6000868481518110612ca957612ca9614d91565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282829054906101000a90046bffffffffffffffffffffffff16612d119190615369565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff16021790555080612d4990614dc0565b9050612c8a565b50612d5b828261538e565b600c8054600090612d7b9084906bffffffffffffffffffffffff16614ccb565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550505050565b612af9612a78565b6040805161016081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e081018290526101008101829052610120810182905261014081019190915260085461010083015160009161ffff7501000000000000000000000000000000000000000000909104811691161115612e74576040517fdada758700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000612e838460000151610663565b9050612e8d6129ae565b91506000612ea68560e001513a848860800151876134f7565b9050806bffffffffffffffffffffffff1685606001516bffffffffffffffffffffffff161015612f02576040517ff4d678b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600954600090612f38907c0100000000000000000000000000000000000000000000000000000000900463ffffffff16426153b6565b905060003087604001518860a001518960c001516001612f5891906153c9565b8a5180516020918201206101008d015160e08e015160405161300c98979695948c918c9132910173ffffffffffffffffffffffffffffffffffffffff9a8b168152988a1660208a015267ffffffffffffffff97881660408a0152959096166060880152608087019390935261ffff9190911660a086015263ffffffff90811660c08601526bffffffffffffffffffffffff9190911660e0850152919091166101008301529091166101208201526101400190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815282825280516020918201206101608401835280845230848301526bffffffffffffffffffffffff8716848401528a83015173ffffffffffffffffffffffffffffffffffffffff16606085015260a0808c015167ffffffffffffffff1660808087019190915260e0808e015163ffffffff90811693880193909352908d015168ffffffffffffffffff90811660c08801528a169086015260085468010000000000000000810482166101008701526c010000000000000000000000009004811661012086015286166101408501529151929850909250613118918891016144da565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181528151602092830120600093845260079092529091205550929491935090915050565b600061319c6040518060a0016040528060608152602001606081526020016060815260200160608152602001606081525090565b6000808080806131ae888a018a6154c5565b84519499509297509095509350915060ff168015806131ce575084518114155b806131da575083518114155b806131e6575082518114155b806131f2575081518114155b15613259576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f4669656c6473206d75737420626520657175616c206c656e677468000000000060448201526064016109c6565b60005b818110156132bf5761329587828151811061327957613279614d91565b6020026020010151600090815260076020526040902054151590565b6132bf576132a4600183614d61565b81036132af57600198505b6132b881614dc0565b905061325c565b50506040805160a0810182529586526020860194909452928401919091526060830152608082015290505b9250929050565b60006132fe826020615105565b613309856020615105565b613315886101446153b6565b61331f91906153b6565b61332991906153b6565b6133349060006153b6565b905036811461339f576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f63616c6c64617461206c656e677468206d69736d61746368000000000000000060448201526064016109c6565b50505050505050565b80515160ff1660005b8181101561065e57600061345a846000015183815181106133d4576133d4614d91565b6020026020010151856020015184815181106133f2576133f2614d91565b60200260200101518660400151858151811061341057613410614d91565b60200260200101518760600151868151811061342e5761342e614d91565b60200260200101518860800151878151811061344c5761344c614d91565b6020026020010151886138ca565b90506000816006811115613470576134706150b2565b148061348d5750600181600681111561348b5761348b6150b2565b145b156134e65783518051839081106134a6576134a6614d91565b60209081029190910181015160405133815290917fc708e0440951fd63499c0f7a73819b469ee5dd3ecc356c0ab4eb7f18389009d9910160405180910390a25b506134f081614dc0565b90506133b1565b600854600090700100000000000000000000000000000000900464ffffffffff1685101561354057600854700100000000000000000000000000000000900464ffffffffff1694505b6008546000906127109061355a9063ffffffff1688615105565b6135649190615355565b61356e90876153b6565b60085490915060009088906135a79063ffffffff6c0100000000000000000000000082048116916801000000000000000090041661514b565b6135b1919061514b565b63ffffffff16905060006135fb6000368080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250613d8e92505050565b9050600061361c8261360d8587615105565b61361791906153b6565b613ed0565b905060008668ffffffffffffffffff168868ffffffffffffffffff168a68ffffffffffffffffff1661364e9190615369565b6136589190615369565b90506136648183615369565b9b9a5050505050505050505050565b600061367d610db9565b511115610d6557610d65612be7565b6000808a8a8a8a8a8a8a8a8a6040516020016136b099989796959493929190615597565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291905280516020909101207dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167e01000000000000000000000000000000000000000000000000000000000000179150509998505050505050505050565b3373ffffffffffffffffffffffffffffffffffffffff8216036137b6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c6600000000000000000060448201526064016109c6565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b60006bffffffffffffffffffffffff821115612be3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203960448201527f362062697473000000000000000000000000000000000000000000000000000060648201526084016109c6565b600080848060200190518101906138e19190615663565b905060003a8261012001518361010001516138fc919061572b565b64ffffffffff1661390d9190615105565b905060008460ff166139556000368080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250613d8e92505050565b61395f9190615355565b9050600061397061361783856153b6565b9050600061397d3a613ed0565b90506000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663330605298e8e868b60c0015168ffffffffffffffffff168c60e0015168ffffffffffffffffff168a6139ec9190615369565b6139f69190615369565b336040518061016001604052808f6000015181526020018f6020015173ffffffffffffffffffffffffffffffffffffffff1681526020018f604001516bffffffffffffffffffffffff1681526020018f6060015173ffffffffffffffffffffffffffffffffffffffff1681526020018f6080015167ffffffffffffffff1681526020018f60a0015163ffffffff168152602001600068ffffffffffffffffff1681526020018f60e0015168ffffffffffffffffff1681526020018f610100015164ffffffffff1681526020018f610120015164ffffffffff1681526020018f610140015163ffffffff168152506040518763ffffffff1660e01b8152600401613b0496959493929190615749565b60408051808303816000875af1158015613b22573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613b4691906157c5565b90925090506000826006811115613b5f57613b5f6150b2565b1480613b7c57506001826006811115613b7a57613b7a6150b2565b145b15613d7d5760008e815260076020526040812055613b9a8185615369565b336000908152600b602052604081208054909190613bc79084906bffffffffffffffffffffffff16615369565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055508660e0015168ffffffffffffffffff16600c60008282829054906101000a90046bffffffffffffffffffffffff16613c2d9190615369565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055508660c0015168ffffffffffffffffff16600b6000613c77613eef565b73ffffffffffffffffffffffffffffffffffffffff168152602081019190915260400160009081208054909190613cbd9084906bffffffffffffffffffffffff16615369565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055508d7f08a4a0761e3c98d288cb4af9342660f49550d83139fb3b762b70d34bed6273688487848b60e0015160008d60c00151604051613d74969594939291906bffffffffffffffffffffffff9687168152602081019590955292909416604084015268ffffffffffffffffff9081166060840152928316608083015290911660a082015260c00190565b60405180910390a25b509c9b505050505050505050505050565b600046613d9a81613f60565b15613e1657606c73ffffffffffffffffffffffffffffffffffffffff1663c6f7de0e6040518163ffffffff1660e01b8152600401602060405180830381865afa158015613deb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613e0f91906157f8565b9392505050565b613e1f81613f83565b15613ec75773420000000000000000000000000000000000000f73ffffffffffffffffffffffffffffffffffffffff166349948e0e8460405180608001604052806048815260200161585e60489139604051602001613e7f929190615811565b6040516020818303038152906040526040518263ffffffff1660e01b8152600401613eaa91906140db565b602060405180830381865afa158015613deb573d6000803e3d6000fd5b50600092915050565b600061069a613edd61286a565b612b3184670de0b6b3a7640000615105565b60003073ffffffffffffffffffffffffffffffffffffffff16638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015613f3c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129ce9190615840565b600061a4b1821480613f74575062066eed82145b8061069a57505062066eee1490565b6000600a821480613f9557506101a482145b80613fa2575062aa37dc82145b80613fae575061210582145b80613fbb575062014a3382145b8061069a57505062014a341490565b604051806103e00160405280601f906020820280368337509192915050565b60008083601f840112613ffb57600080fd5b50813567ffffffffffffffff81111561401357600080fd5b6020830191508360208285010111156132ea57600080fd5b6000806020838503121561403e57600080fd5b823567ffffffffffffffff81111561405557600080fd5b61406185828601613fe9565b90969095509350505050565b60005b83811015614088578181015183820152602001614070565b50506000910152565b600081518084526140a981602086016020860161406d565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000613e0f6020830184614091565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051610180810167ffffffffffffffff81118282101715614141576141416140ee565b60405290565b604051610160810167ffffffffffffffff81118282101715614141576141416140ee565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156141b2576141b26140ee565b604052919050565b600082601f8301126141cb57600080fd5b813567ffffffffffffffff8111156141e5576141e56140ee565b61421660207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8401160161416b565b81815284602083860101111561422b57600080fd5b816020850160208301376000918101602001919091529392505050565b60006020828403121561425a57600080fd5b813567ffffffffffffffff81111561427157600080fd5b612b40848285016141ba565b73ffffffffffffffffffffffffffffffffffffffff811681146129e457600080fd5b80356112428161427d565b6bffffffffffffffffffffffff811681146129e457600080fd5b8035611242816142aa565b600080604083850312156142e257600080fd5b82356142ed8161427d565b915060208301356142fd816142aa565b809150509250929050565b600081518084526020808501945080840160005b8381101561434e57815173ffffffffffffffffffffffffffffffffffffffff168752958201959082019060010161431c565b509495945050505050565b602081526000613e0f6020830184614308565b60006020828403121561437e57600080fd5b5035919050565b60006020828403121561439757600080fd5b813567ffffffffffffffff8111156143ae57600080fd5b82016101608185031215613e0f57600080fd5b8051825260208101516143ec602084018273ffffffffffffffffffffffffffffffffffffffff169052565b50604081015161440c60408401826bffffffffffffffffffffffff169052565b506060810151614434606084018273ffffffffffffffffffffffffffffffffffffffff169052565b506080810151614450608084018267ffffffffffffffff169052565b5060a081015161446860a084018263ffffffff169052565b5060c081015161448560c084018268ffffffffffffffffff169052565b5060e08101516144a260e084018268ffffffffffffffffff169052565b506101008181015164ffffffffff9081169184019190915261012080830151909116908301526101409081015163ffffffff16910152565b610160810161069a82846143c1565b60008083601f8401126144fb57600080fd5b50813567ffffffffffffffff81111561451357600080fd5b6020830191508360208260051b85010111156132ea57600080fd5b60008060008060008060008060e0898b03121561454a57600080fd5b606089018a81111561455b57600080fd5b8998503567ffffffffffffffff8082111561457557600080fd5b6145818c838d01613fe9565b909950975060808b013591508082111561459a57600080fd5b6145a68c838d016144e9565b909750955060a08b01359150808211156145bf57600080fd5b506145cc8b828c016144e9565b999c989b50969995989497949560c00135949350505050565b63ffffffff811681146129e457600080fd5b8035611242816145e5565b64ffffffffff811681146129e457600080fd5b803561124281614602565b803561ffff8116811461124257600080fd5b67ffffffffffffffff811681146129e457600080fd5b803561124281614632565b60ff811681146129e457600080fd5b803561124281614653565b80357bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8116811461124257600080fd5b600061018082840312156146ac57600080fd5b6146b461411d565b6146bd836145f7565b81526146cb602084016145f7565b60208201526146dc604084016145f7565b60408201526146ed606084016145f7565b60608201526146fe60808401614615565b608082015261470f60a08401614620565b60a082015261472060c08401614648565b60c082015261473160e08401614662565b60e082015261010061474481850161466d565b908201526101206147568482016145f7565b90820152610140614768848201614620565b9082015261016061477a848201614620565b908201529392505050565b815163ffffffff168152610180810160208301516147ab602084018263ffffffff169052565b5060408301516147c3604084018263ffffffff169052565b5060608301516147db606084018263ffffffff169052565b5060808301516147f4608084018264ffffffffff169052565b5060a083015161480a60a084018261ffff169052565b5060c083015161482660c084018267ffffffffffffffff169052565b5060e083015161483b60e084018260ff169052565b50610100838101517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16908301526101208084015163ffffffff16908301526101408084015161ffff908116918401919091526101608085015191821681850152905b505092915050565b6000806000806000608086880312156148ba57600080fd5b85356148c581614632565b9450602086013567ffffffffffffffff8111156148e157600080fd5b6148ed88828901613fe9565b9095509350506040860135614901816145e5565b949793965091946060013592915050565b600067ffffffffffffffff82111561492c5761492c6140ee565b5060051b60200190565b600082601f83011261494757600080fd5b8135602061495c61495783614912565b61416b565b82815260059290921b8401810191818101908684111561497b57600080fd5b8286015b8481101561499f5780356149928161427d565b835291830191830161497f565b509695505050505050565b60008060008060008060c087890312156149c357600080fd5b863567ffffffffffffffff808211156149db57600080fd5b6149e78a838b01614936565b975060208901359150808211156149fd57600080fd5b614a098a838b01614936565b9650614a1760408a01614662565b95506060890135915080821115614a2d57600080fd5b614a398a838b016141ba565b9450614a4760808a01614648565b935060a0890135915080821115614a5d57600080fd5b50614a6a89828a016141ba565b9150509295509295509295565b600060208284031215614a8957600080fd5b8135613e0f8161427d565b600181811c90821680614aa857607f821691505b6020821081036129a8577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b601f82111561065e57600081815260208120601f850160051c81016020861015614b085750805b601f850160051c820191505b8181101561085157828155600101614b14565b67ffffffffffffffff831115614b3f57614b3f6140ee565b614b5383614b4d8354614a94565b83614ae1565b6000601f841160018114614ba55760008515614b6f5750838201355b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b1c1916600186901b178355614c3b565b6000838152602090207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0861690835b82811015614bf45786850135825560209485019460019092019101614bd4565b5086821015614c2f577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006bffffffffffffffffffffffff80841680614cbf57614cbf614c42565b92169190910492915050565b6bffffffffffffffffffffffff828116828216039080821115614cf057614cf0614c71565b5092915050565b805169ffffffffffffffffffff8116811461124257600080fd5b600080600080600060a08688031215614d2957600080fd5b614d3286614cf7565b9450602086015193506040860151925060608601519150614d5560808701614cf7565b90509295509295909350565b8181038181111561069a5761069a614c71565b600060208284031215614d8657600080fd5b8151613e0f81614653565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203614df157614df1614c71565b5060010190565b68ffffffffffffffffff811681146129e457600080fd5b803561124281614df8565b60006101608236031215614e2d57600080fd5b614e35614147565b823567ffffffffffffffff811115614e4c57600080fd5b614e58368286016141ba565b82525060208301356020820152614e716040840161429f565b6040820152614e82606084016142c4565b6060820152614e9360808401614e0f565b6080820152614ea460a08401614648565b60a0820152614eb560c08401614648565b60c0820152614ec660e084016145f7565b60e0820152610100614ed9818501614620565b90820152610120614eeb848201614648565b90820152610140614efd84820161429f565b9082015292915050565b600060208284031215614f1957600080fd5b8135613e0f81614632565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112614f5957600080fd5b83018035915067ffffffffffffffff821115614f7457600080fd5b6020019150368190038213156132ea57600080fd5b600060208284031215614f9b57600080fd5b613e0f82614620565b600060208284031215614fb657600080fd5b8135613e0f816145e5565b73ffffffffffffffffffffffffffffffffffffffff8a8116825267ffffffffffffffff8a166020830152881660408201526102406060820181905281018690526000610260878982850137600083890182015261ffff8716608084015260a0830186905263ffffffff851660c0840152601f88017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016830101905061506960e08301846143c1565b9a9950505050505050505050565b60ff818116838216019081111561069a5761069a614c71565b600060ff8316806150a3576150a3614c42565b8060ff84160491505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b8183823760009101908152919050565b828152606082602083013760800192915050565b808202811582820484141761069a5761069a614c71565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b63ffffffff818116838216019080821115614cf057614cf0614c71565b600061012063ffffffff808d1684528b6020850152808b166040850152508060608401526151988184018a614308565b905082810360808401526151ac8189614308565b905060ff871660a084015282810360c08401526151c98187614091565b905067ffffffffffffffff851660e08401528281036101008401526151ee8185614091565b9c9b505050505050505050505050565b805161124281614df8565b60006020828403121561521b57600080fd5b8151613e0f81614df8565b600181815b8085111561527f57817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0482111561526557615265614c71565b8085161561527257918102915b93841c939080029061522b565b509250929050565b6000826152965750600161069a565b816152a35750600061069a565b81600181146152b957600281146152c3576152df565b600191505061069a565b60ff8411156152d4576152d4614c71565b50506001821b61069a565b5060208310610133831016604e8410600b8410161715615302575081810a61069a565b61530c8383615226565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0482111561533e5761533e614c71565b029392505050565b6000613e0f60ff841683615287565b60008261536457615364614c42565b500490565b6bffffffffffffffffffffffff818116838216019080821115614cf057614cf0614c71565b6bffffffffffffffffffffffff81811683821602808216919082811461489a5761489a614c71565b8082018082111561069a5761069a614c71565b67ffffffffffffffff818116838216019080821115614cf057614cf0614c71565b600082601f8301126153fb57600080fd5b8135602061540b61495783614912565b82815260059290921b8401810191818101908684111561542a57600080fd5b8286015b8481101561499f578035835291830191830161542e565b600082601f83011261545657600080fd5b8135602061546661495783614912565b82815260059290921b8401810191818101908684111561548557600080fd5b8286015b8481101561499f57803567ffffffffffffffff8111156154a95760008081fd5b6154b78986838b01016141ba565b845250918301918301615489565b600080600080600060a086880312156154dd57600080fd5b853567ffffffffffffffff808211156154f557600080fd5b61550189838a016153ea565b9650602088013591508082111561551757600080fd5b61552389838a01615445565b9550604088013591508082111561553957600080fd5b61554589838a01615445565b9450606088013591508082111561555b57600080fd5b61556789838a01615445565b9350608088013591508082111561557d57600080fd5b5061558a88828901615445565b9150509295509295909350565b60006101208b835273ffffffffffffffffffffffffffffffffffffffff8b16602084015267ffffffffffffffff808b1660408501528160608501526155de8285018b614308565b915083820360808501526155f2828a614308565b915060ff881660a085015283820360c085015261560f8288614091565b90861660e085015283810361010085015290506151ee8185614091565b80516112428161427d565b8051611242816142aa565b805161124281614632565b8051611242816145e5565b805161124281614602565b6000610160828403121561567657600080fd5b61567e614147565b8251815261568e6020840161562c565b602082015261569f60408401615637565b60408201526156b06060840161562c565b60608201526156c160808401615642565b60808201526156d260a0840161564d565b60a08201526156e360c084016151fe565b60c08201526156f460e084016151fe565b60e0820152610100615707818501615658565b90820152610120615719848201615658565b9082015261014061477a84820161564d565b64ffffffffff818116838216019080821115614cf057614cf0614c71565b600061020080835261575d8184018a614091565b905082810360208401526157718189614091565b6bffffffffffffffffffffffff88811660408601528716606085015273ffffffffffffffffffffffffffffffffffffffff8616608085015291506157ba905060a08301846143c1565b979650505050505050565b600080604083850312156157d857600080fd5b8251600781106157e757600080fd5b60208401519092506142fd816142aa565b60006020828403121561580a57600080fd5b5051919050565b6000835161582381846020880161406d565b83519083019061583781836020880161406d565b01949350505050565b60006020828403121561585257600080fd5b8151613e0f8161427d56fe307866666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666a164736f6c6343000813000a", } var FunctionsCoordinatorABI = FunctionsCoordinatorMetaData.ABI diff --git a/core/gethwrappers/functions/generation/generated-wrapper-dependency-versions-do-not-edit.txt b/core/gethwrappers/functions/generation/generated-wrapper-dependency-versions-do-not-edit.txt index 7f441a59284..70ac49d79d3 100644 --- a/core/gethwrappers/functions/generation/generated-wrapper-dependency-versions-do-not-edit.txt +++ b/core/gethwrappers/functions/generation/generated-wrapper-dependency-versions-do-not-edit.txt @@ -1,10 +1,10 @@ GETH_VERSION: 1.13.8 functions: ../../../contracts/solc/v0.8.19/functions/v1_X/FunctionsRequest.abi ../../../contracts/solc/v0.8.19/functions/v1_X/FunctionsRequest.bin 3c972870b0afeb6d73a29ebb182f24956a2cebb127b21c4f867d1ecf19a762db -functions_allow_list: ../../../contracts/solc/v0.8.19/functions/v1_X/TermsOfServiceAllowList.abi ../../../contracts/solc/v0.8.19/functions/v1_X/TermsOfServiceAllowList.bin 0c2156289e11f884ca6e92bf851192d3917c9094a0a301bcefa61266678d0e57 +functions_allow_list: ../../../contracts/solc/v0.8.19/functions/v1_X/TermsOfServiceAllowList.abi ../../../contracts/solc/v0.8.19/functions/v1_X/TermsOfServiceAllowList.bin 268de8b3c061b53a1a2a1ccc0149eff68545959e29cd41b5f2e9f5dab19075cf functions_billing_registry_events_mock: ../../../contracts/solc/v0.8.6/functions/v0_0_0/FunctionsBillingRegistryEventsMock.abi ../../../contracts/solc/v0.8.6/functions/v0_0_0/FunctionsBillingRegistryEventsMock.bin 50deeb883bd9c3729702be335c0388f9d8553bab4be5e26ecacac496a89e2b77 functions_client: ../../../contracts/solc/v0.8.19/functions/v1_X/FunctionsClient.abi ../../../contracts/solc/v0.8.19/functions/v1_X/FunctionsClient.bin 2368f537a04489c720a46733f8596c4fc88a31062ecfa966d05f25dd98608aca functions_client_example: ../../../contracts/solc/v0.8.19/functions/v1_X/FunctionsClientExample.abi ../../../contracts/solc/v0.8.19/functions/v1_X/FunctionsClientExample.bin abf32e69f268f40e8530eb8d8e96bf310b798a4c0049a58022d9d2fb527b601b -functions_coordinator: ../../../contracts/solc/v0.8.19/functions/v1_X/FunctionsCoordinator.abi ../../../contracts/solc/v0.8.19/functions/v1_X/FunctionsCoordinator.bin 292d4742d039a154ed7875a0167c9725e2a90674ad9a05f152377819bb991082 +functions_coordinator: ../../../contracts/solc/v0.8.19/functions/v1_X/FunctionsCoordinator.abi ../../../contracts/solc/v0.8.19/functions/v1_X/FunctionsCoordinator.bin 97a625c7ce8c8c167faad5e532a5894a52af5dee722b2da7e7528f5eaa32a0fe functions_load_test_client: ../../../contracts/solc/v0.8.19/functions/v1_X/FunctionsLoadTestClient.abi ../../../contracts/solc/v0.8.19/functions/v1_X/FunctionsLoadTestClient.bin c8dbbd5ebb34435800d6674700068837c3a252db60046a14b0e61e829db517de functions_oracle_events_mock: ../../../contracts/solc/v0.8.6/functions/v0_0_0/FunctionsOracleEventsMock.abi ../../../contracts/solc/v0.8.6/functions/v0_0_0/FunctionsOracleEventsMock.bin 3ca70f966f8fe751987f0ccb50bebb6aa5be77e4a9f835d1ae99e0e9bfb7d52c functions_router: ../../../contracts/solc/v0.8.19/functions/v1_X/FunctionsRouter.abi ../../../contracts/solc/v0.8.19/functions/v1_X/FunctionsRouter.bin 1f6d18f9e0846ad74b37a0a6acef5942ab73ace1e84307f201899f69e732e776 diff --git a/core/gethwrappers/generated/automation_compatible_utils/automation_compatible_utils.go b/core/gethwrappers/generated/automation_compatible_utils/automation_compatible_utils.go new file mode 100644 index 00000000000..0190a40bfca --- /dev/null +++ b/core/gethwrappers/generated/automation_compatible_utils/automation_compatible_utils.go @@ -0,0 +1,290 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package automation_compatible_utils + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +type IAutomationV21PlusCommonConditionalTrigger struct { + BlockNum uint32 + BlockHash [32]byte +} + +type IAutomationV21PlusCommonLogTrigger struct { + LogBlockHash [32]byte + TxHash [32]byte + LogIndex uint32 + BlockNum uint32 + BlockHash [32]byte +} + +type IAutomationV21PlusCommonLogTriggerConfig struct { + ContractAddress common.Address + FilterSelector uint8 + Topic0 [32]byte + Topic1 [32]byte + Topic2 [32]byte + Topic3 [32]byte +} + +type IAutomationV21PlusCommonReport struct { + FastGasWei *big.Int + LinkNative *big.Int + UpkeepIds []*big.Int + GasLimits []*big.Int + Triggers [][]byte + PerformDatas [][]byte +} + +type Log struct { + Index *big.Int + Timestamp *big.Int + TxHash [32]byte + BlockNumber *big.Int + BlockHash [32]byte + Source common.Address + Topics [][32]byte + Data []byte +} + +var AutomationCompatibleUtilsMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"blockNum\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"}],\"internalType\":\"structIAutomationV21PlusCommon.ConditionalTrigger\",\"name\":\"\",\"type\":\"tuple\"}],\"name\":\"_conditionalTrigger\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"txHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"source\",\"type\":\"address\"},{\"internalType\":\"bytes32[]\",\"name\":\"topics\",\"type\":\"bytes32[]\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"internalType\":\"structLog\",\"name\":\"\",\"type\":\"tuple\"}],\"name\":\"_log\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"logBlockHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"txHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"logIndex\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blockNum\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"}],\"internalType\":\"structIAutomationV21PlusCommon.LogTrigger\",\"name\":\"\",\"type\":\"tuple\"}],\"name\":\"_logTrigger\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"filterSelector\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"topic0\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"topic1\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"topic2\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"topic3\",\"type\":\"bytes32\"}],\"internalType\":\"structIAutomationV21PlusCommon.LogTriggerConfig\",\"name\":\"\",\"type\":\"tuple\"}],\"name\":\"_logTriggerConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"fastGasWei\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"linkNative\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"upkeepIds\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"gasLimits\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes[]\",\"name\":\"triggers\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes[]\",\"name\":\"performDatas\",\"type\":\"bytes[]\"}],\"internalType\":\"structIAutomationV21PlusCommon.Report\",\"name\":\"\",\"type\":\"tuple\"}],\"name\":\"_report\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Bin: "0x608060405234801561001057600080fd5b50610672806100206000396000f3fe608060405234801561001057600080fd5b50600436106100675760003560e01c8063776f306111610050578063776f30611461008d578063e65d65461461009b578063e9720a49146100a957600080fd5b806321f373d71461006c5780634b6df2941461007f575b600080fd5b61007d61007a3660046101ab565b50565b005b61007d61007a366004610231565b61007d61007a366004610288565b61007d61007a3660046104a3565b61007d61007a366004610590565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60405160c0810167ffffffffffffffff81118282101715610109576101096100b7565b60405290565b604051610100810167ffffffffffffffff81118282101715610109576101096100b7565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff8111828210171561017a5761017a6100b7565b604052919050565b803573ffffffffffffffffffffffffffffffffffffffff811681146101a657600080fd5b919050565b600060c082840312156101bd57600080fd5b6101c56100e6565b6101ce83610182565b8152602083013560ff811681146101e457600080fd5b8060208301525060408301356040820152606083013560608201526080830135608082015260a083013560a08201528091505092915050565b803563ffffffff811681146101a657600080fd5b60006040828403121561024357600080fd5b6040516040810181811067ffffffffffffffff82111715610266576102666100b7565b6040526102728361021d565b8152602083013560208201528091505092915050565b600060a0828403121561029a57600080fd5b60405160a0810181811067ffffffffffffffff821117156102bd576102bd6100b7565b806040525082358152602083013560208201526102dc6040840161021d565b60408201526102ed6060840161021d565b6060820152608083013560808201528091505092915050565b600067ffffffffffffffff821115610320576103206100b7565b5060051b60200190565b600082601f83011261033b57600080fd5b8135602061035061034b83610306565b610133565b82815260059290921b8401810191818101908684111561036f57600080fd5b8286015b8481101561038a5780358352918301918301610373565b509695505050505050565b600082601f8301126103a657600080fd5b813567ffffffffffffffff8111156103c0576103c06100b7565b6103f160207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601610133565b81815284602083860101111561040657600080fd5b816020850160208301376000918101602001919091529392505050565b600082601f83011261043457600080fd5b8135602061044461034b83610306565b82815260059290921b8401810191818101908684111561046357600080fd5b8286015b8481101561038a57803567ffffffffffffffff8111156104875760008081fd5b6104958986838b0101610395565b845250918301918301610467565b6000602082840312156104b557600080fd5b813567ffffffffffffffff808211156104cd57600080fd5b9083019060c082860312156104e157600080fd5b6104e96100e6565b823581526020830135602082015260408301358281111561050957600080fd5b6105158782860161032a565b60408301525060608301358281111561052d57600080fd5b6105398782860161032a565b60608301525060808301358281111561055157600080fd5b61055d87828601610423565b60808301525060a08301358281111561057557600080fd5b61058187828601610423565b60a08301525095945050505050565b6000602082840312156105a257600080fd5b813567ffffffffffffffff808211156105ba57600080fd5b9083019061010082860312156105cf57600080fd5b6105d761010f565b823581526020830135602082015260408301356040820152606083013560608201526080830135608082015261060f60a08401610182565b60a082015260c08301358281111561062657600080fd5b6106328782860161032a565b60c08301525060e08301358281111561064a57600080fd5b61065687828601610395565b60e0830152509594505050505056fea164736f6c6343000813000a", +} + +var AutomationCompatibleUtilsABI = AutomationCompatibleUtilsMetaData.ABI + +var AutomationCompatibleUtilsBin = AutomationCompatibleUtilsMetaData.Bin + +func DeployAutomationCompatibleUtils(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *AutomationCompatibleUtils, error) { + parsed, err := AutomationCompatibleUtilsMetaData.GetAbi() + if err != nil { + return common.Address{}, nil, nil, err + } + if parsed == nil { + return common.Address{}, nil, nil, errors.New("GetABI returned nil") + } + + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(AutomationCompatibleUtilsBin), backend) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &AutomationCompatibleUtils{address: address, abi: *parsed, AutomationCompatibleUtilsCaller: AutomationCompatibleUtilsCaller{contract: contract}, AutomationCompatibleUtilsTransactor: AutomationCompatibleUtilsTransactor{contract: contract}, AutomationCompatibleUtilsFilterer: AutomationCompatibleUtilsFilterer{contract: contract}}, nil +} + +type AutomationCompatibleUtils struct { + address common.Address + abi abi.ABI + AutomationCompatibleUtilsCaller + AutomationCompatibleUtilsTransactor + AutomationCompatibleUtilsFilterer +} + +type AutomationCompatibleUtilsCaller struct { + contract *bind.BoundContract +} + +type AutomationCompatibleUtilsTransactor struct { + contract *bind.BoundContract +} + +type AutomationCompatibleUtilsFilterer struct { + contract *bind.BoundContract +} + +type AutomationCompatibleUtilsSession struct { + Contract *AutomationCompatibleUtils + CallOpts bind.CallOpts + TransactOpts bind.TransactOpts +} + +type AutomationCompatibleUtilsCallerSession struct { + Contract *AutomationCompatibleUtilsCaller + CallOpts bind.CallOpts +} + +type AutomationCompatibleUtilsTransactorSession struct { + Contract *AutomationCompatibleUtilsTransactor + TransactOpts bind.TransactOpts +} + +type AutomationCompatibleUtilsRaw struct { + Contract *AutomationCompatibleUtils +} + +type AutomationCompatibleUtilsCallerRaw struct { + Contract *AutomationCompatibleUtilsCaller +} + +type AutomationCompatibleUtilsTransactorRaw struct { + Contract *AutomationCompatibleUtilsTransactor +} + +func NewAutomationCompatibleUtils(address common.Address, backend bind.ContractBackend) (*AutomationCompatibleUtils, error) { + abi, err := abi.JSON(strings.NewReader(AutomationCompatibleUtilsABI)) + if err != nil { + return nil, err + } + contract, err := bindAutomationCompatibleUtils(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &AutomationCompatibleUtils{address: address, abi: abi, AutomationCompatibleUtilsCaller: AutomationCompatibleUtilsCaller{contract: contract}, AutomationCompatibleUtilsTransactor: AutomationCompatibleUtilsTransactor{contract: contract}, AutomationCompatibleUtilsFilterer: AutomationCompatibleUtilsFilterer{contract: contract}}, nil +} + +func NewAutomationCompatibleUtilsCaller(address common.Address, caller bind.ContractCaller) (*AutomationCompatibleUtilsCaller, error) { + contract, err := bindAutomationCompatibleUtils(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &AutomationCompatibleUtilsCaller{contract: contract}, nil +} + +func NewAutomationCompatibleUtilsTransactor(address common.Address, transactor bind.ContractTransactor) (*AutomationCompatibleUtilsTransactor, error) { + contract, err := bindAutomationCompatibleUtils(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &AutomationCompatibleUtilsTransactor{contract: contract}, nil +} + +func NewAutomationCompatibleUtilsFilterer(address common.Address, filterer bind.ContractFilterer) (*AutomationCompatibleUtilsFilterer, error) { + contract, err := bindAutomationCompatibleUtils(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &AutomationCompatibleUtilsFilterer{contract: contract}, nil +} + +func bindAutomationCompatibleUtils(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := AutomationCompatibleUtilsMetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +func (_AutomationCompatibleUtils *AutomationCompatibleUtilsRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _AutomationCompatibleUtils.Contract.AutomationCompatibleUtilsCaller.contract.Call(opts, result, method, params...) +} + +func (_AutomationCompatibleUtils *AutomationCompatibleUtilsRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _AutomationCompatibleUtils.Contract.AutomationCompatibleUtilsTransactor.contract.Transfer(opts) +} + +func (_AutomationCompatibleUtils *AutomationCompatibleUtilsRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _AutomationCompatibleUtils.Contract.AutomationCompatibleUtilsTransactor.contract.Transact(opts, method, params...) +} + +func (_AutomationCompatibleUtils *AutomationCompatibleUtilsCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _AutomationCompatibleUtils.Contract.contract.Call(opts, result, method, params...) +} + +func (_AutomationCompatibleUtils *AutomationCompatibleUtilsTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _AutomationCompatibleUtils.Contract.contract.Transfer(opts) +} + +func (_AutomationCompatibleUtils *AutomationCompatibleUtilsTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _AutomationCompatibleUtils.Contract.contract.Transact(opts, method, params...) +} + +func (_AutomationCompatibleUtils *AutomationCompatibleUtilsTransactor) ConditionalTrigger(opts *bind.TransactOpts, arg0 IAutomationV21PlusCommonConditionalTrigger) (*types.Transaction, error) { + return _AutomationCompatibleUtils.contract.Transact(opts, "_conditionalTrigger", arg0) +} + +func (_AutomationCompatibleUtils *AutomationCompatibleUtilsSession) ConditionalTrigger(arg0 IAutomationV21PlusCommonConditionalTrigger) (*types.Transaction, error) { + return _AutomationCompatibleUtils.Contract.ConditionalTrigger(&_AutomationCompatibleUtils.TransactOpts, arg0) +} + +func (_AutomationCompatibleUtils *AutomationCompatibleUtilsTransactorSession) ConditionalTrigger(arg0 IAutomationV21PlusCommonConditionalTrigger) (*types.Transaction, error) { + return _AutomationCompatibleUtils.Contract.ConditionalTrigger(&_AutomationCompatibleUtils.TransactOpts, arg0) +} + +func (_AutomationCompatibleUtils *AutomationCompatibleUtilsTransactor) Log(opts *bind.TransactOpts, arg0 Log) (*types.Transaction, error) { + return _AutomationCompatibleUtils.contract.Transact(opts, "_log", arg0) +} + +func (_AutomationCompatibleUtils *AutomationCompatibleUtilsSession) Log(arg0 Log) (*types.Transaction, error) { + return _AutomationCompatibleUtils.Contract.Log(&_AutomationCompatibleUtils.TransactOpts, arg0) +} + +func (_AutomationCompatibleUtils *AutomationCompatibleUtilsTransactorSession) Log(arg0 Log) (*types.Transaction, error) { + return _AutomationCompatibleUtils.Contract.Log(&_AutomationCompatibleUtils.TransactOpts, arg0) +} + +func (_AutomationCompatibleUtils *AutomationCompatibleUtilsTransactor) LogTrigger(opts *bind.TransactOpts, arg0 IAutomationV21PlusCommonLogTrigger) (*types.Transaction, error) { + return _AutomationCompatibleUtils.contract.Transact(opts, "_logTrigger", arg0) +} + +func (_AutomationCompatibleUtils *AutomationCompatibleUtilsSession) LogTrigger(arg0 IAutomationV21PlusCommonLogTrigger) (*types.Transaction, error) { + return _AutomationCompatibleUtils.Contract.LogTrigger(&_AutomationCompatibleUtils.TransactOpts, arg0) +} + +func (_AutomationCompatibleUtils *AutomationCompatibleUtilsTransactorSession) LogTrigger(arg0 IAutomationV21PlusCommonLogTrigger) (*types.Transaction, error) { + return _AutomationCompatibleUtils.Contract.LogTrigger(&_AutomationCompatibleUtils.TransactOpts, arg0) +} + +func (_AutomationCompatibleUtils *AutomationCompatibleUtilsTransactor) LogTriggerConfig(opts *bind.TransactOpts, arg0 IAutomationV21PlusCommonLogTriggerConfig) (*types.Transaction, error) { + return _AutomationCompatibleUtils.contract.Transact(opts, "_logTriggerConfig", arg0) +} + +func (_AutomationCompatibleUtils *AutomationCompatibleUtilsSession) LogTriggerConfig(arg0 IAutomationV21PlusCommonLogTriggerConfig) (*types.Transaction, error) { + return _AutomationCompatibleUtils.Contract.LogTriggerConfig(&_AutomationCompatibleUtils.TransactOpts, arg0) +} + +func (_AutomationCompatibleUtils *AutomationCompatibleUtilsTransactorSession) LogTriggerConfig(arg0 IAutomationV21PlusCommonLogTriggerConfig) (*types.Transaction, error) { + return _AutomationCompatibleUtils.Contract.LogTriggerConfig(&_AutomationCompatibleUtils.TransactOpts, arg0) +} + +func (_AutomationCompatibleUtils *AutomationCompatibleUtilsTransactor) Report(opts *bind.TransactOpts, arg0 IAutomationV21PlusCommonReport) (*types.Transaction, error) { + return _AutomationCompatibleUtils.contract.Transact(opts, "_report", arg0) +} + +func (_AutomationCompatibleUtils *AutomationCompatibleUtilsSession) Report(arg0 IAutomationV21PlusCommonReport) (*types.Transaction, error) { + return _AutomationCompatibleUtils.Contract.Report(&_AutomationCompatibleUtils.TransactOpts, arg0) +} + +func (_AutomationCompatibleUtils *AutomationCompatibleUtilsTransactorSession) Report(arg0 IAutomationV21PlusCommonReport) (*types.Transaction, error) { + return _AutomationCompatibleUtils.Contract.Report(&_AutomationCompatibleUtils.TransactOpts, arg0) +} + +func (_AutomationCompatibleUtils *AutomationCompatibleUtils) Address() common.Address { + return _AutomationCompatibleUtils.address +} + +type AutomationCompatibleUtilsInterface interface { + ConditionalTrigger(opts *bind.TransactOpts, arg0 IAutomationV21PlusCommonConditionalTrigger) (*types.Transaction, error) + + Log(opts *bind.TransactOpts, arg0 Log) (*types.Transaction, error) + + LogTrigger(opts *bind.TransactOpts, arg0 IAutomationV21PlusCommonLogTrigger) (*types.Transaction, error) + + LogTriggerConfig(opts *bind.TransactOpts, arg0 IAutomationV21PlusCommonLogTriggerConfig) (*types.Transaction, error) + + Report(opts *bind.TransactOpts, arg0 IAutomationV21PlusCommonReport) (*types.Transaction, error) + + Address() common.Address +} diff --git a/core/gethwrappers/generated/automation_registrar_wrapper2_2/automation_registrar_wrapper2_2.go b/core/gethwrappers/generated/automation_registrar_wrapper2_2/automation_registrar_wrapper2_2.go deleted file mode 100644 index 0236c229fa9..00000000000 --- a/core/gethwrappers/generated/automation_registrar_wrapper2_2/automation_registrar_wrapper2_2.go +++ /dev/null @@ -1,1685 +0,0 @@ -// Code generated - DO NOT EDIT. -// This file is a generated binding and any manual changes will be lost. - -package automation_registrar_wrapper2_2 - -import ( - "errors" - "fmt" - "math/big" - "strings" - - ethereum "github.com/ethereum/go-ethereum" - "github.com/ethereum/go-ethereum/accounts/abi" - "github.com/ethereum/go-ethereum/accounts/abi/bind" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/event" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated" -) - -var ( - _ = errors.New - _ = big.NewInt - _ = strings.NewReader - _ = ethereum.NotFound - _ = bind.Bind - _ = common.Big1 - _ = types.BloomLookup - _ = event.NewSubscription - _ = abi.ConvertType -) - -type AutomationRegistrar22InitialTriggerConfig struct { - TriggerType uint8 - AutoApproveType uint8 - AutoApproveMaxAllowed uint32 -} - -type AutomationRegistrar22RegistrationParams struct { - Name string - EncryptedEmail []byte - UpkeepContract common.Address - GasLimit uint32 - AdminAddress common.Address - TriggerType uint8 - CheckData []byte - TriggerConfig []byte - OffchainConfig []byte - Amount *big.Int -} - -type AutomationRegistrar22TriggerRegistrationStorage struct { - AutoApproveType uint8 - AutoApproveMaxAllowed uint32 - ApprovedCount uint32 -} - -var AutomationRegistrarMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"LINKAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"AutomationRegistry\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"minLINKJuels\",\"type\":\"uint96\"},{\"components\":[{\"internalType\":\"uint8\",\"name\":\"triggerType\",\"type\":\"uint8\"},{\"internalType\":\"enumAutomationRegistrar2_2.AutoApproveType\",\"name\":\"autoApproveType\",\"type\":\"uint8\"},{\"internalType\":\"uint32\",\"name\":\"autoApproveMaxAllowed\",\"type\":\"uint32\"}],\"internalType\":\"structAutomationRegistrar2_2.InitialTriggerConfig[]\",\"name\":\"triggerConfigs\",\"type\":\"tuple[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AmountMismatch\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FunctionNotPermitted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"HashMismatch\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficientPayment\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidAdminAddress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidDataLength\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"LinkTransferFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyAdminOrOwner\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyLink\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RegistrationRequestFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RequestNotFound\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SenderMismatch\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"senderAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"allowed\",\"type\":\"bool\"}],\"name\":\"AutoApproveAllowedSenderSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"AutomationRegistry\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"minLINKJuels\",\"type\":\"uint96\"}],\"name\":\"ConfigChanged\",\"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\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"displayName\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"RegistrationApproved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"}],\"name\":\"RegistrationRejected\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"encryptedEmail\",\"type\":\"bytes\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"upkeepContract\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"adminAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"triggerType\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"triggerConfig\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"offchainConfig\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"checkData\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"RegistrationRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"triggerType\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"enumAutomationRegistrar2_2.AutoApproveType\",\"name\":\"autoApproveType\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"autoApproveMaxAllowed\",\"type\":\"uint32\"}],\"name\":\"TriggerConfigSet\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"LINK\",\"outputs\":[{\"internalType\":\"contractLinkTokenInterface\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"upkeepContract\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"adminAddress\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"triggerType\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"checkData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"triggerConfig\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"offchainConfig\",\"type\":\"bytes\"},{\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"}],\"name\":\"approve\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"}],\"name\":\"cancel\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"senderAddress\",\"type\":\"address\"}],\"name\":\"getAutoApproveAllowedSender\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getConfig\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"AutomationRegistry\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"minLINKJuels\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"}],\"name\":\"getPendingRequest\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"triggerType\",\"type\":\"uint8\"}],\"name\":\"getTriggerRegistrationDetails\",\"outputs\":[{\"components\":[{\"internalType\":\"enumAutomationRegistrar2_2.AutoApproveType\",\"name\":\"autoApproveType\",\"type\":\"uint8\"},{\"internalType\":\"uint32\",\"name\":\"autoApproveMaxAllowed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"approvedCount\",\"type\":\"uint32\"}],\"internalType\":\"structAutomationRegistrar2_2.TriggerRegistrationStorage\",\"name\":\"\",\"type\":\"tuple\"}],\"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\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"bytes\",\"name\":\"encryptedEmail\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"upkeepContract\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"adminAddress\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"triggerType\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"checkData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"triggerConfig\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"offchainConfig\",\"type\":\"bytes\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"register\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"bytes\",\"name\":\"encryptedEmail\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"upkeepContract\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"adminAddress\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"triggerType\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"checkData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"triggerConfig\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"offchainConfig\",\"type\":\"bytes\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"internalType\":\"structAutomationRegistrar2_2.RegistrationParams\",\"name\":\"requestParams\",\"type\":\"tuple\"}],\"name\":\"registerUpkeep\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"senderAddress\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"allowed\",\"type\":\"bool\"}],\"name\":\"setAutoApproveAllowedSender\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"AutomationRegistry\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"minLINKJuels\",\"type\":\"uint96\"}],\"name\":\"setConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"triggerType\",\"type\":\"uint8\"},{\"internalType\":\"enumAutomationRegistrar2_2.AutoApproveType\",\"name\":\"autoApproveType\",\"type\":\"uint8\"},{\"internalType\":\"uint32\",\"name\":\"autoApproveMaxAllowed\",\"type\":\"uint32\"}],\"name\":\"setTriggerConfig\",\"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\":\"view\",\"type\":\"function\"}]", - Bin: "0x60a06040523480156200001157600080fd5b5060405162002d8238038062002d8283398101604081905262000034916200043b565b33806000816200008b5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000be57620000be816200017a565b5050506001600160a01b038416608052620000da838362000225565b60005b81518110156200016f576200015a82828151811062000100576200010062000598565b60200260200101516000015183838151811062000121576200012162000598565b60200260200101516020015184848151811062000142576200014262000598565b6020026020010151604001516200029e60201b60201c565b806200016681620005ae565b915050620000dd565b50505050506200062f565b336001600160a01b03821603620001d45760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000082565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6200022f6200034c565b6040805180820182526001600160a01b0384168082526001600160601b0384166020928301819052600160a01b810282176004558351918252918101919091527f39ce5d867555f0b0183e358fce5b158e7ca4fecd7c01cb7e0e19f1e23285838a910160405180910390a15050565b620002a86200034c565b60ff83166000908152600360205260409020805483919060ff19166001836002811115620002da57620002da620005d6565b021790555060ff831660009081526003602052604090819020805464ffffffff00191661010063ffffffff851602179055517f830a6d06a4e2caac67eba04323de22bdb04f032dd8b3d6a0c52b503d9a7036a3906200033f90859085908590620005ec565b60405180910390a1505050565b6000546001600160a01b03163314620003a85760405162461bcd60e51b815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e657200000000000000000000604482015260640162000082565b565b80516001600160a01b0381168114620003c257600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b604051606081016001600160401b0381118282101715620004025762000402620003c7565b60405290565b604051601f8201601f191681016001600160401b0381118282101715620004335762000433620003c7565b604052919050565b600080600080608085870312156200045257600080fd5b6200045d85620003aa565b935060206200046e818701620003aa565b604087810151919550906001600160601b03811681146200048e57600080fd5b606088810151919550906001600160401b0380821115620004ae57600080fd5b818a0191508a601f830112620004c357600080fd5b815181811115620004d857620004d8620003c7565b620004e8868260051b0162000408565b818152868101925090840283018601908c8211156200050657600080fd5b928601925b81841015620005875784848e031215620005255760008081fd5b6200052f620003dd565b845160ff81168114620005425760008081fd5b81528488015160038110620005575760008081fd5b818901528487015163ffffffff81168114620005735760008081fd5b81880152835292840192918601916200050b565b999c989b5096995050505050505050565b634e487b7160e01b600052603260045260246000fd5b600060018201620005cf57634e487b7160e01b600052601160045260246000fd5b5060010190565b634e487b7160e01b600052602160045260246000fd5b60ff8416815260608101600384106200061557634e487b7160e01b600052602160045260246000fd5b83602083015263ffffffff83166040830152949350505050565b6080516127146200066e60003960008181610177015281816105d601528181610887015281816109bd01528181610f0e015261171b01526127146000f3fe608060405234801561001057600080fd5b506004361061011b5760003560e01c8063856853e6116100b2578063b5ff5b4111610081578063c4d252f511610066578063c4d252f5146103e3578063e8d4070d146103f6578063f2fde38b1461040957600080fd5b8063b5ff5b4114610369578063c3f909d41461037c57600080fd5b8063856853e61461027857806388b12d551461028b5780638da5cb5b14610338578063a4c0ed361461035657600080fd5b80633f678e11116100ee5780633f678e11146101f35780636c4cdfc31461021457806379ba5097146102275780637e776f7f1461022f57600080fd5b8063181f5a77146101205780631b6b6d2314610172578063212d0884146101be578063367b9b4f146101de575b600080fd5b61015c6040518060400160405280601981526020017f4175746f6d6174696f6e52656769737472617220322e312e300000000000000081525081565b6040516101699190611a74565b60405180910390f35b6101997f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610169565b6101d16101cc366004611aa4565b61041c565b6040516101699190611b29565b6101f16101ec366004611b9d565b6104a9565b005b610206610201366004611bd6565b61053b565b604051908152602001610169565b6101f1610222366004611c2e565b6106d3565b6101f161076d565b61026861023d366004611c63565b73ffffffffffffffffffffffffffffffffffffffff1660009081526005602052604090205460ff1690565b6040519015158152602001610169565b6101f1610286366004611de1565b61086f565b6102ff610299366004611f40565b60009081526002602090815260409182902082518084019093525473ffffffffffffffffffffffffffffffffffffffff8116808452740100000000000000000000000000000000000000009091046bffffffffffffffffffffffff169290910182905291565b6040805173ffffffffffffffffffffffffffffffffffffffff90931683526bffffffffffffffffffffffff909116602083015201610169565b60005473ffffffffffffffffffffffffffffffffffffffff16610199565b6101f1610364366004611f59565b6109a5565b6101f1610377366004611fb5565b610ce3565b60408051808201825260045473ffffffffffffffffffffffffffffffffffffffff8116808352740100000000000000000000000000000000000000009091046bffffffffffffffffffffffff16602092830181905283519182529181019190915201610169565b6101f16103f1366004611f40565b610dc2565b6101f1610404366004611ffe565b61104c565b6101f1610417366004611c63565b6112d9565b60408051606080820183526000808352602080840182905283850182905260ff86811683526003909152908490208451928301909452835492939192839116600281111561046c5761046c611abf565b600281111561047d5761047d611abf565b8152905463ffffffff610100820481166020840152650100000000009091041660409091015292915050565b6104b16112ed565b73ffffffffffffffffffffffffffffffffffffffff821660008181526005602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001685151590811790915591519182527f20c6237dac83526a849285a9f79d08a483291bdd3a056a0ef9ae94ecee1ad356910160405180910390a25050565b6004546000907401000000000000000000000000000000000000000090046bffffffffffffffffffffffff1661057961014084016101208501612109565b6bffffffffffffffffffffffff1610156105bf576040517fcd1c886700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000166323b872dd333061060f61014087016101208801612109565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b16815273ffffffffffffffffffffffffffffffffffffffff93841660048201529290911660248301526bffffffffffffffffffffffff1660448201526064016020604051808303816000875af1158015610696573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106ba9190612124565b506106cd6106c783612141565b33611370565b92915050565b6106db6112ed565b60408051808201825273ffffffffffffffffffffffffffffffffffffffff84168082526bffffffffffffffffffffffff8416602092830181905274010000000000000000000000000000000000000000810282176004558351918252918101919091527f39ce5d867555f0b0183e358fce5b158e7ca4fecd7c01cb7e0e19f1e23285838a910160405180910390a15050565b60015473ffffffffffffffffffffffffffffffffffffffff1633146107f3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e65720000000000000000000060448201526064015b60405180910390fd5b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016146108de576040517f018d10be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6109966040518061014001604052808e81526020018d8d8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050509082525073ffffffffffffffffffffffffffffffffffffffff808d16602083015263ffffffff8c1660408301528a16606082015260ff8916608082015260a0810188905260c0810187905260e081018690526bffffffffffffffffffffffff85166101009091015282611370565b50505050505050505050505050565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610a14576040517f018d10be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81818080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505060208101517fffffffff0000000000000000000000000000000000000000000000000000000081167f856853e60000000000000000000000000000000000000000000000000000000014610aca576040517fe3d6792100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8484846000610adc8260048186612276565b810190610ae991906122a0565b509950505050505050505050806bffffffffffffffffffffffff168414610b3c576040517f55e97b0d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8988886000610b4e8260048186612276565b810190610b5b91906122a0565b9a50505050505050505050508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614610bcc576040517ff8c5638e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6004547401000000000000000000000000000000000000000090046bffffffffffffffffffffffff168d1015610c2e576040517fcd1c886700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60003073ffffffffffffffffffffffffffffffffffffffff168d8d604051610c579291906123dd565b600060405180830381855af49150503d8060008114610c92576040519150601f19603f3d011682016040523d82523d6000602084013e610c97565b606091505b5050905080610cd2576040517f649bf81000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050505050505050505050505050565b610ceb6112ed565b60ff8316600090815260036020526040902080548391907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001836002811115610d3857610d38611abf565b021790555060ff83166000908152600360205260409081902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000ff1661010063ffffffff851602179055517f830a6d06a4e2caac67eba04323de22bdb04f032dd8b3d6a0c52b503d9a7036a390610db5908590859085906123ed565b60405180910390a1505050565b60008181526002602090815260409182902082518084019093525473ffffffffffffffffffffffffffffffffffffffff8116808452740100000000000000000000000000000000000000009091046bffffffffffffffffffffffff1691830191909152331480610e49575060005473ffffffffffffffffffffffffffffffffffffffff1633145b610e7f576040517f61685c2b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805173ffffffffffffffffffffffffffffffffffffffff16610ecd576040517f4b13b31e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082815260026020908152604080832083905583519184015190517fa9059cbb0000000000000000000000000000000000000000000000000000000081527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169263a9059cbb92610f859260040173ffffffffffffffffffffffffffffffffffffffff9290921682526bffffffffffffffffffffffff16602082015260400190565b6020604051808303816000875af1158015610fa4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fc89190612124565b90508061101c5781516040517fc2e4dce800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911660048201526024016107ea565b60405183907f3663fb28ebc87645eb972c9dad8521bf665c623f287e79f1c56f1eb374b82a2290600090a2505050565b6110546112ed565b60008181526002602090815260409182902082518084019093525473ffffffffffffffffffffffffffffffffffffffff8116808452740100000000000000000000000000000000000000009091046bffffffffffffffffffffffff16918301919091526110ed576040517f4b13b31e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008b8b8b8b8b8b8b8b8b60405160200161111099989796959493929190612461565b604051602081830303815290604052805190602001209050808314611161576040517f3f4d605300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60026000848152602001908152602001600020600080820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556000820160146101000a8154906bffffffffffffffffffffffff021916905550506112c96040518061014001604052808f81526020016040518060200160405280600081525081526020018e73ffffffffffffffffffffffffffffffffffffffff1681526020018d63ffffffff1681526020018c73ffffffffffffffffffffffffffffffffffffffff1681526020018b60ff1681526020018a8a8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050509082525060208082018a905260408051601f8a0183900483028101830182528981529201919089908990819084018382808284376000920191909152505050908252506020858101516bffffffffffffffffffffffff1691015282611647565b5050505050505050505050505050565b6112e16112ed565b6112ea81611876565b50565b60005473ffffffffffffffffffffffffffffffffffffffff16331461136e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e65720000000000000000000060448201526064016107ea565b565b608082015160009073ffffffffffffffffffffffffffffffffffffffff166113c4576040517f05bb467c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008360400151846060015185608001518660a001518760c001518860e0015189610100015160405160200161140097969594939291906124e7565b604051602081830303815290604052805190602001209050836040015173ffffffffffffffffffffffffffffffffffffffff16817f7684390ebb103102f7f48c71439c2408713f8d437782a6fab2756acc0e42c1b786600001518760200151886060015189608001518a60a001518b60e001518c61010001518d60c001518e610120015160405161149999989796959493929190612569565b60405180910390a360a084015160ff9081166000908152600360205260408082208151606081019092528054929361151c9383911660028111156114df576114df611abf565b60028111156114f0576114f0611abf565b8152905463ffffffff61010082048116602084015265010000000000909104166040909101528561196b565b156115845760a085015160ff166000908152600360205260409020805465010000000000900463ffffffff1690600561155483612653565b91906101000a81548163ffffffff021916908363ffffffff1602179055505061157d8583611647565b905061163f565b61012085015160008381526002602052604081205490916115ca917401000000000000000000000000000000000000000090046bffffffffffffffffffffffff16612676565b604080518082018252608089015173ffffffffffffffffffffffffffffffffffffffff90811682526bffffffffffffffffffffffff9384166020808401918252600089815260029091529390932091519251909316740100000000000000000000000000000000000000000291909216179055505b949350505050565b600480546040808501516060860151608087015160a088015160c089015160e08a01516101008b015196517f28f32f3800000000000000000000000000000000000000000000000000000000815260009973ffffffffffffffffffffffffffffffffffffffff909916988a988a986328f32f38986116d29891979096919590949193909291016124e7565b6020604051808303816000875af11580156116f1573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061171591906126a2565b905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16634000aea0848861012001518560405160200161176f91815260200190565b6040516020818303038152906040526040518463ffffffff1660e01b815260040161179c939291906126bb565b6020604051808303816000875af11580156117bb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117df9190612124565b905080611830576040517fc2e4dce800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff841660048201526024016107ea565b81857fb9a292fb7e3edd920cd2d2829a3615a640c43fd7de0a0820aa0668feb4c37d4b88600001516040516118659190611a74565b60405180910390a350949350505050565b3373ffffffffffffffffffffffffffffffffffffffff8216036118f5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c6600000000000000000060448201526064016107ea565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6000808351600281111561198157611981611abf565b0361198e575060006106cd565b6001835160028111156119a3576119a3611abf565b1480156119d6575073ffffffffffffffffffffffffffffffffffffffff821660009081526005602052604090205460ff16155b156119e3575060006106cd565b826020015163ffffffff16836040015163ffffffff161015611a07575060016106cd565b50600092915050565b6000815180845260005b81811015611a3657602081850181015186830182015201611a1a565b5060006020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b602081526000611a876020830184611a10565b9392505050565b803560ff81168114611a9f57600080fd5b919050565b600060208284031215611ab657600080fd5b611a8782611a8e565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60038110611b25577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b9052565b6000606082019050611b3c828451611aee565b602083015163ffffffff8082166020850152806040860151166040850152505092915050565b73ffffffffffffffffffffffffffffffffffffffff811681146112ea57600080fd5b8035611a9f81611b62565b80151581146112ea57600080fd5b60008060408385031215611bb057600080fd5b8235611bbb81611b62565b91506020830135611bcb81611b8f565b809150509250929050565b600060208284031215611be857600080fd5b813567ffffffffffffffff811115611bff57600080fd5b82016101408185031215611a8757600080fd5b80356bffffffffffffffffffffffff81168114611a9f57600080fd5b60008060408385031215611c4157600080fd5b8235611c4c81611b62565b9150611c5a60208401611c12565b90509250929050565b600060208284031215611c7557600080fd5b8135611a8781611b62565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051610140810167ffffffffffffffff81118282101715611cd357611cd3611c80565b60405290565b600082601f830112611cea57600080fd5b813567ffffffffffffffff80821115611d0557611d05611c80565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908282118183101715611d4b57611d4b611c80565b81604052838152866020858801011115611d6457600080fd5b836020870160208301376000602085830101528094505050505092915050565b60008083601f840112611d9657600080fd5b50813567ffffffffffffffff811115611dae57600080fd5b602083019150836020828501011115611dc657600080fd5b9250929050565b803563ffffffff81168114611a9f57600080fd5b6000806000806000806000806000806000806101608d8f031215611e0457600080fd5b67ffffffffffffffff8d351115611e1a57600080fd5b611e278e8e358f01611cd9565b9b5067ffffffffffffffff60208e01351115611e4257600080fd5b611e528e60208f01358f01611d84565b909b509950611e6360408e01611b84565b9850611e7160608e01611dcd565b9750611e7f60808e01611b84565b9650611e8d60a08e01611a8e565b955067ffffffffffffffff60c08e01351115611ea857600080fd5b611eb88e60c08f01358f01611cd9565b945067ffffffffffffffff60e08e01351115611ed357600080fd5b611ee38e60e08f01358f01611cd9565b935067ffffffffffffffff6101008e01351115611eff57600080fd5b611f108e6101008f01358f01611cd9565b9250611f1f6101208e01611c12565b9150611f2e6101408e01611b84565b90509295989b509295989b509295989b565b600060208284031215611f5257600080fd5b5035919050565b60008060008060608587031215611f6f57600080fd5b8435611f7a81611b62565b935060208501359250604085013567ffffffffffffffff811115611f9d57600080fd5b611fa987828801611d84565b95989497509550505050565b600080600060608486031215611fca57600080fd5b611fd384611a8e565b9250602084013560038110611fe757600080fd5b9150611ff560408501611dcd565b90509250925092565b60008060008060008060008060008060006101208c8e03121561202057600080fd5b67ffffffffffffffff808d35111561203757600080fd5b6120448e8e358f01611cd9565b9b5061205260208e01611b84565b9a5061206060408e01611dcd565b995061206e60608e01611b84565b985061207c60808e01611a8e565b97508060a08e0135111561208f57600080fd5b61209f8e60a08f01358f01611d84565b909750955060c08d01358110156120b557600080fd5b6120c58e60c08f01358f01611cd9565b94508060e08e013511156120d857600080fd5b506120e98d60e08e01358e01611d84565b81945080935050506101008c013590509295989b509295989b9093969950565b60006020828403121561211b57600080fd5b611a8782611c12565b60006020828403121561213657600080fd5b8151611a8781611b8f565b6000610140823603121561215457600080fd5b61215c611caf565b823567ffffffffffffffff8082111561217457600080fd5b61218036838701611cd9565b8352602085013591508082111561219657600080fd5b6121a236838701611cd9565b60208401526121b360408601611b84565b60408401526121c460608601611dcd565b60608401526121d560808601611b84565b60808401526121e660a08601611a8e565b60a084015260c08501359150808211156121ff57600080fd5b61220b36838701611cd9565b60c084015260e085013591508082111561222457600080fd5b61223036838701611cd9565b60e08401526101009150818501358181111561224b57600080fd5b61225736828801611cd9565b8385015250505061012061226c818501611c12565b9082015292915050565b6000808585111561228657600080fd5b8386111561229357600080fd5b5050820193919092039150565b60008060008060008060008060008060006101608c8e0312156122c257600080fd5b67ffffffffffffffff808d3511156122d957600080fd5b6122e68e8e358f01611cd9565b9b508060208e013511156122f957600080fd5b6123098e60208f01358f01611cd9565b9a5061231760408e01611b84565b995061232560608e01611dcd565b985061233360808e01611b84565b975061234160a08e01611a8e565b96508060c08e0135111561235457600080fd5b6123648e60c08f01358f01611cd9565b95508060e08e0135111561237757600080fd5b6123878e60e08f01358f01611cd9565b9450806101008e0135111561239b57600080fd5b506123ad8d6101008e01358e01611cd9565b92506123bc6101208d01611c12565b91506123cb6101408d01611b84565b90509295989b509295989b9093969950565b8183823760009101908152919050565b60ff84168152606081016124046020830185611aee565b63ffffffff83166040830152949350505050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b600073ffffffffffffffffffffffffffffffffffffffff808c16835263ffffffff8b166020840152808a1660408401525060ff8816606083015260e060808301526124b060e083018789612418565b82810360a08401526124c28187611a10565b905082810360c08401526124d7818587612418565b9c9b505050505050505050505050565b600073ffffffffffffffffffffffffffffffffffffffff808a16835263ffffffff8916602084015280881660408401525060ff8616606083015260e0608083015261253560e0830186611a10565b82810360a08401526125478186611a10565b905082810360c084015261255b8185611a10565b9a9950505050505050505050565b600061012080835261257d8184018d611a10565b90508281036020840152612591818c611a10565b905063ffffffff8a16604084015273ffffffffffffffffffffffffffffffffffffffff8916606084015260ff8816608084015282810360a08401526125d68188611a10565b905082810360c08401526125ea8187611a10565b905082810360e08401526125fe8186611a10565b9150506bffffffffffffffffffffffff83166101008301529a9950505050505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600063ffffffff80831681810361266c5761266c612624565b6001019392505050565b6bffffffffffffffffffffffff81811683821601908082111561269b5761269b612624565b5092915050565b6000602082840312156126b457600080fd5b5051919050565b73ffffffffffffffffffffffffffffffffffffffff841681526bffffffffffffffffffffffff831660208201526060604082015260006126fe6060830184611a10565b9594505050505056fea164736f6c6343000813000a", -} - -var AutomationRegistrarABI = AutomationRegistrarMetaData.ABI - -var AutomationRegistrarBin = AutomationRegistrarMetaData.Bin - -func DeployAutomationRegistrar(auth *bind.TransactOpts, backend bind.ContractBackend, LINKAddress common.Address, AutomationRegistry common.Address, minLINKJuels *big.Int, triggerConfigs []AutomationRegistrar22InitialTriggerConfig) (common.Address, *types.Transaction, *AutomationRegistrar, error) { - parsed, err := AutomationRegistrarMetaData.GetAbi() - if err != nil { - return common.Address{}, nil, nil, err - } - if parsed == nil { - return common.Address{}, nil, nil, errors.New("GetABI returned nil") - } - - address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(AutomationRegistrarBin), backend, LINKAddress, AutomationRegistry, minLINKJuels, triggerConfigs) - if err != nil { - return common.Address{}, nil, nil, err - } - return address, tx, &AutomationRegistrar{address: address, abi: *parsed, AutomationRegistrarCaller: AutomationRegistrarCaller{contract: contract}, AutomationRegistrarTransactor: AutomationRegistrarTransactor{contract: contract}, AutomationRegistrarFilterer: AutomationRegistrarFilterer{contract: contract}}, nil -} - -type AutomationRegistrar struct { - address common.Address - abi abi.ABI - AutomationRegistrarCaller - AutomationRegistrarTransactor - AutomationRegistrarFilterer -} - -type AutomationRegistrarCaller struct { - contract *bind.BoundContract -} - -type AutomationRegistrarTransactor struct { - contract *bind.BoundContract -} - -type AutomationRegistrarFilterer struct { - contract *bind.BoundContract -} - -type AutomationRegistrarSession struct { - Contract *AutomationRegistrar - CallOpts bind.CallOpts - TransactOpts bind.TransactOpts -} - -type AutomationRegistrarCallerSession struct { - Contract *AutomationRegistrarCaller - CallOpts bind.CallOpts -} - -type AutomationRegistrarTransactorSession struct { - Contract *AutomationRegistrarTransactor - TransactOpts bind.TransactOpts -} - -type AutomationRegistrarRaw struct { - Contract *AutomationRegistrar -} - -type AutomationRegistrarCallerRaw struct { - Contract *AutomationRegistrarCaller -} - -type AutomationRegistrarTransactorRaw struct { - Contract *AutomationRegistrarTransactor -} - -func NewAutomationRegistrar(address common.Address, backend bind.ContractBackend) (*AutomationRegistrar, error) { - abi, err := abi.JSON(strings.NewReader(AutomationRegistrarABI)) - if err != nil { - return nil, err - } - contract, err := bindAutomationRegistrar(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &AutomationRegistrar{address: address, abi: abi, AutomationRegistrarCaller: AutomationRegistrarCaller{contract: contract}, AutomationRegistrarTransactor: AutomationRegistrarTransactor{contract: contract}, AutomationRegistrarFilterer: AutomationRegistrarFilterer{contract: contract}}, nil -} - -func NewAutomationRegistrarCaller(address common.Address, caller bind.ContractCaller) (*AutomationRegistrarCaller, error) { - contract, err := bindAutomationRegistrar(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &AutomationRegistrarCaller{contract: contract}, nil -} - -func NewAutomationRegistrarTransactor(address common.Address, transactor bind.ContractTransactor) (*AutomationRegistrarTransactor, error) { - contract, err := bindAutomationRegistrar(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &AutomationRegistrarTransactor{contract: contract}, nil -} - -func NewAutomationRegistrarFilterer(address common.Address, filterer bind.ContractFilterer) (*AutomationRegistrarFilterer, error) { - contract, err := bindAutomationRegistrar(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &AutomationRegistrarFilterer{contract: contract}, nil -} - -func bindAutomationRegistrar(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := AutomationRegistrarMetaData.GetAbi() - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil -} - -func (_AutomationRegistrar *AutomationRegistrarRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _AutomationRegistrar.Contract.AutomationRegistrarCaller.contract.Call(opts, result, method, params...) -} - -func (_AutomationRegistrar *AutomationRegistrarRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _AutomationRegistrar.Contract.AutomationRegistrarTransactor.contract.Transfer(opts) -} - -func (_AutomationRegistrar *AutomationRegistrarRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _AutomationRegistrar.Contract.AutomationRegistrarTransactor.contract.Transact(opts, method, params...) -} - -func (_AutomationRegistrar *AutomationRegistrarCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _AutomationRegistrar.Contract.contract.Call(opts, result, method, params...) -} - -func (_AutomationRegistrar *AutomationRegistrarTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _AutomationRegistrar.Contract.contract.Transfer(opts) -} - -func (_AutomationRegistrar *AutomationRegistrarTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _AutomationRegistrar.Contract.contract.Transact(opts, method, params...) -} - -func (_AutomationRegistrar *AutomationRegistrarCaller) LINK(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _AutomationRegistrar.contract.Call(opts, &out, "LINK") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -func (_AutomationRegistrar *AutomationRegistrarSession) LINK() (common.Address, error) { - return _AutomationRegistrar.Contract.LINK(&_AutomationRegistrar.CallOpts) -} - -func (_AutomationRegistrar *AutomationRegistrarCallerSession) LINK() (common.Address, error) { - return _AutomationRegistrar.Contract.LINK(&_AutomationRegistrar.CallOpts) -} - -func (_AutomationRegistrar *AutomationRegistrarCaller) GetAutoApproveAllowedSender(opts *bind.CallOpts, senderAddress common.Address) (bool, error) { - var out []interface{} - err := _AutomationRegistrar.contract.Call(opts, &out, "getAutoApproveAllowedSender", senderAddress) - - if err != nil { - return *new(bool), err - } - - out0 := *abi.ConvertType(out[0], new(bool)).(*bool) - - return out0, err - -} - -func (_AutomationRegistrar *AutomationRegistrarSession) GetAutoApproveAllowedSender(senderAddress common.Address) (bool, error) { - return _AutomationRegistrar.Contract.GetAutoApproveAllowedSender(&_AutomationRegistrar.CallOpts, senderAddress) -} - -func (_AutomationRegistrar *AutomationRegistrarCallerSession) GetAutoApproveAllowedSender(senderAddress common.Address) (bool, error) { - return _AutomationRegistrar.Contract.GetAutoApproveAllowedSender(&_AutomationRegistrar.CallOpts, senderAddress) -} - -func (_AutomationRegistrar *AutomationRegistrarCaller) GetConfig(opts *bind.CallOpts) (GetConfig, - - error) { - var out []interface{} - err := _AutomationRegistrar.contract.Call(opts, &out, "getConfig") - - outstruct := new(GetConfig) - if err != nil { - return *outstruct, err - } - - outstruct.AutomationRegistry = *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - outstruct.MinLINKJuels = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) - - return *outstruct, err - -} - -func (_AutomationRegistrar *AutomationRegistrarSession) GetConfig() (GetConfig, - - error) { - return _AutomationRegistrar.Contract.GetConfig(&_AutomationRegistrar.CallOpts) -} - -func (_AutomationRegistrar *AutomationRegistrarCallerSession) GetConfig() (GetConfig, - - error) { - return _AutomationRegistrar.Contract.GetConfig(&_AutomationRegistrar.CallOpts) -} - -func (_AutomationRegistrar *AutomationRegistrarCaller) GetPendingRequest(opts *bind.CallOpts, hash [32]byte) (common.Address, *big.Int, error) { - var out []interface{} - err := _AutomationRegistrar.contract.Call(opts, &out, "getPendingRequest", hash) - - if err != nil { - return *new(common.Address), *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - out1 := *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) - - return out0, out1, err - -} - -func (_AutomationRegistrar *AutomationRegistrarSession) GetPendingRequest(hash [32]byte) (common.Address, *big.Int, error) { - return _AutomationRegistrar.Contract.GetPendingRequest(&_AutomationRegistrar.CallOpts, hash) -} - -func (_AutomationRegistrar *AutomationRegistrarCallerSession) GetPendingRequest(hash [32]byte) (common.Address, *big.Int, error) { - return _AutomationRegistrar.Contract.GetPendingRequest(&_AutomationRegistrar.CallOpts, hash) -} - -func (_AutomationRegistrar *AutomationRegistrarCaller) GetTriggerRegistrationDetails(opts *bind.CallOpts, triggerType uint8) (AutomationRegistrar22TriggerRegistrationStorage, error) { - var out []interface{} - err := _AutomationRegistrar.contract.Call(opts, &out, "getTriggerRegistrationDetails", triggerType) - - if err != nil { - return *new(AutomationRegistrar22TriggerRegistrationStorage), err - } - - out0 := *abi.ConvertType(out[0], new(AutomationRegistrar22TriggerRegistrationStorage)).(*AutomationRegistrar22TriggerRegistrationStorage) - - return out0, err - -} - -func (_AutomationRegistrar *AutomationRegistrarSession) GetTriggerRegistrationDetails(triggerType uint8) (AutomationRegistrar22TriggerRegistrationStorage, error) { - return _AutomationRegistrar.Contract.GetTriggerRegistrationDetails(&_AutomationRegistrar.CallOpts, triggerType) -} - -func (_AutomationRegistrar *AutomationRegistrarCallerSession) GetTriggerRegistrationDetails(triggerType uint8) (AutomationRegistrar22TriggerRegistrationStorage, error) { - return _AutomationRegistrar.Contract.GetTriggerRegistrationDetails(&_AutomationRegistrar.CallOpts, triggerType) -} - -func (_AutomationRegistrar *AutomationRegistrarCaller) Owner(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _AutomationRegistrar.contract.Call(opts, &out, "owner") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -func (_AutomationRegistrar *AutomationRegistrarSession) Owner() (common.Address, error) { - return _AutomationRegistrar.Contract.Owner(&_AutomationRegistrar.CallOpts) -} - -func (_AutomationRegistrar *AutomationRegistrarCallerSession) Owner() (common.Address, error) { - return _AutomationRegistrar.Contract.Owner(&_AutomationRegistrar.CallOpts) -} - -func (_AutomationRegistrar *AutomationRegistrarCaller) TypeAndVersion(opts *bind.CallOpts) (string, error) { - var out []interface{} - err := _AutomationRegistrar.contract.Call(opts, &out, "typeAndVersion") - - if err != nil { - return *new(string), err - } - - out0 := *abi.ConvertType(out[0], new(string)).(*string) - - return out0, err - -} - -func (_AutomationRegistrar *AutomationRegistrarSession) TypeAndVersion() (string, error) { - return _AutomationRegistrar.Contract.TypeAndVersion(&_AutomationRegistrar.CallOpts) -} - -func (_AutomationRegistrar *AutomationRegistrarCallerSession) TypeAndVersion() (string, error) { - return _AutomationRegistrar.Contract.TypeAndVersion(&_AutomationRegistrar.CallOpts) -} - -func (_AutomationRegistrar *AutomationRegistrarTransactor) AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { - return _AutomationRegistrar.contract.Transact(opts, "acceptOwnership") -} - -func (_AutomationRegistrar *AutomationRegistrarSession) AcceptOwnership() (*types.Transaction, error) { - return _AutomationRegistrar.Contract.AcceptOwnership(&_AutomationRegistrar.TransactOpts) -} - -func (_AutomationRegistrar *AutomationRegistrarTransactorSession) AcceptOwnership() (*types.Transaction, error) { - return _AutomationRegistrar.Contract.AcceptOwnership(&_AutomationRegistrar.TransactOpts) -} - -func (_AutomationRegistrar *AutomationRegistrarTransactor) Approve(opts *bind.TransactOpts, name string, upkeepContract common.Address, gasLimit uint32, adminAddress common.Address, triggerType uint8, checkData []byte, triggerConfig []byte, offchainConfig []byte, hash [32]byte) (*types.Transaction, error) { - return _AutomationRegistrar.contract.Transact(opts, "approve", name, upkeepContract, gasLimit, adminAddress, triggerType, checkData, triggerConfig, offchainConfig, hash) -} - -func (_AutomationRegistrar *AutomationRegistrarSession) Approve(name string, upkeepContract common.Address, gasLimit uint32, adminAddress common.Address, triggerType uint8, checkData []byte, triggerConfig []byte, offchainConfig []byte, hash [32]byte) (*types.Transaction, error) { - return _AutomationRegistrar.Contract.Approve(&_AutomationRegistrar.TransactOpts, name, upkeepContract, gasLimit, adminAddress, triggerType, checkData, triggerConfig, offchainConfig, hash) -} - -func (_AutomationRegistrar *AutomationRegistrarTransactorSession) Approve(name string, upkeepContract common.Address, gasLimit uint32, adminAddress common.Address, triggerType uint8, checkData []byte, triggerConfig []byte, offchainConfig []byte, hash [32]byte) (*types.Transaction, error) { - return _AutomationRegistrar.Contract.Approve(&_AutomationRegistrar.TransactOpts, name, upkeepContract, gasLimit, adminAddress, triggerType, checkData, triggerConfig, offchainConfig, hash) -} - -func (_AutomationRegistrar *AutomationRegistrarTransactor) Cancel(opts *bind.TransactOpts, hash [32]byte) (*types.Transaction, error) { - return _AutomationRegistrar.contract.Transact(opts, "cancel", hash) -} - -func (_AutomationRegistrar *AutomationRegistrarSession) Cancel(hash [32]byte) (*types.Transaction, error) { - return _AutomationRegistrar.Contract.Cancel(&_AutomationRegistrar.TransactOpts, hash) -} - -func (_AutomationRegistrar *AutomationRegistrarTransactorSession) Cancel(hash [32]byte) (*types.Transaction, error) { - return _AutomationRegistrar.Contract.Cancel(&_AutomationRegistrar.TransactOpts, hash) -} - -func (_AutomationRegistrar *AutomationRegistrarTransactor) OnTokenTransfer(opts *bind.TransactOpts, sender common.Address, amount *big.Int, data []byte) (*types.Transaction, error) { - return _AutomationRegistrar.contract.Transact(opts, "onTokenTransfer", sender, amount, data) -} - -func (_AutomationRegistrar *AutomationRegistrarSession) OnTokenTransfer(sender common.Address, amount *big.Int, data []byte) (*types.Transaction, error) { - return _AutomationRegistrar.Contract.OnTokenTransfer(&_AutomationRegistrar.TransactOpts, sender, amount, data) -} - -func (_AutomationRegistrar *AutomationRegistrarTransactorSession) OnTokenTransfer(sender common.Address, amount *big.Int, data []byte) (*types.Transaction, error) { - return _AutomationRegistrar.Contract.OnTokenTransfer(&_AutomationRegistrar.TransactOpts, sender, amount, data) -} - -func (_AutomationRegistrar *AutomationRegistrarTransactor) Register(opts *bind.TransactOpts, name string, encryptedEmail []byte, upkeepContract common.Address, gasLimit uint32, adminAddress common.Address, triggerType uint8, checkData []byte, triggerConfig []byte, offchainConfig []byte, amount *big.Int, sender common.Address) (*types.Transaction, error) { - return _AutomationRegistrar.contract.Transact(opts, "register", name, encryptedEmail, upkeepContract, gasLimit, adminAddress, triggerType, checkData, triggerConfig, offchainConfig, amount, sender) -} - -func (_AutomationRegistrar *AutomationRegistrarSession) Register(name string, encryptedEmail []byte, upkeepContract common.Address, gasLimit uint32, adminAddress common.Address, triggerType uint8, checkData []byte, triggerConfig []byte, offchainConfig []byte, amount *big.Int, sender common.Address) (*types.Transaction, error) { - return _AutomationRegistrar.Contract.Register(&_AutomationRegistrar.TransactOpts, name, encryptedEmail, upkeepContract, gasLimit, adminAddress, triggerType, checkData, triggerConfig, offchainConfig, amount, sender) -} - -func (_AutomationRegistrar *AutomationRegistrarTransactorSession) Register(name string, encryptedEmail []byte, upkeepContract common.Address, gasLimit uint32, adminAddress common.Address, triggerType uint8, checkData []byte, triggerConfig []byte, offchainConfig []byte, amount *big.Int, sender common.Address) (*types.Transaction, error) { - return _AutomationRegistrar.Contract.Register(&_AutomationRegistrar.TransactOpts, name, encryptedEmail, upkeepContract, gasLimit, adminAddress, triggerType, checkData, triggerConfig, offchainConfig, amount, sender) -} - -func (_AutomationRegistrar *AutomationRegistrarTransactor) RegisterUpkeep(opts *bind.TransactOpts, requestParams AutomationRegistrar22RegistrationParams) (*types.Transaction, error) { - return _AutomationRegistrar.contract.Transact(opts, "registerUpkeep", requestParams) -} - -func (_AutomationRegistrar *AutomationRegistrarSession) RegisterUpkeep(requestParams AutomationRegistrar22RegistrationParams) (*types.Transaction, error) { - return _AutomationRegistrar.Contract.RegisterUpkeep(&_AutomationRegistrar.TransactOpts, requestParams) -} - -func (_AutomationRegistrar *AutomationRegistrarTransactorSession) RegisterUpkeep(requestParams AutomationRegistrar22RegistrationParams) (*types.Transaction, error) { - return _AutomationRegistrar.Contract.RegisterUpkeep(&_AutomationRegistrar.TransactOpts, requestParams) -} - -func (_AutomationRegistrar *AutomationRegistrarTransactor) SetAutoApproveAllowedSender(opts *bind.TransactOpts, senderAddress common.Address, allowed bool) (*types.Transaction, error) { - return _AutomationRegistrar.contract.Transact(opts, "setAutoApproveAllowedSender", senderAddress, allowed) -} - -func (_AutomationRegistrar *AutomationRegistrarSession) SetAutoApproveAllowedSender(senderAddress common.Address, allowed bool) (*types.Transaction, error) { - return _AutomationRegistrar.Contract.SetAutoApproveAllowedSender(&_AutomationRegistrar.TransactOpts, senderAddress, allowed) -} - -func (_AutomationRegistrar *AutomationRegistrarTransactorSession) SetAutoApproveAllowedSender(senderAddress common.Address, allowed bool) (*types.Transaction, error) { - return _AutomationRegistrar.Contract.SetAutoApproveAllowedSender(&_AutomationRegistrar.TransactOpts, senderAddress, allowed) -} - -func (_AutomationRegistrar *AutomationRegistrarTransactor) SetConfig(opts *bind.TransactOpts, AutomationRegistry common.Address, minLINKJuels *big.Int) (*types.Transaction, error) { - return _AutomationRegistrar.contract.Transact(opts, "setConfig", AutomationRegistry, minLINKJuels) -} - -func (_AutomationRegistrar *AutomationRegistrarSession) SetConfig(AutomationRegistry common.Address, minLINKJuels *big.Int) (*types.Transaction, error) { - return _AutomationRegistrar.Contract.SetConfig(&_AutomationRegistrar.TransactOpts, AutomationRegistry, minLINKJuels) -} - -func (_AutomationRegistrar *AutomationRegistrarTransactorSession) SetConfig(AutomationRegistry common.Address, minLINKJuels *big.Int) (*types.Transaction, error) { - return _AutomationRegistrar.Contract.SetConfig(&_AutomationRegistrar.TransactOpts, AutomationRegistry, minLINKJuels) -} - -func (_AutomationRegistrar *AutomationRegistrarTransactor) SetTriggerConfig(opts *bind.TransactOpts, triggerType uint8, autoApproveType uint8, autoApproveMaxAllowed uint32) (*types.Transaction, error) { - return _AutomationRegistrar.contract.Transact(opts, "setTriggerConfig", triggerType, autoApproveType, autoApproveMaxAllowed) -} - -func (_AutomationRegistrar *AutomationRegistrarSession) SetTriggerConfig(triggerType uint8, autoApproveType uint8, autoApproveMaxAllowed uint32) (*types.Transaction, error) { - return _AutomationRegistrar.Contract.SetTriggerConfig(&_AutomationRegistrar.TransactOpts, triggerType, autoApproveType, autoApproveMaxAllowed) -} - -func (_AutomationRegistrar *AutomationRegistrarTransactorSession) SetTriggerConfig(triggerType uint8, autoApproveType uint8, autoApproveMaxAllowed uint32) (*types.Transaction, error) { - return _AutomationRegistrar.Contract.SetTriggerConfig(&_AutomationRegistrar.TransactOpts, triggerType, autoApproveType, autoApproveMaxAllowed) -} - -func (_AutomationRegistrar *AutomationRegistrarTransactor) TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) { - return _AutomationRegistrar.contract.Transact(opts, "transferOwnership", to) -} - -func (_AutomationRegistrar *AutomationRegistrarSession) TransferOwnership(to common.Address) (*types.Transaction, error) { - return _AutomationRegistrar.Contract.TransferOwnership(&_AutomationRegistrar.TransactOpts, to) -} - -func (_AutomationRegistrar *AutomationRegistrarTransactorSession) TransferOwnership(to common.Address) (*types.Transaction, error) { - return _AutomationRegistrar.Contract.TransferOwnership(&_AutomationRegistrar.TransactOpts, to) -} - -type AutomationRegistrarAutoApproveAllowedSenderSetIterator struct { - Event *AutomationRegistrarAutoApproveAllowedSenderSet - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *AutomationRegistrarAutoApproveAllowedSenderSetIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(AutomationRegistrarAutoApproveAllowedSenderSet) - 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(AutomationRegistrarAutoApproveAllowedSenderSet) - 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 *AutomationRegistrarAutoApproveAllowedSenderSetIterator) Error() error { - return it.fail -} - -func (it *AutomationRegistrarAutoApproveAllowedSenderSetIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type AutomationRegistrarAutoApproveAllowedSenderSet struct { - SenderAddress common.Address - Allowed bool - Raw types.Log -} - -func (_AutomationRegistrar *AutomationRegistrarFilterer) FilterAutoApproveAllowedSenderSet(opts *bind.FilterOpts, senderAddress []common.Address) (*AutomationRegistrarAutoApproveAllowedSenderSetIterator, error) { - - var senderAddressRule []interface{} - for _, senderAddressItem := range senderAddress { - senderAddressRule = append(senderAddressRule, senderAddressItem) - } - - logs, sub, err := _AutomationRegistrar.contract.FilterLogs(opts, "AutoApproveAllowedSenderSet", senderAddressRule) - if err != nil { - return nil, err - } - return &AutomationRegistrarAutoApproveAllowedSenderSetIterator{contract: _AutomationRegistrar.contract, event: "AutoApproveAllowedSenderSet", logs: logs, sub: sub}, nil -} - -func (_AutomationRegistrar *AutomationRegistrarFilterer) WatchAutoApproveAllowedSenderSet(opts *bind.WatchOpts, sink chan<- *AutomationRegistrarAutoApproveAllowedSenderSet, senderAddress []common.Address) (event.Subscription, error) { - - var senderAddressRule []interface{} - for _, senderAddressItem := range senderAddress { - senderAddressRule = append(senderAddressRule, senderAddressItem) - } - - logs, sub, err := _AutomationRegistrar.contract.WatchLogs(opts, "AutoApproveAllowedSenderSet", senderAddressRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(AutomationRegistrarAutoApproveAllowedSenderSet) - if err := _AutomationRegistrar.contract.UnpackLog(event, "AutoApproveAllowedSenderSet", 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 (_AutomationRegistrar *AutomationRegistrarFilterer) ParseAutoApproveAllowedSenderSet(log types.Log) (*AutomationRegistrarAutoApproveAllowedSenderSet, error) { - event := new(AutomationRegistrarAutoApproveAllowedSenderSet) - if err := _AutomationRegistrar.contract.UnpackLog(event, "AutoApproveAllowedSenderSet", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type AutomationRegistrarConfigChangedIterator struct { - Event *AutomationRegistrarConfigChanged - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *AutomationRegistrarConfigChangedIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(AutomationRegistrarConfigChanged) - 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(AutomationRegistrarConfigChanged) - 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 *AutomationRegistrarConfigChangedIterator) Error() error { - return it.fail -} - -func (it *AutomationRegistrarConfigChangedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type AutomationRegistrarConfigChanged struct { - AutomationRegistry common.Address - MinLINKJuels *big.Int - Raw types.Log -} - -func (_AutomationRegistrar *AutomationRegistrarFilterer) FilterConfigChanged(opts *bind.FilterOpts) (*AutomationRegistrarConfigChangedIterator, error) { - - logs, sub, err := _AutomationRegistrar.contract.FilterLogs(opts, "ConfigChanged") - if err != nil { - return nil, err - } - return &AutomationRegistrarConfigChangedIterator{contract: _AutomationRegistrar.contract, event: "ConfigChanged", logs: logs, sub: sub}, nil -} - -func (_AutomationRegistrar *AutomationRegistrarFilterer) WatchConfigChanged(opts *bind.WatchOpts, sink chan<- *AutomationRegistrarConfigChanged) (event.Subscription, error) { - - logs, sub, err := _AutomationRegistrar.contract.WatchLogs(opts, "ConfigChanged") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(AutomationRegistrarConfigChanged) - if err := _AutomationRegistrar.contract.UnpackLog(event, "ConfigChanged", 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 (_AutomationRegistrar *AutomationRegistrarFilterer) ParseConfigChanged(log types.Log) (*AutomationRegistrarConfigChanged, error) { - event := new(AutomationRegistrarConfigChanged) - if err := _AutomationRegistrar.contract.UnpackLog(event, "ConfigChanged", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type AutomationRegistrarOwnershipTransferRequestedIterator struct { - Event *AutomationRegistrarOwnershipTransferRequested - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *AutomationRegistrarOwnershipTransferRequestedIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(AutomationRegistrarOwnershipTransferRequested) - 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(AutomationRegistrarOwnershipTransferRequested) - 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 *AutomationRegistrarOwnershipTransferRequestedIterator) Error() error { - return it.fail -} - -func (it *AutomationRegistrarOwnershipTransferRequestedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type AutomationRegistrarOwnershipTransferRequested struct { - From common.Address - To common.Address - Raw types.Log -} - -func (_AutomationRegistrar *AutomationRegistrarFilterer) FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*AutomationRegistrarOwnershipTransferRequestedIterator, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _AutomationRegistrar.contract.FilterLogs(opts, "OwnershipTransferRequested", fromRule, toRule) - if err != nil { - return nil, err - } - return &AutomationRegistrarOwnershipTransferRequestedIterator{contract: _AutomationRegistrar.contract, event: "OwnershipTransferRequested", logs: logs, sub: sub}, nil -} - -func (_AutomationRegistrar *AutomationRegistrarFilterer) WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *AutomationRegistrarOwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _AutomationRegistrar.contract.WatchLogs(opts, "OwnershipTransferRequested", fromRule, toRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(AutomationRegistrarOwnershipTransferRequested) - if err := _AutomationRegistrar.contract.UnpackLog(event, "OwnershipTransferRequested", 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 (_AutomationRegistrar *AutomationRegistrarFilterer) ParseOwnershipTransferRequested(log types.Log) (*AutomationRegistrarOwnershipTransferRequested, error) { - event := new(AutomationRegistrarOwnershipTransferRequested) - if err := _AutomationRegistrar.contract.UnpackLog(event, "OwnershipTransferRequested", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type AutomationRegistrarOwnershipTransferredIterator struct { - Event *AutomationRegistrarOwnershipTransferred - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *AutomationRegistrarOwnershipTransferredIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(AutomationRegistrarOwnershipTransferred) - 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(AutomationRegistrarOwnershipTransferred) - 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 *AutomationRegistrarOwnershipTransferredIterator) Error() error { - return it.fail -} - -func (it *AutomationRegistrarOwnershipTransferredIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type AutomationRegistrarOwnershipTransferred struct { - From common.Address - To common.Address - Raw types.Log -} - -func (_AutomationRegistrar *AutomationRegistrarFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*AutomationRegistrarOwnershipTransferredIterator, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _AutomationRegistrar.contract.FilterLogs(opts, "OwnershipTransferred", fromRule, toRule) - if err != nil { - return nil, err - } - return &AutomationRegistrarOwnershipTransferredIterator{contract: _AutomationRegistrar.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil -} - -func (_AutomationRegistrar *AutomationRegistrarFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *AutomationRegistrarOwnershipTransferred, from []common.Address, to []common.Address) (event.Subscription, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _AutomationRegistrar.contract.WatchLogs(opts, "OwnershipTransferred", fromRule, toRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(AutomationRegistrarOwnershipTransferred) - if err := _AutomationRegistrar.contract.UnpackLog(event, "OwnershipTransferred", 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 (_AutomationRegistrar *AutomationRegistrarFilterer) ParseOwnershipTransferred(log types.Log) (*AutomationRegistrarOwnershipTransferred, error) { - event := new(AutomationRegistrarOwnershipTransferred) - if err := _AutomationRegistrar.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type AutomationRegistrarRegistrationApprovedIterator struct { - Event *AutomationRegistrarRegistrationApproved - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *AutomationRegistrarRegistrationApprovedIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(AutomationRegistrarRegistrationApproved) - 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(AutomationRegistrarRegistrationApproved) - 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 *AutomationRegistrarRegistrationApprovedIterator) Error() error { - return it.fail -} - -func (it *AutomationRegistrarRegistrationApprovedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type AutomationRegistrarRegistrationApproved struct { - Hash [32]byte - DisplayName string - UpkeepId *big.Int - Raw types.Log -} - -func (_AutomationRegistrar *AutomationRegistrarFilterer) FilterRegistrationApproved(opts *bind.FilterOpts, hash [][32]byte, upkeepId []*big.Int) (*AutomationRegistrarRegistrationApprovedIterator, error) { - - var hashRule []interface{} - for _, hashItem := range hash { - hashRule = append(hashRule, hashItem) - } - - var upkeepIdRule []interface{} - for _, upkeepIdItem := range upkeepId { - upkeepIdRule = append(upkeepIdRule, upkeepIdItem) - } - - logs, sub, err := _AutomationRegistrar.contract.FilterLogs(opts, "RegistrationApproved", hashRule, upkeepIdRule) - if err != nil { - return nil, err - } - return &AutomationRegistrarRegistrationApprovedIterator{contract: _AutomationRegistrar.contract, event: "RegistrationApproved", logs: logs, sub: sub}, nil -} - -func (_AutomationRegistrar *AutomationRegistrarFilterer) WatchRegistrationApproved(opts *bind.WatchOpts, sink chan<- *AutomationRegistrarRegistrationApproved, hash [][32]byte, upkeepId []*big.Int) (event.Subscription, error) { - - var hashRule []interface{} - for _, hashItem := range hash { - hashRule = append(hashRule, hashItem) - } - - var upkeepIdRule []interface{} - for _, upkeepIdItem := range upkeepId { - upkeepIdRule = append(upkeepIdRule, upkeepIdItem) - } - - logs, sub, err := _AutomationRegistrar.contract.WatchLogs(opts, "RegistrationApproved", hashRule, upkeepIdRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(AutomationRegistrarRegistrationApproved) - if err := _AutomationRegistrar.contract.UnpackLog(event, "RegistrationApproved", 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 (_AutomationRegistrar *AutomationRegistrarFilterer) ParseRegistrationApproved(log types.Log) (*AutomationRegistrarRegistrationApproved, error) { - event := new(AutomationRegistrarRegistrationApproved) - if err := _AutomationRegistrar.contract.UnpackLog(event, "RegistrationApproved", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type AutomationRegistrarRegistrationRejectedIterator struct { - Event *AutomationRegistrarRegistrationRejected - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *AutomationRegistrarRegistrationRejectedIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(AutomationRegistrarRegistrationRejected) - 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(AutomationRegistrarRegistrationRejected) - 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 *AutomationRegistrarRegistrationRejectedIterator) Error() error { - return it.fail -} - -func (it *AutomationRegistrarRegistrationRejectedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type AutomationRegistrarRegistrationRejected struct { - Hash [32]byte - Raw types.Log -} - -func (_AutomationRegistrar *AutomationRegistrarFilterer) FilterRegistrationRejected(opts *bind.FilterOpts, hash [][32]byte) (*AutomationRegistrarRegistrationRejectedIterator, error) { - - var hashRule []interface{} - for _, hashItem := range hash { - hashRule = append(hashRule, hashItem) - } - - logs, sub, err := _AutomationRegistrar.contract.FilterLogs(opts, "RegistrationRejected", hashRule) - if err != nil { - return nil, err - } - return &AutomationRegistrarRegistrationRejectedIterator{contract: _AutomationRegistrar.contract, event: "RegistrationRejected", logs: logs, sub: sub}, nil -} - -func (_AutomationRegistrar *AutomationRegistrarFilterer) WatchRegistrationRejected(opts *bind.WatchOpts, sink chan<- *AutomationRegistrarRegistrationRejected, hash [][32]byte) (event.Subscription, error) { - - var hashRule []interface{} - for _, hashItem := range hash { - hashRule = append(hashRule, hashItem) - } - - logs, sub, err := _AutomationRegistrar.contract.WatchLogs(opts, "RegistrationRejected", hashRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(AutomationRegistrarRegistrationRejected) - if err := _AutomationRegistrar.contract.UnpackLog(event, "RegistrationRejected", 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 (_AutomationRegistrar *AutomationRegistrarFilterer) ParseRegistrationRejected(log types.Log) (*AutomationRegistrarRegistrationRejected, error) { - event := new(AutomationRegistrarRegistrationRejected) - if err := _AutomationRegistrar.contract.UnpackLog(event, "RegistrationRejected", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type AutomationRegistrarRegistrationRequestedIterator struct { - Event *AutomationRegistrarRegistrationRequested - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *AutomationRegistrarRegistrationRequestedIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(AutomationRegistrarRegistrationRequested) - 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(AutomationRegistrarRegistrationRequested) - 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 *AutomationRegistrarRegistrationRequestedIterator) Error() error { - return it.fail -} - -func (it *AutomationRegistrarRegistrationRequestedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type AutomationRegistrarRegistrationRequested struct { - Hash [32]byte - Name string - EncryptedEmail []byte - UpkeepContract common.Address - GasLimit uint32 - AdminAddress common.Address - TriggerType uint8 - TriggerConfig []byte - OffchainConfig []byte - CheckData []byte - Amount *big.Int - Raw types.Log -} - -func (_AutomationRegistrar *AutomationRegistrarFilterer) FilterRegistrationRequested(opts *bind.FilterOpts, hash [][32]byte, upkeepContract []common.Address) (*AutomationRegistrarRegistrationRequestedIterator, error) { - - var hashRule []interface{} - for _, hashItem := range hash { - hashRule = append(hashRule, hashItem) - } - - var upkeepContractRule []interface{} - for _, upkeepContractItem := range upkeepContract { - upkeepContractRule = append(upkeepContractRule, upkeepContractItem) - } - - logs, sub, err := _AutomationRegistrar.contract.FilterLogs(opts, "RegistrationRequested", hashRule, upkeepContractRule) - if err != nil { - return nil, err - } - return &AutomationRegistrarRegistrationRequestedIterator{contract: _AutomationRegistrar.contract, event: "RegistrationRequested", logs: logs, sub: sub}, nil -} - -func (_AutomationRegistrar *AutomationRegistrarFilterer) WatchRegistrationRequested(opts *bind.WatchOpts, sink chan<- *AutomationRegistrarRegistrationRequested, hash [][32]byte, upkeepContract []common.Address) (event.Subscription, error) { - - var hashRule []interface{} - for _, hashItem := range hash { - hashRule = append(hashRule, hashItem) - } - - var upkeepContractRule []interface{} - for _, upkeepContractItem := range upkeepContract { - upkeepContractRule = append(upkeepContractRule, upkeepContractItem) - } - - logs, sub, err := _AutomationRegistrar.contract.WatchLogs(opts, "RegistrationRequested", hashRule, upkeepContractRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(AutomationRegistrarRegistrationRequested) - if err := _AutomationRegistrar.contract.UnpackLog(event, "RegistrationRequested", 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 (_AutomationRegistrar *AutomationRegistrarFilterer) ParseRegistrationRequested(log types.Log) (*AutomationRegistrarRegistrationRequested, error) { - event := new(AutomationRegistrarRegistrationRequested) - if err := _AutomationRegistrar.contract.UnpackLog(event, "RegistrationRequested", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type AutomationRegistrarTriggerConfigSetIterator struct { - Event *AutomationRegistrarTriggerConfigSet - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *AutomationRegistrarTriggerConfigSetIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(AutomationRegistrarTriggerConfigSet) - 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(AutomationRegistrarTriggerConfigSet) - 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 *AutomationRegistrarTriggerConfigSetIterator) Error() error { - return it.fail -} - -func (it *AutomationRegistrarTriggerConfigSetIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type AutomationRegistrarTriggerConfigSet struct { - TriggerType uint8 - AutoApproveType uint8 - AutoApproveMaxAllowed uint32 - Raw types.Log -} - -func (_AutomationRegistrar *AutomationRegistrarFilterer) FilterTriggerConfigSet(opts *bind.FilterOpts) (*AutomationRegistrarTriggerConfigSetIterator, error) { - - logs, sub, err := _AutomationRegistrar.contract.FilterLogs(opts, "TriggerConfigSet") - if err != nil { - return nil, err - } - return &AutomationRegistrarTriggerConfigSetIterator{contract: _AutomationRegistrar.contract, event: "TriggerConfigSet", logs: logs, sub: sub}, nil -} - -func (_AutomationRegistrar *AutomationRegistrarFilterer) WatchTriggerConfigSet(opts *bind.WatchOpts, sink chan<- *AutomationRegistrarTriggerConfigSet) (event.Subscription, error) { - - logs, sub, err := _AutomationRegistrar.contract.WatchLogs(opts, "TriggerConfigSet") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(AutomationRegistrarTriggerConfigSet) - if err := _AutomationRegistrar.contract.UnpackLog(event, "TriggerConfigSet", 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 (_AutomationRegistrar *AutomationRegistrarFilterer) ParseTriggerConfigSet(log types.Log) (*AutomationRegistrarTriggerConfigSet, error) { - event := new(AutomationRegistrarTriggerConfigSet) - if err := _AutomationRegistrar.contract.UnpackLog(event, "TriggerConfigSet", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type GetConfig struct { - AutomationRegistry common.Address - MinLINKJuels *big.Int -} - -func (_AutomationRegistrar *AutomationRegistrar) ParseLog(log types.Log) (generated.AbigenLog, error) { - switch log.Topics[0] { - case _AutomationRegistrar.abi.Events["AutoApproveAllowedSenderSet"].ID: - return _AutomationRegistrar.ParseAutoApproveAllowedSenderSet(log) - case _AutomationRegistrar.abi.Events["ConfigChanged"].ID: - return _AutomationRegistrar.ParseConfigChanged(log) - case _AutomationRegistrar.abi.Events["OwnershipTransferRequested"].ID: - return _AutomationRegistrar.ParseOwnershipTransferRequested(log) - case _AutomationRegistrar.abi.Events["OwnershipTransferred"].ID: - return _AutomationRegistrar.ParseOwnershipTransferred(log) - case _AutomationRegistrar.abi.Events["RegistrationApproved"].ID: - return _AutomationRegistrar.ParseRegistrationApproved(log) - case _AutomationRegistrar.abi.Events["RegistrationRejected"].ID: - return _AutomationRegistrar.ParseRegistrationRejected(log) - case _AutomationRegistrar.abi.Events["RegistrationRequested"].ID: - return _AutomationRegistrar.ParseRegistrationRequested(log) - case _AutomationRegistrar.abi.Events["TriggerConfigSet"].ID: - return _AutomationRegistrar.ParseTriggerConfigSet(log) - - default: - return nil, fmt.Errorf("abigen wrapper received unknown log topic: %v", log.Topics[0]) - } -} - -func (AutomationRegistrarAutoApproveAllowedSenderSet) Topic() common.Hash { - return common.HexToHash("0x20c6237dac83526a849285a9f79d08a483291bdd3a056a0ef9ae94ecee1ad356") -} - -func (AutomationRegistrarConfigChanged) Topic() common.Hash { - return common.HexToHash("0x39ce5d867555f0b0183e358fce5b158e7ca4fecd7c01cb7e0e19f1e23285838a") -} - -func (AutomationRegistrarOwnershipTransferRequested) Topic() common.Hash { - return common.HexToHash("0xed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae1278") -} - -func (AutomationRegistrarOwnershipTransferred) Topic() common.Hash { - return common.HexToHash("0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0") -} - -func (AutomationRegistrarRegistrationApproved) Topic() common.Hash { - return common.HexToHash("0xb9a292fb7e3edd920cd2d2829a3615a640c43fd7de0a0820aa0668feb4c37d4b") -} - -func (AutomationRegistrarRegistrationRejected) Topic() common.Hash { - return common.HexToHash("0x3663fb28ebc87645eb972c9dad8521bf665c623f287e79f1c56f1eb374b82a22") -} - -func (AutomationRegistrarRegistrationRequested) Topic() common.Hash { - return common.HexToHash("0x7684390ebb103102f7f48c71439c2408713f8d437782a6fab2756acc0e42c1b7") -} - -func (AutomationRegistrarTriggerConfigSet) Topic() common.Hash { - return common.HexToHash("0x830a6d06a4e2caac67eba04323de22bdb04f032dd8b3d6a0c52b503d9a7036a3") -} - -func (_AutomationRegistrar *AutomationRegistrar) Address() common.Address { - return _AutomationRegistrar.address -} - -type AutomationRegistrarInterface interface { - LINK(opts *bind.CallOpts) (common.Address, error) - - GetAutoApproveAllowedSender(opts *bind.CallOpts, senderAddress common.Address) (bool, error) - - GetConfig(opts *bind.CallOpts) (GetConfig, - - error) - - GetPendingRequest(opts *bind.CallOpts, hash [32]byte) (common.Address, *big.Int, error) - - GetTriggerRegistrationDetails(opts *bind.CallOpts, triggerType uint8) (AutomationRegistrar22TriggerRegistrationStorage, error) - - Owner(opts *bind.CallOpts) (common.Address, error) - - TypeAndVersion(opts *bind.CallOpts) (string, error) - - AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) - - Approve(opts *bind.TransactOpts, name string, upkeepContract common.Address, gasLimit uint32, adminAddress common.Address, triggerType uint8, checkData []byte, triggerConfig []byte, offchainConfig []byte, hash [32]byte) (*types.Transaction, error) - - Cancel(opts *bind.TransactOpts, hash [32]byte) (*types.Transaction, error) - - OnTokenTransfer(opts *bind.TransactOpts, sender common.Address, amount *big.Int, data []byte) (*types.Transaction, error) - - Register(opts *bind.TransactOpts, name string, encryptedEmail []byte, upkeepContract common.Address, gasLimit uint32, adminAddress common.Address, triggerType uint8, checkData []byte, triggerConfig []byte, offchainConfig []byte, amount *big.Int, sender common.Address) (*types.Transaction, error) - - RegisterUpkeep(opts *bind.TransactOpts, requestParams AutomationRegistrar22RegistrationParams) (*types.Transaction, error) - - SetAutoApproveAllowedSender(opts *bind.TransactOpts, senderAddress common.Address, allowed bool) (*types.Transaction, error) - - SetConfig(opts *bind.TransactOpts, AutomationRegistry common.Address, minLINKJuels *big.Int) (*types.Transaction, error) - - SetTriggerConfig(opts *bind.TransactOpts, triggerType uint8, autoApproveType uint8, autoApproveMaxAllowed uint32) (*types.Transaction, error) - - TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) - - FilterAutoApproveAllowedSenderSet(opts *bind.FilterOpts, senderAddress []common.Address) (*AutomationRegistrarAutoApproveAllowedSenderSetIterator, error) - - WatchAutoApproveAllowedSenderSet(opts *bind.WatchOpts, sink chan<- *AutomationRegistrarAutoApproveAllowedSenderSet, senderAddress []common.Address) (event.Subscription, error) - - ParseAutoApproveAllowedSenderSet(log types.Log) (*AutomationRegistrarAutoApproveAllowedSenderSet, error) - - FilterConfigChanged(opts *bind.FilterOpts) (*AutomationRegistrarConfigChangedIterator, error) - - WatchConfigChanged(opts *bind.WatchOpts, sink chan<- *AutomationRegistrarConfigChanged) (event.Subscription, error) - - ParseConfigChanged(log types.Log) (*AutomationRegistrarConfigChanged, error) - - FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*AutomationRegistrarOwnershipTransferRequestedIterator, error) - - WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *AutomationRegistrarOwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) - - ParseOwnershipTransferRequested(log types.Log) (*AutomationRegistrarOwnershipTransferRequested, error) - - FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*AutomationRegistrarOwnershipTransferredIterator, error) - - WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *AutomationRegistrarOwnershipTransferred, from []common.Address, to []common.Address) (event.Subscription, error) - - ParseOwnershipTransferred(log types.Log) (*AutomationRegistrarOwnershipTransferred, error) - - FilterRegistrationApproved(opts *bind.FilterOpts, hash [][32]byte, upkeepId []*big.Int) (*AutomationRegistrarRegistrationApprovedIterator, error) - - WatchRegistrationApproved(opts *bind.WatchOpts, sink chan<- *AutomationRegistrarRegistrationApproved, hash [][32]byte, upkeepId []*big.Int) (event.Subscription, error) - - ParseRegistrationApproved(log types.Log) (*AutomationRegistrarRegistrationApproved, error) - - FilterRegistrationRejected(opts *bind.FilterOpts, hash [][32]byte) (*AutomationRegistrarRegistrationRejectedIterator, error) - - WatchRegistrationRejected(opts *bind.WatchOpts, sink chan<- *AutomationRegistrarRegistrationRejected, hash [][32]byte) (event.Subscription, error) - - ParseRegistrationRejected(log types.Log) (*AutomationRegistrarRegistrationRejected, error) - - FilterRegistrationRequested(opts *bind.FilterOpts, hash [][32]byte, upkeepContract []common.Address) (*AutomationRegistrarRegistrationRequestedIterator, error) - - WatchRegistrationRequested(opts *bind.WatchOpts, sink chan<- *AutomationRegistrarRegistrationRequested, hash [][32]byte, upkeepContract []common.Address) (event.Subscription, error) - - ParseRegistrationRequested(log types.Log) (*AutomationRegistrarRegistrationRequested, error) - - FilterTriggerConfigSet(opts *bind.FilterOpts) (*AutomationRegistrarTriggerConfigSetIterator, error) - - WatchTriggerConfigSet(opts *bind.WatchOpts, sink chan<- *AutomationRegistrarTriggerConfigSet) (event.Subscription, error) - - ParseTriggerConfigSet(log types.Log) (*AutomationRegistrarTriggerConfigSet, error) - - ParseLog(log types.Log) (generated.AbigenLog, error) - - Address() common.Address -} diff --git a/core/gethwrappers/generated/automation_registrar_wrapper2_3/automation_registrar_wrapper2_3.go b/core/gethwrappers/generated/automation_registrar_wrapper2_3/automation_registrar_wrapper2_3.go index 668a2235b45..823fcdfd204 100644 --- a/core/gethwrappers/generated/automation_registrar_wrapper2_3/automation_registrar_wrapper2_3.go +++ b/core/gethwrappers/generated/automation_registrar_wrapper2_3/automation_registrar_wrapper2_3.go @@ -37,16 +37,17 @@ type AutomationRegistrar23InitialTriggerConfig struct { } type AutomationRegistrar23RegistrationParams struct { - Name string - EncryptedEmail []byte UpkeepContract common.Address - GasLimit uint32 + Amount *big.Int AdminAddress common.Address + GasLimit uint32 TriggerType uint8 + BillingToken common.Address + Name string + EncryptedEmail []byte CheckData []byte TriggerConfig []byte OffchainConfig []byte - Amount *big.Int } type AutomationRegistrar23TriggerRegistrationStorage struct { @@ -56,15 +57,15 @@ type AutomationRegistrar23TriggerRegistrationStorage struct { } var AutomationRegistrarMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"LINKAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"AutomationRegistry\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"minLINKJuels\",\"type\":\"uint96\"},{\"components\":[{\"internalType\":\"uint8\",\"name\":\"triggerType\",\"type\":\"uint8\"},{\"internalType\":\"enumAutomationRegistrar2_3.AutoApproveType\",\"name\":\"autoApproveType\",\"type\":\"uint8\"},{\"internalType\":\"uint32\",\"name\":\"autoApproveMaxAllowed\",\"type\":\"uint32\"}],\"internalType\":\"structAutomationRegistrar2_3.InitialTriggerConfig[]\",\"name\":\"triggerConfigs\",\"type\":\"tuple[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AmountMismatch\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FunctionNotPermitted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"HashMismatch\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficientPayment\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidAdminAddress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidDataLength\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"LinkTransferFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyAdminOrOwner\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyLink\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RegistrationRequestFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RequestNotFound\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SenderMismatch\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"senderAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"allowed\",\"type\":\"bool\"}],\"name\":\"AutoApproveAllowedSenderSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"AutomationRegistry\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"minLINKJuels\",\"type\":\"uint96\"}],\"name\":\"ConfigChanged\",\"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\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"displayName\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"RegistrationApproved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"}],\"name\":\"RegistrationRejected\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"encryptedEmail\",\"type\":\"bytes\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"upkeepContract\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"adminAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"triggerType\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"triggerConfig\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"offchainConfig\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"checkData\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"RegistrationRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"triggerType\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"enumAutomationRegistrar2_3.AutoApproveType\",\"name\":\"autoApproveType\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"autoApproveMaxAllowed\",\"type\":\"uint32\"}],\"name\":\"TriggerConfigSet\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"LINK\",\"outputs\":[{\"internalType\":\"contractLinkTokenInterface\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"upkeepContract\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"adminAddress\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"triggerType\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"checkData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"triggerConfig\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"offchainConfig\",\"type\":\"bytes\"},{\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"}],\"name\":\"approve\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"}],\"name\":\"cancel\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"senderAddress\",\"type\":\"address\"}],\"name\":\"getAutoApproveAllowedSender\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getConfig\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"AutomationRegistry\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"minLINKJuels\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"}],\"name\":\"getPendingRequest\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"triggerType\",\"type\":\"uint8\"}],\"name\":\"getTriggerRegistrationDetails\",\"outputs\":[{\"components\":[{\"internalType\":\"enumAutomationRegistrar2_3.AutoApproveType\",\"name\":\"autoApproveType\",\"type\":\"uint8\"},{\"internalType\":\"uint32\",\"name\":\"autoApproveMaxAllowed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"approvedCount\",\"type\":\"uint32\"}],\"internalType\":\"structAutomationRegistrar2_3.TriggerRegistrationStorage\",\"name\":\"\",\"type\":\"tuple\"}],\"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\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"bytes\",\"name\":\"encryptedEmail\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"upkeepContract\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"adminAddress\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"triggerType\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"checkData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"triggerConfig\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"offchainConfig\",\"type\":\"bytes\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"register\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"bytes\",\"name\":\"encryptedEmail\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"upkeepContract\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"adminAddress\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"triggerType\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"checkData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"triggerConfig\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"offchainConfig\",\"type\":\"bytes\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"internalType\":\"structAutomationRegistrar2_3.RegistrationParams\",\"name\":\"requestParams\",\"type\":\"tuple\"}],\"name\":\"registerUpkeep\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"senderAddress\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"allowed\",\"type\":\"bool\"}],\"name\":\"setAutoApproveAllowedSender\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"AutomationRegistry\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"minLINKJuels\",\"type\":\"uint96\"}],\"name\":\"setConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"triggerType\",\"type\":\"uint8\"},{\"internalType\":\"enumAutomationRegistrar2_3.AutoApproveType\",\"name\":\"autoApproveType\",\"type\":\"uint8\"},{\"internalType\":\"uint32\",\"name\":\"autoApproveMaxAllowed\",\"type\":\"uint32\"}],\"name\":\"setTriggerConfig\",\"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\":\"view\",\"type\":\"function\"}]", - Bin: "0x60a06040523480156200001157600080fd5b5060405162002d8238038062002d8283398101604081905262000034916200043b565b33806000816200008b5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000be57620000be816200017a565b5050506001600160a01b038416608052620000da838362000225565b60005b81518110156200016f576200015a82828151811062000100576200010062000598565b60200260200101516000015183838151811062000121576200012162000598565b60200260200101516020015184848151811062000142576200014262000598565b6020026020010151604001516200029e60201b60201c565b806200016681620005ae565b915050620000dd565b50505050506200062f565b336001600160a01b03821603620001d45760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000082565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6200022f6200034c565b6040805180820182526001600160a01b0384168082526001600160601b0384166020928301819052600160a01b810282176004558351918252918101919091527f39ce5d867555f0b0183e358fce5b158e7ca4fecd7c01cb7e0e19f1e23285838a910160405180910390a15050565b620002a86200034c565b60ff83166000908152600360205260409020805483919060ff19166001836002811115620002da57620002da620005d6565b021790555060ff831660009081526003602052604090819020805464ffffffff00191661010063ffffffff851602179055517f830a6d06a4e2caac67eba04323de22bdb04f032dd8b3d6a0c52b503d9a7036a3906200033f90859085908590620005ec565b60405180910390a1505050565b6000546001600160a01b03163314620003a85760405162461bcd60e51b815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e657200000000000000000000604482015260640162000082565b565b80516001600160a01b0381168114620003c257600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b604051606081016001600160401b0381118282101715620004025762000402620003c7565b60405290565b604051601f8201601f191681016001600160401b0381118282101715620004335762000433620003c7565b604052919050565b600080600080608085870312156200045257600080fd5b6200045d85620003aa565b935060206200046e818701620003aa565b604087810151919550906001600160601b03811681146200048e57600080fd5b606088810151919550906001600160401b0380821115620004ae57600080fd5b818a0191508a601f830112620004c357600080fd5b815181811115620004d857620004d8620003c7565b620004e8868260051b0162000408565b818152868101925090840283018601908c8211156200050657600080fd5b928601925b81841015620005875784848e031215620005255760008081fd5b6200052f620003dd565b845160ff81168114620005425760008081fd5b81528488015160038110620005575760008081fd5b818901528487015163ffffffff81168114620005735760008081fd5b81880152835292840192918601916200050b565b999c989b5096995050505050505050565b634e487b7160e01b600052603260045260246000fd5b600060018201620005cf57634e487b7160e01b600052601160045260246000fd5b5060010190565b634e487b7160e01b600052602160045260246000fd5b60ff8416815260608101600384106200061557634e487b7160e01b600052602160045260246000fd5b83602083015263ffffffff83166040830152949350505050565b6080516127146200066e60003960008181610177015281816105d601528181610887015281816109bd01528181610f0e015261171b01526127146000f3fe608060405234801561001057600080fd5b506004361061011b5760003560e01c8063856853e6116100b2578063b5ff5b4111610081578063c4d252f511610066578063c4d252f5146103e3578063e8d4070d146103f6578063f2fde38b1461040957600080fd5b8063b5ff5b4114610369578063c3f909d41461037c57600080fd5b8063856853e61461027857806388b12d551461028b5780638da5cb5b14610338578063a4c0ed361461035657600080fd5b80633f678e11116100ee5780633f678e11146101f35780636c4cdfc31461021457806379ba5097146102275780637e776f7f1461022f57600080fd5b8063181f5a77146101205780631b6b6d2314610172578063212d0884146101be578063367b9b4f146101de575b600080fd5b61015c6040518060400160405280601981526020017f4175746f6d6174696f6e52656769737472617220322e332e300000000000000081525081565b6040516101699190611a74565b60405180910390f35b6101997f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610169565b6101d16101cc366004611aa4565b61041c565b6040516101699190611b29565b6101f16101ec366004611b9d565b6104a9565b005b610206610201366004611bd6565b61053b565b604051908152602001610169565b6101f1610222366004611c2e565b6106d3565b6101f161076d565b61026861023d366004611c63565b73ffffffffffffffffffffffffffffffffffffffff1660009081526005602052604090205460ff1690565b6040519015158152602001610169565b6101f1610286366004611de1565b61086f565b6102ff610299366004611f40565b60009081526002602090815260409182902082518084019093525473ffffffffffffffffffffffffffffffffffffffff8116808452740100000000000000000000000000000000000000009091046bffffffffffffffffffffffff169290910182905291565b6040805173ffffffffffffffffffffffffffffffffffffffff90931683526bffffffffffffffffffffffff909116602083015201610169565b60005473ffffffffffffffffffffffffffffffffffffffff16610199565b6101f1610364366004611f59565b6109a5565b6101f1610377366004611fb5565b610ce3565b60408051808201825260045473ffffffffffffffffffffffffffffffffffffffff8116808352740100000000000000000000000000000000000000009091046bffffffffffffffffffffffff16602092830181905283519182529181019190915201610169565b6101f16103f1366004611f40565b610dc2565b6101f1610404366004611ffe565b61104c565b6101f1610417366004611c63565b6112d9565b60408051606080820183526000808352602080840182905283850182905260ff86811683526003909152908490208451928301909452835492939192839116600281111561046c5761046c611abf565b600281111561047d5761047d611abf565b8152905463ffffffff610100820481166020840152650100000000009091041660409091015292915050565b6104b16112ed565b73ffffffffffffffffffffffffffffffffffffffff821660008181526005602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001685151590811790915591519182527f20c6237dac83526a849285a9f79d08a483291bdd3a056a0ef9ae94ecee1ad356910160405180910390a25050565b6004546000907401000000000000000000000000000000000000000090046bffffffffffffffffffffffff1661057961014084016101208501612109565b6bffffffffffffffffffffffff1610156105bf576040517fcd1c886700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000166323b872dd333061060f61014087016101208801612109565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b16815273ffffffffffffffffffffffffffffffffffffffff93841660048201529290911660248301526bffffffffffffffffffffffff1660448201526064016020604051808303816000875af1158015610696573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106ba9190612124565b506106cd6106c783612141565b33611370565b92915050565b6106db6112ed565b60408051808201825273ffffffffffffffffffffffffffffffffffffffff84168082526bffffffffffffffffffffffff8416602092830181905274010000000000000000000000000000000000000000810282176004558351918252918101919091527f39ce5d867555f0b0183e358fce5b158e7ca4fecd7c01cb7e0e19f1e23285838a910160405180910390a15050565b60015473ffffffffffffffffffffffffffffffffffffffff1633146107f3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e65720000000000000000000060448201526064015b60405180910390fd5b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016146108de576040517f018d10be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6109966040518061014001604052808e81526020018d8d8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050509082525073ffffffffffffffffffffffffffffffffffffffff808d16602083015263ffffffff8c1660408301528a16606082015260ff8916608082015260a0810188905260c0810187905260e081018690526bffffffffffffffffffffffff85166101009091015282611370565b50505050505050505050505050565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610a14576040517f018d10be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81818080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505060208101517fffffffff0000000000000000000000000000000000000000000000000000000081167f856853e60000000000000000000000000000000000000000000000000000000014610aca576040517fe3d6792100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8484846000610adc8260048186612276565b810190610ae991906122a0565b509950505050505050505050806bffffffffffffffffffffffff168414610b3c576040517f55e97b0d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8988886000610b4e8260048186612276565b810190610b5b91906122a0565b9a50505050505050505050508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614610bcc576040517ff8c5638e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6004547401000000000000000000000000000000000000000090046bffffffffffffffffffffffff168d1015610c2e576040517fcd1c886700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60003073ffffffffffffffffffffffffffffffffffffffff168d8d604051610c579291906123dd565b600060405180830381855af49150503d8060008114610c92576040519150601f19603f3d011682016040523d82523d6000602084013e610c97565b606091505b5050905080610cd2576040517f649bf81000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050505050505050505050505050565b610ceb6112ed565b60ff8316600090815260036020526040902080548391907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001836002811115610d3857610d38611abf565b021790555060ff83166000908152600360205260409081902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000ff1661010063ffffffff851602179055517f830a6d06a4e2caac67eba04323de22bdb04f032dd8b3d6a0c52b503d9a7036a390610db5908590859085906123ed565b60405180910390a1505050565b60008181526002602090815260409182902082518084019093525473ffffffffffffffffffffffffffffffffffffffff8116808452740100000000000000000000000000000000000000009091046bffffffffffffffffffffffff1691830191909152331480610e49575060005473ffffffffffffffffffffffffffffffffffffffff1633145b610e7f576040517f61685c2b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805173ffffffffffffffffffffffffffffffffffffffff16610ecd576040517f4b13b31e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082815260026020908152604080832083905583519184015190517fa9059cbb0000000000000000000000000000000000000000000000000000000081527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169263a9059cbb92610f859260040173ffffffffffffffffffffffffffffffffffffffff9290921682526bffffffffffffffffffffffff16602082015260400190565b6020604051808303816000875af1158015610fa4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fc89190612124565b90508061101c5781516040517fc2e4dce800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911660048201526024016107ea565b60405183907f3663fb28ebc87645eb972c9dad8521bf665c623f287e79f1c56f1eb374b82a2290600090a2505050565b6110546112ed565b60008181526002602090815260409182902082518084019093525473ffffffffffffffffffffffffffffffffffffffff8116808452740100000000000000000000000000000000000000009091046bffffffffffffffffffffffff16918301919091526110ed576040517f4b13b31e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008b8b8b8b8b8b8b8b8b60405160200161111099989796959493929190612461565b604051602081830303815290604052805190602001209050808314611161576040517f3f4d605300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60026000848152602001908152602001600020600080820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556000820160146101000a8154906bffffffffffffffffffffffff021916905550506112c96040518061014001604052808f81526020016040518060200160405280600081525081526020018e73ffffffffffffffffffffffffffffffffffffffff1681526020018d63ffffffff1681526020018c73ffffffffffffffffffffffffffffffffffffffff1681526020018b60ff1681526020018a8a8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050509082525060208082018a905260408051601f8a0183900483028101830182528981529201919089908990819084018382808284376000920191909152505050908252506020858101516bffffffffffffffffffffffff1691015282611647565b5050505050505050505050505050565b6112e16112ed565b6112ea81611876565b50565b60005473ffffffffffffffffffffffffffffffffffffffff16331461136e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e65720000000000000000000060448201526064016107ea565b565b608082015160009073ffffffffffffffffffffffffffffffffffffffff166113c4576040517f05bb467c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008360400151846060015185608001518660a001518760c001518860e0015189610100015160405160200161140097969594939291906124e7565b604051602081830303815290604052805190602001209050836040015173ffffffffffffffffffffffffffffffffffffffff16817f7684390ebb103102f7f48c71439c2408713f8d437782a6fab2756acc0e42c1b786600001518760200151886060015189608001518a60a001518b60e001518c61010001518d60c001518e610120015160405161149999989796959493929190612569565b60405180910390a360a084015160ff9081166000908152600360205260408082208151606081019092528054929361151c9383911660028111156114df576114df611abf565b60028111156114f0576114f0611abf565b8152905463ffffffff61010082048116602084015265010000000000909104166040909101528561196b565b156115845760a085015160ff166000908152600360205260409020805465010000000000900463ffffffff1690600561155483612653565b91906101000a81548163ffffffff021916908363ffffffff1602179055505061157d8583611647565b905061163f565b61012085015160008381526002602052604081205490916115ca917401000000000000000000000000000000000000000090046bffffffffffffffffffffffff16612676565b604080518082018252608089015173ffffffffffffffffffffffffffffffffffffffff90811682526bffffffffffffffffffffffff9384166020808401918252600089815260029091529390932091519251909316740100000000000000000000000000000000000000000291909216179055505b949350505050565b600480546040808501516060860151608087015160a088015160c089015160e08a01516101008b015196517f28f32f3800000000000000000000000000000000000000000000000000000000815260009973ffffffffffffffffffffffffffffffffffffffff909916988a988a986328f32f38986116d29891979096919590949193909291016124e7565b6020604051808303816000875af11580156116f1573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061171591906126a2565b905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16634000aea0848861012001518560405160200161176f91815260200190565b6040516020818303038152906040526040518463ffffffff1660e01b815260040161179c939291906126bb565b6020604051808303816000875af11580156117bb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117df9190612124565b905080611830576040517fc2e4dce800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff841660048201526024016107ea565b81857fb9a292fb7e3edd920cd2d2829a3615a640c43fd7de0a0820aa0668feb4c37d4b88600001516040516118659190611a74565b60405180910390a350949350505050565b3373ffffffffffffffffffffffffffffffffffffffff8216036118f5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c6600000000000000000060448201526064016107ea565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6000808351600281111561198157611981611abf565b0361198e575060006106cd565b6001835160028111156119a3576119a3611abf565b1480156119d6575073ffffffffffffffffffffffffffffffffffffffff821660009081526005602052604090205460ff16155b156119e3575060006106cd565b826020015163ffffffff16836040015163ffffffff161015611a07575060016106cd565b50600092915050565b6000815180845260005b81811015611a3657602081850181015186830182015201611a1a565b5060006020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b602081526000611a876020830184611a10565b9392505050565b803560ff81168114611a9f57600080fd5b919050565b600060208284031215611ab657600080fd5b611a8782611a8e565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60038110611b25577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b9052565b6000606082019050611b3c828451611aee565b602083015163ffffffff8082166020850152806040860151166040850152505092915050565b73ffffffffffffffffffffffffffffffffffffffff811681146112ea57600080fd5b8035611a9f81611b62565b80151581146112ea57600080fd5b60008060408385031215611bb057600080fd5b8235611bbb81611b62565b91506020830135611bcb81611b8f565b809150509250929050565b600060208284031215611be857600080fd5b813567ffffffffffffffff811115611bff57600080fd5b82016101408185031215611a8757600080fd5b80356bffffffffffffffffffffffff81168114611a9f57600080fd5b60008060408385031215611c4157600080fd5b8235611c4c81611b62565b9150611c5a60208401611c12565b90509250929050565b600060208284031215611c7557600080fd5b8135611a8781611b62565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051610140810167ffffffffffffffff81118282101715611cd357611cd3611c80565b60405290565b600082601f830112611cea57600080fd5b813567ffffffffffffffff80821115611d0557611d05611c80565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908282118183101715611d4b57611d4b611c80565b81604052838152866020858801011115611d6457600080fd5b836020870160208301376000602085830101528094505050505092915050565b60008083601f840112611d9657600080fd5b50813567ffffffffffffffff811115611dae57600080fd5b602083019150836020828501011115611dc657600080fd5b9250929050565b803563ffffffff81168114611a9f57600080fd5b6000806000806000806000806000806000806101608d8f031215611e0457600080fd5b67ffffffffffffffff8d351115611e1a57600080fd5b611e278e8e358f01611cd9565b9b5067ffffffffffffffff60208e01351115611e4257600080fd5b611e528e60208f01358f01611d84565b909b509950611e6360408e01611b84565b9850611e7160608e01611dcd565b9750611e7f60808e01611b84565b9650611e8d60a08e01611a8e565b955067ffffffffffffffff60c08e01351115611ea857600080fd5b611eb88e60c08f01358f01611cd9565b945067ffffffffffffffff60e08e01351115611ed357600080fd5b611ee38e60e08f01358f01611cd9565b935067ffffffffffffffff6101008e01351115611eff57600080fd5b611f108e6101008f01358f01611cd9565b9250611f1f6101208e01611c12565b9150611f2e6101408e01611b84565b90509295989b509295989b509295989b565b600060208284031215611f5257600080fd5b5035919050565b60008060008060608587031215611f6f57600080fd5b8435611f7a81611b62565b935060208501359250604085013567ffffffffffffffff811115611f9d57600080fd5b611fa987828801611d84565b95989497509550505050565b600080600060608486031215611fca57600080fd5b611fd384611a8e565b9250602084013560038110611fe757600080fd5b9150611ff560408501611dcd565b90509250925092565b60008060008060008060008060008060006101208c8e03121561202057600080fd5b67ffffffffffffffff808d35111561203757600080fd5b6120448e8e358f01611cd9565b9b5061205260208e01611b84565b9a5061206060408e01611dcd565b995061206e60608e01611b84565b985061207c60808e01611a8e565b97508060a08e0135111561208f57600080fd5b61209f8e60a08f01358f01611d84565b909750955060c08d01358110156120b557600080fd5b6120c58e60c08f01358f01611cd9565b94508060e08e013511156120d857600080fd5b506120e98d60e08e01358e01611d84565b81945080935050506101008c013590509295989b509295989b9093969950565b60006020828403121561211b57600080fd5b611a8782611c12565b60006020828403121561213657600080fd5b8151611a8781611b8f565b6000610140823603121561215457600080fd5b61215c611caf565b823567ffffffffffffffff8082111561217457600080fd5b61218036838701611cd9565b8352602085013591508082111561219657600080fd5b6121a236838701611cd9565b60208401526121b360408601611b84565b60408401526121c460608601611dcd565b60608401526121d560808601611b84565b60808401526121e660a08601611a8e565b60a084015260c08501359150808211156121ff57600080fd5b61220b36838701611cd9565b60c084015260e085013591508082111561222457600080fd5b61223036838701611cd9565b60e08401526101009150818501358181111561224b57600080fd5b61225736828801611cd9565b8385015250505061012061226c818501611c12565b9082015292915050565b6000808585111561228657600080fd5b8386111561229357600080fd5b5050820193919092039150565b60008060008060008060008060008060006101608c8e0312156122c257600080fd5b67ffffffffffffffff808d3511156122d957600080fd5b6122e68e8e358f01611cd9565b9b508060208e013511156122f957600080fd5b6123098e60208f01358f01611cd9565b9a5061231760408e01611b84565b995061232560608e01611dcd565b985061233360808e01611b84565b975061234160a08e01611a8e565b96508060c08e0135111561235457600080fd5b6123648e60c08f01358f01611cd9565b95508060e08e0135111561237757600080fd5b6123878e60e08f01358f01611cd9565b9450806101008e0135111561239b57600080fd5b506123ad8d6101008e01358e01611cd9565b92506123bc6101208d01611c12565b91506123cb6101408d01611b84565b90509295989b509295989b9093969950565b8183823760009101908152919050565b60ff84168152606081016124046020830185611aee565b63ffffffff83166040830152949350505050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b600073ffffffffffffffffffffffffffffffffffffffff808c16835263ffffffff8b166020840152808a1660408401525060ff8816606083015260e060808301526124b060e083018789612418565b82810360a08401526124c28187611a10565b905082810360c08401526124d7818587612418565b9c9b505050505050505050505050565b600073ffffffffffffffffffffffffffffffffffffffff808a16835263ffffffff8916602084015280881660408401525060ff8616606083015260e0608083015261253560e0830186611a10565b82810360a08401526125478186611a10565b905082810360c084015261255b8185611a10565b9a9950505050505050505050565b600061012080835261257d8184018d611a10565b90508281036020840152612591818c611a10565b905063ffffffff8a16604084015273ffffffffffffffffffffffffffffffffffffffff8916606084015260ff8816608084015282810360a08401526125d68188611a10565b905082810360c08401526125ea8187611a10565b905082810360e08401526125fe8186611a10565b9150506bffffffffffffffffffffffff83166101008301529a9950505050505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600063ffffffff80831681810361266c5761266c612624565b6001019392505050565b6bffffffffffffffffffffffff81811683821601908082111561269b5761269b612624565b5092915050565b6000602082840312156126b457600080fd5b5051919050565b73ffffffffffffffffffffffffffffffffffffffff841681526bffffffffffffffffffffffff831660208201526060604082015260006126fe6060830184611a10565b9594505050505056fea164736f6c6343000813000a", + ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"LINKAddress\",\"type\":\"address\"},{\"internalType\":\"contractIAutomationRegistryMaster2_3\",\"name\":\"registry\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint8\",\"name\":\"triggerType\",\"type\":\"uint8\"},{\"internalType\":\"enumAutomationRegistrar2_3.AutoApproveType\",\"name\":\"autoApproveType\",\"type\":\"uint8\"},{\"internalType\":\"uint32\",\"name\":\"autoApproveMaxAllowed\",\"type\":\"uint32\"}],\"internalType\":\"structAutomationRegistrar2_3.InitialTriggerConfig[]\",\"name\":\"triggerConfigs\",\"type\":\"tuple[]\"},{\"internalType\":\"contractIERC20[]\",\"name\":\"billingTokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"minRegistrationFees\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"HashMismatch\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficientPayment\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidAdminAddress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidBillingToken\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidDataLength\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyAdminOrOwner\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyLink\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RequestNotFound\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"TransferFailed\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"senderAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"allowed\",\"type\":\"bool\"}],\"name\":\"AutoApproveAllowedSenderSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"ConfigChanged\",\"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\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"displayName\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"RegistrationApproved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"}],\"name\":\"RegistrationRejected\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"encryptedEmail\",\"type\":\"bytes\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"upkeepContract\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"adminAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"triggerType\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"triggerConfig\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"offchainConfig\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"checkData\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"RegistrationRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"triggerType\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"enumAutomationRegistrar2_3.AutoApproveType\",\"name\":\"autoApproveType\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"autoApproveMaxAllowed\",\"type\":\"uint32\"}],\"name\":\"TriggerConfigSet\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"LINK\",\"outputs\":[{\"internalType\":\"contractLinkTokenInterface\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"upkeepContract\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"address\",\"name\":\"adminAddress\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint8\",\"name\":\"triggerType\",\"type\":\"uint8\"},{\"internalType\":\"contractIERC20\",\"name\":\"billingToken\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"bytes\",\"name\":\"encryptedEmail\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"checkData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"triggerConfig\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"offchainConfig\",\"type\":\"bytes\"}],\"internalType\":\"structAutomationRegistrar2_3.RegistrationParams\",\"name\":\"requestParams\",\"type\":\"tuple\"},{\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"}],\"name\":\"approve\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"}],\"name\":\"cancel\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"senderAddress\",\"type\":\"address\"}],\"name\":\"getAutoApproveAllowedSender\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractIERC20\",\"name\":\"billingToken\",\"type\":\"address\"}],\"name\":\"getMinimumRegistrationAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"}],\"name\":\"getPendingRequest\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRegistry\",\"outputs\":[{\"internalType\":\"contractIAutomationRegistryMaster2_3\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"triggerType\",\"type\":\"uint8\"}],\"name\":\"getTriggerRegistrationDetails\",\"outputs\":[{\"components\":[{\"internalType\":\"enumAutomationRegistrar2_3.AutoApproveType\",\"name\":\"autoApproveType\",\"type\":\"uint8\"},{\"internalType\":\"uint32\",\"name\":\"autoApproveMaxAllowed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"approvedCount\",\"type\":\"uint32\"}],\"internalType\":\"structAutomationRegistrar2_3.TriggerRegistrationStorage\",\"name\":\"\",\"type\":\"tuple\"}],\"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\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"upkeepContract\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"address\",\"name\":\"adminAddress\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint8\",\"name\":\"triggerType\",\"type\":\"uint8\"},{\"internalType\":\"contractIERC20\",\"name\":\"billingToken\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"bytes\",\"name\":\"encryptedEmail\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"checkData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"triggerConfig\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"offchainConfig\",\"type\":\"bytes\"}],\"internalType\":\"structAutomationRegistrar2_3.RegistrationParams\",\"name\":\"requestParams\",\"type\":\"tuple\"}],\"name\":\"registerUpkeep\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"senderAddress\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"allowed\",\"type\":\"bool\"}],\"name\":\"setAutoApproveAllowedSender\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractIAutomationRegistryMaster2_3\",\"name\":\"registry\",\"type\":\"address\"},{\"internalType\":\"contractIERC20[]\",\"name\":\"billingTokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"minBalances\",\"type\":\"uint256[]\"}],\"name\":\"setConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"triggerType\",\"type\":\"uint8\"},{\"internalType\":\"enumAutomationRegistrar2_3.AutoApproveType\",\"name\":\"autoApproveType\",\"type\":\"uint8\"},{\"internalType\":\"uint32\",\"name\":\"autoApproveMaxAllowed\",\"type\":\"uint32\"}],\"name\":\"setTriggerConfig\",\"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\":\"view\",\"type\":\"function\"}]", + Bin: "0x60a06040523480156200001157600080fd5b5060405162002f1438038062002f148339810160408190526200003491620005c2565b33806000816200008b5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000be57620000be816200017c565b5050506001600160a01b038516608052620000db84838362000227565b60005b835181101562000170576200015b8482815181106200010157620001016200073e565b6020026020010151600001518583815181106200012257620001226200073e565b6020026020010151602001518684815181106200014357620001436200073e565b6020026020010151604001516200032360201b60201c565b80620001678162000754565b915050620000de565b505050505050620007d5565b336001600160a01b03821603620001d65760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000082565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b62000231620003d1565b80518251146200025457604051630dfe930960e41b815260040160405180910390fd5b600280546001600160a01b0319166001600160a01b03851617905560005b8251811015620002f4578181815181106200029157620002916200073e565b602002602001015160046000858481518110620002b257620002b26200073e565b60200260200101516001600160a01b03166001600160a01b03168152602001908152602001600020819055508080620002eb9062000754565b91505062000272565b506040517fb9b6902016bd1219d5fa6161243b61e7e9f7f959526dd94ef8fa3e403bf881c390600090a1505050565b6200032d620003d1565b60ff83166000908152600660205260409020805483919060ff191660018360028111156200035f576200035f6200077c565b021790555060ff831660009081526006602052604090819020805464ffffffff00191661010063ffffffff851602179055517f830a6d06a4e2caac67eba04323de22bdb04f032dd8b3d6a0c52b503d9a7036a390620003c49085908590859062000792565b60405180910390a1505050565b6000546001600160a01b031633146200042d5760405162461bcd60e51b815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e657200000000000000000000604482015260640162000082565b565b6001600160a01b03811681146200044557600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b604051606081016001600160401b038111828210171562000483576200048362000448565b60405290565b604051601f8201601f191681016001600160401b0381118282101715620004b457620004b462000448565b604052919050565b60006001600160401b03821115620004d857620004d862000448565b5060051b60200190565b600082601f830112620004f457600080fd5b815160206200050d6200050783620004bc565b62000489565b82815260059290921b840181019181810190868411156200052d57600080fd5b8286015b848110156200055557805162000547816200042f565b835291830191830162000531565b509695505050505050565b600082601f8301126200057257600080fd5b81516020620005856200050783620004bc565b82815260059290921b84018101918181019086841115620005a557600080fd5b8286015b84811015620005555780518352918301918301620005a9565b600080600080600060a08688031215620005db57600080fd5b8551620005e8816200042f565b80955050602080870151620005fd816200042f565b60408801519095506001600160401b03808211156200061b57600080fd5b818901915089601f8301126200063057600080fd5b8151620006416200050782620004bc565b8181526060918202840185019185820191908d8411156200066157600080fd5b948601945b83861015620006e45780868f031215620006805760008081fd5b6200068a6200045e565b865160ff811681146200069d5760008081fd5b81528688015160038110620006b25760008081fd5b81890152604087015163ffffffff81168114620006cf5760008081fd5b60408201528352948501949186019162000666565b8c01519098509450505080831115620006fc57600080fd5b6200070a8a848b01620004e2565b945060808901519250808311156200072157600080fd5b5050620007318882890162000560565b9150509295509295909350565b634e487b7160e01b600052603260045260246000fd5b6000600182016200077557634e487b7160e01b600052601160045260246000fd5b5060010190565b634e487b7160e01b600052602160045260246000fd5b60ff841681526060810160038410620007bb57634e487b7160e01b600052602160045260246000fd5b83602083015263ffffffff83166040830152949350505050565b6080516127006200081460003960008181610177015281816108b00152818161091901528181610d1e015281816113ba015261141101526127006000f3fe608060405234801561001057600080fd5b506004361061011b5760003560e01c80637e776f7f116100b2578063a4c0ed3611610081578063b5ff5b4111610066578063b5ff5b41146103bd578063c4d252f5146103d0578063f2fde38b146103e357600080fd5b8063a4c0ed3614610397578063accb8323146103aa57600080fd5b80637e776f7f1461024d57806388b12d55146102965780638da5cb5b14610343578063a2b1ff941461036157600080fd5b8063367b9b4f116100ee578063367b9b4f146101ff5780635ab1bd531461021457806366ab87f91461023257806379ba50971461024557600080fd5b8063181f5a77146101205780631b6b6d2314610172578063212d0884146101be5780632ce3a14a146101de575b600080fd5b61015c6040518060400160405280601981526020017f4175746f6d6174696f6e52656769737472617220322e332e300000000000000081525081565b60405161016991906118c2565b60405180910390f35b6101997f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610169565b6101d16101cc3660046118f2565b6103f6565b6040516101699190611977565b6101f16101ec3660046119c9565b610483565b604051908152602001610169565b61021261020d366004611a39565b6105c2565b005b60025473ffffffffffffffffffffffffffffffffffffffff16610199565b610212610240366004611ba9565b610654565b61021261079b565b61028661025b366004611c7f565b73ffffffffffffffffffffffffffffffffffffffff1660009081526003602052604090205460ff1690565b6040519015158152602001610169565b61030a6102a4366004611c9c565b60009081526005602090815260409182902082518084019093525473ffffffffffffffffffffffffffffffffffffffff8116808452740100000000000000000000000000000000000000009091046bffffffffffffffffffffffff169290910182905291565b6040805173ffffffffffffffffffffffffffffffffffffffff90931683526bffffffffffffffffffffffff909116602083015201610169565b60005473ffffffffffffffffffffffffffffffffffffffff16610199565b6101f161036f366004611c7f565b73ffffffffffffffffffffffffffffffffffffffff1660009081526004602052604090205490565b6102126103a5366004611cb5565b610898565b6102126103b8366004611d3e565b6109c6565b6102126103cb366004611d97565b610af3565b6102126103de366004611c9c565b610bd2565b6102126103f1366004611c7f565b610e5c565b60408051606080820183526000808352602080840182905283850182905260ff8681168352600690915290849020845192830190945283549293919283911660028111156104465761044661190d565b60028111156104575761045761190d565b8152905463ffffffff610100820481166020840152650100000000009091041660409091015292915050565b600061049560c0830160a08401611c7f565b73ffffffffffffffffffffffffffffffffffffffff166323b872dd33306104c26040870160208801611dfc565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b16815273ffffffffffffffffffffffffffffffffffffffff93841660048201529290911660248301526bffffffffffffffffffffffff1660448201526064016020604051808303816000875af1158015610549573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061056d9190611e17565b6105aa576040517f39f1c8d90000000000000000000000000000000000000000000000000000000081523060048201526024015b60405180910390fd5b6105bc6105b68361200d565b33610e70565b92915050565b6105ca61125e565b73ffffffffffffffffffffffffffffffffffffffff821660008181526003602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001685151590811790915591519182527f20c6237dac83526a849285a9f79d08a483291bdd3a056a0ef9ae94ecee1ad356910160405180910390a25050565b61065c61125e565b8051825114610697576040517fdfe9309000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff851617905560005b825181101561076c578181815181106106f5576106f5612019565b60200260200101516004600085848151811061071357610713612019565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550808061076490612077565b9150506106da565b506040517fb9b6902016bd1219d5fa6161243b61e7e9f7f959526dd94ef8fa3e403bf881c390600090a1505050565b60015473ffffffffffffffffffffffffffffffffffffffff16331461081c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e65720000000000000000000060448201526064016105a1565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610907576040517f018d10be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000610915828401846120af565b90507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168160a0015173ffffffffffffffffffffffffffffffffffffffff16146109a0576040517f018d10be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6bffffffffffffffffffffffff841660208201526109be8186610e70565b505050505050565b6109ce61125e565b60008181526005602090815260409182902082518084019093525473ffffffffffffffffffffffffffffffffffffffff8116808452740100000000000000000000000000000000000000009091046bffffffffffffffffffffffff1691830191909152610a67576040517f4b13b31e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600083604051602001610a7a9190612198565b604051602081830303815290604052805190602001209050808314610acb576040517f3f4d605300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600083815260056020526040812055610aec610ae68561200d565b826112e1565b5050505050565b610afb61125e565b60ff8316600090815260066020526040902080548391907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001836002811115610b4857610b4861190d565b021790555060ff83166000908152600660205260409081902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000ff1661010063ffffffff851602179055517f830a6d06a4e2caac67eba04323de22bdb04f032dd8b3d6a0c52b503d9a7036a390610bc59085908590859061235f565b60405180910390a1505050565b60008181526005602090815260409182902082518084019093525473ffffffffffffffffffffffffffffffffffffffff8116808452740100000000000000000000000000000000000000009091046bffffffffffffffffffffffff1691830191909152331480610c59575060005473ffffffffffffffffffffffffffffffffffffffff1633145b610c8f576040517f61685c2b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805173ffffffffffffffffffffffffffffffffffffffff16610cdd576040517f4b13b31e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082815260056020908152604080832083905583519184015190517fa9059cbb0000000000000000000000000000000000000000000000000000000081527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169263a9059cbb92610d959260040173ffffffffffffffffffffffffffffffffffffffff9290921682526bffffffffffffffffffffffff16602082015260400190565b6020604051808303816000875af1158015610db4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dd89190611e17565b905080610e2c5781516040517f39f1c8d900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911660048201526024016105a1565b60405183907f3663fb28ebc87645eb972c9dad8521bf665c623f287e79f1c56f1eb374b82a2290600090a2505050565b610e6461125e565b610e6d816116c4565b50565b60a082015173ffffffffffffffffffffffffffffffffffffffff166000908152600460209081526040822054908401516bffffffffffffffffffffffff161015610ee6576040517fcd1c886700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b604083015173ffffffffffffffffffffffffffffffffffffffff16610f37576040517f05bb467c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60025460a08401516040517fa538b2eb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff918216600482015291169063a538b2eb90602401602060405180830381865afa158015610fab573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fcf9190611e17565b611005576040517f1183afea00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600083604051602001611018919061238a565b604051602081830303815290604052805190602001209050836000015173ffffffffffffffffffffffffffffffffffffffff16817f7684390ebb103102f7f48c71439c2408713f8d437782a6fab2756acc0e42c1b78660c001518760e00151886060015189604001518a608001518b61012001518c61014001518d61010001518e602001516040516110b2999897969594939291906124f6565b60405180910390a3608084015160ff908116600090815260066020526040808220815160608101909252805492936111359383911660028111156110f8576110f861190d565b60028111156111095761110961190d565b8152905463ffffffff6101008204811660208401526501000000000090910416604090910152856117b9565b1561119d57608085015160ff166000908152600660205260409020805465010000000000900463ffffffff1690600561116d836125b1565b91906101000a81548163ffffffff021916908363ffffffff1602179055505061119685836112e1565b9050611256565b6020858101516000848152600590925260408220546111e291907401000000000000000000000000000000000000000090046bffffffffffffffffffffffff166125d4565b6040805180820182528882015173ffffffffffffffffffffffffffffffffffffffff90811682526bffffffffffffffffffffffff9384166020808401918252600089815260059091529390932091519251909316740100000000000000000000000000000000000000000291909216179055505b949350505050565b60005473ffffffffffffffffffffffffffffffffffffffff1633146112df576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e65720000000000000000000060448201526064016105a1565b565b60025482516060840151604080860151608087015160a08801516101008901516101208a01516101408b015195517fc62cf68400000000000000000000000000000000000000000000000000000000815260009973ffffffffffffffffffffffffffffffffffffffff16988a988a9863c62cf6849861137198939792969095939492939092909190600401612600565b6020604051808303816000875af1158015611390573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113b4919061268e565b905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168660a0015173ffffffffffffffffffffffffffffffffffffffff16036114db577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16634000aea08488602001518560405160200161146491815260200190565b6040516020818303038152906040526040518463ffffffff1660e01b8152600401611491939291906126a7565b6020604051808303816000875af11580156114b0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114d49190611e17565b905061162f565b60a086015160208701516040517f095ea7b300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff86811660048301526bffffffffffffffffffffffff909216602482015291169063095ea7b3906044016020604051808303816000875af1158015611568573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061158c9190611e17565b9050801561162f5760208601516040517f948108f7000000000000000000000000000000000000000000000000000000008152600481018490526bffffffffffffffffffffffff909116602482015273ffffffffffffffffffffffffffffffffffffffff84169063948108f790604401600060405180830381600087803b15801561161657600080fd5b505af115801561162a573d6000803e3d6000fd5b505050505b8061167e576040517f39f1c8d900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff841660048201526024016105a1565b81857fb9a292fb7e3edd920cd2d2829a3615a640c43fd7de0a0820aa0668feb4c37d4b8860c001516040516116b391906118c2565b60405180910390a350949350505050565b3373ffffffffffffffffffffffffffffffffffffffff821603611743576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c6600000000000000000060448201526064016105a1565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b600080835160028111156117cf576117cf61190d565b036117dc575060006105bc565b6001835160028111156117f1576117f161190d565b148015611824575073ffffffffffffffffffffffffffffffffffffffff821660009081526003602052604090205460ff16155b15611831575060006105bc565b826020015163ffffffff16836040015163ffffffff161015611855575060016105bc565b50600092915050565b6000815180845260005b8181101561188457602081850181015186830182015201611868565b5060006020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b6020815260006118d5602083018461185e565b9392505050565b803560ff811681146118ed57600080fd5b919050565b60006020828403121561190457600080fd5b6118d5826118dc565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60038110611973577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b9052565b600060608201905061198a82845161193c565b602083015163ffffffff8082166020850152806040860151166040850152505092915050565b600061016082840312156119c357600080fd5b50919050565b6000602082840312156119db57600080fd5b813567ffffffffffffffff8111156119f257600080fd5b611256848285016119b0565b73ffffffffffffffffffffffffffffffffffffffff81168114610e6d57600080fd5b80356118ed816119fe565b8015158114610e6d57600080fd5b60008060408385031215611a4c57600080fd5b8235611a57816119fe565b91506020830135611a6781611a2b565b809150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051610160810167ffffffffffffffff81118282101715611ac557611ac5611a72565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715611b1257611b12611a72565b604052919050565b600067ffffffffffffffff821115611b3457611b34611a72565b5060051b60200190565b600082601f830112611b4f57600080fd5b81356020611b64611b5f83611b1a565b611acb565b82815260059290921b84018101918181019086841115611b8357600080fd5b8286015b84811015611b9e5780358352918301918301611b87565b509695505050505050565b600080600060608486031215611bbe57600080fd5b8335611bc9816119fe565b925060208481013567ffffffffffffffff80821115611be757600080fd5b818701915087601f830112611bfb57600080fd5b8135611c09611b5f82611b1a565b81815260059190911b8301840190848101908a831115611c2857600080fd5b938501935b82851015611c4f578435611c40816119fe565b82529385019390850190611c2d565b965050506040870135925080831115611c6757600080fd5b5050611c7586828701611b3e565b9150509250925092565b600060208284031215611c9157600080fd5b81356118d5816119fe565b600060208284031215611cae57600080fd5b5035919050565b60008060008060608587031215611ccb57600080fd5b8435611cd6816119fe565b935060208501359250604085013567ffffffffffffffff80821115611cfa57600080fd5b818701915087601f830112611d0e57600080fd5b813581811115611d1d57600080fd5b886020828501011115611d2f57600080fd5b95989497505060200194505050565b60008060408385031215611d5157600080fd5b823567ffffffffffffffff811115611d6857600080fd5b611d74858286016119b0565b95602094909401359450505050565b803563ffffffff811681146118ed57600080fd5b600080600060608486031215611dac57600080fd5b611db5846118dc565b9250602084013560038110611dc957600080fd5b9150611dd760408501611d83565b90509250925092565b80356bffffffffffffffffffffffff811681146118ed57600080fd5b600060208284031215611e0e57600080fd5b6118d582611de0565b600060208284031215611e2957600080fd5b81516118d581611a2b565b600082601f830112611e4557600080fd5b813567ffffffffffffffff811115611e5f57611e5f611a72565b611e9060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601611acb565b818152846020838601011115611ea557600080fd5b816020850160208301376000918101602001919091529392505050565b60006101608284031215611ed557600080fd5b611edd611aa1565b9050611ee882611a20565b8152611ef660208301611de0565b6020820152611f0760408301611a20565b6040820152611f1860608301611d83565b6060820152611f29608083016118dc565b6080820152611f3a60a08301611a20565b60a082015260c082013567ffffffffffffffff80821115611f5a57600080fd5b611f6685838601611e34565b60c084015260e0840135915080821115611f7f57600080fd5b611f8b85838601611e34565b60e084015261010091508184013581811115611fa657600080fd5b611fb286828701611e34565b838501525061012091508184013581811115611fcd57600080fd5b611fd986828701611e34565b838501525061014091508184013581811115611ff457600080fd5b61200086828701611e34565b8385015250505092915050565b60006105bc3683611ec2565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036120a8576120a8612048565b5060010190565b6000602082840312156120c157600080fd5b813567ffffffffffffffff8111156120d857600080fd5b61125684828501611ec2565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261211957600080fd5b830160208101925035905067ffffffffffffffff81111561213957600080fd5b80360382131561214857600080fd5b9250929050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b602081526121c6602082016121ac84611a20565b73ffffffffffffffffffffffffffffffffffffffff169052565b60006121d460208401611de0565b6bffffffffffffffffffffffff81166040840152506121f560408401611a20565b73ffffffffffffffffffffffffffffffffffffffff811660608401525061221e60608401611d83565b63ffffffff8116608084015250612237608084016118dc565b60ff811660a08401525061224d60a08401611a20565b73ffffffffffffffffffffffffffffffffffffffff811660c08401525061227760c08401846120e4565b6101608060e086015261228f6101808601838561214f565b925061229e60e08701876120e4565b92507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe06101008188870301818901526122d886868561214f565b95506122e6818a018a6120e4565b955092505061012081888703018189015261230286868561214f565b9550612310818a018a6120e4565b955092505061014081888703018189015261232c86868561214f565b955061233a818a018a6120e4565b95509250508087860301838801525061235484848361214f565b979650505050505050565b60ff8416815260608101612376602083018561193c565b63ffffffff83166040830152949350505050565b602081526123b160208201835173ffffffffffffffffffffffffffffffffffffffff169052565b600060208301516123d260408401826bffffffffffffffffffffffff169052565b50604083015173ffffffffffffffffffffffffffffffffffffffff8116606084015250606083015163ffffffff8116608084015250608083015160ff811660a08401525060a083015173ffffffffffffffffffffffffffffffffffffffff811660c08401525060c08301516101608060e085015261245461018085018361185e565b915060e08501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0610100818786030181880152612492858461185e565b9450808801519250506101208187860301818801526124b1858461185e565b9450808801519250506101408187860301818801526124d0858461185e565b9088015187820390920184880152935090506124ec838261185e565b9695505050505050565b600061012080835261250a8184018d61185e565b9050828103602084015261251e818c61185e565b905063ffffffff8a16604084015273ffffffffffffffffffffffffffffffffffffffff8916606084015260ff8816608084015282810360a0840152612563818861185e565b905082810360c0840152612577818761185e565b905082810360e084015261258b818661185e565b9150506bffffffffffffffffffffffff83166101008301529a9950505050505050505050565b600063ffffffff8083168181036125ca576125ca612048565b6001019392505050565b6bffffffffffffffffffffffff8181168382160190808211156125f9576125f9612048565b5092915050565b600061010073ffffffffffffffffffffffffffffffffffffffff808c16845263ffffffff8b166020850152808a16604085015260ff891660608501528088166080850152508060a08401526126578184018761185e565b905082810360c084015261266b818661185e565b905082810360e084015261267f818561185e565b9b9a5050505050505050505050565b6000602082840312156126a057600080fd5b5051919050565b73ffffffffffffffffffffffffffffffffffffffff841681526bffffffffffffffffffffffff831660208201526060604082015260006126ea606083018461185e565b9594505050505056fea164736f6c6343000813000a", } var AutomationRegistrarABI = AutomationRegistrarMetaData.ABI var AutomationRegistrarBin = AutomationRegistrarMetaData.Bin -func DeployAutomationRegistrar(auth *bind.TransactOpts, backend bind.ContractBackend, LINKAddress common.Address, AutomationRegistry common.Address, minLINKJuels *big.Int, triggerConfigs []AutomationRegistrar23InitialTriggerConfig) (common.Address, *types.Transaction, *AutomationRegistrar, error) { +func DeployAutomationRegistrar(auth *bind.TransactOpts, backend bind.ContractBackend, LINKAddress common.Address, registry common.Address, triggerConfigs []AutomationRegistrar23InitialTriggerConfig, billingTokens []common.Address, minRegistrationFees []*big.Int) (common.Address, *types.Transaction, *AutomationRegistrar, error) { parsed, err := AutomationRegistrarMetaData.GetAbi() if err != nil { return common.Address{}, nil, nil, err @@ -73,7 +74,7 @@ func DeployAutomationRegistrar(auth *bind.TransactOpts, backend bind.ContractBac return common.Address{}, nil, nil, errors.New("GetABI returned nil") } - address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(AutomationRegistrarBin), backend, LINKAddress, AutomationRegistry, minLINKJuels, triggerConfigs) + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(AutomationRegistrarBin), backend, LINKAddress, registry, triggerConfigs, billingTokens, minRegistrationFees) if err != nil { return common.Address{}, nil, nil, err } @@ -240,34 +241,26 @@ func (_AutomationRegistrar *AutomationRegistrarCallerSession) GetAutoApproveAllo return _AutomationRegistrar.Contract.GetAutoApproveAllowedSender(&_AutomationRegistrar.CallOpts, senderAddress) } -func (_AutomationRegistrar *AutomationRegistrarCaller) GetConfig(opts *bind.CallOpts) (GetConfig, - - error) { +func (_AutomationRegistrar *AutomationRegistrarCaller) GetMinimumRegistrationAmount(opts *bind.CallOpts, billingToken common.Address) (*big.Int, error) { var out []interface{} - err := _AutomationRegistrar.contract.Call(opts, &out, "getConfig") + err := _AutomationRegistrar.contract.Call(opts, &out, "getMinimumRegistrationAmount", billingToken) - outstruct := new(GetConfig) if err != nil { - return *outstruct, err + return *new(*big.Int), err } - outstruct.AutomationRegistry = *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - outstruct.MinLINKJuels = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - return *outstruct, err + return out0, err } -func (_AutomationRegistrar *AutomationRegistrarSession) GetConfig() (GetConfig, - - error) { - return _AutomationRegistrar.Contract.GetConfig(&_AutomationRegistrar.CallOpts) +func (_AutomationRegistrar *AutomationRegistrarSession) GetMinimumRegistrationAmount(billingToken common.Address) (*big.Int, error) { + return _AutomationRegistrar.Contract.GetMinimumRegistrationAmount(&_AutomationRegistrar.CallOpts, billingToken) } -func (_AutomationRegistrar *AutomationRegistrarCallerSession) GetConfig() (GetConfig, - - error) { - return _AutomationRegistrar.Contract.GetConfig(&_AutomationRegistrar.CallOpts) +func (_AutomationRegistrar *AutomationRegistrarCallerSession) GetMinimumRegistrationAmount(billingToken common.Address) (*big.Int, error) { + return _AutomationRegistrar.Contract.GetMinimumRegistrationAmount(&_AutomationRegistrar.CallOpts, billingToken) } func (_AutomationRegistrar *AutomationRegistrarCaller) GetPendingRequest(opts *bind.CallOpts, hash [32]byte) (common.Address, *big.Int, error) { @@ -293,6 +286,28 @@ func (_AutomationRegistrar *AutomationRegistrarCallerSession) GetPendingRequest( return _AutomationRegistrar.Contract.GetPendingRequest(&_AutomationRegistrar.CallOpts, hash) } +func (_AutomationRegistrar *AutomationRegistrarCaller) GetRegistry(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _AutomationRegistrar.contract.Call(opts, &out, "getRegistry") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +func (_AutomationRegistrar *AutomationRegistrarSession) GetRegistry() (common.Address, error) { + return _AutomationRegistrar.Contract.GetRegistry(&_AutomationRegistrar.CallOpts) +} + +func (_AutomationRegistrar *AutomationRegistrarCallerSession) GetRegistry() (common.Address, error) { + return _AutomationRegistrar.Contract.GetRegistry(&_AutomationRegistrar.CallOpts) +} + func (_AutomationRegistrar *AutomationRegistrarCaller) GetTriggerRegistrationDetails(opts *bind.CallOpts, triggerType uint8) (AutomationRegistrar23TriggerRegistrationStorage, error) { var out []interface{} err := _AutomationRegistrar.contract.Call(opts, &out, "getTriggerRegistrationDetails", triggerType) @@ -371,16 +386,16 @@ func (_AutomationRegistrar *AutomationRegistrarTransactorSession) AcceptOwnershi return _AutomationRegistrar.Contract.AcceptOwnership(&_AutomationRegistrar.TransactOpts) } -func (_AutomationRegistrar *AutomationRegistrarTransactor) Approve(opts *bind.TransactOpts, name string, upkeepContract common.Address, gasLimit uint32, adminAddress common.Address, triggerType uint8, checkData []byte, triggerConfig []byte, offchainConfig []byte, hash [32]byte) (*types.Transaction, error) { - return _AutomationRegistrar.contract.Transact(opts, "approve", name, upkeepContract, gasLimit, adminAddress, triggerType, checkData, triggerConfig, offchainConfig, hash) +func (_AutomationRegistrar *AutomationRegistrarTransactor) Approve(opts *bind.TransactOpts, requestParams AutomationRegistrar23RegistrationParams, hash [32]byte) (*types.Transaction, error) { + return _AutomationRegistrar.contract.Transact(opts, "approve", requestParams, hash) } -func (_AutomationRegistrar *AutomationRegistrarSession) Approve(name string, upkeepContract common.Address, gasLimit uint32, adminAddress common.Address, triggerType uint8, checkData []byte, triggerConfig []byte, offchainConfig []byte, hash [32]byte) (*types.Transaction, error) { - return _AutomationRegistrar.Contract.Approve(&_AutomationRegistrar.TransactOpts, name, upkeepContract, gasLimit, adminAddress, triggerType, checkData, triggerConfig, offchainConfig, hash) +func (_AutomationRegistrar *AutomationRegistrarSession) Approve(requestParams AutomationRegistrar23RegistrationParams, hash [32]byte) (*types.Transaction, error) { + return _AutomationRegistrar.Contract.Approve(&_AutomationRegistrar.TransactOpts, requestParams, hash) } -func (_AutomationRegistrar *AutomationRegistrarTransactorSession) Approve(name string, upkeepContract common.Address, gasLimit uint32, adminAddress common.Address, triggerType uint8, checkData []byte, triggerConfig []byte, offchainConfig []byte, hash [32]byte) (*types.Transaction, error) { - return _AutomationRegistrar.Contract.Approve(&_AutomationRegistrar.TransactOpts, name, upkeepContract, gasLimit, adminAddress, triggerType, checkData, triggerConfig, offchainConfig, hash) +func (_AutomationRegistrar *AutomationRegistrarTransactorSession) Approve(requestParams AutomationRegistrar23RegistrationParams, hash [32]byte) (*types.Transaction, error) { + return _AutomationRegistrar.Contract.Approve(&_AutomationRegistrar.TransactOpts, requestParams, hash) } func (_AutomationRegistrar *AutomationRegistrarTransactor) Cancel(opts *bind.TransactOpts, hash [32]byte) (*types.Transaction, error) { @@ -407,18 +422,6 @@ func (_AutomationRegistrar *AutomationRegistrarTransactorSession) OnTokenTransfe return _AutomationRegistrar.Contract.OnTokenTransfer(&_AutomationRegistrar.TransactOpts, sender, amount, data) } -func (_AutomationRegistrar *AutomationRegistrarTransactor) Register(opts *bind.TransactOpts, name string, encryptedEmail []byte, upkeepContract common.Address, gasLimit uint32, adminAddress common.Address, triggerType uint8, checkData []byte, triggerConfig []byte, offchainConfig []byte, amount *big.Int, sender common.Address) (*types.Transaction, error) { - return _AutomationRegistrar.contract.Transact(opts, "register", name, encryptedEmail, upkeepContract, gasLimit, adminAddress, triggerType, checkData, triggerConfig, offchainConfig, amount, sender) -} - -func (_AutomationRegistrar *AutomationRegistrarSession) Register(name string, encryptedEmail []byte, upkeepContract common.Address, gasLimit uint32, adminAddress common.Address, triggerType uint8, checkData []byte, triggerConfig []byte, offchainConfig []byte, amount *big.Int, sender common.Address) (*types.Transaction, error) { - return _AutomationRegistrar.Contract.Register(&_AutomationRegistrar.TransactOpts, name, encryptedEmail, upkeepContract, gasLimit, adminAddress, triggerType, checkData, triggerConfig, offchainConfig, amount, sender) -} - -func (_AutomationRegistrar *AutomationRegistrarTransactorSession) Register(name string, encryptedEmail []byte, upkeepContract common.Address, gasLimit uint32, adminAddress common.Address, triggerType uint8, checkData []byte, triggerConfig []byte, offchainConfig []byte, amount *big.Int, sender common.Address) (*types.Transaction, error) { - return _AutomationRegistrar.Contract.Register(&_AutomationRegistrar.TransactOpts, name, encryptedEmail, upkeepContract, gasLimit, adminAddress, triggerType, checkData, triggerConfig, offchainConfig, amount, sender) -} - func (_AutomationRegistrar *AutomationRegistrarTransactor) RegisterUpkeep(opts *bind.TransactOpts, requestParams AutomationRegistrar23RegistrationParams) (*types.Transaction, error) { return _AutomationRegistrar.contract.Transact(opts, "registerUpkeep", requestParams) } @@ -443,16 +446,16 @@ func (_AutomationRegistrar *AutomationRegistrarTransactorSession) SetAutoApprove return _AutomationRegistrar.Contract.SetAutoApproveAllowedSender(&_AutomationRegistrar.TransactOpts, senderAddress, allowed) } -func (_AutomationRegistrar *AutomationRegistrarTransactor) SetConfig(opts *bind.TransactOpts, AutomationRegistry common.Address, minLINKJuels *big.Int) (*types.Transaction, error) { - return _AutomationRegistrar.contract.Transact(opts, "setConfig", AutomationRegistry, minLINKJuels) +func (_AutomationRegistrar *AutomationRegistrarTransactor) SetConfig(opts *bind.TransactOpts, registry common.Address, billingTokens []common.Address, minBalances []*big.Int) (*types.Transaction, error) { + return _AutomationRegistrar.contract.Transact(opts, "setConfig", registry, billingTokens, minBalances) } -func (_AutomationRegistrar *AutomationRegistrarSession) SetConfig(AutomationRegistry common.Address, minLINKJuels *big.Int) (*types.Transaction, error) { - return _AutomationRegistrar.Contract.SetConfig(&_AutomationRegistrar.TransactOpts, AutomationRegistry, minLINKJuels) +func (_AutomationRegistrar *AutomationRegistrarSession) SetConfig(registry common.Address, billingTokens []common.Address, minBalances []*big.Int) (*types.Transaction, error) { + return _AutomationRegistrar.Contract.SetConfig(&_AutomationRegistrar.TransactOpts, registry, billingTokens, minBalances) } -func (_AutomationRegistrar *AutomationRegistrarTransactorSession) SetConfig(AutomationRegistry common.Address, minLINKJuels *big.Int) (*types.Transaction, error) { - return _AutomationRegistrar.Contract.SetConfig(&_AutomationRegistrar.TransactOpts, AutomationRegistry, minLINKJuels) +func (_AutomationRegistrar *AutomationRegistrarTransactorSession) SetConfig(registry common.Address, billingTokens []common.Address, minBalances []*big.Int) (*types.Transaction, error) { + return _AutomationRegistrar.Contract.SetConfig(&_AutomationRegistrar.TransactOpts, registry, billingTokens, minBalances) } func (_AutomationRegistrar *AutomationRegistrarTransactor) SetTriggerConfig(opts *bind.TransactOpts, triggerType uint8, autoApproveType uint8, autoApproveMaxAllowed uint32) (*types.Transaction, error) { @@ -668,9 +671,7 @@ func (it *AutomationRegistrarConfigChangedIterator) Close() error { } type AutomationRegistrarConfigChanged struct { - AutomationRegistry common.Address - MinLINKJuels *big.Int - Raw types.Log + Raw types.Log } func (_AutomationRegistrar *AutomationRegistrarFilterer) FilterConfigChanged(opts *bind.FilterOpts) (*AutomationRegistrarConfigChangedIterator, error) { @@ -1529,11 +1530,6 @@ func (_AutomationRegistrar *AutomationRegistrarFilterer) ParseTriggerConfigSet(l return event, nil } -type GetConfig struct { - AutomationRegistry common.Address - MinLINKJuels *big.Int -} - func (_AutomationRegistrar *AutomationRegistrar) ParseLog(log types.Log) (generated.AbigenLog, error) { switch log.Topics[0] { case _AutomationRegistrar.abi.Events["AutoApproveAllowedSenderSet"].ID: @@ -1563,7 +1559,7 @@ func (AutomationRegistrarAutoApproveAllowedSenderSet) Topic() common.Hash { } func (AutomationRegistrarConfigChanged) Topic() common.Hash { - return common.HexToHash("0x39ce5d867555f0b0183e358fce5b158e7ca4fecd7c01cb7e0e19f1e23285838a") + return common.HexToHash("0xb9b6902016bd1219d5fa6161243b61e7e9f7f959526dd94ef8fa3e403bf881c3") } func (AutomationRegistrarOwnershipTransferRequested) Topic() common.Hash { @@ -1599,12 +1595,12 @@ type AutomationRegistrarInterface interface { GetAutoApproveAllowedSender(opts *bind.CallOpts, senderAddress common.Address) (bool, error) - GetConfig(opts *bind.CallOpts) (GetConfig, - - error) + GetMinimumRegistrationAmount(opts *bind.CallOpts, billingToken common.Address) (*big.Int, error) GetPendingRequest(opts *bind.CallOpts, hash [32]byte) (common.Address, *big.Int, error) + GetRegistry(opts *bind.CallOpts) (common.Address, error) + GetTriggerRegistrationDetails(opts *bind.CallOpts, triggerType uint8) (AutomationRegistrar23TriggerRegistrationStorage, error) Owner(opts *bind.CallOpts) (common.Address, error) @@ -1613,19 +1609,17 @@ type AutomationRegistrarInterface interface { AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) - Approve(opts *bind.TransactOpts, name string, upkeepContract common.Address, gasLimit uint32, adminAddress common.Address, triggerType uint8, checkData []byte, triggerConfig []byte, offchainConfig []byte, hash [32]byte) (*types.Transaction, error) + Approve(opts *bind.TransactOpts, requestParams AutomationRegistrar23RegistrationParams, hash [32]byte) (*types.Transaction, error) Cancel(opts *bind.TransactOpts, hash [32]byte) (*types.Transaction, error) OnTokenTransfer(opts *bind.TransactOpts, sender common.Address, amount *big.Int, data []byte) (*types.Transaction, error) - Register(opts *bind.TransactOpts, name string, encryptedEmail []byte, upkeepContract common.Address, gasLimit uint32, adminAddress common.Address, triggerType uint8, checkData []byte, triggerConfig []byte, offchainConfig []byte, amount *big.Int, sender common.Address) (*types.Transaction, error) - RegisterUpkeep(opts *bind.TransactOpts, requestParams AutomationRegistrar23RegistrationParams) (*types.Transaction, error) SetAutoApproveAllowedSender(opts *bind.TransactOpts, senderAddress common.Address, allowed bool) (*types.Transaction, error) - SetConfig(opts *bind.TransactOpts, AutomationRegistry common.Address, minLINKJuels *big.Int) (*types.Transaction, error) + SetConfig(opts *bind.TransactOpts, registry common.Address, billingTokens []common.Address, minBalances []*big.Int) (*types.Transaction, error) SetTriggerConfig(opts *bind.TransactOpts, triggerType uint8, autoApproveType uint8, autoApproveMaxAllowed uint32) (*types.Transaction, error) diff --git a/core/gethwrappers/generated/automation_registry_logic_a_wrapper_2_3/automation_registry_logic_a_wrapper_2_3.go b/core/gethwrappers/generated/automation_registry_logic_a_wrapper_2_3/automation_registry_logic_a_wrapper_2_3.go index d80f65dc8d9..100662936aa 100644 --- a/core/gethwrappers/generated/automation_registry_logic_a_wrapper_2_3/automation_registry_logic_a_wrapper_2_3.go +++ b/core/gethwrappers/generated/automation_registry_logic_a_wrapper_2_3/automation_registry_logic_a_wrapper_2_3.go @@ -30,9 +30,17 @@ var ( _ = abi.ConvertType ) +type AutomationRegistryBase23BillingConfig struct { + GasFeePPB uint32 + FlatFeeMicroLink *big.Int + PriceFeed common.Address + FallbackPrice *big.Int + MinSpend *big.Int +} + var AutomationRegistryLogicAMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"contractAutomationRegistryLogicB2_3\",\"name\":\"logicB\",\"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\":[],\"name\":\"InvalidDataLength\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidPayee\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidRecipient\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidReport\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidSigner\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTransmitter\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTrigger\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTriggerType\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MaxCheckDataSizeCanOnlyIncrease\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MaxPerformDataSizeCanOnlyIncrease\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MigrationNotPermitted\",\"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\":\"OnlyPausedUpkeep\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlySimulatedBackend\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyUnpausedUpkeep\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ParameterLengthError\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PaymentGreaterThanAllLINK\",\"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\":\"UpkeepAlreadyExists\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UpkeepCancelled\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UpkeepNotCanceled\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UpkeepNotNeeded\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ValueNotChanged\",\"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\"},{\"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\":true,\"internalType\":\"bytes32\",\"name\":\"dedupKey\",\"type\":\"bytes32\"}],\"name\":\"DedupKeyAdded\",\"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\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"OwnerFundsWithdrawn\",\"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\":\"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\":\"nonpayable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"addFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"cancelUpkeep\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bytes[]\",\"name\":\"values\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"checkCallback\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"upkeepNeeded\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"performData\",\"type\":\"bytes\"},{\"internalType\":\"enumAutomationRegistryBase2_3.UpkeepFailureReason\",\"name\":\"upkeepFailureReason\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"gasUsed\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"triggerData\",\"type\":\"bytes\"}],\"name\":\"checkUpkeep\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"upkeepNeeded\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"performData\",\"type\":\"bytes\"},{\"internalType\":\"enumAutomationRegistryBase2_3.UpkeepFailureReason\",\"name\":\"upkeepFailureReason\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"gasUsed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fastGasWei\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"linkNative\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"checkUpkeep\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"upkeepNeeded\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"performData\",\"type\":\"bytes\"},{\"internalType\":\"enumAutomationRegistryBase2_3.UpkeepFailureReason\",\"name\":\"upkeepFailureReason\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"gasUsed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fastGasWei\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"linkNative\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"}],\"name\":\"executeCallback\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"upkeepNeeded\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"performData\",\"type\":\"bytes\"},{\"internalType\":\"enumAutomationRegistryBase2_3.UpkeepFailureReason\",\"name\":\"upkeepFailureReason\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"gasUsed\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"fallbackTo\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\"},{\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"}],\"name\":\"migrateUpkeeps\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"encodedUpkeeps\",\"type\":\"bytes\"}],\"name\":\"receiveUpkeeps\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"enumAutomationRegistryBase2_3.Trigger\",\"name\":\"triggerType\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"checkData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"triggerConfig\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"offchainConfig\",\"type\":\"bytes\"}],\"name\":\"registerUpkeep\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"checkData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"offchainConfig\",\"type\":\"bytes\"}],\"name\":\"registerUpkeep\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"triggerConfig\",\"type\":\"bytes\"}],\"name\":\"setUpkeepTriggerConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x6101406040523480156200001257600080fd5b5060405162005f1538038062005f158339810160408190526200003591620003b1565b80816001600160a01b031663ca30e6036040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000075573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200009b9190620003b1565b826001600160a01b031663b10b673c6040518163ffffffff1660e01b8152600401602060405180830381865afa158015620000da573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001009190620003b1565b836001600160a01b0316636709d0e56040518163ffffffff1660e01b8152600401602060405180830381865afa1580156200013f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001659190620003b1565b846001600160a01b0316635425d8ac6040518163ffffffff1660e01b8152600401602060405180830381865afa158015620001a4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001ca9190620003b1565b856001600160a01b031663a08714c06040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000209573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200022f9190620003b1565b3380600081620002865760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620002b957620002b981620002ed565b5050506001600160a01b0394851660805292841660a05290831660c052821660e052811661010052166101205250620003d8565b336001600160a01b03821603620003475760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c6600000000000000000060448201526064016200027d565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6001600160a01b0381168114620003ae57600080fd5b50565b600060208284031215620003c457600080fd5b8151620003d18162000398565b9392505050565b60805160a05160c05160e0516101005161012051615ad86200043d6000396000818161010e01526101a9015260006131540152600081816103e10152611ffe0152600061333d01526000613421015260008181611e40015261240c0152615ad86000f3fe60806040523480156200001157600080fd5b50600436106200010c5760003560e01c806385c1b0ba11620000a5578063c8048022116200006f578063c804802214620002b7578063ce7dc5b414620002ce578063f2fde38b14620002e5578063f7d334ba14620002fc576200010c565b806385c1b0ba14620002535780638da5cb5b146200026a5780638e86139b1462000289578063948108f714620002a0576200010c565b80634ee88d3511620000e75780634ee88d3514620001ef5780636ded9eae146200020657806371791aa0146200021d57806379ba50971462000249576200010c565b806328f32f38146200015457806329c5efad146200017e578063349e8cca14620001a7575b7f00000000000000000000000000000000000000000000000000000000000000003660008037600080366000845af43d6000803e8080156200014d573d6000f35b3d6000fd5b005b6200016b6200016536600462004073565b62000313565b6040519081526020015b60405180910390f35b620001956200018f36600462004159565b6200068d565b60405162000175949392919062004281565b7f00000000000000000000000000000000000000000000000000000000000000005b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200162000175565b6200015262000200366004620042be565b62000931565b6200016b620002173660046200430e565b62000999565b620002346200022e36600462004159565b620009ff565b604051620001759796959493929190620043c1565b620001526200114d565b620001526200026436600462004413565b62001250565b60005473ffffffffffffffffffffffffffffffffffffffff16620001c9565b620001526200029a366004620044a0565b62001ec1565b62000152620002b136600462004503565b62002249565b62000152620002c836600462004532565b620024dc565b62000195620002df36600462004608565b62002955565b62000152620002f63660046200467f565b62002a1b565b620002346200030d36600462004532565b62002a33565b6000805473ffffffffffffffffffffffffffffffffffffffff1633148015906200034757506200034560093362002a71565b155b156200037f576040517fd48b678b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff89163b620003ce576040517f09ee12d500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b620003d98662002aa5565b9050600089307f00000000000000000000000000000000000000000000000000000000000000006040516200040e9062003dff565b73ffffffffffffffffffffffffffffffffffffffff938416815291831660208301529091166040820152606001604051809103906000f08015801562000458573d6000803e3d6000fd5b5090506200051f826040518060e001604052806000151581526020018c63ffffffff16815260200163ffffffff801681526020018473ffffffffffffffffffffffffffffffffffffffff16815260200160006bffffffffffffffffffffffff16815260200160006bffffffffffffffffffffffff168152602001600063ffffffff168152508a89898080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508b92508a915062002d519050565b6015805474010000000000000000000000000000000000000000900463ffffffff169060146200054f83620046ce565b91906101000a81548163ffffffff021916908363ffffffff16021790555050817fbae366358c023f887e791d7a62f2e4316f1026bd77f6fb49501a917b3bc5d0128a8a604051620005c892919063ffffffff92909216825273ffffffffffffffffffffffffffffffffffffffff16602082015260400190565b60405180910390a2817fcba2d5723b2ee59e53a8e8a82a4a7caf4fdfe70e9f7c582950bf7e7a5c24e83d8787604051620006049291906200473d565b60405180910390a2817f2b72ac786c97e68dbab71023ed6f2bdbfc80ad9bb7808941929229d71b7d5664856040516200063e919062004753565b60405180910390a2817f3e8740446213c8a77d40e08f79136ce3f347d13ed270a6ebdf57159e0faf48508460405162000678919062004753565b60405180910390a25098975050505050505050565b600060606000806200069e6200313c565b600086815260046020908152604091829020825160e081018452815460ff811615158252610100810463ffffffff90811694830194909452650100000000008104841694820194909452690100000000000000000090930473ffffffffffffffffffffffffffffffffffffffff166060840152600101546bffffffffffffffffffffffff80821660808501526c0100000000000000000000000082041660a0840152780100000000000000000000000000000000000000000000000090041660c08201525a9150600080826060015173ffffffffffffffffffffffffffffffffffffffff1663f00e6a2a6040518163ffffffff1660e01b8152600401602060405180830381865afa158015620007b8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620007de919062004775565b73ffffffffffffffffffffffffffffffffffffffff166014600101600c9054906101000a900463ffffffff1663ffffffff168960405162000820919062004795565b60006040518083038160008787f1925050503d806000811462000860576040519150601f19603f3d011682016040523d82523d6000602084013e62000865565b606091505b50915091505a620008779085620047b3565b935081620008a257600060405180602001604052806000815250600796509650965050505062000928565b80806020019051810190620008b8919062004824565b909750955086620008e657600060405180602001604052806000815250600496509650965050505062000928565b601654865164010000000090910463ffffffff1610156200092457600060405180602001604052806000815250600596509650965050505062000928565b5050505b92959194509250565b6200093c83620031ae565b6000838152601b602052604090206200095782848362004919565b50827f2b72ac786c97e68dbab71023ed6f2bdbfc80ad9bb7808941929229d71b7d566483836040516200098c9291906200473d565b60405180910390a2505050565b6000620009f388888860008989604051806020016040528060008152508a8a8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506200031392505050565b98975050505050505050565b60006060600080600080600062000a156200313c565b600062000a228a62003264565b905060006012604051806101600160405290816000820160009054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff166bffffffffffffffffffffffff16815260200160008201600c9054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020016000820160109054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020016000820160149054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020016000820160189054906101000a900462ffffff1662ffffff1662ffffff16815260200160008201601b9054906101000a900461ffff1661ffff1661ffff16815260200160008201601d9054906101000a900460ff1660ff1660ff16815260200160008201601e9054906101000a900460ff1615151515815260200160008201601f9054906101000a900460ff161515151581526020016001820160009054906101000a900460ff161515151581526020016001820160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152505090506000600460008d81526020019081526020016000206040518060e00160405290816000820160009054906101000a900460ff161515151581526020016000820160019054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020016000820160059054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020016000820160099054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016001820160009054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff166bffffffffffffffffffffffff16815260200160018201600c9054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff166bffffffffffffffffffffffff1681526020016001820160189054906101000a900463ffffffff1663ffffffff1663ffffffff168152505090508160e001511562000db7576000604051806020016040528060008152506009600084602001516000808263ffffffff169250995099509950995099509950995050505062001141565b604081015163ffffffff9081161462000e08576000604051806020016040528060008152506001600084602001516000808263ffffffff169250995099509950995099509950995050505062001141565b80511562000e4e576000604051806020016040528060008152506002600084602001516000808263ffffffff169250995099509950995099509950995050505062001141565b62000e59826200331a565b8095508196505050600062000e768385846020015189896200350c565b9050806bffffffffffffffffffffffff168260a001516bffffffffffffffffffffffff16101562000ee0576000604051806020016040528060008152506006600085602001516000808263ffffffff1692509a509a509a509a509a509a509a505050505062001141565b600062000eef8e868f620037c1565b90505a9850600080846060015173ffffffffffffffffffffffffffffffffffffffff1663f00e6a2a6040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000f47573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000f6d919062004775565b73ffffffffffffffffffffffffffffffffffffffff166014600101600c9054906101000a900463ffffffff1663ffffffff168460405162000faf919062004795565b60006040518083038160008787f1925050503d806000811462000fef576040519150601f19603f3d011682016040523d82523d6000602084013e62000ff4565b606091505b50915091505a62001006908c620047b3565b9a5081620010865760165481516801000000000000000090910463ffffffff1610156200106357505060408051602080820190925260008082529490910151939c509a50600899505063ffffffff90911695506200114192505050565b602090940151939b5060039a505063ffffffff9092169650620011419350505050565b808060200190518101906200109c919062004824565b909e509c508d620010dd57505060408051602080820190925260008082529490910151939c509a50600499505063ffffffff90911695506200114192505050565b6016548d5164010000000090910463ffffffff1610156200112e57505060408051602080820190925260008082529490910151939c509a50600599505063ffffffff90911695506200114192505050565b505050506020015163ffffffff16945050505b92959891949750929550565b60015473ffffffffffffffffffffffffffffffffffffffff163314620011d4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e65720000000000000000000060448201526064015b60405180910390fd5b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b600173ffffffffffffffffffffffffffffffffffffffff82166000908152601a602052604090205460ff1660038111156200128f576200128f62004216565b14158015620012db5750600373ffffffffffffffffffffffffffffffffffffffff82166000908152601a602052604090205460ff166003811115620012d857620012d862004216565b14155b1562001313576040517f0ebeec3c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6014546c01000000000000000000000000900473ffffffffffffffffffffffffffffffffffffffff1662001373576040517fd12d7d8d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000829003620013af576040517f2c2fc94100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805160e081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c081018290526000808567ffffffffffffffff81111562001406576200140662003efa565b60405190808252806020026020018201604052801562001430578160200160208202803683370190505b50905060008667ffffffffffffffff81111562001451576200145162003efa565b604051908082528060200260200182016040528015620014d857816020015b6040805160e08101825260008082526020808301829052928201819052606082018190526080820181905260a0820181905260c082015282527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff909201910181620014705790505b50905060008767ffffffffffffffff811115620014f957620014f962003efa565b6040519080825280602002602001820160405280156200152e57816020015b6060815260200190600190039081620015185790505b50905060008867ffffffffffffffff8111156200154f576200154f62003efa565b6040519080825280602002602001820160405280156200158457816020015b60608152602001906001900390816200156e5790505b50905060008967ffffffffffffffff811115620015a557620015a562003efa565b604051908082528060200260200182016040528015620015da57816020015b6060815260200190600190039081620015c45790505b50905060005b8a81101562001bbe578b8b82818110620015fe57620015fe62004a41565b60209081029290920135600081815260048452604090819020815160e081018352815460ff811615158252610100810463ffffffff90811697830197909752650100000000008104871693820193909352690100000000000000000090920473ffffffffffffffffffffffffffffffffffffffff166060830152600101546bffffffffffffffffffffffff80821660808401526c0100000000000000000000000082041660a08301527801000000000000000000000000000000000000000000000000900490931660c08401529a50909850620016dd905089620031ae565b60608801516040517f1a5da6c800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8c8116600483015290911690631a5da6c890602401600060405180830381600087803b1580156200174d57600080fd5b505af115801562001762573d6000803e3d6000fd5b50505050878582815181106200177c576200177c62004a41565b6020026020010181905250600560008a815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16868281518110620017d057620017d062004a41565b73ffffffffffffffffffffffffffffffffffffffff90921660209283029190910182015260008a815260079091526040902080546200180f9062004871565b80601f01602080910402602001604051908101604052809291908181526020018280546200183d9062004871565b80156200188e5780601f1062001862576101008083540402835291602001916200188e565b820191906000526020600020905b8154815290600101906020018083116200187057829003601f168201915b5050505050848281518110620018a857620018a862004a41565b6020026020010181905250601b60008a81526020019081526020016000208054620018d39062004871565b80601f0160208091040260200160405190810160405280929190818152602001828054620019019062004871565b8015620019525780601f10620019265761010080835404028352916020019162001952565b820191906000526020600020905b8154815290600101906020018083116200193457829003601f168201915b50505050508382815181106200196c576200196c62004a41565b6020026020010181905250601c60008a81526020019081526020016000208054620019979062004871565b80601f0160208091040260200160405190810160405280929190818152602001828054620019c59062004871565b801562001a165780601f10620019ea5761010080835404028352916020019162001a16565b820191906000526020600020905b815481529060010190602001808311620019f857829003601f168201915b505050505082828151811062001a305762001a3062004a41565b60200260200101819052508760a001516bffffffffffffffffffffffff168762001a5b919062004a70565b60008a815260046020908152604080832080547fffffff000000000000000000000000000000000000000000000000000000000016815560010180547fffffffff000000000000000000000000000000000000000000000000000000001690556007909152812091985062001ad1919062003e0d565b6000898152601b6020526040812062001aea9162003e0d565b6000898152601c6020526040812062001b039162003e0d565b600089815260066020526040902080547fffffffffffffffffffffffff000000000000000000000000000000000000000016905562001b4460028a620039b1565b5060a0880151604080516bffffffffffffffffffffffff909216825273ffffffffffffffffffffffffffffffffffffffff8c1660208301528a917fb38647142fbb1ea4c000fc4569b37a4e9a9f6313317b84ee3e5326c1a6cd06ff910160405180910390a28062001bb58162004a86565b915050620015e0565b508560195462001bcf9190620047b3565b60195560008b8b868167ffffffffffffffff81111562001bf35762001bf362003efa565b60405190808252806020026020018201604052801562001c1d578160200160208202803683370190505b508988888860405160200162001c3b98979695949392919062004c4d565b60405160208183030381529060405290508973ffffffffffffffffffffffffffffffffffffffff16638e86139b6014600001600c9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c71249ab60038e73ffffffffffffffffffffffffffffffffffffffff1663aab9edd66040518163ffffffff1660e01b8152600401602060405180830381865afa15801562001cf7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001d1d919062004d2c565b866040518463ffffffff1660e01b815260040162001d3e9392919062004d51565b600060405180830381865afa15801562001d5c573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820160405262001da4919081019062004d78565b6040518263ffffffff1660e01b815260040162001dc2919062004753565b600060405180830381600087803b15801562001ddd57600080fd5b505af115801562001df2573d6000803e3d6000fd5b50506040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8d81166004830152602482018b90527f000000000000000000000000000000000000000000000000000000000000000016925063a9059cbb91506044016020604051808303816000875af115801562001e8c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001eb2919062004db1565b50505050505050505050505050565b6002336000908152601a602052604090205460ff16600381111562001eea5762001eea62004216565b1415801562001f2057506003336000908152601a602052604090205460ff16600381111562001f1d5762001f1d62004216565b14155b1562001f58576040517f0ebeec3c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080808080808062001f6e888a018a62004f9c565b965096509650965096509650965060005b87518110156200223d57600073ffffffffffffffffffffffffffffffffffffffff1687828151811062001fb65762001fb662004a41565b60200260200101516060015173ffffffffffffffffffffffffffffffffffffffff1603620020ca5785818151811062001ff35762001ff362004a41565b6020026020010151307f00000000000000000000000000000000000000000000000000000000000000006040516200202b9062003dff565b73ffffffffffffffffffffffffffffffffffffffff938416815291831660208301529091166040820152606001604051809103906000f08015801562002075573d6000803e3d6000fd5b508782815181106200208b576200208b62004a41565b60200260200101516060019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250505b62002182888281518110620020e357620020e362004a41565b602002602001015188838151811062002100576200210062004a41565b60200260200101518784815181106200211d576200211d62004a41565b60200260200101518785815181106200213a576200213a62004a41565b602002602001015187868151811062002157576200215762004a41565b602002602001015187878151811062002174576200217462004a41565b602002602001015162002d51565b87818151811062002197576200219762004a41565b60200260200101517f74931a144e43a50694897f241d973aecb5024c0e910f9bb80a163ea3c1cf5a71888381518110620021d557620021d562004a41565b602002602001015160a0015133604051620022209291906bffffffffffffffffffffffff92909216825273ffffffffffffffffffffffffffffffffffffffff16602082015260400190565b60405180910390a280620022348162004a86565b91505062001f7f565b50505050505050505050565b600082815260046020908152604091829020825160e081018452815460ff81161515825263ffffffff6101008204811694830194909452650100000000008104841694820185905273ffffffffffffffffffffffffffffffffffffffff69010000000000000000009091041660608201526001909101546bffffffffffffffffffffffff80821660808401526c0100000000000000000000000082041660a083015278010000000000000000000000000000000000000000000000009004821660c0820152911462002347576040517f9c0083a200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b818160a00151620023599190620050cd565b600084815260046020526040902060010180547fffffffffffffffff000000000000000000000000ffffffffffffffffffffffff166c010000000000000000000000006bffffffffffffffffffffffff93841602179055601954620023c19184169062004a70565b6019556040517f23b872dd0000000000000000000000000000000000000000000000000000000081523360048201523060248201526bffffffffffffffffffffffff831660448201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906323b872dd906064016020604051808303816000875af11580156200246b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062002491919062004db1565b506040516bffffffffffffffffffffffff83168152339084907fafd24114486da8ebfc32f3626dada8863652e187461aa74d4bfa7348915062039060200160405180910390a3505050565b6000818152600460209081526040808320815160e081018352815460ff81161515825263ffffffff610100820481169583019590955265010000000000810485169382019390935273ffffffffffffffffffffffffffffffffffffffff6901000000000000000000909304929092166060830152600101546bffffffffffffffffffffffff80821660808401526c0100000000000000000000000082041660a08301527801000000000000000000000000000000000000000000000000900490911660c082015290620025c460005473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161490506000601260010160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166357e871e76040518163ffffffff1660e01b8152600401602060405180830381865afa15801562002667573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200268d9190620050f5565b9050826040015163ffffffff16600003620026d4576040517ffbc0357800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b604083015163ffffffff9081161462002719576040517f9c0083a200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b811580156200274c575060008481526005602052604090205473ffffffffffffffffffffffffffffffffffffffff163314155b1562002784576040517ffbdb8e5600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b816200279a576200279760328262004a70565b90505b6000848152600460205260409020805463ffffffff80841665010000000000027fffffffffffffffffffffffffffffffffffffffffffffff00000000ffffffffff90921691909117909155620027f6906002908690620039b116565b5060145460808401516bffffffffffffffffffffffff91821691600091168211156200285f5760808501516200282d90836200510f565b90508460a001516bffffffffffffffffffffffff16816bffffffffffffffffffffffff1611156200285f575060a08401515b808560a001516200287191906200510f565b600087815260046020526040902060010180547fffffffffffffffff000000000000000000000000ffffffffffffffffffffffff166c010000000000000000000000006bffffffffffffffffffffffff93841602179055601554620028d991839116620050cd565b601580547fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166bffffffffffffffffffffffff9290921691909117905560405167ffffffffffffffff84169087907f91cb3bb75cfbd718bbfccc56b7f53d92d7048ef4ca39a3b7b7c6d4af1f79118190600090a3505050505050565b600060606000806000634b56a42e60e01b8888886040516024016200297d9392919062005137565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152905062002a0889826200068d565b929c919b50995090975095505050505050565b62002a25620039bf565b62002a308162003a42565b50565b60006060600080600080600062002a5a8860405180602001604052806000815250620009ff565b959e949d50929b5090995097509550909350915050565b73ffffffffffffffffffffffffffffffffffffffff8116600090815260018301602052604081205415155b90505b92915050565b6000806000601260010160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008173ffffffffffffffffffffffffffffffffffffffff166385df51fd60018473ffffffffffffffffffffffffffffffffffffffff166357e871e76040518163ffffffff1660e01b8152600401602060405180830381865afa15801562002b3e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062002b649190620050f5565b62002b709190620047b3565b6040518263ffffffff1660e01b815260040162002b8f91815260200190565b602060405180830381865afa15801562002bad573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062002bd39190620050f5565b601554604080516020810193909352309083015274010000000000000000000000000000000000000000900463ffffffff166060820152608001604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815282825280516020918201209083015201604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152919052905060045b600f81101562002cdf578382828151811062002c9b5762002c9b62004a41565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508062002cd68162004a86565b91505062002c7b565b5084600181111562002cf55762002cf562004216565b60f81b81600f8151811062002d0e5762002d0e62004a41565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535062002d48816200516b565b95945050505050565b6012547e01000000000000000000000000000000000000000000000000000000000000900460ff161562002db1576040517f24522f3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b601654835163ffffffff909116101562002df7576040517fae7235df00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6108fc856020015163ffffffff16108062002e355750601554602086015163ffffffff70010000000000000000000000000000000090920482169116115b1562002e6d576040517f14c237fb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000868152600460205260409020546901000000000000000000900473ffffffffffffffffffffffffffffffffffffffff161562002ed7576040517f6e3b930b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000868152600460209081526040808320885181548a8501518b85015160608d01517fffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000009093169315157fffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000ff169390931761010063ffffffff92831602177fffffff000000000000000000000000000000000000000000000000ffffffffff1665010000000000938216939093027fffffff0000000000000000000000000000000000000000ffffffffffffffffff1692909217690100000000000000000073ffffffffffffffffffffffffffffffffffffffff9283160217835560808b01516001909301805460a08d015160c08e01516bffffffffffffffffffffffff9687167fffffffffffffffff000000000000000000000000000000000000000000000000909316929092176c010000000000000000000000009690911695909502949094177fffffffff00000000ffffffffffffffffffffffffffffffffffffffffffffffff1678010000000000000000000000000000000000000000000000009490931693909302919091179091556005835281842080547fffffffffffffffffffffffff00000000000000000000000000000000000000001691891691909117905560079091529020620030ca8482620051ae565b508460a001516bffffffffffffffffffffffff16601954620030ed919062004a70565b6019556000868152601b602052604090206200310a8382620051ae565b506000868152601c60205260409020620031258282620051ae565b506200313360028762003b39565b50505050505050565b3273ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614620031ac576040517fb60ac5db00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b60008181526005602052604090205473ffffffffffffffffffffffffffffffffffffffff1633146200320c576040517fa47c170600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008181526004602052604090205465010000000000900463ffffffff9081161462002a30576040517f9c0083a200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000818160045b600f811015620032f9577fff000000000000000000000000000000000000000000000000000000000000008216838260208110620032ad57620032ad62004a41565b1a60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614620032e457506000949350505050565b80620032f08162004a86565b9150506200326b565b5081600f1a600181111562003312576200331262004216565b949350505050565b6000806000836080015162ffffff1690506000808263ffffffff161190506000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015620033a7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620033cd9190620052f0565b5094509092505050600081131580620033e557508142105b806200340a57508280156200340a5750620034018242620047b3565b8463ffffffff16105b156200341b5760175495506200341f565b8095505b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa1580156200348b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620034b19190620052f0565b5094509092505050600081131580620034c957508142105b80620034ee5750828015620034ee5750620034e58242620047b3565b8463ffffffff16105b15620034ff57601854945062003503565b8094505b50505050915091565b6000808086600181111562003525576200352562004216565b0362003535575061ea606200358f565b60018660018111156200354c576200354c62004216565b036200355d575062014c086200358f565b6040517ff2b2d41200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008760c001516001620035a4919062005345565b620035b49060ff16604062005361565b601654620035d4906103a490640100000000900463ffffffff1662004a70565b620035e0919062004a70565b601354604080517fde9ee35e00000000000000000000000000000000000000000000000000000000815281519394506000938493610100900473ffffffffffffffffffffffffffffffffffffffff169263de9ee35e92600480820193918290030181865afa15801562003657573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200367d91906200537b565b909250905081836200369183601862004a70565b6200369d919062005361565b60c08c0151620036af90600162005345565b620036c09060ff166115e062005361565b620036cc919062004a70565b620036d8919062004a70565b620036e4908562004a70565b935060008a610140015173ffffffffffffffffffffffffffffffffffffffff166312544140856040518263ffffffff1660e01b81526004016200372991815260200190565b602060405180830381865afa15801562003747573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200376d9190620050f5565b8b60a0015161ffff1662003782919062005361565b90506000806200379f8d8c63ffffffff1689868e8e600062003b47565b9092509050620037b08183620050cd565b9d9c50505050505050505050505050565b60606000836001811115620037da57620037da62004216565b03620038a7576000848152600760205260409081902090517f6e04ff0d0000000000000000000000000000000000000000000000000000000091620038229160240162005443565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091529050620039aa565b6001836001811115620038be57620038be62004216565b036200355d57600082806020019051810190620038dc9190620054ba565b6000868152600760205260409081902090519192507f40691db4000000000000000000000000000000000000000000000000000000009162003923918491602401620055ce565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091529150620039aa9050565b9392505050565b600062002a9c838362003ca2565b60005473ffffffffffffffffffffffffffffffffffffffff163314620031ac576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e6572000000000000000000006044820152606401620011cb565b3373ffffffffffffffffffffffffffffffffffffffff82160362003ac3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401620011cb565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b600062002a9c838362003dad565b60008060008960a0015161ffff168662003b62919062005361565b905083801562003b715750803a105b1562003b7a57503a5b6000858862003b8a8b8d62004a70565b62003b96908562005361565b62003ba2919062004a70565b62003bb690670de0b6b3a764000062005361565b62003bc2919062005696565b905060008b6040015163ffffffff1664e8d4a5100062003be3919062005361565b60208d0151889063ffffffff168b62003bfd8f8862005361565b62003c09919062004a70565b62003c1990633b9aca0062005361565b62003c25919062005361565b62003c31919062005696565b62003c3d919062004a70565b90506b033b2e3c9fd0803ce800000062003c58828462004a70565b111562003c91576040517f2ad7547a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b909b909a5098505050505050505050565b6000818152600183016020526040812054801562003d9b57600062003cc9600183620047b3565b855490915060009062003cdf90600190620047b3565b905081811462003d4b57600086600001828154811062003d035762003d0362004a41565b906000526020600020015490508087600001848154811062003d295762003d2962004a41565b6000918252602080832090910192909255918252600188019052604090208390555b855486908062003d5f5762003d5f620056d2565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505062002a9f565b600091505062002a9f565b5092915050565b600081815260018301602052604081205462003df65750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915562002a9f565b50600062002a9f565b6103ca806200570283390190565b50805462003e1b9062004871565b6000825580601f1062003e2c575050565b601f01602090049060005260206000209081019062002a3091905b8082111562003e5d576000815560010162003e47565b5090565b73ffffffffffffffffffffffffffffffffffffffff8116811462002a3057600080fd5b803563ffffffff8116811462003e9957600080fd5b919050565b80356002811062003e9957600080fd5b60008083601f84011262003ec157600080fd5b50813567ffffffffffffffff81111562003eda57600080fd5b60208301915083602082850101111562003ef357600080fd5b9250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60405160e0810167ffffffffffffffff8111828210171562003f4f5762003f4f62003efa565b60405290565b604051610100810167ffffffffffffffff8111828210171562003f4f5762003f4f62003efa565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff8111828210171562003fc65762003fc662003efa565b604052919050565b600067ffffffffffffffff82111562003feb5762003feb62003efa565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b600082601f8301126200402957600080fd5b8135620040406200403a8262003fce565b62003f7c565b8181528460208386010111156200405657600080fd5b816020850160208301376000918101602001919091529392505050565b60008060008060008060008060e0898b0312156200409057600080fd5b88356200409d8162003e61565b9750620040ad60208a0162003e84565b96506040890135620040bf8162003e61565b9550620040cf60608a0162003e9e565b9450608089013567ffffffffffffffff80821115620040ed57600080fd5b620040fb8c838d0162003eae565b909650945060a08b01359150808211156200411557600080fd5b620041238c838d0162004017565b935060c08b01359150808211156200413a57600080fd5b50620041498b828c0162004017565b9150509295985092959890939650565b600080604083850312156200416d57600080fd5b82359150602083013567ffffffffffffffff8111156200418c57600080fd5b6200419a8582860162004017565b9150509250929050565b60005b83811015620041c1578181015183820152602001620041a7565b50506000910152565b60008151808452620041e4816020860160208601620041a4565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b600a81106200427d577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b9052565b84151581526080602082015260006200429e6080830186620041ca565b9050620042af604083018562004245565b82606083015295945050505050565b600080600060408486031215620042d457600080fd5b83359250602084013567ffffffffffffffff811115620042f357600080fd5b620043018682870162003eae565b9497909650939450505050565b600080600080600080600060a0888a0312156200432a57600080fd5b8735620043378162003e61565b9650620043476020890162003e84565b95506040880135620043598162003e61565b9450606088013567ffffffffffffffff808211156200437757600080fd5b620043858b838c0162003eae565b909650945060808a01359150808211156200439f57600080fd5b50620043ae8a828b0162003eae565b989b979a50959850939692959293505050565b871515815260e060208201526000620043de60e0830189620041ca565b9050620043ef604083018862004245565b8560608301528460808301528360a08301528260c083015298975050505050505050565b6000806000604084860312156200442957600080fd5b833567ffffffffffffffff808211156200444257600080fd5b818601915086601f8301126200445757600080fd5b8135818111156200446757600080fd5b8760208260051b85010111156200447d57600080fd5b60209283019550935050840135620044958162003e61565b809150509250925092565b60008060208385031215620044b457600080fd5b823567ffffffffffffffff811115620044cc57600080fd5b620044da8582860162003eae565b90969095509350505050565b80356bffffffffffffffffffffffff8116811462003e9957600080fd5b600080604083850312156200451757600080fd5b823591506200452960208401620044e6565b90509250929050565b6000602082840312156200454557600080fd5b5035919050565b600067ffffffffffffffff82111562004569576200456962003efa565b5060051b60200190565b600082601f8301126200458557600080fd5b81356020620045986200403a836200454c565b82815260059290921b84018101918181019086841115620045b857600080fd5b8286015b84811015620045fd57803567ffffffffffffffff811115620045de5760008081fd5b620045ee8986838b010162004017565b845250918301918301620045bc565b509695505050505050565b600080600080606085870312156200461f57600080fd5b84359350602085013567ffffffffffffffff808211156200463f57600080fd5b6200464d8883890162004573565b945060408701359150808211156200466457600080fd5b50620046738782880162003eae565b95989497509550505050565b6000602082840312156200469257600080fd5b8135620039aa8162003e61565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600063ffffffff808316818103620046ea57620046ea6200469f565b6001019392505050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b60208152600062003312602083018486620046f4565b60208152600062002a9c6020830184620041ca565b805162003e998162003e61565b6000602082840312156200478857600080fd5b8151620039aa8162003e61565b60008251620047a9818460208701620041a4565b9190910192915050565b8181038181111562002a9f5762002a9f6200469f565b801515811462002a3057600080fd5b600082601f830112620047ea57600080fd5b8151620047fb6200403a8262003fce565b8181528460208386010111156200481157600080fd5b62003312826020830160208701620041a4565b600080604083850312156200483857600080fd5b82516200484581620047c9565b602084015190925067ffffffffffffffff8111156200486357600080fd5b6200419a85828601620047d8565b600181811c908216806200488657607f821691505b602082108103620048c0577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b601f8211156200491457600081815260208120601f850160051c81016020861015620048ef5750805b601f850160051c820191505b818110156200491057828155600101620048fb565b5050505b505050565b67ffffffffffffffff83111562004934576200493462003efa565b6200494c8362004945835462004871565b83620048c6565b6000601f841160018114620049a157600085156200496a5750838201355b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b1c1916600186901b17835562004a3a565b6000838152602090207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0861690835b82811015620049f25786850135825560209485019460019092019101620049d0565b508682101562004a2e577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b8082018082111562002a9f5762002a9f6200469f565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820362004aba5762004aba6200469f565b5060010190565b600081518084526020808501945080840160005b8381101562004b805781518051151588528381015163ffffffff908116858a01526040808301519091169089015260608082015173ffffffffffffffffffffffffffffffffffffffff16908901526080808201516bffffffffffffffffffffffff169089015260a08082015162004b5b828b01826bffffffffffffffffffffffff169052565b505060c09081015163ffffffff169088015260e0909601959082019060010162004ad5565b509495945050505050565b600081518084526020808501945080840160005b8381101562004b8057815173ffffffffffffffffffffffffffffffffffffffff168752958201959082019060010162004b9f565b600082825180855260208086019550808260051b84010181860160005b8481101562004c40577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe086840301895262004c2d838351620041ca565b9884019892509083019060010162004bf0565b5090979650505050505050565b60e081528760e082015260006101007f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8a111562004c8a57600080fd5b8960051b808c8386013783018381038201602085015262004cae8282018b62004ac1565b915050828103604084015262004cc5818962004b8b565b9050828103606084015262004cdb818862004b8b565b9050828103608084015262004cf1818762004bd3565b905082810360a084015262004d07818662004bd3565b905082810360c084015262004d1d818562004bd3565b9b9a5050505050505050505050565b60006020828403121562004d3f57600080fd5b815160ff81168114620039aa57600080fd5b60ff8416815260ff8316602082015260606040820152600062002d486060830184620041ca565b60006020828403121562004d8b57600080fd5b815167ffffffffffffffff81111562004da357600080fd5b6200331284828501620047d8565b60006020828403121562004dc457600080fd5b8151620039aa81620047c9565b600082601f83011262004de357600080fd5b8135602062004df66200403a836200454c565b82815260059290921b8401810191818101908684111562004e1657600080fd5b8286015b84811015620045fd578035835291830191830162004e1a565b600082601f83011262004e4557600080fd5b8135602062004e586200403a836200454c565b82815260e0928302850182019282820191908785111562004e7857600080fd5b8387015b8581101562004c405781818a03121562004e965760008081fd5b62004ea062003f29565b813562004ead81620047c9565b815262004ebc82870162003e84565b86820152604062004ecf81840162003e84565b9082015260608281013562004ee48162003e61565b90820152608062004ef7838201620044e6565b9082015260a062004f0a838201620044e6565b9082015260c062004f1d83820162003e84565b90820152845292840192810162004e7c565b600082601f83011262004f4157600080fd5b8135602062004f546200403a836200454c565b82815260059290921b8401810191818101908684111562004f7457600080fd5b8286015b84811015620045fd57803562004f8e8162003e61565b835291830191830162004f78565b600080600080600080600060e0888a03121562004fb857600080fd5b873567ffffffffffffffff8082111562004fd157600080fd5b62004fdf8b838c0162004dd1565b985060208a013591508082111562004ff657600080fd5b620050048b838c0162004e33565b975060408a01359150808211156200501b57600080fd5b620050298b838c0162004f2f565b965060608a01359150808211156200504057600080fd5b6200504e8b838c0162004f2f565b955060808a01359150808211156200506557600080fd5b620050738b838c0162004573565b945060a08a01359150808211156200508a57600080fd5b620050988b838c0162004573565b935060c08a0135915080821115620050af57600080fd5b50620050be8a828b0162004573565b91505092959891949750929550565b6bffffffffffffffffffffffff81811683821601908082111562003da65762003da66200469f565b6000602082840312156200510857600080fd5b5051919050565b6bffffffffffffffffffffffff82811682821603908082111562003da65762003da66200469f565b6040815260006200514c604083018662004bd3565b828103602084015262005161818587620046f4565b9695505050505050565b80516020808301519190811015620048c0577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60209190910360031b1b16919050565b815167ffffffffffffffff811115620051cb57620051cb62003efa565b620051e381620051dc845462004871565b84620048c6565b602080601f831160018114620052395760008415620052025750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b17855562004910565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b82811015620052885788860151825594840194600190910190840162005267565b5085821015620052c557878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b805169ffffffffffffffffffff8116811462003e9957600080fd5b600080600080600060a086880312156200530957600080fd5b6200531486620052d5565b94506020860151935060408601519250606086015191506200533960808701620052d5565b90509295509295909350565b60ff818116838216019081111562002a9f5762002a9f6200469f565b808202811582820484141762002a9f5762002a9f6200469f565b600080604083850312156200538f57600080fd5b505080516020909101519092909150565b60008154620053af8162004871565b808552602060018381168015620053cf5760018114620054085762005438565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008516838901528284151560051b890101955062005438565b866000528260002060005b85811015620054305781548a820186015290830190840162005413565b890184019650505b505050505092915050565b60208152600062002a9c6020830184620053a0565b600082601f8301126200546a57600080fd5b815160206200547d6200403a836200454c565b82815260059290921b840181019181810190868411156200549d57600080fd5b8286015b84811015620045fd5780518352918301918301620054a1565b600060208284031215620054cd57600080fd5b815167ffffffffffffffff80821115620054e657600080fd5b908301906101008286031215620054fc57600080fd5b6200550662003f55565b82518152602083015160208201526040830151604082015260608301516060820152608083015160808201526200554060a0840162004768565b60a082015260c0830151828111156200555857600080fd5b620055668782860162005458565b60c08301525060e0830151828111156200557f57600080fd5b6200558d87828601620047d8565b60e08301525095945050505050565b600081518084526020808501945080840160005b8381101562004b8057815187529582019590820190600101620055b0565b60408152825160408201526020830151606082015260408301516080820152606083015160a0820152608083015160c082015273ffffffffffffffffffffffffffffffffffffffff60a08401511660e0820152600060c0840151610100808185015250620056416101408401826200559c565b905060e08501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0848303016101208501526200567f8282620041ca565b915050828103602084015262002d488185620053a0565b600082620056cd577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfe60c060405234801561001057600080fd5b506040516103ca3803806103ca83398101604081905261002f91610076565b600080546001600160a01b0319166001600160a01b039384161790559181166080521660a0526100b9565b80516001600160a01b038116811461007157600080fd5b919050565b60008060006060848603121561008b57600080fd5b6100948461005a565b92506100a26020850161005a565b91506100b06040850161005a565b90509250925092565b60805160a0516102e76100e36000396000603801526000818160c4015261011701526102e76000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806379188d161461007b578063f00e6a2a146100aa575b7f00000000000000000000000000000000000000000000000000000000000000003660008037600080366000845af43d6000803e808015610076573d6000f35b3d6000fd5b61008e6100893660046101c1565b6100ee565b6040805192151583526020830191909152015b60405180910390f35b60405173ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001681526020016100a1565b60008054819073ffffffffffffffffffffffffffffffffffffffff16331461011557600080fd5b7f00000000000000000000000000000000000000000000000000000000000000005a91505a61138881101561014957600080fd5b61138881039050856040820482031161016157600080fd5b50803b61016d57600080fd5b6000808551602087016000858af192505a610188908361029a565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080604083850312156101d457600080fd5b82359150602083013567ffffffffffffffff808211156101f357600080fd5b818501915085601f83011261020757600080fd5b81358181111561021957610219610192565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810190838211818310171561025f5761025f610192565b8160405282815288602084870101111561027857600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b818103818111156102d4577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b9291505056fea164736f6c6343000813000aa164736f6c6343000813000a", + ABI: "[{\"inputs\":[{\"internalType\":\"contractAutomationRegistryLogicB2_3\",\"name\":\"logicB\",\"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\":\"InvalidBillingToken\",\"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\":\"InvalidTransmitter\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTrigger\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTriggerType\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MigrationNotPermitted\",\"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\":\"contractIERC20\",\"name\":\"token\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint32\",\"name\":\"gasFeePPB\",\"type\":\"uint32\"},{\"internalType\":\"uint24\",\"name\":\"flatFeeMicroLink\",\"type\":\"uint24\"},{\"internalType\":\"contractAggregatorV3Interface\",\"name\":\"priceFeed\",\"type\":\"address\"},{\"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\":true,\"internalType\":\"bytes32\",\"name\":\"dedupKey\",\"type\":\"bytes32\"}],\"name\":\"DedupKeyAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"assetAddress\",\"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\":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\":\"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\":\"nonpayable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"addFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"cancelUpkeep\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bytes[]\",\"name\":\"values\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"checkCallback\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"upkeepNeeded\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"performData\",\"type\":\"bytes\"},{\"internalType\":\"enumAutomationRegistryBase2_3.UpkeepFailureReason\",\"name\":\"upkeepFailureReason\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"gasUsed\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"triggerData\",\"type\":\"bytes\"}],\"name\":\"checkUpkeep\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"upkeepNeeded\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"performData\",\"type\":\"bytes\"},{\"internalType\":\"enumAutomationRegistryBase2_3.UpkeepFailureReason\",\"name\":\"upkeepFailureReason\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"gasUsed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fastGasWei\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"linkUSD\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"checkUpkeep\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"upkeepNeeded\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"performData\",\"type\":\"bytes\"},{\"internalType\":\"enumAutomationRegistryBase2_3.UpkeepFailureReason\",\"name\":\"upkeepFailureReason\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"gasUsed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fastGasWei\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"linkUSD\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"}],\"name\":\"executeCallback\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"upkeepNeeded\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"performData\",\"type\":\"bytes\"},{\"internalType\":\"enumAutomationRegistryBase2_3.UpkeepFailureReason\",\"name\":\"upkeepFailureReason\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"gasUsed\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"fallbackTo\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\"},{\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"}],\"name\":\"migrateUpkeeps\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"encodedUpkeeps\",\"type\":\"bytes\"}],\"name\":\"receiveUpkeeps\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"enumAutomationRegistryBase2_3.Trigger\",\"name\":\"triggerType\",\"type\":\"uint8\"},{\"internalType\":\"contractIERC20\",\"name\":\"billingToken\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"checkData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"triggerConfig\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"offchainConfig\",\"type\":\"bytes\"}],\"name\":\"registerUpkeep\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Bin: "0x6101606040523480156200001257600080fd5b506040516200649b3803806200649b833981016040819052620000359162000520565b80816001600160a01b031663ca30e6036040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000075573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200009b919062000520565b826001600160a01b031663226cf83c6040518163ffffffff1660e01b8152600401602060405180830381865afa158015620000da573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000100919062000520565b836001600160a01b031663614486af6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156200013f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000165919062000520565b846001600160a01b0316636709d0e56040518163ffffffff1660e01b8152600401602060405180830381865afa158015620001a4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001ca919062000520565b856001600160a01b0316635425d8ac6040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000209573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200022f919062000520565b866001600160a01b031663a08714c06040518163ffffffff1660e01b8152600401602060405180830381865afa1580156200026e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000294919062000520565b3380600081620002eb5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b03848116919091179091558116156200031e576200031e816200045c565b5050506001600160a01b0380871660805285811660a05284811660c081905284821660e05283821661010052908216610120526040805163313ce56760e01b8152905163313ce567916004808201926020929091908290030181865afa1580156200038d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620003b3919062000547565b60ff1660a0516001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015620003f7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200041d919062000547565b60ff16146200043f576040516301f86e1760e41b815260040160405180910390fd5b5050506001600160a01b0390931661014052506200056c92505050565b336001600160a01b03821603620004b65760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401620002e2565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6001600160a01b03811681146200051d57600080fd5b50565b6000602082840312156200053357600080fd5b8151620005408162000507565b9392505050565b6000602082840312156200055a57600080fd5b815160ff811681146200054057600080fd5b60805160a05160c05160e051610100516101205161014051615ec7620005d46000396000818160f6015261017001526000612b4f015260008181611c5b015261228c01526000612c8301526000613d7501526000612d6701526000611a9d0152615ec76000f3fe60806040523480156200001157600080fd5b5060043610620000f45760003560e01c80638e86139b1162000099578063c8048022116200006f578063c80480221462000276578063ce7dc5b4146200028d578063f2fde38b14620002a4578063f7d334ba14620002bb57620000f4565b80638e86139b1462000222578063948108f71462000239578063c62cf684146200025057620000f4565b806379ba509711620000cf57806379ba509714620001e257806385c1b0ba14620001ec5780638da5cb5b146200020357620000f4565b806329c5efad146200013c578063349e8cca146200016e57806371791aa014620001b6575b7f00000000000000000000000000000000000000000000000000000000000000003660008037600080366000845af43d6000803e80801562000135573d6000f35b3d6000fd5b005b620001536200014d366004620045c8565b620002d2565b604051620001659493929190620046f0565b60405180910390f35b7f00000000000000000000000000000000000000000000000000000000000000005b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200162000165565b620001cd620001c7366004620045c8565b620005ab565b6040516200016597969594939291906200472d565b6200013a62000d39565b6200013a620001fd366004620047b4565b62000e3c565b60005473ffffffffffffffffffffffffffffffffffffffff1662000190565b6200013a620002333660046200488d565b62001b1e565b6200013a6200024a366004620048f0565b62001ea6565b620002676200026136600462004944565b620021be565b60405190815260200162000165565b6200013a6200028736600462004a39565b62002562565b620001536200029e36600462004b0f565b62002a1b565b6200013a620002b536600462004b86565b62002ae1565b620001cd620002cc36600462004a39565b62002af9565b60006060600080620002e362002b37565b60008681526004602090815260409182902082516101008082018552825460ff81161515835263ffffffff91810482169483019490945265010000000000840481169482019490945273ffffffffffffffffffffffffffffffffffffffff69010000000000000000009093048316606082015260018201546fffffffffffffffffffffffffffffffff811660808301526bffffffffffffffffffffffff70010000000000000000000000000000000082041660a08301527c0100000000000000000000000000000000000000000000000000000000900490931660c0840152600201541660e08201525a9150600080826060015173ffffffffffffffffffffffffffffffffffffffff1663f00e6a2a6040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000422573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000448919062004bb3565b73ffffffffffffffffffffffffffffffffffffffff16601460000160149054906101000a900463ffffffff1663ffffffff16896040516200048a919062004bd3565b60006040518083038160008787f1925050503d8060008114620004ca576040519150601f19603f3d011682016040523d82523d6000602084013e620004cf565b606091505b50915091505a620004e1908562004c20565b9350816200050c576000604051806020016040528060008152506007965096509650505050620005a2565b8080602001905181019062000522919062004c91565b90975095508662000550576000604051806020016040528060008152506004965096509650505050620005a2565b60165486517401000000000000000000000000000000000000000090910463ffffffff1610156200059e576000604051806020016040528060008152506005965096509650505050620005a2565b5050505b92959194509250565b600060606000806000806000620005c162002b37565b6000620005ce8a62002ba9565b905060006012604051806101200160405290816000820160009054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff166bffffffffffffffffffffffff16815260200160008201600c9054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020016000820160109054906101000a900462ffffff1662ffffff1662ffffff1681526020016000820160139054906101000a900461ffff1661ffff1661ffff1681526020016000820160159054906101000a900460ff1660ff1660ff1681526020016000820160169054906101000a900460ff161515151581526020016000820160179054906101000a900460ff161515151581526020016000820160189054906101000a900460ff161515151581526020016001820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152505090506000600460008d8152602001908152602001600020604051806101000160405290816000820160009054906101000a900460ff161515151581526020016000820160019054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020016000820160059054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020016000820160099054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016001820160009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff1681526020016001820160109054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff166bffffffffffffffffffffffff16815260200160018201601c9054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020016002820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152505090506000808360a00151156200097f576000604051806020016040528060008152506009600086602001516000808263ffffffff1692509b509b509b509b509b509b509b50505050505062000d2d565b604083015163ffffffff90811614620009d2576000604051806020016040528060008152506001600086602001516000808263ffffffff1692509b509b509b509b509b509b509b50505050505062000d2d565b82511562000a1a576000604051806020016040528060008152506002600086602001516000808263ffffffff1692509b509b509b509b509b509b509b50505050505062000d2d565b62000a258462002c5f565b80945081985082995050505062000a4a848685602001518a8a878960e0015162002e67565b9050806bffffffffffffffffffffffff168360a001516bffffffffffffffffffffffff16101562000ab5576000604051806020016040528060008152506006600086602001516000808263ffffffff1692509b509b509b509b509b509b509b50505050505062000d2d565b5050600062000ac68d858e6200317c565b90505a9750600080836060015173ffffffffffffffffffffffffffffffffffffffff1663f00e6a2a6040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000b1e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000b44919062004bb3565b73ffffffffffffffffffffffffffffffffffffffff16601460000160149054906101000a900463ffffffff1663ffffffff168460405162000b86919062004bd3565b60006040518083038160008787f1925050503d806000811462000bc6576040519150601f19603f3d011682016040523d82523d6000602084013e62000bcb565b606091505b50915091505a62000bdd908b62004c20565b99508162000c69576016548151780100000000000000000000000000000000000000000000000090910463ffffffff16101562000c4757505060408051602080820190925260008082529390910151929b509950600898505063ffffffff16945062000d2d915050565b602090930151929a50600399505063ffffffff909116955062000d2d92505050565b8080602001905181019062000c7f919062004c91565b909d509b508c62000cbd57505060408051602080820190925260008082529390910151929b509950600498505063ffffffff16945062000d2d915050565b6016548c517401000000000000000000000000000000000000000090910463ffffffff16101562000d1b57505060408051602080820190925260008082529390910151929b509950600598505063ffffffff16945062000d2d915050565b5050506020015163ffffffff16945050505b92959891949750929550565b60015473ffffffffffffffffffffffffffffffffffffffff16331462000dc0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e65720000000000000000000060448201526064015b60405180910390fd5b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b600173ffffffffffffffffffffffffffffffffffffffff82166000908152601b602052604090205460ff16600381111562000e7b5762000e7b62004685565b1415801562000ec75750600373ffffffffffffffffffffffffffffffffffffffff82166000908152601b602052604090205460ff16600381111562000ec45762000ec462004685565b14155b1562000eff576040517f0ebeec3c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60145473ffffffffffffffffffffffffffffffffffffffff1662000f4f576040517fd12d7d8d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082900362000f8b576040517f2c2fc94100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805161010081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e081018290526000808567ffffffffffffffff81111562000fea5762000fea62004475565b60405190808252806020026020018201604052801562001014578160200160208202803683370190505b50905060008667ffffffffffffffff81111562001035576200103562004475565b604051908082528060200260200182016040528015620010c457816020015b604080516101008101825260008082526020808301829052928201819052606082018190526080820181905260a0820181905260c0820181905260e082015282527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff909201910181620010545790505b50905060008767ffffffffffffffff811115620010e557620010e562004475565b6040519080825280602002602001820160405280156200111a57816020015b6060815260200190600190039081620011045790505b50905060008867ffffffffffffffff8111156200113b576200113b62004475565b6040519080825280602002602001820160405280156200117057816020015b60608152602001906001900390816200115a5790505b50905060008967ffffffffffffffff81111562001191576200119162004475565b604051908082528060200260200182016040528015620011c657816020015b6060815260200190600190039081620011b05790505b50905060005b8a811015620017d6578b8b82818110620011ea57620011ea62004cde565b6020908102929092013560008181526004845260409081902081516101008082018452825460ff81161515835263ffffffff91810482169783019790975265010000000000870481169382019390935273ffffffffffffffffffffffffffffffffffffffff69010000000000000000009096048616606082015260018201546fffffffffffffffffffffffffffffffff811660808301526bffffffffffffffffffffffff70010000000000000000000000000000000082041660a08301527c0100000000000000000000000000000000000000000000000000000000900490921660c08301526002015490931660e08401529a50909850620012ee9050896200336c565b60608801516040517f1a5da6c800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8c8116600483015290911690631a5da6c890602401600060405180830381600087803b1580156200135e57600080fd5b505af115801562001373573d6000803e3d6000fd5b50505050878582815181106200138d576200138d62004cde565b6020026020010181905250600560008a815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16868281518110620013e157620013e162004cde565b73ffffffffffffffffffffffffffffffffffffffff90921660209283029190910182015260008a81526007909152604090208054620014209062004d0d565b80601f01602080910402602001604051908101604052809291908181526020018280546200144e9062004d0d565b80156200149f5780601f1062001473576101008083540402835291602001916200149f565b820191906000526020600020905b8154815290600101906020018083116200148157829003601f168201915b5050505050848281518110620014b957620014b962004cde565b6020026020010181905250601c60008a81526020019081526020016000208054620014e49062004d0d565b80601f0160208091040260200160405190810160405280929190818152602001828054620015129062004d0d565b8015620015635780601f10620015375761010080835404028352916020019162001563565b820191906000526020600020905b8154815290600101906020018083116200154557829003601f168201915b50505050508382815181106200157d576200157d62004cde565b6020026020010181905250601d60008a81526020019081526020016000208054620015a89062004d0d565b80601f0160208091040260200160405190810160405280929190818152602001828054620015d69062004d0d565b8015620016275780601f10620015fb5761010080835404028352916020019162001627565b820191906000526020600020905b8154815290600101906020018083116200160957829003601f168201915b505050505082828151811062001641576200164162004cde565b60200260200101819052508760a001516bffffffffffffffffffffffff16876200166c919062004d62565b60008a815260046020908152604080832080547fffffff00000000000000000000000000000000000000000000000000000000001681556001810184905560020180547fffffffffffffffffffffffff000000000000000000000000000000000000000016905560079091528120919850620016e9919062004411565b6000898152601c60205260408120620017029162004411565b6000898152601d602052604081206200171b9162004411565b600089815260066020526040902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001690556200175c60028a62003422565b5060a0880151604080516bffffffffffffffffffffffff909216825273ffffffffffffffffffffffffffffffffffffffff8c1660208301528a917fb38647142fbb1ea4c000fc4569b37a4e9a9f6313317b84ee3e5326c1a6cd06ff910160405180910390a280620017cd8162004d78565b915050620011cc565b5060e087015173ffffffffffffffffffffffffffffffffffffffff166000908152601a60205260409020546200180e90879062004c20565b60e088015173ffffffffffffffffffffffffffffffffffffffff166000908152601a60205260408120919091558b8b868167ffffffffffffffff8111156200185a576200185a62004475565b60405190808252806020026020018201604052801562001884578160200160208202803683370190505b5089888888604051602001620018a298979695949392919062004f28565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181528282526014547faab9edd6000000000000000000000000000000000000000000000000000000008452915190935073ffffffffffffffffffffffffffffffffffffffff808e1693638e86139b939091169163c71249ab91600391869163aab9edd69160048083019260209291908290030181865afa15801562001954573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200197a919062004ff8565b866040518463ffffffff1660e01b81526004016200199b939291906200501d565b600060405180830381865afa158015620019b9573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820160405262001a01919081019062005044565b6040518263ffffffff1660e01b815260040162001a1f91906200507d565b600060405180830381600087803b15801562001a3a57600080fd5b505af115801562001a4f573d6000803e3d6000fd5b50506040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8d81166004830152602482018b90527f000000000000000000000000000000000000000000000000000000000000000016925063a9059cbb91506044016020604051808303816000875af115801562001ae9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001b0f919062005092565b50505050505050505050505050565b6002336000908152601b602052604090205460ff16600381111562001b475762001b4762004685565b1415801562001b7d57506003336000908152601b602052604090205460ff16600381111562001b7a5762001b7a62004685565b14155b1562001bb5576040517f0ebeec3c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080808080808062001bcb888a018a620052b3565b965096509650965096509650965060005b875181101562001e9a57600073ffffffffffffffffffffffffffffffffffffffff1687828151811062001c135762001c1362004cde565b60200260200101516060015173ffffffffffffffffffffffffffffffffffffffff160362001d275785818151811062001c505762001c5062004cde565b6020026020010151307f000000000000000000000000000000000000000000000000000000000000000060405162001c889062004450565b73ffffffffffffffffffffffffffffffffffffffff938416815291831660208301529091166040820152606001604051809103906000f08015801562001cd2573d6000803e3d6000fd5b5087828151811062001ce85762001ce862004cde565b60200260200101516060019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250505b62001ddf88828151811062001d405762001d4062004cde565b602002602001015188838151811062001d5d5762001d5d62004cde565b602002602001015187848151811062001d7a5762001d7a62004cde565b602002602001015187858151811062001d975762001d9762004cde565b602002602001015187868151811062001db45762001db462004cde565b602002602001015187878151811062001dd15762001dd162004cde565b602002602001015162003439565b87818151811062001df45762001df462004cde565b60200260200101517f74931a144e43a50694897f241d973aecb5024c0e910f9bb80a163ea3c1cf5a7188838151811062001e325762001e3262004cde565b602002602001015160a001513360405162001e7d9291906bffffffffffffffffffffffff92909216825273ffffffffffffffffffffffffffffffffffffffff16602082015260400190565b60405180910390a28062001e918162004d78565b91505062001bdc565b50505050505050505050565b60008281526004602090815260409182902082516101008082018552825460ff81161515835263ffffffff918104821694830194909452650100000000008404811694820185905273ffffffffffffffffffffffffffffffffffffffff69010000000000000000009094048416606083015260018301546fffffffffffffffffffffffffffffffff811660808401526bffffffffffffffffffffffff70010000000000000000000000000000000082041660a08401527c01000000000000000000000000000000000000000000000000000000009004811660c083015260029092015490921660e083015290911462001fcb576040517f9c0083a200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b818160a0015162001fdd9190620053e4565b600084815260046020908152604080832060010180547fffffffff000000000000000000000000ffffffffffffffffffffffffffffffff167001000000000000000000000000000000006bffffffffffffffffffffffff9687160217905560e085015173ffffffffffffffffffffffffffffffffffffffff168352601a9091529020546200206e9184169062004d62565b60e08201805173ffffffffffffffffffffffffffffffffffffffff9081166000908152601a602052604080822094909455915192517f23b872dd0000000000000000000000000000000000000000000000000000000081523360048201523060248201526bffffffffffffffffffffffff86166044820152919216906323b872dd906064016020604051808303816000875af115801562002113573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062002139919062005092565b90508062002173576040517f90b8ec1800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040516bffffffffffffffffffffffff84168152339085907fafd24114486da8ebfc32f3626dada8863652e187461aa74d4bfa7348915062039060200160405180910390a350505050565b6000805473ffffffffffffffffffffffffffffffffffffffff163314801590620021f25750620021f060093362003925565b155b156200222a576040517fd48b678b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8a163b62002279576040517f09ee12d500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b620022848762003955565b905060008a307f0000000000000000000000000000000000000000000000000000000000000000604051620022b99062004450565b73ffffffffffffffffffffffffffffffffffffffff938416815291831660208301529091166040820152606001604051809103906000f08015801562002303573d6000803e3d6000fd5b509050620023eb826040518061010001604052806000151581526020018d63ffffffff16815260200163ffffffff801681526020018473ffffffffffffffffffffffffffffffffffffffff16815260200160006fffffffffffffffffffffffffffffffff16815260200160006bffffffffffffffffffffffff168152602001600063ffffffff1681526020018a73ffffffffffffffffffffffffffffffffffffffff168152508b89898080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508b92508a9150620034399050565b601480547c0100000000000000000000000000000000000000000000000000000000900463ffffffff1690601c62002423836200540c565b91906101000a81548163ffffffff021916908363ffffffff16021790555050817fbae366358c023f887e791d7a62f2e4316f1026bd77f6fb49501a917b3bc5d0128b8b6040516200249c92919063ffffffff92909216825273ffffffffffffffffffffffffffffffffffffffff16602082015260400190565b60405180910390a2817fcba2d5723b2ee59e53a8e8a82a4a7caf4fdfe70e9f7c582950bf7e7a5c24e83d8787604051620024d89291906200547b565b60405180910390a2817f2b72ac786c97e68dbab71023ed6f2bdbfc80ad9bb7808941929229d71b7d5664856040516200251291906200507d565b60405180910390a2817f3e8740446213c8a77d40e08f79136ce3f347d13ed270a6ebdf57159e0faf4850846040516200254c91906200507d565b60405180910390a2509998505050505050505050565b600081815260046020908152604080832081516101008082018452825460ff81161515835263ffffffff91810482169583019590955265010000000000850481169382019390935273ffffffffffffffffffffffffffffffffffffffff69010000000000000000009094048416606082015260018201546fffffffffffffffffffffffffffffffff811660808301526bffffffffffffffffffffffff70010000000000000000000000000000000082041660a08301527c0100000000000000000000000000000000000000000000000000000000900490921660c08301526002015490911660e0820152906200266d60005473ffffffffffffffffffffffffffffffffffffffff1690565b60e083015173ffffffffffffffffffffffffffffffffffffffff9081166000908152602080805260408083206002015460135482517f57e871e70000000000000000000000000000000000000000000000000000000081529251968616331497506bffffffffffffffffffffffff90911695939416926357e871e7926004808401939192918290030181865afa1580156200270c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062002732919062005491565b9050836040015163ffffffff1660000362002779576040517ffbc0357800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b604084015163ffffffff90811614620027be576040517f9c0083a200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b82158015620027f1575060008581526005602052604090205473ffffffffffffffffffffffffffffffffffffffff163314155b1562002829576040517ffbdb8e5600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b826200283f576200283c60328262004d62565b90505b6000858152600460205260409020805463ffffffff80841665010000000000027fffffffffffffffffffffffffffffffffffffffffffffff00000000ffffffffff909216919091179091556200289b9060029087906200342216565b506000826bffffffffffffffffffffffff1685608001516fffffffffffffffffffffffffffffffff1610156200290e576080850151620028dc9084620054ab565b90508460a001516bffffffffffffffffffffffff16816bffffffffffffffffffffffff1611156200290e575060a08401515b808560a00151620029209190620054ab565b600087815260046020908152604080832060010180547fffffffff000000000000000000000000ffffffffffffffffffffffffffffffff167001000000000000000000000000000000006bffffffffffffffffffffffff9687160217905560e089015173ffffffffffffffffffffffffffffffffffffffff168352601a909152902054620029b19183169062004c20565b60e086015173ffffffffffffffffffffffffffffffffffffffff166000908152601a602052604080822092909255905167ffffffffffffffff84169188917f91cb3bb75cfbd718bbfccc56b7f53d92d7048ef4ca39a3b7b7c6d4af1f7911819190a3505050505050565b600060606000806000634b56a42e60e01b88888860405160240162002a4393929190620054d3565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152905062002ace8982620002d2565b929c919b50995090975095505050505050565b62002aeb62003bf4565b62002af68162003c77565b50565b60006060600080600080600062002b208860405180602001604052806000815250620005ab565b959e949d50929b5090995097509550909350915050565b3273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161462002ba7576040517fb60ac5db00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b6000818160045b600f81101562002c3e577fff00000000000000000000000000000000000000000000000000000000000000821683826020811062002bf25762002bf262004cde565b1a60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161462002c2957506000949350505050565b8062002c358162004d78565b91505062002bb0565b5081600f1a600181111562002c575762002c5762004685565b949350505050565b600080600080846040015162ffffff1690506000808263ffffffff161190506000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa15801562002ced573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062002d13919062005522565b509450909250505060008113158062002d2b57508142105b8062002d50575082801562002d50575062002d47824262004c20565b8463ffffffff16105b1562002d6157601754965062002d65565b8096505b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa15801562002dd1573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062002df7919062005522565b509450909250505060008113158062002e0f57508142105b8062002e34575082801562002e34575062002e2b824262004c20565b8463ffffffff16105b1562002e4557601854955062002e49565b8095505b868662002e568a62003d6e565b965096509650505050509193909250565b600080808089600181111562002e815762002e8162004685565b0362002e91575061ea6062002eeb565b600189600181111562002ea85762002ea862004685565b0362002eb9575062014c0862002eeb565b6040517ff2b2d41200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008a60800151600162002f00919062005577565b62002f109060ff16604062005593565b60165462002f40906103a49074010000000000000000000000000000000000000000900463ffffffff1662004d62565b62002f4c919062004d62565b601354604080517fde9ee35e0000000000000000000000000000000000000000000000000000000081528151939450600093849373ffffffffffffffffffffffffffffffffffffffff169263de9ee35e92600480820193918290030181865afa15801562002fbe573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062002fe49190620055ad565b9092509050818362002ff883601862004d62565b62003004919062005593565b60808f01516200301690600162005577565b620030279060ff166115e062005593565b62003033919062004d62565b6200303f919062004d62565b6200304b908562004d62565b6101008e01516040517f125441400000000000000000000000000000000000000000000000000000000081526004810186905291955073ffffffffffffffffffffffffffffffffffffffff1690631254414090602401602060405180830381865afa158015620030bf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620030e5919062005491565b8d6060015161ffff16620030fa919062005593565b94505050506000620031588b6040518061010001604052808c63ffffffff1681526020018581526020018681526020018b81526020018a8152602001898152602001620031488f8a62003e68565b8152600060209091015262004005565b602081015181519192506200316d91620053e4565b9b9a5050505050505050505050565b6060600083600181111562003195576200319562004685565b0362003262576000848152600760205260409081902090517f6e04ff0d0000000000000000000000000000000000000000000000000000000091620031dd9160240162005675565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152905062003365565b600183600181111562003279576200327962004685565b0362002eb957600082806020019051810190620032979190620056ec565b6000868152600760205260409081902090519192507f40691db40000000000000000000000000000000000000000000000000000000091620032de91849160240162005800565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091529150620033659050565b9392505050565b60008181526005602052604090205473ffffffffffffffffffffffffffffffffffffffff163314620033ca576040517fa47c170600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008181526004602052604090205465010000000000900463ffffffff9081161462002af6576040517f9c0083a200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600062003430838362004209565b90505b92915050565b601254760100000000000000000000000000000000000000000000900460ff161562003491576040517f24522f3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60155483517c010000000000000000000000000000000000000000000000000000000090910463ffffffff161015620034f6576040517fae7235df00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6108fc856020015163ffffffff1610806200353c5750601454602086015163ffffffff780100000000000000000000000000000000000000000000000090920482169116115b1562003574576040517f14c237fb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000868152600460205260409020546901000000000000000000900473ffffffffffffffffffffffffffffffffffffffff1615620035de576040517f6e3b930b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60e085015173ffffffffffffffffffffffffffffffffffffffff90811660009081526020805260409020546701000000000000009004166200364c576040517f1183afea00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600086815260046020908152604080832088518154848b0151848c015160608d015173ffffffffffffffffffffffffffffffffffffffff9081166901000000000000000000027fffffff0000000000000000000000000000000000000000ffffffffffffffffff63ffffffff9384166501000000000002167fffffff000000000000000000000000000000000000000000000000ffffffffff948416610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000ff971515979097167fffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000009096169590951795909517929092169290921792909217835560808b015160018401805460a08e015160c08f01519094167c0100000000000000000000000000000000000000000000000000000000027bffffffffffffffffffffffffffffffffffffffffffffffffffffffff6bffffffffffffffffffffffff909516700100000000000000000000000000000000027fffffffff000000000000000000000000000000000000000000000000000000009092166fffffffffffffffffffffffffffffffff90941693909317179290921617905560e08a0151600290920180549282167fffffffffffffffffffffffff0000000000000000000000000000000000000000938416179055600584528285208054918a1691909216179055600790915290206200386584826200591b565b5060a085015160e086015173ffffffffffffffffffffffffffffffffffffffff166000908152601a6020526040902054620038af916bffffffffffffffffffffffff169062004d62565b60e086015173ffffffffffffffffffffffffffffffffffffffff166000908152601a6020908152604080832093909355888252601c905220620038f383826200591b565b506000868152601d602052604090206200390e82826200591b565b506200391c6002876200430d565b50505050505050565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600183016020526040812054151562003430565b601354604080517f57e871e70000000000000000000000000000000000000000000000000000000081529051600092839273ffffffffffffffffffffffffffffffffffffffff90911691839183916385df51fd9160019184916357e871e79160048083019260209291908290030181865afa158015620039d9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620039ff919062005491565b62003a0b919062004c20565b6040518263ffffffff1660e01b815260040162003a2a91815260200190565b602060405180830381865afa15801562003a48573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062003a6e919062005491565b60145460408051602081019390935230908301527c0100000000000000000000000000000000000000000000000000000000900463ffffffff166060820152608001604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815282825280516020918201209083015201604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152919052905060045b600f81101562003b82578382828151811062003b3e5762003b3e62004cde565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508062003b798162004d78565b91505062003b1e565b5084600181111562003b985762003b9862004685565b60f81b81600f8151811062003bb15762003bb162004cde565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535062003beb8162005a42565b95945050505050565b60005473ffffffffffffffffffffffffffffffffffffffff16331462002ba7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e657200000000000000000000604482015260640162000db7565b3373ffffffffffffffffffffffffffffffffffffffff82160362003cf8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000db7565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b60008060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa15801562003ddf573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062003e05919062005522565b5093505092505060008213158062003e1c57508042105b8062003e5057506000846040015162ffffff1611801562003e50575062003e44814262004c20565b846040015162ffffff16105b1562003e6157505060195492915050565b5092915050565b604080516060810182526000808252602082018190529181019190915273ffffffffffffffffffffffffffffffffffffffff808316600090815260208080526040808320815160a08082018452825463ffffffff808216845262ffffff6401000000008304168488018190526701000000000000009092048916848701908152600186015460608601526002909501546bffffffffffffffffffffffff1660808501529589015281519094168752905182517ffeaf968c00000000000000000000000000000000000000000000000000000000815292519195859491169263feaf968c92600482810193928290030181865afa15801562003f6d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062003f93919062005522565b5093505092505060008213158062003faa57508042105b8062003fde57506000866040015162ffffff1611801562003fde575062003fd2814262004c20565b866040015162ffffff16105b1562003ff4576060830151604085015262003ffc565b604084018290525b50505092915050565b6040805160808101825260008082526020820181905291810182905260608101919091526000836060015161ffff16836060015162004045919062005593565b90508260e001518015620040585750803a105b156200406157503a5b60008360a0015184604001518560200151866000015162004083919062004d62565b6200408f908562005593565b6200409b919062004d62565b620040a7919062005593565b9050620040c98460c001516040015182620040c3919062005a85565b6200431b565b6bffffffffffffffffffffffff1683526080840151620040ef90620040c3908362005a85565b6bffffffffffffffffffffffff166040840152608084015160c085015160200151600091906200412a9062ffffff1664e8d4a5100062005593565b62004136919062005593565b9050600081633b9aca008760a001518860c001516000015163ffffffff1689604001518a60000151896200416b919062005593565b62004177919062004d62565b62004183919062005593565b6200418f919062005593565b6200419b919062005a85565b620041a7919062004d62565b9050620041c38660c001516040015182620040c3919062005a85565b6bffffffffffffffffffffffff1660208601526080860151620041ec90620040c3908362005a85565b6bffffffffffffffffffffffff1660608601525050505092915050565b60008181526001830160205260408120548015620043025760006200423060018362004c20565b8554909150600090620042469060019062004c20565b9050818114620042b25760008660000182815481106200426a576200426a62004cde565b906000526020600020015490508087600001848154811062004290576200429062004cde565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080620042c657620042c662005ac1565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505062003433565b600091505062003433565b6000620034308383620043bf565b60006bffffffffffffffffffffffff821115620043bb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203960448201527f3620626974730000000000000000000000000000000000000000000000000000606482015260840162000db7565b5090565b6000818152600183016020526040812054620044085750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915562003433565b50600062003433565b5080546200441f9062004d0d565b6000825580601f1062004430575050565b601f01602090049060005260206000209081019062002af691906200445e565b6103ca8062005af183390190565b5b80821115620043bb57600081556001016200445f565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051610100810167ffffffffffffffff81118282101715620044cb57620044cb62004475565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156200451b576200451b62004475565b604052919050565b600067ffffffffffffffff82111562004540576200454062004475565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b600082601f8301126200457e57600080fd5b8135620045956200458f8262004523565b620044d1565b818152846020838601011115620045ab57600080fd5b816020850160208301376000918101602001919091529392505050565b60008060408385031215620045dc57600080fd5b82359150602083013567ffffffffffffffff811115620045fb57600080fd5b62004609858286016200456c565b9150509250929050565b60005b838110156200463057818101518382015260200162004616565b50506000910152565b600081518084526200465381602086016020860162004613565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b600a8110620046ec577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b9052565b84151581526080602082015260006200470d608083018662004639565b90506200471e6040830185620046b4565b82606083015295945050505050565b871515815260e0602082015260006200474a60e083018962004639565b90506200475b6040830188620046b4565b8560608301528460808301528360a08301528260c083015298975050505050505050565b73ffffffffffffffffffffffffffffffffffffffff8116811462002af657600080fd5b8035620047af816200477f565b919050565b600080600060408486031215620047ca57600080fd5b833567ffffffffffffffff80821115620047e357600080fd5b818601915086601f830112620047f857600080fd5b8135818111156200480857600080fd5b8760208260051b85010111156200481e57600080fd5b6020928301955093505084013562004836816200477f565b809150509250925092565b60008083601f8401126200485457600080fd5b50813567ffffffffffffffff8111156200486d57600080fd5b6020830191508360208285010111156200488657600080fd5b9250929050565b60008060208385031215620048a157600080fd5b823567ffffffffffffffff811115620048b957600080fd5b620048c78582860162004841565b90969095509350505050565b80356bffffffffffffffffffffffff81168114620047af57600080fd5b600080604083850312156200490457600080fd5b823591506200491660208401620048d3565b90509250929050565b803563ffffffff81168114620047af57600080fd5b803560028110620047af57600080fd5b60008060008060008060008060006101008a8c0312156200496457600080fd5b6200496f8a620047a2565b98506200497f60208b016200491f565b97506200498f60408b01620047a2565b96506200499f60608b0162004934565b9550620049af60808b01620047a2565b945060a08a013567ffffffffffffffff80821115620049cd57600080fd5b620049db8d838e0162004841565b909650945060c08c0135915080821115620049f557600080fd5b62004a038d838e016200456c565b935060e08c013591508082111562004a1a57600080fd5b5062004a298c828d016200456c565b9150509295985092959850929598565b60006020828403121562004a4c57600080fd5b5035919050565b600067ffffffffffffffff82111562004a705762004a7062004475565b5060051b60200190565b600082601f83011262004a8c57600080fd5b8135602062004a9f6200458f8362004a53565b82815260059290921b8401810191818101908684111562004abf57600080fd5b8286015b8481101562004b0457803567ffffffffffffffff81111562004ae55760008081fd5b62004af58986838b01016200456c565b84525091830191830162004ac3565b509695505050505050565b6000806000806060858703121562004b2657600080fd5b84359350602085013567ffffffffffffffff8082111562004b4657600080fd5b62004b548883890162004a7a565b9450604087013591508082111562004b6b57600080fd5b5062004b7a8782880162004841565b95989497509550505050565b60006020828403121562004b9957600080fd5b813562003365816200477f565b8051620047af816200477f565b60006020828403121562004bc657600080fd5b815162003365816200477f565b6000825162004be781846020870162004613565b9190910192915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8181038181111562003433576200343362004bf1565b801515811462002af657600080fd5b600082601f83011262004c5757600080fd5b815162004c686200458f8262004523565b81815284602083860101111562004c7e57600080fd5b62002c5782602083016020870162004613565b6000806040838503121562004ca557600080fd5b825162004cb28162004c36565b602084015190925067ffffffffffffffff81111562004cd057600080fd5b620046098582860162004c45565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600181811c9082168062004d2257607f821691505b60208210810362004d5c577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b8082018082111562003433576200343362004bf1565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820362004dac5762004dac62004bf1565b5060010190565b600081518084526020808501945080840160005b8381101562004e7c5781518051151588528381015163ffffffff908116858a01526040808301518216908a015260608083015173ffffffffffffffffffffffffffffffffffffffff908116918b01919091526080808401516fffffffffffffffffffffffffffffffff16908b015260a0808401516bffffffffffffffffffffffff16908b015260c080840151909216918a019190915260e0918201511690880152610100909601959082019060010162004dc7565b509495945050505050565b600081518084526020808501945080840160005b8381101562004e7c57815173ffffffffffffffffffffffffffffffffffffffff168752958201959082019060010162004e9b565b600081518084526020808501808196508360051b8101915082860160005b8581101562004f1b57828403895262004f0884835162004639565b9885019893509084019060010162004eed565b5091979650505050505050565b60e081528760e082015260006101007f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8a111562004f6557600080fd5b8960051b808c8386013783018381038201602085015262004f898282018b62004db3565b915050828103604084015262004fa0818962004e87565b9050828103606084015262004fb6818862004e87565b9050828103608084015262004fcc818762004ecf565b905082810360a084015262004fe2818662004ecf565b905082810360c08401526200316d818562004ecf565b6000602082840312156200500b57600080fd5b815160ff811681146200336557600080fd5b60ff8416815260ff8316602082015260606040820152600062003beb606083018462004639565b6000602082840312156200505757600080fd5b815167ffffffffffffffff8111156200506f57600080fd5b62002c578482850162004c45565b60208152600062003430602083018462004639565b600060208284031215620050a557600080fd5b8151620033658162004c36565b600082601f830112620050c457600080fd5b81356020620050d76200458f8362004a53565b82815260059290921b84018101918181019086841115620050f757600080fd5b8286015b8481101562004b045780358352918301918301620050fb565b80356fffffffffffffffffffffffffffffffff81168114620047af57600080fd5b600082601f8301126200514757600080fd5b813560206200515a6200458f8362004a53565b82815260089290921b840181019181810190868411156200517a57600080fd5b8286015b8481101562004b045761010081890312156200519a5760008081fd5b620051a4620044a4565b8135620051b18162004c36565b8152620051c08286016200491f565b858201526040620051d38184016200491f565b908201526060620051e6838201620047a2565b908201526080620051f983820162005114565b9082015260a06200520c838201620048d3565b9082015260c06200521f8382016200491f565b9082015260e062005232838201620047a2565b90820152835291830191610100016200517e565b600082601f8301126200525857600080fd5b813560206200526b6200458f8362004a53565b82815260059290921b840181019181810190868411156200528b57600080fd5b8286015b8481101562004b04578035620052a5816200477f565b83529183019183016200528f565b600080600080600080600060e0888a031215620052cf57600080fd5b873567ffffffffffffffff80821115620052e857600080fd5b620052f68b838c01620050b2565b985060208a01359150808211156200530d57600080fd5b6200531b8b838c0162005135565b975060408a01359150808211156200533257600080fd5b620053408b838c0162005246565b965060608a01359150808211156200535757600080fd5b620053658b838c0162005246565b955060808a01359150808211156200537c57600080fd5b6200538a8b838c0162004a7a565b945060a08a0135915080821115620053a157600080fd5b620053af8b838c0162004a7a565b935060c08a0135915080821115620053c657600080fd5b50620053d58a828b0162004a7a565b91505092959891949750929550565b6bffffffffffffffffffffffff81811683821601908082111562003e615762003e6162004bf1565b600063ffffffff80831681810362005428576200542862004bf1565b6001019392505050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b60208152600062002c5760208301848662005432565b600060208284031215620054a457600080fd5b5051919050565b6bffffffffffffffffffffffff82811682821603908082111562003e615762003e6162004bf1565b604081526000620054e8604083018662004ecf565b8281036020840152620054fd81858762005432565b9695505050505050565b805169ffffffffffffffffffff81168114620047af57600080fd5b600080600080600060a086880312156200553b57600080fd5b620055468662005507565b94506020860151935060408601519250606086015191506200556b6080870162005507565b90509295509295909350565b60ff818116838216019081111562003433576200343362004bf1565b808202811582820484141762003433576200343362004bf1565b60008060408385031215620055c157600080fd5b505080516020909101519092909150565b60008154620055e18162004d0d565b8085526020600183811680156200560157600181146200563a576200566a565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008516838901528284151560051b89010195506200566a565b866000528260002060005b85811015620056625781548a820186015290830190840162005645565b890184019650505b505050505092915050565b602081526000620034306020830184620055d2565b600082601f8301126200569c57600080fd5b81516020620056af6200458f8362004a53565b82815260059290921b84018101918181019086841115620056cf57600080fd5b8286015b8481101562004b045780518352918301918301620056d3565b600060208284031215620056ff57600080fd5b815167ffffffffffffffff808211156200571857600080fd5b9083019061010082860312156200572e57600080fd5b62005738620044a4565b82518152602083015160208201526040830151604082015260608301516060820152608083015160808201526200577260a0840162004ba6565b60a082015260c0830151828111156200578a57600080fd5b62005798878286016200568a565b60c08301525060e083015182811115620057b157600080fd5b620057bf8782860162004c45565b60e08301525095945050505050565b600081518084526020808501945080840160005b8381101562004e7c57815187529582019590820190600101620057e2565b60408152825160408201526020830151606082015260408301516080820152606083015160a0820152608083015160c082015273ffffffffffffffffffffffffffffffffffffffff60a08401511660e0820152600060c084015161010080818501525062005873610140840182620057ce565b905060e08501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc084830301610120850152620058b1828262004639565b915050828103602084015262003beb8185620055d2565b601f8211156200591657600081815260208120601f850160051c81016020861015620058f15750805b601f850160051c820191505b818110156200591257828155600101620058fd565b5050505b505050565b815167ffffffffffffffff81111562005938576200593862004475565b620059508162005949845462004d0d565b84620058c8565b602080601f831160018114620059a657600084156200596f5750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b17855562005912565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b82811015620059f557888601518255948401946001909101908401620059d4565b508582101562005a3257878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b8051602080830151919081101562004d5c577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60209190910360031b1b16919050565b60008262005abc577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfe60c060405234801561001057600080fd5b506040516103ca3803806103ca83398101604081905261002f91610076565b600080546001600160a01b0319166001600160a01b039384161790559181166080521660a0526100b9565b80516001600160a01b038116811461007157600080fd5b919050565b60008060006060848603121561008b57600080fd5b6100948461005a565b92506100a26020850161005a565b91506100b06040850161005a565b90509250925092565b60805160a0516102e76100e36000396000603801526000818160c4015261011701526102e76000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806379188d161461007b578063f00e6a2a146100aa575b7f00000000000000000000000000000000000000000000000000000000000000003660008037600080366000845af43d6000803e808015610076573d6000f35b3d6000fd5b61008e6100893660046101c1565b6100ee565b6040805192151583526020830191909152015b60405180910390f35b60405173ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001681526020016100a1565b60008054819073ffffffffffffffffffffffffffffffffffffffff16331461011557600080fd5b7f00000000000000000000000000000000000000000000000000000000000000005a91505a61138881101561014957600080fd5b61138881039050856040820482031161016157600080fd5b50803b61016d57600080fd5b6000808551602087016000858af192505a610188908361029a565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080604083850312156101d457600080fd5b82359150602083013567ffffffffffffffff808211156101f357600080fd5b818501915085601f83011261020757600080fd5b81358181111561021957610219610192565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810190838211818310171561025f5761025f610192565b8160405282815288602084870101111561027857600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b818103818111156102d4577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b9291505056fea164736f6c6343000813000aa164736f6c6343000813000a", } var AutomationRegistryLogicAABI = AutomationRegistryLogicAMetaData.ABI @@ -323,40 +331,16 @@ func (_AutomationRegistryLogicA *AutomationRegistryLogicATransactorSession) Rece return _AutomationRegistryLogicA.Contract.ReceiveUpkeeps(&_AutomationRegistryLogicA.TransactOpts, encodedUpkeeps) } -func (_AutomationRegistryLogicA *AutomationRegistryLogicATransactor) RegisterUpkeep(opts *bind.TransactOpts, target common.Address, gasLimit uint32, admin common.Address, triggerType uint8, checkData []byte, triggerConfig []byte, offchainConfig []byte) (*types.Transaction, error) { - return _AutomationRegistryLogicA.contract.Transact(opts, "registerUpkeep", target, gasLimit, admin, triggerType, checkData, triggerConfig, offchainConfig) -} - -func (_AutomationRegistryLogicA *AutomationRegistryLogicASession) RegisterUpkeep(target common.Address, gasLimit uint32, admin common.Address, triggerType uint8, checkData []byte, triggerConfig []byte, offchainConfig []byte) (*types.Transaction, error) { - return _AutomationRegistryLogicA.Contract.RegisterUpkeep(&_AutomationRegistryLogicA.TransactOpts, target, gasLimit, admin, triggerType, checkData, triggerConfig, offchainConfig) -} - -func (_AutomationRegistryLogicA *AutomationRegistryLogicATransactorSession) RegisterUpkeep(target common.Address, gasLimit uint32, admin common.Address, triggerType uint8, checkData []byte, triggerConfig []byte, offchainConfig []byte) (*types.Transaction, error) { - return _AutomationRegistryLogicA.Contract.RegisterUpkeep(&_AutomationRegistryLogicA.TransactOpts, target, gasLimit, admin, triggerType, checkData, triggerConfig, offchainConfig) -} - -func (_AutomationRegistryLogicA *AutomationRegistryLogicATransactor) RegisterUpkeep0(opts *bind.TransactOpts, target common.Address, gasLimit uint32, admin common.Address, checkData []byte, offchainConfig []byte) (*types.Transaction, error) { - return _AutomationRegistryLogicA.contract.Transact(opts, "registerUpkeep0", target, gasLimit, admin, checkData, offchainConfig) -} - -func (_AutomationRegistryLogicA *AutomationRegistryLogicASession) RegisterUpkeep0(target common.Address, gasLimit uint32, admin common.Address, checkData []byte, offchainConfig []byte) (*types.Transaction, error) { - return _AutomationRegistryLogicA.Contract.RegisterUpkeep0(&_AutomationRegistryLogicA.TransactOpts, target, gasLimit, admin, checkData, offchainConfig) +func (_AutomationRegistryLogicA *AutomationRegistryLogicATransactor) RegisterUpkeep(opts *bind.TransactOpts, target common.Address, gasLimit uint32, admin common.Address, triggerType uint8, billingToken common.Address, checkData []byte, triggerConfig []byte, offchainConfig []byte) (*types.Transaction, error) { + return _AutomationRegistryLogicA.contract.Transact(opts, "registerUpkeep", target, gasLimit, admin, triggerType, billingToken, checkData, triggerConfig, offchainConfig) } -func (_AutomationRegistryLogicA *AutomationRegistryLogicATransactorSession) RegisterUpkeep0(target common.Address, gasLimit uint32, admin common.Address, checkData []byte, offchainConfig []byte) (*types.Transaction, error) { - return _AutomationRegistryLogicA.Contract.RegisterUpkeep0(&_AutomationRegistryLogicA.TransactOpts, target, gasLimit, admin, checkData, offchainConfig) +func (_AutomationRegistryLogicA *AutomationRegistryLogicASession) RegisterUpkeep(target common.Address, gasLimit uint32, admin common.Address, triggerType uint8, billingToken common.Address, checkData []byte, triggerConfig []byte, offchainConfig []byte) (*types.Transaction, error) { + return _AutomationRegistryLogicA.Contract.RegisterUpkeep(&_AutomationRegistryLogicA.TransactOpts, target, gasLimit, admin, triggerType, billingToken, checkData, triggerConfig, offchainConfig) } -func (_AutomationRegistryLogicA *AutomationRegistryLogicATransactor) SetUpkeepTriggerConfig(opts *bind.TransactOpts, id *big.Int, triggerConfig []byte) (*types.Transaction, error) { - return _AutomationRegistryLogicA.contract.Transact(opts, "setUpkeepTriggerConfig", id, triggerConfig) -} - -func (_AutomationRegistryLogicA *AutomationRegistryLogicASession) SetUpkeepTriggerConfig(id *big.Int, triggerConfig []byte) (*types.Transaction, error) { - return _AutomationRegistryLogicA.Contract.SetUpkeepTriggerConfig(&_AutomationRegistryLogicA.TransactOpts, id, triggerConfig) -} - -func (_AutomationRegistryLogicA *AutomationRegistryLogicATransactorSession) SetUpkeepTriggerConfig(id *big.Int, triggerConfig []byte) (*types.Transaction, error) { - return _AutomationRegistryLogicA.Contract.SetUpkeepTriggerConfig(&_AutomationRegistryLogicA.TransactOpts, id, triggerConfig) +func (_AutomationRegistryLogicA *AutomationRegistryLogicATransactorSession) RegisterUpkeep(target common.Address, gasLimit uint32, admin common.Address, triggerType uint8, billingToken common.Address, checkData []byte, triggerConfig []byte, offchainConfig []byte) (*types.Transaction, error) { + return _AutomationRegistryLogicA.Contract.RegisterUpkeep(&_AutomationRegistryLogicA.TransactOpts, target, gasLimit, admin, triggerType, billingToken, checkData, triggerConfig, offchainConfig) } func (_AutomationRegistryLogicA *AutomationRegistryLogicATransactor) TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) { @@ -511,6 +495,134 @@ func (_AutomationRegistryLogicA *AutomationRegistryLogicAFilterer) ParseAdminPri return event, nil } +type AutomationRegistryLogicABillingConfigSetIterator struct { + Event *AutomationRegistryLogicABillingConfigSet + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *AutomationRegistryLogicABillingConfigSetIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(AutomationRegistryLogicABillingConfigSet) + 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(AutomationRegistryLogicABillingConfigSet) + 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 *AutomationRegistryLogicABillingConfigSetIterator) Error() error { + return it.fail +} + +func (it *AutomationRegistryLogicABillingConfigSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type AutomationRegistryLogicABillingConfigSet struct { + Token common.Address + Config AutomationRegistryBase23BillingConfig + Raw types.Log +} + +func (_AutomationRegistryLogicA *AutomationRegistryLogicAFilterer) FilterBillingConfigSet(opts *bind.FilterOpts, token []common.Address) (*AutomationRegistryLogicABillingConfigSetIterator, error) { + + var tokenRule []interface{} + for _, tokenItem := range token { + tokenRule = append(tokenRule, tokenItem) + } + + logs, sub, err := _AutomationRegistryLogicA.contract.FilterLogs(opts, "BillingConfigSet", tokenRule) + if err != nil { + return nil, err + } + return &AutomationRegistryLogicABillingConfigSetIterator{contract: _AutomationRegistryLogicA.contract, event: "BillingConfigSet", logs: logs, sub: sub}, nil +} + +func (_AutomationRegistryLogicA *AutomationRegistryLogicAFilterer) WatchBillingConfigSet(opts *bind.WatchOpts, sink chan<- *AutomationRegistryLogicABillingConfigSet, token []common.Address) (event.Subscription, error) { + + var tokenRule []interface{} + for _, tokenItem := range token { + tokenRule = append(tokenRule, tokenItem) + } + + logs, sub, err := _AutomationRegistryLogicA.contract.WatchLogs(opts, "BillingConfigSet", tokenRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(AutomationRegistryLogicABillingConfigSet) + if err := _AutomationRegistryLogicA.contract.UnpackLog(event, "BillingConfigSet", 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 (_AutomationRegistryLogicA *AutomationRegistryLogicAFilterer) ParseBillingConfigSet(log types.Log) (*AutomationRegistryLogicABillingConfigSet, error) { + event := new(AutomationRegistryLogicABillingConfigSet) + if err := _AutomationRegistryLogicA.contract.UnpackLog(event, "BillingConfigSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + type AutomationRegistryLogicACancelledUpkeepReportIterator struct { Event *AutomationRegistryLogicACancelledUpkeepReport @@ -883,8 +995,8 @@ func (_AutomationRegistryLogicA *AutomationRegistryLogicAFilterer) ParseDedupKey return event, nil } -type AutomationRegistryLogicAFundsAddedIterator struct { - Event *AutomationRegistryLogicAFundsAdded +type AutomationRegistryLogicAFeesWithdrawnIterator struct { + Event *AutomationRegistryLogicAFeesWithdrawn contract *bind.BoundContract event string @@ -895,7 +1007,7 @@ type AutomationRegistryLogicAFundsAddedIterator struct { fail error } -func (it *AutomationRegistryLogicAFundsAddedIterator) Next() bool { +func (it *AutomationRegistryLogicAFeesWithdrawnIterator) Next() bool { if it.fail != nil { return false @@ -904,7 +1016,7 @@ func (it *AutomationRegistryLogicAFundsAddedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(AutomationRegistryLogicAFundsAdded) + it.Event = new(AutomationRegistryLogicAFeesWithdrawn) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -919,7 +1031,7 @@ func (it *AutomationRegistryLogicAFundsAddedIterator) Next() bool { select { case log := <-it.logs: - it.Event = new(AutomationRegistryLogicAFundsAdded) + it.Event = new(AutomationRegistryLogicAFeesWithdrawn) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -934,52 +1046,52 @@ func (it *AutomationRegistryLogicAFundsAddedIterator) Next() bool { } } -func (it *AutomationRegistryLogicAFundsAddedIterator) Error() error { +func (it *AutomationRegistryLogicAFeesWithdrawnIterator) Error() error { return it.fail } -func (it *AutomationRegistryLogicAFundsAddedIterator) Close() error { +func (it *AutomationRegistryLogicAFeesWithdrawnIterator) Close() error { it.sub.Unsubscribe() return nil } -type AutomationRegistryLogicAFundsAdded struct { - Id *big.Int - From common.Address - Amount *big.Int - Raw types.Log +type AutomationRegistryLogicAFeesWithdrawn struct { + Recipient common.Address + AssetAddress common.Address + Amount *big.Int + Raw types.Log } -func (_AutomationRegistryLogicA *AutomationRegistryLogicAFilterer) FilterFundsAdded(opts *bind.FilterOpts, id []*big.Int, from []common.Address) (*AutomationRegistryLogicAFundsAddedIterator, error) { +func (_AutomationRegistryLogicA *AutomationRegistryLogicAFilterer) FilterFeesWithdrawn(opts *bind.FilterOpts, recipient []common.Address, assetAddress []common.Address) (*AutomationRegistryLogicAFeesWithdrawnIterator, error) { - var idRule []interface{} - for _, idItem := range id { - idRule = append(idRule, idItem) + var recipientRule []interface{} + for _, recipientItem := range recipient { + recipientRule = append(recipientRule, recipientItem) } - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) + var assetAddressRule []interface{} + for _, assetAddressItem := range assetAddress { + assetAddressRule = append(assetAddressRule, assetAddressItem) } - logs, sub, err := _AutomationRegistryLogicA.contract.FilterLogs(opts, "FundsAdded", idRule, fromRule) + logs, sub, err := _AutomationRegistryLogicA.contract.FilterLogs(opts, "FeesWithdrawn", recipientRule, assetAddressRule) if err != nil { return nil, err } - return &AutomationRegistryLogicAFundsAddedIterator{contract: _AutomationRegistryLogicA.contract, event: "FundsAdded", logs: logs, sub: sub}, nil + return &AutomationRegistryLogicAFeesWithdrawnIterator{contract: _AutomationRegistryLogicA.contract, event: "FeesWithdrawn", logs: logs, sub: sub}, nil } -func (_AutomationRegistryLogicA *AutomationRegistryLogicAFilterer) WatchFundsAdded(opts *bind.WatchOpts, sink chan<- *AutomationRegistryLogicAFundsAdded, id []*big.Int, from []common.Address) (event.Subscription, error) { +func (_AutomationRegistryLogicA *AutomationRegistryLogicAFilterer) WatchFeesWithdrawn(opts *bind.WatchOpts, sink chan<- *AutomationRegistryLogicAFeesWithdrawn, recipient []common.Address, assetAddress []common.Address) (event.Subscription, error) { - var idRule []interface{} - for _, idItem := range id { - idRule = append(idRule, idItem) + var recipientRule []interface{} + for _, recipientItem := range recipient { + recipientRule = append(recipientRule, recipientItem) } - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) + var assetAddressRule []interface{} + for _, assetAddressItem := range assetAddress { + assetAddressRule = append(assetAddressRule, assetAddressItem) } - logs, sub, err := _AutomationRegistryLogicA.contract.WatchLogs(opts, "FundsAdded", idRule, fromRule) + logs, sub, err := _AutomationRegistryLogicA.contract.WatchLogs(opts, "FeesWithdrawn", recipientRule, assetAddressRule) if err != nil { return nil, err } @@ -989,8 +1101,8 @@ func (_AutomationRegistryLogicA *AutomationRegistryLogicAFilterer) WatchFundsAdd select { case log := <-logs: - event := new(AutomationRegistryLogicAFundsAdded) - if err := _AutomationRegistryLogicA.contract.UnpackLog(event, "FundsAdded", log); err != nil { + event := new(AutomationRegistryLogicAFeesWithdrawn) + if err := _AutomationRegistryLogicA.contract.UnpackLog(event, "FeesWithdrawn", log); err != nil { return err } event.Raw = log @@ -1011,17 +1123,17 @@ func (_AutomationRegistryLogicA *AutomationRegistryLogicAFilterer) WatchFundsAdd }), nil } -func (_AutomationRegistryLogicA *AutomationRegistryLogicAFilterer) ParseFundsAdded(log types.Log) (*AutomationRegistryLogicAFundsAdded, error) { - event := new(AutomationRegistryLogicAFundsAdded) - if err := _AutomationRegistryLogicA.contract.UnpackLog(event, "FundsAdded", log); err != nil { +func (_AutomationRegistryLogicA *AutomationRegistryLogicAFilterer) ParseFeesWithdrawn(log types.Log) (*AutomationRegistryLogicAFeesWithdrawn, error) { + event := new(AutomationRegistryLogicAFeesWithdrawn) + if err := _AutomationRegistryLogicA.contract.UnpackLog(event, "FeesWithdrawn", log); err != nil { return nil, err } event.Raw = log return event, nil } -type AutomationRegistryLogicAFundsWithdrawnIterator struct { - Event *AutomationRegistryLogicAFundsWithdrawn +type AutomationRegistryLogicAFundsAddedIterator struct { + Event *AutomationRegistryLogicAFundsAdded contract *bind.BoundContract event string @@ -1032,7 +1144,7 @@ type AutomationRegistryLogicAFundsWithdrawnIterator struct { fail error } -func (it *AutomationRegistryLogicAFundsWithdrawnIterator) Next() bool { +func (it *AutomationRegistryLogicAFundsAddedIterator) Next() bool { if it.fail != nil { return false @@ -1041,7 +1153,7 @@ func (it *AutomationRegistryLogicAFundsWithdrawnIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(AutomationRegistryLogicAFundsWithdrawn) + it.Event = new(AutomationRegistryLogicAFundsAdded) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1056,7 +1168,7 @@ func (it *AutomationRegistryLogicAFundsWithdrawnIterator) Next() bool { select { case log := <-it.logs: - it.Event = new(AutomationRegistryLogicAFundsWithdrawn) + it.Event = new(AutomationRegistryLogicAFundsAdded) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1071,44 +1183,52 @@ func (it *AutomationRegistryLogicAFundsWithdrawnIterator) Next() bool { } } -func (it *AutomationRegistryLogicAFundsWithdrawnIterator) Error() error { +func (it *AutomationRegistryLogicAFundsAddedIterator) Error() error { return it.fail } -func (it *AutomationRegistryLogicAFundsWithdrawnIterator) Close() error { +func (it *AutomationRegistryLogicAFundsAddedIterator) Close() error { it.sub.Unsubscribe() return nil } -type AutomationRegistryLogicAFundsWithdrawn struct { +type AutomationRegistryLogicAFundsAdded struct { Id *big.Int + From common.Address Amount *big.Int - To common.Address Raw types.Log } -func (_AutomationRegistryLogicA *AutomationRegistryLogicAFilterer) FilterFundsWithdrawn(opts *bind.FilterOpts, id []*big.Int) (*AutomationRegistryLogicAFundsWithdrawnIterator, error) { +func (_AutomationRegistryLogicA *AutomationRegistryLogicAFilterer) FilterFundsAdded(opts *bind.FilterOpts, id []*big.Int, from []common.Address) (*AutomationRegistryLogicAFundsAddedIterator, error) { var idRule []interface{} for _, idItem := range id { idRule = append(idRule, idItem) } + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } - logs, sub, err := _AutomationRegistryLogicA.contract.FilterLogs(opts, "FundsWithdrawn", idRule) + logs, sub, err := _AutomationRegistryLogicA.contract.FilterLogs(opts, "FundsAdded", idRule, fromRule) if err != nil { return nil, err } - return &AutomationRegistryLogicAFundsWithdrawnIterator{contract: _AutomationRegistryLogicA.contract, event: "FundsWithdrawn", logs: logs, sub: sub}, nil + return &AutomationRegistryLogicAFundsAddedIterator{contract: _AutomationRegistryLogicA.contract, event: "FundsAdded", logs: logs, sub: sub}, nil } -func (_AutomationRegistryLogicA *AutomationRegistryLogicAFilterer) WatchFundsWithdrawn(opts *bind.WatchOpts, sink chan<- *AutomationRegistryLogicAFundsWithdrawn, id []*big.Int) (event.Subscription, error) { +func (_AutomationRegistryLogicA *AutomationRegistryLogicAFilterer) WatchFundsAdded(opts *bind.WatchOpts, sink chan<- *AutomationRegistryLogicAFundsAdded, id []*big.Int, from []common.Address) (event.Subscription, error) { var idRule []interface{} for _, idItem := range id { idRule = append(idRule, idItem) } + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } - logs, sub, err := _AutomationRegistryLogicA.contract.WatchLogs(opts, "FundsWithdrawn", idRule) + logs, sub, err := _AutomationRegistryLogicA.contract.WatchLogs(opts, "FundsAdded", idRule, fromRule) if err != nil { return nil, err } @@ -1118,8 +1238,8 @@ func (_AutomationRegistryLogicA *AutomationRegistryLogicAFilterer) WatchFundsWit select { case log := <-logs: - event := new(AutomationRegistryLogicAFundsWithdrawn) - if err := _AutomationRegistryLogicA.contract.UnpackLog(event, "FundsWithdrawn", log); err != nil { + event := new(AutomationRegistryLogicAFundsAdded) + if err := _AutomationRegistryLogicA.contract.UnpackLog(event, "FundsAdded", log); err != nil { return err } event.Raw = log @@ -1140,17 +1260,17 @@ func (_AutomationRegistryLogicA *AutomationRegistryLogicAFilterer) WatchFundsWit }), nil } -func (_AutomationRegistryLogicA *AutomationRegistryLogicAFilterer) ParseFundsWithdrawn(log types.Log) (*AutomationRegistryLogicAFundsWithdrawn, error) { - event := new(AutomationRegistryLogicAFundsWithdrawn) - if err := _AutomationRegistryLogicA.contract.UnpackLog(event, "FundsWithdrawn", log); err != nil { +func (_AutomationRegistryLogicA *AutomationRegistryLogicAFilterer) ParseFundsAdded(log types.Log) (*AutomationRegistryLogicAFundsAdded, error) { + event := new(AutomationRegistryLogicAFundsAdded) + if err := _AutomationRegistryLogicA.contract.UnpackLog(event, "FundsAdded", log); err != nil { return nil, err } event.Raw = log return event, nil } -type AutomationRegistryLogicAInsufficientFundsUpkeepReportIterator struct { - Event *AutomationRegistryLogicAInsufficientFundsUpkeepReport +type AutomationRegistryLogicAFundsWithdrawnIterator struct { + Event *AutomationRegistryLogicAFundsWithdrawn contract *bind.BoundContract event string @@ -1161,7 +1281,7 @@ type AutomationRegistryLogicAInsufficientFundsUpkeepReportIterator struct { fail error } -func (it *AutomationRegistryLogicAInsufficientFundsUpkeepReportIterator) Next() bool { +func (it *AutomationRegistryLogicAFundsWithdrawnIterator) Next() bool { if it.fail != nil { return false @@ -1170,7 +1290,7 @@ func (it *AutomationRegistryLogicAInsufficientFundsUpkeepReportIterator) Next() if it.done { select { case log := <-it.logs: - it.Event = new(AutomationRegistryLogicAInsufficientFundsUpkeepReport) + it.Event = new(AutomationRegistryLogicAFundsWithdrawn) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1185,7 +1305,7 @@ func (it *AutomationRegistryLogicAInsufficientFundsUpkeepReportIterator) Next() select { case log := <-it.logs: - it.Event = new(AutomationRegistryLogicAInsufficientFundsUpkeepReport) + it.Event = new(AutomationRegistryLogicAFundsWithdrawn) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1200,43 +1320,44 @@ func (it *AutomationRegistryLogicAInsufficientFundsUpkeepReportIterator) Next() } } -func (it *AutomationRegistryLogicAInsufficientFundsUpkeepReportIterator) Error() error { +func (it *AutomationRegistryLogicAFundsWithdrawnIterator) Error() error { return it.fail } -func (it *AutomationRegistryLogicAInsufficientFundsUpkeepReportIterator) Close() error { +func (it *AutomationRegistryLogicAFundsWithdrawnIterator) Close() error { it.sub.Unsubscribe() return nil } -type AutomationRegistryLogicAInsufficientFundsUpkeepReport struct { - Id *big.Int - Trigger []byte - Raw types.Log +type AutomationRegistryLogicAFundsWithdrawn struct { + Id *big.Int + Amount *big.Int + To common.Address + Raw types.Log } -func (_AutomationRegistryLogicA *AutomationRegistryLogicAFilterer) FilterInsufficientFundsUpkeepReport(opts *bind.FilterOpts, id []*big.Int) (*AutomationRegistryLogicAInsufficientFundsUpkeepReportIterator, error) { +func (_AutomationRegistryLogicA *AutomationRegistryLogicAFilterer) FilterFundsWithdrawn(opts *bind.FilterOpts, id []*big.Int) (*AutomationRegistryLogicAFundsWithdrawnIterator, error) { var idRule []interface{} for _, idItem := range id { idRule = append(idRule, idItem) } - logs, sub, err := _AutomationRegistryLogicA.contract.FilterLogs(opts, "InsufficientFundsUpkeepReport", idRule) + logs, sub, err := _AutomationRegistryLogicA.contract.FilterLogs(opts, "FundsWithdrawn", idRule) if err != nil { return nil, err } - return &AutomationRegistryLogicAInsufficientFundsUpkeepReportIterator{contract: _AutomationRegistryLogicA.contract, event: "InsufficientFundsUpkeepReport", logs: logs, sub: sub}, nil + return &AutomationRegistryLogicAFundsWithdrawnIterator{contract: _AutomationRegistryLogicA.contract, event: "FundsWithdrawn", logs: logs, sub: sub}, nil } -func (_AutomationRegistryLogicA *AutomationRegistryLogicAFilterer) WatchInsufficientFundsUpkeepReport(opts *bind.WatchOpts, sink chan<- *AutomationRegistryLogicAInsufficientFundsUpkeepReport, id []*big.Int) (event.Subscription, error) { +func (_AutomationRegistryLogicA *AutomationRegistryLogicAFilterer) WatchFundsWithdrawn(opts *bind.WatchOpts, sink chan<- *AutomationRegistryLogicAFundsWithdrawn, id []*big.Int) (event.Subscription, error) { var idRule []interface{} for _, idItem := range id { idRule = append(idRule, idItem) } - logs, sub, err := _AutomationRegistryLogicA.contract.WatchLogs(opts, "InsufficientFundsUpkeepReport", idRule) + logs, sub, err := _AutomationRegistryLogicA.contract.WatchLogs(opts, "FundsWithdrawn", idRule) if err != nil { return nil, err } @@ -1246,8 +1367,8 @@ func (_AutomationRegistryLogicA *AutomationRegistryLogicAFilterer) WatchInsuffic select { case log := <-logs: - event := new(AutomationRegistryLogicAInsufficientFundsUpkeepReport) - if err := _AutomationRegistryLogicA.contract.UnpackLog(event, "InsufficientFundsUpkeepReport", log); err != nil { + event := new(AutomationRegistryLogicAFundsWithdrawn) + if err := _AutomationRegistryLogicA.contract.UnpackLog(event, "FundsWithdrawn", log); err != nil { return err } event.Raw = log @@ -1268,17 +1389,17 @@ func (_AutomationRegistryLogicA *AutomationRegistryLogicAFilterer) WatchInsuffic }), nil } -func (_AutomationRegistryLogicA *AutomationRegistryLogicAFilterer) ParseInsufficientFundsUpkeepReport(log types.Log) (*AutomationRegistryLogicAInsufficientFundsUpkeepReport, error) { - event := new(AutomationRegistryLogicAInsufficientFundsUpkeepReport) - if err := _AutomationRegistryLogicA.contract.UnpackLog(event, "InsufficientFundsUpkeepReport", log); err != nil { +func (_AutomationRegistryLogicA *AutomationRegistryLogicAFilterer) ParseFundsWithdrawn(log types.Log) (*AutomationRegistryLogicAFundsWithdrawn, error) { + event := new(AutomationRegistryLogicAFundsWithdrawn) + if err := _AutomationRegistryLogicA.contract.UnpackLog(event, "FundsWithdrawn", log); err != nil { return nil, err } event.Raw = log return event, nil } -type AutomationRegistryLogicAOwnerFundsWithdrawnIterator struct { - Event *AutomationRegistryLogicAOwnerFundsWithdrawn +type AutomationRegistryLogicAInsufficientFundsUpkeepReportIterator struct { + Event *AutomationRegistryLogicAInsufficientFundsUpkeepReport contract *bind.BoundContract event string @@ -1289,7 +1410,7 @@ type AutomationRegistryLogicAOwnerFundsWithdrawnIterator struct { fail error } -func (it *AutomationRegistryLogicAOwnerFundsWithdrawnIterator) Next() bool { +func (it *AutomationRegistryLogicAInsufficientFundsUpkeepReportIterator) Next() bool { if it.fail != nil { return false @@ -1298,7 +1419,7 @@ func (it *AutomationRegistryLogicAOwnerFundsWithdrawnIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(AutomationRegistryLogicAOwnerFundsWithdrawn) + it.Event = new(AutomationRegistryLogicAInsufficientFundsUpkeepReport) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1313,7 +1434,7 @@ func (it *AutomationRegistryLogicAOwnerFundsWithdrawnIterator) Next() bool { select { case log := <-it.logs: - it.Event = new(AutomationRegistryLogicAOwnerFundsWithdrawn) + it.Event = new(AutomationRegistryLogicAInsufficientFundsUpkeepReport) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1328,32 +1449,43 @@ func (it *AutomationRegistryLogicAOwnerFundsWithdrawnIterator) Next() bool { } } -func (it *AutomationRegistryLogicAOwnerFundsWithdrawnIterator) Error() error { +func (it *AutomationRegistryLogicAInsufficientFundsUpkeepReportIterator) Error() error { return it.fail } -func (it *AutomationRegistryLogicAOwnerFundsWithdrawnIterator) Close() error { +func (it *AutomationRegistryLogicAInsufficientFundsUpkeepReportIterator) Close() error { it.sub.Unsubscribe() return nil } -type AutomationRegistryLogicAOwnerFundsWithdrawn struct { - Amount *big.Int - Raw types.Log +type AutomationRegistryLogicAInsufficientFundsUpkeepReport struct { + Id *big.Int + Trigger []byte + Raw types.Log } -func (_AutomationRegistryLogicA *AutomationRegistryLogicAFilterer) FilterOwnerFundsWithdrawn(opts *bind.FilterOpts) (*AutomationRegistryLogicAOwnerFundsWithdrawnIterator, error) { +func (_AutomationRegistryLogicA *AutomationRegistryLogicAFilterer) FilterInsufficientFundsUpkeepReport(opts *bind.FilterOpts, id []*big.Int) (*AutomationRegistryLogicAInsufficientFundsUpkeepReportIterator, error) { + + var idRule []interface{} + for _, idItem := range id { + idRule = append(idRule, idItem) + } - logs, sub, err := _AutomationRegistryLogicA.contract.FilterLogs(opts, "OwnerFundsWithdrawn") + logs, sub, err := _AutomationRegistryLogicA.contract.FilterLogs(opts, "InsufficientFundsUpkeepReport", idRule) if err != nil { return nil, err } - return &AutomationRegistryLogicAOwnerFundsWithdrawnIterator{contract: _AutomationRegistryLogicA.contract, event: "OwnerFundsWithdrawn", logs: logs, sub: sub}, nil + return &AutomationRegistryLogicAInsufficientFundsUpkeepReportIterator{contract: _AutomationRegistryLogicA.contract, event: "InsufficientFundsUpkeepReport", logs: logs, sub: sub}, nil } -func (_AutomationRegistryLogicA *AutomationRegistryLogicAFilterer) WatchOwnerFundsWithdrawn(opts *bind.WatchOpts, sink chan<- *AutomationRegistryLogicAOwnerFundsWithdrawn) (event.Subscription, error) { +func (_AutomationRegistryLogicA *AutomationRegistryLogicAFilterer) WatchInsufficientFundsUpkeepReport(opts *bind.WatchOpts, sink chan<- *AutomationRegistryLogicAInsufficientFundsUpkeepReport, id []*big.Int) (event.Subscription, error) { + + var idRule []interface{} + for _, idItem := range id { + idRule = append(idRule, idItem) + } - logs, sub, err := _AutomationRegistryLogicA.contract.WatchLogs(opts, "OwnerFundsWithdrawn") + logs, sub, err := _AutomationRegistryLogicA.contract.WatchLogs(opts, "InsufficientFundsUpkeepReport", idRule) if err != nil { return nil, err } @@ -1363,8 +1495,8 @@ func (_AutomationRegistryLogicA *AutomationRegistryLogicAFilterer) WatchOwnerFun select { case log := <-logs: - event := new(AutomationRegistryLogicAOwnerFundsWithdrawn) - if err := _AutomationRegistryLogicA.contract.UnpackLog(event, "OwnerFundsWithdrawn", log); err != nil { + event := new(AutomationRegistryLogicAInsufficientFundsUpkeepReport) + if err := _AutomationRegistryLogicA.contract.UnpackLog(event, "InsufficientFundsUpkeepReport", log); err != nil { return err } event.Raw = log @@ -1385,9 +1517,9 @@ func (_AutomationRegistryLogicA *AutomationRegistryLogicAFilterer) WatchOwnerFun }), nil } -func (_AutomationRegistryLogicA *AutomationRegistryLogicAFilterer) ParseOwnerFundsWithdrawn(log types.Log) (*AutomationRegistryLogicAOwnerFundsWithdrawn, error) { - event := new(AutomationRegistryLogicAOwnerFundsWithdrawn) - if err := _AutomationRegistryLogicA.contract.UnpackLog(event, "OwnerFundsWithdrawn", log); err != nil { +func (_AutomationRegistryLogicA *AutomationRegistryLogicAFilterer) ParseInsufficientFundsUpkeepReport(log types.Log) (*AutomationRegistryLogicAInsufficientFundsUpkeepReport, error) { + event := new(AutomationRegistryLogicAInsufficientFundsUpkeepReport) + if err := _AutomationRegistryLogicA.contract.UnpackLog(event, "InsufficientFundsUpkeepReport", log); err != nil { return nil, err } event.Raw = log @@ -4561,20 +4693,22 @@ func (_AutomationRegistryLogicA *AutomationRegistryLogicA) ParseLog(log types.Lo switch log.Topics[0] { case _AutomationRegistryLogicA.abi.Events["AdminPrivilegeConfigSet"].ID: return _AutomationRegistryLogicA.ParseAdminPrivilegeConfigSet(log) + case _AutomationRegistryLogicA.abi.Events["BillingConfigSet"].ID: + return _AutomationRegistryLogicA.ParseBillingConfigSet(log) case _AutomationRegistryLogicA.abi.Events["CancelledUpkeepReport"].ID: return _AutomationRegistryLogicA.ParseCancelledUpkeepReport(log) case _AutomationRegistryLogicA.abi.Events["ChainSpecificModuleUpdated"].ID: return _AutomationRegistryLogicA.ParseChainSpecificModuleUpdated(log) case _AutomationRegistryLogicA.abi.Events["DedupKeyAdded"].ID: return _AutomationRegistryLogicA.ParseDedupKeyAdded(log) + case _AutomationRegistryLogicA.abi.Events["FeesWithdrawn"].ID: + return _AutomationRegistryLogicA.ParseFeesWithdrawn(log) case _AutomationRegistryLogicA.abi.Events["FundsAdded"].ID: return _AutomationRegistryLogicA.ParseFundsAdded(log) case _AutomationRegistryLogicA.abi.Events["FundsWithdrawn"].ID: return _AutomationRegistryLogicA.ParseFundsWithdrawn(log) case _AutomationRegistryLogicA.abi.Events["InsufficientFundsUpkeepReport"].ID: return _AutomationRegistryLogicA.ParseInsufficientFundsUpkeepReport(log) - case _AutomationRegistryLogicA.abi.Events["OwnerFundsWithdrawn"].ID: - return _AutomationRegistryLogicA.ParseOwnerFundsWithdrawn(log) case _AutomationRegistryLogicA.abi.Events["OwnershipTransferRequested"].ID: return _AutomationRegistryLogicA.ParseOwnershipTransferRequested(log) case _AutomationRegistryLogicA.abi.Events["OwnershipTransferred"].ID: @@ -4633,6 +4767,10 @@ func (AutomationRegistryLogicAAdminPrivilegeConfigSet) Topic() common.Hash { return common.HexToHash("0x7c44b4eb59ee7873514e7e43e7718c269d872965938b288aa143befca62f99d2") } +func (AutomationRegistryLogicABillingConfigSet) Topic() common.Hash { + return common.HexToHash("0x720a5849025dc4fd0061aed1bb30efd713cde64ce7f8d807953ecca27c8f143c") +} + func (AutomationRegistryLogicACancelledUpkeepReport) Topic() common.Hash { return common.HexToHash("0xc3237c8807c467c1b39b8d0395eff077313e691bf0a7388106792564ebfd5636") } @@ -4645,6 +4783,10 @@ func (AutomationRegistryLogicADedupKeyAdded) Topic() common.Hash { return common.HexToHash("0xa4a4e334c0e330143f9437484fe516c13bc560b86b5b0daf58e7084aaac228f2") } +func (AutomationRegistryLogicAFeesWithdrawn) Topic() common.Hash { + return common.HexToHash("0x5e110f8bc8a20b65dcc87f224bdf1cc039346e267118bae2739847f07321ffa8") +} + func (AutomationRegistryLogicAFundsAdded) Topic() common.Hash { return common.HexToHash("0xafd24114486da8ebfc32f3626dada8863652e187461aa74d4bfa734891506203") } @@ -4657,10 +4799,6 @@ func (AutomationRegistryLogicAInsufficientFundsUpkeepReport) Topic() common.Hash return common.HexToHash("0x377c8b0c126ae5248d27aca1c76fac4608aff85673ee3caf09747e1044549e02") } -func (AutomationRegistryLogicAOwnerFundsWithdrawn) Topic() common.Hash { - return common.HexToHash("0x1d07d0b0be43d3e5fee41a80b579af370affee03fa595bf56d5d4c19328162f1") -} - func (AutomationRegistryLogicAOwnershipTransferRequested) Topic() common.Hash { return common.HexToHash("0xed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae1278") } @@ -4784,11 +4922,7 @@ type AutomationRegistryLogicAInterface interface { ReceiveUpkeeps(opts *bind.TransactOpts, encodedUpkeeps []byte) (*types.Transaction, error) - RegisterUpkeep(opts *bind.TransactOpts, target common.Address, gasLimit uint32, admin common.Address, triggerType uint8, checkData []byte, triggerConfig []byte, offchainConfig []byte) (*types.Transaction, error) - - RegisterUpkeep0(opts *bind.TransactOpts, target common.Address, gasLimit uint32, admin common.Address, checkData []byte, offchainConfig []byte) (*types.Transaction, error) - - SetUpkeepTriggerConfig(opts *bind.TransactOpts, id *big.Int, triggerConfig []byte) (*types.Transaction, error) + RegisterUpkeep(opts *bind.TransactOpts, target common.Address, gasLimit uint32, admin common.Address, triggerType uint8, billingToken common.Address, checkData []byte, triggerConfig []byte, offchainConfig []byte) (*types.Transaction, error) TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) @@ -4800,6 +4934,12 @@ type AutomationRegistryLogicAInterface interface { ParseAdminPrivilegeConfigSet(log types.Log) (*AutomationRegistryLogicAAdminPrivilegeConfigSet, error) + FilterBillingConfigSet(opts *bind.FilterOpts, token []common.Address) (*AutomationRegistryLogicABillingConfigSetIterator, error) + + WatchBillingConfigSet(opts *bind.WatchOpts, sink chan<- *AutomationRegistryLogicABillingConfigSet, token []common.Address) (event.Subscription, error) + + ParseBillingConfigSet(log types.Log) (*AutomationRegistryLogicABillingConfigSet, error) + FilterCancelledUpkeepReport(opts *bind.FilterOpts, id []*big.Int) (*AutomationRegistryLogicACancelledUpkeepReportIterator, error) WatchCancelledUpkeepReport(opts *bind.WatchOpts, sink chan<- *AutomationRegistryLogicACancelledUpkeepReport, id []*big.Int) (event.Subscription, error) @@ -4818,6 +4958,12 @@ type AutomationRegistryLogicAInterface interface { ParseDedupKeyAdded(log types.Log) (*AutomationRegistryLogicADedupKeyAdded, error) + FilterFeesWithdrawn(opts *bind.FilterOpts, recipient []common.Address, assetAddress []common.Address) (*AutomationRegistryLogicAFeesWithdrawnIterator, error) + + WatchFeesWithdrawn(opts *bind.WatchOpts, sink chan<- *AutomationRegistryLogicAFeesWithdrawn, recipient []common.Address, assetAddress []common.Address) (event.Subscription, error) + + ParseFeesWithdrawn(log types.Log) (*AutomationRegistryLogicAFeesWithdrawn, error) + FilterFundsAdded(opts *bind.FilterOpts, id []*big.Int, from []common.Address) (*AutomationRegistryLogicAFundsAddedIterator, error) WatchFundsAdded(opts *bind.WatchOpts, sink chan<- *AutomationRegistryLogicAFundsAdded, id []*big.Int, from []common.Address) (event.Subscription, error) @@ -4836,12 +4982,6 @@ type AutomationRegistryLogicAInterface interface { ParseInsufficientFundsUpkeepReport(log types.Log) (*AutomationRegistryLogicAInsufficientFundsUpkeepReport, error) - FilterOwnerFundsWithdrawn(opts *bind.FilterOpts) (*AutomationRegistryLogicAOwnerFundsWithdrawnIterator, error) - - WatchOwnerFundsWithdrawn(opts *bind.WatchOpts, sink chan<- *AutomationRegistryLogicAOwnerFundsWithdrawn) (event.Subscription, error) - - ParseOwnerFundsWithdrawn(log types.Log) (*AutomationRegistryLogicAOwnerFundsWithdrawn, error) - FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*AutomationRegistryLogicAOwnershipTransferRequestedIterator, error) WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *AutomationRegistryLogicAOwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) diff --git a/core/gethwrappers/generated/automation_registry_logic_b_wrapper_2_2/automation_registry_logic_b_wrapper_2_2.go b/core/gethwrappers/generated/automation_registry_logic_b_wrapper_2_2/automation_registry_logic_b_wrapper_2_2.go index e936312e5ca..a6b1d7d63e7 100644 --- a/core/gethwrappers/generated/automation_registry_logic_b_wrapper_2_2/automation_registry_logic_b_wrapper_2_2.go +++ b/core/gethwrappers/generated/automation_registry_logic_b_wrapper_2_2/automation_registry_logic_b_wrapper_2_2.go @@ -30,7 +30,7 @@ var ( _ = abi.ConvertType ) -type AutomationRegistryBase22OnchainConfigLegacy struct { +type IAutomationV21PlusCommonOnchainConfigLegacy struct { PaymentPremiumPPB uint32 FlatFeeMicroLink uint32 CheckGasLimit uint32 @@ -48,7 +48,7 @@ type AutomationRegistryBase22OnchainConfigLegacy struct { UpkeepPrivilegeManager common.Address } -type AutomationRegistryBase22State struct { +type IAutomationV21PlusCommonStateLegacy struct { Nonce uint32 OwnerLinkBalance *big.Int ExpectedLinkBalance *big.Int @@ -61,7 +61,7 @@ type AutomationRegistryBase22State struct { Paused bool } -type AutomationRegistryBase22UpkeepInfo struct { +type IAutomationV21PlusCommonUpkeepInfoLegacy struct { Target common.Address PerformGas uint32 CheckData []byte @@ -75,7 +75,7 @@ type AutomationRegistryBase22UpkeepInfo struct { } var AutomationRegistryLogicBMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"link\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"linkNativeFeed\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"fastGasFeed\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"automationForwarderLogic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"allowedReadOnlyAddress\",\"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\":[],\"name\":\"InvalidDataLength\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidPayee\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidRecipient\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidReport\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidSigner\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTransmitter\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTrigger\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTriggerType\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MaxCheckDataSizeCanOnlyIncrease\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MaxPerformDataSizeCanOnlyIncrease\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MigrationNotPermitted\",\"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\":\"OnlyPausedUpkeep\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlySimulatedBackend\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyUnpausedUpkeep\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ParameterLengthError\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PaymentGreaterThanAllLINK\",\"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\":\"UpkeepAlreadyExists\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UpkeepCancelled\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UpkeepNotCanceled\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UpkeepNotNeeded\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ValueNotChanged\",\"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\"},{\"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\":true,\"internalType\":\"bytes32\",\"name\":\"dedupKey\",\"type\":\"bytes32\"}],\"name\":\"DedupKeyAdded\",\"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\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"OwnerFundsWithdrawn\",\"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\":\"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\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"transmitter\",\"type\":\"address\"}],\"name\":\"acceptPayeeship\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"acceptUpkeepAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"startIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxCount\",\"type\":\"uint256\"}],\"name\":\"getActiveUpkeepIDs\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"}],\"name\":\"getAdminPrivilegeConfig\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAllowedReadOnlyAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAutomationForwarderLogic\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"getBalance\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"balance\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCancellationDelay\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getChainModule\",\"outputs\":[{\"internalType\":\"contractIChainModule\",\"name\":\"chainModule\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getConditionalGasOverhead\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getFastGasFeedAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepID\",\"type\":\"uint256\"}],\"name\":\"getForwarder\",\"outputs\":[{\"internalType\":\"contractIAutomationForwarder\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLinkAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLinkNativeFeedAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLogGasOverhead\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enumAutomationRegistryBase2_2.Trigger\",\"name\":\"triggerType\",\"type\":\"uint8\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"}],\"name\":\"getMaxPaymentForGas\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"maxPayment\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"getMinBalance\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"getMinBalanceForUpkeep\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"minBalance\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"peer\",\"type\":\"address\"}],\"name\":\"getPeerRegistryMigrationPermission\",\"outputs\":[{\"internalType\":\"enumAutomationRegistryBase2_2.MigrationPermission\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPerPerformByteGasOverhead\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPerSignerGasOverhead\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getReorgProtectionEnabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"reorgProtectionEnabled\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"query\",\"type\":\"address\"}],\"name\":\"getSignerInfo\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"active\",\"type\":\"bool\"},{\"internalType\":\"uint8\",\"name\":\"index\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getState\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"nonce\",\"type\":\"uint32\"},{\"internalType\":\"uint96\",\"name\":\"ownerLinkBalance\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"expectedLinkBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint96\",\"name\":\"totalPremium\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"numUpkeeps\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"configCount\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"latestConfigBlockNumber\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"latestConfigDigest\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"latestEpoch\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"}],\"internalType\":\"structAutomationRegistryBase2_2.State\",\"name\":\"state\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint32\",\"name\":\"paymentPremiumPPB\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"flatFeeMicroLink\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"checkGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint24\",\"name\":\"stalenessSeconds\",\"type\":\"uint24\"},{\"internalType\":\"uint16\",\"name\":\"gasCeilingMultiplier\",\"type\":\"uint16\"},{\"internalType\":\"uint96\",\"name\":\"minUpkeepSpend\",\"type\":\"uint96\"},{\"internalType\":\"uint32\",\"name\":\"maxPerformGas\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxCheckDataSize\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxPerformDataSize\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxRevertDataSize\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"fallbackGasPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fallbackLinkPrice\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"transcoder\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"registrars\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"upkeepPrivilegeManager\",\"type\":\"address\"}],\"internalType\":\"structAutomationRegistryBase2_2.OnchainConfigLegacy\",\"name\":\"config\",\"type\":\"tuple\"},{\"internalType\":\"address[]\",\"name\":\"signers\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"transmitters\",\"type\":\"address[]\"},{\"internalType\":\"uint8\",\"name\":\"f\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTransmitCalldataFixedBytesOverhead\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTransmitCalldataPerSignerBytesOverhead\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"query\",\"type\":\"address\"}],\"name\":\"getTransmitterInfo\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"active\",\"type\":\"bool\"},{\"internalType\":\"uint8\",\"name\":\"index\",\"type\":\"uint8\"},{\"internalType\":\"uint96\",\"name\":\"balance\",\"type\":\"uint96\"},{\"internalType\":\"uint96\",\"name\":\"lastCollected\",\"type\":\"uint96\"},{\"internalType\":\"address\",\"name\":\"payee\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"getTriggerType\",\"outputs\":[{\"internalType\":\"enumAutomationRegistryBase2_2.Trigger\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"getUpkeep\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"performGas\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"checkData\",\"type\":\"bytes\"},{\"internalType\":\"uint96\",\"name\":\"balance\",\"type\":\"uint96\"},{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"maxValidBlocknumber\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"lastPerformedBlockNumber\",\"type\":\"uint32\"},{\"internalType\":\"uint96\",\"name\":\"amountSpent\",\"type\":\"uint96\"},{\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"offchainConfig\",\"type\":\"bytes\"}],\"internalType\":\"structAutomationRegistryBase2_2.UpkeepInfo\",\"name\":\"upkeepInfo\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"getUpkeepPrivilegeConfig\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"getUpkeepTriggerConfig\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"dedupKey\",\"type\":\"bytes32\"}],\"name\":\"hasDedupKey\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"pauseUpkeep\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"recoverFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"newPrivilegeConfig\",\"type\":\"bytes\"}],\"name\":\"setAdminPrivilegeConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"payees\",\"type\":\"address[]\"}],\"name\":\"setPayees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"peer\",\"type\":\"address\"},{\"internalType\":\"enumAutomationRegistryBase2_2.MigrationPermission\",\"name\":\"permission\",\"type\":\"uint8\"}],\"name\":\"setPeerRegistryMigrationPermission\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"newCheckData\",\"type\":\"bytes\"}],\"name\":\"setUpkeepCheckData\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"}],\"name\":\"setUpkeepGasLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"}],\"name\":\"setUpkeepOffchainConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"newPrivilegeConfig\",\"type\":\"bytes\"}],\"name\":\"setUpkeepPrivilegeConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"transmitter\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"proposed\",\"type\":\"address\"}],\"name\":\"transferPayeeship\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"proposed\",\"type\":\"address\"}],\"name\":\"transferUpkeepAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"unpauseUpkeep\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"upkeepTranscoderVersion\",\"outputs\":[{\"internalType\":\"enumUpkeepFormat\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"upkeepVersion\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"withdrawFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"withdrawOwnerFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"withdrawPayment\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"link\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"linkNativeFeed\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"fastGasFeed\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"automationForwarderLogic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"allowedReadOnlyAddress\",\"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\":[],\"name\":\"InvalidDataLength\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidPayee\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidRecipient\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidReport\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidSigner\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTransmitter\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTrigger\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTriggerType\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MaxCheckDataSizeCanOnlyIncrease\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MaxPerformDataSizeCanOnlyIncrease\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MigrationNotPermitted\",\"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\":\"OnlyPausedUpkeep\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlySimulatedBackend\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyUnpausedUpkeep\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ParameterLengthError\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PaymentGreaterThanAllLINK\",\"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\":\"UpkeepAlreadyExists\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UpkeepCancelled\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UpkeepNotCanceled\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UpkeepNotNeeded\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ValueNotChanged\",\"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\"},{\"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\":true,\"internalType\":\"bytes32\",\"name\":\"dedupKey\",\"type\":\"bytes32\"}],\"name\":\"DedupKeyAdded\",\"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\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"OwnerFundsWithdrawn\",\"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\":\"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\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"transmitter\",\"type\":\"address\"}],\"name\":\"acceptPayeeship\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"acceptUpkeepAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"startIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxCount\",\"type\":\"uint256\"}],\"name\":\"getActiveUpkeepIDs\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"}],\"name\":\"getAdminPrivilegeConfig\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAllowedReadOnlyAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAutomationForwarderLogic\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"getBalance\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"balance\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCancellationDelay\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getChainModule\",\"outputs\":[{\"internalType\":\"contractIChainModule\",\"name\":\"chainModule\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getConditionalGasOverhead\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getFastGasFeedAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepID\",\"type\":\"uint256\"}],\"name\":\"getForwarder\",\"outputs\":[{\"internalType\":\"contractIAutomationForwarder\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLinkAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLinkNativeFeedAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLogGasOverhead\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enumAutomationRegistryBase2_2.Trigger\",\"name\":\"triggerType\",\"type\":\"uint8\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"}],\"name\":\"getMaxPaymentForGas\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"maxPayment\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"getMinBalance\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"getMinBalanceForUpkeep\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"minBalance\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"peer\",\"type\":\"address\"}],\"name\":\"getPeerRegistryMigrationPermission\",\"outputs\":[{\"internalType\":\"enumAutomationRegistryBase2_2.MigrationPermission\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPerPerformByteGasOverhead\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPerSignerGasOverhead\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getReorgProtectionEnabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"reorgProtectionEnabled\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"query\",\"type\":\"address\"}],\"name\":\"getSignerInfo\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"active\",\"type\":\"bool\"},{\"internalType\":\"uint8\",\"name\":\"index\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getState\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"nonce\",\"type\":\"uint32\"},{\"internalType\":\"uint96\",\"name\":\"ownerLinkBalance\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"expectedLinkBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint96\",\"name\":\"totalPremium\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"numUpkeeps\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"configCount\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"latestConfigBlockNumber\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"latestConfigDigest\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"latestEpoch\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"}],\"internalType\":\"structIAutomationV21PlusCommon.StateLegacy\",\"name\":\"state\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint32\",\"name\":\"paymentPremiumPPB\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"flatFeeMicroLink\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"checkGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint24\",\"name\":\"stalenessSeconds\",\"type\":\"uint24\"},{\"internalType\":\"uint16\",\"name\":\"gasCeilingMultiplier\",\"type\":\"uint16\"},{\"internalType\":\"uint96\",\"name\":\"minUpkeepSpend\",\"type\":\"uint96\"},{\"internalType\":\"uint32\",\"name\":\"maxPerformGas\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxCheckDataSize\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxPerformDataSize\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxRevertDataSize\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"fallbackGasPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fallbackLinkPrice\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"transcoder\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"registrars\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"upkeepPrivilegeManager\",\"type\":\"address\"}],\"internalType\":\"structIAutomationV21PlusCommon.OnchainConfigLegacy\",\"name\":\"config\",\"type\":\"tuple\"},{\"internalType\":\"address[]\",\"name\":\"signers\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"transmitters\",\"type\":\"address[]\"},{\"internalType\":\"uint8\",\"name\":\"f\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTransmitCalldataFixedBytesOverhead\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTransmitCalldataPerSignerBytesOverhead\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"query\",\"type\":\"address\"}],\"name\":\"getTransmitterInfo\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"active\",\"type\":\"bool\"},{\"internalType\":\"uint8\",\"name\":\"index\",\"type\":\"uint8\"},{\"internalType\":\"uint96\",\"name\":\"balance\",\"type\":\"uint96\"},{\"internalType\":\"uint96\",\"name\":\"lastCollected\",\"type\":\"uint96\"},{\"internalType\":\"address\",\"name\":\"payee\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"getTriggerType\",\"outputs\":[{\"internalType\":\"enumAutomationRegistryBase2_2.Trigger\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"getUpkeep\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"performGas\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"checkData\",\"type\":\"bytes\"},{\"internalType\":\"uint96\",\"name\":\"balance\",\"type\":\"uint96\"},{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"maxValidBlocknumber\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"lastPerformedBlockNumber\",\"type\":\"uint32\"},{\"internalType\":\"uint96\",\"name\":\"amountSpent\",\"type\":\"uint96\"},{\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"offchainConfig\",\"type\":\"bytes\"}],\"internalType\":\"structIAutomationV21PlusCommon.UpkeepInfoLegacy\",\"name\":\"upkeepInfo\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"getUpkeepPrivilegeConfig\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"getUpkeepTriggerConfig\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"dedupKey\",\"type\":\"bytes32\"}],\"name\":\"hasDedupKey\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"pauseUpkeep\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"recoverFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"newPrivilegeConfig\",\"type\":\"bytes\"}],\"name\":\"setAdminPrivilegeConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"payees\",\"type\":\"address[]\"}],\"name\":\"setPayees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"peer\",\"type\":\"address\"},{\"internalType\":\"enumAutomationRegistryBase2_2.MigrationPermission\",\"name\":\"permission\",\"type\":\"uint8\"}],\"name\":\"setPeerRegistryMigrationPermission\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"newCheckData\",\"type\":\"bytes\"}],\"name\":\"setUpkeepCheckData\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"}],\"name\":\"setUpkeepGasLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"}],\"name\":\"setUpkeepOffchainConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"newPrivilegeConfig\",\"type\":\"bytes\"}],\"name\":\"setUpkeepPrivilegeConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"transmitter\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"proposed\",\"type\":\"address\"}],\"name\":\"transferPayeeship\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"proposed\",\"type\":\"address\"}],\"name\":\"transferUpkeepAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"unpauseUpkeep\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"upkeepTranscoderVersion\",\"outputs\":[{\"internalType\":\"enumUpkeepFormat\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"upkeepVersion\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"withdrawFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"withdrawOwnerFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"withdrawPayment\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", Bin: "0x6101206040523480156200001257600080fd5b5060405162004daf38038062004daf8339810160408190526200003591620001bf565b84848484843380600081620000915760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000c457620000c481620000f7565b5050506001600160a01b0394851660805292841660a05290831660c052821660e0521661010052506200022f9350505050565b336001600160a01b03821603620001515760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000088565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b80516001600160a01b0381168114620001ba57600080fd5b919050565b600080600080600060a08688031215620001d857600080fd5b620001e386620001a2565b9450620001f360208701620001a2565b93506200020360408701620001a2565b92506200021360608701620001a2565b91506200022360808701620001a2565b90509295509295909350565b60805160a05160c05160e05161010051614b0a620002a56000396000610715015260006105920152600081816105ff01526132df01526000818161077801526133b901526000818161080601528181611d490152818161201e015281816124870152818161299a0152612a1e0152614b0a6000f3fe608060405234801561001057600080fd5b50600436106103625760003560e01c80637d9b97e0116101c8578063b121e14711610104578063cd7f71b5116100a2578063ed56b3e11161007c578063ed56b3e114610863578063f2fde38b146108d6578063f777ff06146108e9578063faa3e996146108f057600080fd5b8063cd7f71b51461082a578063d76326481461083d578063eb5dcd6c1461085057600080fd5b8063b657bc9c116100de578063b657bc9c146107c9578063b79550be146107dc578063c7c3a19a146107e4578063ca30e6031461080457600080fd5b8063b121e1471461079c578063b148ab6b146107af578063b6511a2a146107c257600080fd5b80639e0a99ed11610171578063a72aa27e1161014b578063a72aa27e1461074c578063aab9edd61461075f578063abc76ae01461076e578063b10b673c1461077657600080fd5b80639e0a99ed1461070b578063a08714c014610713578063a710b2211461073957600080fd5b80638da5cb5b116101a25780638da5cb5b146106b75780638dcf0fe7146106d55780638ed02bab146106e857600080fd5b80637d9b97e0146106945780638456cb591461069c5780638765ecbe146106a457600080fd5b806343cc055c116102a25780635b6aa71c11610240578063671d36ed1161021a578063671d36ed14610623578063744bfe611461063657806379ba50971461064957806379ea99431461065157600080fd5b80635b6aa71c146105d75780636209e1e9146105ea5780636709d0e5146105fd57600080fd5b80634ca16c521161027c5780634ca16c52146105555780635147cd591461055d5780635165f2f51461057d5780635425d8ac1461059057600080fd5b806343cc055c1461050c57806344cb70b81461052357806348013d7b1461054657600080fd5b80631a2af0111161030f578063232c1cc5116102e9578063232c1cc5146104845780633b9cce591461048b5780633f4ba83a1461049e578063421d183b146104a657600080fd5b80631a2af011146104005780631e01043914610413578063207b65161461047157600080fd5b80631865c57d116103405780631865c57d146103b4578063187256e8146103cd57806319d97a94146103e057600080fd5b8063050ee65d1461036757806306e3b6321461037f5780630b7d33e61461039f575b600080fd5b62014c085b6040519081526020015b60405180910390f35b61039261038d366004613d35565b610936565b6040516103769190613d57565b6103b26103ad366004613de4565b610a53565b005b6103bc610b0d565b604051610376959493929190613fe7565b6103b26103db36600461411e565b610f57565b6103f36103ee36600461415b565b610fc8565b60405161037691906141d8565b6103b261040e3660046141eb565b61106a565b61045461042136600461415b565b6000908152600460205260409020600101546c0100000000000000000000000090046bffffffffffffffffffffffff1690565b6040516bffffffffffffffffffffffff9091168152602001610376565b6103f361047f36600461415b565b611170565b601861036c565b6103b2610499366004614210565b61118d565b6103b26113e3565b6104b96104b4366004614285565b611449565b60408051951515865260ff90941660208601526bffffffffffffffffffffffff9283169385019390935216606083015273ffffffffffffffffffffffffffffffffffffffff16608082015260a001610376565b60135460ff165b6040519015158152602001610376565b61051361053136600461415b565b60009081526008602052604090205460ff1690565b600060405161037691906142d1565b61ea6061036c565b61057061056b36600461415b565b611568565b60405161037691906142eb565b6103b261058b36600461415b565b611573565b7f00000000000000000000000000000000000000000000000000000000000000005b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610376565b6104546105e5366004614318565b6116ea565b6103f36105f8366004614285565b61188f565b7f00000000000000000000000000000000000000000000000000000000000000006105b2565b6103b2610631366004614351565b6118c3565b6103b26106443660046141eb565b61199d565b6103b2611e44565b6105b261065f36600461415b565b6000908152600460205260409020546901000000000000000000900473ffffffffffffffffffffffffffffffffffffffff1690565b6103b2611f46565b6103b26120a1565b6103b26106b236600461415b565b612122565b60005473ffffffffffffffffffffffffffffffffffffffff166105b2565b6103b26106e3366004613de4565b61229c565b601354610100900473ffffffffffffffffffffffffffffffffffffffff166105b2565b6103a461036c565b7f00000000000000000000000000000000000000000000000000000000000000006105b2565b6103b261074736600461438d565b6122f1565b6103b261075a3660046143bb565b612559565b60405160038152602001610376565b6115e061036c565b7f00000000000000000000000000000000000000000000000000000000000000006105b2565b6103b26107aa366004614285565b61264e565b6103b26107bd36600461415b565b612746565b603261036c565b6104546107d736600461415b565b612934565b6103b2612961565b6107f76107f236600461415b565b612abd565b60405161037691906143de565b7f00000000000000000000000000000000000000000000000000000000000000006105b2565b6103b2610838366004613de4565b612e90565b61045461084b36600461415b565b612f27565b6103b261085e36600461438d565b612f32565b6108bd610871366004614285565b73ffffffffffffffffffffffffffffffffffffffff166000908152600c602090815260409182902082518084019093525460ff8082161515808552610100909204169290910182905291565b60408051921515835260ff909116602083015201610376565b6103b26108e4366004614285565b613090565b604061036c565b6109296108fe366004614285565b73ffffffffffffffffffffffffffffffffffffffff166000908152601a602052604090205460ff1690565b6040516103769190614515565b6060600061094460026130a4565b905080841061097f576040517f1390f2a100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061098b8486614558565b905081811180610999575083155b6109a357806109a5565b815b905060006109b3868361456b565b67ffffffffffffffff8111156109cb576109cb61457e565b6040519080825280602002602001820160405280156109f4578160200160208202803683370190505b50905060005b8151811015610a4757610a18610a108883614558565b6002906130ae565b828281518110610a2a57610a2a6145ad565b602090810291909101015280610a3f816145dc565b9150506109fa565b50925050505b92915050565b6016546c01000000000000000000000000900473ffffffffffffffffffffffffffffffffffffffff163314610ab4576040517f77c3599200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000838152601d60205260409020610acd8284836146b6565b50827f2fd8d70753a007014349d4591843cc031c2dd7a260d7dd82eca8253686ae77698383604051610b009291906147d1565b60405180910390a2505050565b6040805161014081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e081018290526101008101829052610120810191909152604080516101e08101825260008082526020820181905291810182905260608082018390526080820183905260a0820183905260c0820183905260e08201839052610100820183905261012082018390526101408201839052610160820183905261018082018390526101a08201526101c0810191909152604080516101408101825260155463ffffffff7401000000000000000000000000000000000000000082041682526bffffffffffffffffffffffff90811660208301526019549282019290925260125490911660608281019190915290819060009060808101610c4660026130a4565b8152601554780100000000000000000000000000000000000000000000000080820463ffffffff9081166020808601919091527c01000000000000000000000000000000000000000000000000000000008404821660408087019190915260115460608088019190915260125474010000000000000000000000000000000000000000810485166080808a01919091527e01000000000000000000000000000000000000000000000000000000000000820460ff16151560a0998a015283516101e0810185526c0100000000000000000000000080840488168252700100000000000000000000000000000000808504891697830197909752808a0488169582019590955296820462ffffff16928701929092527b01000000000000000000000000000000000000000000000000000000900461ffff16908501526014546bffffffffffffffffffffffff8116968501969096529304811660c083015260165480821660e08401526401000000008104821661010084015268010000000000000000900416610120820152601754610140820152601854610160820152910473ffffffffffffffffffffffffffffffffffffffff166101808201529095506101a08101610e1360096130c1565b81526016546c01000000000000000000000000900473ffffffffffffffffffffffffffffffffffffffff16602091820152601254600d80546040805182860281018601909152818152949850899489949293600e937d01000000000000000000000000000000000000000000000000000000000090910460ff16928591830182828015610ed657602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311610eab575b5050505050925081805480602002602001604051908101604052809291908181526020018280548015610f3f57602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311610f14575b50505050509150945094509450945094509091929394565b610f5f6130ce565b73ffffffffffffffffffffffffffffffffffffffff82166000908152601a6020526040902080548291907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001836003811115610fbf57610fbf6142a2565b02179055505050565b6000818152601d60205260409020805460609190610fe590614614565b80601f016020809104026020016040519081016040528092919081815260200182805461101190614614565b801561105e5780601f106110335761010080835404028352916020019161105e565b820191906000526020600020905b81548152906001019060200180831161104157829003601f168201915b50505050509050919050565b61107382613151565b3373ffffffffffffffffffffffffffffffffffffffff8216036110c2576040517f8c8728c700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526006602052604090205473ffffffffffffffffffffffffffffffffffffffff82811691161461116c5760008281526006602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff851690811790915590519091339185917fb1cbb2c4b8480034c27e06da5f096b8233a8fd4497028593a41ff6df79726b3591a45b5050565b6000818152601b60205260409020805460609190610fe590614614565b6111956130ce565b600e5481146111d0576040517fcf54c06a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b600e548110156113a2576000600e82815481106111f2576111f26145ad565b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff908116808452600f9092526040832054919350169085858581811061123c5761123c6145ad565b90506020020160208101906112519190614285565b905073ffffffffffffffffffffffffffffffffffffffff811615806112e4575073ffffffffffffffffffffffffffffffffffffffff8216158015906112c257508073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156112e4575073ffffffffffffffffffffffffffffffffffffffff81811614155b1561131b576040517fb387a23800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8181161461138c5773ffffffffffffffffffffffffffffffffffffffff8381166000908152600f6020526040902080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169183169190911790555b505050808061139a906145dc565b9150506111d3565b507fa46de38886467c59be07a0675f14781206a5477d871628af46c2443822fcb725600e83836040516113d79392919061481e565b60405180910390a15050565b6113eb6130ce565b601280547fff00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1690556040513381527f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa906020015b60405180910390a1565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600b602090815260408083208151608081018352905460ff80821615801584526101008304909116948301949094526bffffffffffffffffffffffff6201000082048116938301939093526e01000000000000000000000000000090049091166060820152829182918291829190829061150f5760608201516012546000916114fb916bffffffffffffffffffffffff166148d0565b600e5490915061150b9082614924565b9150505b81516020830151604084015161152690849061494f565b6060949094015173ffffffffffffffffffffffffffffffffffffffff9a8b166000908152600f6020526040902054929b919a9499509750921694509092505050565b6000610a4d82613205565b61157c81613151565b600081815260046020908152604091829020825160e081018452815460ff8116151580835263ffffffff610100830481169584019590955265010000000000820485169583019590955273ffffffffffffffffffffffffffffffffffffffff69010000000000000000009091041660608201526001909101546bffffffffffffffffffffffff80821660808401526c0100000000000000000000000082041660a08301527801000000000000000000000000000000000000000000000000900490911660c08201529061167b576040517f1b88a78400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082815260046020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690556116ba6002836132b0565b5060405182907f7bada562044eb163f6b4003c4553e4e62825344c0418eea087bed5ee05a4745690600090a25050565b60408051610160810182526012546bffffffffffffffffffffffff8116825263ffffffff6c010000000000000000000000008204811660208401527001000000000000000000000000000000008204811693830193909352740100000000000000000000000000000000000000008104909216606082015262ffffff7801000000000000000000000000000000000000000000000000830416608082015261ffff7b0100000000000000000000000000000000000000000000000000000083041660a082015260ff7d0100000000000000000000000000000000000000000000000000000000008304811660c08301527e0100000000000000000000000000000000000000000000000000000000000083048116151560e08301527f01000000000000000000000000000000000000000000000000000000000000009092048216151561010080830191909152601354928316151561012083015273ffffffffffffffffffffffffffffffffffffffff9204919091166101408201526000908180611874836132bc565b91509150611885838787858561349a565b9695505050505050565b73ffffffffffffffffffffffffffffffffffffffff81166000908152601e60205260409020805460609190610fe590614614565b6016546c01000000000000000000000000900473ffffffffffffffffffffffffffffffffffffffff163314611924576040517f77c3599200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff83166000908152601e602052604090206119548284836146b6565b508273ffffffffffffffffffffffffffffffffffffffff167f7c44b4eb59ee7873514e7e43e7718c269d872965938b288aa143befca62f99d28383604051610b009291906147d1565b6012547f0100000000000000000000000000000000000000000000000000000000000000900460ff16156119fd576040517f37ed32e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b601280547effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f010000000000000000000000000000000000000000000000000000000000000017905573ffffffffffffffffffffffffffffffffffffffff8116611a93576040517f9c8d2cd200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000828152600460209081526040808320815160e081018352815460ff81161515825263ffffffff610100820481168387015265010000000000820481168386015273ffffffffffffffffffffffffffffffffffffffff6901000000000000000000909204821660608401526001909301546bffffffffffffffffffffffff80821660808501526c0100000000000000000000000082041660a08401527801000000000000000000000000000000000000000000000000900490921660c082015286855260059093529220549091163314611b9a576040517fa47c170600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b601260010160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166357e871e76040518163ffffffff1660e01b8152600401602060405180830381865afa158015611c0a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c2e9190614974565b816040015163ffffffff161115611c71576040517fff84e5dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000838152600460205260409020600101546019546c010000000000000000000000009091046bffffffffffffffffffffffff1690611cb190829061456b565b60195560008481526004602081905260409182902060010180547fffffffffffffffff000000000000000000000000ffffffffffffffffffffffff16905590517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff858116928201929092526bffffffffffffffffffffffff831660248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016020604051808303816000875af1158015611d94573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611db8919061498d565b50604080516bffffffffffffffffffffffff8316815273ffffffffffffffffffffffffffffffffffffffff8516602082015285917ff3b5906e5672f3e524854103bcafbbdba80dbdfeca2c35e116127b1060a68318910160405180910390a25050601280547effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1690555050565b60015473ffffffffffffffffffffffffffffffffffffffff163314611eca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e65720000000000000000000060448201526064015b60405180910390fd5b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b611f4e6130ce565b6015546019546bffffffffffffffffffffffff90911690611f7090829061456b565b601955601580547fffffffffffffffffffffffffffffffffffffffff0000000000000000000000001690556040516bffffffffffffffffffffffff821681527f1d07d0b0be43d3e5fee41a80b579af370affee03fa595bf56d5d4c19328162f19060200160405180910390a16040517fa9059cbb0000000000000000000000000000000000000000000000000000000081523360048201526bffffffffffffffffffffffff821660248201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063a9059cbb906044015b6020604051808303816000875af115801561207d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061116c919061498d565b6120a96130ce565b601280547fff00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167e010000000000000000000000000000000000000000000000000000000000001790556040513381527f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2589060200161143f565b61212b81613151565b600081815260046020908152604091829020825160e081018452815460ff8116158015835263ffffffff610100830481169584019590955265010000000000820485169583019590955273ffffffffffffffffffffffffffffffffffffffff69010000000000000000009091041660608201526001909101546bffffffffffffffffffffffff80821660808401526c0100000000000000000000000082041660a08301527801000000000000000000000000000000000000000000000000900490911660c08201529061222a576040517f514b6c2400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082815260046020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905561226c600283613722565b5060405182907f8ab10247ce168c27748e656ecf852b951fcaac790c18106b19aa0ae57a8b741f90600090a25050565b6122a583613151565b6000838152601c602052604090206122be8284836146b6565b50827f3e8740446213c8a77d40e08f79136ce3f347d13ed270a6ebdf57159e0faf48508383604051610b009291906147d1565b73ffffffffffffffffffffffffffffffffffffffff811661233e576040517f9c8d2cd200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8281166000908152600f602052604090205416331461239e576040517fcebf515b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b601254600e546000916123c19185916bffffffffffffffffffffffff169061372e565b73ffffffffffffffffffffffffffffffffffffffff84166000908152600b6020526040902080547fffffffffffffffffffffffffffffffffffff000000000000000000000000ffff16905560195490915061242b906bffffffffffffffffffffffff83169061456b565b6019556040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83811660048301526bffffffffffffffffffffffff831660248301527f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb906044016020604051808303816000875af11580156124d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124f4919061498d565b5060405133815273ffffffffffffffffffffffffffffffffffffffff808416916bffffffffffffffffffffffff8416918616907f9819093176a1851202c7bcfa46845809b4e47c261866550e94ed3775d2f406989060200160405180910390a4505050565b6108fc8163ffffffff16108061258e575060155463ffffffff7001000000000000000000000000000000009091048116908216115b156125c5576040517f14c237fb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6125ce82613151565b60008281526004602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000ff1661010063ffffffff861690810291909117909155915191825283917fc24c07e655ce79fba8a589778987d3c015bc6af1632bb20cf9182e02a65d972c910160405180910390a25050565b73ffffffffffffffffffffffffffffffffffffffff8181166000908152601060205260409020541633146126ae576040517f6752e7aa00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8181166000818152600f602090815260408083208054337fffffffffffffffffffffffff000000000000000000000000000000000000000080831682179093556010909452828520805490921690915590519416939092849290917f78af32efdcad432315431e9b03d27e6cd98fb79c405fdc5af7c1714d9c0f75b39190a45050565b600081815260046020908152604091829020825160e081018452815460ff81161515825263ffffffff6101008204811694830194909452650100000000008104841694820185905273ffffffffffffffffffffffffffffffffffffffff69010000000000000000009091041660608201526001909101546bffffffffffffffffffffffff80821660808401526c0100000000000000000000000082041660a083015278010000000000000000000000000000000000000000000000009004821660c08201529114612843576040517f9c0083a200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526006602052604090205473ffffffffffffffffffffffffffffffffffffffff1633146128a0576040517f6352a85300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526005602090815260408083208054337fffffffffffffffffffffffff0000000000000000000000000000000000000000808316821790935560069094528285208054909216909155905173ffffffffffffffffffffffffffffffffffffffff90911692839186917f5cff4db96bef051785e999f44bfcd21c18823e034fb92dd376e3db4ce0feeb2c91a4505050565b6000610a4d61294283613205565b600084815260046020526040902054610100900463ffffffff166116ea565b6129696130ce565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906370a0823190602401602060405180830381865afa1580156129f6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a1a9190614974565b90507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb3360195484612a67919061456b565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815273ffffffffffffffffffffffffffffffffffffffff9092166004830152602482015260440161205e565b604080516101408101825260008082526020820181905260609282018390528282018190526080820181905260a0820181905260c0820181905260e082018190526101008201526101208101919091526000828152600460209081526040808320815160e081018352815460ff811615158252610100810463ffffffff90811695830195909552650100000000008104851693820193909352690100000000000000000090920473ffffffffffffffffffffffffffffffffffffffff16606083018190526001909101546bffffffffffffffffffffffff80821660808501526c0100000000000000000000000082041660a08401527801000000000000000000000000000000000000000000000000900490921660c0820152919015612c5557816060015173ffffffffffffffffffffffffffffffffffffffff1663f00e6a2a6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612c2c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c5091906149af565b612c58565b60005b90506040518061014001604052808273ffffffffffffffffffffffffffffffffffffffff168152602001836020015163ffffffff168152602001600760008781526020019081526020016000208054612cb090614614565b80601f0160208091040260200160405190810160405280929190818152602001828054612cdc90614614565b8015612d295780601f10612cfe57610100808354040283529160200191612d29565b820191906000526020600020905b815481529060010190602001808311612d0c57829003601f168201915b505050505081526020018360a001516bffffffffffffffffffffffff1681526020016005600087815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001836040015163ffffffff1667ffffffffffffffff1681526020018360c0015163ffffffff16815260200183608001516bffffffffffffffffffffffff168152602001836000015115158152602001601c60008781526020019081526020016000208054612e0690614614565b80601f0160208091040260200160405190810160405280929190818152602001828054612e3290614614565b8015612e7f5780601f10612e5457610100808354040283529160200191612e7f565b820191906000526020600020905b815481529060010190602001808311612e6257829003601f168201915b505050505081525092505050919050565b612e9983613151565b60165463ffffffff16811115612edb576040517fae7235df00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000838152600760205260409020612ef48284836146b6565b50827fcba2d5723b2ee59e53a8e8a82a4a7caf4fdfe70e9f7c582950bf7e7a5c24e83d8383604051610b009291906147d1565b6000610a4d82612934565b73ffffffffffffffffffffffffffffffffffffffff8281166000908152600f6020526040902054163314612f92576040517fcebf515b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff821603612fe1576040517f8c8728c700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff82811660009081526010602052604090205481169082161461116c5773ffffffffffffffffffffffffffffffffffffffff82811660008181526010602052604080822080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169486169485179055513392917f84f7c7c80bb8ed2279b4aab5f61cd05e6374073d38f46d7f32de8c30e9e3836791a45050565b6130986130ce565b6130a181613936565b50565b6000610a4d825490565b60006130ba8383613a2b565b9392505050565b606060006130ba83613a55565b60005473ffffffffffffffffffffffffffffffffffffffff16331461314f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e6572000000000000000000006044820152606401611ec1565b565b60008181526005602052604090205473ffffffffffffffffffffffffffffffffffffffff1633146131ae576040517fa47c170600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008181526004602052604090205465010000000000900463ffffffff908116146130a1576040517f9c0083a200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000818160045b600f811015613292577fff00000000000000000000000000000000000000000000000000000000000000821683826020811061324a5761324a6145ad565b1a60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161461328057506000949350505050565b8061328a816145dc565b91505061320c565b5081600f1a60018111156132a8576132a86142a2565b949350505050565b60006130ba8383613ab0565b6000806000836080015162ffffff1690506000808263ffffffff161190506000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015613348573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061336c91906149e6565b509450909250505060008113158061338357508142105b806133a457508280156133a4575061339b824261456b565b8463ffffffff16105b156133b35760175495506133b7565b8095505b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015613422573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061344691906149e6565b509450909250505060008113158061345d57508142105b8061347e575082801561347e5750613475824261456b565b8463ffffffff16105b1561348d576018549450613491565b8094505b50505050915091565b600080808660018111156134b0576134b06142a2565b036134be575061ea60613513565b60018660018111156134d2576134d26142a2565b036134e1575062014c08613513565b6040517ff2b2d41200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008760c0015160016135269190614a36565b6135349060ff166040614a4f565b601654613552906103a490640100000000900463ffffffff16614558565b61355c9190614558565b601354604080517fde9ee35e00000000000000000000000000000000000000000000000000000000815281519394506000938493610100900473ffffffffffffffffffffffffffffffffffffffff169263de9ee35e92600480820193918290030181865afa1580156135d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906135f69190614a66565b90925090508183613608836018614558565b6136129190614a4f565b60c08c0151613622906001614a36565b6136319060ff166115e0614a4f565b61363b9190614558565b6136459190614558565b61364f9085614558565b935060008a610140015173ffffffffffffffffffffffffffffffffffffffff166312544140856040518263ffffffff1660e01b815260040161369391815260200190565b602060405180830381865afa1580156136b0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906136d49190614974565b8b60a0015161ffff166136e79190614a4f565b90506000806137028d8c63ffffffff1689868e8e6000613aff565b9092509050613711818361494f565b9d9c50505050505050505050505050565b60006130ba8383613c3b565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600b602090815260408083208151608081018352905460ff80821615801584526101008304909116948301949094526bffffffffffffffffffffffff6201000082048116938301939093526e010000000000000000000000000000900490911660608201529061392a5760008160600151856137c691906148d0565b905060006137d48583614924565b905080836040018181516137e8919061494f565b6bffffffffffffffffffffffff169052506138038582614a8a565b83606001818151613814919061494f565b6bffffffffffffffffffffffff90811690915273ffffffffffffffffffffffffffffffffffffffff89166000908152600b602090815260409182902087518154928901519389015160608a015186166e010000000000000000000000000000027fffffffffffff000000000000000000000000ffffffffffffffffffffffffffff919096166201000002167fffffffffffff000000000000000000000000000000000000000000000000ffff60ff95909516610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff921515929092167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000909416939093171792909216179190911790555050505b60400151949350505050565b3373ffffffffffffffffffffffffffffffffffffffff8216036139b5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401611ec1565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6000826000018281548110613a4257613a426145ad565b9060005260206000200154905092915050565b60608160000180548060200260200160405190810160405280929190818152602001828054801561105e57602002820191906000526020600020905b815481526020019060010190808311613a915750505050509050919050565b6000818152600183016020526040812054613af757508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610a4d565b506000610a4d565b60008060008960a0015161ffff1686613b189190614a4f565b9050838015613b265750803a105b15613b2e57503a5b60008588613b3c8b8d614558565b613b469085614a4f565b613b509190614558565b613b6290670de0b6b3a7640000614a4f565b613b6c9190614aba565b905060008b6040015163ffffffff1664e8d4a51000613b8b9190614a4f565b60208d0151889063ffffffff168b613ba38f88614a4f565b613bad9190614558565b613bbb90633b9aca00614a4f565b613bc59190614a4f565b613bcf9190614aba565b613bd99190614558565b90506b033b2e3c9fd0803ce8000000613bf28284614558565b1115613c2a576040517f2ad7547a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b909b909a5098505050505050505050565b60008181526001830160205260408120548015613d24576000613c5f60018361456b565b8554909150600090613c739060019061456b565b9050818114613cd8576000866000018281548110613c9357613c936145ad565b9060005260206000200154905080876000018481548110613cb657613cb66145ad565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080613ce957613ce9614ace565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610a4d565b6000915050610a4d565b5092915050565b60008060408385031215613d4857600080fd5b50508035926020909101359150565b6020808252825182820181905260009190848201906040850190845b81811015613d8f57835183529284019291840191600101613d73565b50909695505050505050565b60008083601f840112613dad57600080fd5b50813567ffffffffffffffff811115613dc557600080fd5b602083019150836020828501011115613ddd57600080fd5b9250929050565b600080600060408486031215613df957600080fd5b83359250602084013567ffffffffffffffff811115613e1757600080fd5b613e2386828701613d9b565b9497909650939450505050565b600081518084526020808501945080840160005b83811015613e7657815173ffffffffffffffffffffffffffffffffffffffff1687529582019590820190600101613e44565b509495945050505050565b805163ffffffff16825260006101e06020830151613ea7602086018263ffffffff169052565b506040830151613ebf604086018263ffffffff169052565b506060830151613ed6606086018262ffffff169052565b506080830151613eec608086018261ffff169052565b5060a0830151613f0c60a08601826bffffffffffffffffffffffff169052565b5060c0830151613f2460c086018263ffffffff169052565b5060e0830151613f3c60e086018263ffffffff169052565b506101008381015163ffffffff908116918601919091526101208085015190911690850152610140808401519085015261016080840151908501526101808084015173ffffffffffffffffffffffffffffffffffffffff16908501526101a080840151818601839052613fb183870182613e30565b925050506101c080840151613fdd8287018273ffffffffffffffffffffffffffffffffffffffff169052565b5090949350505050565b855163ffffffff16815260006101c0602088015161401560208501826bffffffffffffffffffffffff169052565b5060408801516040840152606088015161403f60608501826bffffffffffffffffffffffff169052565b506080880151608084015260a088015161406160a085018263ffffffff169052565b5060c088015161407960c085018263ffffffff169052565b5060e088015160e08401526101008089015161409c8286018263ffffffff169052565b50506101208881015115159084015261014083018190526140bf81840188613e81565b90508281036101608401526140d48187613e30565b90508281036101808401526140e98186613e30565b9150506118856101a083018460ff169052565b73ffffffffffffffffffffffffffffffffffffffff811681146130a157600080fd5b6000806040838503121561413157600080fd5b823561413c816140fc565b915060208301356004811061415057600080fd5b809150509250929050565b60006020828403121561416d57600080fd5b5035919050565b6000815180845260005b8181101561419a5760208185018101518683018201520161417e565b5060006020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b6020815260006130ba6020830184614174565b600080604083850312156141fe57600080fd5b823591506020830135614150816140fc565b6000806020838503121561422357600080fd5b823567ffffffffffffffff8082111561423b57600080fd5b818501915085601f83011261424f57600080fd5b81358181111561425e57600080fd5b8660208260051b850101111561427357600080fd5b60209290920196919550909350505050565b60006020828403121561429757600080fd5b81356130ba816140fc565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60208101600383106142e5576142e56142a2565b91905290565b60208101600283106142e5576142e56142a2565b803563ffffffff8116811461431357600080fd5b919050565b6000806040838503121561432b57600080fd5b82356002811061433a57600080fd5b9150614348602084016142ff565b90509250929050565b60008060006040848603121561436657600080fd5b8335614371816140fc565b9250602084013567ffffffffffffffff811115613e1757600080fd5b600080604083850312156143a057600080fd5b82356143ab816140fc565b91506020830135614150816140fc565b600080604083850312156143ce57600080fd5b82359150614348602084016142ff565b6020815261440560208201835173ffffffffffffffffffffffffffffffffffffffff169052565b6000602083015161441e604084018263ffffffff169052565b50604083015161014080606085015261443b610160850183614174565b9150606085015161445c60808601826bffffffffffffffffffffffff169052565b50608085015173ffffffffffffffffffffffffffffffffffffffff811660a08601525060a085015167ffffffffffffffff811660c08601525060c085015163ffffffff811660e08601525060e08501516101006144c8818701836bffffffffffffffffffffffff169052565b86015190506101206144dd8682018315159052565b8601518584037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0018387015290506118858382614174565b60208101600483106142e5576142e56142a2565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b80820180821115610a4d57610a4d614529565b81810381811115610a4d57610a4d614529565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361460d5761460d614529565b5060010190565b600181811c9082168061462857607f821691505b602082108103614661577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b601f8211156146b157600081815260208120601f850160051c8101602086101561468e5750805b601f850160051c820191505b818110156146ad5782815560010161469a565b5050505b505050565b67ffffffffffffffff8311156146ce576146ce61457e565b6146e2836146dc8354614614565b83614667565b6000601f84116001811461473457600085156146fe5750838201355b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b1c1916600186901b1783556147ca565b6000838152602090207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0861690835b828110156147835786850135825560209485019460019092019101614763565b50868210156147be577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b60208152816020820152818360408301376000818301604090810191909152601f9092017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0160101919050565b6000604082016040835280865480835260608501915087600052602092508260002060005b8281101561487557815473ffffffffffffffffffffffffffffffffffffffff1684529284019260019182019101614843565b505050838103828501528481528590820160005b868110156148c457823561489c816140fc565b73ffffffffffffffffffffffffffffffffffffffff1682529183019190830190600101614889565b50979650505050505050565b6bffffffffffffffffffffffff828116828216039080821115613d2e57613d2e614529565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60006bffffffffffffffffffffffff80841680614943576149436148f5565b92169190910492915050565b6bffffffffffffffffffffffff818116838216019080821115613d2e57613d2e614529565b60006020828403121561498657600080fd5b5051919050565b60006020828403121561499f57600080fd5b815180151581146130ba57600080fd5b6000602082840312156149c157600080fd5b81516130ba816140fc565b805169ffffffffffffffffffff8116811461431357600080fd5b600080600080600060a086880312156149fe57600080fd5b614a07866149cc565b9450602086015193506040860151925060608601519150614a2a608087016149cc565b90509295509295909350565b60ff8181168382160190811115610a4d57610a4d614529565b8082028115828204841417610a4d57610a4d614529565b60008060408385031215614a7957600080fd5b505080516020909101519092909150565b6bffffffffffffffffffffffff818116838216028082169190828114614ab257614ab2614529565b505092915050565b600082614ac957614ac96148f5565b500490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfea164736f6c6343000813000a", } @@ -696,8 +696,8 @@ func (_AutomationRegistryLogicB *AutomationRegistryLogicBCaller) GetState(opts * return *outstruct, err } - outstruct.State = *abi.ConvertType(out[0], new(AutomationRegistryBase22State)).(*AutomationRegistryBase22State) - outstruct.Config = *abi.ConvertType(out[1], new(AutomationRegistryBase22OnchainConfigLegacy)).(*AutomationRegistryBase22OnchainConfigLegacy) + outstruct.State = *abi.ConvertType(out[0], new(IAutomationV21PlusCommonStateLegacy)).(*IAutomationV21PlusCommonStateLegacy) + outstruct.Config = *abi.ConvertType(out[1], new(IAutomationV21PlusCommonOnchainConfigLegacy)).(*IAutomationV21PlusCommonOnchainConfigLegacy) outstruct.Signers = *abi.ConvertType(out[2], new([]common.Address)).(*[]common.Address) outstruct.Transmitters = *abi.ConvertType(out[3], new([]common.Address)).(*[]common.Address) outstruct.F = *abi.ConvertType(out[4], new(uint8)).(*uint8) @@ -817,25 +817,25 @@ func (_AutomationRegistryLogicB *AutomationRegistryLogicBCallerSession) GetTrigg return _AutomationRegistryLogicB.Contract.GetTriggerType(&_AutomationRegistryLogicB.CallOpts, upkeepId) } -func (_AutomationRegistryLogicB *AutomationRegistryLogicBCaller) GetUpkeep(opts *bind.CallOpts, id *big.Int) (AutomationRegistryBase22UpkeepInfo, error) { +func (_AutomationRegistryLogicB *AutomationRegistryLogicBCaller) GetUpkeep(opts *bind.CallOpts, id *big.Int) (IAutomationV21PlusCommonUpkeepInfoLegacy, error) { var out []interface{} err := _AutomationRegistryLogicB.contract.Call(opts, &out, "getUpkeep", id) if err != nil { - return *new(AutomationRegistryBase22UpkeepInfo), err + return *new(IAutomationV21PlusCommonUpkeepInfoLegacy), err } - out0 := *abi.ConvertType(out[0], new(AutomationRegistryBase22UpkeepInfo)).(*AutomationRegistryBase22UpkeepInfo) + out0 := *abi.ConvertType(out[0], new(IAutomationV21PlusCommonUpkeepInfoLegacy)).(*IAutomationV21PlusCommonUpkeepInfoLegacy) return out0, err } -func (_AutomationRegistryLogicB *AutomationRegistryLogicBSession) GetUpkeep(id *big.Int) (AutomationRegistryBase22UpkeepInfo, error) { +func (_AutomationRegistryLogicB *AutomationRegistryLogicBSession) GetUpkeep(id *big.Int) (IAutomationV21PlusCommonUpkeepInfoLegacy, error) { return _AutomationRegistryLogicB.Contract.GetUpkeep(&_AutomationRegistryLogicB.CallOpts, id) } -func (_AutomationRegistryLogicB *AutomationRegistryLogicBCallerSession) GetUpkeep(id *big.Int) (AutomationRegistryBase22UpkeepInfo, error) { +func (_AutomationRegistryLogicB *AutomationRegistryLogicBCallerSession) GetUpkeep(id *big.Int) (IAutomationV21PlusCommonUpkeepInfoLegacy, error) { return _AutomationRegistryLogicB.Contract.GetUpkeep(&_AutomationRegistryLogicB.CallOpts, id) } @@ -5402,8 +5402,8 @@ type GetSignerInfo struct { Index uint8 } type GetState struct { - State AutomationRegistryBase22State - Config AutomationRegistryBase22OnchainConfigLegacy + State IAutomationV21PlusCommonStateLegacy + Config IAutomationV21PlusCommonOnchainConfigLegacy Signers []common.Address Transmitters []common.Address F uint8 @@ -5679,7 +5679,7 @@ type AutomationRegistryLogicBInterface interface { GetTriggerType(opts *bind.CallOpts, upkeepId *big.Int) (uint8, error) - GetUpkeep(opts *bind.CallOpts, id *big.Int) (AutomationRegistryBase22UpkeepInfo, error) + GetUpkeep(opts *bind.CallOpts, id *big.Int) (IAutomationV21PlusCommonUpkeepInfoLegacy, error) GetUpkeepPrivilegeConfig(opts *bind.CallOpts, upkeepId *big.Int) ([]byte, error) diff --git a/core/gethwrappers/generated/automation_registry_logic_b_wrapper_2_3/automation_registry_logic_b_wrapper_2_3.go b/core/gethwrappers/generated/automation_registry_logic_b_wrapper_2_3/automation_registry_logic_b_wrapper_2_3.go index 2ce7932cae2..04c383ab70a 100644 --- a/core/gethwrappers/generated/automation_registry_logic_b_wrapper_2_3/automation_registry_logic_b_wrapper_2_3.go +++ b/core/gethwrappers/generated/automation_registry_logic_b_wrapper_2_3/automation_registry_logic_b_wrapper_2_3.go @@ -30,60 +30,24 @@ var ( _ = abi.ConvertType ) -type AutomationRegistryBase23OnchainConfigLegacy struct { - PaymentPremiumPPB uint32 - FlatFeeMicroLink uint32 - CheckGasLimit uint32 - StalenessSeconds *big.Int - GasCeilingMultiplier uint16 - MinUpkeepSpend *big.Int - MaxPerformGas uint32 - MaxCheckDataSize uint32 - MaxPerformDataSize uint32 - MaxRevertDataSize uint32 - FallbackGasPrice *big.Int - FallbackLinkPrice *big.Int - Transcoder common.Address - Registrars []common.Address - UpkeepPrivilegeManager common.Address -} - -type AutomationRegistryBase23State struct { - Nonce uint32 - OwnerLinkBalance *big.Int - ExpectedLinkBalance *big.Int - TotalPremium *big.Int - NumUpkeeps *big.Int - ConfigCount uint32 - LatestConfigBlockNumber uint32 - LatestConfigDigest [32]byte - LatestEpoch uint32 - Paused bool -} - -type AutomationRegistryBase23UpkeepInfo struct { - Target common.Address - PerformGas uint32 - CheckData []byte - Balance *big.Int - Admin common.Address - MaxValidBlocknumber uint64 - LastPerformedBlockNumber uint32 - AmountSpent *big.Int - Paused bool - OffchainConfig []byte +type AutomationRegistryBase23BillingConfig struct { + GasFeePPB uint32 + FlatFeeMicroLink *big.Int + PriceFeed common.Address + FallbackPrice *big.Int + MinSpend *big.Int } var AutomationRegistryLogicBMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"link\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"linkNativeFeed\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"fastGasFeed\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"automationForwarderLogic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"allowedReadOnlyAddress\",\"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\":[],\"name\":\"InvalidDataLength\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidPayee\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidRecipient\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidReport\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidSigner\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTransmitter\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTrigger\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTriggerType\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MaxCheckDataSizeCanOnlyIncrease\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MaxPerformDataSizeCanOnlyIncrease\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MigrationNotPermitted\",\"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\":\"OnlyPausedUpkeep\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlySimulatedBackend\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyUnpausedUpkeep\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ParameterLengthError\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PaymentGreaterThanAllLINK\",\"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\":\"UpkeepAlreadyExists\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UpkeepCancelled\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UpkeepNotCanceled\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UpkeepNotNeeded\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ValueNotChanged\",\"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\"},{\"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\":true,\"internalType\":\"bytes32\",\"name\":\"dedupKey\",\"type\":\"bytes32\"}],\"name\":\"DedupKeyAdded\",\"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\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"OwnerFundsWithdrawn\",\"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\":\"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\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"transmitter\",\"type\":\"address\"}],\"name\":\"acceptPayeeship\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"acceptUpkeepAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"startIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxCount\",\"type\":\"uint256\"}],\"name\":\"getActiveUpkeepIDs\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"}],\"name\":\"getAdminPrivilegeConfig\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAllowedReadOnlyAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAutomationForwarderLogic\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"getBalance\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"balance\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCancellationDelay\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getChainModule\",\"outputs\":[{\"internalType\":\"contractIChainModule\",\"name\":\"chainModule\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getConditionalGasOverhead\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getFastGasFeedAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepID\",\"type\":\"uint256\"}],\"name\":\"getForwarder\",\"outputs\":[{\"internalType\":\"contractIAutomationForwarder\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLinkAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLinkNativeFeedAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLogGasOverhead\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enumAutomationRegistryBase2_3.Trigger\",\"name\":\"triggerType\",\"type\":\"uint8\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"}],\"name\":\"getMaxPaymentForGas\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"maxPayment\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"getMinBalance\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"getMinBalanceForUpkeep\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"minBalance\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"peer\",\"type\":\"address\"}],\"name\":\"getPeerRegistryMigrationPermission\",\"outputs\":[{\"internalType\":\"enumAutomationRegistryBase2_3.MigrationPermission\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPerPerformByteGasOverhead\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPerSignerGasOverhead\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getReorgProtectionEnabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"reorgProtectionEnabled\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"query\",\"type\":\"address\"}],\"name\":\"getSignerInfo\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"active\",\"type\":\"bool\"},{\"internalType\":\"uint8\",\"name\":\"index\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getState\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"nonce\",\"type\":\"uint32\"},{\"internalType\":\"uint96\",\"name\":\"ownerLinkBalance\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"expectedLinkBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint96\",\"name\":\"totalPremium\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"numUpkeeps\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"configCount\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"latestConfigBlockNumber\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"latestConfigDigest\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"latestEpoch\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"}],\"internalType\":\"structAutomationRegistryBase2_3.State\",\"name\":\"state\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint32\",\"name\":\"paymentPremiumPPB\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"flatFeeMicroLink\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"checkGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint24\",\"name\":\"stalenessSeconds\",\"type\":\"uint24\"},{\"internalType\":\"uint16\",\"name\":\"gasCeilingMultiplier\",\"type\":\"uint16\"},{\"internalType\":\"uint96\",\"name\":\"minUpkeepSpend\",\"type\":\"uint96\"},{\"internalType\":\"uint32\",\"name\":\"maxPerformGas\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxCheckDataSize\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxPerformDataSize\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxRevertDataSize\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"fallbackGasPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fallbackLinkPrice\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"transcoder\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"registrars\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"upkeepPrivilegeManager\",\"type\":\"address\"}],\"internalType\":\"structAutomationRegistryBase2_3.OnchainConfigLegacy\",\"name\":\"config\",\"type\":\"tuple\"},{\"internalType\":\"address[]\",\"name\":\"signers\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"transmitters\",\"type\":\"address[]\"},{\"internalType\":\"uint8\",\"name\":\"f\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTransmitCalldataFixedBytesOverhead\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTransmitCalldataPerSignerBytesOverhead\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"query\",\"type\":\"address\"}],\"name\":\"getTransmitterInfo\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"active\",\"type\":\"bool\"},{\"internalType\":\"uint8\",\"name\":\"index\",\"type\":\"uint8\"},{\"internalType\":\"uint96\",\"name\":\"balance\",\"type\":\"uint96\"},{\"internalType\":\"uint96\",\"name\":\"lastCollected\",\"type\":\"uint96\"},{\"internalType\":\"address\",\"name\":\"payee\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"getTriggerType\",\"outputs\":[{\"internalType\":\"enumAutomationRegistryBase2_3.Trigger\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"getUpkeep\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"performGas\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"checkData\",\"type\":\"bytes\"},{\"internalType\":\"uint96\",\"name\":\"balance\",\"type\":\"uint96\"},{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"maxValidBlocknumber\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"lastPerformedBlockNumber\",\"type\":\"uint32\"},{\"internalType\":\"uint96\",\"name\":\"amountSpent\",\"type\":\"uint96\"},{\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"offchainConfig\",\"type\":\"bytes\"}],\"internalType\":\"structAutomationRegistryBase2_3.UpkeepInfo\",\"name\":\"upkeepInfo\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"getUpkeepPrivilegeConfig\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"getUpkeepTriggerConfig\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"dedupKey\",\"type\":\"bytes32\"}],\"name\":\"hasDedupKey\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"pauseUpkeep\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"recoverFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"newPrivilegeConfig\",\"type\":\"bytes\"}],\"name\":\"setAdminPrivilegeConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"payees\",\"type\":\"address[]\"}],\"name\":\"setPayees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"peer\",\"type\":\"address\"},{\"internalType\":\"enumAutomationRegistryBase2_3.MigrationPermission\",\"name\":\"permission\",\"type\":\"uint8\"}],\"name\":\"setPeerRegistryMigrationPermission\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"newCheckData\",\"type\":\"bytes\"}],\"name\":\"setUpkeepCheckData\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"}],\"name\":\"setUpkeepGasLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"}],\"name\":\"setUpkeepOffchainConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"newPrivilegeConfig\",\"type\":\"bytes\"}],\"name\":\"setUpkeepPrivilegeConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"transmitter\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"proposed\",\"type\":\"address\"}],\"name\":\"transferPayeeship\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"proposed\",\"type\":\"address\"}],\"name\":\"transferUpkeepAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"unpauseUpkeep\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"upkeepTranscoderVersion\",\"outputs\":[{\"internalType\":\"enumUpkeepFormat\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"upkeepVersion\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"withdrawFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"withdrawOwnerFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"withdrawPayment\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x6101206040523480156200001257600080fd5b5060405162004daf38038062004daf8339810160408190526200003591620001bf565b84848484843380600081620000915760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000c457620000c481620000f7565b5050506001600160a01b0394851660805292841660a05290831660c052821660e0521661010052506200022f9350505050565b336001600160a01b03821603620001515760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000088565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b80516001600160a01b0381168114620001ba57600080fd5b919050565b600080600080600060a08688031215620001d857600080fd5b620001e386620001a2565b9450620001f360208701620001a2565b93506200020360408701620001a2565b92506200021360608701620001a2565b91506200022360808701620001a2565b90509295509295909350565b60805160a05160c05160e05161010051614b0a620002a56000396000610715015260006105920152600081816105ff01526132df01526000818161077801526133b901526000818161080601528181611d490152818161201e015281816124870152818161299a0152612a1e0152614b0a6000f3fe608060405234801561001057600080fd5b50600436106103625760003560e01c80637d9b97e0116101c8578063b121e14711610104578063cd7f71b5116100a2578063ed56b3e11161007c578063ed56b3e114610863578063f2fde38b146108d6578063f777ff06146108e9578063faa3e996146108f057600080fd5b8063cd7f71b51461082a578063d76326481461083d578063eb5dcd6c1461085057600080fd5b8063b657bc9c116100de578063b657bc9c146107c9578063b79550be146107dc578063c7c3a19a146107e4578063ca30e6031461080457600080fd5b8063b121e1471461079c578063b148ab6b146107af578063b6511a2a146107c257600080fd5b80639e0a99ed11610171578063a72aa27e1161014b578063a72aa27e1461074c578063aab9edd61461075f578063abc76ae01461076e578063b10b673c1461077657600080fd5b80639e0a99ed1461070b578063a08714c014610713578063a710b2211461073957600080fd5b80638da5cb5b116101a25780638da5cb5b146106b75780638dcf0fe7146106d55780638ed02bab146106e857600080fd5b80637d9b97e0146106945780638456cb591461069c5780638765ecbe146106a457600080fd5b806343cc055c116102a25780635b6aa71c11610240578063671d36ed1161021a578063671d36ed14610623578063744bfe611461063657806379ba50971461064957806379ea99431461065157600080fd5b80635b6aa71c146105d75780636209e1e9146105ea5780636709d0e5146105fd57600080fd5b80634ca16c521161027c5780634ca16c52146105555780635147cd591461055d5780635165f2f51461057d5780635425d8ac1461059057600080fd5b806343cc055c1461050c57806344cb70b81461052357806348013d7b1461054657600080fd5b80631a2af0111161030f578063232c1cc5116102e9578063232c1cc5146104845780633b9cce591461048b5780633f4ba83a1461049e578063421d183b146104a657600080fd5b80631a2af011146104005780631e01043914610413578063207b65161461047157600080fd5b80631865c57d116103405780631865c57d146103b4578063187256e8146103cd57806319d97a94146103e057600080fd5b8063050ee65d1461036757806306e3b6321461037f5780630b7d33e61461039f575b600080fd5b62014c085b6040519081526020015b60405180910390f35b61039261038d366004613d35565b610936565b6040516103769190613d57565b6103b26103ad366004613de4565b610a53565b005b6103bc610b0d565b604051610376959493929190613fe7565b6103b26103db36600461411e565b610f57565b6103f36103ee36600461415b565b610fc8565b60405161037691906141d8565b6103b261040e3660046141eb565b61106a565b61045461042136600461415b565b6000908152600460205260409020600101546c0100000000000000000000000090046bffffffffffffffffffffffff1690565b6040516bffffffffffffffffffffffff9091168152602001610376565b6103f361047f36600461415b565b611170565b601861036c565b6103b2610499366004614210565b61118d565b6103b26113e3565b6104b96104b4366004614285565b611449565b60408051951515865260ff90941660208601526bffffffffffffffffffffffff9283169385019390935216606083015273ffffffffffffffffffffffffffffffffffffffff16608082015260a001610376565b60135460ff165b6040519015158152602001610376565b61051361053136600461415b565b60009081526008602052604090205460ff1690565b600060405161037691906142d1565b61ea6061036c565b61057061056b36600461415b565b611568565b60405161037691906142eb565b6103b261058b36600461415b565b611573565b7f00000000000000000000000000000000000000000000000000000000000000005b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610376565b6104546105e5366004614318565b6116ea565b6103f36105f8366004614285565b61188f565b7f00000000000000000000000000000000000000000000000000000000000000006105b2565b6103b2610631366004614351565b6118c3565b6103b26106443660046141eb565b61199d565b6103b2611e44565b6105b261065f36600461415b565b6000908152600460205260409020546901000000000000000000900473ffffffffffffffffffffffffffffffffffffffff1690565b6103b2611f46565b6103b26120a1565b6103b26106b236600461415b565b612122565b60005473ffffffffffffffffffffffffffffffffffffffff166105b2565b6103b26106e3366004613de4565b61229c565b601354610100900473ffffffffffffffffffffffffffffffffffffffff166105b2565b6103a461036c565b7f00000000000000000000000000000000000000000000000000000000000000006105b2565b6103b261074736600461438d565b6122f1565b6103b261075a3660046143bb565b612559565b60405160038152602001610376565b6115e061036c565b7f00000000000000000000000000000000000000000000000000000000000000006105b2565b6103b26107aa366004614285565b61264e565b6103b26107bd36600461415b565b612746565b603261036c565b6104546107d736600461415b565b612934565b6103b2612961565b6107f76107f236600461415b565b612abd565b60405161037691906143de565b7f00000000000000000000000000000000000000000000000000000000000000006105b2565b6103b2610838366004613de4565b612e90565b61045461084b36600461415b565b612f27565b6103b261085e36600461438d565b612f32565b6108bd610871366004614285565b73ffffffffffffffffffffffffffffffffffffffff166000908152600c602090815260409182902082518084019093525460ff8082161515808552610100909204169290910182905291565b60408051921515835260ff909116602083015201610376565b6103b26108e4366004614285565b613090565b604061036c565b6109296108fe366004614285565b73ffffffffffffffffffffffffffffffffffffffff166000908152601a602052604090205460ff1690565b6040516103769190614515565b6060600061094460026130a4565b905080841061097f576040517f1390f2a100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061098b8486614558565b905081811180610999575083155b6109a357806109a5565b815b905060006109b3868361456b565b67ffffffffffffffff8111156109cb576109cb61457e565b6040519080825280602002602001820160405280156109f4578160200160208202803683370190505b50905060005b8151811015610a4757610a18610a108883614558565b6002906130ae565b828281518110610a2a57610a2a6145ad565b602090810291909101015280610a3f816145dc565b9150506109fa565b50925050505b92915050565b6016546c01000000000000000000000000900473ffffffffffffffffffffffffffffffffffffffff163314610ab4576040517f77c3599200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000838152601d60205260409020610acd8284836146b6565b50827f2fd8d70753a007014349d4591843cc031c2dd7a260d7dd82eca8253686ae77698383604051610b009291906147d1565b60405180910390a2505050565b6040805161014081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e081018290526101008101829052610120810191909152604080516101e08101825260008082526020820181905291810182905260608082018390526080820183905260a0820183905260c0820183905260e08201839052610100820183905261012082018390526101408201839052610160820183905261018082018390526101a08201526101c0810191909152604080516101408101825260155463ffffffff7401000000000000000000000000000000000000000082041682526bffffffffffffffffffffffff90811660208301526019549282019290925260125490911660608281019190915290819060009060808101610c4660026130a4565b8152601554780100000000000000000000000000000000000000000000000080820463ffffffff9081166020808601919091527c01000000000000000000000000000000000000000000000000000000008404821660408087019190915260115460608088019190915260125474010000000000000000000000000000000000000000810485166080808a01919091527e01000000000000000000000000000000000000000000000000000000000000820460ff16151560a0998a015283516101e0810185526c0100000000000000000000000080840488168252700100000000000000000000000000000000808504891697830197909752808a0488169582019590955296820462ffffff16928701929092527b01000000000000000000000000000000000000000000000000000000900461ffff16908501526014546bffffffffffffffffffffffff8116968501969096529304811660c083015260165480821660e08401526401000000008104821661010084015268010000000000000000900416610120820152601754610140820152601854610160820152910473ffffffffffffffffffffffffffffffffffffffff166101808201529095506101a08101610e1360096130c1565b81526016546c01000000000000000000000000900473ffffffffffffffffffffffffffffffffffffffff16602091820152601254600d80546040805182860281018601909152818152949850899489949293600e937d01000000000000000000000000000000000000000000000000000000000090910460ff16928591830182828015610ed657602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311610eab575b5050505050925081805480602002602001604051908101604052809291908181526020018280548015610f3f57602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311610f14575b50505050509150945094509450945094509091929394565b610f5f6130ce565b73ffffffffffffffffffffffffffffffffffffffff82166000908152601a6020526040902080548291907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001836003811115610fbf57610fbf6142a2565b02179055505050565b6000818152601d60205260409020805460609190610fe590614614565b80601f016020809104026020016040519081016040528092919081815260200182805461101190614614565b801561105e5780601f106110335761010080835404028352916020019161105e565b820191906000526020600020905b81548152906001019060200180831161104157829003601f168201915b50505050509050919050565b61107382613151565b3373ffffffffffffffffffffffffffffffffffffffff8216036110c2576040517f8c8728c700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526006602052604090205473ffffffffffffffffffffffffffffffffffffffff82811691161461116c5760008281526006602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff851690811790915590519091339185917fb1cbb2c4b8480034c27e06da5f096b8233a8fd4497028593a41ff6df79726b3591a45b5050565b6000818152601b60205260409020805460609190610fe590614614565b6111956130ce565b600e5481146111d0576040517fcf54c06a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b600e548110156113a2576000600e82815481106111f2576111f26145ad565b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff908116808452600f9092526040832054919350169085858581811061123c5761123c6145ad565b90506020020160208101906112519190614285565b905073ffffffffffffffffffffffffffffffffffffffff811615806112e4575073ffffffffffffffffffffffffffffffffffffffff8216158015906112c257508073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156112e4575073ffffffffffffffffffffffffffffffffffffffff81811614155b1561131b576040517fb387a23800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8181161461138c5773ffffffffffffffffffffffffffffffffffffffff8381166000908152600f6020526040902080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169183169190911790555b505050808061139a906145dc565b9150506111d3565b507fa46de38886467c59be07a0675f14781206a5477d871628af46c2443822fcb725600e83836040516113d79392919061481e565b60405180910390a15050565b6113eb6130ce565b601280547fff00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1690556040513381527f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa906020015b60405180910390a1565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600b602090815260408083208151608081018352905460ff80821615801584526101008304909116948301949094526bffffffffffffffffffffffff6201000082048116938301939093526e01000000000000000000000000000090049091166060820152829182918291829190829061150f5760608201516012546000916114fb916bffffffffffffffffffffffff166148d0565b600e5490915061150b9082614924565b9150505b81516020830151604084015161152690849061494f565b6060949094015173ffffffffffffffffffffffffffffffffffffffff9a8b166000908152600f6020526040902054929b919a9499509750921694509092505050565b6000610a4d82613205565b61157c81613151565b600081815260046020908152604091829020825160e081018452815460ff8116151580835263ffffffff610100830481169584019590955265010000000000820485169583019590955273ffffffffffffffffffffffffffffffffffffffff69010000000000000000009091041660608201526001909101546bffffffffffffffffffffffff80821660808401526c0100000000000000000000000082041660a08301527801000000000000000000000000000000000000000000000000900490911660c08201529061167b576040517f1b88a78400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082815260046020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690556116ba6002836132b0565b5060405182907f7bada562044eb163f6b4003c4553e4e62825344c0418eea087bed5ee05a4745690600090a25050565b60408051610160810182526012546bffffffffffffffffffffffff8116825263ffffffff6c010000000000000000000000008204811660208401527001000000000000000000000000000000008204811693830193909352740100000000000000000000000000000000000000008104909216606082015262ffffff7801000000000000000000000000000000000000000000000000830416608082015261ffff7b0100000000000000000000000000000000000000000000000000000083041660a082015260ff7d0100000000000000000000000000000000000000000000000000000000008304811660c08301527e0100000000000000000000000000000000000000000000000000000000000083048116151560e08301527f01000000000000000000000000000000000000000000000000000000000000009092048216151561010080830191909152601354928316151561012083015273ffffffffffffffffffffffffffffffffffffffff9204919091166101408201526000908180611874836132bc565b91509150611885838787858561349a565b9695505050505050565b73ffffffffffffffffffffffffffffffffffffffff81166000908152601e60205260409020805460609190610fe590614614565b6016546c01000000000000000000000000900473ffffffffffffffffffffffffffffffffffffffff163314611924576040517f77c3599200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff83166000908152601e602052604090206119548284836146b6565b508273ffffffffffffffffffffffffffffffffffffffff167f7c44b4eb59ee7873514e7e43e7718c269d872965938b288aa143befca62f99d28383604051610b009291906147d1565b6012547f0100000000000000000000000000000000000000000000000000000000000000900460ff16156119fd576040517f37ed32e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b601280547effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f010000000000000000000000000000000000000000000000000000000000000017905573ffffffffffffffffffffffffffffffffffffffff8116611a93576040517f9c8d2cd200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000828152600460209081526040808320815160e081018352815460ff81161515825263ffffffff610100820481168387015265010000000000820481168386015273ffffffffffffffffffffffffffffffffffffffff6901000000000000000000909204821660608401526001909301546bffffffffffffffffffffffff80821660808501526c0100000000000000000000000082041660a08401527801000000000000000000000000000000000000000000000000900490921660c082015286855260059093529220549091163314611b9a576040517fa47c170600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b601260010160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166357e871e76040518163ffffffff1660e01b8152600401602060405180830381865afa158015611c0a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c2e9190614974565b816040015163ffffffff161115611c71576040517fff84e5dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000838152600460205260409020600101546019546c010000000000000000000000009091046bffffffffffffffffffffffff1690611cb190829061456b565b60195560008481526004602081905260409182902060010180547fffffffffffffffff000000000000000000000000ffffffffffffffffffffffff16905590517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff858116928201929092526bffffffffffffffffffffffff831660248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016020604051808303816000875af1158015611d94573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611db8919061498d565b50604080516bffffffffffffffffffffffff8316815273ffffffffffffffffffffffffffffffffffffffff8516602082015285917ff3b5906e5672f3e524854103bcafbbdba80dbdfeca2c35e116127b1060a68318910160405180910390a25050601280547effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1690555050565b60015473ffffffffffffffffffffffffffffffffffffffff163314611eca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e65720000000000000000000060448201526064015b60405180910390fd5b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b611f4e6130ce565b6015546019546bffffffffffffffffffffffff90911690611f7090829061456b565b601955601580547fffffffffffffffffffffffffffffffffffffffff0000000000000000000000001690556040516bffffffffffffffffffffffff821681527f1d07d0b0be43d3e5fee41a80b579af370affee03fa595bf56d5d4c19328162f19060200160405180910390a16040517fa9059cbb0000000000000000000000000000000000000000000000000000000081523360048201526bffffffffffffffffffffffff821660248201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063a9059cbb906044015b6020604051808303816000875af115801561207d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061116c919061498d565b6120a96130ce565b601280547fff00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167e010000000000000000000000000000000000000000000000000000000000001790556040513381527f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2589060200161143f565b61212b81613151565b600081815260046020908152604091829020825160e081018452815460ff8116158015835263ffffffff610100830481169584019590955265010000000000820485169583019590955273ffffffffffffffffffffffffffffffffffffffff69010000000000000000009091041660608201526001909101546bffffffffffffffffffffffff80821660808401526c0100000000000000000000000082041660a08301527801000000000000000000000000000000000000000000000000900490911660c08201529061222a576040517f514b6c2400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082815260046020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905561226c600283613722565b5060405182907f8ab10247ce168c27748e656ecf852b951fcaac790c18106b19aa0ae57a8b741f90600090a25050565b6122a583613151565b6000838152601c602052604090206122be8284836146b6565b50827f3e8740446213c8a77d40e08f79136ce3f347d13ed270a6ebdf57159e0faf48508383604051610b009291906147d1565b73ffffffffffffffffffffffffffffffffffffffff811661233e576040517f9c8d2cd200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8281166000908152600f602052604090205416331461239e576040517fcebf515b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b601254600e546000916123c19185916bffffffffffffffffffffffff169061372e565b73ffffffffffffffffffffffffffffffffffffffff84166000908152600b6020526040902080547fffffffffffffffffffffffffffffffffffff000000000000000000000000ffff16905560195490915061242b906bffffffffffffffffffffffff83169061456b565b6019556040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83811660048301526bffffffffffffffffffffffff831660248301527f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb906044016020604051808303816000875af11580156124d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124f4919061498d565b5060405133815273ffffffffffffffffffffffffffffffffffffffff808416916bffffffffffffffffffffffff8416918616907f9819093176a1851202c7bcfa46845809b4e47c261866550e94ed3775d2f406989060200160405180910390a4505050565b6108fc8163ffffffff16108061258e575060155463ffffffff7001000000000000000000000000000000009091048116908216115b156125c5576040517f14c237fb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6125ce82613151565b60008281526004602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000ff1661010063ffffffff861690810291909117909155915191825283917fc24c07e655ce79fba8a589778987d3c015bc6af1632bb20cf9182e02a65d972c910160405180910390a25050565b73ffffffffffffffffffffffffffffffffffffffff8181166000908152601060205260409020541633146126ae576040517f6752e7aa00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8181166000818152600f602090815260408083208054337fffffffffffffffffffffffff000000000000000000000000000000000000000080831682179093556010909452828520805490921690915590519416939092849290917f78af32efdcad432315431e9b03d27e6cd98fb79c405fdc5af7c1714d9c0f75b39190a45050565b600081815260046020908152604091829020825160e081018452815460ff81161515825263ffffffff6101008204811694830194909452650100000000008104841694820185905273ffffffffffffffffffffffffffffffffffffffff69010000000000000000009091041660608201526001909101546bffffffffffffffffffffffff80821660808401526c0100000000000000000000000082041660a083015278010000000000000000000000000000000000000000000000009004821660c08201529114612843576040517f9c0083a200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526006602052604090205473ffffffffffffffffffffffffffffffffffffffff1633146128a0576040517f6352a85300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526005602090815260408083208054337fffffffffffffffffffffffff0000000000000000000000000000000000000000808316821790935560069094528285208054909216909155905173ffffffffffffffffffffffffffffffffffffffff90911692839186917f5cff4db96bef051785e999f44bfcd21c18823e034fb92dd376e3db4ce0feeb2c91a4505050565b6000610a4d61294283613205565b600084815260046020526040902054610100900463ffffffff166116ea565b6129696130ce565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906370a0823190602401602060405180830381865afa1580156129f6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a1a9190614974565b90507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb3360195484612a67919061456b565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815273ffffffffffffffffffffffffffffffffffffffff9092166004830152602482015260440161205e565b604080516101408101825260008082526020820181905260609282018390528282018190526080820181905260a0820181905260c0820181905260e082018190526101008201526101208101919091526000828152600460209081526040808320815160e081018352815460ff811615158252610100810463ffffffff90811695830195909552650100000000008104851693820193909352690100000000000000000090920473ffffffffffffffffffffffffffffffffffffffff16606083018190526001909101546bffffffffffffffffffffffff80821660808501526c0100000000000000000000000082041660a08401527801000000000000000000000000000000000000000000000000900490921660c0820152919015612c5557816060015173ffffffffffffffffffffffffffffffffffffffff1663f00e6a2a6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612c2c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c5091906149af565b612c58565b60005b90506040518061014001604052808273ffffffffffffffffffffffffffffffffffffffff168152602001836020015163ffffffff168152602001600760008781526020019081526020016000208054612cb090614614565b80601f0160208091040260200160405190810160405280929190818152602001828054612cdc90614614565b8015612d295780601f10612cfe57610100808354040283529160200191612d29565b820191906000526020600020905b815481529060010190602001808311612d0c57829003601f168201915b505050505081526020018360a001516bffffffffffffffffffffffff1681526020016005600087815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001836040015163ffffffff1667ffffffffffffffff1681526020018360c0015163ffffffff16815260200183608001516bffffffffffffffffffffffff168152602001836000015115158152602001601c60008781526020019081526020016000208054612e0690614614565b80601f0160208091040260200160405190810160405280929190818152602001828054612e3290614614565b8015612e7f5780601f10612e5457610100808354040283529160200191612e7f565b820191906000526020600020905b815481529060010190602001808311612e6257829003601f168201915b505050505081525092505050919050565b612e9983613151565b60165463ffffffff16811115612edb576040517fae7235df00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000838152600760205260409020612ef48284836146b6565b50827fcba2d5723b2ee59e53a8e8a82a4a7caf4fdfe70e9f7c582950bf7e7a5c24e83d8383604051610b009291906147d1565b6000610a4d82612934565b73ffffffffffffffffffffffffffffffffffffffff8281166000908152600f6020526040902054163314612f92576040517fcebf515b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff821603612fe1576040517f8c8728c700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff82811660009081526010602052604090205481169082161461116c5773ffffffffffffffffffffffffffffffffffffffff82811660008181526010602052604080822080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169486169485179055513392917f84f7c7c80bb8ed2279b4aab5f61cd05e6374073d38f46d7f32de8c30e9e3836791a45050565b6130986130ce565b6130a181613936565b50565b6000610a4d825490565b60006130ba8383613a2b565b9392505050565b606060006130ba83613a55565b60005473ffffffffffffffffffffffffffffffffffffffff16331461314f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e6572000000000000000000006044820152606401611ec1565b565b60008181526005602052604090205473ffffffffffffffffffffffffffffffffffffffff1633146131ae576040517fa47c170600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008181526004602052604090205465010000000000900463ffffffff908116146130a1576040517f9c0083a200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000818160045b600f811015613292577fff00000000000000000000000000000000000000000000000000000000000000821683826020811061324a5761324a6145ad565b1a60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161461328057506000949350505050565b8061328a816145dc565b91505061320c565b5081600f1a60018111156132a8576132a86142a2565b949350505050565b60006130ba8383613ab0565b6000806000836080015162ffffff1690506000808263ffffffff161190506000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015613348573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061336c91906149e6565b509450909250505060008113158061338357508142105b806133a457508280156133a4575061339b824261456b565b8463ffffffff16105b156133b35760175495506133b7565b8095505b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015613422573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061344691906149e6565b509450909250505060008113158061345d57508142105b8061347e575082801561347e5750613475824261456b565b8463ffffffff16105b1561348d576018549450613491565b8094505b50505050915091565b600080808660018111156134b0576134b06142a2565b036134be575061ea60613513565b60018660018111156134d2576134d26142a2565b036134e1575062014c08613513565b6040517ff2b2d41200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008760c0015160016135269190614a36565b6135349060ff166040614a4f565b601654613552906103a490640100000000900463ffffffff16614558565b61355c9190614558565b601354604080517fde9ee35e00000000000000000000000000000000000000000000000000000000815281519394506000938493610100900473ffffffffffffffffffffffffffffffffffffffff169263de9ee35e92600480820193918290030181865afa1580156135d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906135f69190614a66565b90925090508183613608836018614558565b6136129190614a4f565b60c08c0151613622906001614a36565b6136319060ff166115e0614a4f565b61363b9190614558565b6136459190614558565b61364f9085614558565b935060008a610140015173ffffffffffffffffffffffffffffffffffffffff166312544140856040518263ffffffff1660e01b815260040161369391815260200190565b602060405180830381865afa1580156136b0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906136d49190614974565b8b60a0015161ffff166136e79190614a4f565b90506000806137028d8c63ffffffff1689868e8e6000613aff565b9092509050613711818361494f565b9d9c50505050505050505050505050565b60006130ba8383613c3b565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600b602090815260408083208151608081018352905460ff80821615801584526101008304909116948301949094526bffffffffffffffffffffffff6201000082048116938301939093526e010000000000000000000000000000900490911660608201529061392a5760008160600151856137c691906148d0565b905060006137d48583614924565b905080836040018181516137e8919061494f565b6bffffffffffffffffffffffff169052506138038582614a8a565b83606001818151613814919061494f565b6bffffffffffffffffffffffff90811690915273ffffffffffffffffffffffffffffffffffffffff89166000908152600b602090815260409182902087518154928901519389015160608a015186166e010000000000000000000000000000027fffffffffffff000000000000000000000000ffffffffffffffffffffffffffff919096166201000002167fffffffffffff000000000000000000000000000000000000000000000000ffff60ff95909516610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff921515929092167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000909416939093171792909216179190911790555050505b60400151949350505050565b3373ffffffffffffffffffffffffffffffffffffffff8216036139b5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401611ec1565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6000826000018281548110613a4257613a426145ad565b9060005260206000200154905092915050565b60608160000180548060200260200160405190810160405280929190818152602001828054801561105e57602002820191906000526020600020905b815481526020019060010190808311613a915750505050509050919050565b6000818152600183016020526040812054613af757508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610a4d565b506000610a4d565b60008060008960a0015161ffff1686613b189190614a4f565b9050838015613b265750803a105b15613b2e57503a5b60008588613b3c8b8d614558565b613b469085614a4f565b613b509190614558565b613b6290670de0b6b3a7640000614a4f565b613b6c9190614aba565b905060008b6040015163ffffffff1664e8d4a51000613b8b9190614a4f565b60208d0151889063ffffffff168b613ba38f88614a4f565b613bad9190614558565b613bbb90633b9aca00614a4f565b613bc59190614a4f565b613bcf9190614aba565b613bd99190614558565b90506b033b2e3c9fd0803ce8000000613bf28284614558565b1115613c2a576040517f2ad7547a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b909b909a5098505050505050505050565b60008181526001830160205260408120548015613d24576000613c5f60018361456b565b8554909150600090613c739060019061456b565b9050818114613cd8576000866000018281548110613c9357613c936145ad565b9060005260206000200154905080876000018481548110613cb657613cb66145ad565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080613ce957613ce9614ace565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610a4d565b6000915050610a4d565b5092915050565b60008060408385031215613d4857600080fd5b50508035926020909101359150565b6020808252825182820181905260009190848201906040850190845b81811015613d8f57835183529284019291840191600101613d73565b50909695505050505050565b60008083601f840112613dad57600080fd5b50813567ffffffffffffffff811115613dc557600080fd5b602083019150836020828501011115613ddd57600080fd5b9250929050565b600080600060408486031215613df957600080fd5b83359250602084013567ffffffffffffffff811115613e1757600080fd5b613e2386828701613d9b565b9497909650939450505050565b600081518084526020808501945080840160005b83811015613e7657815173ffffffffffffffffffffffffffffffffffffffff1687529582019590820190600101613e44565b509495945050505050565b805163ffffffff16825260006101e06020830151613ea7602086018263ffffffff169052565b506040830151613ebf604086018263ffffffff169052565b506060830151613ed6606086018262ffffff169052565b506080830151613eec608086018261ffff169052565b5060a0830151613f0c60a08601826bffffffffffffffffffffffff169052565b5060c0830151613f2460c086018263ffffffff169052565b5060e0830151613f3c60e086018263ffffffff169052565b506101008381015163ffffffff908116918601919091526101208085015190911690850152610140808401519085015261016080840151908501526101808084015173ffffffffffffffffffffffffffffffffffffffff16908501526101a080840151818601839052613fb183870182613e30565b925050506101c080840151613fdd8287018273ffffffffffffffffffffffffffffffffffffffff169052565b5090949350505050565b855163ffffffff16815260006101c0602088015161401560208501826bffffffffffffffffffffffff169052565b5060408801516040840152606088015161403f60608501826bffffffffffffffffffffffff169052565b506080880151608084015260a088015161406160a085018263ffffffff169052565b5060c088015161407960c085018263ffffffff169052565b5060e088015160e08401526101008089015161409c8286018263ffffffff169052565b50506101208881015115159084015261014083018190526140bf81840188613e81565b90508281036101608401526140d48187613e30565b90508281036101808401526140e98186613e30565b9150506118856101a083018460ff169052565b73ffffffffffffffffffffffffffffffffffffffff811681146130a157600080fd5b6000806040838503121561413157600080fd5b823561413c816140fc565b915060208301356004811061415057600080fd5b809150509250929050565b60006020828403121561416d57600080fd5b5035919050565b6000815180845260005b8181101561419a5760208185018101518683018201520161417e565b5060006020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b6020815260006130ba6020830184614174565b600080604083850312156141fe57600080fd5b823591506020830135614150816140fc565b6000806020838503121561422357600080fd5b823567ffffffffffffffff8082111561423b57600080fd5b818501915085601f83011261424f57600080fd5b81358181111561425e57600080fd5b8660208260051b850101111561427357600080fd5b60209290920196919550909350505050565b60006020828403121561429757600080fd5b81356130ba816140fc565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60208101600383106142e5576142e56142a2565b91905290565b60208101600283106142e5576142e56142a2565b803563ffffffff8116811461431357600080fd5b919050565b6000806040838503121561432b57600080fd5b82356002811061433a57600080fd5b9150614348602084016142ff565b90509250929050565b60008060006040848603121561436657600080fd5b8335614371816140fc565b9250602084013567ffffffffffffffff811115613e1757600080fd5b600080604083850312156143a057600080fd5b82356143ab816140fc565b91506020830135614150816140fc565b600080604083850312156143ce57600080fd5b82359150614348602084016142ff565b6020815261440560208201835173ffffffffffffffffffffffffffffffffffffffff169052565b6000602083015161441e604084018263ffffffff169052565b50604083015161014080606085015261443b610160850183614174565b9150606085015161445c60808601826bffffffffffffffffffffffff169052565b50608085015173ffffffffffffffffffffffffffffffffffffffff811660a08601525060a085015167ffffffffffffffff811660c08601525060c085015163ffffffff811660e08601525060e08501516101006144c8818701836bffffffffffffffffffffffff169052565b86015190506101206144dd8682018315159052565b8601518584037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0018387015290506118858382614174565b60208101600483106142e5576142e56142a2565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b80820180821115610a4d57610a4d614529565b81810381811115610a4d57610a4d614529565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361460d5761460d614529565b5060010190565b600181811c9082168061462857607f821691505b602082108103614661577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b601f8211156146b157600081815260208120601f850160051c8101602086101561468e5750805b601f850160051c820191505b818110156146ad5782815560010161469a565b5050505b505050565b67ffffffffffffffff8311156146ce576146ce61457e565b6146e2836146dc8354614614565b83614667565b6000601f84116001811461473457600085156146fe5750838201355b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b1c1916600186901b1783556147ca565b6000838152602090207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0861690835b828110156147835786850135825560209485019460019092019101614763565b50868210156147be577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b60208152816020820152818360408301376000818301604090810191909152601f9092017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0160101919050565b6000604082016040835280865480835260608501915087600052602092508260002060005b8281101561487557815473ffffffffffffffffffffffffffffffffffffffff1684529284019260019182019101614843565b505050838103828501528481528590820160005b868110156148c457823561489c816140fc565b73ffffffffffffffffffffffffffffffffffffffff1682529183019190830190600101614889565b50979650505050505050565b6bffffffffffffffffffffffff828116828216039080821115613d2e57613d2e614529565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60006bffffffffffffffffffffffff80841680614943576149436148f5565b92169190910492915050565b6bffffffffffffffffffffffff818116838216019080821115613d2e57613d2e614529565b60006020828403121561498657600080fd5b5051919050565b60006020828403121561499f57600080fd5b815180151581146130ba57600080fd5b6000602082840312156149c157600080fd5b81516130ba816140fc565b805169ffffffffffffffffffff8116811461431357600080fd5b600080600080600060a086880312156149fe57600080fd5b614a07866149cc565b9450602086015193506040860151925060608601519150614a2a608087016149cc565b90509295509295909350565b60ff8181168382160190811115610a4d57610a4d614529565b8082028115828204841417610a4d57610a4d614529565b60008060408385031215614a7957600080fd5b505080516020909101519092909150565b6bffffffffffffffffffffffff818116838216028082169190828114614ab257614ab2614529565b505092915050565b600082614ac957614ac96148f5565b500490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfea164736f6c6343000813000a", + ABI: "[{\"inputs\":[{\"internalType\":\"contractAutomationRegistryLogicC2_3\",\"name\":\"logicC\",\"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\":\"InvalidBillingToken\",\"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\":\"InvalidTransmitter\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTrigger\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTriggerType\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MigrationNotPermitted\",\"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\":\"contractIERC20\",\"name\":\"token\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint32\",\"name\":\"gasFeePPB\",\"type\":\"uint32\"},{\"internalType\":\"uint24\",\"name\":\"flatFeeMicroLink\",\"type\":\"uint24\"},{\"internalType\":\"contractAggregatorV3Interface\",\"name\":\"priceFeed\",\"type\":\"address\"},{\"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\":true,\"internalType\":\"bytes32\",\"name\":\"dedupKey\",\"type\":\"bytes32\"}],\"name\":\"DedupKeyAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"assetAddress\",\"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\":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\":\"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\":\"nonpayable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"acceptUpkeepAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"fallbackTo\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"linkAvailableForPayment\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"pauseUpkeep\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"newCheckData\",\"type\":\"bytes\"}],\"name\":\"setUpkeepCheckData\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"}],\"name\":\"setUpkeepGasLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"}],\"name\":\"setUpkeepOffchainConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"triggerConfig\",\"type\":\"bytes\"}],\"name\":\"setUpkeepTriggerConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"proposed\",\"type\":\"address\"}],\"name\":\"transferUpkeepAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"unpauseUpkeep\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"assetAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdrawERC20Fees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"withdrawFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdrawLinkFees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Bin: "0x6101606040523480156200001257600080fd5b506040516200248e3803806200248e833981016040819052620000359162000520565b80816001600160a01b031663ca30e6036040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000075573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200009b919062000520565b826001600160a01b031663226cf83c6040518163ffffffff1660e01b8152600401602060405180830381865afa158015620000da573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000100919062000520565b836001600160a01b031663614486af6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156200013f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000165919062000520565b846001600160a01b0316636709d0e56040518163ffffffff1660e01b8152600401602060405180830381865afa158015620001a4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001ca919062000520565b856001600160a01b0316635425d8ac6040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000209573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200022f919062000520565b866001600160a01b031663a08714c06040518163ffffffff1660e01b8152600401602060405180830381865afa1580156200026e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000294919062000520565b3380600081620002eb5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b03848116919091179091558116156200031e576200031e816200045c565b5050506001600160a01b0380871660805285811660a05284811660c081905284821660e05283821661010052908216610120526040805163313ce56760e01b8152905163313ce567916004808201926020929091908290030181865afa1580156200038d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620003b3919062000547565b60ff1660a0516001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015620003f7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200041d919062000547565b60ff16146200043f576040516301f86e1760e41b815260040160405180910390fd5b5050506001600160a01b0390931661014052506200056c92505050565b336001600160a01b03821603620004b65760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401620002e2565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6001600160a01b03811681146200051d57600080fd5b50565b6000602082840312156200053357600080fd5b8151620005408162000507565b9392505050565b6000602082840312156200055a57600080fd5b815160ff811681146200054057600080fd5b60805160a05160c05160e051610100516101205161014051611ec1620005cd60003960008181610102015261015c0152600050506000505060005050600050506000505060008181610e5801528181610f02015261153c0152611ec16000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c80638765ecbe11610097578063b148ab6b11610066578063b148ab6b14610264578063cd7f71b514610277578063d09dc3391461028a578063f2fde38b146102a057610100565b80638765ecbe1461020d5780638da5cb5b146102205780638dcf0fe71461023e578063a72aa27e1461025157610100565b806368d369d8116100d357806368d369d8146101cc578063744bfe61146101df57806379ba5097146101f25780638081fadb146101fa57610100565b80631a2af01114610147578063349e8cca1461015a5780634ee88d35146101a65780635165f2f5146101b9575b7f00000000000000000000000000000000000000000000000000000000000000003660008037600080366000845af43d6000803e808015610140573d6000f35b3d6000fd5b005b610145610155366004611a26565b6102b3565b7f00000000000000000000000000000000000000000000000000000000000000005b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b6101456101b4366004611a52565b6103b9565b6101456101c7366004611ace565b61041b565b6101456101da366004611ae7565b6105b5565b6101456101ed366004611a26565b61074d565b610145610c62565b610145610208366004611b23565b610d64565b61014561021b366004611ace565b610f7f565b60005473ffffffffffffffffffffffffffffffffffffffff1661017c565b61014561024c366004611a52565b61111c565b61014561025f366004611b4d565b611171565b610145610272366004611ace565b61126e565b610145610285366004611a52565b611483565b61029261153a565b60405190815260200161019d565b6101456102ae366004611b86565b611609565b6102bc8261161d565b3373ffffffffffffffffffffffffffffffffffffffff82160361030b576040517f8c8728c700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526006602052604090205473ffffffffffffffffffffffffffffffffffffffff8281169116146103b55760008281526006602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff851690811790915590519091339185917fb1cbb2c4b8480034c27e06da5f096b8233a8fd4497028593a41ff6df79726b3591a45b5050565b6103c28361161d565b6000838152601c602052604090206103db828483611c72565b50827f2b72ac786c97e68dbab71023ed6f2bdbfc80ad9bb7808941929229d71b7d5664838360405161040e929190611d8d565b60405180910390a2505050565b6104248161161d565b60008181526004602090815260409182902082516101008082018552825460ff8116151580845263ffffffff92820483169584019590955265010000000000810482169583019590955273ffffffffffffffffffffffffffffffffffffffff69010000000000000000009095048516606083015260018301546fffffffffffffffffffffffffffffffff811660808401526bffffffffffffffffffffffff70010000000000000000000000000000000082041660a08401527c010000000000000000000000000000000000000000000000000000000090041660c082015260029091015490921660e0830152610546576040517f1b88a78400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082815260046020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690556105856002836116d1565b5060405182907f7bada562044eb163f6b4003c4553e4e62825344c0418eea087bed5ee05a4745690600090a25050565b6105bd6116e6565b73ffffffffffffffffffffffffffffffffffffffff821661060a576040517f9c8d2cd200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8381166004830152602482018390526000919085169063a9059cbb906044016020604051808303816000875af1158015610683573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106a79190611dda565b9050806106e0576040517f90b8ec1800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f5e110f8bc8a20b65dcc87f224bdf1cc039346e267118bae2739847f07321ffa88460405161073f91815260200190565b60405180910390a350505050565b60125477010000000000000000000000000000000000000000000000900460ff16156107a5576040517f37ed32e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b601280547fffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffffff167701000000000000000000000000000000000000000000000017905573ffffffffffffffffffffffffffffffffffffffff8116610834576040517f9c8d2cd200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082815260046020908152604080832081516101008082018452825460ff81161515835263ffffffff91810482168387015265010000000000810482168386015273ffffffffffffffffffffffffffffffffffffffff69010000000000000000009091048116606084015260018401546fffffffffffffffffffffffffffffffff811660808501526bffffffffffffffffffffffff70010000000000000000000000000000000082041660a08501527c0100000000000000000000000000000000000000000000000000000000900490911660c0830152600290920154821660e08201528685526005909352922054909116331461095f576040517fa47c170600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b601354604080517f57e871e7000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff909216916357e871e7916004808201926020929091908290030181865afa1580156109cf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109f39190611e03565b816040015163ffffffff161115610a36576040517fff84e5dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008381526004602090815260408083206001015460e085015173ffffffffffffffffffffffffffffffffffffffff168452601a909252909120547001000000000000000000000000000000009091046bffffffffffffffffffffffff1690610aa0908290611e1c565b60e08301805173ffffffffffffffffffffffffffffffffffffffff9081166000908152601a602090815260408083209590955588825260049081905284822060010180547fffffffff000000000000000000000000ffffffffffffffffffffffffffffffff169055925193517fa9059cbb000000000000000000000000000000000000000000000000000000008152878316938101939093526bffffffffffffffffffffffff8516602484015292169063a9059cbb906044016020604051808303816000875af1158015610b78573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b9c9190611dda565b905080610bd5576040517f90b8ec1800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b604080516bffffffffffffffffffffffff8416815273ffffffffffffffffffffffffffffffffffffffff8616602082015286917ff3b5906e5672f3e524854103bcafbbdba80dbdfeca2c35e116127b1060a68318910160405180910390a25050601280547fffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffffff169055505050565b60015473ffffffffffffffffffffffffffffffffffffffff163314610ce8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e65720000000000000000000060448201526064015b60405180910390fd5b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b610d6c6116e6565b73ffffffffffffffffffffffffffffffffffffffff8216610db9576040517f9c8d2cd200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000610dc361153a565b905080821115610e09576040517fcf4791810000000000000000000000000000000000000000000000000000000081526004810182905260248101839052604401610cdf565b6040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8481166004830152602482018490526000917f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016020604051808303816000875af1158015610ea3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ec79190611dda565b905080610f00576040517f90b8ec1800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f5e110f8bc8a20b65dcc87f224bdf1cc039346e267118bae2739847f07321ffa88560405161073f91815260200190565b610f888161161d565b60008181526004602090815260409182902082516101008082018552825460ff8116158015845263ffffffff92820483169584019590955265010000000000810482169583019590955273ffffffffffffffffffffffffffffffffffffffff69010000000000000000009095048516606083015260018301546fffffffffffffffffffffffffffffffff811660808401526bffffffffffffffffffffffff70010000000000000000000000000000000082041660a08401527c010000000000000000000000000000000000000000000000000000000090041660c082015260029091015490921660e08301526110aa576040517f514b6c2400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082815260046020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790556110ec600283611739565b5060405182907f8ab10247ce168c27748e656ecf852b951fcaac790c18106b19aa0ae57a8b741f90600090a25050565b6111258361161d565b6000838152601d6020526040902061113e828483611c72565b50827f3e8740446213c8a77d40e08f79136ce3f347d13ed270a6ebdf57159e0faf4850838360405161040e929190611d8d565b6108fc8163ffffffff1610806111ae575060145463ffffffff78010000000000000000000000000000000000000000000000009091048116908216115b156111e5576040517f14c237fb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6111ee8261161d565b60008281526004602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000ff1661010063ffffffff861690810291909117909155915191825283917fc24c07e655ce79fba8a589778987d3c015bc6af1632bb20cf9182e02a65d972c910160405180910390a25050565b60008181526004602090815260409182902082516101008082018552825460ff81161515835263ffffffff918104821694830194909452650100000000008404811694820185905273ffffffffffffffffffffffffffffffffffffffff69010000000000000000009094048416606083015260018301546fffffffffffffffffffffffffffffffff811660808401526bffffffffffffffffffffffff70010000000000000000000000000000000082041660a08401527c01000000000000000000000000000000000000000000000000000000009004811660c083015260029092015490921660e0830152909114611392576040517f9c0083a200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526006602052604090205473ffffffffffffffffffffffffffffffffffffffff1633146113ef576040517f6352a85300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526005602090815260408083208054337fffffffffffffffffffffffff0000000000000000000000000000000000000000808316821790935560069094528285208054909216909155905173ffffffffffffffffffffffffffffffffffffffff90911692839186917f5cff4db96bef051785e999f44bfcd21c18823e034fb92dd376e3db4ce0feeb2c91a4505050565b61148c8361161d565b6015547c0100000000000000000000000000000000000000000000000000000000900463ffffffff168111156114ee576040517fae7235df00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000838152600760205260409020611507828483611c72565b50827fcba2d5723b2ee59e53a8e8a82a4a7caf4fdfe70e9f7c582950bf7e7a5c24e83d838360405161040e929190611d8d565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166000818152601a60205260408082205490517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152919290916370a0823190602401602060405180830381865afa1580156115d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115fa9190611e03565b6116049190611e1c565b905090565b611611611745565b61161a816117c6565b50565b60008181526005602052604090205473ffffffffffffffffffffffffffffffffffffffff16331461167a576040517fa47c170600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008181526004602052604090205465010000000000900463ffffffff9081161461161a576040517f9c0083a200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006116dd83836118bb565b90505b92915050565b60165473ffffffffffffffffffffffffffffffffffffffff163314611737576040517fb6dfb7a600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b60006116dd838361190a565b60005473ffffffffffffffffffffffffffffffffffffffff163314611737576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e6572000000000000000000006044820152606401610cdf565b3373ffffffffffffffffffffffffffffffffffffffff821603611845576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401610cdf565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6000818152600183016020526040812054611902575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556116e0565b5060006116e0565b600081815260018301602052604081205480156119f357600061192e600183611e1c565b855490915060009061194290600190611e1c565b90508181146119a757600086600001828154811061196257611962611e56565b906000526020600020015490508087600001848154811061198557611985611e56565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806119b8576119b8611e85565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506116e0565b60009150506116e0565b803573ffffffffffffffffffffffffffffffffffffffff81168114611a2157600080fd5b919050565b60008060408385031215611a3957600080fd5b82359150611a49602084016119fd565b90509250929050565b600080600060408486031215611a6757600080fd5b83359250602084013567ffffffffffffffff80821115611a8657600080fd5b818601915086601f830112611a9a57600080fd5b813581811115611aa957600080fd5b876020828501011115611abb57600080fd5b6020830194508093505050509250925092565b600060208284031215611ae057600080fd5b5035919050565b600080600060608486031215611afc57600080fd5b611b05846119fd565b9250611b13602085016119fd565b9150604084013590509250925092565b60008060408385031215611b3657600080fd5b611b3f836119fd565b946020939093013593505050565b60008060408385031215611b6057600080fd5b82359150602083013563ffffffff81168114611b7b57600080fd5b809150509250929050565b600060208284031215611b9857600080fd5b6116dd826119fd565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600181811c90821680611be457607f821691505b602082108103611c1d577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b601f821115611c6d57600081815260208120601f850160051c81016020861015611c4a5750805b601f850160051c820191505b81811015611c6957828155600101611c56565b5050505b505050565b67ffffffffffffffff831115611c8a57611c8a611ba1565b611c9e83611c988354611bd0565b83611c23565b6000601f841160018114611cf05760008515611cba5750838201355b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b1c1916600186901b178355611d86565b6000838152602090207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0861690835b82811015611d3f5786850135825560209485019460019092019101611d1f565b5086821015611d7a577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b60208152816020820152818360408301376000818301604090810191909152601f9092017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0160101919050565b600060208284031215611dec57600080fd5b81518015158114611dfc57600080fd5b9392505050565b600060208284031215611e1557600080fd5b5051919050565b818103818111156116e0577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfea164736f6c6343000813000a", } var AutomationRegistryLogicBABI = AutomationRegistryLogicBMetaData.ABI var AutomationRegistryLogicBBin = AutomationRegistryLogicBMetaData.Bin -func DeployAutomationRegistryLogicB(auth *bind.TransactOpts, backend bind.ContractBackend, link common.Address, linkNativeFeed common.Address, fastGasFeed common.Address, automationForwarderLogic common.Address, allowedReadOnlyAddress common.Address) (common.Address, *types.Transaction, *AutomationRegistryLogicB, error) { +func DeployAutomationRegistryLogicB(auth *bind.TransactOpts, backend bind.ContractBackend, logicC common.Address) (common.Address, *types.Transaction, *AutomationRegistryLogicB, error) { parsed, err := AutomationRegistryLogicBMetaData.GetAbi() if err != nil { return common.Address{}, nil, nil, err @@ -92,7 +56,7 @@ func DeployAutomationRegistryLogicB(auth *bind.TransactOpts, backend bind.Contra return common.Address{}, nil, nil, errors.New("GetABI returned nil") } - address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(AutomationRegistryLogicBBin), backend, link, linkNativeFeed, fastGasFeed, automationForwarderLogic, allowedReadOnlyAddress) + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(AutomationRegistryLogicBBin), backend, logicC) if err != nil { return common.Address{}, nil, nil, err } @@ -215,694 +179,48 @@ func (_AutomationRegistryLogicB *AutomationRegistryLogicBTransactorRaw) Transact return _AutomationRegistryLogicB.Contract.contract.Transact(opts, method, params...) } -func (_AutomationRegistryLogicB *AutomationRegistryLogicBCaller) GetActiveUpkeepIDs(opts *bind.CallOpts, startIndex *big.Int, maxCount *big.Int) ([]*big.Int, error) { +func (_AutomationRegistryLogicB *AutomationRegistryLogicBCaller) FallbackTo(opts *bind.CallOpts) (common.Address, error) { var out []interface{} - err := _AutomationRegistryLogicB.contract.Call(opts, &out, "getActiveUpkeepIDs", startIndex, maxCount) + err := _AutomationRegistryLogicB.contract.Call(opts, &out, "fallbackTo") if err != nil { - return *new([]*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new([]*big.Int)).(*[]*big.Int) - - return out0, err - -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBSession) GetActiveUpkeepIDs(startIndex *big.Int, maxCount *big.Int) ([]*big.Int, error) { - return _AutomationRegistryLogicB.Contract.GetActiveUpkeepIDs(&_AutomationRegistryLogicB.CallOpts, startIndex, maxCount) -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBCallerSession) GetActiveUpkeepIDs(startIndex *big.Int, maxCount *big.Int) ([]*big.Int, error) { - return _AutomationRegistryLogicB.Contract.GetActiveUpkeepIDs(&_AutomationRegistryLogicB.CallOpts, startIndex, maxCount) -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBCaller) GetAdminPrivilegeConfig(opts *bind.CallOpts, admin common.Address) ([]byte, error) { - var out []interface{} - err := _AutomationRegistryLogicB.contract.Call(opts, &out, "getAdminPrivilegeConfig", admin) - - if err != nil { - return *new([]byte), err - } - - out0 := *abi.ConvertType(out[0], new([]byte)).(*[]byte) - - return out0, err - -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBSession) GetAdminPrivilegeConfig(admin common.Address) ([]byte, error) { - return _AutomationRegistryLogicB.Contract.GetAdminPrivilegeConfig(&_AutomationRegistryLogicB.CallOpts, admin) -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBCallerSession) GetAdminPrivilegeConfig(admin common.Address) ([]byte, error) { - return _AutomationRegistryLogicB.Contract.GetAdminPrivilegeConfig(&_AutomationRegistryLogicB.CallOpts, admin) -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBCaller) GetAllowedReadOnlyAddress(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _AutomationRegistryLogicB.contract.Call(opts, &out, "getAllowedReadOnlyAddress") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBSession) GetAllowedReadOnlyAddress() (common.Address, error) { - return _AutomationRegistryLogicB.Contract.GetAllowedReadOnlyAddress(&_AutomationRegistryLogicB.CallOpts) -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBCallerSession) GetAllowedReadOnlyAddress() (common.Address, error) { - return _AutomationRegistryLogicB.Contract.GetAllowedReadOnlyAddress(&_AutomationRegistryLogicB.CallOpts) -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBCaller) GetAutomationForwarderLogic(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _AutomationRegistryLogicB.contract.Call(opts, &out, "getAutomationForwarderLogic") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBSession) GetAutomationForwarderLogic() (common.Address, error) { - return _AutomationRegistryLogicB.Contract.GetAutomationForwarderLogic(&_AutomationRegistryLogicB.CallOpts) -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBCallerSession) GetAutomationForwarderLogic() (common.Address, error) { - return _AutomationRegistryLogicB.Contract.GetAutomationForwarderLogic(&_AutomationRegistryLogicB.CallOpts) -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBCaller) GetBalance(opts *bind.CallOpts, id *big.Int) (*big.Int, error) { - var out []interface{} - err := _AutomationRegistryLogicB.contract.Call(opts, &out, "getBalance", id) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBSession) GetBalance(id *big.Int) (*big.Int, error) { - return _AutomationRegistryLogicB.Contract.GetBalance(&_AutomationRegistryLogicB.CallOpts, id) -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBCallerSession) GetBalance(id *big.Int) (*big.Int, error) { - return _AutomationRegistryLogicB.Contract.GetBalance(&_AutomationRegistryLogicB.CallOpts, id) -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBCaller) GetCancellationDelay(opts *bind.CallOpts) (*big.Int, error) { - var out []interface{} - err := _AutomationRegistryLogicB.contract.Call(opts, &out, "getCancellationDelay") - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBSession) GetCancellationDelay() (*big.Int, error) { - return _AutomationRegistryLogicB.Contract.GetCancellationDelay(&_AutomationRegistryLogicB.CallOpts) -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBCallerSession) GetCancellationDelay() (*big.Int, error) { - return _AutomationRegistryLogicB.Contract.GetCancellationDelay(&_AutomationRegistryLogicB.CallOpts) -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBCaller) GetChainModule(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _AutomationRegistryLogicB.contract.Call(opts, &out, "getChainModule") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBSession) GetChainModule() (common.Address, error) { - return _AutomationRegistryLogicB.Contract.GetChainModule(&_AutomationRegistryLogicB.CallOpts) -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBCallerSession) GetChainModule() (common.Address, error) { - return _AutomationRegistryLogicB.Contract.GetChainModule(&_AutomationRegistryLogicB.CallOpts) -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBCaller) GetConditionalGasOverhead(opts *bind.CallOpts) (*big.Int, error) { - var out []interface{} - err := _AutomationRegistryLogicB.contract.Call(opts, &out, "getConditionalGasOverhead") - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBSession) GetConditionalGasOverhead() (*big.Int, error) { - return _AutomationRegistryLogicB.Contract.GetConditionalGasOverhead(&_AutomationRegistryLogicB.CallOpts) -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBCallerSession) GetConditionalGasOverhead() (*big.Int, error) { - return _AutomationRegistryLogicB.Contract.GetConditionalGasOverhead(&_AutomationRegistryLogicB.CallOpts) -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBCaller) GetFastGasFeedAddress(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _AutomationRegistryLogicB.contract.Call(opts, &out, "getFastGasFeedAddress") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBSession) GetFastGasFeedAddress() (common.Address, error) { - return _AutomationRegistryLogicB.Contract.GetFastGasFeedAddress(&_AutomationRegistryLogicB.CallOpts) -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBCallerSession) GetFastGasFeedAddress() (common.Address, error) { - return _AutomationRegistryLogicB.Contract.GetFastGasFeedAddress(&_AutomationRegistryLogicB.CallOpts) -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBCaller) GetForwarder(opts *bind.CallOpts, upkeepID *big.Int) (common.Address, error) { - var out []interface{} - err := _AutomationRegistryLogicB.contract.Call(opts, &out, "getForwarder", upkeepID) - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBSession) GetForwarder(upkeepID *big.Int) (common.Address, error) { - return _AutomationRegistryLogicB.Contract.GetForwarder(&_AutomationRegistryLogicB.CallOpts, upkeepID) -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBCallerSession) GetForwarder(upkeepID *big.Int) (common.Address, error) { - return _AutomationRegistryLogicB.Contract.GetForwarder(&_AutomationRegistryLogicB.CallOpts, upkeepID) -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBCaller) GetLinkAddress(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _AutomationRegistryLogicB.contract.Call(opts, &out, "getLinkAddress") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBSession) GetLinkAddress() (common.Address, error) { - return _AutomationRegistryLogicB.Contract.GetLinkAddress(&_AutomationRegistryLogicB.CallOpts) -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBCallerSession) GetLinkAddress() (common.Address, error) { - return _AutomationRegistryLogicB.Contract.GetLinkAddress(&_AutomationRegistryLogicB.CallOpts) -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBCaller) GetLinkNativeFeedAddress(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _AutomationRegistryLogicB.contract.Call(opts, &out, "getLinkNativeFeedAddress") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBSession) GetLinkNativeFeedAddress() (common.Address, error) { - return _AutomationRegistryLogicB.Contract.GetLinkNativeFeedAddress(&_AutomationRegistryLogicB.CallOpts) -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBCallerSession) GetLinkNativeFeedAddress() (common.Address, error) { - return _AutomationRegistryLogicB.Contract.GetLinkNativeFeedAddress(&_AutomationRegistryLogicB.CallOpts) -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBCaller) GetLogGasOverhead(opts *bind.CallOpts) (*big.Int, error) { - var out []interface{} - err := _AutomationRegistryLogicB.contract.Call(opts, &out, "getLogGasOverhead") - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBSession) GetLogGasOverhead() (*big.Int, error) { - return _AutomationRegistryLogicB.Contract.GetLogGasOverhead(&_AutomationRegistryLogicB.CallOpts) -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBCallerSession) GetLogGasOverhead() (*big.Int, error) { - return _AutomationRegistryLogicB.Contract.GetLogGasOverhead(&_AutomationRegistryLogicB.CallOpts) -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBCaller) GetMaxPaymentForGas(opts *bind.CallOpts, triggerType uint8, gasLimit uint32) (*big.Int, error) { - var out []interface{} - err := _AutomationRegistryLogicB.contract.Call(opts, &out, "getMaxPaymentForGas", triggerType, gasLimit) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBSession) GetMaxPaymentForGas(triggerType uint8, gasLimit uint32) (*big.Int, error) { - return _AutomationRegistryLogicB.Contract.GetMaxPaymentForGas(&_AutomationRegistryLogicB.CallOpts, triggerType, gasLimit) -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBCallerSession) GetMaxPaymentForGas(triggerType uint8, gasLimit uint32) (*big.Int, error) { - return _AutomationRegistryLogicB.Contract.GetMaxPaymentForGas(&_AutomationRegistryLogicB.CallOpts, triggerType, gasLimit) -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBCaller) GetMinBalance(opts *bind.CallOpts, id *big.Int) (*big.Int, error) { - var out []interface{} - err := _AutomationRegistryLogicB.contract.Call(opts, &out, "getMinBalance", id) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBSession) GetMinBalance(id *big.Int) (*big.Int, error) { - return _AutomationRegistryLogicB.Contract.GetMinBalance(&_AutomationRegistryLogicB.CallOpts, id) -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBCallerSession) GetMinBalance(id *big.Int) (*big.Int, error) { - return _AutomationRegistryLogicB.Contract.GetMinBalance(&_AutomationRegistryLogicB.CallOpts, id) -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBCaller) GetMinBalanceForUpkeep(opts *bind.CallOpts, id *big.Int) (*big.Int, error) { - var out []interface{} - err := _AutomationRegistryLogicB.contract.Call(opts, &out, "getMinBalanceForUpkeep", id) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBSession) GetMinBalanceForUpkeep(id *big.Int) (*big.Int, error) { - return _AutomationRegistryLogicB.Contract.GetMinBalanceForUpkeep(&_AutomationRegistryLogicB.CallOpts, id) -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBCallerSession) GetMinBalanceForUpkeep(id *big.Int) (*big.Int, error) { - return _AutomationRegistryLogicB.Contract.GetMinBalanceForUpkeep(&_AutomationRegistryLogicB.CallOpts, id) -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBCaller) GetPeerRegistryMigrationPermission(opts *bind.CallOpts, peer common.Address) (uint8, error) { - var out []interface{} - err := _AutomationRegistryLogicB.contract.Call(opts, &out, "getPeerRegistryMigrationPermission", peer) - - if err != nil { - return *new(uint8), err - } - - out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) - - return out0, err - -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBSession) GetPeerRegistryMigrationPermission(peer common.Address) (uint8, error) { - return _AutomationRegistryLogicB.Contract.GetPeerRegistryMigrationPermission(&_AutomationRegistryLogicB.CallOpts, peer) -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBCallerSession) GetPeerRegistryMigrationPermission(peer common.Address) (uint8, error) { - return _AutomationRegistryLogicB.Contract.GetPeerRegistryMigrationPermission(&_AutomationRegistryLogicB.CallOpts, peer) -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBCaller) GetPerPerformByteGasOverhead(opts *bind.CallOpts) (*big.Int, error) { - var out []interface{} - err := _AutomationRegistryLogicB.contract.Call(opts, &out, "getPerPerformByteGasOverhead") - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBSession) GetPerPerformByteGasOverhead() (*big.Int, error) { - return _AutomationRegistryLogicB.Contract.GetPerPerformByteGasOverhead(&_AutomationRegistryLogicB.CallOpts) -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBCallerSession) GetPerPerformByteGasOverhead() (*big.Int, error) { - return _AutomationRegistryLogicB.Contract.GetPerPerformByteGasOverhead(&_AutomationRegistryLogicB.CallOpts) -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBCaller) GetPerSignerGasOverhead(opts *bind.CallOpts) (*big.Int, error) { - var out []interface{} - err := _AutomationRegistryLogicB.contract.Call(opts, &out, "getPerSignerGasOverhead") - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBSession) GetPerSignerGasOverhead() (*big.Int, error) { - return _AutomationRegistryLogicB.Contract.GetPerSignerGasOverhead(&_AutomationRegistryLogicB.CallOpts) -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBCallerSession) GetPerSignerGasOverhead() (*big.Int, error) { - return _AutomationRegistryLogicB.Contract.GetPerSignerGasOverhead(&_AutomationRegistryLogicB.CallOpts) -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBCaller) GetReorgProtectionEnabled(opts *bind.CallOpts) (bool, error) { - var out []interface{} - err := _AutomationRegistryLogicB.contract.Call(opts, &out, "getReorgProtectionEnabled") - - if err != nil { - return *new(bool), err - } - - out0 := *abi.ConvertType(out[0], new(bool)).(*bool) - - return out0, err - -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBSession) GetReorgProtectionEnabled() (bool, error) { - return _AutomationRegistryLogicB.Contract.GetReorgProtectionEnabled(&_AutomationRegistryLogicB.CallOpts) -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBCallerSession) GetReorgProtectionEnabled() (bool, error) { - return _AutomationRegistryLogicB.Contract.GetReorgProtectionEnabled(&_AutomationRegistryLogicB.CallOpts) -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBCaller) GetSignerInfo(opts *bind.CallOpts, query common.Address) (GetSignerInfo, - - error) { - var out []interface{} - err := _AutomationRegistryLogicB.contract.Call(opts, &out, "getSignerInfo", query) - - outstruct := new(GetSignerInfo) - if err != nil { - return *outstruct, err - } - - outstruct.Active = *abi.ConvertType(out[0], new(bool)).(*bool) - outstruct.Index = *abi.ConvertType(out[1], new(uint8)).(*uint8) - - return *outstruct, err - -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBSession) GetSignerInfo(query common.Address) (GetSignerInfo, - - error) { - return _AutomationRegistryLogicB.Contract.GetSignerInfo(&_AutomationRegistryLogicB.CallOpts, query) -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBCallerSession) GetSignerInfo(query common.Address) (GetSignerInfo, - - error) { - return _AutomationRegistryLogicB.Contract.GetSignerInfo(&_AutomationRegistryLogicB.CallOpts, query) -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBCaller) GetState(opts *bind.CallOpts) (GetState, - - error) { - var out []interface{} - err := _AutomationRegistryLogicB.contract.Call(opts, &out, "getState") - - outstruct := new(GetState) - if err != nil { - return *outstruct, err - } - - outstruct.State = *abi.ConvertType(out[0], new(AutomationRegistryBase23State)).(*AutomationRegistryBase23State) - outstruct.Config = *abi.ConvertType(out[1], new(AutomationRegistryBase23OnchainConfigLegacy)).(*AutomationRegistryBase23OnchainConfigLegacy) - outstruct.Signers = *abi.ConvertType(out[2], new([]common.Address)).(*[]common.Address) - outstruct.Transmitters = *abi.ConvertType(out[3], new([]common.Address)).(*[]common.Address) - outstruct.F = *abi.ConvertType(out[4], new(uint8)).(*uint8) - - return *outstruct, err - -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBSession) GetState() (GetState, - - error) { - return _AutomationRegistryLogicB.Contract.GetState(&_AutomationRegistryLogicB.CallOpts) -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBCallerSession) GetState() (GetState, - - error) { - return _AutomationRegistryLogicB.Contract.GetState(&_AutomationRegistryLogicB.CallOpts) -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBCaller) GetTransmitCalldataFixedBytesOverhead(opts *bind.CallOpts) (*big.Int, error) { - var out []interface{} - err := _AutomationRegistryLogicB.contract.Call(opts, &out, "getTransmitCalldataFixedBytesOverhead") - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBSession) GetTransmitCalldataFixedBytesOverhead() (*big.Int, error) { - return _AutomationRegistryLogicB.Contract.GetTransmitCalldataFixedBytesOverhead(&_AutomationRegistryLogicB.CallOpts) -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBCallerSession) GetTransmitCalldataFixedBytesOverhead() (*big.Int, error) { - return _AutomationRegistryLogicB.Contract.GetTransmitCalldataFixedBytesOverhead(&_AutomationRegistryLogicB.CallOpts) -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBCaller) GetTransmitCalldataPerSignerBytesOverhead(opts *bind.CallOpts) (*big.Int, error) { - var out []interface{} - err := _AutomationRegistryLogicB.contract.Call(opts, &out, "getTransmitCalldataPerSignerBytesOverhead") - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBSession) GetTransmitCalldataPerSignerBytesOverhead() (*big.Int, error) { - return _AutomationRegistryLogicB.Contract.GetTransmitCalldataPerSignerBytesOverhead(&_AutomationRegistryLogicB.CallOpts) -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBCallerSession) GetTransmitCalldataPerSignerBytesOverhead() (*big.Int, error) { - return _AutomationRegistryLogicB.Contract.GetTransmitCalldataPerSignerBytesOverhead(&_AutomationRegistryLogicB.CallOpts) -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBCaller) GetTransmitterInfo(opts *bind.CallOpts, query common.Address) (GetTransmitterInfo, - - error) { - var out []interface{} - err := _AutomationRegistryLogicB.contract.Call(opts, &out, "getTransmitterInfo", query) - - outstruct := new(GetTransmitterInfo) - if err != nil { - return *outstruct, err - } - - outstruct.Active = *abi.ConvertType(out[0], new(bool)).(*bool) - outstruct.Index = *abi.ConvertType(out[1], new(uint8)).(*uint8) - outstruct.Balance = *abi.ConvertType(out[2], new(*big.Int)).(**big.Int) - outstruct.LastCollected = *abi.ConvertType(out[3], new(*big.Int)).(**big.Int) - outstruct.Payee = *abi.ConvertType(out[4], new(common.Address)).(*common.Address) - - return *outstruct, err - -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBSession) GetTransmitterInfo(query common.Address) (GetTransmitterInfo, - - error) { - return _AutomationRegistryLogicB.Contract.GetTransmitterInfo(&_AutomationRegistryLogicB.CallOpts, query) -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBCallerSession) GetTransmitterInfo(query common.Address) (GetTransmitterInfo, - - error) { - return _AutomationRegistryLogicB.Contract.GetTransmitterInfo(&_AutomationRegistryLogicB.CallOpts, query) -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBCaller) GetTriggerType(opts *bind.CallOpts, upkeepId *big.Int) (uint8, error) { - var out []interface{} - err := _AutomationRegistryLogicB.contract.Call(opts, &out, "getTriggerType", upkeepId) - - if err != nil { - return *new(uint8), err - } - - out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) - - return out0, err - -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBSession) GetTriggerType(upkeepId *big.Int) (uint8, error) { - return _AutomationRegistryLogicB.Contract.GetTriggerType(&_AutomationRegistryLogicB.CallOpts, upkeepId) -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBCallerSession) GetTriggerType(upkeepId *big.Int) (uint8, error) { - return _AutomationRegistryLogicB.Contract.GetTriggerType(&_AutomationRegistryLogicB.CallOpts, upkeepId) -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBCaller) GetUpkeep(opts *bind.CallOpts, id *big.Int) (AutomationRegistryBase23UpkeepInfo, error) { - var out []interface{} - err := _AutomationRegistryLogicB.contract.Call(opts, &out, "getUpkeep", id) - - if err != nil { - return *new(AutomationRegistryBase23UpkeepInfo), err - } - - out0 := *abi.ConvertType(out[0], new(AutomationRegistryBase23UpkeepInfo)).(*AutomationRegistryBase23UpkeepInfo) - - return out0, err - -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBSession) GetUpkeep(id *big.Int) (AutomationRegistryBase23UpkeepInfo, error) { - return _AutomationRegistryLogicB.Contract.GetUpkeep(&_AutomationRegistryLogicB.CallOpts, id) -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBCallerSession) GetUpkeep(id *big.Int) (AutomationRegistryBase23UpkeepInfo, error) { - return _AutomationRegistryLogicB.Contract.GetUpkeep(&_AutomationRegistryLogicB.CallOpts, id) -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBCaller) GetUpkeepPrivilegeConfig(opts *bind.CallOpts, upkeepId *big.Int) ([]byte, error) { - var out []interface{} - err := _AutomationRegistryLogicB.contract.Call(opts, &out, "getUpkeepPrivilegeConfig", upkeepId) - - if err != nil { - return *new([]byte), err - } - - out0 := *abi.ConvertType(out[0], new([]byte)).(*[]byte) - - return out0, err - -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBSession) GetUpkeepPrivilegeConfig(upkeepId *big.Int) ([]byte, error) { - return _AutomationRegistryLogicB.Contract.GetUpkeepPrivilegeConfig(&_AutomationRegistryLogicB.CallOpts, upkeepId) -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBCallerSession) GetUpkeepPrivilegeConfig(upkeepId *big.Int) ([]byte, error) { - return _AutomationRegistryLogicB.Contract.GetUpkeepPrivilegeConfig(&_AutomationRegistryLogicB.CallOpts, upkeepId) -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBCaller) GetUpkeepTriggerConfig(opts *bind.CallOpts, upkeepId *big.Int) ([]byte, error) { - var out []interface{} - err := _AutomationRegistryLogicB.contract.Call(opts, &out, "getUpkeepTriggerConfig", upkeepId) - - if err != nil { - return *new([]byte), err + return *new(common.Address), err } - out0 := *abi.ConvertType(out[0], new([]byte)).(*[]byte) + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) return out0, err } -func (_AutomationRegistryLogicB *AutomationRegistryLogicBSession) GetUpkeepTriggerConfig(upkeepId *big.Int) ([]byte, error) { - return _AutomationRegistryLogicB.Contract.GetUpkeepTriggerConfig(&_AutomationRegistryLogicB.CallOpts, upkeepId) +func (_AutomationRegistryLogicB *AutomationRegistryLogicBSession) FallbackTo() (common.Address, error) { + return _AutomationRegistryLogicB.Contract.FallbackTo(&_AutomationRegistryLogicB.CallOpts) } -func (_AutomationRegistryLogicB *AutomationRegistryLogicBCallerSession) GetUpkeepTriggerConfig(upkeepId *big.Int) ([]byte, error) { - return _AutomationRegistryLogicB.Contract.GetUpkeepTriggerConfig(&_AutomationRegistryLogicB.CallOpts, upkeepId) +func (_AutomationRegistryLogicB *AutomationRegistryLogicBCallerSession) FallbackTo() (common.Address, error) { + return _AutomationRegistryLogicB.Contract.FallbackTo(&_AutomationRegistryLogicB.CallOpts) } -func (_AutomationRegistryLogicB *AutomationRegistryLogicBCaller) HasDedupKey(opts *bind.CallOpts, dedupKey [32]byte) (bool, error) { +func (_AutomationRegistryLogicB *AutomationRegistryLogicBCaller) LinkAvailableForPayment(opts *bind.CallOpts) (*big.Int, error) { var out []interface{} - err := _AutomationRegistryLogicB.contract.Call(opts, &out, "hasDedupKey", dedupKey) + err := _AutomationRegistryLogicB.contract.Call(opts, &out, "linkAvailableForPayment") if err != nil { - return *new(bool), err + return *new(*big.Int), err } - out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) return out0, err } -func (_AutomationRegistryLogicB *AutomationRegistryLogicBSession) HasDedupKey(dedupKey [32]byte) (bool, error) { - return _AutomationRegistryLogicB.Contract.HasDedupKey(&_AutomationRegistryLogicB.CallOpts, dedupKey) +func (_AutomationRegistryLogicB *AutomationRegistryLogicBSession) LinkAvailableForPayment() (*big.Int, error) { + return _AutomationRegistryLogicB.Contract.LinkAvailableForPayment(&_AutomationRegistryLogicB.CallOpts) } -func (_AutomationRegistryLogicB *AutomationRegistryLogicBCallerSession) HasDedupKey(dedupKey [32]byte) (bool, error) { - return _AutomationRegistryLogicB.Contract.HasDedupKey(&_AutomationRegistryLogicB.CallOpts, dedupKey) +func (_AutomationRegistryLogicB *AutomationRegistryLogicBCallerSession) LinkAvailableForPayment() (*big.Int, error) { + return _AutomationRegistryLogicB.Contract.LinkAvailableForPayment(&_AutomationRegistryLogicB.CallOpts) } func (_AutomationRegistryLogicB *AutomationRegistryLogicBCaller) Owner(opts *bind.CallOpts) (common.Address, error) { @@ -927,50 +245,6 @@ func (_AutomationRegistryLogicB *AutomationRegistryLogicBCallerSession) Owner() return _AutomationRegistryLogicB.Contract.Owner(&_AutomationRegistryLogicB.CallOpts) } -func (_AutomationRegistryLogicB *AutomationRegistryLogicBCaller) UpkeepTranscoderVersion(opts *bind.CallOpts) (uint8, error) { - var out []interface{} - err := _AutomationRegistryLogicB.contract.Call(opts, &out, "upkeepTranscoderVersion") - - if err != nil { - return *new(uint8), err - } - - out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) - - return out0, err - -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBSession) UpkeepTranscoderVersion() (uint8, error) { - return _AutomationRegistryLogicB.Contract.UpkeepTranscoderVersion(&_AutomationRegistryLogicB.CallOpts) -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBCallerSession) UpkeepTranscoderVersion() (uint8, error) { - return _AutomationRegistryLogicB.Contract.UpkeepTranscoderVersion(&_AutomationRegistryLogicB.CallOpts) -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBCaller) UpkeepVersion(opts *bind.CallOpts) (uint8, error) { - var out []interface{} - err := _AutomationRegistryLogicB.contract.Call(opts, &out, "upkeepVersion") - - if err != nil { - return *new(uint8), err - } - - out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) - - return out0, err - -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBSession) UpkeepVersion() (uint8, error) { - return _AutomationRegistryLogicB.Contract.UpkeepVersion(&_AutomationRegistryLogicB.CallOpts) -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBCallerSession) UpkeepVersion() (uint8, error) { - return _AutomationRegistryLogicB.Contract.UpkeepVersion(&_AutomationRegistryLogicB.CallOpts) -} - func (_AutomationRegistryLogicB *AutomationRegistryLogicBTransactor) AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { return _AutomationRegistryLogicB.contract.Transact(opts, "acceptOwnership") } @@ -983,18 +257,6 @@ func (_AutomationRegistryLogicB *AutomationRegistryLogicBTransactorSession) Acce return _AutomationRegistryLogicB.Contract.AcceptOwnership(&_AutomationRegistryLogicB.TransactOpts) } -func (_AutomationRegistryLogicB *AutomationRegistryLogicBTransactor) AcceptPayeeship(opts *bind.TransactOpts, transmitter common.Address) (*types.Transaction, error) { - return _AutomationRegistryLogicB.contract.Transact(opts, "acceptPayeeship", transmitter) -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBSession) AcceptPayeeship(transmitter common.Address) (*types.Transaction, error) { - return _AutomationRegistryLogicB.Contract.AcceptPayeeship(&_AutomationRegistryLogicB.TransactOpts, transmitter) -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBTransactorSession) AcceptPayeeship(transmitter common.Address) (*types.Transaction, error) { - return _AutomationRegistryLogicB.Contract.AcceptPayeeship(&_AutomationRegistryLogicB.TransactOpts, transmitter) -} - func (_AutomationRegistryLogicB *AutomationRegistryLogicBTransactor) AcceptUpkeepAdmin(opts *bind.TransactOpts, id *big.Int) (*types.Transaction, error) { return _AutomationRegistryLogicB.contract.Transact(opts, "acceptUpkeepAdmin", id) } @@ -1007,18 +269,6 @@ func (_AutomationRegistryLogicB *AutomationRegistryLogicBTransactorSession) Acce return _AutomationRegistryLogicB.Contract.AcceptUpkeepAdmin(&_AutomationRegistryLogicB.TransactOpts, id) } -func (_AutomationRegistryLogicB *AutomationRegistryLogicBTransactor) Pause(opts *bind.TransactOpts) (*types.Transaction, error) { - return _AutomationRegistryLogicB.contract.Transact(opts, "pause") -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBSession) Pause() (*types.Transaction, error) { - return _AutomationRegistryLogicB.Contract.Pause(&_AutomationRegistryLogicB.TransactOpts) -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBTransactorSession) Pause() (*types.Transaction, error) { - return _AutomationRegistryLogicB.Contract.Pause(&_AutomationRegistryLogicB.TransactOpts) -} - func (_AutomationRegistryLogicB *AutomationRegistryLogicBTransactor) PauseUpkeep(opts *bind.TransactOpts, id *big.Int) (*types.Transaction, error) { return _AutomationRegistryLogicB.contract.Transact(opts, "pauseUpkeep", id) } @@ -1031,54 +281,6 @@ func (_AutomationRegistryLogicB *AutomationRegistryLogicBTransactorSession) Paus return _AutomationRegistryLogicB.Contract.PauseUpkeep(&_AutomationRegistryLogicB.TransactOpts, id) } -func (_AutomationRegistryLogicB *AutomationRegistryLogicBTransactor) RecoverFunds(opts *bind.TransactOpts) (*types.Transaction, error) { - return _AutomationRegistryLogicB.contract.Transact(opts, "recoverFunds") -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBSession) RecoverFunds() (*types.Transaction, error) { - return _AutomationRegistryLogicB.Contract.RecoverFunds(&_AutomationRegistryLogicB.TransactOpts) -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBTransactorSession) RecoverFunds() (*types.Transaction, error) { - return _AutomationRegistryLogicB.Contract.RecoverFunds(&_AutomationRegistryLogicB.TransactOpts) -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBTransactor) SetAdminPrivilegeConfig(opts *bind.TransactOpts, admin common.Address, newPrivilegeConfig []byte) (*types.Transaction, error) { - return _AutomationRegistryLogicB.contract.Transact(opts, "setAdminPrivilegeConfig", admin, newPrivilegeConfig) -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBSession) SetAdminPrivilegeConfig(admin common.Address, newPrivilegeConfig []byte) (*types.Transaction, error) { - return _AutomationRegistryLogicB.Contract.SetAdminPrivilegeConfig(&_AutomationRegistryLogicB.TransactOpts, admin, newPrivilegeConfig) -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBTransactorSession) SetAdminPrivilegeConfig(admin common.Address, newPrivilegeConfig []byte) (*types.Transaction, error) { - return _AutomationRegistryLogicB.Contract.SetAdminPrivilegeConfig(&_AutomationRegistryLogicB.TransactOpts, admin, newPrivilegeConfig) -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBTransactor) SetPayees(opts *bind.TransactOpts, payees []common.Address) (*types.Transaction, error) { - return _AutomationRegistryLogicB.contract.Transact(opts, "setPayees", payees) -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBSession) SetPayees(payees []common.Address) (*types.Transaction, error) { - return _AutomationRegistryLogicB.Contract.SetPayees(&_AutomationRegistryLogicB.TransactOpts, payees) -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBTransactorSession) SetPayees(payees []common.Address) (*types.Transaction, error) { - return _AutomationRegistryLogicB.Contract.SetPayees(&_AutomationRegistryLogicB.TransactOpts, payees) -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBTransactor) SetPeerRegistryMigrationPermission(opts *bind.TransactOpts, peer common.Address, permission uint8) (*types.Transaction, error) { - return _AutomationRegistryLogicB.contract.Transact(opts, "setPeerRegistryMigrationPermission", peer, permission) -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBSession) SetPeerRegistryMigrationPermission(peer common.Address, permission uint8) (*types.Transaction, error) { - return _AutomationRegistryLogicB.Contract.SetPeerRegistryMigrationPermission(&_AutomationRegistryLogicB.TransactOpts, peer, permission) -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBTransactorSession) SetPeerRegistryMigrationPermission(peer common.Address, permission uint8) (*types.Transaction, error) { - return _AutomationRegistryLogicB.Contract.SetPeerRegistryMigrationPermission(&_AutomationRegistryLogicB.TransactOpts, peer, permission) -} - func (_AutomationRegistryLogicB *AutomationRegistryLogicBTransactor) SetUpkeepCheckData(opts *bind.TransactOpts, id *big.Int, newCheckData []byte) (*types.Transaction, error) { return _AutomationRegistryLogicB.contract.Transact(opts, "setUpkeepCheckData", id, newCheckData) } @@ -1115,16 +317,16 @@ func (_AutomationRegistryLogicB *AutomationRegistryLogicBTransactorSession) SetU return _AutomationRegistryLogicB.Contract.SetUpkeepOffchainConfig(&_AutomationRegistryLogicB.TransactOpts, id, config) } -func (_AutomationRegistryLogicB *AutomationRegistryLogicBTransactor) SetUpkeepPrivilegeConfig(opts *bind.TransactOpts, upkeepId *big.Int, newPrivilegeConfig []byte) (*types.Transaction, error) { - return _AutomationRegistryLogicB.contract.Transact(opts, "setUpkeepPrivilegeConfig", upkeepId, newPrivilegeConfig) +func (_AutomationRegistryLogicB *AutomationRegistryLogicBTransactor) SetUpkeepTriggerConfig(opts *bind.TransactOpts, id *big.Int, triggerConfig []byte) (*types.Transaction, error) { + return _AutomationRegistryLogicB.contract.Transact(opts, "setUpkeepTriggerConfig", id, triggerConfig) } -func (_AutomationRegistryLogicB *AutomationRegistryLogicBSession) SetUpkeepPrivilegeConfig(upkeepId *big.Int, newPrivilegeConfig []byte) (*types.Transaction, error) { - return _AutomationRegistryLogicB.Contract.SetUpkeepPrivilegeConfig(&_AutomationRegistryLogicB.TransactOpts, upkeepId, newPrivilegeConfig) +func (_AutomationRegistryLogicB *AutomationRegistryLogicBSession) SetUpkeepTriggerConfig(id *big.Int, triggerConfig []byte) (*types.Transaction, error) { + return _AutomationRegistryLogicB.Contract.SetUpkeepTriggerConfig(&_AutomationRegistryLogicB.TransactOpts, id, triggerConfig) } -func (_AutomationRegistryLogicB *AutomationRegistryLogicBTransactorSession) SetUpkeepPrivilegeConfig(upkeepId *big.Int, newPrivilegeConfig []byte) (*types.Transaction, error) { - return _AutomationRegistryLogicB.Contract.SetUpkeepPrivilegeConfig(&_AutomationRegistryLogicB.TransactOpts, upkeepId, newPrivilegeConfig) +func (_AutomationRegistryLogicB *AutomationRegistryLogicBTransactorSession) SetUpkeepTriggerConfig(id *big.Int, triggerConfig []byte) (*types.Transaction, error) { + return _AutomationRegistryLogicB.Contract.SetUpkeepTriggerConfig(&_AutomationRegistryLogicB.TransactOpts, id, triggerConfig) } func (_AutomationRegistryLogicB *AutomationRegistryLogicBTransactor) TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) { @@ -1139,18 +341,6 @@ func (_AutomationRegistryLogicB *AutomationRegistryLogicBTransactorSession) Tran return _AutomationRegistryLogicB.Contract.TransferOwnership(&_AutomationRegistryLogicB.TransactOpts, to) } -func (_AutomationRegistryLogicB *AutomationRegistryLogicBTransactor) TransferPayeeship(opts *bind.TransactOpts, transmitter common.Address, proposed common.Address) (*types.Transaction, error) { - return _AutomationRegistryLogicB.contract.Transact(opts, "transferPayeeship", transmitter, proposed) -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBSession) TransferPayeeship(transmitter common.Address, proposed common.Address) (*types.Transaction, error) { - return _AutomationRegistryLogicB.Contract.TransferPayeeship(&_AutomationRegistryLogicB.TransactOpts, transmitter, proposed) -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBTransactorSession) TransferPayeeship(transmitter common.Address, proposed common.Address) (*types.Transaction, error) { - return _AutomationRegistryLogicB.Contract.TransferPayeeship(&_AutomationRegistryLogicB.TransactOpts, transmitter, proposed) -} - func (_AutomationRegistryLogicB *AutomationRegistryLogicBTransactor) TransferUpkeepAdmin(opts *bind.TransactOpts, id *big.Int, proposed common.Address) (*types.Transaction, error) { return _AutomationRegistryLogicB.contract.Transact(opts, "transferUpkeepAdmin", id, proposed) } @@ -1163,18 +353,6 @@ func (_AutomationRegistryLogicB *AutomationRegistryLogicBTransactorSession) Tran return _AutomationRegistryLogicB.Contract.TransferUpkeepAdmin(&_AutomationRegistryLogicB.TransactOpts, id, proposed) } -func (_AutomationRegistryLogicB *AutomationRegistryLogicBTransactor) Unpause(opts *bind.TransactOpts) (*types.Transaction, error) { - return _AutomationRegistryLogicB.contract.Transact(opts, "unpause") -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBSession) Unpause() (*types.Transaction, error) { - return _AutomationRegistryLogicB.Contract.Unpause(&_AutomationRegistryLogicB.TransactOpts) -} - -func (_AutomationRegistryLogicB *AutomationRegistryLogicBTransactorSession) Unpause() (*types.Transaction, error) { - return _AutomationRegistryLogicB.Contract.Unpause(&_AutomationRegistryLogicB.TransactOpts) -} - func (_AutomationRegistryLogicB *AutomationRegistryLogicBTransactor) UnpauseUpkeep(opts *bind.TransactOpts, id *big.Int) (*types.Transaction, error) { return _AutomationRegistryLogicB.contract.Transact(opts, "unpauseUpkeep", id) } @@ -1187,6 +365,18 @@ func (_AutomationRegistryLogicB *AutomationRegistryLogicBTransactorSession) Unpa return _AutomationRegistryLogicB.Contract.UnpauseUpkeep(&_AutomationRegistryLogicB.TransactOpts, id) } +func (_AutomationRegistryLogicB *AutomationRegistryLogicBTransactor) WithdrawERC20Fees(opts *bind.TransactOpts, assetAddress common.Address, to common.Address, amount *big.Int) (*types.Transaction, error) { + return _AutomationRegistryLogicB.contract.Transact(opts, "withdrawERC20Fees", assetAddress, to, amount) +} + +func (_AutomationRegistryLogicB *AutomationRegistryLogicBSession) WithdrawERC20Fees(assetAddress common.Address, to common.Address, amount *big.Int) (*types.Transaction, error) { + return _AutomationRegistryLogicB.Contract.WithdrawERC20Fees(&_AutomationRegistryLogicB.TransactOpts, assetAddress, to, amount) +} + +func (_AutomationRegistryLogicB *AutomationRegistryLogicBTransactorSession) WithdrawERC20Fees(assetAddress common.Address, to common.Address, amount *big.Int) (*types.Transaction, error) { + return _AutomationRegistryLogicB.Contract.WithdrawERC20Fees(&_AutomationRegistryLogicB.TransactOpts, assetAddress, to, amount) +} + func (_AutomationRegistryLogicB *AutomationRegistryLogicBTransactor) WithdrawFunds(opts *bind.TransactOpts, id *big.Int, to common.Address) (*types.Transaction, error) { return _AutomationRegistryLogicB.contract.Transact(opts, "withdrawFunds", id, to) } @@ -1199,32 +389,160 @@ func (_AutomationRegistryLogicB *AutomationRegistryLogicBTransactorSession) With return _AutomationRegistryLogicB.Contract.WithdrawFunds(&_AutomationRegistryLogicB.TransactOpts, id, to) } -func (_AutomationRegistryLogicB *AutomationRegistryLogicBTransactor) WithdrawOwnerFunds(opts *bind.TransactOpts) (*types.Transaction, error) { - return _AutomationRegistryLogicB.contract.Transact(opts, "withdrawOwnerFunds") +func (_AutomationRegistryLogicB *AutomationRegistryLogicBTransactor) WithdrawLinkFees(opts *bind.TransactOpts, to common.Address, amount *big.Int) (*types.Transaction, error) { + return _AutomationRegistryLogicB.contract.Transact(opts, "withdrawLinkFees", to, amount) +} + +func (_AutomationRegistryLogicB *AutomationRegistryLogicBSession) WithdrawLinkFees(to common.Address, amount *big.Int) (*types.Transaction, error) { + return _AutomationRegistryLogicB.Contract.WithdrawLinkFees(&_AutomationRegistryLogicB.TransactOpts, to, amount) +} + +func (_AutomationRegistryLogicB *AutomationRegistryLogicBTransactorSession) WithdrawLinkFees(to common.Address, amount *big.Int) (*types.Transaction, error) { + return _AutomationRegistryLogicB.Contract.WithdrawLinkFees(&_AutomationRegistryLogicB.TransactOpts, to, amount) +} + +func (_AutomationRegistryLogicB *AutomationRegistryLogicBTransactor) Fallback(opts *bind.TransactOpts, calldata []byte) (*types.Transaction, error) { + return _AutomationRegistryLogicB.contract.RawTransact(opts, calldata) +} + +func (_AutomationRegistryLogicB *AutomationRegistryLogicBSession) Fallback(calldata []byte) (*types.Transaction, error) { + return _AutomationRegistryLogicB.Contract.Fallback(&_AutomationRegistryLogicB.TransactOpts, calldata) +} + +func (_AutomationRegistryLogicB *AutomationRegistryLogicBTransactorSession) Fallback(calldata []byte) (*types.Transaction, error) { + return _AutomationRegistryLogicB.Contract.Fallback(&_AutomationRegistryLogicB.TransactOpts, calldata) +} + +type AutomationRegistryLogicBAdminPrivilegeConfigSetIterator struct { + Event *AutomationRegistryLogicBAdminPrivilegeConfigSet + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *AutomationRegistryLogicBAdminPrivilegeConfigSetIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(AutomationRegistryLogicBAdminPrivilegeConfigSet) + 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(AutomationRegistryLogicBAdminPrivilegeConfigSet) + 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 *AutomationRegistryLogicBAdminPrivilegeConfigSetIterator) Error() error { + return it.fail } -func (_AutomationRegistryLogicB *AutomationRegistryLogicBSession) WithdrawOwnerFunds() (*types.Transaction, error) { - return _AutomationRegistryLogicB.Contract.WithdrawOwnerFunds(&_AutomationRegistryLogicB.TransactOpts) +func (it *AutomationRegistryLogicBAdminPrivilegeConfigSetIterator) Close() error { + it.sub.Unsubscribe() + return nil } -func (_AutomationRegistryLogicB *AutomationRegistryLogicBTransactorSession) WithdrawOwnerFunds() (*types.Transaction, error) { - return _AutomationRegistryLogicB.Contract.WithdrawOwnerFunds(&_AutomationRegistryLogicB.TransactOpts) +type AutomationRegistryLogicBAdminPrivilegeConfigSet struct { + Admin common.Address + PrivilegeConfig []byte + Raw types.Log } -func (_AutomationRegistryLogicB *AutomationRegistryLogicBTransactor) WithdrawPayment(opts *bind.TransactOpts, from common.Address, to common.Address) (*types.Transaction, error) { - return _AutomationRegistryLogicB.contract.Transact(opts, "withdrawPayment", from, to) +func (_AutomationRegistryLogicB *AutomationRegistryLogicBFilterer) FilterAdminPrivilegeConfigSet(opts *bind.FilterOpts, admin []common.Address) (*AutomationRegistryLogicBAdminPrivilegeConfigSetIterator, error) { + + var adminRule []interface{} + for _, adminItem := range admin { + adminRule = append(adminRule, adminItem) + } + + logs, sub, err := _AutomationRegistryLogicB.contract.FilterLogs(opts, "AdminPrivilegeConfigSet", adminRule) + if err != nil { + return nil, err + } + return &AutomationRegistryLogicBAdminPrivilegeConfigSetIterator{contract: _AutomationRegistryLogicB.contract, event: "AdminPrivilegeConfigSet", logs: logs, sub: sub}, nil } -func (_AutomationRegistryLogicB *AutomationRegistryLogicBSession) WithdrawPayment(from common.Address, to common.Address) (*types.Transaction, error) { - return _AutomationRegistryLogicB.Contract.WithdrawPayment(&_AutomationRegistryLogicB.TransactOpts, from, to) +func (_AutomationRegistryLogicB *AutomationRegistryLogicBFilterer) WatchAdminPrivilegeConfigSet(opts *bind.WatchOpts, sink chan<- *AutomationRegistryLogicBAdminPrivilegeConfigSet, admin []common.Address) (event.Subscription, error) { + + var adminRule []interface{} + for _, adminItem := range admin { + adminRule = append(adminRule, adminItem) + } + + logs, sub, err := _AutomationRegistryLogicB.contract.WatchLogs(opts, "AdminPrivilegeConfigSet", adminRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(AutomationRegistryLogicBAdminPrivilegeConfigSet) + if err := _AutomationRegistryLogicB.contract.UnpackLog(event, "AdminPrivilegeConfigSet", 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 (_AutomationRegistryLogicB *AutomationRegistryLogicBTransactorSession) WithdrawPayment(from common.Address, to common.Address) (*types.Transaction, error) { - return _AutomationRegistryLogicB.Contract.WithdrawPayment(&_AutomationRegistryLogicB.TransactOpts, from, to) +func (_AutomationRegistryLogicB *AutomationRegistryLogicBFilterer) ParseAdminPrivilegeConfigSet(log types.Log) (*AutomationRegistryLogicBAdminPrivilegeConfigSet, error) { + event := new(AutomationRegistryLogicBAdminPrivilegeConfigSet) + if err := _AutomationRegistryLogicB.contract.UnpackLog(event, "AdminPrivilegeConfigSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil } -type AutomationRegistryLogicBAdminPrivilegeConfigSetIterator struct { - Event *AutomationRegistryLogicBAdminPrivilegeConfigSet +type AutomationRegistryLogicBBillingConfigSetIterator struct { + Event *AutomationRegistryLogicBBillingConfigSet contract *bind.BoundContract event string @@ -1235,7 +553,7 @@ type AutomationRegistryLogicBAdminPrivilegeConfigSetIterator struct { fail error } -func (it *AutomationRegistryLogicBAdminPrivilegeConfigSetIterator) Next() bool { +func (it *AutomationRegistryLogicBBillingConfigSetIterator) Next() bool { if it.fail != nil { return false @@ -1244,7 +562,7 @@ func (it *AutomationRegistryLogicBAdminPrivilegeConfigSetIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(AutomationRegistryLogicBAdminPrivilegeConfigSet) + it.Event = new(AutomationRegistryLogicBBillingConfigSet) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1259,7 +577,7 @@ func (it *AutomationRegistryLogicBAdminPrivilegeConfigSetIterator) Next() bool { select { case log := <-it.logs: - it.Event = new(AutomationRegistryLogicBAdminPrivilegeConfigSet) + it.Event = new(AutomationRegistryLogicBBillingConfigSet) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1274,43 +592,43 @@ func (it *AutomationRegistryLogicBAdminPrivilegeConfigSetIterator) Next() bool { } } -func (it *AutomationRegistryLogicBAdminPrivilegeConfigSetIterator) Error() error { +func (it *AutomationRegistryLogicBBillingConfigSetIterator) Error() error { return it.fail } -func (it *AutomationRegistryLogicBAdminPrivilegeConfigSetIterator) Close() error { +func (it *AutomationRegistryLogicBBillingConfigSetIterator) Close() error { it.sub.Unsubscribe() return nil } -type AutomationRegistryLogicBAdminPrivilegeConfigSet struct { - Admin common.Address - PrivilegeConfig []byte - Raw types.Log +type AutomationRegistryLogicBBillingConfigSet struct { + Token common.Address + Config AutomationRegistryBase23BillingConfig + Raw types.Log } -func (_AutomationRegistryLogicB *AutomationRegistryLogicBFilterer) FilterAdminPrivilegeConfigSet(opts *bind.FilterOpts, admin []common.Address) (*AutomationRegistryLogicBAdminPrivilegeConfigSetIterator, error) { +func (_AutomationRegistryLogicB *AutomationRegistryLogicBFilterer) FilterBillingConfigSet(opts *bind.FilterOpts, token []common.Address) (*AutomationRegistryLogicBBillingConfigSetIterator, error) { - var adminRule []interface{} - for _, adminItem := range admin { - adminRule = append(adminRule, adminItem) + var tokenRule []interface{} + for _, tokenItem := range token { + tokenRule = append(tokenRule, tokenItem) } - logs, sub, err := _AutomationRegistryLogicB.contract.FilterLogs(opts, "AdminPrivilegeConfigSet", adminRule) + logs, sub, err := _AutomationRegistryLogicB.contract.FilterLogs(opts, "BillingConfigSet", tokenRule) if err != nil { return nil, err } - return &AutomationRegistryLogicBAdminPrivilegeConfigSetIterator{contract: _AutomationRegistryLogicB.contract, event: "AdminPrivilegeConfigSet", logs: logs, sub: sub}, nil + return &AutomationRegistryLogicBBillingConfigSetIterator{contract: _AutomationRegistryLogicB.contract, event: "BillingConfigSet", logs: logs, sub: sub}, nil } -func (_AutomationRegistryLogicB *AutomationRegistryLogicBFilterer) WatchAdminPrivilegeConfigSet(opts *bind.WatchOpts, sink chan<- *AutomationRegistryLogicBAdminPrivilegeConfigSet, admin []common.Address) (event.Subscription, error) { +func (_AutomationRegistryLogicB *AutomationRegistryLogicBFilterer) WatchBillingConfigSet(opts *bind.WatchOpts, sink chan<- *AutomationRegistryLogicBBillingConfigSet, token []common.Address) (event.Subscription, error) { - var adminRule []interface{} - for _, adminItem := range admin { - adminRule = append(adminRule, adminItem) + var tokenRule []interface{} + for _, tokenItem := range token { + tokenRule = append(tokenRule, tokenItem) } - logs, sub, err := _AutomationRegistryLogicB.contract.WatchLogs(opts, "AdminPrivilegeConfigSet", adminRule) + logs, sub, err := _AutomationRegistryLogicB.contract.WatchLogs(opts, "BillingConfigSet", tokenRule) if err != nil { return nil, err } @@ -1320,8 +638,8 @@ func (_AutomationRegistryLogicB *AutomationRegistryLogicBFilterer) WatchAdminPri select { case log := <-logs: - event := new(AutomationRegistryLogicBAdminPrivilegeConfigSet) - if err := _AutomationRegistryLogicB.contract.UnpackLog(event, "AdminPrivilegeConfigSet", log); err != nil { + event := new(AutomationRegistryLogicBBillingConfigSet) + if err := _AutomationRegistryLogicB.contract.UnpackLog(event, "BillingConfigSet", log); err != nil { return err } event.Raw = log @@ -1342,9 +660,9 @@ func (_AutomationRegistryLogicB *AutomationRegistryLogicBFilterer) WatchAdminPri }), nil } -func (_AutomationRegistryLogicB *AutomationRegistryLogicBFilterer) ParseAdminPrivilegeConfigSet(log types.Log) (*AutomationRegistryLogicBAdminPrivilegeConfigSet, error) { - event := new(AutomationRegistryLogicBAdminPrivilegeConfigSet) - if err := _AutomationRegistryLogicB.contract.UnpackLog(event, "AdminPrivilegeConfigSet", log); err != nil { +func (_AutomationRegistryLogicB *AutomationRegistryLogicBFilterer) ParseBillingConfigSet(log types.Log) (*AutomationRegistryLogicBBillingConfigSet, error) { + event := new(AutomationRegistryLogicBBillingConfigSet) + if err := _AutomationRegistryLogicB.contract.UnpackLog(event, "BillingConfigSet", log); err != nil { return nil, err } event.Raw = log @@ -1723,8 +1041,8 @@ func (_AutomationRegistryLogicB *AutomationRegistryLogicBFilterer) ParseDedupKey return event, nil } -type AutomationRegistryLogicBFundsAddedIterator struct { - Event *AutomationRegistryLogicBFundsAdded +type AutomationRegistryLogicBFeesWithdrawnIterator struct { + Event *AutomationRegistryLogicBFeesWithdrawn contract *bind.BoundContract event string @@ -1735,7 +1053,7 @@ type AutomationRegistryLogicBFundsAddedIterator struct { fail error } -func (it *AutomationRegistryLogicBFundsAddedIterator) Next() bool { +func (it *AutomationRegistryLogicBFeesWithdrawnIterator) Next() bool { if it.fail != nil { return false @@ -1744,7 +1062,7 @@ func (it *AutomationRegistryLogicBFundsAddedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(AutomationRegistryLogicBFundsAdded) + it.Event = new(AutomationRegistryLogicBFeesWithdrawn) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1759,7 +1077,7 @@ func (it *AutomationRegistryLogicBFundsAddedIterator) Next() bool { select { case log := <-it.logs: - it.Event = new(AutomationRegistryLogicBFundsAdded) + it.Event = new(AutomationRegistryLogicBFeesWithdrawn) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1774,52 +1092,52 @@ func (it *AutomationRegistryLogicBFundsAddedIterator) Next() bool { } } -func (it *AutomationRegistryLogicBFundsAddedIterator) Error() error { +func (it *AutomationRegistryLogicBFeesWithdrawnIterator) Error() error { return it.fail } -func (it *AutomationRegistryLogicBFundsAddedIterator) Close() error { +func (it *AutomationRegistryLogicBFeesWithdrawnIterator) Close() error { it.sub.Unsubscribe() return nil } -type AutomationRegistryLogicBFundsAdded struct { - Id *big.Int - From common.Address - Amount *big.Int - Raw types.Log +type AutomationRegistryLogicBFeesWithdrawn struct { + Recipient common.Address + AssetAddress common.Address + Amount *big.Int + Raw types.Log } -func (_AutomationRegistryLogicB *AutomationRegistryLogicBFilterer) FilterFundsAdded(opts *bind.FilterOpts, id []*big.Int, from []common.Address) (*AutomationRegistryLogicBFundsAddedIterator, error) { +func (_AutomationRegistryLogicB *AutomationRegistryLogicBFilterer) FilterFeesWithdrawn(opts *bind.FilterOpts, recipient []common.Address, assetAddress []common.Address) (*AutomationRegistryLogicBFeesWithdrawnIterator, error) { - var idRule []interface{} - for _, idItem := range id { - idRule = append(idRule, idItem) + var recipientRule []interface{} + for _, recipientItem := range recipient { + recipientRule = append(recipientRule, recipientItem) } - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) + var assetAddressRule []interface{} + for _, assetAddressItem := range assetAddress { + assetAddressRule = append(assetAddressRule, assetAddressItem) } - logs, sub, err := _AutomationRegistryLogicB.contract.FilterLogs(opts, "FundsAdded", idRule, fromRule) + logs, sub, err := _AutomationRegistryLogicB.contract.FilterLogs(opts, "FeesWithdrawn", recipientRule, assetAddressRule) if err != nil { return nil, err } - return &AutomationRegistryLogicBFundsAddedIterator{contract: _AutomationRegistryLogicB.contract, event: "FundsAdded", logs: logs, sub: sub}, nil + return &AutomationRegistryLogicBFeesWithdrawnIterator{contract: _AutomationRegistryLogicB.contract, event: "FeesWithdrawn", logs: logs, sub: sub}, nil } -func (_AutomationRegistryLogicB *AutomationRegistryLogicBFilterer) WatchFundsAdded(opts *bind.WatchOpts, sink chan<- *AutomationRegistryLogicBFundsAdded, id []*big.Int, from []common.Address) (event.Subscription, error) { +func (_AutomationRegistryLogicB *AutomationRegistryLogicBFilterer) WatchFeesWithdrawn(opts *bind.WatchOpts, sink chan<- *AutomationRegistryLogicBFeesWithdrawn, recipient []common.Address, assetAddress []common.Address) (event.Subscription, error) { - var idRule []interface{} - for _, idItem := range id { - idRule = append(idRule, idItem) + var recipientRule []interface{} + for _, recipientItem := range recipient { + recipientRule = append(recipientRule, recipientItem) } - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) + var assetAddressRule []interface{} + for _, assetAddressItem := range assetAddress { + assetAddressRule = append(assetAddressRule, assetAddressItem) } - logs, sub, err := _AutomationRegistryLogicB.contract.WatchLogs(opts, "FundsAdded", idRule, fromRule) + logs, sub, err := _AutomationRegistryLogicB.contract.WatchLogs(opts, "FeesWithdrawn", recipientRule, assetAddressRule) if err != nil { return nil, err } @@ -1829,8 +1147,8 @@ func (_AutomationRegistryLogicB *AutomationRegistryLogicBFilterer) WatchFundsAdd select { case log := <-logs: - event := new(AutomationRegistryLogicBFundsAdded) - if err := _AutomationRegistryLogicB.contract.UnpackLog(event, "FundsAdded", log); err != nil { + event := new(AutomationRegistryLogicBFeesWithdrawn) + if err := _AutomationRegistryLogicB.contract.UnpackLog(event, "FeesWithdrawn", log); err != nil { return err } event.Raw = log @@ -1851,17 +1169,17 @@ func (_AutomationRegistryLogicB *AutomationRegistryLogicBFilterer) WatchFundsAdd }), nil } -func (_AutomationRegistryLogicB *AutomationRegistryLogicBFilterer) ParseFundsAdded(log types.Log) (*AutomationRegistryLogicBFundsAdded, error) { - event := new(AutomationRegistryLogicBFundsAdded) - if err := _AutomationRegistryLogicB.contract.UnpackLog(event, "FundsAdded", log); err != nil { +func (_AutomationRegistryLogicB *AutomationRegistryLogicBFilterer) ParseFeesWithdrawn(log types.Log) (*AutomationRegistryLogicBFeesWithdrawn, error) { + event := new(AutomationRegistryLogicBFeesWithdrawn) + if err := _AutomationRegistryLogicB.contract.UnpackLog(event, "FeesWithdrawn", log); err != nil { return nil, err } event.Raw = log return event, nil } -type AutomationRegistryLogicBFundsWithdrawnIterator struct { - Event *AutomationRegistryLogicBFundsWithdrawn +type AutomationRegistryLogicBFundsAddedIterator struct { + Event *AutomationRegistryLogicBFundsAdded contract *bind.BoundContract event string @@ -1872,7 +1190,7 @@ type AutomationRegistryLogicBFundsWithdrawnIterator struct { fail error } -func (it *AutomationRegistryLogicBFundsWithdrawnIterator) Next() bool { +func (it *AutomationRegistryLogicBFundsAddedIterator) Next() bool { if it.fail != nil { return false @@ -1881,7 +1199,7 @@ func (it *AutomationRegistryLogicBFundsWithdrawnIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(AutomationRegistryLogicBFundsWithdrawn) + it.Event = new(AutomationRegistryLogicBFundsAdded) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1896,7 +1214,7 @@ func (it *AutomationRegistryLogicBFundsWithdrawnIterator) Next() bool { select { case log := <-it.logs: - it.Event = new(AutomationRegistryLogicBFundsWithdrawn) + it.Event = new(AutomationRegistryLogicBFundsAdded) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1911,44 +1229,52 @@ func (it *AutomationRegistryLogicBFundsWithdrawnIterator) Next() bool { } } -func (it *AutomationRegistryLogicBFundsWithdrawnIterator) Error() error { +func (it *AutomationRegistryLogicBFundsAddedIterator) Error() error { return it.fail } -func (it *AutomationRegistryLogicBFundsWithdrawnIterator) Close() error { +func (it *AutomationRegistryLogicBFundsAddedIterator) Close() error { it.sub.Unsubscribe() return nil } -type AutomationRegistryLogicBFundsWithdrawn struct { +type AutomationRegistryLogicBFundsAdded struct { Id *big.Int + From common.Address Amount *big.Int - To common.Address Raw types.Log } -func (_AutomationRegistryLogicB *AutomationRegistryLogicBFilterer) FilterFundsWithdrawn(opts *bind.FilterOpts, id []*big.Int) (*AutomationRegistryLogicBFundsWithdrawnIterator, error) { +func (_AutomationRegistryLogicB *AutomationRegistryLogicBFilterer) FilterFundsAdded(opts *bind.FilterOpts, id []*big.Int, from []common.Address) (*AutomationRegistryLogicBFundsAddedIterator, error) { var idRule []interface{} for _, idItem := range id { idRule = append(idRule, idItem) } + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } - logs, sub, err := _AutomationRegistryLogicB.contract.FilterLogs(opts, "FundsWithdrawn", idRule) + logs, sub, err := _AutomationRegistryLogicB.contract.FilterLogs(opts, "FundsAdded", idRule, fromRule) if err != nil { return nil, err } - return &AutomationRegistryLogicBFundsWithdrawnIterator{contract: _AutomationRegistryLogicB.contract, event: "FundsWithdrawn", logs: logs, sub: sub}, nil + return &AutomationRegistryLogicBFundsAddedIterator{contract: _AutomationRegistryLogicB.contract, event: "FundsAdded", logs: logs, sub: sub}, nil } -func (_AutomationRegistryLogicB *AutomationRegistryLogicBFilterer) WatchFundsWithdrawn(opts *bind.WatchOpts, sink chan<- *AutomationRegistryLogicBFundsWithdrawn, id []*big.Int) (event.Subscription, error) { +func (_AutomationRegistryLogicB *AutomationRegistryLogicBFilterer) WatchFundsAdded(opts *bind.WatchOpts, sink chan<- *AutomationRegistryLogicBFundsAdded, id []*big.Int, from []common.Address) (event.Subscription, error) { var idRule []interface{} for _, idItem := range id { idRule = append(idRule, idItem) } + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } - logs, sub, err := _AutomationRegistryLogicB.contract.WatchLogs(opts, "FundsWithdrawn", idRule) + logs, sub, err := _AutomationRegistryLogicB.contract.WatchLogs(opts, "FundsAdded", idRule, fromRule) if err != nil { return nil, err } @@ -1958,8 +1284,8 @@ func (_AutomationRegistryLogicB *AutomationRegistryLogicBFilterer) WatchFundsWit select { case log := <-logs: - event := new(AutomationRegistryLogicBFundsWithdrawn) - if err := _AutomationRegistryLogicB.contract.UnpackLog(event, "FundsWithdrawn", log); err != nil { + event := new(AutomationRegistryLogicBFundsAdded) + if err := _AutomationRegistryLogicB.contract.UnpackLog(event, "FundsAdded", log); err != nil { return err } event.Raw = log @@ -1980,17 +1306,17 @@ func (_AutomationRegistryLogicB *AutomationRegistryLogicBFilterer) WatchFundsWit }), nil } -func (_AutomationRegistryLogicB *AutomationRegistryLogicBFilterer) ParseFundsWithdrawn(log types.Log) (*AutomationRegistryLogicBFundsWithdrawn, error) { - event := new(AutomationRegistryLogicBFundsWithdrawn) - if err := _AutomationRegistryLogicB.contract.UnpackLog(event, "FundsWithdrawn", log); err != nil { +func (_AutomationRegistryLogicB *AutomationRegistryLogicBFilterer) ParseFundsAdded(log types.Log) (*AutomationRegistryLogicBFundsAdded, error) { + event := new(AutomationRegistryLogicBFundsAdded) + if err := _AutomationRegistryLogicB.contract.UnpackLog(event, "FundsAdded", log); err != nil { return nil, err } event.Raw = log return event, nil } -type AutomationRegistryLogicBInsufficientFundsUpkeepReportIterator struct { - Event *AutomationRegistryLogicBInsufficientFundsUpkeepReport +type AutomationRegistryLogicBFundsWithdrawnIterator struct { + Event *AutomationRegistryLogicBFundsWithdrawn contract *bind.BoundContract event string @@ -2001,7 +1327,7 @@ type AutomationRegistryLogicBInsufficientFundsUpkeepReportIterator struct { fail error } -func (it *AutomationRegistryLogicBInsufficientFundsUpkeepReportIterator) Next() bool { +func (it *AutomationRegistryLogicBFundsWithdrawnIterator) Next() bool { if it.fail != nil { return false @@ -2010,7 +1336,7 @@ func (it *AutomationRegistryLogicBInsufficientFundsUpkeepReportIterator) Next() if it.done { select { case log := <-it.logs: - it.Event = new(AutomationRegistryLogicBInsufficientFundsUpkeepReport) + it.Event = new(AutomationRegistryLogicBFundsWithdrawn) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -2025,7 +1351,7 @@ func (it *AutomationRegistryLogicBInsufficientFundsUpkeepReportIterator) Next() select { case log := <-it.logs: - it.Event = new(AutomationRegistryLogicBInsufficientFundsUpkeepReport) + it.Event = new(AutomationRegistryLogicBFundsWithdrawn) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -2040,43 +1366,44 @@ func (it *AutomationRegistryLogicBInsufficientFundsUpkeepReportIterator) Next() } } -func (it *AutomationRegistryLogicBInsufficientFundsUpkeepReportIterator) Error() error { +func (it *AutomationRegistryLogicBFundsWithdrawnIterator) Error() error { return it.fail } -func (it *AutomationRegistryLogicBInsufficientFundsUpkeepReportIterator) Close() error { +func (it *AutomationRegistryLogicBFundsWithdrawnIterator) Close() error { it.sub.Unsubscribe() return nil } -type AutomationRegistryLogicBInsufficientFundsUpkeepReport struct { - Id *big.Int - Trigger []byte - Raw types.Log +type AutomationRegistryLogicBFundsWithdrawn struct { + Id *big.Int + Amount *big.Int + To common.Address + Raw types.Log } -func (_AutomationRegistryLogicB *AutomationRegistryLogicBFilterer) FilterInsufficientFundsUpkeepReport(opts *bind.FilterOpts, id []*big.Int) (*AutomationRegistryLogicBInsufficientFundsUpkeepReportIterator, error) { +func (_AutomationRegistryLogicB *AutomationRegistryLogicBFilterer) FilterFundsWithdrawn(opts *bind.FilterOpts, id []*big.Int) (*AutomationRegistryLogicBFundsWithdrawnIterator, error) { var idRule []interface{} for _, idItem := range id { idRule = append(idRule, idItem) } - logs, sub, err := _AutomationRegistryLogicB.contract.FilterLogs(opts, "InsufficientFundsUpkeepReport", idRule) + logs, sub, err := _AutomationRegistryLogicB.contract.FilterLogs(opts, "FundsWithdrawn", idRule) if err != nil { return nil, err } - return &AutomationRegistryLogicBInsufficientFundsUpkeepReportIterator{contract: _AutomationRegistryLogicB.contract, event: "InsufficientFundsUpkeepReport", logs: logs, sub: sub}, nil + return &AutomationRegistryLogicBFundsWithdrawnIterator{contract: _AutomationRegistryLogicB.contract, event: "FundsWithdrawn", logs: logs, sub: sub}, nil } -func (_AutomationRegistryLogicB *AutomationRegistryLogicBFilterer) WatchInsufficientFundsUpkeepReport(opts *bind.WatchOpts, sink chan<- *AutomationRegistryLogicBInsufficientFundsUpkeepReport, id []*big.Int) (event.Subscription, error) { +func (_AutomationRegistryLogicB *AutomationRegistryLogicBFilterer) WatchFundsWithdrawn(opts *bind.WatchOpts, sink chan<- *AutomationRegistryLogicBFundsWithdrawn, id []*big.Int) (event.Subscription, error) { var idRule []interface{} for _, idItem := range id { idRule = append(idRule, idItem) } - logs, sub, err := _AutomationRegistryLogicB.contract.WatchLogs(opts, "InsufficientFundsUpkeepReport", idRule) + logs, sub, err := _AutomationRegistryLogicB.contract.WatchLogs(opts, "FundsWithdrawn", idRule) if err != nil { return nil, err } @@ -2086,8 +1413,8 @@ func (_AutomationRegistryLogicB *AutomationRegistryLogicBFilterer) WatchInsuffic select { case log := <-logs: - event := new(AutomationRegistryLogicBInsufficientFundsUpkeepReport) - if err := _AutomationRegistryLogicB.contract.UnpackLog(event, "InsufficientFundsUpkeepReport", log); err != nil { + event := new(AutomationRegistryLogicBFundsWithdrawn) + if err := _AutomationRegistryLogicB.contract.UnpackLog(event, "FundsWithdrawn", log); err != nil { return err } event.Raw = log @@ -2108,17 +1435,17 @@ func (_AutomationRegistryLogicB *AutomationRegistryLogicBFilterer) WatchInsuffic }), nil } -func (_AutomationRegistryLogicB *AutomationRegistryLogicBFilterer) ParseInsufficientFundsUpkeepReport(log types.Log) (*AutomationRegistryLogicBInsufficientFundsUpkeepReport, error) { - event := new(AutomationRegistryLogicBInsufficientFundsUpkeepReport) - if err := _AutomationRegistryLogicB.contract.UnpackLog(event, "InsufficientFundsUpkeepReport", log); err != nil { +func (_AutomationRegistryLogicB *AutomationRegistryLogicBFilterer) ParseFundsWithdrawn(log types.Log) (*AutomationRegistryLogicBFundsWithdrawn, error) { + event := new(AutomationRegistryLogicBFundsWithdrawn) + if err := _AutomationRegistryLogicB.contract.UnpackLog(event, "FundsWithdrawn", log); err != nil { return nil, err } event.Raw = log return event, nil } -type AutomationRegistryLogicBOwnerFundsWithdrawnIterator struct { - Event *AutomationRegistryLogicBOwnerFundsWithdrawn +type AutomationRegistryLogicBInsufficientFundsUpkeepReportIterator struct { + Event *AutomationRegistryLogicBInsufficientFundsUpkeepReport contract *bind.BoundContract event string @@ -2129,7 +1456,7 @@ type AutomationRegistryLogicBOwnerFundsWithdrawnIterator struct { fail error } -func (it *AutomationRegistryLogicBOwnerFundsWithdrawnIterator) Next() bool { +func (it *AutomationRegistryLogicBInsufficientFundsUpkeepReportIterator) Next() bool { if it.fail != nil { return false @@ -2138,7 +1465,7 @@ func (it *AutomationRegistryLogicBOwnerFundsWithdrawnIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(AutomationRegistryLogicBOwnerFundsWithdrawn) + it.Event = new(AutomationRegistryLogicBInsufficientFundsUpkeepReport) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -2153,7 +1480,7 @@ func (it *AutomationRegistryLogicBOwnerFundsWithdrawnIterator) Next() bool { select { case log := <-it.logs: - it.Event = new(AutomationRegistryLogicBOwnerFundsWithdrawn) + it.Event = new(AutomationRegistryLogicBInsufficientFundsUpkeepReport) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -2168,32 +1495,43 @@ func (it *AutomationRegistryLogicBOwnerFundsWithdrawnIterator) Next() bool { } } -func (it *AutomationRegistryLogicBOwnerFundsWithdrawnIterator) Error() error { +func (it *AutomationRegistryLogicBInsufficientFundsUpkeepReportIterator) Error() error { return it.fail } -func (it *AutomationRegistryLogicBOwnerFundsWithdrawnIterator) Close() error { +func (it *AutomationRegistryLogicBInsufficientFundsUpkeepReportIterator) Close() error { it.sub.Unsubscribe() return nil } -type AutomationRegistryLogicBOwnerFundsWithdrawn struct { - Amount *big.Int - Raw types.Log +type AutomationRegistryLogicBInsufficientFundsUpkeepReport struct { + Id *big.Int + Trigger []byte + Raw types.Log } -func (_AutomationRegistryLogicB *AutomationRegistryLogicBFilterer) FilterOwnerFundsWithdrawn(opts *bind.FilterOpts) (*AutomationRegistryLogicBOwnerFundsWithdrawnIterator, error) { +func (_AutomationRegistryLogicB *AutomationRegistryLogicBFilterer) FilterInsufficientFundsUpkeepReport(opts *bind.FilterOpts, id []*big.Int) (*AutomationRegistryLogicBInsufficientFundsUpkeepReportIterator, error) { + + var idRule []interface{} + for _, idItem := range id { + idRule = append(idRule, idItem) + } - logs, sub, err := _AutomationRegistryLogicB.contract.FilterLogs(opts, "OwnerFundsWithdrawn") + logs, sub, err := _AutomationRegistryLogicB.contract.FilterLogs(opts, "InsufficientFundsUpkeepReport", idRule) if err != nil { return nil, err } - return &AutomationRegistryLogicBOwnerFundsWithdrawnIterator{contract: _AutomationRegistryLogicB.contract, event: "OwnerFundsWithdrawn", logs: logs, sub: sub}, nil + return &AutomationRegistryLogicBInsufficientFundsUpkeepReportIterator{contract: _AutomationRegistryLogicB.contract, event: "InsufficientFundsUpkeepReport", logs: logs, sub: sub}, nil } -func (_AutomationRegistryLogicB *AutomationRegistryLogicBFilterer) WatchOwnerFundsWithdrawn(opts *bind.WatchOpts, sink chan<- *AutomationRegistryLogicBOwnerFundsWithdrawn) (event.Subscription, error) { +func (_AutomationRegistryLogicB *AutomationRegistryLogicBFilterer) WatchInsufficientFundsUpkeepReport(opts *bind.WatchOpts, sink chan<- *AutomationRegistryLogicBInsufficientFundsUpkeepReport, id []*big.Int) (event.Subscription, error) { + + var idRule []interface{} + for _, idItem := range id { + idRule = append(idRule, idItem) + } - logs, sub, err := _AutomationRegistryLogicB.contract.WatchLogs(opts, "OwnerFundsWithdrawn") + logs, sub, err := _AutomationRegistryLogicB.contract.WatchLogs(opts, "InsufficientFundsUpkeepReport", idRule) if err != nil { return nil, err } @@ -2203,8 +1541,8 @@ func (_AutomationRegistryLogicB *AutomationRegistryLogicBFilterer) WatchOwnerFun select { case log := <-logs: - event := new(AutomationRegistryLogicBOwnerFundsWithdrawn) - if err := _AutomationRegistryLogicB.contract.UnpackLog(event, "OwnerFundsWithdrawn", log); err != nil { + event := new(AutomationRegistryLogicBInsufficientFundsUpkeepReport) + if err := _AutomationRegistryLogicB.contract.UnpackLog(event, "InsufficientFundsUpkeepReport", log); err != nil { return err } event.Raw = log @@ -2225,9 +1563,9 @@ func (_AutomationRegistryLogicB *AutomationRegistryLogicBFilterer) WatchOwnerFun }), nil } -func (_AutomationRegistryLogicB *AutomationRegistryLogicBFilterer) ParseOwnerFundsWithdrawn(log types.Log) (*AutomationRegistryLogicBOwnerFundsWithdrawn, error) { - event := new(AutomationRegistryLogicBOwnerFundsWithdrawn) - if err := _AutomationRegistryLogicB.contract.UnpackLog(event, "OwnerFundsWithdrawn", log); err != nil { +func (_AutomationRegistryLogicB *AutomationRegistryLogicBFilterer) ParseInsufficientFundsUpkeepReport(log types.Log) (*AutomationRegistryLogicBInsufficientFundsUpkeepReport, error) { + event := new(AutomationRegistryLogicBInsufficientFundsUpkeepReport) + if err := _AutomationRegistryLogicB.contract.UnpackLog(event, "InsufficientFundsUpkeepReport", log); err != nil { return nil, err } event.Raw = log @@ -5397,43 +4735,26 @@ func (_AutomationRegistryLogicB *AutomationRegistryLogicBFilterer) ParseUpkeepUn return event, nil } -type GetSignerInfo struct { - Active bool - Index uint8 -} -type GetState struct { - State AutomationRegistryBase23State - Config AutomationRegistryBase23OnchainConfigLegacy - Signers []common.Address - Transmitters []common.Address - F uint8 -} -type GetTransmitterInfo struct { - Active bool - Index uint8 - Balance *big.Int - LastCollected *big.Int - Payee common.Address -} - func (_AutomationRegistryLogicB *AutomationRegistryLogicB) ParseLog(log types.Log) (generated.AbigenLog, error) { switch log.Topics[0] { case _AutomationRegistryLogicB.abi.Events["AdminPrivilegeConfigSet"].ID: return _AutomationRegistryLogicB.ParseAdminPrivilegeConfigSet(log) + case _AutomationRegistryLogicB.abi.Events["BillingConfigSet"].ID: + return _AutomationRegistryLogicB.ParseBillingConfigSet(log) case _AutomationRegistryLogicB.abi.Events["CancelledUpkeepReport"].ID: return _AutomationRegistryLogicB.ParseCancelledUpkeepReport(log) case _AutomationRegistryLogicB.abi.Events["ChainSpecificModuleUpdated"].ID: return _AutomationRegistryLogicB.ParseChainSpecificModuleUpdated(log) case _AutomationRegistryLogicB.abi.Events["DedupKeyAdded"].ID: return _AutomationRegistryLogicB.ParseDedupKeyAdded(log) + case _AutomationRegistryLogicB.abi.Events["FeesWithdrawn"].ID: + return _AutomationRegistryLogicB.ParseFeesWithdrawn(log) case _AutomationRegistryLogicB.abi.Events["FundsAdded"].ID: return _AutomationRegistryLogicB.ParseFundsAdded(log) case _AutomationRegistryLogicB.abi.Events["FundsWithdrawn"].ID: return _AutomationRegistryLogicB.ParseFundsWithdrawn(log) case _AutomationRegistryLogicB.abi.Events["InsufficientFundsUpkeepReport"].ID: return _AutomationRegistryLogicB.ParseInsufficientFundsUpkeepReport(log) - case _AutomationRegistryLogicB.abi.Events["OwnerFundsWithdrawn"].ID: - return _AutomationRegistryLogicB.ParseOwnerFundsWithdrawn(log) case _AutomationRegistryLogicB.abi.Events["OwnershipTransferRequested"].ID: return _AutomationRegistryLogicB.ParseOwnershipTransferRequested(log) case _AutomationRegistryLogicB.abi.Events["OwnershipTransferred"].ID: @@ -5492,6 +4813,10 @@ func (AutomationRegistryLogicBAdminPrivilegeConfigSet) Topic() common.Hash { return common.HexToHash("0x7c44b4eb59ee7873514e7e43e7718c269d872965938b288aa143befca62f99d2") } +func (AutomationRegistryLogicBBillingConfigSet) Topic() common.Hash { + return common.HexToHash("0x720a5849025dc4fd0061aed1bb30efd713cde64ce7f8d807953ecca27c8f143c") +} + func (AutomationRegistryLogicBCancelledUpkeepReport) Topic() common.Hash { return common.HexToHash("0xc3237c8807c467c1b39b8d0395eff077313e691bf0a7388106792564ebfd5636") } @@ -5504,6 +4829,10 @@ func (AutomationRegistryLogicBDedupKeyAdded) Topic() common.Hash { return common.HexToHash("0xa4a4e334c0e330143f9437484fe516c13bc560b86b5b0daf58e7084aaac228f2") } +func (AutomationRegistryLogicBFeesWithdrawn) Topic() common.Hash { + return common.HexToHash("0x5e110f8bc8a20b65dcc87f224bdf1cc039346e267118bae2739847f07321ffa8") +} + func (AutomationRegistryLogicBFundsAdded) Topic() common.Hash { return common.HexToHash("0xafd24114486da8ebfc32f3626dada8863652e187461aa74d4bfa734891506203") } @@ -5516,10 +4845,6 @@ func (AutomationRegistryLogicBInsufficientFundsUpkeepReport) Topic() common.Hash return common.HexToHash("0x377c8b0c126ae5248d27aca1c76fac4608aff85673ee3caf09747e1044549e02") } -func (AutomationRegistryLogicBOwnerFundsWithdrawn) Topic() common.Hash { - return common.HexToHash("0x1d07d0b0be43d3e5fee41a80b579af370affee03fa595bf56d5d4c19328162f1") -} - func (AutomationRegistryLogicBOwnershipTransferRequested) Topic() common.Hash { return common.HexToHash("0xed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae1278") } @@ -5621,119 +4946,39 @@ func (_AutomationRegistryLogicB *AutomationRegistryLogicB) Address() common.Addr } type AutomationRegistryLogicBInterface interface { - GetActiveUpkeepIDs(opts *bind.CallOpts, startIndex *big.Int, maxCount *big.Int) ([]*big.Int, error) - - GetAdminPrivilegeConfig(opts *bind.CallOpts, admin common.Address) ([]byte, error) - - GetAllowedReadOnlyAddress(opts *bind.CallOpts) (common.Address, error) - - GetAutomationForwarderLogic(opts *bind.CallOpts) (common.Address, error) - - GetBalance(opts *bind.CallOpts, id *big.Int) (*big.Int, error) - - GetCancellationDelay(opts *bind.CallOpts) (*big.Int, error) - - GetChainModule(opts *bind.CallOpts) (common.Address, error) - - GetConditionalGasOverhead(opts *bind.CallOpts) (*big.Int, error) - - GetFastGasFeedAddress(opts *bind.CallOpts) (common.Address, error) - - GetForwarder(opts *bind.CallOpts, upkeepID *big.Int) (common.Address, error) - - GetLinkAddress(opts *bind.CallOpts) (common.Address, error) - - GetLinkNativeFeedAddress(opts *bind.CallOpts) (common.Address, error) - - GetLogGasOverhead(opts *bind.CallOpts) (*big.Int, error) - - GetMaxPaymentForGas(opts *bind.CallOpts, triggerType uint8, gasLimit uint32) (*big.Int, error) - - GetMinBalance(opts *bind.CallOpts, id *big.Int) (*big.Int, error) - - GetMinBalanceForUpkeep(opts *bind.CallOpts, id *big.Int) (*big.Int, error) - - GetPeerRegistryMigrationPermission(opts *bind.CallOpts, peer common.Address) (uint8, error) - - GetPerPerformByteGasOverhead(opts *bind.CallOpts) (*big.Int, error) - - GetPerSignerGasOverhead(opts *bind.CallOpts) (*big.Int, error) - - GetReorgProtectionEnabled(opts *bind.CallOpts) (bool, error) + FallbackTo(opts *bind.CallOpts) (common.Address, error) - GetSignerInfo(opts *bind.CallOpts, query common.Address) (GetSignerInfo, - - error) - - GetState(opts *bind.CallOpts) (GetState, - - error) - - GetTransmitCalldataFixedBytesOverhead(opts *bind.CallOpts) (*big.Int, error) - - GetTransmitCalldataPerSignerBytesOverhead(opts *bind.CallOpts) (*big.Int, error) - - GetTransmitterInfo(opts *bind.CallOpts, query common.Address) (GetTransmitterInfo, - - error) - - GetTriggerType(opts *bind.CallOpts, upkeepId *big.Int) (uint8, error) - - GetUpkeep(opts *bind.CallOpts, id *big.Int) (AutomationRegistryBase23UpkeepInfo, error) - - GetUpkeepPrivilegeConfig(opts *bind.CallOpts, upkeepId *big.Int) ([]byte, error) - - GetUpkeepTriggerConfig(opts *bind.CallOpts, upkeepId *big.Int) ([]byte, error) - - HasDedupKey(opts *bind.CallOpts, dedupKey [32]byte) (bool, error) + LinkAvailableForPayment(opts *bind.CallOpts) (*big.Int, error) Owner(opts *bind.CallOpts) (common.Address, error) - UpkeepTranscoderVersion(opts *bind.CallOpts) (uint8, error) - - UpkeepVersion(opts *bind.CallOpts) (uint8, error) - AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) - AcceptPayeeship(opts *bind.TransactOpts, transmitter common.Address) (*types.Transaction, error) - AcceptUpkeepAdmin(opts *bind.TransactOpts, id *big.Int) (*types.Transaction, error) - Pause(opts *bind.TransactOpts) (*types.Transaction, error) - PauseUpkeep(opts *bind.TransactOpts, id *big.Int) (*types.Transaction, error) - RecoverFunds(opts *bind.TransactOpts) (*types.Transaction, error) - - SetAdminPrivilegeConfig(opts *bind.TransactOpts, admin common.Address, newPrivilegeConfig []byte) (*types.Transaction, error) - - SetPayees(opts *bind.TransactOpts, payees []common.Address) (*types.Transaction, error) - - SetPeerRegistryMigrationPermission(opts *bind.TransactOpts, peer common.Address, permission uint8) (*types.Transaction, error) - SetUpkeepCheckData(opts *bind.TransactOpts, id *big.Int, newCheckData []byte) (*types.Transaction, error) SetUpkeepGasLimit(opts *bind.TransactOpts, id *big.Int, gasLimit uint32) (*types.Transaction, error) SetUpkeepOffchainConfig(opts *bind.TransactOpts, id *big.Int, config []byte) (*types.Transaction, error) - SetUpkeepPrivilegeConfig(opts *bind.TransactOpts, upkeepId *big.Int, newPrivilegeConfig []byte) (*types.Transaction, error) + SetUpkeepTriggerConfig(opts *bind.TransactOpts, id *big.Int, triggerConfig []byte) (*types.Transaction, error) TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) - TransferPayeeship(opts *bind.TransactOpts, transmitter common.Address, proposed common.Address) (*types.Transaction, error) - TransferUpkeepAdmin(opts *bind.TransactOpts, id *big.Int, proposed common.Address) (*types.Transaction, error) - Unpause(opts *bind.TransactOpts) (*types.Transaction, error) - UnpauseUpkeep(opts *bind.TransactOpts, id *big.Int) (*types.Transaction, error) + WithdrawERC20Fees(opts *bind.TransactOpts, assetAddress common.Address, to common.Address, amount *big.Int) (*types.Transaction, error) + WithdrawFunds(opts *bind.TransactOpts, id *big.Int, to common.Address) (*types.Transaction, error) - WithdrawOwnerFunds(opts *bind.TransactOpts) (*types.Transaction, error) + WithdrawLinkFees(opts *bind.TransactOpts, to common.Address, amount *big.Int) (*types.Transaction, error) - WithdrawPayment(opts *bind.TransactOpts, from common.Address, to common.Address) (*types.Transaction, error) + Fallback(opts *bind.TransactOpts, calldata []byte) (*types.Transaction, error) FilterAdminPrivilegeConfigSet(opts *bind.FilterOpts, admin []common.Address) (*AutomationRegistryLogicBAdminPrivilegeConfigSetIterator, error) @@ -5741,6 +4986,12 @@ type AutomationRegistryLogicBInterface interface { ParseAdminPrivilegeConfigSet(log types.Log) (*AutomationRegistryLogicBAdminPrivilegeConfigSet, error) + FilterBillingConfigSet(opts *bind.FilterOpts, token []common.Address) (*AutomationRegistryLogicBBillingConfigSetIterator, error) + + WatchBillingConfigSet(opts *bind.WatchOpts, sink chan<- *AutomationRegistryLogicBBillingConfigSet, token []common.Address) (event.Subscription, error) + + ParseBillingConfigSet(log types.Log) (*AutomationRegistryLogicBBillingConfigSet, error) + FilterCancelledUpkeepReport(opts *bind.FilterOpts, id []*big.Int) (*AutomationRegistryLogicBCancelledUpkeepReportIterator, error) WatchCancelledUpkeepReport(opts *bind.WatchOpts, sink chan<- *AutomationRegistryLogicBCancelledUpkeepReport, id []*big.Int) (event.Subscription, error) @@ -5759,6 +5010,12 @@ type AutomationRegistryLogicBInterface interface { ParseDedupKeyAdded(log types.Log) (*AutomationRegistryLogicBDedupKeyAdded, error) + FilterFeesWithdrawn(opts *bind.FilterOpts, recipient []common.Address, assetAddress []common.Address) (*AutomationRegistryLogicBFeesWithdrawnIterator, error) + + WatchFeesWithdrawn(opts *bind.WatchOpts, sink chan<- *AutomationRegistryLogicBFeesWithdrawn, recipient []common.Address, assetAddress []common.Address) (event.Subscription, error) + + ParseFeesWithdrawn(log types.Log) (*AutomationRegistryLogicBFeesWithdrawn, error) + FilterFundsAdded(opts *bind.FilterOpts, id []*big.Int, from []common.Address) (*AutomationRegistryLogicBFundsAddedIterator, error) WatchFundsAdded(opts *bind.WatchOpts, sink chan<- *AutomationRegistryLogicBFundsAdded, id []*big.Int, from []common.Address) (event.Subscription, error) @@ -5777,12 +5034,6 @@ type AutomationRegistryLogicBInterface interface { ParseInsufficientFundsUpkeepReport(log types.Log) (*AutomationRegistryLogicBInsufficientFundsUpkeepReport, error) - FilterOwnerFundsWithdrawn(opts *bind.FilterOpts) (*AutomationRegistryLogicBOwnerFundsWithdrawnIterator, error) - - WatchOwnerFundsWithdrawn(opts *bind.WatchOpts, sink chan<- *AutomationRegistryLogicBOwnerFundsWithdrawn) (event.Subscription, error) - - ParseOwnerFundsWithdrawn(log types.Log) (*AutomationRegistryLogicBOwnerFundsWithdrawn, error) - FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*AutomationRegistryLogicBOwnershipTransferRequestedIterator, error) WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *AutomationRegistryLogicBOwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) 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 950a6ccd986..0ad2a6fa6fa 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 @@ -30,29 +30,36 @@ var ( _ = abi.ConvertType ) +type AutomationRegistryBase23BillingConfig struct { + GasFeePPB uint32 + FlatFeeMicroLink *big.Int + PriceFeed common.Address + FallbackPrice *big.Int + MinSpend *big.Int +} + type AutomationRegistryBase23OnchainConfig struct { - PaymentPremiumPPB uint32 - FlatFeeMicroLink uint32 CheckGasLimit uint32 StalenessSeconds *big.Int GasCeilingMultiplier uint16 - MinUpkeepSpend *big.Int MaxPerformGas uint32 MaxCheckDataSize uint32 MaxPerformDataSize uint32 MaxRevertDataSize uint32 FallbackGasPrice *big.Int FallbackLinkPrice *big.Int + FallbackNativePrice *big.Int Transcoder common.Address Registrars []common.Address UpkeepPrivilegeManager common.Address ChainModule common.Address ReorgProtectionEnabled bool + FinanceAdmin common.Address } var AutomationRegistryMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"contractAutomationRegistryLogicB2_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\":[],\"name\":\"InvalidDataLength\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidPayee\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidRecipient\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidReport\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidSigner\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTransmitter\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTrigger\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTriggerType\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MaxCheckDataSizeCanOnlyIncrease\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MaxPerformDataSizeCanOnlyIncrease\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MigrationNotPermitted\",\"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\":\"OnlyPausedUpkeep\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlySimulatedBackend\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyUnpausedUpkeep\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ParameterLengthError\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PaymentGreaterThanAllLINK\",\"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\":\"UpkeepAlreadyExists\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UpkeepCancelled\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UpkeepNotCanceled\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UpkeepNotNeeded\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ValueNotChanged\",\"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\"},{\"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\":\"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\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"OwnerFundsWithdrawn\",\"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\":\"nonpayable\",\"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\":\"paymentPremiumPPB\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"flatFeeMicroLink\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"checkGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint24\",\"name\":\"stalenessSeconds\",\"type\":\"uint24\"},{\"internalType\":\"uint16\",\"name\":\"gasCeilingMultiplier\",\"type\":\"uint16\"},{\"internalType\":\"uint96\",\"name\":\"minUpkeepSpend\",\"type\":\"uint96\"},{\"internalType\":\"uint32\",\"name\":\"maxPerformGas\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxCheckDataSize\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxPerformDataSize\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxRevertDataSize\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"fallbackGasPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fallbackLinkPrice\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"transcoder\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"registrars\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"upkeepPrivilegeManager\",\"type\":\"address\"},{\"internalType\":\"contractIChainModule\",\"name\":\"chainModule\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"reorgProtectionEnabled\",\"type\":\"bool\"}],\"internalType\":\"structAutomationRegistryBase2_3.OnchainConfig\",\"name\":\"onchainConfig\",\"type\":\"tuple\"},{\"internalType\":\"uint64\",\"name\":\"offchainConfigVersion\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"offchainConfig\",\"type\":\"bytes\"}],\"name\":\"setConfigTypeSafe\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"performData\",\"type\":\"bytes\"}],\"name\":\"simulatePerformUpkeep\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"gasUsed\",\"type\":\"uint256\"}],\"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: "0x6101406040523480156200001257600080fd5b50604051620051bb380380620051bb8339810160408190526200003591620003b1565b80816001600160a01b031663ca30e6036040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000075573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200009b9190620003b1565b826001600160a01b031663b10b673c6040518163ffffffff1660e01b8152600401602060405180830381865afa158015620000da573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001009190620003b1565b836001600160a01b0316636709d0e56040518163ffffffff1660e01b8152600401602060405180830381865afa1580156200013f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001659190620003b1565b846001600160a01b0316635425d8ac6040518163ffffffff1660e01b8152600401602060405180830381865afa158015620001a4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001ca9190620003b1565b856001600160a01b031663a08714c06040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000209573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200022f9190620003b1565b3380600081620002865760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620002b957620002b981620002ed565b5050506001600160a01b0394851660805292841660a05290831660c052821660e052811661010052166101205250620003d8565b336001600160a01b03821603620003475760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c6600000000000000000060448201526064016200027d565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6001600160a01b0381168114620003ae57600080fd5b50565b600060208284031215620003c457600080fd5b8151620003d18162000398565b9392505050565b60805160a05160c05160e0516101005161012051614d96620004256000396000818160d6015261016f01526000611b29015260005050600050506000505060006104330152614d966000f3fe608060405234801561001057600080fd5b50600436106100d45760003560e01c8063aed2e92911610081578063e3d0e7121161005b578063e3d0e712146102e0578063f2fde38b146102f3578063f75f6b1114610306576100d4565b8063aed2e92914610262578063afcb95d71461028c578063b1dc65a4146102cd576100d4565b806381ff7048116100b257806381ff7048146101bc5780638da5cb5b14610231578063a4c0ed361461024f576100d4565b8063181f5a771461011b578063349e8cca1461016d57806379ba5097146101b4575b7f00000000000000000000000000000000000000000000000000000000000000003660008037600080366000845af43d6000803e808015610114573d6000f35b3d6000fd5b005b6101576040518060400160405280601881526020017f4175746f6d6174696f6e526567697374727920322e332e30000000000000000081525081565b6040516101649190613a92565b60405180910390f35b7f00000000000000000000000000000000000000000000000000000000000000005b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610164565b610119610319565b61020e60155460115463ffffffff780100000000000000000000000000000000000000000000000083048116937c01000000000000000000000000000000000000000000000000000000009093041691565b6040805163ffffffff948516815293909216602084015290820152606001610164565b60005473ffffffffffffffffffffffffffffffffffffffff1661018f565b61011961025d366004613b20565b61041b565b610275610270366004613b7c565b610637565b604080519215158352602083019190915201610164565b601154601254604080516000815260208101939093527401000000000000000000000000000000000000000090910463ffffffff1690820152606001610164565b6101196102db366004613c0d565b6107ad565b6101196102ee366004613ede565b610ae8565b610119610301366004613fab565b610b11565b6101196103143660046141af565b610b25565b60015473ffffffffffffffffffffffffffffffffffffffff16331461039f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e65720000000000000000000060448201526064015b60405180910390fd5b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b3373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161461048a576040517fc8bad78d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b602081146104c4576040517fdfe9309000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006104d28284018461423e565b60008181526004602052604090205490915065010000000000900463ffffffff9081161461052c576040517f9c0083a200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000818152600460205260409020600101546105679085906c0100000000000000000000000090046bffffffffffffffffffffffff16614286565b600082815260046020526040902060010180546bffffffffffffffffffffffff929092166c01000000000000000000000000027fffffffffffffffff000000000000000000000000ffffffffffffffffffffffff9092169190911790556019546105d29085906142ab565b6019556040516bffffffffffffffffffffffff8516815273ffffffffffffffffffffffffffffffffffffffff86169082907fafd24114486da8ebfc32f3626dada8863652e187461aa74d4bfa7348915062039060200160405180910390a35050505050565b600080610642611b11565b6012547e01000000000000000000000000000000000000000000000000000000000000900460ff16156106a1576040517f24522f3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600085815260046020908152604091829020825160e081018452815460ff811615158252610100810463ffffffff908116838601819052650100000000008304821684880152690100000000000000000090920473ffffffffffffffffffffffffffffffffffffffff16606084018190526001909401546bffffffffffffffffffffffff80821660808601526c0100000000000000000000000082041660a0850152780100000000000000000000000000000000000000000000000090041660c08301528451601f890185900485028101850190955287855290936107a0938990899081908401838280828437600092019190915250611b8292505050565b9097909650945050505050565b60005a60408051610160810182526012546bffffffffffffffffffffffff8116825263ffffffff6c010000000000000000000000008204811660208401527001000000000000000000000000000000008204811693830193909352740100000000000000000000000000000000000000008104909216606082015262ffffff7801000000000000000000000000000000000000000000000000830416608082015261ffff7b0100000000000000000000000000000000000000000000000000000083041660a082015260ff7d0100000000000000000000000000000000000000000000000000000000008304811660c08301527e010000000000000000000000000000000000000000000000000000000000008304811615801560e08401527f01000000000000000000000000000000000000000000000000000000000000009093048116151561010080840191909152601354918216151561012084015273ffffffffffffffffffffffffffffffffffffffff910416610140820152919250610963576040517f24522f3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336000908152600b602052604090205460ff166109ac576040517f1099ed7500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6011548a35146109e8576040517fdfdcf8e700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60c08101516109f89060016142ed565b60ff1686141580610a095750858414155b15610a40576040517f0244f71a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610a508a8a8a8a8a8a8a8a611dab565b6000610a5c8a8a612014565b905060208b0135600881901c63ffffffff16610a798484876120cf565b836060015163ffffffff168163ffffffff161115610ad957601280547fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff167401000000000000000000000000000000000000000063ffffffff8416021790555b50505050505050505050505050565b610b0986868686806020019051810190610b0291906143ac565b8686610b25565b505050505050565b610b19612a4e565b610b2281612acf565b50565b610b2d612a4e565b601f86511115610b69576040517f25d0209c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8360ff16600003610ba6576040517fe77dba5600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b84518651141580610bc55750610bbd84600361452e565b60ff16865111155b15610bfc576040517f1d2d1c5800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b601254600e546bffffffffffffffffffffffff9091169060005b816bffffffffffffffffffffffff16811015610c7e57610c6b600e8281548110610c4257610c426142be565b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff168484612bc4565b5080610c768161454a565b915050610c16565b5060008060005b836bffffffffffffffffffffffff16811015610d8757600d8181548110610cae57610cae6142be565b600091825260209091200154600e805473ffffffffffffffffffffffffffffffffffffffff90921694509082908110610ce957610ce96142be565b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff8681168452600c8352604080852080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00001690559116808452600b90925290912080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055915080610d7f8161454a565b915050610c85565b50610d94600d6000613971565b610da0600e6000613971565b604080516080810182526000808252602082018190529181018290526060810182905290805b8c5181101561120957600c60008e8381518110610de557610de56142be565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff1682528101919091526040016000205460ff1615610e50576040517f77cea0fa00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168d8281518110610e7a57610e7a6142be565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1603610ecf576040517f815e1d6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60405180604001604052806001151581526020018260ff16815250600c60008f8481518110610f0057610f006142be565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff1682528181019290925260400160002082518154939092015160ff16610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff921515929092167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000909316929092171790558b518c9082908110610fa857610fa86142be565b60200260200101519150600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611018576040517f58a70a0a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff82166000908152600b60209081526040918290208251608081018452905460ff80821615801584526101008304909116938301939093526bffffffffffffffffffffffff6201000082048116948301949094526e010000000000000000000000000000900490921660608301529093506110d3576040517f6a7281ad00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001835260ff80821660208086019182526bffffffffffffffffffffffff808b166060880190815273ffffffffffffffffffffffffffffffffffffffff87166000908152600b909352604092839020885181549551948a0151925184166e010000000000000000000000000000027fffffffffffff000000000000000000000000ffffffffffffffffffffffffffff939094166201000002929092167fffffffffffff000000000000000000000000000000000000000000000000ffff94909616610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff921515929092167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000090951694909417179190911692909217919091179055806112018161454a565b915050610dc6565b50508a5161121f9150600d9060208d019061398f565b50885161123390600e9060208c019061398f565b50604051806101600160405280856bffffffffffffffffffffffff168152602001886000015163ffffffff168152602001886020015163ffffffff168152602001600063ffffffff168152602001886060015162ffffff168152602001886080015161ffff1681526020018960ff1681526020016012600001601e9054906101000a900460ff16151581526020016012600001601f9054906101000a900460ff161515815260200188610200015115158152602001886101e0015173ffffffffffffffffffffffffffffffffffffffff16815250601260008201518160000160006101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550602082015181600001600c6101000a81548163ffffffff021916908363ffffffff16021790555060408201518160000160106101000a81548163ffffffff021916908363ffffffff16021790555060608201518160000160146101000a81548163ffffffff021916908363ffffffff16021790555060808201518160000160186101000a81548162ffffff021916908362ffffff16021790555060a082015181600001601b6101000a81548161ffff021916908361ffff16021790555060c082015181600001601d6101000a81548160ff021916908360ff16021790555060e082015181600001601e6101000a81548160ff02191690831515021790555061010082015181600001601f6101000a81548160ff0219169083151502179055506101208201518160010160006101000a81548160ff0219169083151502179055506101408201518160010160016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055509050506040518061018001604052808860a001516bffffffffffffffffffffffff16815260200188610180015173ffffffffffffffffffffffffffffffffffffffff168152602001601460010160009054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff168152602001886040015163ffffffff1681526020018860c0015163ffffffff168152602001601460010160149054906101000a900463ffffffff1663ffffffff168152602001601460010160189054906101000a900463ffffffff1663ffffffff1681526020016014600101601c9054906101000a900463ffffffff1663ffffffff1681526020018860e0015163ffffffff16815260200188610100015163ffffffff16815260200188610120015163ffffffff168152602001886101c0015173ffffffffffffffffffffffffffffffffffffffff16815250601460008201518160000160006101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550602082015181600001600c6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060408201518160010160006101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550606082015181600101600c6101000a81548163ffffffff021916908363ffffffff16021790555060808201518160010160106101000a81548163ffffffff021916908363ffffffff16021790555060a08201518160010160146101000a81548163ffffffff021916908363ffffffff16021790555060c08201518160010160186101000a81548163ffffffff021916908363ffffffff16021790555060e082015181600101601c6101000a81548163ffffffff021916908363ffffffff1602179055506101008201518160020160006101000a81548163ffffffff021916908363ffffffff1602179055506101208201518160020160046101000a81548163ffffffff021916908363ffffffff1602179055506101408201518160020160086101000a81548163ffffffff021916908363ffffffff16021790555061016082015181600201600c6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555090505086610140015160178190555086610160015160188190555060006014600101601c9054906101000a900463ffffffff169050876101e0015173ffffffffffffffffffffffffffffffffffffffff166357e871e76040518163ffffffff1660e01b8152600401602060405180830381865afa1580156118d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118f89190614582565b601580547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167c010000000000000000000000000000000000000000000000000000000063ffffffff9384160217808255600192601891611973918591780100000000000000000000000000000000000000000000000090041661459b565b92506101000a81548163ffffffff021916908363ffffffff1602179055506000886040516020016119a49190614609565b604080518083037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0018152919052601554909150611a0d90469030907801000000000000000000000000000000000000000000000000900463ffffffff168f8f8f878f8f612dcc565b60115560005b611a1d6009612e76565b811015611a4d57611a3a611a32600983612e80565b600990612e93565b5080611a458161454a565b915050611a13565b5060005b896101a0015151811015611aa457611a918a6101a001518281518110611a7957611a796142be565b60200260200101516009612eb590919063ffffffff16565b5080611a9c8161454a565b915050611a51565b507f1591690b8638f5fb2dbec82ac741805ac5da8b45dc5263f4875b0496fdce4e0582601154601460010160189054906101000a900463ffffffff168f8f8f878f8f604051611afb999897969594939291906147ad565b60405180910390a1505050505050505050505050565b3273ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614611b80576040517fb60ac5db00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b60125460009081907f0100000000000000000000000000000000000000000000000000000000000000900460ff1615611be7576040517f37ed32e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b601280547effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f01000000000000000000000000000000000000000000000000000000000000001790556040517f4585e33b0000000000000000000000000000000000000000000000000000000090611c63908590602401613a92565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009094169390931790925290517f79188d1600000000000000000000000000000000000000000000000000000000815290935073ffffffffffffffffffffffffffffffffffffffff8616906379188d1690611d369087908790600401614843565b60408051808303816000875af1158015611d54573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d78919061485c565b601280547effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff16905590969095509350505050565b60008787604051611dbd92919061488a565b604051908190038120611dd4918b9060200161489a565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815282825280516020918201208383019092526000808452908301819052909250906000805b88811015611fab57600185878360208110611e4057611e406142be565b611e4d91901a601b6142ed565b8c8c85818110611e5f57611e5f6142be565b905060200201358b8b86818110611e7857611e786142be565b9050602002013560405160008152602001604052604051611eb5949392919093845260ff9290921660208401526040830152606082015260800190565b6020604051602081039080840390855afa158015611ed7573d6000803e3d6000fd5b5050604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081015173ffffffffffffffffffffffffffffffffffffffff81166000908152600c602090815290849020838501909452925460ff8082161515808552610100909204169383019390935290955093509050611f85576040517f0f4c073700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b826020015160080260ff166001901b840193508080611fa39061454a565b915050611e23565b50827e01010101010101010101010101010101010101010101010101010101010101841614612006576040517fc103be2e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050505050505050505050565b61204d6040518060c001604052806000815260200160008152602001606081526020016060815260200160608152602001606081525090565b600061205b8385018561498b565b604081015151606082015151919250908114158061207e57508082608001515114155b8061208e5750808260a001515114155b156120c5576040517fb55ac75400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5090505b92915050565b600082604001515167ffffffffffffffff8111156120ef576120ef613cc4565b6040519080825280602002602001820160405280156121ab57816020015b604080516101c081018252600060e08201818152610100830182905261012083018290526101408301829052610160830182905261018083018290526101a0830182905282526020808301829052928201819052606082018190526080820181905260a0820181905260c082015282527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90920191018161210d5790505b50905060006040518060800160405280600061ffff1681526020016000815260200160006bffffffffffffffffffffffff16815260200160006bffffffffffffffffffffffff168152509050600085610140015173ffffffffffffffffffffffffffffffffffffffff166357e871e76040518163ffffffff1660e01b8152600401602060405180830381865afa158015612249573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061226d9190614582565b9050600086610140015173ffffffffffffffffffffffffffffffffffffffff166318b8f6136040518163ffffffff1660e01b8152600401602060405180830381865afa1580156122c1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122e59190614582565b905060005b866040015151811015612734576004600088604001518381518110612311576123116142be565b6020908102919091018101518252818101929092526040908101600020815160e081018352815460ff811615158252610100810463ffffffff90811695830195909552650100000000008104851693820193909352690100000000000000000090920473ffffffffffffffffffffffffffffffffffffffff166060830152600101546bffffffffffffffffffffffff80821660808401526c0100000000000000000000000082041660a08301527801000000000000000000000000000000000000000000000000900490911660c082015285518690839081106123f6576123f66142be565b60200260200101516000018190525061242b8760400151828151811061241e5761241e6142be565b6020026020010151612ed7565b85828151811061243d5761243d6142be565b602002602001015160600190600181111561245a5761245a614a78565b9081600181111561246d5761246d614a78565b815250506124d18760400151828151811061248a5761248a6142be565b602002602001015184896080015184815181106124a9576124a96142be565b60200260200101518885815181106124c3576124c36142be565b60200260200101518c612f82565b8683815181106124e3576124e36142be565b6020026020010151602001878481518110612500576125006142be565b602002602001015160c001828152508215151515815250505084818151811061252b5761252b6142be565b6020026020010151602001511561255b5760018460000181815161254f9190614aa7565b61ffff16905250612560565b612722565b6125c6858281518110612575576125756142be565b602002602001015160000151606001518860600151838151811061259b5761259b6142be565b60200260200101518960a0015184815181106125b9576125b96142be565b6020026020010151611b82565b8683815181106125d8576125d86142be565b60200260200101516040018784815181106125f5576125f56142be565b602090810291909101015160800191909152901515905260c088015161261c9060016142ed565b61262a9060ff166040614ac2565b6103a48860a001518381518110612643576126436142be565b60200260200101515161265691906142ab565b61266091906142ab565b858281518110612672576126726142be565b602002602001015160a0018181525050848181518110612694576126946142be565b602002602001015160a00151846020018181516126b191906142ab565b90525084518590829081106126c8576126c86142be565b602002602001015160800151866126df9190614ad9565b9550612722876040015182815181106126fa576126fa6142be565b602002602001015184878481518110612715576127156142be565b60200260200101516130a1565b8061272c8161454a565b9150506122ea565b50825161ffff1660000361274b5750505050505050565b6155f0612759366010614ac2565b5a6127649088614ad9565b61276e91906142ab565b61277891906142ab565b8351909550611b589061278f9061ffff1687614b1b565b61279991906142ab565b945060008060005b88604001515181101561297d578681815181106127c0576127c06142be565b6020026020010151602001511561296b576128598a8a6040015183815181106127eb576127eb6142be565b6020026020010151898481518110612805576128056142be565b6020026020010151608001518c600001518d602001518d8c602001518e8981518110612833576128336142be565b602002602001015160a001518c61284a9190614ac2565b6128549190614b1b565b6131a6565b6060880180519295509093508391612872908390614286565b6bffffffffffffffffffffffff16905250604086018051849190612897908390614286565b6bffffffffffffffffffffffff1690525086518790829081106128bc576128bc6142be565b6020026020010151604001511515896040015182815181106128e0576128e06142be565b60200260200101517fad8cc9579b21dfe2c2f6ea35ba15b656e46b4f5b0cb424f52739b8ce5cac9c5b84866129159190614286565b8a8581518110612927576129276142be565b6020026020010151608001518c8e60800151878151811061294a5761294a6142be565b60200260200101516040516129629493929190614b2f565b60405180910390a35b806129758161454a565b9150506127a1565b505050604083810151336000908152600b6020529190912080546002906129b99084906201000090046bffffffffffffffffffffffff16614286565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055508260600151601260000160008282829054906101000a90046bffffffffffffffffffffffff16612a179190614286565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff16021790555050505050505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314611b80576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e6572000000000000000000006044820152606401610396565b3373ffffffffffffffffffffffffffffffffffffffff821603612b4e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401610396565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600b602090815260408083208151608081018352905460ff80821615801584526101008304909116948301949094526bffffffffffffffffffffffff6201000082048116938301939093526e0100000000000000000000000000009004909116606082015290612dc0576000816060015185612c5c9190614b6c565b90506000612c6a8583614b91565b90508083604001818151612c7e9190614286565b6bffffffffffffffffffffffff16905250612c998582614bbc565b83606001818151612caa9190614286565b6bffffffffffffffffffffffff90811690915273ffffffffffffffffffffffffffffffffffffffff89166000908152600b602090815260409182902087518154928901519389015160608a015186166e010000000000000000000000000000027fffffffffffff000000000000000000000000ffffffffffffffffffffffffffff919096166201000002167fffffffffffff000000000000000000000000000000000000000000000000ffff60ff95909516610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff921515929092167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000909416939093171792909216179190911790555050505b60400151949350505050565b6000808a8a8a8a8a8a8a8a8a604051602001612df099989796959493929190614bec565b604080518083037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe001815291905280516020909101207dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167e01000000000000000000000000000000000000000000000000000000000000179b9a5050505050505050505050565b60006120c9825490565b6000612e8c8383613329565b9392505050565b6000612e8c8373ffffffffffffffffffffffffffffffffffffffff8416613353565b6000612e8c8373ffffffffffffffffffffffffffffffffffffffff841661344d565b6000818160045b600f811015612f64577fff000000000000000000000000000000000000000000000000000000000000008216838260208110612f1c57612f1c6142be565b1a60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614612f5257506000949350505050565b80612f5c8161454a565b915050612ede565b5081600f1a6001811115612f7a57612f7a614a78565b949350505050565b600080808085606001516001811115612f9d57612f9d614a78565b03612fc357612faf888888888861349c565b612fbe57600092509050613097565b61303b565b600185606001516001811115612fdb57612fdb614a78565b03613009576000612fee89898988613627565b92509050806130035750600092509050613097565b5061303b565b6040517ff2b2d41200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b84516040015163ffffffff16871061309057877fc3237c8807c467c1b39b8d0395eff077313e691bf0a7388106792564ebfd56368760405161307d9190613a92565b60405180910390a2600092509050613097565b6001925090505b9550959350505050565b6000816060015160018111156130b9576130b9614a78565b0361311d57600083815260046020526040902060010180547fffffffff00000000ffffffffffffffffffffffffffffffffffffffffffffffff16780100000000000000000000000000000000000000000000000063ffffffff851602179055505050565b60018160600151600181111561313557613135614a78565b036131a15760c08101805160009081526008602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055915191517fa4a4e334c0e330143f9437484fe516c13bc560b86b5b0daf58e7084aaac228f29190a25b505050565b6000806131b9898886868a8a6001613835565b60008a8152600460205260408120600101549294509092506c010000000000000000000000009091046bffffffffffffffffffffffff16906131fb8385614286565b9050836bffffffffffffffffffffffff16826bffffffffffffffffffffffff16101561322f57509150600090508180613262565b806bffffffffffffffffffffffff16826bffffffffffffffffffffffff16101561326257508061325f8482614b6c565b92505b60008a81526004602052604090206001018054829190600c906132a49084906c0100000000000000000000000090046bffffffffffffffffffffffff16614b6c565b82546101009290920a6bffffffffffffffffffffffff81810219909316918316021790915560008c8152600460205260408120600101805485945090926132ed91859116614286565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550505097509795505050505050565b6000826000018281548110613340576133406142be565b9060005260206000200154905092915050565b6000818152600183016020526040812054801561343c576000613377600183614ad9565b855490915060009061338b90600190614ad9565b90508181146133f05760008660000182815481106133ab576133ab6142be565b90600052602060002001549050808760000184815481106133ce576133ce6142be565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061340157613401614c81565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506120c9565b60009150506120c9565b5092915050565b6000818152600183016020526040812054613494575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556120c9565b5060006120c9565b600080848060200190518101906134b39190614cb0565b845160c00151815191925063ffffffff9081169116101561351057867f405288ea7be309e16cfdf481367f90a413e1d4634fcdaf8966546db9b93012e8866040516134fe9190613a92565b60405180910390a2600091505061361e565b82610120015180156135d157506020810151158015906135d15750602081015161014084015182516040517f85df51fd00000000000000000000000000000000000000000000000000000000815263ffffffff909116600482015273ffffffffffffffffffffffffffffffffffffffff909116906385df51fd90602401602060405180830381865afa1580156135aa573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906135ce9190614582565b14155b806135e35750805163ffffffff168611155b1561361857867f6aa7f60c176da7af894b384daea2249497448137f5943c1237ada8bc92bdc301866040516134fe9190613a92565b60019150505b95945050505050565b6000806000848060200190518101906136409190614d08565b90506000878260000151836020015184604001516040516020016136a294939291909384526020840192909252604083015260e01b7fffffffff0000000000000000000000000000000000000000000000000000000016606082015260640190565b604051602081830303815290604052805190602001209050846101200151801561377e575060808201511580159061377e5750608082015161014086015160608401516040517f85df51fd00000000000000000000000000000000000000000000000000000000815263ffffffff909116600482015273ffffffffffffffffffffffffffffffffffffffff909116906385df51fd90602401602060405180830381865afa158015613757573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061377b9190614582565b14155b80613793575086826060015163ffffffff1610155b156137dd57877f6aa7f60c176da7af894b384daea2249497448137f5943c1237ada8bc92bdc301876040516137c89190613a92565b60405180910390a260009350915061382c9050565b60008181526008602052604090205460ff161561382457877f405288ea7be309e16cfdf481367f90a413e1d4634fcdaf8966546db9b93012e8876040516137c89190613a92565b600193509150505b94509492505050565b60008060008960a0015161ffff168661384e9190614ac2565b905083801561385c5750803a105b1561386457503a5b600085886138728b8d6142ab565b61387c9085614ac2565b61388691906142ab565b61389890670de0b6b3a7640000614ac2565b6138a29190614b1b565b905060008b6040015163ffffffff1664e8d4a510006138c19190614ac2565b60208d0151889063ffffffff168b6138d98f88614ac2565b6138e391906142ab565b6138f190633b9aca00614ac2565b6138fb9190614ac2565b6139059190614b1b565b61390f91906142ab565b90506b033b2e3c9fd0803ce800000061392882846142ab565b1115613960576040517f2ad7547a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b909b909a5098505050505050505050565b5080546000825590600052602060002090810190610b229190613a19565b828054828255906000526020600020908101928215613a09579160200282015b82811115613a0957825182547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9091161782556020909201916001909101906139af565b50613a15929150613a19565b5090565b5b80821115613a155760008155600101613a1a565b6000815180845260005b81811015613a5457602081850181015186830182015201613a38565b5060006020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b602081526000612e8c6020830184613a2e565b73ffffffffffffffffffffffffffffffffffffffff81168114610b2257600080fd5b8035613ad281613aa5565b919050565b60008083601f840112613ae957600080fd5b50813567ffffffffffffffff811115613b0157600080fd5b602083019150836020828501011115613b1957600080fd5b9250929050565b60008060008060608587031215613b3657600080fd5b8435613b4181613aa5565b935060208501359250604085013567ffffffffffffffff811115613b6457600080fd5b613b7087828801613ad7565b95989497509550505050565b600080600060408486031215613b9157600080fd5b83359250602084013567ffffffffffffffff811115613baf57600080fd5b613bbb86828701613ad7565b9497909650939450505050565b60008083601f840112613bda57600080fd5b50813567ffffffffffffffff811115613bf257600080fd5b6020830191508360208260051b8501011115613b1957600080fd5b60008060008060008060008060e0898b031215613c2957600080fd5b606089018a811115613c3a57600080fd5b8998503567ffffffffffffffff80821115613c5457600080fd5b613c608c838d01613ad7565b909950975060808b0135915080821115613c7957600080fd5b613c858c838d01613bc8565b909750955060a08b0135915080821115613c9e57600080fd5b50613cab8b828c01613bc8565b999c989b50969995989497949560c00135949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051610220810167ffffffffffffffff81118282101715613d1757613d17613cc4565b60405290565b60405160c0810167ffffffffffffffff81118282101715613d1757613d17613cc4565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715613d8757613d87613cc4565b604052919050565b600067ffffffffffffffff821115613da957613da9613cc4565b5060051b60200190565b600082601f830112613dc457600080fd5b81356020613dd9613dd483613d8f565b613d40565b82815260059290921b84018101918181019086841115613df857600080fd5b8286015b84811015613e1c578035613e0f81613aa5565b8352918301918301613dfc565b509695505050505050565b803560ff81168114613ad257600080fd5b600082601f830112613e4957600080fd5b813567ffffffffffffffff811115613e6357613e63613cc4565b613e9460207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601613d40565b818152846020838601011115613ea957600080fd5b816020850160208301376000918101602001919091529392505050565b803567ffffffffffffffff81168114613ad257600080fd5b60008060008060008060c08789031215613ef757600080fd5b863567ffffffffffffffff80821115613f0f57600080fd5b613f1b8a838b01613db3565b97506020890135915080821115613f3157600080fd5b613f3d8a838b01613db3565b9650613f4b60408a01613e27565b95506060890135915080821115613f6157600080fd5b613f6d8a838b01613e38565b9450613f7b60808a01613ec6565b935060a0890135915080821115613f9157600080fd5b50613f9e89828a01613e38565b9150509295509295509295565b600060208284031215613fbd57600080fd5b8135612e8c81613aa5565b63ffffffff81168114610b2257600080fd5b8035613ad281613fc8565b62ffffff81168114610b2257600080fd5b8035613ad281613fe5565b61ffff81168114610b2257600080fd5b8035613ad281614001565b6bffffffffffffffffffffffff81168114610b2257600080fd5b8035613ad28161401c565b8015158114610b2257600080fd5b8035613ad281614041565b6000610220828403121561406d57600080fd5b614075613cf3565b905061408082613fda565b815261408e60208301613fda565b602082015261409f60408301613fda565b60408201526140b060608301613ff6565b60608201526140c160808301614011565b60808201526140d260a08301614036565b60a08201526140e360c08301613fda565b60c08201526140f460e08301613fda565b60e0820152610100614107818401613fda565b90820152610120614119838201613fda565b9082015261014082810135908201526101608083013590820152610180614141818401613ac7565b908201526101a08281013567ffffffffffffffff81111561416157600080fd5b61416d85828601613db3565b8284015250506101c0614181818401613ac7565b908201526101e0614193838201613ac7565b908201526102006141a583820161404f565b9082015292915050565b60008060008060008060c087890312156141c857600080fd5b863567ffffffffffffffff808211156141e057600080fd5b6141ec8a838b01613db3565b9750602089013591508082111561420257600080fd5b61420e8a838b01613db3565b965061421c60408a01613e27565b9550606089013591508082111561423257600080fd5b613f6d8a838b0161405a565b60006020828403121561425057600080fd5b5035919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6bffffffffffffffffffffffff81811683821601908082111561344657613446614257565b808201808211156120c9576120c9614257565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60ff81811683821601908111156120c9576120c9614257565b8051613ad281613fc8565b8051613ad281613fe5565b8051613ad281614001565b8051613ad28161401c565b8051613ad281613aa5565b600082601f83011261434e57600080fd5b8151602061435e613dd483613d8f565b82815260059290921b8401810191818101908684111561437d57600080fd5b8286015b84811015613e1c57805161439481613aa5565b8352918301918301614381565b8051613ad281614041565b6000602082840312156143be57600080fd5b815167ffffffffffffffff808211156143d657600080fd5b9083019061022082860312156143eb57600080fd5b6143f3613cf3565b6143fc83614306565b815261440a60208401614306565b602082015261441b60408401614306565b604082015261442c60608401614311565b606082015261443d6080840161431c565b608082015261444e60a08401614327565b60a082015261445f60c08401614306565b60c082015261447060e08401614306565b60e0820152610100614483818501614306565b90820152610120614495848201614306565b90820152610140838101519082015261016080840151908201526101806144bd818501614332565b908201526101a083810151838111156144d557600080fd5b6144e18882870161433d565b8284015250506101c091506144f7828401614332565b828201526101e0915061450b828401614332565b82820152610200915061451f8284016143a1565b91810191909152949350505050565b60ff818116838216029081169081811461344657613446614257565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361457b5761457b614257565b5060010190565b60006020828403121561459457600080fd5b5051919050565b63ffffffff81811683821601908082111561344657613446614257565b600081518084526020808501945080840160005b838110156145fe57815173ffffffffffffffffffffffffffffffffffffffff16875295820195908201906001016145cc565b509495945050505050565b6020815261462060208201835163ffffffff169052565b60006020830151614639604084018263ffffffff169052565b50604083015163ffffffff8116606084015250606083015162ffffff8116608084015250608083015161ffff811660a08401525060a08301516bffffffffffffffffffffffff811660c08401525060c083015163ffffffff811660e08401525060e08301516101006146b28185018363ffffffff169052565b84015190506101206146cb8482018363ffffffff169052565b84015190506101406146e48482018363ffffffff169052565b840151610160848101919091528401516101808085019190915284015190506101a06147278185018373ffffffffffffffffffffffffffffffffffffffff169052565b808501519150506102206101c081818601526147476102408601846145b8565b908601519092506101e06147728682018373ffffffffffffffffffffffffffffffffffffffff169052565b860151905061020061479b8682018373ffffffffffffffffffffffffffffffffffffffff169052565b90950151151593019290925250919050565b600061012063ffffffff808d1684528b6020850152808b166040850152508060608401526147dd8184018a6145b8565b905082810360808401526147f181896145b8565b905060ff871660a084015282810360c084015261480e8187613a2e565b905067ffffffffffffffff851660e08401528281036101008401526148338185613a2e565b9c9b505050505050505050505050565b828152604060208201526000612f7a6040830184613a2e565b6000806040838503121561486f57600080fd5b825161487a81614041565b6020939093015192949293505050565b8183823760009101908152919050565b8281526080810160608360208401379392505050565b600082601f8301126148c157600080fd5b813560206148d1613dd483613d8f565b82815260059290921b840181019181810190868411156148f057600080fd5b8286015b84811015613e1c57803583529183019183016148f4565b600082601f83011261491c57600080fd5b8135602061492c613dd483613d8f565b82815260059290921b8401810191818101908684111561494b57600080fd5b8286015b84811015613e1c57803567ffffffffffffffff81111561496f5760008081fd5b61497d8986838b0101613e38565b84525091830191830161494f565b60006020828403121561499d57600080fd5b813567ffffffffffffffff808211156149b557600080fd5b9083019060c082860312156149c957600080fd5b6149d1613d1d565b82358152602083013560208201526040830135828111156149f157600080fd5b6149fd878286016148b0565b604083015250606083013582811115614a1557600080fd5b614a21878286016148b0565b606083015250608083013582811115614a3957600080fd5b614a458782860161490b565b60808301525060a083013582811115614a5d57600080fd5b614a698782860161490b565b60a08301525095945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b61ffff81811683821601908082111561344657613446614257565b80820281158282048414176120c9576120c9614257565b818103818111156120c9576120c9614257565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600082614b2a57614b2a614aec565b500490565b6bffffffffffffffffffffffff85168152836020820152826040820152608060608201526000614b626080830184613a2e565b9695505050505050565b6bffffffffffffffffffffffff82811682821603908082111561344657613446614257565b60006bffffffffffffffffffffffff80841680614bb057614bb0614aec565b92169190910492915050565b6bffffffffffffffffffffffff818116838216028082169190828114614be457614be4614257565b505092915050565b60006101208b835273ffffffffffffffffffffffffffffffffffffffff8b16602084015267ffffffffffffffff808b166040850152816060850152614c338285018b6145b8565b91508382036080850152614c47828a6145b8565b915060ff881660a085015283820360c0850152614c648288613a2e565b90861660e085015283810361010085015290506148338185613a2e565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b600060408284031215614cc257600080fd5b6040516040810181811067ffffffffffffffff82111715614ce557614ce5613cc4565b6040528251614cf381613fc8565b81526020928301519281019290925250919050565b600060a08284031215614d1a57600080fd5b60405160a0810181811067ffffffffffffffff82111715614d3d57614d3d613cc4565b806040525082518152602083015160208201526040830151614d5e81613fc8565b60408201526060830151614d7181613fc8565b6060820152608092830151928101929092525091905056fea164736f6c6343000813000a", + 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\":\"InvalidBillingToken\",\"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\":\"InvalidTransmitter\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTrigger\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTriggerType\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MigrationNotPermitted\",\"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\":\"contractIERC20\",\"name\":\"token\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint32\",\"name\":\"gasFeePPB\",\"type\":\"uint32\"},{\"internalType\":\"uint24\",\"name\":\"flatFeeMicroLink\",\"type\":\"uint24\"},{\"internalType\":\"contractAggregatorV3Interface\",\"name\":\"priceFeed\",\"type\":\"address\"},{\"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\":\"recipient\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"assetAddress\",\"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\":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\":\"nonpayable\",\"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\":\"uint24\",\"name\":\"stalenessSeconds\",\"type\":\"uint24\"},{\"internalType\":\"uint16\",\"name\":\"gasCeilingMultiplier\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"maxPerformGas\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxCheckDataSize\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxPerformDataSize\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxRevertDataSize\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"fallbackGasPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fallbackLinkPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fallbackNativePrice\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"transcoder\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"registrars\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"upkeepPrivilegeManager\",\"type\":\"address\"},{\"internalType\":\"contractIChainModule\",\"name\":\"chainModule\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"reorgProtectionEnabled\",\"type\":\"bool\"},{\"internalType\":\"address\",\"name\":\"financeAdmin\",\"type\":\"address\"}],\"internalType\":\"structAutomationRegistryBase2_3.OnchainConfig\",\"name\":\"onchainConfig\",\"type\":\"tuple\"},{\"internalType\":\"uint64\",\"name\":\"offchainConfigVersion\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"offchainConfig\",\"type\":\"bytes\"},{\"internalType\":\"contractIERC20[]\",\"name\":\"billingTokens\",\"type\":\"address[]\"},{\"components\":[{\"internalType\":\"uint32\",\"name\":\"gasFeePPB\",\"type\":\"uint32\"},{\"internalType\":\"uint24\",\"name\":\"flatFeeMicroLink\",\"type\":\"uint24\"},{\"internalType\":\"contractAggregatorV3Interface\",\"name\":\"priceFeed\",\"type\":\"address\"},{\"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\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"performData\",\"type\":\"bytes\"}],\"name\":\"simulatePerformUpkeep\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"gasUsed\",\"type\":\"uint256\"}],\"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: "0x6101606040523480156200001257600080fd5b5060405162005fd238038062005fd2833981016040819052620000359162000520565b80816001600160a01b031663ca30e6036040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000075573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200009b919062000520565b826001600160a01b031663226cf83c6040518163ffffffff1660e01b8152600401602060405180830381865afa158015620000da573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000100919062000520565b836001600160a01b031663614486af6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156200013f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000165919062000520565b846001600160a01b0316636709d0e56040518163ffffffff1660e01b8152600401602060405180830381865afa158015620001a4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001ca919062000520565b856001600160a01b0316635425d8ac6040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000209573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200022f919062000520565b866001600160a01b031663a08714c06040518163ffffffff1660e01b8152600401602060405180830381865afa1580156200026e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000294919062000520565b3380600081620002eb5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b03848116919091179091558116156200031e576200031e816200045c565b5050506001600160a01b0380871660805285811660a05284811660c081905284821660e05283821661010052908216610120526040805163313ce56760e01b8152905163313ce567916004808201926020929091908290030181865afa1580156200038d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620003b3919062000547565b60ff1660a0516001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015620003f7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200041d919062000547565b60ff16146200043f576040516301f86e1760e41b815260040160405180910390fd5b5050506001600160a01b0390931661014052506200056c92505050565b336001600160a01b03821603620004b65760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401620002e2565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6001600160a01b03811681146200051d57600080fd5b50565b6000602082840312156200053357600080fd5b8151620005408162000507565b9392505050565b6000602082840312156200055a57600080fd5b815160ff811681146200054057600080fd5b60805160a05160c05160e0516101005161012051610140516159f9620005d96000396000818160d6015261016f015260006122ed0152600050506000505060006139910152600050506000818161139e015281816114ab015281816115d6015261162001526159f96000f3fe608060405234801561001057600080fd5b50600436106100d45760003560e01c8063a4c0ed3611610081578063b1dc65a41161005b578063b1dc65a4146102d0578063e3d0e712146102e3578063f2fde38b146102f6576100d4565b8063a4c0ed361461025a578063aed2e9291461026d578063afcb95d714610297576100d4565b806379ba5097116100b257806379ba5097146101c757806381ff7048146101cf5780638da5cb5b1461023c576100d4565b8063181f5a771461011b578063349e8cca1461016d57806350097389146101b4575b7f00000000000000000000000000000000000000000000000000000000000000003660008037600080366000845af43d6000803e808015610114573d6000f35b3d6000fd5b005b6101576040518060400160405280601881526020017f4175746f6d6174696f6e526567697374727920322e332e30000000000000000081525081565b604051610164919061440a565b60405180910390f35b7f00000000000000000000000000000000000000000000000000000000000000005b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610164565b6101196101c236600461497f565b610309565b610119611284565b61021960155460115463ffffffff74010000000000000000000000000000000000000000830481169378010000000000000000000000000000000000000000000000009093041691565b6040805163ffffffff948516815293909216602084015290820152606001610164565b60005473ffffffffffffffffffffffffffffffffffffffff1661018f565b610119610268366004614ae0565b611386565b61028061027b366004614b3c565b6116a1565b604080519215158352602083019190915201610164565b601154601254604080516000815260208101939093526c0100000000000000000000000090910463ffffffff1690820152606001610164565b6101196102de366004614bcd565b611837565b6101196102f1366004614c84565b611b18565b610119610304366004614d51565b611b52565b610311611b66565b601f8851111561034d576040517f25d0209c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8560ff1660000361038a576040517fe77dba5600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b865188511415806103a957506103a1866003614d9d565b60ff16885111155b156103e0576040517f1d2d1c5800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805182511461041b576040517fcf54c06a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6104258282611be9565b60005b600e5481101561049c57610489600e828154811061044857610448614db9565b600091825260209091200154601254600e5473ffffffffffffffffffffffffffffffffffffffff909216916bffffffffffffffffffffffff90911690611fbc565b508061049481614de8565b915050610428565b5060008060005b600e5481101561059957600d81815481106104c0576104c0614db9565b600091825260209091200154600e805473ffffffffffffffffffffffffffffffffffffffff909216945090829081106104fb576104fb614db9565b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff8681168452600c8352604080852080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00001690559116808452600b90925290912080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905591508061059181614de8565b9150506104a3565b506105a6600d60006142f1565b6105b2600e60006142f1565b604080516080810182526000808252602082018190529181018290526060810182905290805b8c51811015610a1e57600c60008e83815181106105f7576105f7614db9565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff1682528101919091526040016000205460ff1615610662576040517f77cea0fa00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168d828151811061068c5761068c614db9565b602002602001015173ffffffffffffffffffffffffffffffffffffffff16036106e1576040517f815e1d6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60405180604001604052806001151581526020018260ff16815250600c60008f848151811061071257610712614db9565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff1682528181019290925260400160002082518154939092015160ff16610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff921515929092167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000909316929092171790558b518c90829081106107ba576107ba614db9565b60200260200101519150600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361082a576040517f58a70a0a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff82166000908152600b60209081526040918290208251608081018452905460ff80821615801584526101008304909116938301939093526bffffffffffffffffffffffff6201000082048116948301949094526e010000000000000000000000000000900490921660608301529093506108e5576040517f6a7281ad00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001835260ff80821660208086019182526012546bffffffffffffffffffffffff9081166060880190815273ffffffffffffffffffffffffffffffffffffffff87166000908152600b909352604092839020885181549551948a0151925184166e010000000000000000000000000000027fffffffffffff000000000000000000000000ffffffffffffffffffffffffffff939094166201000002929092167fffffffffffff000000000000000000000000000000000000000000000000ffff94909616610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff921515929092167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00009095169490941717919091169290921791909117905580610a1681614de8565b9150506105d8565b50508a51610a349150600d9060208d019061430f565b508851610a4890600e9060208c019061430f565b50604051806101200160405280601260000160009054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff168152602001600063ffffffff168152602001886020015162ffffff168152602001886040015161ffff1681526020018960ff168152602001601260000160169054906101000a900460ff1615158152602001601260000160179054906101000a900460ff1615158152602001886101c0015115158152602001886101a0015173ffffffffffffffffffffffffffffffffffffffff16815250601260008201518160000160006101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550602082015181600001600c6101000a81548163ffffffff021916908363ffffffff16021790555060408201518160000160106101000a81548162ffffff021916908362ffffff16021790555060608201518160000160136101000a81548161ffff021916908361ffff16021790555060808201518160000160156101000a81548160ff021916908360ff16021790555060a08201518160000160166101000a81548160ff02191690831515021790555060c08201518160000160176101000a81548160ff02191690831515021790555060e08201518160000160186101000a81548160ff0219169083151502179055506101008201518160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555090505060405180610160016040528088610140015173ffffffffffffffffffffffffffffffffffffffff168152602001886000015163ffffffff168152602001886060015163ffffffff1681526020016014600001601c9054906101000a900463ffffffff1663ffffffff16815260200188610180015173ffffffffffffffffffffffffffffffffffffffff168152602001601460010160149054906101000a900463ffffffff1663ffffffff168152602001601460010160189054906101000a900463ffffffff1663ffffffff168152602001886080015163ffffffff168152602001886101e0015173ffffffffffffffffffffffffffffffffffffffff1681526020018860a0015163ffffffff1681526020018860c0015163ffffffff16815250601460008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160000160146101000a81548163ffffffff021916908363ffffffff16021790555060408201518160000160186101000a81548163ffffffff021916908363ffffffff160217905550606082015181600001601c6101000a81548163ffffffff021916908363ffffffff16021790555060808201518160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060a08201518160010160146101000a81548163ffffffff021916908363ffffffff16021790555060c08201518160010160186101000a81548163ffffffff021916908363ffffffff16021790555060e082015181600101601c6101000a81548163ffffffff021916908363ffffffff1602179055506101008201518160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506101208201518160020160146101000a81548163ffffffff021916908363ffffffff1602179055506101408201518160020160186101000a81548163ffffffff021916908363ffffffff1602179055509050508660e001516017819055508661010001516018819055508661012001516019819055506000601460010160189054906101000a900463ffffffff169050876101a0015173ffffffffffffffffffffffffffffffffffffffff166357e871e76040518163ffffffff1660e01b8152600401602060405180830381865afa15801561104f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110739190614e20565b601580547fffffffff00000000ffffffffffffffffffffffffffffffffffffffffffffffff16780100000000000000000000000000000000000000000000000063ffffffff93841602178082556001926014916110ea91859174010000000000000000000000000000000000000000900416614e39565b92506101000a81548163ffffffff021916908363ffffffff16021790555060008860405160200161111b9190614ea7565b604080518083037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0018152919052601554909150611180904690309074010000000000000000000000000000000000000000900463ffffffff168f8f8f878f8f6121c4565b60115560005b611190600961226e565b8110156111c0576111ad6111a560098361227e565b600990612291565b50806111b881614de8565b915050611186565b5060005b89610160015151811015611217576112048a610160015182815181106111ec576111ec614db9565b602002602001015160096122b390919063ffffffff16565b508061120f81614de8565b9150506111c4565b507f1591690b8638f5fb2dbec82ac741805ac5da8b45dc5263f4875b0496fdce4e0582601154601460010160149054906101000a900463ffffffff168f8f8f878f8f60405161126e9998979695949392919061502e565b60405180910390a1505050505050505050505050565b60015473ffffffffffffffffffffffffffffffffffffffff16331461130a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e65720000000000000000000060448201526064015b60405180910390fd5b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016146113f5576040517fc8bad78d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6020811461142f576040517fdfe9309000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061143d828401846150c4565b60008181526004602052604090205490915065010000000000900463ffffffff90811614611497576040517f9c0083a200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000818152600460205260409020600201547f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff90811691161461151b576040517f1183afea00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008181526004602052604090206001015461155a90859070010000000000000000000000000000000090046bffffffffffffffffffffffff166150dd565b600082815260046020908152604080832060010180546bffffffffffffffffffffffff95909516700100000000000000000000000000000000027fffffffff000000000000000000000000ffffffffffffffffffffffffffffffff9095169490941790935573ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168252601a90522054611609908590615102565b73ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000081166000908152601a602090815260409182902093909355516bffffffffffffffffffffffff871681529087169183917fafd24114486da8ebfc32f3626dada8863652e187461aa74d4bfa734891506203910160405180910390a35050505050565b6000806116ac6122d5565b601254760100000000000000000000000000000000000000000000900460ff1615611703576040517f24522f3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008581526004602090815260409182902082516101008082018552825460ff81161515835263ffffffff918104821683860181905265010000000000820483168488015273ffffffffffffffffffffffffffffffffffffffff690100000000000000000090920482166060850181905260018601546fffffffffffffffffffffffffffffffff811660808701526bffffffffffffffffffffffff70010000000000000000000000000000000082041660a08701527c0100000000000000000000000000000000000000000000000000000000900490931660c08501526002909401541660e08301528451601f8901859004850281018501909552878552909361182a93919291899089908190840183828082843760009201919091525061234492505050565b9097909650945050505050565b60005a60408051610120810182526012546bffffffffffffffffffffffff8116825263ffffffff6c01000000000000000000000000820416602083015262ffffff7001000000000000000000000000000000008204169282019290925261ffff730100000000000000000000000000000000000000830416606082015260ff75010000000000000000000000000000000000000000008304811660808301527601000000000000000000000000000000000000000000008304811615801560a08401527701000000000000000000000000000000000000000000000084048216151560c0840152780100000000000000000000000000000000000000000000000090930416151560e082015260135473ffffffffffffffffffffffffffffffffffffffff1661010082015291925061199b576040517f24522f3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336000908152600b602052604090205460ff166119e4576040517f1099ed7500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6011548a3514611a20576040517fdfdcf8e700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6080810151611a30906001615115565b60ff1686141580611a415750858414155b15611a78576040517f0244f71a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611a888a8a8a8a8a8a8a8a61255f565b6000611a948a8a6127c8565b905060208b0135600881901c63ffffffff16611ab1848487612881565b836020015163ffffffff168163ffffffff161115611b0957601280547fffffffffffffffffffffffffffffffff00000000ffffffffffffffffffffffff166c0100000000000000000000000063ffffffff8416021790555b50505050505050505050505050565b600080600085806020019051810190611b319190615288565b925092509250611b478989898689898888610309565b505050505050505050565b611b5a611b66565b611b63816132bf565b50565b60005473ffffffffffffffffffffffffffffffffffffffff163314611be7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e6572000000000000000000006044820152606401611301565b565b60005b602154811015611ca7576020600060218381548110611c0d57611c0d614db9565b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff168352820192909252604001812080547fffffffffff000000000000000000000000000000000000000000000000000000168155600181019190915560020180547fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016905580611c9f81614de8565b915050611bec565b50611cb4602160006142f1565b60005b8251811015611fb7576000838281518110611cd457611cd4614db9565b602002602001015190506000838381518110611cf257611cf2614db9565b60200260200101519050600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161480611d4f5750604081015173ffffffffffffffffffffffffffffffffffffffff16155b15611d86576040517f8579befe00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff828116600090815260208052604090205467010000000000000090041615611def576040517f357d0cc400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6021805460018082019092557f3a6357012c1a3ae0a17d304c9920310382d968ebcc4b1771f41c6b304205b5700180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff858116918217909255600081815260208080526040918290208651815488840180518a8701805163ffffffff9095167fffffffffffffffffffffffffffffffffffffffffffffffffff00000000000000909416841764010000000062ffffff93841602177fffffffffff0000000000000000000000000000000000000000ffffffffffffff16670100000000000000958b16959095029490941785556060808c0180519b87019b909b556080808d018051600290980180547fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166bffffffffffffffffffffffff998a1617905589519586529351909216968401969096529251909716948101949094529551918301919091529251909216928201929092527f720a5849025dc4fd0061aed1bb30efd713cde64ce7f8d807953ecca27c8f143c9060a00160405180910390a250508080611faf90614de8565b915050611cb7565b505050565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600b602090815260408083208151608081018352905460ff80821615801584526101008304909116948301949094526bffffffffffffffffffffffff6201000082048116938301939093526e01000000000000000000000000000090049091166060820152906121b85760008160600151856120549190615433565b905060006120628583615487565b9050808360400181815161207691906150dd565b6bffffffffffffffffffffffff1690525061209185826154b2565b836060018181516120a291906150dd565b6bffffffffffffffffffffffff90811690915273ffffffffffffffffffffffffffffffffffffffff89166000908152600b602090815260409182902087518154928901519389015160608a015186166e010000000000000000000000000000027fffffffffffff000000000000000000000000ffffffffffffffffffffffffffff919096166201000002167fffffffffffff000000000000000000000000000000000000000000000000ffff60ff95909516610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff921515929092167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000909416939093171792909216179190911790555050505b60400151949350505050565b6000808a8a8a8a8a8a8a8a8a6040516020016121e8999897969594939291906154e2565b604080518083037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe001815291905280516020909101207dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167e01000000000000000000000000000000000000000000000000000000000000179b9a5050505050505050505050565b6000612278825490565b92915050565b600061228a83836133b4565b9392505050565b600061228a8373ffffffffffffffffffffffffffffffffffffffff84166133de565b600061228a8373ffffffffffffffffffffffffffffffffffffffff84166134d8565b3273ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614611be7576040517fb60ac5db00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b601254600090819077010000000000000000000000000000000000000000000000900460ff16156123a1576040517f37ed32e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b601280547fffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffffff16770100000000000000000000000000000000000000000000001790556040517f4585e33b000000000000000000000000000000000000000000000000000000009061241690859060240161440a565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009094169390931790925290517f79188d1600000000000000000000000000000000000000000000000000000000815290935073ffffffffffffffffffffffffffffffffffffffff8616906379188d16906124e99087908790600401615577565b60408051808303816000875af1158015612507573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061252b9190615590565b601280547fffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffffff16905590969095509350505050565b600087876040516125719291906155be565b604051908190038120612588918b906020016155ce565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815282825280516020918201208383019092526000808452908301819052909250906000805b8881101561275f576001858783602081106125f4576125f4614db9565b61260191901a601b615115565b8c8c8581811061261357612613614db9565b905060200201358b8b8681811061262c5761262c614db9565b9050602002013560405160008152602001604052604051612669949392919093845260ff9290921660208401526040830152606082015260800190565b6020604051602081039080840390855afa15801561268b573d6000803e3d6000fd5b5050604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081015173ffffffffffffffffffffffffffffffffffffffff81166000908152600c602090815290849020838501909452925460ff8082161515808552610100909204169383019390935290955093509050612739576040517f0f4c073700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b826020015160080260ff166001901b84019350808061275790614de8565b9150506125d7565b50827e010101010101010101010101010101010101010101010101010101010101018416146127ba576040517fc103be2e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050505050505050505050565b6128016040518060c001604052806000815260200160008152602001606081526020016060815260200160608152602001606081525090565b600061280f838501856156bf565b604081015151606082015151919250908114158061283257508082608001515114155b806128425750808260a001515114155b15612879576040517fb55ac75400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b509392505050565b600082604001515167ffffffffffffffff8111156128a1576128a161441d565b60405190808252806020026020018201604052801561296557816020015b604080516101e081018252600060e08201818152610100830182905261012083018290526101408301829052610160830182905261018083018290526101a083018290526101c0830182905282526020808301829052928201819052606082018190526080820181905260a0820181905260c082015282527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9092019101816128bf5790505b50905060006040518060800160405280600061ffff16815260200160006bffffffffffffffffffffffff16815260200160006bffffffffffffffffffffffff16815260200160008152509050600085610100015173ffffffffffffffffffffffffffffffffffffffff166357e871e76040518163ffffffff1660e01b8152600401602060405180830381865afa158015612a03573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a279190614e20565b9050600086610100015173ffffffffffffffffffffffffffffffffffffffff166318b8f6136040518163ffffffff1660e01b8152600401602060405180830381865afa158015612a7b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a9f9190614e20565b905060005b866040015151811015612f16576004600088604001518381518110612acb57612acb614db9565b602090810291909101810151825281810192909252604090810160002081516101008082018452825460ff81161515835263ffffffff91810482169583019590955265010000000000850481169382019390935273ffffffffffffffffffffffffffffffffffffffff69010000000000000000009094048416606082015260018201546fffffffffffffffffffffffffffffffff811660808301526bffffffffffffffffffffffff70010000000000000000000000000000000082041660a08301527c0100000000000000000000000000000000000000000000000000000000900490921660c08301526002015490911660e08201528551869083908110612bd557612bd5614db9565b602002602001015160000181905250612c0a87604001518281518110612bfd57612bfd614db9565b6020026020010151613527565b858281518110612c1c57612c1c614db9565b6020026020010151606001906001811115612c3957612c396157ac565b90816001811115612c4c57612c4c6157ac565b81525050612cb087604001518281518110612c6957612c69614db9565b60200260200101518489608001518481518110612c8857612c88614db9565b6020026020010151888581518110612ca257612ca2614db9565b60200260200101518c6135d2565b868381518110612cc257612cc2614db9565b6020026020010151602001878481518110612cdf57612cdf614db9565b602002602001015160c0018281525082151515158152505050848181518110612d0a57612d0a614db9565b60200260200101516020015115612d3a57600184600001818151612d2e91906157db565b61ffff16905250612d3f565b612f04565b612da5858281518110612d5457612d54614db9565b6020026020010151600001516060015188606001518381518110612d7a57612d7a614db9565b60200260200101518960a001518481518110612d9857612d98614db9565b6020026020010151612344565b868381518110612db757612db7614db9565b6020026020010151604001878481518110612dd457612dd4614db9565b6020026020010151608001828152508215151515815250505087608001516001612dfe9190615115565b612e0c9060ff1660406157f6565b6103a48860a001518381518110612e2557612e25614db9565b602002602001015151612e389190615102565b612e429190615102565b858281518110612e5457612e54614db9565b602002602001015160a0018181525050848181518110612e7657612e76614db9565b602002602001015160a0015184606001818151612e939190615102565b9052508451859082908110612eaa57612eaa614db9565b60200260200101516080015186612ec1919061580d565b9550612f0487604001518281518110612edc57612edc614db9565b602002602001015184878481518110612ef757612ef7614db9565b60200260200101516136f1565b80612f0e81614de8565b915050612aa4565b50825161ffff16600003612f2d5750505050505050565b6155f0612f3b3660106157f6565b5a612f46908861580d565b612f509190615102565b612f5a9190615102565b8351909550611b5890612f719061ffff1687615820565b612f7b9190615102565b604080516060810182526000808252602082018190529181018290529196505b8760400151518110156131ee57858181518110612fba57612fba614db9565b602002602001015160200151156131dc57612ff689878381518110612fe157612fe1614db9565b60200260200101516000015160e001516137f7565b915060006130c08a6040518061010001604052808a868151811061301c5761301c614db9565b60200260200101516080015181526020018b815260200189606001518b878151811061304a5761304a614db9565b602002602001015160a001518961306191906157f6565b61306b9190615820565b81526020018c6000015181526020018c60200151815260200161308d8e61398a565b81526020810187905260016040918201528c01518051869081106130b3576130b3614db9565b6020026020010151613a74565b90508060600151866040018181516130d891906150dd565b6bffffffffffffffffffffffff1690525060408101516020870180516130ff9083906150dd565b6bffffffffffffffffffffffff16905250865187908390811061312457613124614db9565b60200260200101516040015115158960400151838151811061314857613148614db9565b60200260200101517fad8cc9579b21dfe2c2f6ea35ba15b656e46b4f5b0cb424f52739b8ce5cac9c5b8360600151846040015161318591906150dd565b8a868151811061319757613197614db9565b6020026020010151608001518c8e6080015188815181106131ba576131ba614db9565b60200260200101516040516131d29493929190615834565b60405180910390a3505b806131e681614de8565b915050612f9b565b5050602083810151336000908152600b9092526040909120805460029061322a9084906201000090046bffffffffffffffffffffffff166150dd565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055508260400151601260000160008282829054906101000a90046bffffffffffffffffffffffff1661328891906150dd565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff16021790555050505050505050565b3373ffffffffffffffffffffffffffffffffffffffff82160361333e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401611301565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b60008260000182815481106133cb576133cb614db9565b9060005260206000200154905092915050565b600081815260018301602052604081205480156134c757600061340260018361580d565b85549091506000906134169060019061580d565b905081811461347b57600086600001828154811061343657613436614db9565b906000526020600020015490508087600001848154811061345957613459614db9565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061348c5761348c615871565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050612278565b6000915050612278565b5092915050565b600081815260018301602052604081205461351f57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155612278565b506000612278565b6000818160045b600f8110156135b4577fff00000000000000000000000000000000000000000000000000000000000000821683826020811061356c5761356c614db9565b1a60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916146135a257506000949350505050565b806135ac81614de8565b91505061352e565b5081600f1a60018111156135ca576135ca6157ac565b949350505050565b6000808080856060015160018111156135ed576135ed6157ac565b03613613576135ff8888888888613ce2565b61360e576000925090506136e7565b61368b565b60018560600151600181111561362b5761362b6157ac565b0361365957600061363e89898988613e6c565b925090508061365357506000925090506136e7565b5061368b565b6040517ff2b2d41200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b84516040015163ffffffff1687106136e057877fc3237c8807c467c1b39b8d0395eff077313e691bf0a7388106792564ebfd5636876040516136cd919061440a565b60405180910390a26000925090506136e7565b6001925090505b9550959350505050565b600081606001516001811115613709576137096157ac565b0361376f576000838152600460205260409020600101805463ffffffff84167c0100000000000000000000000000000000000000000000000000000000027bffffffffffffffffffffffffffffffffffffffffffffffffffffffff909116179055505050565b600181606001516001811115613787576137876157ac565b03611fb75760c08101805160009081526008602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055915191517fa4a4e334c0e330143f9437484fe516c13bc560b86b5b0daf58e7084aaac228f29190a2505050565b604080516060810182526000808252602082018190529181019190915273ffffffffffffffffffffffffffffffffffffffff808316600090815260208080526040808320815160a08082018452825463ffffffff808216845262ffffff6401000000008304168488018190526701000000000000009092048916848701908152600186015460608601526002909501546bffffffffffffffffffffffff1660808501529589015281519094168752905182517ffeaf968c00000000000000000000000000000000000000000000000000000000815292519195859491169263feaf968c92600482810193928290030181865afa1580156138fb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061391f91906158ba565b5093505092505060008213158061393557508042105b8061396557506000866040015162ffffff161180156139655750613959814261580d565b866040015162ffffff16105b156139795760608301516040850152613981565b604084018290525b50505092915050565b60008060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa1580156139fa573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613a1e91906158ba565b50935050925050600082131580613a3457508042105b80613a6457506000846040015162ffffff16118015613a645750613a58814261580d565b846040015162ffffff16105b156134d157505060195492915050565b604080516080810182526000808252602082018190529181018290526060810182905290613aa28585614079565b60008481526004602090815260408220600101549083015183519394507001000000000000000000000000000000009091046bffffffffffffffffffffffff1692613aed91906150dd565b905082600001516bffffffffffffffffffffffff16826bffffffffffffffffffffffff161015613b7257819050613b5386608001518760c0015160400151846bffffffffffffffffffffffff16613b4491906157f6565b613b4e9190615820565b61424f565b6bffffffffffffffffffffffff16604084015260006060840152613bfe565b806bffffffffffffffffffffffff16826bffffffffffffffffffffffff161015613bfe57819050613bea83604001516bffffffffffffffffffffffff1687608001518860c0015160400151856bffffffffffffffffffffffff16613bd691906157f6565b613be09190615820565b613b4e919061580d565b6bffffffffffffffffffffffff1660608401525b60008581526004602052604090206001018054829190601090613c4490849070010000000000000000000000000000000090046bffffffffffffffffffffffff16615433565b82546101009290920a6bffffffffffffffffffffffff81810219909316918316021790915560008781526004602052604081206001018054928516935091613c9f9084906fffffffffffffffffffffffffffffffff1661590a565b92506101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff1602179055508293505050509392505050565b60008084806020019051810190613cf99190615933565b845160c00151815191925063ffffffff90811691161015613d5657867f405288ea7be309e16cfdf481367f90a413e1d4634fcdaf8966546db9b93012e886604051613d44919061440a565b60405180910390a26000915050613e63565b8260e001518015613e165750602081015115801590613e165750602081015161010084015182516040517f85df51fd00000000000000000000000000000000000000000000000000000000815263ffffffff909116600482015273ffffffffffffffffffffffffffffffffffffffff909116906385df51fd90602401602060405180830381865afa158015613def573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613e139190614e20565b14155b80613e285750805163ffffffff168611155b15613e5d57867f6aa7f60c176da7af894b384daea2249497448137f5943c1237ada8bc92bdc30186604051613d44919061440a565b60019150505b95945050505050565b600080600084806020019051810190613e85919061598b565b9050600087826000015183602001518460400151604051602001613ee794939291909384526020840192909252604083015260e01b7fffffffff0000000000000000000000000000000000000000000000000000000016606082015260640190565b6040516020818303038152906040528051906020012090508460e001518015613fc25750608082015115801590613fc25750608082015161010086015160608401516040517f85df51fd00000000000000000000000000000000000000000000000000000000815263ffffffff909116600482015273ffffffffffffffffffffffffffffffffffffffff909116906385df51fd90602401602060405180830381865afa158015613f9b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613fbf9190614e20565b14155b80613fd7575086826060015163ffffffff1610155b1561402157877f6aa7f60c176da7af894b384daea2249497448137f5943c1237ada8bc92bdc3018760405161400c919061440a565b60405180910390a26000935091506140709050565b60008181526008602052604090205460ff161561406857877f405288ea7be309e16cfdf481367f90a413e1d4634fcdaf8966546db9b93012e88760405161400c919061440a565b600193509150505b94509492505050565b6040805160808101825260008082526020820181905291810182905260608101919091526000836060015161ffff1683606001516140b791906157f6565b90508260e0015180156140c95750803a105b156140d157503a5b60008360a001518460400151856020015186600001516140f19190615102565b6140fb90856157f6565b6141059190615102565b61410f91906157f6565b90506141288460c001516040015182613b4e9190615820565b6bffffffffffffffffffffffff168352608084015161414b90613b4e9083615820565b6bffffffffffffffffffffffff166040840152608084015160c085015160200151600091906141849062ffffff1664e8d4a510006157f6565b61418e91906157f6565b9050600081633b9aca008760a001518860c001516000015163ffffffff1689604001518a60000151896141c191906157f6565b6141cb9190615102565b6141d591906157f6565b6141df91906157f6565b6141e99190615820565b6141f39190615102565b905061420c8660c001516040015182613b4e9190615820565b6bffffffffffffffffffffffff166020860152608086015161423290613b4e9083615820565b6bffffffffffffffffffffffff1660608601525050505092915050565b60006bffffffffffffffffffffffff8211156142ed576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203960448201527f36206269747300000000000000000000000000000000000000000000000000006064820152608401611301565b5090565b5080546000825590600052602060002090810190611b639190614391565b828054828255906000526020600020908101928215614389579160200282015b8281111561438957825182547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff90911617825560209092019160019091019061432f565b506142ed9291505b5b808211156142ed5760008155600101614392565b6000815180845260005b818110156143cc576020818501810151868301820152016143b0565b5060006020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b60208152600061228a60208301846143a6565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051610200810167ffffffffffffffff811182821017156144705761447061441d565b60405290565b60405160a0810167ffffffffffffffff811182821017156144705761447061441d565b60405160c0810167ffffffffffffffff811182821017156144705761447061441d565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156145035761450361441d565b604052919050565b600067ffffffffffffffff8211156145255761452561441d565b5060051b60200190565b73ffffffffffffffffffffffffffffffffffffffff81168114611b6357600080fd5b803561455c8161452f565b919050565b600082601f83011261457257600080fd5b813560206145876145828361450b565b6144bc565b82815260059290921b840181019181810190868411156145a657600080fd5b8286015b848110156145ca5780356145bd8161452f565b83529183019183016145aa565b509695505050505050565b803560ff8116811461455c57600080fd5b63ffffffff81168114611b6357600080fd5b803561455c816145e6565b62ffffff81168114611b6357600080fd5b803561455c81614603565b61ffff81168114611b6357600080fd5b803561455c8161461f565b8015158114611b6357600080fd5b803561455c8161463a565b6000610200828403121561466657600080fd5b61466e61444c565b9050614679826145f8565b815261468760208301614614565b60208201526146986040830161462f565b60408201526146a9606083016145f8565b60608201526146ba608083016145f8565b60808201526146cb60a083016145f8565b60a08201526146dc60c083016145f8565b60c082015260e082810135908201526101008083013590820152610120808301359082015261014061470f818401614551565b908201526101608281013567ffffffffffffffff81111561472f57600080fd5b61473b85828601614561565b82840152505061018061474f818401614551565b908201526101a0614761838201614551565b908201526101c0614773838201614648565b908201526101e0614785838201614551565b9082015292915050565b803567ffffffffffffffff8116811461455c57600080fd5b600082601f8301126147b857600080fd5b813567ffffffffffffffff8111156147d2576147d261441d565b61480360207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116016144bc565b81815284602083860101111561481857600080fd5b816020850160208301376000918101602001919091529392505050565b600082601f83011261484657600080fd5b813560206148566145828361450b565b82815260059290921b8401810191818101908684111561487557600080fd5b8286015b848110156145ca57803561488c8161452f565b8352918301918301614879565b6bffffffffffffffffffffffff81168114611b6357600080fd5b600082601f8301126148c457600080fd5b813560206148d46145828361450b565b82815260a092830285018201928282019190878511156148f357600080fd5b8387015b858110156149725781818a03121561490f5760008081fd5b614917614476565b8135614922816145e6565b81528186013561493181614603565b818701526040828101356149448161452f565b908201526060828101359082015260808083013561496181614899565b9082015284529284019281016148f7565b5090979650505050505050565b600080600080600080600080610100898b03121561499c57600080fd5b883567ffffffffffffffff808211156149b457600080fd5b6149c08c838d01614561565b995060208b01359150808211156149d657600080fd5b6149e28c838d01614561565b98506149f060408c016145d5565b975060608b0135915080821115614a0657600080fd5b614a128c838d01614653565b9650614a2060808c0161478f565b955060a08b0135915080821115614a3657600080fd5b614a428c838d016147a7565b945060c08b0135915080821115614a5857600080fd5b614a648c838d01614835565b935060e08b0135915080821115614a7a57600080fd5b50614a878b828c016148b3565b9150509295985092959890939650565b60008083601f840112614aa957600080fd5b50813567ffffffffffffffff811115614ac157600080fd5b602083019150836020828501011115614ad957600080fd5b9250929050565b60008060008060608587031215614af657600080fd5b8435614b018161452f565b935060208501359250604085013567ffffffffffffffff811115614b2457600080fd5b614b3087828801614a97565b95989497509550505050565b600080600060408486031215614b5157600080fd5b83359250602084013567ffffffffffffffff811115614b6f57600080fd5b614b7b86828701614a97565b9497909650939450505050565b60008083601f840112614b9a57600080fd5b50813567ffffffffffffffff811115614bb257600080fd5b6020830191508360208260051b8501011115614ad957600080fd5b60008060008060008060008060e0898b031215614be957600080fd5b606089018a811115614bfa57600080fd5b8998503567ffffffffffffffff80821115614c1457600080fd5b614c208c838d01614a97565b909950975060808b0135915080821115614c3957600080fd5b614c458c838d01614b88565b909750955060a08b0135915080821115614c5e57600080fd5b50614c6b8b828c01614b88565b999c989b50969995989497949560c00135949350505050565b60008060008060008060c08789031215614c9d57600080fd5b863567ffffffffffffffff80821115614cb557600080fd5b614cc18a838b01614561565b97506020890135915080821115614cd757600080fd5b614ce38a838b01614561565b9650614cf160408a016145d5565b95506060890135915080821115614d0757600080fd5b614d138a838b016147a7565b9450614d2160808a0161478f565b935060a0890135915080821115614d3757600080fd5b50614d4489828a016147a7565b9150509295509295509295565b600060208284031215614d6357600080fd5b813561228a8161452f565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60ff81811683821602908116908181146134d1576134d1614d6e565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203614e1957614e19614d6e565b5060010190565b600060208284031215614e3257600080fd5b5051919050565b63ffffffff8181168382160190808211156134d1576134d1614d6e565b600081518084526020808501945080840160005b83811015614e9c57815173ffffffffffffffffffffffffffffffffffffffff1687529582019590820190600101614e6a565b509495945050505050565b60208152614ebe60208201835163ffffffff169052565b60006020830151614ed6604084018262ffffff169052565b50604083015161ffff8116606084015250606083015163ffffffff8116608084015250608083015163ffffffff811660a08401525060a083015163ffffffff811660c08401525060c083015163ffffffff811660e08401525060e0830151610100838101919091528301516101208084019190915283015161014080840191909152830151610160614f7f8185018373ffffffffffffffffffffffffffffffffffffffff169052565b808501519150506102006101808181860152614f9f610220860184614e56565b908601519092506101a0614fca8682018373ffffffffffffffffffffffffffffffffffffffff169052565b86015190506101c0614ff38682018373ffffffffffffffffffffffffffffffffffffffff169052565b86015190506101e06150088682018315159052565b9095015173ffffffffffffffffffffffffffffffffffffffff1693019290925250919050565b600061012063ffffffff808d1684528b6020850152808b1660408501525080606084015261505e8184018a614e56565b905082810360808401526150728189614e56565b905060ff871660a084015282810360c084015261508f81876143a6565b905067ffffffffffffffff851660e08401528281036101008401526150b481856143a6565b9c9b505050505050505050505050565b6000602082840312156150d657600080fd5b5035919050565b6bffffffffffffffffffffffff8181168382160190808211156134d1576134d1614d6e565b8082018082111561227857612278614d6e565b60ff818116838216019081111561227857612278614d6e565b805161455c816145e6565b805161455c81614603565b805161455c8161461f565b805161455c8161452f565b600082601f83011261516b57600080fd5b8151602061517b6145828361450b565b82815260059290921b8401810191818101908684111561519a57600080fd5b8286015b848110156145ca5780516151b18161452f565b835291830191830161519e565b805161455c8161463a565b600082601f8301126151da57600080fd5b815160206151ea6145828361450b565b82815260a0928302850182019282820191908785111561520957600080fd5b8387015b858110156149725781818a0312156152255760008081fd5b61522d614476565b8151615238816145e6565b81528186015161524781614603565b8187015260408281015161525a8161452f565b908201526060828101519082015260808083015161527781614899565b90820152845292840192810161520d565b60008060006060848603121561529d57600080fd5b835167ffffffffffffffff808211156152b557600080fd5b9085019061020082880312156152ca57600080fd5b6152d261444c565b6152db8361512e565b81526152e960208401615139565b60208201526152fa60408401615144565b604082015261530b6060840161512e565b606082015261531c6080840161512e565b608082015261532d60a0840161512e565b60a082015261533e60c0840161512e565b60c082015260e083810151908201526101008084015190820152610120808401519082015261014061537181850161514f565b90820152610160838101518381111561538957600080fd5b6153958a82870161515a565b8284015250506101806153a981850161514f565b908201526101a06153bb84820161514f565b908201526101c06153cd8482016151be565b908201526101e06153df84820161514f565b9082015260208701519095509150808211156153fa57600080fd5b6154068783880161515a565b9350604086015191508082111561541c57600080fd5b50615429868287016151c9565b9150509250925092565b6bffffffffffffffffffffffff8281168282160390808211156134d1576134d1614d6e565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60006bffffffffffffffffffffffff808416806154a6576154a6615458565b92169190910492915050565b6bffffffffffffffffffffffff8181168382160280821691908281146154da576154da614d6e565b505092915050565b60006101208b835273ffffffffffffffffffffffffffffffffffffffff8b16602084015267ffffffffffffffff808b1660408501528160608501526155298285018b614e56565b9150838203608085015261553d828a614e56565b915060ff881660a085015283820360c085015261555a82886143a6565b90861660e085015283810361010085015290506150b481856143a6565b8281526040602082015260006135ca60408301846143a6565b600080604083850312156155a357600080fd5b82516155ae8161463a565b6020939093015192949293505050565b8183823760009101908152919050565b8281526080810160608360208401379392505050565b600082601f8301126155f557600080fd5b813560206156056145828361450b565b82815260059290921b8401810191818101908684111561562457600080fd5b8286015b848110156145ca5780358352918301918301615628565b600082601f83011261565057600080fd5b813560206156606145828361450b565b82815260059290921b8401810191818101908684111561567f57600080fd5b8286015b848110156145ca57803567ffffffffffffffff8111156156a35760008081fd5b6156b18986838b01016147a7565b845250918301918301615683565b6000602082840312156156d157600080fd5b813567ffffffffffffffff808211156156e957600080fd5b9083019060c082860312156156fd57600080fd5b615705614499565b823581526020830135602082015260408301358281111561572557600080fd5b615731878286016155e4565b60408301525060608301358281111561574957600080fd5b615755878286016155e4565b60608301525060808301358281111561576d57600080fd5b6157798782860161563f565b60808301525060a08301358281111561579157600080fd5b61579d8782860161563f565b60a08301525095945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b61ffff8181168382160190808211156134d1576134d1614d6e565b808202811582820484141761227857612278614d6e565b8181038181111561227857612278614d6e565b60008261582f5761582f615458565b500490565b6bffffffffffffffffffffffff8516815283602082015282604082015260806060820152600061586760808301846143a6565b9695505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b805169ffffffffffffffffffff8116811461455c57600080fd5b600080600080600060a086880312156158d257600080fd5b6158db866158a0565b94506020860151935060408601519250606086015191506158fe608087016158a0565b90509295509295909350565b6fffffffffffffffffffffffffffffffff8181168382160190808211156134d1576134d1614d6e565b60006040828403121561594557600080fd5b6040516040810181811067ffffffffffffffff821117156159685761596861441d565b6040528251615976816145e6565b81526020928301519281019290925250919050565b600060a0828403121561599d57600080fd5b6159a5614476565b825181526020830151602082015260408301516159c1816145e6565b604082015260608301516159d4816145e6565b6060820152608092830151928101929092525091905056fea164736f6c6343000813000a", } var AutomationRegistryABI = AutomationRegistryMetaData.ABI @@ -355,16 +362,16 @@ func (_AutomationRegistry *AutomationRegistryTransactorSession) SetConfig(signer return _AutomationRegistry.Contract.SetConfig(&_AutomationRegistry.TransactOpts, signers, transmitters, f, onchainConfigBytes, offchainConfigVersion, offchainConfig) } -func (_AutomationRegistry *AutomationRegistryTransactor) SetConfigTypeSafe(opts *bind.TransactOpts, signers []common.Address, transmitters []common.Address, f uint8, onchainConfig AutomationRegistryBase23OnchainConfig, offchainConfigVersion uint64, offchainConfig []byte) (*types.Transaction, error) { - return _AutomationRegistry.contract.Transact(opts, "setConfigTypeSafe", signers, transmitters, f, onchainConfig, offchainConfigVersion, offchainConfig) +func (_AutomationRegistry *AutomationRegistryTransactor) SetConfigTypeSafe(opts *bind.TransactOpts, signers []common.Address, transmitters []common.Address, f uint8, onchainConfig AutomationRegistryBase23OnchainConfig, offchainConfigVersion uint64, offchainConfig []byte, billingTokens []common.Address, billingConfigs []AutomationRegistryBase23BillingConfig) (*types.Transaction, error) { + return _AutomationRegistry.contract.Transact(opts, "setConfigTypeSafe", signers, transmitters, f, onchainConfig, offchainConfigVersion, offchainConfig, billingTokens, billingConfigs) } -func (_AutomationRegistry *AutomationRegistrySession) SetConfigTypeSafe(signers []common.Address, transmitters []common.Address, f uint8, onchainConfig AutomationRegistryBase23OnchainConfig, offchainConfigVersion uint64, offchainConfig []byte) (*types.Transaction, error) { - return _AutomationRegistry.Contract.SetConfigTypeSafe(&_AutomationRegistry.TransactOpts, signers, transmitters, f, onchainConfig, offchainConfigVersion, offchainConfig) +func (_AutomationRegistry *AutomationRegistrySession) SetConfigTypeSafe(signers []common.Address, transmitters []common.Address, f uint8, onchainConfig AutomationRegistryBase23OnchainConfig, offchainConfigVersion uint64, offchainConfig []byte, billingTokens []common.Address, billingConfigs []AutomationRegistryBase23BillingConfig) (*types.Transaction, error) { + return _AutomationRegistry.Contract.SetConfigTypeSafe(&_AutomationRegistry.TransactOpts, signers, transmitters, f, onchainConfig, offchainConfigVersion, offchainConfig, billingTokens, billingConfigs) } -func (_AutomationRegistry *AutomationRegistryTransactorSession) SetConfigTypeSafe(signers []common.Address, transmitters []common.Address, f uint8, onchainConfig AutomationRegistryBase23OnchainConfig, offchainConfigVersion uint64, offchainConfig []byte) (*types.Transaction, error) { - return _AutomationRegistry.Contract.SetConfigTypeSafe(&_AutomationRegistry.TransactOpts, signers, transmitters, f, onchainConfig, offchainConfigVersion, offchainConfig) +func (_AutomationRegistry *AutomationRegistryTransactorSession) SetConfigTypeSafe(signers []common.Address, transmitters []common.Address, f uint8, onchainConfig AutomationRegistryBase23OnchainConfig, offchainConfigVersion uint64, offchainConfig []byte, billingTokens []common.Address, billingConfigs []AutomationRegistryBase23BillingConfig) (*types.Transaction, error) { + return _AutomationRegistry.Contract.SetConfigTypeSafe(&_AutomationRegistry.TransactOpts, signers, transmitters, f, onchainConfig, offchainConfigVersion, offchainConfig, billingTokens, billingConfigs) } func (_AutomationRegistry *AutomationRegistryTransactor) SimulatePerformUpkeep(opts *bind.TransactOpts, id *big.Int, performData []byte) (*types.Transaction, error) { @@ -543,6 +550,134 @@ func (_AutomationRegistry *AutomationRegistryFilterer) ParseAdminPrivilegeConfig return event, nil } +type AutomationRegistryBillingConfigSetIterator struct { + Event *AutomationRegistryBillingConfigSet + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *AutomationRegistryBillingConfigSetIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(AutomationRegistryBillingConfigSet) + 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(AutomationRegistryBillingConfigSet) + 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 *AutomationRegistryBillingConfigSetIterator) Error() error { + return it.fail +} + +func (it *AutomationRegistryBillingConfigSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type AutomationRegistryBillingConfigSet struct { + Token common.Address + Config AutomationRegistryBase23BillingConfig + Raw types.Log +} + +func (_AutomationRegistry *AutomationRegistryFilterer) FilterBillingConfigSet(opts *bind.FilterOpts, token []common.Address) (*AutomationRegistryBillingConfigSetIterator, error) { + + var tokenRule []interface{} + for _, tokenItem := range token { + tokenRule = append(tokenRule, tokenItem) + } + + logs, sub, err := _AutomationRegistry.contract.FilterLogs(opts, "BillingConfigSet", tokenRule) + if err != nil { + return nil, err + } + return &AutomationRegistryBillingConfigSetIterator{contract: _AutomationRegistry.contract, event: "BillingConfigSet", logs: logs, sub: sub}, nil +} + +func (_AutomationRegistry *AutomationRegistryFilterer) WatchBillingConfigSet(opts *bind.WatchOpts, sink chan<- *AutomationRegistryBillingConfigSet, token []common.Address) (event.Subscription, error) { + + var tokenRule []interface{} + for _, tokenItem := range token { + tokenRule = append(tokenRule, tokenItem) + } + + logs, sub, err := _AutomationRegistry.contract.WatchLogs(opts, "BillingConfigSet", tokenRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(AutomationRegistryBillingConfigSet) + if err := _AutomationRegistry.contract.UnpackLog(event, "BillingConfigSet", 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 (_AutomationRegistry *AutomationRegistryFilterer) ParseBillingConfigSet(log types.Log) (*AutomationRegistryBillingConfigSet, error) { + event := new(AutomationRegistryBillingConfigSet) + if err := _AutomationRegistry.contract.UnpackLog(event, "BillingConfigSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + type AutomationRegistryCancelledUpkeepReportIterator struct { Event *AutomationRegistryCancelledUpkeepReport @@ -1040,8 +1175,8 @@ func (_AutomationRegistry *AutomationRegistryFilterer) ParseDedupKeyAdded(log ty return event, nil } -type AutomationRegistryFundsAddedIterator struct { - Event *AutomationRegistryFundsAdded +type AutomationRegistryFeesWithdrawnIterator struct { + Event *AutomationRegistryFeesWithdrawn contract *bind.BoundContract event string @@ -1052,7 +1187,7 @@ type AutomationRegistryFundsAddedIterator struct { fail error } -func (it *AutomationRegistryFundsAddedIterator) Next() bool { +func (it *AutomationRegistryFeesWithdrawnIterator) Next() bool { if it.fail != nil { return false @@ -1061,7 +1196,7 @@ func (it *AutomationRegistryFundsAddedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(AutomationRegistryFundsAdded) + it.Event = new(AutomationRegistryFeesWithdrawn) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1076,7 +1211,7 @@ func (it *AutomationRegistryFundsAddedIterator) Next() bool { select { case log := <-it.logs: - it.Event = new(AutomationRegistryFundsAdded) + it.Event = new(AutomationRegistryFeesWithdrawn) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1091,52 +1226,52 @@ func (it *AutomationRegistryFundsAddedIterator) Next() bool { } } -func (it *AutomationRegistryFundsAddedIterator) Error() error { +func (it *AutomationRegistryFeesWithdrawnIterator) Error() error { return it.fail } -func (it *AutomationRegistryFundsAddedIterator) Close() error { +func (it *AutomationRegistryFeesWithdrawnIterator) Close() error { it.sub.Unsubscribe() return nil } -type AutomationRegistryFundsAdded struct { - Id *big.Int - From common.Address - Amount *big.Int - Raw types.Log +type AutomationRegistryFeesWithdrawn struct { + Recipient common.Address + AssetAddress common.Address + Amount *big.Int + Raw types.Log } -func (_AutomationRegistry *AutomationRegistryFilterer) FilterFundsAdded(opts *bind.FilterOpts, id []*big.Int, from []common.Address) (*AutomationRegistryFundsAddedIterator, error) { +func (_AutomationRegistry *AutomationRegistryFilterer) FilterFeesWithdrawn(opts *bind.FilterOpts, recipient []common.Address, assetAddress []common.Address) (*AutomationRegistryFeesWithdrawnIterator, error) { - var idRule []interface{} - for _, idItem := range id { - idRule = append(idRule, idItem) + var recipientRule []interface{} + for _, recipientItem := range recipient { + recipientRule = append(recipientRule, recipientItem) } - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) + var assetAddressRule []interface{} + for _, assetAddressItem := range assetAddress { + assetAddressRule = append(assetAddressRule, assetAddressItem) } - logs, sub, err := _AutomationRegistry.contract.FilterLogs(opts, "FundsAdded", idRule, fromRule) + logs, sub, err := _AutomationRegistry.contract.FilterLogs(opts, "FeesWithdrawn", recipientRule, assetAddressRule) if err != nil { return nil, err } - return &AutomationRegistryFundsAddedIterator{contract: _AutomationRegistry.contract, event: "FundsAdded", logs: logs, sub: sub}, nil + return &AutomationRegistryFeesWithdrawnIterator{contract: _AutomationRegistry.contract, event: "FeesWithdrawn", logs: logs, sub: sub}, nil } -func (_AutomationRegistry *AutomationRegistryFilterer) WatchFundsAdded(opts *bind.WatchOpts, sink chan<- *AutomationRegistryFundsAdded, id []*big.Int, from []common.Address) (event.Subscription, error) { +func (_AutomationRegistry *AutomationRegistryFilterer) WatchFeesWithdrawn(opts *bind.WatchOpts, sink chan<- *AutomationRegistryFeesWithdrawn, recipient []common.Address, assetAddress []common.Address) (event.Subscription, error) { - var idRule []interface{} - for _, idItem := range id { - idRule = append(idRule, idItem) + var recipientRule []interface{} + for _, recipientItem := range recipient { + recipientRule = append(recipientRule, recipientItem) } - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) + var assetAddressRule []interface{} + for _, assetAddressItem := range assetAddress { + assetAddressRule = append(assetAddressRule, assetAddressItem) } - logs, sub, err := _AutomationRegistry.contract.WatchLogs(opts, "FundsAdded", idRule, fromRule) + logs, sub, err := _AutomationRegistry.contract.WatchLogs(opts, "FeesWithdrawn", recipientRule, assetAddressRule) if err != nil { return nil, err } @@ -1146,8 +1281,8 @@ func (_AutomationRegistry *AutomationRegistryFilterer) WatchFundsAdded(opts *bin select { case log := <-logs: - event := new(AutomationRegistryFundsAdded) - if err := _AutomationRegistry.contract.UnpackLog(event, "FundsAdded", log); err != nil { + event := new(AutomationRegistryFeesWithdrawn) + if err := _AutomationRegistry.contract.UnpackLog(event, "FeesWithdrawn", log); err != nil { return err } event.Raw = log @@ -1168,17 +1303,17 @@ func (_AutomationRegistry *AutomationRegistryFilterer) WatchFundsAdded(opts *bin }), nil } -func (_AutomationRegistry *AutomationRegistryFilterer) ParseFundsAdded(log types.Log) (*AutomationRegistryFundsAdded, error) { - event := new(AutomationRegistryFundsAdded) - if err := _AutomationRegistry.contract.UnpackLog(event, "FundsAdded", log); err != nil { +func (_AutomationRegistry *AutomationRegistryFilterer) ParseFeesWithdrawn(log types.Log) (*AutomationRegistryFeesWithdrawn, error) { + event := new(AutomationRegistryFeesWithdrawn) + if err := _AutomationRegistry.contract.UnpackLog(event, "FeesWithdrawn", log); err != nil { return nil, err } event.Raw = log return event, nil } -type AutomationRegistryFundsWithdrawnIterator struct { - Event *AutomationRegistryFundsWithdrawn +type AutomationRegistryFundsAddedIterator struct { + Event *AutomationRegistryFundsAdded contract *bind.BoundContract event string @@ -1189,7 +1324,7 @@ type AutomationRegistryFundsWithdrawnIterator struct { fail error } -func (it *AutomationRegistryFundsWithdrawnIterator) Next() bool { +func (it *AutomationRegistryFundsAddedIterator) Next() bool { if it.fail != nil { return false @@ -1198,7 +1333,7 @@ func (it *AutomationRegistryFundsWithdrawnIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(AutomationRegistryFundsWithdrawn) + it.Event = new(AutomationRegistryFundsAdded) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1213,7 +1348,7 @@ func (it *AutomationRegistryFundsWithdrawnIterator) Next() bool { select { case log := <-it.logs: - it.Event = new(AutomationRegistryFundsWithdrawn) + it.Event = new(AutomationRegistryFundsAdded) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1228,44 +1363,52 @@ func (it *AutomationRegistryFundsWithdrawnIterator) Next() bool { } } -func (it *AutomationRegistryFundsWithdrawnIterator) Error() error { +func (it *AutomationRegistryFundsAddedIterator) Error() error { return it.fail } -func (it *AutomationRegistryFundsWithdrawnIterator) Close() error { +func (it *AutomationRegistryFundsAddedIterator) Close() error { it.sub.Unsubscribe() return nil } -type AutomationRegistryFundsWithdrawn struct { +type AutomationRegistryFundsAdded struct { Id *big.Int + From common.Address Amount *big.Int - To common.Address Raw types.Log } -func (_AutomationRegistry *AutomationRegistryFilterer) FilterFundsWithdrawn(opts *bind.FilterOpts, id []*big.Int) (*AutomationRegistryFundsWithdrawnIterator, error) { +func (_AutomationRegistry *AutomationRegistryFilterer) FilterFundsAdded(opts *bind.FilterOpts, id []*big.Int, from []common.Address) (*AutomationRegistryFundsAddedIterator, error) { var idRule []interface{} for _, idItem := range id { idRule = append(idRule, idItem) } + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } - logs, sub, err := _AutomationRegistry.contract.FilterLogs(opts, "FundsWithdrawn", idRule) + logs, sub, err := _AutomationRegistry.contract.FilterLogs(opts, "FundsAdded", idRule, fromRule) if err != nil { return nil, err } - return &AutomationRegistryFundsWithdrawnIterator{contract: _AutomationRegistry.contract, event: "FundsWithdrawn", logs: logs, sub: sub}, nil + return &AutomationRegistryFundsAddedIterator{contract: _AutomationRegistry.contract, event: "FundsAdded", logs: logs, sub: sub}, nil } -func (_AutomationRegistry *AutomationRegistryFilterer) WatchFundsWithdrawn(opts *bind.WatchOpts, sink chan<- *AutomationRegistryFundsWithdrawn, id []*big.Int) (event.Subscription, error) { +func (_AutomationRegistry *AutomationRegistryFilterer) WatchFundsAdded(opts *bind.WatchOpts, sink chan<- *AutomationRegistryFundsAdded, id []*big.Int, from []common.Address) (event.Subscription, error) { var idRule []interface{} for _, idItem := range id { idRule = append(idRule, idItem) } + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } - logs, sub, err := _AutomationRegistry.contract.WatchLogs(opts, "FundsWithdrawn", idRule) + logs, sub, err := _AutomationRegistry.contract.WatchLogs(opts, "FundsAdded", idRule, fromRule) if err != nil { return nil, err } @@ -1275,8 +1418,8 @@ func (_AutomationRegistry *AutomationRegistryFilterer) WatchFundsWithdrawn(opts select { case log := <-logs: - event := new(AutomationRegistryFundsWithdrawn) - if err := _AutomationRegistry.contract.UnpackLog(event, "FundsWithdrawn", log); err != nil { + event := new(AutomationRegistryFundsAdded) + if err := _AutomationRegistry.contract.UnpackLog(event, "FundsAdded", log); err != nil { return err } event.Raw = log @@ -1297,17 +1440,17 @@ func (_AutomationRegistry *AutomationRegistryFilterer) WatchFundsWithdrawn(opts }), nil } -func (_AutomationRegistry *AutomationRegistryFilterer) ParseFundsWithdrawn(log types.Log) (*AutomationRegistryFundsWithdrawn, error) { - event := new(AutomationRegistryFundsWithdrawn) - if err := _AutomationRegistry.contract.UnpackLog(event, "FundsWithdrawn", log); err != nil { +func (_AutomationRegistry *AutomationRegistryFilterer) ParseFundsAdded(log types.Log) (*AutomationRegistryFundsAdded, error) { + event := new(AutomationRegistryFundsAdded) + if err := _AutomationRegistry.contract.UnpackLog(event, "FundsAdded", log); err != nil { return nil, err } event.Raw = log return event, nil } -type AutomationRegistryInsufficientFundsUpkeepReportIterator struct { - Event *AutomationRegistryInsufficientFundsUpkeepReport +type AutomationRegistryFundsWithdrawnIterator struct { + Event *AutomationRegistryFundsWithdrawn contract *bind.BoundContract event string @@ -1318,7 +1461,7 @@ type AutomationRegistryInsufficientFundsUpkeepReportIterator struct { fail error } -func (it *AutomationRegistryInsufficientFundsUpkeepReportIterator) Next() bool { +func (it *AutomationRegistryFundsWithdrawnIterator) Next() bool { if it.fail != nil { return false @@ -1327,7 +1470,7 @@ func (it *AutomationRegistryInsufficientFundsUpkeepReportIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(AutomationRegistryInsufficientFundsUpkeepReport) + it.Event = new(AutomationRegistryFundsWithdrawn) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1342,7 +1485,7 @@ func (it *AutomationRegistryInsufficientFundsUpkeepReportIterator) Next() bool { select { case log := <-it.logs: - it.Event = new(AutomationRegistryInsufficientFundsUpkeepReport) + it.Event = new(AutomationRegistryFundsWithdrawn) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1357,43 +1500,44 @@ func (it *AutomationRegistryInsufficientFundsUpkeepReportIterator) Next() bool { } } -func (it *AutomationRegistryInsufficientFundsUpkeepReportIterator) Error() error { +func (it *AutomationRegistryFundsWithdrawnIterator) Error() error { return it.fail } -func (it *AutomationRegistryInsufficientFundsUpkeepReportIterator) Close() error { +func (it *AutomationRegistryFundsWithdrawnIterator) Close() error { it.sub.Unsubscribe() return nil } -type AutomationRegistryInsufficientFundsUpkeepReport struct { - Id *big.Int - Trigger []byte - Raw types.Log +type AutomationRegistryFundsWithdrawn struct { + Id *big.Int + Amount *big.Int + To common.Address + Raw types.Log } -func (_AutomationRegistry *AutomationRegistryFilterer) FilterInsufficientFundsUpkeepReport(opts *bind.FilterOpts, id []*big.Int) (*AutomationRegistryInsufficientFundsUpkeepReportIterator, error) { +func (_AutomationRegistry *AutomationRegistryFilterer) FilterFundsWithdrawn(opts *bind.FilterOpts, id []*big.Int) (*AutomationRegistryFundsWithdrawnIterator, error) { var idRule []interface{} for _, idItem := range id { idRule = append(idRule, idItem) } - logs, sub, err := _AutomationRegistry.contract.FilterLogs(opts, "InsufficientFundsUpkeepReport", idRule) + logs, sub, err := _AutomationRegistry.contract.FilterLogs(opts, "FundsWithdrawn", idRule) if err != nil { return nil, err } - return &AutomationRegistryInsufficientFundsUpkeepReportIterator{contract: _AutomationRegistry.contract, event: "InsufficientFundsUpkeepReport", logs: logs, sub: sub}, nil + return &AutomationRegistryFundsWithdrawnIterator{contract: _AutomationRegistry.contract, event: "FundsWithdrawn", logs: logs, sub: sub}, nil } -func (_AutomationRegistry *AutomationRegistryFilterer) WatchInsufficientFundsUpkeepReport(opts *bind.WatchOpts, sink chan<- *AutomationRegistryInsufficientFundsUpkeepReport, id []*big.Int) (event.Subscription, error) { +func (_AutomationRegistry *AutomationRegistryFilterer) WatchFundsWithdrawn(opts *bind.WatchOpts, sink chan<- *AutomationRegistryFundsWithdrawn, id []*big.Int) (event.Subscription, error) { var idRule []interface{} for _, idItem := range id { idRule = append(idRule, idItem) } - logs, sub, err := _AutomationRegistry.contract.WatchLogs(opts, "InsufficientFundsUpkeepReport", idRule) + logs, sub, err := _AutomationRegistry.contract.WatchLogs(opts, "FundsWithdrawn", idRule) if err != nil { return nil, err } @@ -1403,8 +1547,8 @@ func (_AutomationRegistry *AutomationRegistryFilterer) WatchInsufficientFundsUpk select { case log := <-logs: - event := new(AutomationRegistryInsufficientFundsUpkeepReport) - if err := _AutomationRegistry.contract.UnpackLog(event, "InsufficientFundsUpkeepReport", log); err != nil { + event := new(AutomationRegistryFundsWithdrawn) + if err := _AutomationRegistry.contract.UnpackLog(event, "FundsWithdrawn", log); err != nil { return err } event.Raw = log @@ -1425,17 +1569,17 @@ func (_AutomationRegistry *AutomationRegistryFilterer) WatchInsufficientFundsUpk }), nil } -func (_AutomationRegistry *AutomationRegistryFilterer) ParseInsufficientFundsUpkeepReport(log types.Log) (*AutomationRegistryInsufficientFundsUpkeepReport, error) { - event := new(AutomationRegistryInsufficientFundsUpkeepReport) - if err := _AutomationRegistry.contract.UnpackLog(event, "InsufficientFundsUpkeepReport", log); err != nil { +func (_AutomationRegistry *AutomationRegistryFilterer) ParseFundsWithdrawn(log types.Log) (*AutomationRegistryFundsWithdrawn, error) { + event := new(AutomationRegistryFundsWithdrawn) + if err := _AutomationRegistry.contract.UnpackLog(event, "FundsWithdrawn", log); err != nil { return nil, err } event.Raw = log return event, nil } -type AutomationRegistryOwnerFundsWithdrawnIterator struct { - Event *AutomationRegistryOwnerFundsWithdrawn +type AutomationRegistryInsufficientFundsUpkeepReportIterator struct { + Event *AutomationRegistryInsufficientFundsUpkeepReport contract *bind.BoundContract event string @@ -1446,7 +1590,7 @@ type AutomationRegistryOwnerFundsWithdrawnIterator struct { fail error } -func (it *AutomationRegistryOwnerFundsWithdrawnIterator) Next() bool { +func (it *AutomationRegistryInsufficientFundsUpkeepReportIterator) Next() bool { if it.fail != nil { return false @@ -1455,7 +1599,7 @@ func (it *AutomationRegistryOwnerFundsWithdrawnIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(AutomationRegistryOwnerFundsWithdrawn) + it.Event = new(AutomationRegistryInsufficientFundsUpkeepReport) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1470,7 +1614,7 @@ func (it *AutomationRegistryOwnerFundsWithdrawnIterator) Next() bool { select { case log := <-it.logs: - it.Event = new(AutomationRegistryOwnerFundsWithdrawn) + it.Event = new(AutomationRegistryInsufficientFundsUpkeepReport) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1485,32 +1629,43 @@ func (it *AutomationRegistryOwnerFundsWithdrawnIterator) Next() bool { } } -func (it *AutomationRegistryOwnerFundsWithdrawnIterator) Error() error { +func (it *AutomationRegistryInsufficientFundsUpkeepReportIterator) Error() error { return it.fail } -func (it *AutomationRegistryOwnerFundsWithdrawnIterator) Close() error { +func (it *AutomationRegistryInsufficientFundsUpkeepReportIterator) Close() error { it.sub.Unsubscribe() return nil } -type AutomationRegistryOwnerFundsWithdrawn struct { - Amount *big.Int - Raw types.Log +type AutomationRegistryInsufficientFundsUpkeepReport struct { + Id *big.Int + Trigger []byte + Raw types.Log } -func (_AutomationRegistry *AutomationRegistryFilterer) FilterOwnerFundsWithdrawn(opts *bind.FilterOpts) (*AutomationRegistryOwnerFundsWithdrawnIterator, error) { +func (_AutomationRegistry *AutomationRegistryFilterer) FilterInsufficientFundsUpkeepReport(opts *bind.FilterOpts, id []*big.Int) (*AutomationRegistryInsufficientFundsUpkeepReportIterator, error) { - logs, sub, err := _AutomationRegistry.contract.FilterLogs(opts, "OwnerFundsWithdrawn") + var idRule []interface{} + for _, idItem := range id { + idRule = append(idRule, idItem) + } + + logs, sub, err := _AutomationRegistry.contract.FilterLogs(opts, "InsufficientFundsUpkeepReport", idRule) if err != nil { return nil, err } - return &AutomationRegistryOwnerFundsWithdrawnIterator{contract: _AutomationRegistry.contract, event: "OwnerFundsWithdrawn", logs: logs, sub: sub}, nil + return &AutomationRegistryInsufficientFundsUpkeepReportIterator{contract: _AutomationRegistry.contract, event: "InsufficientFundsUpkeepReport", logs: logs, sub: sub}, nil } -func (_AutomationRegistry *AutomationRegistryFilterer) WatchOwnerFundsWithdrawn(opts *bind.WatchOpts, sink chan<- *AutomationRegistryOwnerFundsWithdrawn) (event.Subscription, error) { +func (_AutomationRegistry *AutomationRegistryFilterer) WatchInsufficientFundsUpkeepReport(opts *bind.WatchOpts, sink chan<- *AutomationRegistryInsufficientFundsUpkeepReport, id []*big.Int) (event.Subscription, error) { - logs, sub, err := _AutomationRegistry.contract.WatchLogs(opts, "OwnerFundsWithdrawn") + var idRule []interface{} + for _, idItem := range id { + idRule = append(idRule, idItem) + } + + logs, sub, err := _AutomationRegistry.contract.WatchLogs(opts, "InsufficientFundsUpkeepReport", idRule) if err != nil { return nil, err } @@ -1520,8 +1675,8 @@ func (_AutomationRegistry *AutomationRegistryFilterer) WatchOwnerFundsWithdrawn( select { case log := <-logs: - event := new(AutomationRegistryOwnerFundsWithdrawn) - if err := _AutomationRegistry.contract.UnpackLog(event, "OwnerFundsWithdrawn", log); err != nil { + event := new(AutomationRegistryInsufficientFundsUpkeepReport) + if err := _AutomationRegistry.contract.UnpackLog(event, "InsufficientFundsUpkeepReport", log); err != nil { return err } event.Raw = log @@ -1542,9 +1697,9 @@ func (_AutomationRegistry *AutomationRegistryFilterer) WatchOwnerFundsWithdrawn( }), nil } -func (_AutomationRegistry *AutomationRegistryFilterer) ParseOwnerFundsWithdrawn(log types.Log) (*AutomationRegistryOwnerFundsWithdrawn, error) { - event := new(AutomationRegistryOwnerFundsWithdrawn) - if err := _AutomationRegistry.contract.UnpackLog(event, "OwnerFundsWithdrawn", log); err != nil { +func (_AutomationRegistry *AutomationRegistryFilterer) ParseInsufficientFundsUpkeepReport(log types.Log) (*AutomationRegistryInsufficientFundsUpkeepReport, error) { + event := new(AutomationRegistryInsufficientFundsUpkeepReport) + if err := _AutomationRegistry.contract.UnpackLog(event, "InsufficientFundsUpkeepReport", log); err != nil { return nil, err } event.Raw = log @@ -4847,6 +5002,8 @@ func (_AutomationRegistry *AutomationRegistry) ParseLog(log types.Log) (generate switch log.Topics[0] { case _AutomationRegistry.abi.Events["AdminPrivilegeConfigSet"].ID: return _AutomationRegistry.ParseAdminPrivilegeConfigSet(log) + case _AutomationRegistry.abi.Events["BillingConfigSet"].ID: + return _AutomationRegistry.ParseBillingConfigSet(log) case _AutomationRegistry.abi.Events["CancelledUpkeepReport"].ID: return _AutomationRegistry.ParseCancelledUpkeepReport(log) case _AutomationRegistry.abi.Events["ChainSpecificModuleUpdated"].ID: @@ -4855,14 +5012,14 @@ func (_AutomationRegistry *AutomationRegistry) ParseLog(log types.Log) (generate return _AutomationRegistry.ParseConfigSet(log) case _AutomationRegistry.abi.Events["DedupKeyAdded"].ID: return _AutomationRegistry.ParseDedupKeyAdded(log) + case _AutomationRegistry.abi.Events["FeesWithdrawn"].ID: + return _AutomationRegistry.ParseFeesWithdrawn(log) case _AutomationRegistry.abi.Events["FundsAdded"].ID: return _AutomationRegistry.ParseFundsAdded(log) case _AutomationRegistry.abi.Events["FundsWithdrawn"].ID: return _AutomationRegistry.ParseFundsWithdrawn(log) case _AutomationRegistry.abi.Events["InsufficientFundsUpkeepReport"].ID: return _AutomationRegistry.ParseInsufficientFundsUpkeepReport(log) - case _AutomationRegistry.abi.Events["OwnerFundsWithdrawn"].ID: - return _AutomationRegistry.ParseOwnerFundsWithdrawn(log) case _AutomationRegistry.abi.Events["OwnershipTransferRequested"].ID: return _AutomationRegistry.ParseOwnershipTransferRequested(log) case _AutomationRegistry.abi.Events["OwnershipTransferred"].ID: @@ -4923,6 +5080,10 @@ func (AutomationRegistryAdminPrivilegeConfigSet) Topic() common.Hash { return common.HexToHash("0x7c44b4eb59ee7873514e7e43e7718c269d872965938b288aa143befca62f99d2") } +func (AutomationRegistryBillingConfigSet) Topic() common.Hash { + return common.HexToHash("0x720a5849025dc4fd0061aed1bb30efd713cde64ce7f8d807953ecca27c8f143c") +} + func (AutomationRegistryCancelledUpkeepReport) Topic() common.Hash { return common.HexToHash("0xc3237c8807c467c1b39b8d0395eff077313e691bf0a7388106792564ebfd5636") } @@ -4939,6 +5100,10 @@ func (AutomationRegistryDedupKeyAdded) Topic() common.Hash { return common.HexToHash("0xa4a4e334c0e330143f9437484fe516c13bc560b86b5b0daf58e7084aaac228f2") } +func (AutomationRegistryFeesWithdrawn) Topic() common.Hash { + return common.HexToHash("0x5e110f8bc8a20b65dcc87f224bdf1cc039346e267118bae2739847f07321ffa8") +} + func (AutomationRegistryFundsAdded) Topic() common.Hash { return common.HexToHash("0xafd24114486da8ebfc32f3626dada8863652e187461aa74d4bfa734891506203") } @@ -4951,10 +5116,6 @@ func (AutomationRegistryInsufficientFundsUpkeepReport) Topic() common.Hash { return common.HexToHash("0x377c8b0c126ae5248d27aca1c76fac4608aff85673ee3caf09747e1044549e02") } -func (AutomationRegistryOwnerFundsWithdrawn) Topic() common.Hash { - return common.HexToHash("0x1d07d0b0be43d3e5fee41a80b579af370affee03fa595bf56d5d4c19328162f1") -} - func (AutomationRegistryOwnershipTransferRequested) Topic() common.Hash { return common.HexToHash("0xed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae1278") } @@ -5080,7 +5241,7 @@ type AutomationRegistryInterface interface { SetConfig(opts *bind.TransactOpts, signers []common.Address, transmitters []common.Address, f uint8, onchainConfigBytes []byte, offchainConfigVersion uint64, offchainConfig []byte) (*types.Transaction, error) - SetConfigTypeSafe(opts *bind.TransactOpts, signers []common.Address, transmitters []common.Address, f uint8, onchainConfig AutomationRegistryBase23OnchainConfig, offchainConfigVersion uint64, offchainConfig []byte) (*types.Transaction, error) + SetConfigTypeSafe(opts *bind.TransactOpts, signers []common.Address, transmitters []common.Address, f uint8, onchainConfig AutomationRegistryBase23OnchainConfig, offchainConfigVersion uint64, offchainConfig []byte, billingTokens []common.Address, billingConfigs []AutomationRegistryBase23BillingConfig) (*types.Transaction, error) SimulatePerformUpkeep(opts *bind.TransactOpts, id *big.Int, performData []byte) (*types.Transaction, error) @@ -5096,6 +5257,12 @@ type AutomationRegistryInterface interface { ParseAdminPrivilegeConfigSet(log types.Log) (*AutomationRegistryAdminPrivilegeConfigSet, error) + FilterBillingConfigSet(opts *bind.FilterOpts, token []common.Address) (*AutomationRegistryBillingConfigSetIterator, error) + + WatchBillingConfigSet(opts *bind.WatchOpts, sink chan<- *AutomationRegistryBillingConfigSet, token []common.Address) (event.Subscription, error) + + ParseBillingConfigSet(log types.Log) (*AutomationRegistryBillingConfigSet, error) + FilterCancelledUpkeepReport(opts *bind.FilterOpts, id []*big.Int) (*AutomationRegistryCancelledUpkeepReportIterator, error) WatchCancelledUpkeepReport(opts *bind.WatchOpts, sink chan<- *AutomationRegistryCancelledUpkeepReport, id []*big.Int) (event.Subscription, error) @@ -5120,6 +5287,12 @@ type AutomationRegistryInterface interface { ParseDedupKeyAdded(log types.Log) (*AutomationRegistryDedupKeyAdded, error) + FilterFeesWithdrawn(opts *bind.FilterOpts, recipient []common.Address, assetAddress []common.Address) (*AutomationRegistryFeesWithdrawnIterator, error) + + WatchFeesWithdrawn(opts *bind.WatchOpts, sink chan<- *AutomationRegistryFeesWithdrawn, recipient []common.Address, assetAddress []common.Address) (event.Subscription, error) + + ParseFeesWithdrawn(log types.Log) (*AutomationRegistryFeesWithdrawn, error) + FilterFundsAdded(opts *bind.FilterOpts, id []*big.Int, from []common.Address) (*AutomationRegistryFundsAddedIterator, error) WatchFundsAdded(opts *bind.WatchOpts, sink chan<- *AutomationRegistryFundsAdded, id []*big.Int, from []common.Address) (event.Subscription, error) @@ -5138,12 +5311,6 @@ type AutomationRegistryInterface interface { ParseInsufficientFundsUpkeepReport(log types.Log) (*AutomationRegistryInsufficientFundsUpkeepReport, error) - FilterOwnerFundsWithdrawn(opts *bind.FilterOpts) (*AutomationRegistryOwnerFundsWithdrawnIterator, error) - - WatchOwnerFundsWithdrawn(opts *bind.WatchOpts, sink chan<- *AutomationRegistryOwnerFundsWithdrawn) (event.Subscription, error) - - ParseOwnerFundsWithdrawn(log types.Log) (*AutomationRegistryOwnerFundsWithdrawn, error) - FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*AutomationRegistryOwnershipTransferRequestedIterator, error) WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *AutomationRegistryOwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) diff --git a/core/gethwrappers/generated/automation_utils_2_1/automation_utils_2_1.go b/core/gethwrappers/generated/automation_utils_2_1/automation_utils_2_1.go index 5d6dc1e41ca..195e1f37083 100644 --- a/core/gethwrappers/generated/automation_utils_2_1/automation_utils_2_1.go +++ b/core/gethwrappers/generated/automation_utils_2_1/automation_utils_2_1.go @@ -28,20 +28,7 @@ var ( _ = abi.ConvertType ) -type KeeperRegistryBase21ConditionalTrigger struct { - BlockNum uint32 - BlockHash [32]byte -} - -type KeeperRegistryBase21LogTrigger struct { - LogBlockHash [32]byte - TxHash [32]byte - LogIndex uint32 - BlockNum uint32 - BlockHash [32]byte -} - -type KeeperRegistryBase21OnchainConfig struct { +type IAutomationV21PlusCommonOnchainConfigLegacy struct { PaymentPremiumPPB uint32 FlatFeeMicroLink uint32 CheckGasLimit uint32 @@ -59,6 +46,19 @@ type KeeperRegistryBase21OnchainConfig struct { UpkeepPrivilegeManager common.Address } +type KeeperRegistryBase21ConditionalTrigger struct { + BlockNum uint32 + BlockHash [32]byte +} + +type KeeperRegistryBase21LogTrigger struct { + LogBlockHash [32]byte + TxHash [32]byte + LogIndex uint32 + BlockNum uint32 + BlockHash [32]byte +} + type KeeperRegistryBase21Report struct { FastGasWei *big.Int LinkNative *big.Int @@ -89,7 +89,7 @@ type LogTriggerConfig struct { } var AutomationUtilsMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"blockNum\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"}],\"internalType\":\"structKeeperRegistryBase2_1.ConditionalTrigger\",\"name\":\"\",\"type\":\"tuple\"}],\"name\":\"_conditionalTrigger\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"txHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"source\",\"type\":\"address\"},{\"internalType\":\"bytes32[]\",\"name\":\"topics\",\"type\":\"bytes32[]\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"internalType\":\"structLog\",\"name\":\"\",\"type\":\"tuple\"}],\"name\":\"_log\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"logBlockHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"txHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"logIndex\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blockNum\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"}],\"internalType\":\"structKeeperRegistryBase2_1.LogTrigger\",\"name\":\"\",\"type\":\"tuple\"}],\"name\":\"_logTrigger\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"filterSelector\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"topic0\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"topic1\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"topic2\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"topic3\",\"type\":\"bytes32\"}],\"internalType\":\"structLogTriggerConfig\",\"name\":\"\",\"type\":\"tuple\"}],\"name\":\"_logTriggerConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"paymentPremiumPPB\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"flatFeeMicroLink\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"checkGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint24\",\"name\":\"stalenessSeconds\",\"type\":\"uint24\"},{\"internalType\":\"uint16\",\"name\":\"gasCeilingMultiplier\",\"type\":\"uint16\"},{\"internalType\":\"uint96\",\"name\":\"minUpkeepSpend\",\"type\":\"uint96\"},{\"internalType\":\"uint32\",\"name\":\"maxPerformGas\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxCheckDataSize\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxPerformDataSize\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxRevertDataSize\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"fallbackGasPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fallbackLinkPrice\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"transcoder\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"registrars\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"upkeepPrivilegeManager\",\"type\":\"address\"}],\"internalType\":\"structKeeperRegistryBase2_1.OnchainConfig\",\"name\":\"\",\"type\":\"tuple\"}],\"name\":\"_onChainConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"fastGasWei\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"linkNative\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"upkeepIds\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"gasLimits\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes[]\",\"name\":\"triggers\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes[]\",\"name\":\"performDatas\",\"type\":\"bytes[]\"}],\"internalType\":\"structKeeperRegistryBase2_1.Report\",\"name\":\"\",\"type\":\"tuple\"}],\"name\":\"_report\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + ABI: "[{\"inputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"blockNum\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"}],\"internalType\":\"structKeeperRegistryBase2_1.ConditionalTrigger\",\"name\":\"\",\"type\":\"tuple\"}],\"name\":\"_conditionalTrigger\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"txHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"source\",\"type\":\"address\"},{\"internalType\":\"bytes32[]\",\"name\":\"topics\",\"type\":\"bytes32[]\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"internalType\":\"structLog\",\"name\":\"\",\"type\":\"tuple\"}],\"name\":\"_log\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"logBlockHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"txHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"logIndex\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blockNum\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"}],\"internalType\":\"structKeeperRegistryBase2_1.LogTrigger\",\"name\":\"\",\"type\":\"tuple\"}],\"name\":\"_logTrigger\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"filterSelector\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"topic0\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"topic1\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"topic2\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"topic3\",\"type\":\"bytes32\"}],\"internalType\":\"structLogTriggerConfig\",\"name\":\"\",\"type\":\"tuple\"}],\"name\":\"_logTriggerConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"paymentPremiumPPB\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"flatFeeMicroLink\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"checkGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint24\",\"name\":\"stalenessSeconds\",\"type\":\"uint24\"},{\"internalType\":\"uint16\",\"name\":\"gasCeilingMultiplier\",\"type\":\"uint16\"},{\"internalType\":\"uint96\",\"name\":\"minUpkeepSpend\",\"type\":\"uint96\"},{\"internalType\":\"uint32\",\"name\":\"maxPerformGas\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxCheckDataSize\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxPerformDataSize\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxRevertDataSize\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"fallbackGasPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fallbackLinkPrice\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"transcoder\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"registrars\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"upkeepPrivilegeManager\",\"type\":\"address\"}],\"internalType\":\"structIAutomationV21PlusCommon.OnchainConfigLegacy\",\"name\":\"\",\"type\":\"tuple\"}],\"name\":\"_onChainConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"fastGasWei\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"linkNative\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"upkeepIds\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"gasLimits\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes[]\",\"name\":\"triggers\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes[]\",\"name\":\"performDatas\",\"type\":\"bytes[]\"}],\"internalType\":\"structKeeperRegistryBase2_1.Report\",\"name\":\"\",\"type\":\"tuple\"}],\"name\":\"_report\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", Bin: "0x608060405234801561001057600080fd5b506108ca806100206000396000f3fe608060405234801561001057600080fd5b50600436106100725760003560e01c8063776f306111610050578063776f3061146100a6578063e65d6546146100b4578063e9720a49146100c257600080fd5b806321f373d7146100775780632ff92a811461008a5780634b6df29414610098575b600080fd5b6100886100853660046101e8565b50565b005b610088610085366004610363565b6100886100853660046104bd565b610088610085366004610514565b6100886100853660046106fb565b6100886100853660046107e8565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040516101e0810167ffffffffffffffff81118282101715610123576101236100d0565b60405290565b60405160c0810167ffffffffffffffff81118282101715610123576101236100d0565b604051610100810167ffffffffffffffff81118282101715610123576101236100d0565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156101b7576101b76100d0565b604052919050565b803573ffffffffffffffffffffffffffffffffffffffff811681146101e357600080fd5b919050565b600060c082840312156101fa57600080fd5b60405160c0810181811067ffffffffffffffff8211171561021d5761021d6100d0565b604052610229836101bf565b8152602083013560ff8116811461023f57600080fd5b8060208301525060408301356040820152606083013560608201526080830135608082015260a083013560a08201528091505092915050565b803563ffffffff811681146101e357600080fd5b803562ffffff811681146101e357600080fd5b803561ffff811681146101e357600080fd5b80356bffffffffffffffffffffffff811681146101e357600080fd5b600067ffffffffffffffff8211156102e7576102e76100d0565b5060051b60200190565b600082601f83011261030257600080fd5b81356020610317610312836102cd565b610170565b82815260059290921b8401810191818101908684111561033657600080fd5b8286015b848110156103585761034b816101bf565b835291830191830161033a565b509695505050505050565b60006020828403121561037557600080fd5b813567ffffffffffffffff8082111561038d57600080fd5b908301906101e082860312156103a257600080fd5b6103aa6100ff565b6103b383610278565b81526103c160208401610278565b60208201526103d260408401610278565b60408201526103e36060840161028c565b60608201526103f46080840161029f565b608082015261040560a084016102b1565b60a082015261041660c08401610278565b60c082015261042760e08401610278565b60e082015261010061043a818501610278565b9082015261012061044c848201610278565b90820152610140838101359082015261016080840135908201526101806104748185016101bf565b908201526101a0838101358381111561048c57600080fd5b610498888287016102f1565b8284015250506101c091506104ae8284016101bf565b91810191909152949350505050565b6000604082840312156104cf57600080fd5b6040516040810181811067ffffffffffffffff821117156104f2576104f26100d0565b6040526104fe83610278565b8152602083013560208201528091505092915050565b600060a0828403121561052657600080fd5b60405160a0810181811067ffffffffffffffff82111715610549576105496100d0565b8060405250823581526020830135602082015261056860408401610278565b604082015261057960608401610278565b6060820152608083013560808201528091505092915050565b600082601f8301126105a357600080fd5b813560206105b3610312836102cd565b82815260059290921b840181019181810190868411156105d257600080fd5b8286015b8481101561035857803583529183019183016105d6565b600082601f8301126105fe57600080fd5b813567ffffffffffffffff811115610618576106186100d0565b61064960207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601610170565b81815284602083860101111561065e57600080fd5b816020850160208301376000918101602001919091529392505050565b600082601f83011261068c57600080fd5b8135602061069c610312836102cd565b82815260059290921b840181019181810190868411156106bb57600080fd5b8286015b8481101561035857803567ffffffffffffffff8111156106df5760008081fd5b6106ed8986838b01016105ed565b8452509183019183016106bf565b60006020828403121561070d57600080fd5b813567ffffffffffffffff8082111561072557600080fd5b9083019060c0828603121561073957600080fd5b610741610129565b823581526020830135602082015260408301358281111561076157600080fd5b61076d87828601610592565b60408301525060608301358281111561078557600080fd5b61079187828601610592565b6060830152506080830135828111156107a957600080fd5b6107b58782860161067b565b60808301525060a0830135828111156107cd57600080fd5b6107d98782860161067b565b60a08301525095945050505050565b6000602082840312156107fa57600080fd5b813567ffffffffffffffff8082111561081257600080fd5b90830190610100828603121561082757600080fd5b61082f61014c565b823581526020830135602082015260408301356040820152606083013560608201526080830135608082015261086760a084016101bf565b60a082015260c08301358281111561087e57600080fd5b61088a87828601610592565b60c08301525060e0830135828111156108a257600080fd5b6108ae878286016105ed565b60e0830152509594505050505056fea164736f6c6343000810000a", } @@ -277,15 +277,15 @@ func (_AutomationUtils *AutomationUtilsTransactorSession) LogTriggerConfig(arg0 return _AutomationUtils.Contract.LogTriggerConfig(&_AutomationUtils.TransactOpts, arg0) } -func (_AutomationUtils *AutomationUtilsTransactor) OnChainConfig(opts *bind.TransactOpts, arg0 KeeperRegistryBase21OnchainConfig) (*types.Transaction, error) { +func (_AutomationUtils *AutomationUtilsTransactor) OnChainConfig(opts *bind.TransactOpts, arg0 IAutomationV21PlusCommonOnchainConfigLegacy) (*types.Transaction, error) { return _AutomationUtils.contract.Transact(opts, "_onChainConfig", arg0) } -func (_AutomationUtils *AutomationUtilsSession) OnChainConfig(arg0 KeeperRegistryBase21OnchainConfig) (*types.Transaction, error) { +func (_AutomationUtils *AutomationUtilsSession) OnChainConfig(arg0 IAutomationV21PlusCommonOnchainConfigLegacy) (*types.Transaction, error) { return _AutomationUtils.Contract.OnChainConfig(&_AutomationUtils.TransactOpts, arg0) } -func (_AutomationUtils *AutomationUtilsTransactorSession) OnChainConfig(arg0 KeeperRegistryBase21OnchainConfig) (*types.Transaction, error) { +func (_AutomationUtils *AutomationUtilsTransactorSession) OnChainConfig(arg0 IAutomationV21PlusCommonOnchainConfigLegacy) (*types.Transaction, error) { return _AutomationUtils.Contract.OnChainConfig(&_AutomationUtils.TransactOpts, arg0) } @@ -314,7 +314,7 @@ type AutomationUtilsInterface interface { LogTriggerConfig(opts *bind.TransactOpts, arg0 LogTriggerConfig) (*types.Transaction, error) - OnChainConfig(opts *bind.TransactOpts, arg0 KeeperRegistryBase21OnchainConfig) (*types.Transaction, error) + OnChainConfig(opts *bind.TransactOpts, arg0 IAutomationV21PlusCommonOnchainConfigLegacy) (*types.Transaction, error) Report(opts *bind.TransactOpts, arg0 KeeperRegistryBase21Report) (*types.Transaction, error) diff --git a/core/gethwrappers/generated/automation_utils_2_2/automation_utils_2_2.go b/core/gethwrappers/generated/automation_utils_2_2/automation_utils_2_2.go index 187193cb956..f48787204d0 100644 --- a/core/gethwrappers/generated/automation_utils_2_2/automation_utils_2_2.go +++ b/core/gethwrappers/generated/automation_utils_2_2/automation_utils_2_2.go @@ -41,7 +41,16 @@ type AutomationRegistryBase22LogTrigger struct { BlockHash [32]byte } -type AutomationRegistryBase22OnchainConfig struct { +type AutomationRegistryBase22Report struct { + FastGasWei *big.Int + LinkNative *big.Int + UpkeepIds []*big.Int + GasLimits []*big.Int + Triggers [][]byte + PerformDatas [][]byte +} + +type IAutomationV21PlusCommonOnchainConfigLegacy struct { PaymentPremiumPPB uint32 FlatFeeMicroLink uint32 CheckGasLimit uint32 @@ -57,17 +66,6 @@ type AutomationRegistryBase22OnchainConfig struct { Transcoder common.Address Registrars []common.Address UpkeepPrivilegeManager common.Address - ChainModule common.Address - ReorgProtectionEnabled bool -} - -type AutomationRegistryBase22Report struct { - FastGasWei *big.Int - LinkNative *big.Int - UpkeepIds []*big.Int - GasLimits []*big.Int - Triggers [][]byte - PerformDatas [][]byte } type Log struct { @@ -91,8 +89,8 @@ type LogTriggerConfig struct { } var AutomationUtilsMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"blockNum\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"}],\"internalType\":\"structAutomationRegistryBase2_2.ConditionalTrigger\",\"name\":\"\",\"type\":\"tuple\"}],\"name\":\"_conditionalTrigger\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"txHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"source\",\"type\":\"address\"},{\"internalType\":\"bytes32[]\",\"name\":\"topics\",\"type\":\"bytes32[]\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"internalType\":\"structLog\",\"name\":\"\",\"type\":\"tuple\"}],\"name\":\"_log\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"logBlockHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"txHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"logIndex\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blockNum\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"}],\"internalType\":\"structAutomationRegistryBase2_2.LogTrigger\",\"name\":\"\",\"type\":\"tuple\"}],\"name\":\"_logTrigger\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"filterSelector\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"topic0\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"topic1\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"topic2\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"topic3\",\"type\":\"bytes32\"}],\"internalType\":\"structLogTriggerConfig\",\"name\":\"\",\"type\":\"tuple\"}],\"name\":\"_logTriggerConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"paymentPremiumPPB\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"flatFeeMicroLink\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"checkGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint24\",\"name\":\"stalenessSeconds\",\"type\":\"uint24\"},{\"internalType\":\"uint16\",\"name\":\"gasCeilingMultiplier\",\"type\":\"uint16\"},{\"internalType\":\"uint96\",\"name\":\"minUpkeepSpend\",\"type\":\"uint96\"},{\"internalType\":\"uint32\",\"name\":\"maxPerformGas\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxCheckDataSize\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxPerformDataSize\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxRevertDataSize\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"fallbackGasPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fallbackLinkPrice\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"transcoder\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"registrars\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"upkeepPrivilegeManager\",\"type\":\"address\"},{\"internalType\":\"contractIChainModule\",\"name\":\"chainModule\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"reorgProtectionEnabled\",\"type\":\"bool\"}],\"internalType\":\"structAutomationRegistryBase2_2.OnchainConfig\",\"name\":\"\",\"type\":\"tuple\"}],\"name\":\"_onChainConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"fastGasWei\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"linkNative\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"upkeepIds\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"gasLimits\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes[]\",\"name\":\"triggers\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes[]\",\"name\":\"performDatas\",\"type\":\"bytes[]\"}],\"internalType\":\"structAutomationRegistryBase2_2.Report\",\"name\":\"\",\"type\":\"tuple\"}],\"name\":\"_report\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x608060405234801561001057600080fd5b506108f1806100206000396000f3fe608060405234801561001057600080fd5b50600436106100725760003560e01c8063a4860f2311610050578063a4860f23146100a6578063e65d6546146100b4578063e9720a49146100c257600080fd5b806321f373d7146100775780634b6df2941461008a578063776f306114610098575b600080fd5b6100886100853660046101f1565b50565b005b610088610085366004610279565b6100886100853660046102d0565b610088610085366004610437565b610088610085366004610722565b61008861008536600461080f565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60405160c0810167ffffffffffffffff81118282101715610122576101226100d0565b60405290565b604051610220810167ffffffffffffffff81118282101715610122576101226100d0565b604051610100810167ffffffffffffffff81118282101715610122576101226100d0565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156101b7576101b76100d0565b604052919050565b73ffffffffffffffffffffffffffffffffffffffff8116811461008557600080fd5b80356101ec816101bf565b919050565b600060c0828403121561020357600080fd5b61020b6100ff565b8235610216816101bf565b8152602083013560ff8116811461022c57600080fd5b8060208301525060408301356040820152606083013560608201526080830135608082015260a083013560a08201528091505092915050565b803563ffffffff811681146101ec57600080fd5b60006040828403121561028b57600080fd5b6040516040810181811067ffffffffffffffff821117156102ae576102ae6100d0565b6040526102ba83610265565b8152602083013560208201528091505092915050565b600060a082840312156102e257600080fd5b60405160a0810181811067ffffffffffffffff82111715610305576103056100d0565b8060405250823581526020830135602082015261032460408401610265565b604082015261033560608401610265565b6060820152608083013560808201528091505092915050565b803562ffffff811681146101ec57600080fd5b803561ffff811681146101ec57600080fd5b80356bffffffffffffffffffffffff811681146101ec57600080fd5b600067ffffffffffffffff8211156103a9576103a96100d0565b5060051b60200190565b600082601f8301126103c457600080fd5b813560206103d96103d48361038f565b610170565b82815260059290921b840181019181810190868411156103f857600080fd5b8286015b8481101561041c57803561040f816101bf565b83529183019183016103fc565b509695505050505050565b803580151581146101ec57600080fd5b60006020828403121561044957600080fd5b813567ffffffffffffffff8082111561046157600080fd5b90830190610220828603121561047657600080fd5b61047e610128565b61048783610265565b815261049560208401610265565b60208201526104a660408401610265565b60408201526104b76060840161034e565b60608201526104c860808401610361565b60808201526104d960a08401610373565b60a08201526104ea60c08401610265565b60c08201526104fb60e08401610265565b60e082015261010061050e818501610265565b90820152610120610520848201610265565b90820152610140838101359082015261016080840135908201526101806105488185016101e1565b908201526101a0838101358381111561056057600080fd5b61056c888287016103b3565b8284015250506101c091506105828284016101e1565b828201526101e091506105968284016101e1565b8282015261020091506105aa828401610427565b91810191909152949350505050565b600082601f8301126105ca57600080fd5b813560206105da6103d48361038f565b82815260059290921b840181019181810190868411156105f957600080fd5b8286015b8481101561041c57803583529183019183016105fd565b600082601f83011261062557600080fd5b813567ffffffffffffffff81111561063f5761063f6100d0565b61067060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601610170565b81815284602083860101111561068557600080fd5b816020850160208301376000918101602001919091529392505050565b600082601f8301126106b357600080fd5b813560206106c36103d48361038f565b82815260059290921b840181019181810190868411156106e257600080fd5b8286015b8481101561041c57803567ffffffffffffffff8111156107065760008081fd5b6107148986838b0101610614565b8452509183019183016106e6565b60006020828403121561073457600080fd5b813567ffffffffffffffff8082111561074c57600080fd5b9083019060c0828603121561076057600080fd5b6107686100ff565b823581526020830135602082015260408301358281111561078857600080fd5b610794878286016105b9565b6040830152506060830135828111156107ac57600080fd5b6107b8878286016105b9565b6060830152506080830135828111156107d057600080fd5b6107dc878286016106a2565b60808301525060a0830135828111156107f457600080fd5b610800878286016106a2565b60a08301525095945050505050565b60006020828403121561082157600080fd5b813567ffffffffffffffff8082111561083957600080fd5b90830190610100828603121561084e57600080fd5b61085661014c565b823581526020830135602082015260408301356040820152606083013560608201526080830135608082015261088e60a084016101e1565b60a082015260c0830135828111156108a557600080fd5b6108b1878286016105b9565b60c08301525060e0830135828111156108c957600080fd5b6108d587828601610614565b60e0830152509594505050505056fea164736f6c6343000813000a", + ABI: "[{\"inputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"blockNum\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"}],\"internalType\":\"structAutomationRegistryBase2_2.ConditionalTrigger\",\"name\":\"\",\"type\":\"tuple\"}],\"name\":\"_conditionalTrigger\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"txHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"source\",\"type\":\"address\"},{\"internalType\":\"bytes32[]\",\"name\":\"topics\",\"type\":\"bytes32[]\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"internalType\":\"structLog\",\"name\":\"\",\"type\":\"tuple\"}],\"name\":\"_log\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"logBlockHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"txHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"logIndex\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blockNum\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"}],\"internalType\":\"structAutomationRegistryBase2_2.LogTrigger\",\"name\":\"\",\"type\":\"tuple\"}],\"name\":\"_logTrigger\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"filterSelector\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"topic0\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"topic1\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"topic2\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"topic3\",\"type\":\"bytes32\"}],\"internalType\":\"structLogTriggerConfig\",\"name\":\"\",\"type\":\"tuple\"}],\"name\":\"_logTriggerConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"paymentPremiumPPB\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"flatFeeMicroLink\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"checkGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint24\",\"name\":\"stalenessSeconds\",\"type\":\"uint24\"},{\"internalType\":\"uint16\",\"name\":\"gasCeilingMultiplier\",\"type\":\"uint16\"},{\"internalType\":\"uint96\",\"name\":\"minUpkeepSpend\",\"type\":\"uint96\"},{\"internalType\":\"uint32\",\"name\":\"maxPerformGas\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxCheckDataSize\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxPerformDataSize\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxRevertDataSize\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"fallbackGasPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fallbackLinkPrice\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"transcoder\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"registrars\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"upkeepPrivilegeManager\",\"type\":\"address\"}],\"internalType\":\"structIAutomationV21PlusCommon.OnchainConfigLegacy\",\"name\":\"\",\"type\":\"tuple\"}],\"name\":\"_onChainConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"fastGasWei\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"linkNative\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"upkeepIds\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"gasLimits\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes[]\",\"name\":\"triggers\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes[]\",\"name\":\"performDatas\",\"type\":\"bytes[]\"}],\"internalType\":\"structAutomationRegistryBase2_2.Report\",\"name\":\"\",\"type\":\"tuple\"}],\"name\":\"_report\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Bin: "0x608060405234801561001057600080fd5b506108ac806100206000396000f3fe608060405234801561001057600080fd5b50600436106100725760003560e01c8063776f306111610050578063776f3061146100a6578063e65d6546146100b4578063e9720a49146100c257600080fd5b806321f373d7146100775780632ff92a811461008a5780634b6df29414610098575b600080fd5b6100886100853660046101e8565b50565b005b610088610085366004610345565b61008861008536600461049f565b6100886100853660046104f6565b6100886100853660046106dd565b6100886100853660046107ca565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60405160c0810167ffffffffffffffff81118282101715610122576101226100d0565b60405290565b6040516101e0810167ffffffffffffffff81118282101715610122576101226100d0565b604051610100810167ffffffffffffffff81118282101715610122576101226100d0565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156101b7576101b76100d0565b604052919050565b803573ffffffffffffffffffffffffffffffffffffffff811681146101e357600080fd5b919050565b600060c082840312156101fa57600080fd5b6102026100ff565b61020b836101bf565b8152602083013560ff8116811461022157600080fd5b8060208301525060408301356040820152606083013560608201526080830135608082015260a083013560a08201528091505092915050565b803563ffffffff811681146101e357600080fd5b803562ffffff811681146101e357600080fd5b803561ffff811681146101e357600080fd5b80356bffffffffffffffffffffffff811681146101e357600080fd5b600067ffffffffffffffff8211156102c9576102c96100d0565b5060051b60200190565b600082601f8301126102e457600080fd5b813560206102f96102f4836102af565b610170565b82815260059290921b8401810191818101908684111561031857600080fd5b8286015b8481101561033a5761032d816101bf565b835291830191830161031c565b509695505050505050565b60006020828403121561035757600080fd5b813567ffffffffffffffff8082111561036f57600080fd5b908301906101e0828603121561038457600080fd5b61038c610128565b6103958361025a565b81526103a36020840161025a565b60208201526103b46040840161025a565b60408201526103c56060840161026e565b60608201526103d660808401610281565b60808201526103e760a08401610293565b60a08201526103f860c0840161025a565b60c082015261040960e0840161025a565b60e082015261010061041c81850161025a565b9082015261012061042e84820161025a565b90820152610140838101359082015261016080840135908201526101806104568185016101bf565b908201526101a0838101358381111561046e57600080fd5b61047a888287016102d3565b8284015250506101c091506104908284016101bf565b91810191909152949350505050565b6000604082840312156104b157600080fd5b6040516040810181811067ffffffffffffffff821117156104d4576104d46100d0565b6040526104e08361025a565b8152602083013560208201528091505092915050565b600060a0828403121561050857600080fd5b60405160a0810181811067ffffffffffffffff8211171561052b5761052b6100d0565b8060405250823581526020830135602082015261054a6040840161025a565b604082015261055b6060840161025a565b6060820152608083013560808201528091505092915050565b600082601f83011261058557600080fd5b813560206105956102f4836102af565b82815260059290921b840181019181810190868411156105b457600080fd5b8286015b8481101561033a57803583529183019183016105b8565b600082601f8301126105e057600080fd5b813567ffffffffffffffff8111156105fa576105fa6100d0565b61062b60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601610170565b81815284602083860101111561064057600080fd5b816020850160208301376000918101602001919091529392505050565b600082601f83011261066e57600080fd5b8135602061067e6102f4836102af565b82815260059290921b8401810191818101908684111561069d57600080fd5b8286015b8481101561033a57803567ffffffffffffffff8111156106c15760008081fd5b6106cf8986838b01016105cf565b8452509183019183016106a1565b6000602082840312156106ef57600080fd5b813567ffffffffffffffff8082111561070757600080fd5b9083019060c0828603121561071b57600080fd5b6107236100ff565b823581526020830135602082015260408301358281111561074357600080fd5b61074f87828601610574565b60408301525060608301358281111561076757600080fd5b61077387828601610574565b60608301525060808301358281111561078b57600080fd5b6107978782860161065d565b60808301525060a0830135828111156107af57600080fd5b6107bb8782860161065d565b60a08301525095945050505050565b6000602082840312156107dc57600080fd5b813567ffffffffffffffff808211156107f457600080fd5b90830190610100828603121561080957600080fd5b61081161014c565b823581526020830135602082015260408301356040820152606083013560608201526080830135608082015261084960a084016101bf565b60a082015260c08301358281111561086057600080fd5b61086c87828601610574565b60c08301525060e08301358281111561088457600080fd5b610890878286016105cf565b60e0830152509594505050505056fea164736f6c6343000813000a", } var AutomationUtilsABI = AutomationUtilsMetaData.ABI @@ -279,15 +277,15 @@ func (_AutomationUtils *AutomationUtilsTransactorSession) LogTriggerConfig(arg0 return _AutomationUtils.Contract.LogTriggerConfig(&_AutomationUtils.TransactOpts, arg0) } -func (_AutomationUtils *AutomationUtilsTransactor) OnChainConfig(opts *bind.TransactOpts, arg0 AutomationRegistryBase22OnchainConfig) (*types.Transaction, error) { +func (_AutomationUtils *AutomationUtilsTransactor) OnChainConfig(opts *bind.TransactOpts, arg0 IAutomationV21PlusCommonOnchainConfigLegacy) (*types.Transaction, error) { return _AutomationUtils.contract.Transact(opts, "_onChainConfig", arg0) } -func (_AutomationUtils *AutomationUtilsSession) OnChainConfig(arg0 AutomationRegistryBase22OnchainConfig) (*types.Transaction, error) { +func (_AutomationUtils *AutomationUtilsSession) OnChainConfig(arg0 IAutomationV21PlusCommonOnchainConfigLegacy) (*types.Transaction, error) { return _AutomationUtils.Contract.OnChainConfig(&_AutomationUtils.TransactOpts, arg0) } -func (_AutomationUtils *AutomationUtilsTransactorSession) OnChainConfig(arg0 AutomationRegistryBase22OnchainConfig) (*types.Transaction, error) { +func (_AutomationUtils *AutomationUtilsTransactorSession) OnChainConfig(arg0 IAutomationV21PlusCommonOnchainConfigLegacy) (*types.Transaction, error) { return _AutomationUtils.Contract.OnChainConfig(&_AutomationUtils.TransactOpts, arg0) } @@ -316,7 +314,7 @@ type AutomationUtilsInterface interface { LogTriggerConfig(opts *bind.TransactOpts, arg0 LogTriggerConfig) (*types.Transaction, error) - OnChainConfig(opts *bind.TransactOpts, arg0 AutomationRegistryBase22OnchainConfig) (*types.Transaction, error) + OnChainConfig(opts *bind.TransactOpts, arg0 IAutomationV21PlusCommonOnchainConfigLegacy) (*types.Transaction, error) Report(opts *bind.TransactOpts, arg0 AutomationRegistryBase22Report) (*types.Transaction, error) diff --git a/core/gethwrappers/generated/automation_utils_2_3/automation_utils_2_3.go b/core/gethwrappers/generated/automation_utils_2_3/automation_utils_2_3.go index 65cb0e4c04c..aafaf3f2657 100644 --- a/core/gethwrappers/generated/automation_utils_2_3/automation_utils_2_3.go +++ b/core/gethwrappers/generated/automation_utils_2_3/automation_utils_2_3.go @@ -28,71 +28,18 @@ var ( _ = abi.ConvertType ) -type AutomationRegistryBase23ConditionalTrigger struct { - BlockNum uint32 - BlockHash [32]byte -} - -type AutomationRegistryBase23LogTrigger struct { - LogBlockHash [32]byte - TxHash [32]byte - LogIndex uint32 - BlockNum uint32 - BlockHash [32]byte -} - -type AutomationRegistryBase23OnchainConfig struct { - PaymentPremiumPPB uint32 - FlatFeeMicroLink uint32 - CheckGasLimit uint32 - StalenessSeconds *big.Int - GasCeilingMultiplier uint16 - MinUpkeepSpend *big.Int - MaxPerformGas uint32 - MaxCheckDataSize uint32 - MaxPerformDataSize uint32 - MaxRevertDataSize uint32 - FallbackGasPrice *big.Int - FallbackLinkPrice *big.Int - Transcoder common.Address - Registrars []common.Address - UpkeepPrivilegeManager common.Address - ChainModule common.Address - ReorgProtectionEnabled bool -} - type AutomationRegistryBase23Report struct { FastGasWei *big.Int - LinkNative *big.Int + LinkUSD *big.Int UpkeepIds []*big.Int GasLimits []*big.Int Triggers [][]byte PerformDatas [][]byte } -type Log struct { - Index *big.Int - Timestamp *big.Int - TxHash [32]byte - BlockNumber *big.Int - BlockHash [32]byte - Source common.Address - Topics [][32]byte - Data []byte -} - -type LogTriggerConfig struct { - ContractAddress common.Address - FilterSelector uint8 - Topic0 [32]byte - Topic1 [32]byte - Topic2 [32]byte - Topic3 [32]byte -} - var AutomationUtilsMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"blockNum\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"}],\"internalType\":\"structAutomationRegistryBase2_3.ConditionalTrigger\",\"name\":\"\",\"type\":\"tuple\"}],\"name\":\"_conditionalTrigger\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"txHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"source\",\"type\":\"address\"},{\"internalType\":\"bytes32[]\",\"name\":\"topics\",\"type\":\"bytes32[]\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"internalType\":\"structLog\",\"name\":\"\",\"type\":\"tuple\"}],\"name\":\"_log\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"logBlockHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"txHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"logIndex\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blockNum\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"}],\"internalType\":\"structAutomationRegistryBase2_3.LogTrigger\",\"name\":\"\",\"type\":\"tuple\"}],\"name\":\"_logTrigger\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"filterSelector\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"topic0\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"topic1\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"topic2\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"topic3\",\"type\":\"bytes32\"}],\"internalType\":\"structLogTriggerConfig\",\"name\":\"\",\"type\":\"tuple\"}],\"name\":\"_logTriggerConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"paymentPremiumPPB\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"flatFeeMicroLink\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"checkGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint24\",\"name\":\"stalenessSeconds\",\"type\":\"uint24\"},{\"internalType\":\"uint16\",\"name\":\"gasCeilingMultiplier\",\"type\":\"uint16\"},{\"internalType\":\"uint96\",\"name\":\"minUpkeepSpend\",\"type\":\"uint96\"},{\"internalType\":\"uint32\",\"name\":\"maxPerformGas\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxCheckDataSize\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxPerformDataSize\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxRevertDataSize\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"fallbackGasPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fallbackLinkPrice\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"transcoder\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"registrars\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"upkeepPrivilegeManager\",\"type\":\"address\"},{\"internalType\":\"contractIChainModule\",\"name\":\"chainModule\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"reorgProtectionEnabled\",\"type\":\"bool\"}],\"internalType\":\"structAutomationRegistryBase2_3.OnchainConfig\",\"name\":\"\",\"type\":\"tuple\"}],\"name\":\"_onChainConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"fastGasWei\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"linkNative\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"upkeepIds\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"gasLimits\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes[]\",\"name\":\"triggers\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes[]\",\"name\":\"performDatas\",\"type\":\"bytes[]\"}],\"internalType\":\"structAutomationRegistryBase2_3.Report\",\"name\":\"\",\"type\":\"tuple\"}],\"name\":\"_report\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x608060405234801561001057600080fd5b506108f1806100206000396000f3fe608060405234801561001057600080fd5b50600436106100725760003560e01c8063a4860f2311610050578063a4860f23146100a6578063e65d6546146100b4578063e9720a49146100c257600080fd5b806321f373d7146100775780634b6df2941461008a578063776f306114610098575b600080fd5b6100886100853660046101f1565b50565b005b610088610085366004610279565b6100886100853660046102d0565b610088610085366004610437565b610088610085366004610722565b61008861008536600461080f565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60405160c0810167ffffffffffffffff81118282101715610122576101226100d0565b60405290565b604051610220810167ffffffffffffffff81118282101715610122576101226100d0565b604051610100810167ffffffffffffffff81118282101715610122576101226100d0565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156101b7576101b76100d0565b604052919050565b73ffffffffffffffffffffffffffffffffffffffff8116811461008557600080fd5b80356101ec816101bf565b919050565b600060c0828403121561020357600080fd5b61020b6100ff565b8235610216816101bf565b8152602083013560ff8116811461022c57600080fd5b8060208301525060408301356040820152606083013560608201526080830135608082015260a083013560a08201528091505092915050565b803563ffffffff811681146101ec57600080fd5b60006040828403121561028b57600080fd5b6040516040810181811067ffffffffffffffff821117156102ae576102ae6100d0565b6040526102ba83610265565b8152602083013560208201528091505092915050565b600060a082840312156102e257600080fd5b60405160a0810181811067ffffffffffffffff82111715610305576103056100d0565b8060405250823581526020830135602082015261032460408401610265565b604082015261033560608401610265565b6060820152608083013560808201528091505092915050565b803562ffffff811681146101ec57600080fd5b803561ffff811681146101ec57600080fd5b80356bffffffffffffffffffffffff811681146101ec57600080fd5b600067ffffffffffffffff8211156103a9576103a96100d0565b5060051b60200190565b600082601f8301126103c457600080fd5b813560206103d96103d48361038f565b610170565b82815260059290921b840181019181810190868411156103f857600080fd5b8286015b8481101561041c57803561040f816101bf565b83529183019183016103fc565b509695505050505050565b803580151581146101ec57600080fd5b60006020828403121561044957600080fd5b813567ffffffffffffffff8082111561046157600080fd5b90830190610220828603121561047657600080fd5b61047e610128565b61048783610265565b815261049560208401610265565b60208201526104a660408401610265565b60408201526104b76060840161034e565b60608201526104c860808401610361565b60808201526104d960a08401610373565b60a08201526104ea60c08401610265565b60c08201526104fb60e08401610265565b60e082015261010061050e818501610265565b90820152610120610520848201610265565b90820152610140838101359082015261016080840135908201526101806105488185016101e1565b908201526101a0838101358381111561056057600080fd5b61056c888287016103b3565b8284015250506101c091506105828284016101e1565b828201526101e091506105968284016101e1565b8282015261020091506105aa828401610427565b91810191909152949350505050565b600082601f8301126105ca57600080fd5b813560206105da6103d48361038f565b82815260059290921b840181019181810190868411156105f957600080fd5b8286015b8481101561041c57803583529183019183016105fd565b600082601f83011261062557600080fd5b813567ffffffffffffffff81111561063f5761063f6100d0565b61067060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601610170565b81815284602083860101111561068557600080fd5b816020850160208301376000918101602001919091529392505050565b600082601f8301126106b357600080fd5b813560206106c36103d48361038f565b82815260059290921b840181019181810190868411156106e257600080fd5b8286015b8481101561041c57803567ffffffffffffffff8111156107065760008081fd5b6107148986838b0101610614565b8452509183019183016106e6565b60006020828403121561073457600080fd5b813567ffffffffffffffff8082111561074c57600080fd5b9083019060c0828603121561076057600080fd5b6107686100ff565b823581526020830135602082015260408301358281111561078857600080fd5b610794878286016105b9565b6040830152506060830135828111156107ac57600080fd5b6107b8878286016105b9565b6060830152506080830135828111156107d057600080fd5b6107dc878286016106a2565b60808301525060a0830135828111156107f457600080fd5b610800878286016106a2565b60a08301525095945050505050565b60006020828403121561082157600080fd5b813567ffffffffffffffff8082111561083957600080fd5b90830190610100828603121561084e57600080fd5b61085661014c565b823581526020830135602082015260408301356040820152606083013560608201526080830135608082015261088e60a084016101e1565b60a082015260c0830135828111156108a557600080fd5b6108b1878286016105b9565b60c08301525060e0830135828111156108c957600080fd5b6108d587828601610614565b60e0830152509594505050505056fea164736f6c6343000813000a", + ABI: "[{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"fastGasWei\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"linkUSD\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"upkeepIds\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"gasLimits\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes[]\",\"name\":\"triggers\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes[]\",\"name\":\"performDatas\",\"type\":\"bytes[]\"}],\"internalType\":\"structAutomationRegistryBase2_3.Report\",\"name\":\"\",\"type\":\"tuple\"}],\"name\":\"_report\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Bin: "0x608060405234801561001057600080fd5b50610375806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063e65d654614610030575b600080fd5b61004161003e36600461027b565b50565b005b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60405160c0810167ffffffffffffffff8111828210171561009557610095610043565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156100e2576100e2610043565b604052919050565b600067ffffffffffffffff82111561010457610104610043565b5060051b60200190565b600082601f83011261011f57600080fd5b8135602061013461012f836100ea565b61009b565b82815260059290921b8401810191818101908684111561015357600080fd5b8286015b8481101561016e5780358352918301918301610157565b509695505050505050565b6000601f838184011261018b57600080fd5b8235602061019b61012f836100ea565b82815260059290921b850181019181810190878411156101ba57600080fd5b8287015b8481101561026f57803567ffffffffffffffff808211156101df5760008081fd5b818a0191508a603f8301126101f45760008081fd5b8582013560408282111561020a5761020a610043565b610239887fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08c8501160161009b565b92508183528c818386010111156102505760008081fd5b81818501898501375060009082018701528452509183019183016101be565b50979650505050505050565b60006020828403121561028d57600080fd5b813567ffffffffffffffff808211156102a557600080fd5b9083019060c082860312156102b957600080fd5b6102c1610072565b82358152602083013560208201526040830135828111156102e157600080fd5b6102ed8782860161010e565b60408301525060608301358281111561030557600080fd5b6103118782860161010e565b60608301525060808301358281111561032957600080fd5b61033587828601610179565b60808301525060a08301358281111561034d57600080fd5b61035987828601610179565b60a0830152509594505050505056fea164736f6c6343000813000a", } var AutomationUtilsABI = AutomationUtilsMetaData.ABI @@ -231,66 +178,6 @@ func (_AutomationUtils *AutomationUtilsTransactorRaw) Transact(opts *bind.Transa return _AutomationUtils.Contract.contract.Transact(opts, method, params...) } -func (_AutomationUtils *AutomationUtilsTransactor) ConditionalTrigger(opts *bind.TransactOpts, arg0 AutomationRegistryBase23ConditionalTrigger) (*types.Transaction, error) { - return _AutomationUtils.contract.Transact(opts, "_conditionalTrigger", arg0) -} - -func (_AutomationUtils *AutomationUtilsSession) ConditionalTrigger(arg0 AutomationRegistryBase23ConditionalTrigger) (*types.Transaction, error) { - return _AutomationUtils.Contract.ConditionalTrigger(&_AutomationUtils.TransactOpts, arg0) -} - -func (_AutomationUtils *AutomationUtilsTransactorSession) ConditionalTrigger(arg0 AutomationRegistryBase23ConditionalTrigger) (*types.Transaction, error) { - return _AutomationUtils.Contract.ConditionalTrigger(&_AutomationUtils.TransactOpts, arg0) -} - -func (_AutomationUtils *AutomationUtilsTransactor) Log(opts *bind.TransactOpts, arg0 Log) (*types.Transaction, error) { - return _AutomationUtils.contract.Transact(opts, "_log", arg0) -} - -func (_AutomationUtils *AutomationUtilsSession) Log(arg0 Log) (*types.Transaction, error) { - return _AutomationUtils.Contract.Log(&_AutomationUtils.TransactOpts, arg0) -} - -func (_AutomationUtils *AutomationUtilsTransactorSession) Log(arg0 Log) (*types.Transaction, error) { - return _AutomationUtils.Contract.Log(&_AutomationUtils.TransactOpts, arg0) -} - -func (_AutomationUtils *AutomationUtilsTransactor) LogTrigger(opts *bind.TransactOpts, arg0 AutomationRegistryBase23LogTrigger) (*types.Transaction, error) { - return _AutomationUtils.contract.Transact(opts, "_logTrigger", arg0) -} - -func (_AutomationUtils *AutomationUtilsSession) LogTrigger(arg0 AutomationRegistryBase23LogTrigger) (*types.Transaction, error) { - return _AutomationUtils.Contract.LogTrigger(&_AutomationUtils.TransactOpts, arg0) -} - -func (_AutomationUtils *AutomationUtilsTransactorSession) LogTrigger(arg0 AutomationRegistryBase23LogTrigger) (*types.Transaction, error) { - return _AutomationUtils.Contract.LogTrigger(&_AutomationUtils.TransactOpts, arg0) -} - -func (_AutomationUtils *AutomationUtilsTransactor) LogTriggerConfig(opts *bind.TransactOpts, arg0 LogTriggerConfig) (*types.Transaction, error) { - return _AutomationUtils.contract.Transact(opts, "_logTriggerConfig", arg0) -} - -func (_AutomationUtils *AutomationUtilsSession) LogTriggerConfig(arg0 LogTriggerConfig) (*types.Transaction, error) { - return _AutomationUtils.Contract.LogTriggerConfig(&_AutomationUtils.TransactOpts, arg0) -} - -func (_AutomationUtils *AutomationUtilsTransactorSession) LogTriggerConfig(arg0 LogTriggerConfig) (*types.Transaction, error) { - return _AutomationUtils.Contract.LogTriggerConfig(&_AutomationUtils.TransactOpts, arg0) -} - -func (_AutomationUtils *AutomationUtilsTransactor) OnChainConfig(opts *bind.TransactOpts, arg0 AutomationRegistryBase23OnchainConfig) (*types.Transaction, error) { - return _AutomationUtils.contract.Transact(opts, "_onChainConfig", arg0) -} - -func (_AutomationUtils *AutomationUtilsSession) OnChainConfig(arg0 AutomationRegistryBase23OnchainConfig) (*types.Transaction, error) { - return _AutomationUtils.Contract.OnChainConfig(&_AutomationUtils.TransactOpts, arg0) -} - -func (_AutomationUtils *AutomationUtilsTransactorSession) OnChainConfig(arg0 AutomationRegistryBase23OnchainConfig) (*types.Transaction, error) { - return _AutomationUtils.Contract.OnChainConfig(&_AutomationUtils.TransactOpts, arg0) -} - func (_AutomationUtils *AutomationUtilsTransactor) Report(opts *bind.TransactOpts, arg0 AutomationRegistryBase23Report) (*types.Transaction, error) { return _AutomationUtils.contract.Transact(opts, "_report", arg0) } @@ -308,16 +195,6 @@ func (_AutomationUtils *AutomationUtils) Address() common.Address { } type AutomationUtilsInterface interface { - ConditionalTrigger(opts *bind.TransactOpts, arg0 AutomationRegistryBase23ConditionalTrigger) (*types.Transaction, error) - - Log(opts *bind.TransactOpts, arg0 Log) (*types.Transaction, error) - - LogTrigger(opts *bind.TransactOpts, arg0 AutomationRegistryBase23LogTrigger) (*types.Transaction, error) - - LogTriggerConfig(opts *bind.TransactOpts, arg0 LogTriggerConfig) (*types.Transaction, error) - - OnChainConfig(opts *bind.TransactOpts, arg0 AutomationRegistryBase23OnchainConfig) (*types.Transaction, error) - Report(opts *bind.TransactOpts, arg0 AutomationRegistryBase23Report) (*types.Transaction, error) Address() common.Address diff --git a/core/gethwrappers/generated/batch_vrf_coordinator_v2plus/batch_vrf_coordinator_v2plus.go b/core/gethwrappers/generated/batch_vrf_coordinator_v2plus/batch_vrf_coordinator_v2plus.go index fa2892f5dce..fdfcdef9071 100644 --- a/core/gethwrappers/generated/batch_vrf_coordinator_v2plus/batch_vrf_coordinator_v2plus.go +++ b/core/gethwrappers/generated/batch_vrf_coordinator_v2plus/batch_vrf_coordinator_v2plus.go @@ -52,8 +52,8 @@ type VRFTypesRequestCommitmentV2Plus struct { } var BatchVRFCoordinatorV2PlusMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"coordinatorAddr\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"reason\",\"type\":\"string\"}],\"name\":\"ErrorReturned\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"lowLevelData\",\"type\":\"bytes\"}],\"name\":\"RawErrorReturned\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"COORDINATOR\",\"outputs\":[{\"internalType\":\"contractIVRFCoordinatorV2Plus\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256[2]\",\"name\":\"pk\",\"type\":\"uint256[2]\"},{\"internalType\":\"uint256[2]\",\"name\":\"gamma\",\"type\":\"uint256[2]\"},{\"internalType\":\"uint256\",\"name\":\"c\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"s\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"seed\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"uWitness\",\"type\":\"address\"},{\"internalType\":\"uint256[2]\",\"name\":\"cGammaWitness\",\"type\":\"uint256[2]\"},{\"internalType\":\"uint256[2]\",\"name\":\"sHashWitness\",\"type\":\"uint256[2]\"},{\"internalType\":\"uint256\",\"name\":\"zInv\",\"type\":\"uint256\"}],\"internalType\":\"structVRFTypes.Proof[]\",\"name\":\"proofs\",\"type\":\"tuple[]\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"blockNum\",\"type\":\"uint64\"},{\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"numWords\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"extraArgs\",\"type\":\"bytes\"}],\"internalType\":\"structVRFTypes.RequestCommitmentV2Plus[]\",\"name\":\"rcs\",\"type\":\"tuple[]\"}],\"name\":\"fulfillRandomWords\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x60a060405234801561001057600080fd5b50604051610cd3380380610cd383398101604081905261002f91610044565b60601b6001600160601b031916608052610074565b60006020828403121561005657600080fd5b81516001600160a01b038116811461006d57600080fd5b9392505050565b60805160601c610c3b610098600039600081816040015261011d0152610c3b6000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80633b2bcbf11461003b5780636abb17211461008b575b600080fd5b6100627f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b61009e610099366004610668565b6100a0565b005b805182511461010f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f696e70757420617272617920617267206c656e67746873206d69736d61746368604482015260640160405180910390fd5b60005b8251811015610333577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663301f42e984838151811061016957610169610b0c565b602002602001015184848151811061018357610183610b0c565b602002602001015160006040518463ffffffff1660e01b81526004016101ab93929190610933565b602060405180830381600087803b1580156101c557600080fd5b505af1925050508015610213575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252610210918101906107c8565b60015b61031f5761021f610b6a565b806308c379a014156102a45750610234610b86565b8061023f57506102a6565b600061026385848151811061025657610256610b0c565b6020026020010151610338565b9050807f4dcab4ce0e741a040f7e0f9b880557f8de685a9520d4bfac272a81c3c3802b2e836040516102959190610920565b60405180910390a25050610321565b505b3d8080156102d0576040519150601f19603f3d011682016040523d82523d6000602084013e6102d5565b606091505b5060006102ed85848151811061025657610256610b0c565b9050807fbfd42bb5a1bf8153ea750f66ea4944f23f7b9ae51d0462177b9769aa652b61b5836040516102959190610920565b505b8061032b81610aac565b915050610112565b505050565b60008061034883600001516103a7565b905080836080015160405160200161036a929190918252602082015260400190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291905280516020909101209392505050565b6000816040516020016103ba919061090c565b604051602081830303815290604052805190602001209050919050565b803573ffffffffffffffffffffffffffffffffffffffff811681146103fb57600080fd5b919050565b600082601f83011261041157600080fd5b8135602061041e82610a17565b6040805161042c8382610a61565b8481528381019250868401600586901b8801850189101561044c57600080fd5b60005b8681101561053c57813567ffffffffffffffff8082111561046f57600080fd5b818b01915060c0807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0848f030112156104a757600080fd5b86516104b281610a3b565b8984013583811681146104c457600080fd5b8152838801358a82015260606104db818601610654565b8983015260806104ec818701610654565b8284015260a091506104ff8287016103d7565b9083015291840135918383111561051557600080fd5b6105238f8c858801016105c2565b908201528852505050938501939085019060010161044f565b509098975050505050505050565b600082601f83011261055b57600080fd5b6040516040810181811067ffffffffffffffff8211171561057e5761057e610b3b565b806040525080838560408601111561059557600080fd5b60005b60028110156105b7578135835260209283019290910190600101610598565b509195945050505050565b600082601f8301126105d357600080fd5b813567ffffffffffffffff8111156105ed576105ed610b3b565b60405161062260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8501160182610a61565b81815284602083860101111561063757600080fd5b816020850160208301376000918101602001919091529392505050565b803563ffffffff811681146103fb57600080fd5b600080604080848603121561067c57600080fd5b833567ffffffffffffffff8082111561069457600080fd5b818601915086601f8301126106a857600080fd5b813560206106b582610a17565b85516106c18282610a61565b83815282810191508583016101a0808602880185018d10156106e257600080fd5b600097505b858810156107975780828e0312156106fe57600080fd5b6107066109ed565b6107108e8461054a565b815261071e8e8b850161054a565b8682015260808301358a82015260a0830135606082015260c0830135608082015261074b60e084016103d7565b60a082015261010061075f8f82860161054a565b60c08301526107728f610140860161054a565b60e08301526101808401359082015284526001979097019692840192908101906106e7565b509098505050870135935050808311156107b057600080fd5b50506107be85828601610400565b9150509250929050565b6000602082840312156107da57600080fd5b81516bffffffffffffffffffffffff811681146107f657600080fd5b9392505050565b8060005b6002811015610820578151845260209384019390910190600101610801565b50505050565b6000815180845260005b8181101561084c57602081850181015186830182015201610830565b8181111561085e576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b67ffffffffffffffff8151168252602081015160208301526000604082015163ffffffff8082166040860152806060850151166060860152505073ffffffffffffffffffffffffffffffffffffffff608083015116608084015260a082015160c060a085015261090460c0850182610826565b949350505050565b6040810161091a82846107fd565b92915050565b6020815260006107f66020830184610826565b60006101e06109438387516107fd565b602086015161095560408501826107fd565b5060408601516080840152606086015160a0840152608086015160c084015273ffffffffffffffffffffffffffffffffffffffff60a08701511660e084015260c08601516101006109a8818601836107fd565b60e088015191506109bd6101408601836107fd565b870151610180850152506101a083018190526109db81840186610891565b9150506109046101c083018415159052565b604051610120810167ffffffffffffffff81118282101715610a1157610a11610b3b565b60405290565b600067ffffffffffffffff821115610a3157610a31610b3b565b5060051b60200190565b60c0810181811067ffffffffffffffff82111715610a5b57610a5b610b3b565b60405250565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f830116810181811067ffffffffffffffff82111715610aa557610aa5610b3b565b6040525050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415610b05577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600060033d1115610b835760046000803e5060005160e01c5b90565b600060443d1015610b945790565b6040517ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc803d016004833e81513d67ffffffffffffffff8160248401118184111715610be257505050505090565b8285019150815181811115610bfa5750505050505090565b843d8701016020828501011115610c145750505050505090565b610c2360208286010187610a61565b50909594505050505056fea164736f6c6343000806000a", + ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"coordinatorAddr\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"reason\",\"type\":\"string\"}],\"name\":\"ErrorReturned\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"lowLevelData\",\"type\":\"bytes\"}],\"name\":\"RawErrorReturned\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"COORDINATOR\",\"outputs\":[{\"internalType\":\"contractIVRFCoordinatorV2PlusFulfill\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256[2]\",\"name\":\"pk\",\"type\":\"uint256[2]\"},{\"internalType\":\"uint256[2]\",\"name\":\"gamma\",\"type\":\"uint256[2]\"},{\"internalType\":\"uint256\",\"name\":\"c\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"s\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"seed\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"uWitness\",\"type\":\"address\"},{\"internalType\":\"uint256[2]\",\"name\":\"cGammaWitness\",\"type\":\"uint256[2]\"},{\"internalType\":\"uint256[2]\",\"name\":\"sHashWitness\",\"type\":\"uint256[2]\"},{\"internalType\":\"uint256\",\"name\":\"zInv\",\"type\":\"uint256\"}],\"internalType\":\"structVRFTypes.Proof[]\",\"name\":\"proofs\",\"type\":\"tuple[]\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"blockNum\",\"type\":\"uint64\"},{\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"numWords\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"extraArgs\",\"type\":\"bytes\"}],\"internalType\":\"structVRFTypes.RequestCommitmentV2Plus[]\",\"name\":\"rcs\",\"type\":\"tuple[]\"}],\"name\":\"fulfillRandomWords\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Bin: "0x60a060405234801561001057600080fd5b50604051610cd1380380610cd183398101604081905261002f91610044565b60601b6001600160601b031916608052610074565b60006020828403121561005657600080fd5b81516001600160a01b038116811461006d57600080fd5b9392505050565b60805160601c610c39610098600039600081816040015261011d0152610c396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80633b2bcbf11461003b5780636abb17211461008b575b600080fd5b6100627f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b61009e610099366004610666565b6100a0565b005b805182511461010f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f696e70757420617272617920617267206c656e67746873206d69736d61746368604482015260640160405180910390fd5b60005b8251811015610331577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663301f42e984838151811061016957610169610b0a565b602002602001015184848151811061018357610183610b0a565b602002602001015160006040518463ffffffff1660e01b81526004016101ab93929190610931565b602060405180830381600087803b1580156101c557600080fd5b505af1925050508015610213575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252610210918101906107c6565b60015b61031f5761021f610b68565b806308c379a014156102a45750610234610b84565b8061023f57506102a6565b600061026385848151811061025657610256610b0a565b6020026020010151610336565b9050807f4dcab4ce0e741a040f7e0f9b880557f8de685a9520d4bfac272a81c3c3802b2e83604051610295919061091e565b60405180910390a25050610321565b505b3d8080156102d0576040519150601f19603f3d011682016040523d82523d6000602084013e6102d5565b606091505b5060006102ed85848151811061025657610256610b0a565b9050807fbfd42bb5a1bf8153ea750f66ea4944f23f7b9ae51d0462177b9769aa652b61b583604051610295919061091e565b505b61032a81610aaa565b9050610112565b505050565b60008061034683600001516103a5565b9050808360800151604051602001610368929190918252602082015260400190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291905280516020909101209392505050565b6000816040516020016103b8919061090a565b604051602081830303815290604052805190602001209050919050565b803573ffffffffffffffffffffffffffffffffffffffff811681146103f957600080fd5b919050565b600082601f83011261040f57600080fd5b8135602061041c82610a15565b6040805161042a8382610a5f565b8481528381019250868401600586901b8801850189101561044a57600080fd5b60005b8681101561053a57813567ffffffffffffffff8082111561046d57600080fd5b818b01915060c0807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0848f030112156104a557600080fd5b86516104b081610a39565b8984013583811681146104c257600080fd5b8152838801358a82015260606104d9818601610652565b8983015260806104ea818701610652565b8284015260a091506104fd8287016103d5565b9083015291840135918383111561051357600080fd5b6105218f8c858801016105c0565b908201528852505050938501939085019060010161044d565b509098975050505050505050565b600082601f83011261055957600080fd5b6040516040810181811067ffffffffffffffff8211171561057c5761057c610b39565b806040525080838560408601111561059357600080fd5b60005b60028110156105b5578135835260209283019290910190600101610596565b509195945050505050565b600082601f8301126105d157600080fd5b813567ffffffffffffffff8111156105eb576105eb610b39565b60405161062060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8501160182610a5f565b81815284602083860101111561063557600080fd5b816020850160208301376000918101602001919091529392505050565b803563ffffffff811681146103f957600080fd5b600080604080848603121561067a57600080fd5b833567ffffffffffffffff8082111561069257600080fd5b818601915086601f8301126106a657600080fd5b813560206106b382610a15565b85516106bf8282610a5f565b83815282810191508583016101a0808602880185018d10156106e057600080fd5b600097505b858810156107955780828e0312156106fc57600080fd5b6107046109eb565b61070e8e84610548565b815261071c8e8b8501610548565b8682015260808301358a82015260a0830135606082015260c0830135608082015261074960e084016103d5565b60a082015261010061075d8f828601610548565b60c08301526107708f6101408601610548565b60e08301526101808401359082015284526001979097019692840192908101906106e5565b509098505050870135935050808311156107ae57600080fd5b50506107bc858286016103fe565b9150509250929050565b6000602082840312156107d857600080fd5b81516bffffffffffffffffffffffff811681146107f457600080fd5b9392505050565b8060005b600281101561081e5781518452602093840193909101906001016107ff565b50505050565b6000815180845260005b8181101561084a5760208185018101518683018201520161082e565b8181111561085c576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b67ffffffffffffffff8151168252602081015160208301526000604082015163ffffffff8082166040860152806060850151166060860152505073ffffffffffffffffffffffffffffffffffffffff608083015116608084015260a082015160c060a085015261090260c0850182610824565b949350505050565b6040810161091882846107fb565b92915050565b6020815260006107f46020830184610824565b60006101e06109418387516107fb565b602086015161095360408501826107fb565b5060408601516080840152606086015160a0840152608086015160c084015273ffffffffffffffffffffffffffffffffffffffff60a08701511660e084015260c08601516101006109a6818601836107fb565b60e088015191506109bb6101408601836107fb565b870151610180850152506101a083018190526109d98184018661088f565b9150506109026101c083018415159052565b604051610120810167ffffffffffffffff81118282101715610a0f57610a0f610b39565b60405290565b600067ffffffffffffffff821115610a2f57610a2f610b39565b5060051b60200190565b60c0810181811067ffffffffffffffff82111715610a5957610a59610b39565b60405250565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f830116810181811067ffffffffffffffff82111715610aa357610aa3610b39565b6040525050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415610b03577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600060033d1115610b815760046000803e5060005160e01c5b90565b600060443d1015610b925790565b6040517ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc803d016004833e81513d67ffffffffffffffff8160248401118184111715610be057505050505090565b8285019150815181811115610bf85750505050505090565b843d8701016020828501011115610c125750505050505090565b610c2160208286010187610a5f565b50909594505050505056fea164736f6c6343000806000a", } var BatchVRFCoordinatorV2PlusABI = BatchVRFCoordinatorV2PlusMetaData.ABI diff --git a/core/gethwrappers/generated/i_automation_registry_master_wrapper_2_2/i_automation_registry_master_wrapper_2_2.go b/core/gethwrappers/generated/i_automation_registry_master_wrapper_2_2/i_automation_registry_master_wrapper_2_2.go index 611dc43af9e..df770b0d360 100644 --- a/core/gethwrappers/generated/i_automation_registry_master_wrapper_2_2/i_automation_registry_master_wrapper_2_2.go +++ b/core/gethwrappers/generated/i_automation_registry_master_wrapper_2_2/i_automation_registry_master_wrapper_2_2.go @@ -50,7 +50,7 @@ type AutomationRegistryBase22OnchainConfig struct { ReorgProtectionEnabled bool } -type AutomationRegistryBase22OnchainConfigLegacy struct { +type IAutomationV21PlusCommonOnchainConfigLegacy struct { PaymentPremiumPPB uint32 FlatFeeMicroLink uint32 CheckGasLimit uint32 @@ -68,7 +68,7 @@ type AutomationRegistryBase22OnchainConfigLegacy struct { UpkeepPrivilegeManager common.Address } -type AutomationRegistryBase22State struct { +type IAutomationV21PlusCommonStateLegacy struct { Nonce uint32 OwnerLinkBalance *big.Int ExpectedLinkBalance *big.Int @@ -81,7 +81,7 @@ type AutomationRegistryBase22State struct { Paused bool } -type AutomationRegistryBase22UpkeepInfo struct { +type IAutomationV21PlusCommonUpkeepInfoLegacy struct { Target common.Address PerformGas uint32 CheckData []byte @@ -95,7 +95,7 @@ type AutomationRegistryBase22UpkeepInfo struct { } var IAutomationRegistryMasterMetaData = &bind.MetaData{ - ABI: "[{\"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\":[],\"name\":\"InvalidDataLength\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidPayee\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidRecipient\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidReport\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidSigner\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTransmitter\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTrigger\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTriggerType\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MaxCheckDataSizeCanOnlyIncrease\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MaxPerformDataSizeCanOnlyIncrease\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MigrationNotPermitted\",\"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\":\"OnlyPausedUpkeep\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlySimulatedBackend\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyUnpausedUpkeep\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ParameterLengthError\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PaymentGreaterThanAllLINK\",\"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\":\"UpkeepAlreadyExists\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UpkeepCancelled\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UpkeepNotCanceled\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UpkeepNotNeeded\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ValueNotChanged\",\"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\"},{\"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\":\"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\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"OwnerFundsWithdrawn\",\"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\":\"nonpayable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"transmitter\",\"type\":\"address\"}],\"name\":\"acceptPayeeship\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"acceptUpkeepAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"addFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"cancelUpkeep\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bytes[]\",\"name\":\"values\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"checkCallback\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"upkeepNeeded\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"performData\",\"type\":\"bytes\"},{\"internalType\":\"uint8\",\"name\":\"upkeepFailureReason\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"gasUsed\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"triggerData\",\"type\":\"bytes\"}],\"name\":\"checkUpkeep\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"upkeepNeeded\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"performData\",\"type\":\"bytes\"},{\"internalType\":\"uint8\",\"name\":\"upkeepFailureReason\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"gasUsed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fastGasWei\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"linkNative\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"checkUpkeep\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"upkeepNeeded\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"performData\",\"type\":\"bytes\"},{\"internalType\":\"uint8\",\"name\":\"upkeepFailureReason\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"gasUsed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fastGasWei\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"linkNative\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"}],\"name\":\"executeCallback\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"upkeepNeeded\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"performData\",\"type\":\"bytes\"},{\"internalType\":\"uint8\",\"name\":\"upkeepFailureReason\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"gasUsed\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"fallbackTo\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"startIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxCount\",\"type\":\"uint256\"}],\"name\":\"getActiveUpkeepIDs\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"}],\"name\":\"getAdminPrivilegeConfig\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAllowedReadOnlyAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAutomationForwarderLogic\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"getBalance\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"balance\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCancellationDelay\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getChainModule\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"chainModule\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getConditionalGasOverhead\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getFastGasFeedAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepID\",\"type\":\"uint256\"}],\"name\":\"getForwarder\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLinkAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLinkNativeFeedAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLogGasOverhead\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"triggerType\",\"type\":\"uint8\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"}],\"name\":\"getMaxPaymentForGas\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"maxPayment\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"getMinBalance\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"getMinBalanceForUpkeep\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"minBalance\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"peer\",\"type\":\"address\"}],\"name\":\"getPeerRegistryMigrationPermission\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPerPerformByteGasOverhead\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPerSignerGasOverhead\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getReorgProtectionEnabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"reorgProtectionEnabled\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"query\",\"type\":\"address\"}],\"name\":\"getSignerInfo\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"active\",\"type\":\"bool\"},{\"internalType\":\"uint8\",\"name\":\"index\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getState\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"nonce\",\"type\":\"uint32\"},{\"internalType\":\"uint96\",\"name\":\"ownerLinkBalance\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"expectedLinkBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint96\",\"name\":\"totalPremium\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"numUpkeeps\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"configCount\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"latestConfigBlockNumber\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"latestConfigDigest\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"latestEpoch\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"}],\"internalType\":\"structAutomationRegistryBase2_2.State\",\"name\":\"state\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint32\",\"name\":\"paymentPremiumPPB\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"flatFeeMicroLink\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"checkGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint24\",\"name\":\"stalenessSeconds\",\"type\":\"uint24\"},{\"internalType\":\"uint16\",\"name\":\"gasCeilingMultiplier\",\"type\":\"uint16\"},{\"internalType\":\"uint96\",\"name\":\"minUpkeepSpend\",\"type\":\"uint96\"},{\"internalType\":\"uint32\",\"name\":\"maxPerformGas\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxCheckDataSize\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxPerformDataSize\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxRevertDataSize\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"fallbackGasPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fallbackLinkPrice\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"transcoder\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"registrars\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"upkeepPrivilegeManager\",\"type\":\"address\"}],\"internalType\":\"structAutomationRegistryBase2_2.OnchainConfigLegacy\",\"name\":\"config\",\"type\":\"tuple\"},{\"internalType\":\"address[]\",\"name\":\"signers\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"transmitters\",\"type\":\"address[]\"},{\"internalType\":\"uint8\",\"name\":\"f\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTransmitCalldataFixedBytesOverhead\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTransmitCalldataPerSignerBytesOverhead\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"query\",\"type\":\"address\"}],\"name\":\"getTransmitterInfo\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"active\",\"type\":\"bool\"},{\"internalType\":\"uint8\",\"name\":\"index\",\"type\":\"uint8\"},{\"internalType\":\"uint96\",\"name\":\"balance\",\"type\":\"uint96\"},{\"internalType\":\"uint96\",\"name\":\"lastCollected\",\"type\":\"uint96\"},{\"internalType\":\"address\",\"name\":\"payee\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"getTriggerType\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"getUpkeep\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"performGas\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"checkData\",\"type\":\"bytes\"},{\"internalType\":\"uint96\",\"name\":\"balance\",\"type\":\"uint96\"},{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"maxValidBlocknumber\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"lastPerformedBlockNumber\",\"type\":\"uint32\"},{\"internalType\":\"uint96\",\"name\":\"amountSpent\",\"type\":\"uint96\"},{\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"offchainConfig\",\"type\":\"bytes\"}],\"internalType\":\"structAutomationRegistryBase2_2.UpkeepInfo\",\"name\":\"upkeepInfo\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"getUpkeepPrivilegeConfig\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"getUpkeepTriggerConfig\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"dedupKey\",\"type\":\"bytes32\"}],\"name\":\"hasDedupKey\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"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\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\"},{\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"}],\"name\":\"migrateUpkeeps\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"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\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"pauseUpkeep\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"encodedUpkeeps\",\"type\":\"bytes\"}],\"name\":\"receiveUpkeeps\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"recoverFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"triggerType\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"checkData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"triggerConfig\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"offchainConfig\",\"type\":\"bytes\"}],\"name\":\"registerUpkeep\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"checkData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"offchainConfig\",\"type\":\"bytes\"}],\"name\":\"registerUpkeep\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"newPrivilegeConfig\",\"type\":\"bytes\"}],\"name\":\"setAdminPrivilegeConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"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\":\"paymentPremiumPPB\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"flatFeeMicroLink\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"checkGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint24\",\"name\":\"stalenessSeconds\",\"type\":\"uint24\"},{\"internalType\":\"uint16\",\"name\":\"gasCeilingMultiplier\",\"type\":\"uint16\"},{\"internalType\":\"uint96\",\"name\":\"minUpkeepSpend\",\"type\":\"uint96\"},{\"internalType\":\"uint32\",\"name\":\"maxPerformGas\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxCheckDataSize\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxPerformDataSize\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxRevertDataSize\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"fallbackGasPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fallbackLinkPrice\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"transcoder\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"registrars\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"upkeepPrivilegeManager\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"chainModule\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"reorgProtectionEnabled\",\"type\":\"bool\"}],\"internalType\":\"structAutomationRegistryBase2_2.OnchainConfig\",\"name\":\"onchainConfig\",\"type\":\"tuple\"},{\"internalType\":\"uint64\",\"name\":\"offchainConfigVersion\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"offchainConfig\",\"type\":\"bytes\"}],\"name\":\"setConfigTypeSafe\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"payees\",\"type\":\"address[]\"}],\"name\":\"setPayees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"peer\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"permission\",\"type\":\"uint8\"}],\"name\":\"setPeerRegistryMigrationPermission\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"newCheckData\",\"type\":\"bytes\"}],\"name\":\"setUpkeepCheckData\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"}],\"name\":\"setUpkeepGasLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"}],\"name\":\"setUpkeepOffchainConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"newPrivilegeConfig\",\"type\":\"bytes\"}],\"name\":\"setUpkeepPrivilegeConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"triggerConfig\",\"type\":\"bytes\"}],\"name\":\"setUpkeepTriggerConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"performData\",\"type\":\"bytes\"}],\"name\":\"simulatePerformUpkeep\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"gasUsed\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"transmitter\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"proposed\",\"type\":\"address\"}],\"name\":\"transferPayeeship\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"proposed\",\"type\":\"address\"}],\"name\":\"transferUpkeepAdmin\",\"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\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"unpauseUpkeep\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"upkeepTranscoderVersion\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"upkeepVersion\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"withdrawFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"withdrawOwnerFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"withdrawPayment\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + ABI: "[{\"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\":[],\"name\":\"InvalidDataLength\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidPayee\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidRecipient\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidReport\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidSigner\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTransmitter\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTrigger\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTriggerType\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MaxCheckDataSizeCanOnlyIncrease\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MaxPerformDataSizeCanOnlyIncrease\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MigrationNotPermitted\",\"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\":\"OnlyPausedUpkeep\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlySimulatedBackend\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyUnpausedUpkeep\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ParameterLengthError\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PaymentGreaterThanAllLINK\",\"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\":\"UpkeepAlreadyExists\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UpkeepCancelled\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UpkeepNotCanceled\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UpkeepNotNeeded\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ValueNotChanged\",\"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\"},{\"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\":\"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\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"OwnerFundsWithdrawn\",\"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\":\"nonpayable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"transmitter\",\"type\":\"address\"}],\"name\":\"acceptPayeeship\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"acceptUpkeepAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"addFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"cancelUpkeep\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bytes[]\",\"name\":\"values\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"checkCallback\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"upkeepNeeded\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"performData\",\"type\":\"bytes\"},{\"internalType\":\"uint8\",\"name\":\"upkeepFailureReason\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"gasUsed\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"triggerData\",\"type\":\"bytes\"}],\"name\":\"checkUpkeep\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"upkeepNeeded\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"performData\",\"type\":\"bytes\"},{\"internalType\":\"uint8\",\"name\":\"upkeepFailureReason\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"gasUsed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fastGasWei\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"linkNative\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"checkUpkeep\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"upkeepNeeded\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"performData\",\"type\":\"bytes\"},{\"internalType\":\"uint8\",\"name\":\"upkeepFailureReason\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"gasUsed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fastGasWei\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"linkNative\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"}],\"name\":\"executeCallback\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"upkeepNeeded\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"performData\",\"type\":\"bytes\"},{\"internalType\":\"uint8\",\"name\":\"upkeepFailureReason\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"gasUsed\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"fallbackTo\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"startIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxCount\",\"type\":\"uint256\"}],\"name\":\"getActiveUpkeepIDs\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"}],\"name\":\"getAdminPrivilegeConfig\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAllowedReadOnlyAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAutomationForwarderLogic\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"getBalance\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"balance\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCancellationDelay\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getChainModule\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"chainModule\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getConditionalGasOverhead\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getFastGasFeedAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepID\",\"type\":\"uint256\"}],\"name\":\"getForwarder\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLinkAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLinkNativeFeedAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLogGasOverhead\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"triggerType\",\"type\":\"uint8\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"}],\"name\":\"getMaxPaymentForGas\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"maxPayment\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"getMinBalance\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"getMinBalanceForUpkeep\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"minBalance\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"peer\",\"type\":\"address\"}],\"name\":\"getPeerRegistryMigrationPermission\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPerPerformByteGasOverhead\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPerSignerGasOverhead\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getReorgProtectionEnabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"reorgProtectionEnabled\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"query\",\"type\":\"address\"}],\"name\":\"getSignerInfo\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"active\",\"type\":\"bool\"},{\"internalType\":\"uint8\",\"name\":\"index\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getState\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"nonce\",\"type\":\"uint32\"},{\"internalType\":\"uint96\",\"name\":\"ownerLinkBalance\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"expectedLinkBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint96\",\"name\":\"totalPremium\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"numUpkeeps\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"configCount\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"latestConfigBlockNumber\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"latestConfigDigest\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"latestEpoch\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"}],\"internalType\":\"structIAutomationV21PlusCommon.StateLegacy\",\"name\":\"state\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint32\",\"name\":\"paymentPremiumPPB\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"flatFeeMicroLink\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"checkGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint24\",\"name\":\"stalenessSeconds\",\"type\":\"uint24\"},{\"internalType\":\"uint16\",\"name\":\"gasCeilingMultiplier\",\"type\":\"uint16\"},{\"internalType\":\"uint96\",\"name\":\"minUpkeepSpend\",\"type\":\"uint96\"},{\"internalType\":\"uint32\",\"name\":\"maxPerformGas\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxCheckDataSize\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxPerformDataSize\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxRevertDataSize\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"fallbackGasPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fallbackLinkPrice\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"transcoder\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"registrars\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"upkeepPrivilegeManager\",\"type\":\"address\"}],\"internalType\":\"structIAutomationV21PlusCommon.OnchainConfigLegacy\",\"name\":\"config\",\"type\":\"tuple\"},{\"internalType\":\"address[]\",\"name\":\"signers\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"transmitters\",\"type\":\"address[]\"},{\"internalType\":\"uint8\",\"name\":\"f\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTransmitCalldataFixedBytesOverhead\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTransmitCalldataPerSignerBytesOverhead\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"query\",\"type\":\"address\"}],\"name\":\"getTransmitterInfo\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"active\",\"type\":\"bool\"},{\"internalType\":\"uint8\",\"name\":\"index\",\"type\":\"uint8\"},{\"internalType\":\"uint96\",\"name\":\"balance\",\"type\":\"uint96\"},{\"internalType\":\"uint96\",\"name\":\"lastCollected\",\"type\":\"uint96\"},{\"internalType\":\"address\",\"name\":\"payee\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"getTriggerType\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"getUpkeep\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"performGas\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"checkData\",\"type\":\"bytes\"},{\"internalType\":\"uint96\",\"name\":\"balance\",\"type\":\"uint96\"},{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"maxValidBlocknumber\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"lastPerformedBlockNumber\",\"type\":\"uint32\"},{\"internalType\":\"uint96\",\"name\":\"amountSpent\",\"type\":\"uint96\"},{\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"offchainConfig\",\"type\":\"bytes\"}],\"internalType\":\"structIAutomationV21PlusCommon.UpkeepInfoLegacy\",\"name\":\"upkeepInfo\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"getUpkeepPrivilegeConfig\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"getUpkeepTriggerConfig\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"dedupKey\",\"type\":\"bytes32\"}],\"name\":\"hasDedupKey\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"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\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\"},{\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"}],\"name\":\"migrateUpkeeps\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"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\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"pauseUpkeep\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"encodedUpkeeps\",\"type\":\"bytes\"}],\"name\":\"receiveUpkeeps\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"recoverFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"triggerType\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"checkData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"triggerConfig\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"offchainConfig\",\"type\":\"bytes\"}],\"name\":\"registerUpkeep\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"checkData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"offchainConfig\",\"type\":\"bytes\"}],\"name\":\"registerUpkeep\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"newPrivilegeConfig\",\"type\":\"bytes\"}],\"name\":\"setAdminPrivilegeConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"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\":\"paymentPremiumPPB\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"flatFeeMicroLink\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"checkGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint24\",\"name\":\"stalenessSeconds\",\"type\":\"uint24\"},{\"internalType\":\"uint16\",\"name\":\"gasCeilingMultiplier\",\"type\":\"uint16\"},{\"internalType\":\"uint96\",\"name\":\"minUpkeepSpend\",\"type\":\"uint96\"},{\"internalType\":\"uint32\",\"name\":\"maxPerformGas\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxCheckDataSize\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxPerformDataSize\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxRevertDataSize\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"fallbackGasPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fallbackLinkPrice\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"transcoder\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"registrars\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"upkeepPrivilegeManager\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"chainModule\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"reorgProtectionEnabled\",\"type\":\"bool\"}],\"internalType\":\"structAutomationRegistryBase2_2.OnchainConfig\",\"name\":\"onchainConfig\",\"type\":\"tuple\"},{\"internalType\":\"uint64\",\"name\":\"offchainConfigVersion\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"offchainConfig\",\"type\":\"bytes\"}],\"name\":\"setConfigTypeSafe\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"payees\",\"type\":\"address[]\"}],\"name\":\"setPayees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"peer\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"permission\",\"type\":\"uint8\"}],\"name\":\"setPeerRegistryMigrationPermission\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"newCheckData\",\"type\":\"bytes\"}],\"name\":\"setUpkeepCheckData\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"}],\"name\":\"setUpkeepGasLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"}],\"name\":\"setUpkeepOffchainConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"newPrivilegeConfig\",\"type\":\"bytes\"}],\"name\":\"setUpkeepPrivilegeConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"triggerConfig\",\"type\":\"bytes\"}],\"name\":\"setUpkeepTriggerConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"performData\",\"type\":\"bytes\"}],\"name\":\"simulatePerformUpkeep\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"gasUsed\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"transmitter\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"proposed\",\"type\":\"address\"}],\"name\":\"transferPayeeship\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"proposed\",\"type\":\"address\"}],\"name\":\"transferUpkeepAdmin\",\"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\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"unpauseUpkeep\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"upkeepTranscoderVersion\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"upkeepVersion\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"withdrawFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"withdrawOwnerFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"withdrawPayment\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", } var IAutomationRegistryMasterABI = IAutomationRegistryMasterMetaData.ABI @@ -821,8 +821,8 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterCaller) GetState(opts return *outstruct, err } - outstruct.State = *abi.ConvertType(out[0], new(AutomationRegistryBase22State)).(*AutomationRegistryBase22State) - outstruct.Config = *abi.ConvertType(out[1], new(AutomationRegistryBase22OnchainConfigLegacy)).(*AutomationRegistryBase22OnchainConfigLegacy) + outstruct.State = *abi.ConvertType(out[0], new(IAutomationV21PlusCommonStateLegacy)).(*IAutomationV21PlusCommonStateLegacy) + outstruct.Config = *abi.ConvertType(out[1], new(IAutomationV21PlusCommonOnchainConfigLegacy)).(*IAutomationV21PlusCommonOnchainConfigLegacy) outstruct.Signers = *abi.ConvertType(out[2], new([]common.Address)).(*[]common.Address) outstruct.Transmitters = *abi.ConvertType(out[3], new([]common.Address)).(*[]common.Address) outstruct.F = *abi.ConvertType(out[4], new(uint8)).(*uint8) @@ -942,25 +942,25 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterCallerSession) GetTri return _IAutomationRegistryMaster.Contract.GetTriggerType(&_IAutomationRegistryMaster.CallOpts, upkeepId) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterCaller) GetUpkeep(opts *bind.CallOpts, id *big.Int) (AutomationRegistryBase22UpkeepInfo, error) { +func (_IAutomationRegistryMaster *IAutomationRegistryMasterCaller) GetUpkeep(opts *bind.CallOpts, id *big.Int) (IAutomationV21PlusCommonUpkeepInfoLegacy, error) { var out []interface{} err := _IAutomationRegistryMaster.contract.Call(opts, &out, "getUpkeep", id) if err != nil { - return *new(AutomationRegistryBase22UpkeepInfo), err + return *new(IAutomationV21PlusCommonUpkeepInfoLegacy), err } - out0 := *abi.ConvertType(out[0], new(AutomationRegistryBase22UpkeepInfo)).(*AutomationRegistryBase22UpkeepInfo) + out0 := *abi.ConvertType(out[0], new(IAutomationV21PlusCommonUpkeepInfoLegacy)).(*IAutomationV21PlusCommonUpkeepInfoLegacy) return out0, err } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterSession) GetUpkeep(id *big.Int) (AutomationRegistryBase22UpkeepInfo, error) { +func (_IAutomationRegistryMaster *IAutomationRegistryMasterSession) GetUpkeep(id *big.Int) (IAutomationV21PlusCommonUpkeepInfoLegacy, error) { return _IAutomationRegistryMaster.Contract.GetUpkeep(&_IAutomationRegistryMaster.CallOpts, id) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterCallerSession) GetUpkeep(id *big.Int) (AutomationRegistryBase22UpkeepInfo, error) { +func (_IAutomationRegistryMaster *IAutomationRegistryMasterCallerSession) GetUpkeep(id *big.Int) (IAutomationV21PlusCommonUpkeepInfoLegacy, error) { return _IAutomationRegistryMaster.Contract.GetUpkeep(&_IAutomationRegistryMaster.CallOpts, id) } @@ -6064,8 +6064,8 @@ type GetSignerInfo struct { Index uint8 } type GetState struct { - State AutomationRegistryBase22State - Config AutomationRegistryBase22OnchainConfigLegacy + State IAutomationV21PlusCommonStateLegacy + Config IAutomationV21PlusCommonOnchainConfigLegacy Signers []common.Address Transmitters []common.Address F uint8 @@ -6381,7 +6381,7 @@ type IAutomationRegistryMasterInterface interface { GetTriggerType(opts *bind.CallOpts, upkeepId *big.Int) (uint8, error) - GetUpkeep(opts *bind.CallOpts, id *big.Int) (AutomationRegistryBase22UpkeepInfo, error) + GetUpkeep(opts *bind.CallOpts, id *big.Int) (IAutomationV21PlusCommonUpkeepInfoLegacy, error) GetUpkeepPrivilegeConfig(opts *bind.CallOpts, upkeepId *big.Int) ([]byte, error) diff --git a/core/gethwrappers/generated/i_automation_registry_master_wrapper_2_3/i_automation_registry_master_wrapper_2_3.go b/core/gethwrappers/generated/i_automation_registry_master_wrapper_2_3/i_automation_registry_master_wrapper_2_3.go index 0d4ca0b5cc2..b6c63d8184a 100644 --- a/core/gethwrappers/generated/i_automation_registry_master_wrapper_2_3/i_automation_registry_master_wrapper_2_3.go +++ b/core/gethwrappers/generated/i_automation_registry_master_wrapper_2_3/i_automation_registry_master_wrapper_2_3.go @@ -30,27 +30,60 @@ var ( _ = abi.ConvertType ) +type AutomationRegistryBase23BillingConfig struct { + GasFeePPB uint32 + FlatFeeMicroLink *big.Int + PriceFeed common.Address + FallbackPrice *big.Int + MinSpend *big.Int +} + +type AutomationRegistryBase23HotVars struct { + TotalPremium *big.Int + LatestEpoch uint32 + StalenessSeconds *big.Int + GasCeilingMultiplier uint16 + F uint8 + Paused bool + ReentrancyGuard bool + ReorgProtectionEnabled bool + ChainModule common.Address +} + type AutomationRegistryBase23OnchainConfig struct { - PaymentPremiumPPB uint32 - FlatFeeMicroLink uint32 CheckGasLimit uint32 StalenessSeconds *big.Int GasCeilingMultiplier uint16 - MinUpkeepSpend *big.Int MaxPerformGas uint32 MaxCheckDataSize uint32 MaxPerformDataSize uint32 MaxRevertDataSize uint32 FallbackGasPrice *big.Int FallbackLinkPrice *big.Int + FallbackNativePrice *big.Int Transcoder common.Address Registrars []common.Address UpkeepPrivilegeManager common.Address ChainModule common.Address ReorgProtectionEnabled bool + FinanceAdmin common.Address +} + +type AutomationRegistryBase23Storage struct { + Transcoder common.Address + CheckGasLimit uint32 + MaxPerformGas uint32 + Nonce uint32 + UpkeepPrivilegeManager common.Address + ConfigCount uint32 + LatestConfigBlockNumber uint32 + MaxCheckDataSize uint32 + FinanceAdmin common.Address + MaxPerformDataSize uint32 + MaxRevertDataSize uint32 } -type AutomationRegistryBase23OnchainConfigLegacy struct { +type IAutomationV21PlusCommonOnchainConfigLegacy struct { PaymentPremiumPPB uint32 FlatFeeMicroLink uint32 CheckGasLimit uint32 @@ -68,7 +101,7 @@ type AutomationRegistryBase23OnchainConfigLegacy struct { UpkeepPrivilegeManager common.Address } -type AutomationRegistryBase23State struct { +type IAutomationV21PlusCommonStateLegacy struct { Nonce uint32 OwnerLinkBalance *big.Int ExpectedLinkBalance *big.Int @@ -81,7 +114,7 @@ type AutomationRegistryBase23State struct { Paused bool } -type AutomationRegistryBase23UpkeepInfo struct { +type IAutomationV21PlusCommonUpkeepInfoLegacy struct { Target common.Address PerformGas uint32 CheckData []byte @@ -94,133 +127,133 @@ type AutomationRegistryBase23UpkeepInfo struct { OffchainConfig []byte } -var IAutomationRegistryMasterMetaData = &bind.MetaData{ - ABI: "[{\"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\":[],\"name\":\"InvalidDataLength\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidPayee\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidRecipient\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidReport\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidSigner\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTransmitter\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTrigger\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTriggerType\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MaxCheckDataSizeCanOnlyIncrease\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MaxPerformDataSizeCanOnlyIncrease\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MigrationNotPermitted\",\"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\":\"OnlyPausedUpkeep\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlySimulatedBackend\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyUnpausedUpkeep\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ParameterLengthError\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PaymentGreaterThanAllLINK\",\"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\":\"UpkeepAlreadyExists\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UpkeepCancelled\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UpkeepNotCanceled\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UpkeepNotNeeded\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ValueNotChanged\",\"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\"},{\"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\":\"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\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"OwnerFundsWithdrawn\",\"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\":\"nonpayable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"transmitter\",\"type\":\"address\"}],\"name\":\"acceptPayeeship\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"acceptUpkeepAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"addFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"cancelUpkeep\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bytes[]\",\"name\":\"values\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"checkCallback\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"upkeepNeeded\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"performData\",\"type\":\"bytes\"},{\"internalType\":\"uint8\",\"name\":\"upkeepFailureReason\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"gasUsed\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"triggerData\",\"type\":\"bytes\"}],\"name\":\"checkUpkeep\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"upkeepNeeded\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"performData\",\"type\":\"bytes\"},{\"internalType\":\"uint8\",\"name\":\"upkeepFailureReason\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"gasUsed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fastGasWei\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"linkNative\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"checkUpkeep\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"upkeepNeeded\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"performData\",\"type\":\"bytes\"},{\"internalType\":\"uint8\",\"name\":\"upkeepFailureReason\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"gasUsed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fastGasWei\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"linkNative\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"}],\"name\":\"executeCallback\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"upkeepNeeded\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"performData\",\"type\":\"bytes\"},{\"internalType\":\"uint8\",\"name\":\"upkeepFailureReason\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"gasUsed\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"fallbackTo\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"startIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxCount\",\"type\":\"uint256\"}],\"name\":\"getActiveUpkeepIDs\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"}],\"name\":\"getAdminPrivilegeConfig\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAllowedReadOnlyAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAutomationForwarderLogic\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"getBalance\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"balance\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCancellationDelay\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getChainModule\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"chainModule\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getConditionalGasOverhead\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getFastGasFeedAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepID\",\"type\":\"uint256\"}],\"name\":\"getForwarder\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLinkAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLinkNativeFeedAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLogGasOverhead\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"triggerType\",\"type\":\"uint8\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"}],\"name\":\"getMaxPaymentForGas\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"maxPayment\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"getMinBalance\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"getMinBalanceForUpkeep\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"minBalance\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"peer\",\"type\":\"address\"}],\"name\":\"getPeerRegistryMigrationPermission\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPerPerformByteGasOverhead\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPerSignerGasOverhead\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getReorgProtectionEnabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"reorgProtectionEnabled\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"query\",\"type\":\"address\"}],\"name\":\"getSignerInfo\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"active\",\"type\":\"bool\"},{\"internalType\":\"uint8\",\"name\":\"index\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getState\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"nonce\",\"type\":\"uint32\"},{\"internalType\":\"uint96\",\"name\":\"ownerLinkBalance\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"expectedLinkBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint96\",\"name\":\"totalPremium\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"numUpkeeps\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"configCount\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"latestConfigBlockNumber\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"latestConfigDigest\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"latestEpoch\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"}],\"internalType\":\"structAutomationRegistryBase2_3.State\",\"name\":\"state\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint32\",\"name\":\"paymentPremiumPPB\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"flatFeeMicroLink\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"checkGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint24\",\"name\":\"stalenessSeconds\",\"type\":\"uint24\"},{\"internalType\":\"uint16\",\"name\":\"gasCeilingMultiplier\",\"type\":\"uint16\"},{\"internalType\":\"uint96\",\"name\":\"minUpkeepSpend\",\"type\":\"uint96\"},{\"internalType\":\"uint32\",\"name\":\"maxPerformGas\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxCheckDataSize\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxPerformDataSize\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxRevertDataSize\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"fallbackGasPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fallbackLinkPrice\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"transcoder\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"registrars\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"upkeepPrivilegeManager\",\"type\":\"address\"}],\"internalType\":\"structAutomationRegistryBase2_3.OnchainConfigLegacy\",\"name\":\"config\",\"type\":\"tuple\"},{\"internalType\":\"address[]\",\"name\":\"signers\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"transmitters\",\"type\":\"address[]\"},{\"internalType\":\"uint8\",\"name\":\"f\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTransmitCalldataFixedBytesOverhead\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTransmitCalldataPerSignerBytesOverhead\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"query\",\"type\":\"address\"}],\"name\":\"getTransmitterInfo\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"active\",\"type\":\"bool\"},{\"internalType\":\"uint8\",\"name\":\"index\",\"type\":\"uint8\"},{\"internalType\":\"uint96\",\"name\":\"balance\",\"type\":\"uint96\"},{\"internalType\":\"uint96\",\"name\":\"lastCollected\",\"type\":\"uint96\"},{\"internalType\":\"address\",\"name\":\"payee\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"getTriggerType\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"getUpkeep\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"performGas\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"checkData\",\"type\":\"bytes\"},{\"internalType\":\"uint96\",\"name\":\"balance\",\"type\":\"uint96\"},{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"maxValidBlocknumber\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"lastPerformedBlockNumber\",\"type\":\"uint32\"},{\"internalType\":\"uint96\",\"name\":\"amountSpent\",\"type\":\"uint96\"},{\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"offchainConfig\",\"type\":\"bytes\"}],\"internalType\":\"structAutomationRegistryBase2_3.UpkeepInfo\",\"name\":\"upkeepInfo\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"getUpkeepPrivilegeConfig\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"getUpkeepTriggerConfig\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"dedupKey\",\"type\":\"bytes32\"}],\"name\":\"hasDedupKey\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"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\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\"},{\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"}],\"name\":\"migrateUpkeeps\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"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\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"pauseUpkeep\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"encodedUpkeeps\",\"type\":\"bytes\"}],\"name\":\"receiveUpkeeps\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"recoverFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"triggerType\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"checkData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"triggerConfig\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"offchainConfig\",\"type\":\"bytes\"}],\"name\":\"registerUpkeep\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"checkData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"offchainConfig\",\"type\":\"bytes\"}],\"name\":\"registerUpkeep\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"newPrivilegeConfig\",\"type\":\"bytes\"}],\"name\":\"setAdminPrivilegeConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"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\":\"paymentPremiumPPB\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"flatFeeMicroLink\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"checkGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint24\",\"name\":\"stalenessSeconds\",\"type\":\"uint24\"},{\"internalType\":\"uint16\",\"name\":\"gasCeilingMultiplier\",\"type\":\"uint16\"},{\"internalType\":\"uint96\",\"name\":\"minUpkeepSpend\",\"type\":\"uint96\"},{\"internalType\":\"uint32\",\"name\":\"maxPerformGas\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxCheckDataSize\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxPerformDataSize\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxRevertDataSize\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"fallbackGasPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fallbackLinkPrice\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"transcoder\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"registrars\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"upkeepPrivilegeManager\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"chainModule\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"reorgProtectionEnabled\",\"type\":\"bool\"}],\"internalType\":\"structAutomationRegistryBase2_3.OnchainConfig\",\"name\":\"onchainConfig\",\"type\":\"tuple\"},{\"internalType\":\"uint64\",\"name\":\"offchainConfigVersion\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"offchainConfig\",\"type\":\"bytes\"}],\"name\":\"setConfigTypeSafe\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"payees\",\"type\":\"address[]\"}],\"name\":\"setPayees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"peer\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"permission\",\"type\":\"uint8\"}],\"name\":\"setPeerRegistryMigrationPermission\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"newCheckData\",\"type\":\"bytes\"}],\"name\":\"setUpkeepCheckData\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"}],\"name\":\"setUpkeepGasLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"}],\"name\":\"setUpkeepOffchainConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"newPrivilegeConfig\",\"type\":\"bytes\"}],\"name\":\"setUpkeepPrivilegeConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"triggerConfig\",\"type\":\"bytes\"}],\"name\":\"setUpkeepTriggerConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"performData\",\"type\":\"bytes\"}],\"name\":\"simulatePerformUpkeep\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"gasUsed\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"transmitter\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"proposed\",\"type\":\"address\"}],\"name\":\"transferPayeeship\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"proposed\",\"type\":\"address\"}],\"name\":\"transferUpkeepAdmin\",\"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\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"unpauseUpkeep\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"upkeepTranscoderVersion\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"upkeepVersion\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"withdrawFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"withdrawOwnerFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"withdrawPayment\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", +var IAutomationRegistryMaster23MetaData = &bind.MetaData{ + ABI: "[{\"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\":\"InvalidBillingToken\",\"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\":\"InvalidTransmitter\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTrigger\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTriggerType\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MigrationNotPermitted\",\"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\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint32\",\"name\":\"gasFeePPB\",\"type\":\"uint32\"},{\"internalType\":\"uint24\",\"name\":\"flatFeeMicroLink\",\"type\":\"uint24\"},{\"internalType\":\"address\",\"name\":\"priceFeed\",\"type\":\"address\"},{\"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\":\"recipient\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"assetAddress\",\"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\":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\":\"nonpayable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"transmitter\",\"type\":\"address\"}],\"name\":\"acceptPayeeship\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"acceptUpkeepAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"addFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"cancelUpkeep\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bytes[]\",\"name\":\"values\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"checkCallback\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"upkeepNeeded\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"performData\",\"type\":\"bytes\"},{\"internalType\":\"uint8\",\"name\":\"upkeepFailureReason\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"gasUsed\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"triggerData\",\"type\":\"bytes\"}],\"name\":\"checkUpkeep\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"upkeepNeeded\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"performData\",\"type\":\"bytes\"},{\"internalType\":\"uint8\",\"name\":\"upkeepFailureReason\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"gasUsed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fastGasWei\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"linkUSD\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"checkUpkeep\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"upkeepNeeded\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"performData\",\"type\":\"bytes\"},{\"internalType\":\"uint8\",\"name\":\"upkeepFailureReason\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"gasUsed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fastGasWei\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"linkUSD\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"}],\"name\":\"executeCallback\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"upkeepNeeded\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"performData\",\"type\":\"bytes\"},{\"internalType\":\"uint8\",\"name\":\"upkeepFailureReason\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"gasUsed\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"fallbackTo\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"startIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxCount\",\"type\":\"uint256\"}],\"name\":\"getActiveUpkeepIDs\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"}],\"name\":\"getAdminPrivilegeConfig\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAllowedReadOnlyAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAutomationForwarderLogic\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"getBalance\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"balance\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepID\",\"type\":\"uint256\"}],\"name\":\"getBillingToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"getBillingTokenConfig\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"gasFeePPB\",\"type\":\"uint32\"},{\"internalType\":\"uint24\",\"name\":\"flatFeeMicroLink\",\"type\":\"uint24\"},{\"internalType\":\"address\",\"name\":\"priceFeed\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"fallbackPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint96\",\"name\":\"minSpend\",\"type\":\"uint96\"}],\"internalType\":\"structAutomationRegistryBase2_3.BillingConfig\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getBillingTokens\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCancellationDelay\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getChainModule\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"chainModule\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getConditionalGasOverhead\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getConfig\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"checkGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint24\",\"name\":\"stalenessSeconds\",\"type\":\"uint24\"},{\"internalType\":\"uint16\",\"name\":\"gasCeilingMultiplier\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"maxPerformGas\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxCheckDataSize\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxPerformDataSize\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxRevertDataSize\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"fallbackGasPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fallbackLinkPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fallbackNativePrice\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"transcoder\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"registrars\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"upkeepPrivilegeManager\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"chainModule\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"reorgProtectionEnabled\",\"type\":\"bool\"},{\"internalType\":\"address\",\"name\":\"financeAdmin\",\"type\":\"address\"}],\"internalType\":\"structAutomationRegistryBase2_3.OnchainConfig\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getFallbackNativePrice\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getFastGasFeedAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepID\",\"type\":\"uint256\"}],\"name\":\"getForwarder\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getHotVars\",\"outputs\":[{\"components\":[{\"internalType\":\"uint96\",\"name\":\"totalPremium\",\"type\":\"uint96\"},{\"internalType\":\"uint32\",\"name\":\"latestEpoch\",\"type\":\"uint32\"},{\"internalType\":\"uint24\",\"name\":\"stalenessSeconds\",\"type\":\"uint24\"},{\"internalType\":\"uint16\",\"name\":\"gasCeilingMultiplier\",\"type\":\"uint16\"},{\"internalType\":\"uint8\",\"name\":\"f\",\"type\":\"uint8\"},{\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"reentrancyGuard\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"reorgProtectionEnabled\",\"type\":\"bool\"},{\"internalType\":\"address\",\"name\":\"chainModule\",\"type\":\"address\"}],\"internalType\":\"structAutomationRegistryBase2_3.HotVars\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLinkAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLinkUSDFeedAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLogGasOverhead\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"triggerType\",\"type\":\"uint8\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"billingToken\",\"type\":\"address\"}],\"name\":\"getMaxPaymentForGas\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"maxPayment\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"getMinBalance\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"getMinBalanceForUpkeep\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"minBalance\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getNativeUSDFeedAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getNumUpkeeps\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"peer\",\"type\":\"address\"}],\"name\":\"getPeerRegistryMigrationPermission\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPerPerformByteGasOverhead\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPerSignerGasOverhead\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getReorgProtectionEnabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"reorgProtectionEnabled\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"billingToken\",\"type\":\"address\"}],\"name\":\"getReserveAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"query\",\"type\":\"address\"}],\"name\":\"getSignerInfo\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"active\",\"type\":\"bool\"},{\"internalType\":\"uint8\",\"name\":\"index\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getState\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"nonce\",\"type\":\"uint32\"},{\"internalType\":\"uint96\",\"name\":\"ownerLinkBalance\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"expectedLinkBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint96\",\"name\":\"totalPremium\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"numUpkeeps\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"configCount\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"latestConfigBlockNumber\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"latestConfigDigest\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"latestEpoch\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"}],\"internalType\":\"structIAutomationV21PlusCommon.StateLegacy\",\"name\":\"state\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint32\",\"name\":\"paymentPremiumPPB\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"flatFeeMicroLink\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"checkGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint24\",\"name\":\"stalenessSeconds\",\"type\":\"uint24\"},{\"internalType\":\"uint16\",\"name\":\"gasCeilingMultiplier\",\"type\":\"uint16\"},{\"internalType\":\"uint96\",\"name\":\"minUpkeepSpend\",\"type\":\"uint96\"},{\"internalType\":\"uint32\",\"name\":\"maxPerformGas\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxCheckDataSize\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxPerformDataSize\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxRevertDataSize\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"fallbackGasPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fallbackLinkPrice\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"transcoder\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"registrars\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"upkeepPrivilegeManager\",\"type\":\"address\"}],\"internalType\":\"structIAutomationV21PlusCommon.OnchainConfigLegacy\",\"name\":\"config\",\"type\":\"tuple\"},{\"internalType\":\"address[]\",\"name\":\"signers\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"transmitters\",\"type\":\"address[]\"},{\"internalType\":\"uint8\",\"name\":\"f\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getStorage\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"transcoder\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"checkGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxPerformGas\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"nonce\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"upkeepPrivilegeManager\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"configCount\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"latestConfigBlockNumber\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxCheckDataSize\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"financeAdmin\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"maxPerformDataSize\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxRevertDataSize\",\"type\":\"uint32\"}],\"internalType\":\"structAutomationRegistryBase2_3.Storage\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTransmitCalldataFixedBytesOverhead\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTransmitCalldataPerSignerBytesOverhead\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"query\",\"type\":\"address\"}],\"name\":\"getTransmitterInfo\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"active\",\"type\":\"bool\"},{\"internalType\":\"uint8\",\"name\":\"index\",\"type\":\"uint8\"},{\"internalType\":\"uint96\",\"name\":\"balance\",\"type\":\"uint96\"},{\"internalType\":\"uint96\",\"name\":\"lastCollected\",\"type\":\"uint96\"},{\"internalType\":\"address\",\"name\":\"payee\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"getTriggerType\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"getUpkeep\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"performGas\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"checkData\",\"type\":\"bytes\"},{\"internalType\":\"uint96\",\"name\":\"balance\",\"type\":\"uint96\"},{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"maxValidBlocknumber\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"lastPerformedBlockNumber\",\"type\":\"uint32\"},{\"internalType\":\"uint96\",\"name\":\"amountSpent\",\"type\":\"uint96\"},{\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"offchainConfig\",\"type\":\"bytes\"}],\"internalType\":\"structIAutomationV21PlusCommon.UpkeepInfoLegacy\",\"name\":\"upkeepInfo\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"getUpkeepPrivilegeConfig\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"getUpkeepTriggerConfig\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"dedupKey\",\"type\":\"bytes32\"}],\"name\":\"hasDedupKey\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"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\":[],\"name\":\"linkAvailableForPayment\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\"},{\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"}],\"name\":\"migrateUpkeeps\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"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\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"pauseUpkeep\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"encodedUpkeeps\",\"type\":\"bytes\"}],\"name\":\"receiveUpkeeps\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"triggerType\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"billingToken\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"checkData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"triggerConfig\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"offchainConfig\",\"type\":\"bytes\"}],\"name\":\"registerUpkeep\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"newPrivilegeConfig\",\"type\":\"bytes\"}],\"name\":\"setAdminPrivilegeConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"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\":\"uint24\",\"name\":\"stalenessSeconds\",\"type\":\"uint24\"},{\"internalType\":\"uint16\",\"name\":\"gasCeilingMultiplier\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"maxPerformGas\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxCheckDataSize\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxPerformDataSize\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxRevertDataSize\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"fallbackGasPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fallbackLinkPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fallbackNativePrice\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"transcoder\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"registrars\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"upkeepPrivilegeManager\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"chainModule\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"reorgProtectionEnabled\",\"type\":\"bool\"},{\"internalType\":\"address\",\"name\":\"financeAdmin\",\"type\":\"address\"}],\"internalType\":\"structAutomationRegistryBase2_3.OnchainConfig\",\"name\":\"onchainConfig\",\"type\":\"tuple\"},{\"internalType\":\"uint64\",\"name\":\"offchainConfigVersion\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"offchainConfig\",\"type\":\"bytes\"},{\"internalType\":\"address[]\",\"name\":\"billingTokens\",\"type\":\"address[]\"},{\"components\":[{\"internalType\":\"uint32\",\"name\":\"gasFeePPB\",\"type\":\"uint32\"},{\"internalType\":\"uint24\",\"name\":\"flatFeeMicroLink\",\"type\":\"uint24\"},{\"internalType\":\"address\",\"name\":\"priceFeed\",\"type\":\"address\"},{\"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\":\"payees\",\"type\":\"address[]\"}],\"name\":\"setPayees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"peer\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"permission\",\"type\":\"uint8\"}],\"name\":\"setPeerRegistryMigrationPermission\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"newCheckData\",\"type\":\"bytes\"}],\"name\":\"setUpkeepCheckData\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"}],\"name\":\"setUpkeepGasLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"}],\"name\":\"setUpkeepOffchainConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"newPrivilegeConfig\",\"type\":\"bytes\"}],\"name\":\"setUpkeepPrivilegeConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"triggerConfig\",\"type\":\"bytes\"}],\"name\":\"setUpkeepTriggerConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"performData\",\"type\":\"bytes\"}],\"name\":\"simulatePerformUpkeep\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"gasUsed\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"supportsBillingToken\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"transmitter\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"proposed\",\"type\":\"address\"}],\"name\":\"transferPayeeship\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"proposed\",\"type\":\"address\"}],\"name\":\"transferUpkeepAdmin\",\"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\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"unpauseUpkeep\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"upkeepTranscoderVersion\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"upkeepVersion\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"assetAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdrawERC20Fees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"withdrawFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdrawLinkFees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"withdrawPayment\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", } -var IAutomationRegistryMasterABI = IAutomationRegistryMasterMetaData.ABI +var IAutomationRegistryMaster23ABI = IAutomationRegistryMaster23MetaData.ABI -type IAutomationRegistryMaster struct { +type IAutomationRegistryMaster23 struct { address common.Address abi abi.ABI - IAutomationRegistryMasterCaller - IAutomationRegistryMasterTransactor - IAutomationRegistryMasterFilterer + IAutomationRegistryMaster23Caller + IAutomationRegistryMaster23Transactor + IAutomationRegistryMaster23Filterer } -type IAutomationRegistryMasterCaller struct { +type IAutomationRegistryMaster23Caller struct { contract *bind.BoundContract } -type IAutomationRegistryMasterTransactor struct { +type IAutomationRegistryMaster23Transactor struct { contract *bind.BoundContract } -type IAutomationRegistryMasterFilterer struct { +type IAutomationRegistryMaster23Filterer struct { contract *bind.BoundContract } -type IAutomationRegistryMasterSession struct { - Contract *IAutomationRegistryMaster +type IAutomationRegistryMaster23Session struct { + Contract *IAutomationRegistryMaster23 CallOpts bind.CallOpts TransactOpts bind.TransactOpts } -type IAutomationRegistryMasterCallerSession struct { - Contract *IAutomationRegistryMasterCaller +type IAutomationRegistryMaster23CallerSession struct { + Contract *IAutomationRegistryMaster23Caller CallOpts bind.CallOpts } -type IAutomationRegistryMasterTransactorSession struct { - Contract *IAutomationRegistryMasterTransactor +type IAutomationRegistryMaster23TransactorSession struct { + Contract *IAutomationRegistryMaster23Transactor TransactOpts bind.TransactOpts } -type IAutomationRegistryMasterRaw struct { - Contract *IAutomationRegistryMaster +type IAutomationRegistryMaster23Raw struct { + Contract *IAutomationRegistryMaster23 } -type IAutomationRegistryMasterCallerRaw struct { - Contract *IAutomationRegistryMasterCaller +type IAutomationRegistryMaster23CallerRaw struct { + Contract *IAutomationRegistryMaster23Caller } -type IAutomationRegistryMasterTransactorRaw struct { - Contract *IAutomationRegistryMasterTransactor +type IAutomationRegistryMaster23TransactorRaw struct { + Contract *IAutomationRegistryMaster23Transactor } -func NewIAutomationRegistryMaster(address common.Address, backend bind.ContractBackend) (*IAutomationRegistryMaster, error) { - abi, err := abi.JSON(strings.NewReader(IAutomationRegistryMasterABI)) +func NewIAutomationRegistryMaster23(address common.Address, backend bind.ContractBackend) (*IAutomationRegistryMaster23, error) { + abi, err := abi.JSON(strings.NewReader(IAutomationRegistryMaster23ABI)) if err != nil { return nil, err } - contract, err := bindIAutomationRegistryMaster(address, backend, backend, backend) + contract, err := bindIAutomationRegistryMaster23(address, backend, backend, backend) if err != nil { return nil, err } - return &IAutomationRegistryMaster{address: address, abi: abi, IAutomationRegistryMasterCaller: IAutomationRegistryMasterCaller{contract: contract}, IAutomationRegistryMasterTransactor: IAutomationRegistryMasterTransactor{contract: contract}, IAutomationRegistryMasterFilterer: IAutomationRegistryMasterFilterer{contract: contract}}, nil + return &IAutomationRegistryMaster23{address: address, abi: abi, IAutomationRegistryMaster23Caller: IAutomationRegistryMaster23Caller{contract: contract}, IAutomationRegistryMaster23Transactor: IAutomationRegistryMaster23Transactor{contract: contract}, IAutomationRegistryMaster23Filterer: IAutomationRegistryMaster23Filterer{contract: contract}}, nil } -func NewIAutomationRegistryMasterCaller(address common.Address, caller bind.ContractCaller) (*IAutomationRegistryMasterCaller, error) { - contract, err := bindIAutomationRegistryMaster(address, caller, nil, nil) +func NewIAutomationRegistryMaster23Caller(address common.Address, caller bind.ContractCaller) (*IAutomationRegistryMaster23Caller, error) { + contract, err := bindIAutomationRegistryMaster23(address, caller, nil, nil) if err != nil { return nil, err } - return &IAutomationRegistryMasterCaller{contract: contract}, nil + return &IAutomationRegistryMaster23Caller{contract: contract}, nil } -func NewIAutomationRegistryMasterTransactor(address common.Address, transactor bind.ContractTransactor) (*IAutomationRegistryMasterTransactor, error) { - contract, err := bindIAutomationRegistryMaster(address, nil, transactor, nil) +func NewIAutomationRegistryMaster23Transactor(address common.Address, transactor bind.ContractTransactor) (*IAutomationRegistryMaster23Transactor, error) { + contract, err := bindIAutomationRegistryMaster23(address, nil, transactor, nil) if err != nil { return nil, err } - return &IAutomationRegistryMasterTransactor{contract: contract}, nil + return &IAutomationRegistryMaster23Transactor{contract: contract}, nil } -func NewIAutomationRegistryMasterFilterer(address common.Address, filterer bind.ContractFilterer) (*IAutomationRegistryMasterFilterer, error) { - contract, err := bindIAutomationRegistryMaster(address, nil, nil, filterer) +func NewIAutomationRegistryMaster23Filterer(address common.Address, filterer bind.ContractFilterer) (*IAutomationRegistryMaster23Filterer, error) { + contract, err := bindIAutomationRegistryMaster23(address, nil, nil, filterer) if err != nil { return nil, err } - return &IAutomationRegistryMasterFilterer{contract: contract}, nil + return &IAutomationRegistryMaster23Filterer{contract: contract}, nil } -func bindIAutomationRegistryMaster(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := IAutomationRegistryMasterMetaData.GetAbi() +func bindIAutomationRegistryMaster23(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := IAutomationRegistryMaster23MetaData.GetAbi() if err != nil { return nil, err } return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _IAutomationRegistryMaster.Contract.IAutomationRegistryMasterCaller.contract.Call(opts, result, method, params...) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Raw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _IAutomationRegistryMaster23.Contract.IAutomationRegistryMaster23Caller.contract.Call(opts, result, method, params...) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _IAutomationRegistryMaster.Contract.IAutomationRegistryMasterTransactor.contract.Transfer(opts) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Raw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.Contract.IAutomationRegistryMaster23Transactor.contract.Transfer(opts) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _IAutomationRegistryMaster.Contract.IAutomationRegistryMasterTransactor.contract.Transact(opts, method, params...) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.Contract.IAutomationRegistryMaster23Transactor.contract.Transact(opts, method, params...) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _IAutomationRegistryMaster.Contract.contract.Call(opts, result, method, params...) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23CallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _IAutomationRegistryMaster23.Contract.contract.Call(opts, result, method, params...) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _IAutomationRegistryMaster.Contract.contract.Transfer(opts) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23TransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.Contract.contract.Transfer(opts) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _IAutomationRegistryMaster.Contract.contract.Transact(opts, method, params...) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23TransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.Contract.contract.Transact(opts, method, params...) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterCaller) CheckCallback(opts *bind.CallOpts, id *big.Int, values [][]byte, extraData []byte) (CheckCallback, +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Caller) CheckCallback(opts *bind.CallOpts, id *big.Int, values [][]byte, extraData []byte) (CheckCallback, error) { var out []interface{} - err := _IAutomationRegistryMaster.contract.Call(opts, &out, "checkCallback", id, values, extraData) + err := _IAutomationRegistryMaster23.contract.Call(opts, &out, "checkCallback", id, values, extraData) outstruct := new(CheckCallback) if err != nil { @@ -236,23 +269,23 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterCaller) CheckCallback } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterSession) CheckCallback(id *big.Int, values [][]byte, extraData []byte) (CheckCallback, +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Session) CheckCallback(id *big.Int, values [][]byte, extraData []byte) (CheckCallback, error) { - return _IAutomationRegistryMaster.Contract.CheckCallback(&_IAutomationRegistryMaster.CallOpts, id, values, extraData) + return _IAutomationRegistryMaster23.Contract.CheckCallback(&_IAutomationRegistryMaster23.CallOpts, id, values, extraData) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterCallerSession) CheckCallback(id *big.Int, values [][]byte, extraData []byte) (CheckCallback, +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23CallerSession) CheckCallback(id *big.Int, values [][]byte, extraData []byte) (CheckCallback, error) { - return _IAutomationRegistryMaster.Contract.CheckCallback(&_IAutomationRegistryMaster.CallOpts, id, values, extraData) + return _IAutomationRegistryMaster23.Contract.CheckCallback(&_IAutomationRegistryMaster23.CallOpts, id, values, extraData) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterCaller) CheckUpkeep(opts *bind.CallOpts, id *big.Int, triggerData []byte) (CheckUpkeep, +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Caller) CheckUpkeep(opts *bind.CallOpts, id *big.Int, triggerData []byte) (CheckUpkeep, error) { var out []interface{} - err := _IAutomationRegistryMaster.contract.Call(opts, &out, "checkUpkeep", id, triggerData) + err := _IAutomationRegistryMaster23.contract.Call(opts, &out, "checkUpkeep", id, triggerData) outstruct := new(CheckUpkeep) if err != nil { @@ -265,29 +298,29 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterCaller) CheckUpkeep(o outstruct.GasUsed = *abi.ConvertType(out[3], new(*big.Int)).(**big.Int) outstruct.GasLimit = *abi.ConvertType(out[4], new(*big.Int)).(**big.Int) outstruct.FastGasWei = *abi.ConvertType(out[5], new(*big.Int)).(**big.Int) - outstruct.LinkNative = *abi.ConvertType(out[6], new(*big.Int)).(**big.Int) + outstruct.LinkUSD = *abi.ConvertType(out[6], new(*big.Int)).(**big.Int) return *outstruct, err } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterSession) CheckUpkeep(id *big.Int, triggerData []byte) (CheckUpkeep, +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Session) CheckUpkeep(id *big.Int, triggerData []byte) (CheckUpkeep, error) { - return _IAutomationRegistryMaster.Contract.CheckUpkeep(&_IAutomationRegistryMaster.CallOpts, id, triggerData) + return _IAutomationRegistryMaster23.Contract.CheckUpkeep(&_IAutomationRegistryMaster23.CallOpts, id, triggerData) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterCallerSession) CheckUpkeep(id *big.Int, triggerData []byte) (CheckUpkeep, +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23CallerSession) CheckUpkeep(id *big.Int, triggerData []byte) (CheckUpkeep, error) { - return _IAutomationRegistryMaster.Contract.CheckUpkeep(&_IAutomationRegistryMaster.CallOpts, id, triggerData) + return _IAutomationRegistryMaster23.Contract.CheckUpkeep(&_IAutomationRegistryMaster23.CallOpts, id, triggerData) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterCaller) CheckUpkeep0(opts *bind.CallOpts, id *big.Int) (CheckUpkeep0, +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Caller) CheckUpkeep0(opts *bind.CallOpts, id *big.Int) (CheckUpkeep0, error) { var out []interface{} - err := _IAutomationRegistryMaster.contract.Call(opts, &out, "checkUpkeep0", id) + err := _IAutomationRegistryMaster23.contract.Call(opts, &out, "checkUpkeep0", id) outstruct := new(CheckUpkeep0) if err != nil { @@ -300,27 +333,27 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterCaller) CheckUpkeep0( outstruct.GasUsed = *abi.ConvertType(out[3], new(*big.Int)).(**big.Int) outstruct.GasLimit = *abi.ConvertType(out[4], new(*big.Int)).(**big.Int) outstruct.FastGasWei = *abi.ConvertType(out[5], new(*big.Int)).(**big.Int) - outstruct.LinkNative = *abi.ConvertType(out[6], new(*big.Int)).(**big.Int) + outstruct.LinkUSD = *abi.ConvertType(out[6], new(*big.Int)).(**big.Int) return *outstruct, err } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterSession) CheckUpkeep0(id *big.Int) (CheckUpkeep0, +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Session) CheckUpkeep0(id *big.Int) (CheckUpkeep0, error) { - return _IAutomationRegistryMaster.Contract.CheckUpkeep0(&_IAutomationRegistryMaster.CallOpts, id) + return _IAutomationRegistryMaster23.Contract.CheckUpkeep0(&_IAutomationRegistryMaster23.CallOpts, id) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterCallerSession) CheckUpkeep0(id *big.Int) (CheckUpkeep0, +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23CallerSession) CheckUpkeep0(id *big.Int) (CheckUpkeep0, error) { - return _IAutomationRegistryMaster.Contract.CheckUpkeep0(&_IAutomationRegistryMaster.CallOpts, id) + return _IAutomationRegistryMaster23.Contract.CheckUpkeep0(&_IAutomationRegistryMaster23.CallOpts, id) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterCaller) FallbackTo(opts *bind.CallOpts) (common.Address, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Caller) FallbackTo(opts *bind.CallOpts) (common.Address, error) { var out []interface{} - err := _IAutomationRegistryMaster.contract.Call(opts, &out, "fallbackTo") + err := _IAutomationRegistryMaster23.contract.Call(opts, &out, "fallbackTo") if err != nil { return *new(common.Address), err @@ -332,17 +365,17 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterCaller) FallbackTo(op } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterSession) FallbackTo() (common.Address, error) { - return _IAutomationRegistryMaster.Contract.FallbackTo(&_IAutomationRegistryMaster.CallOpts) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Session) FallbackTo() (common.Address, error) { + return _IAutomationRegistryMaster23.Contract.FallbackTo(&_IAutomationRegistryMaster23.CallOpts) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterCallerSession) FallbackTo() (common.Address, error) { - return _IAutomationRegistryMaster.Contract.FallbackTo(&_IAutomationRegistryMaster.CallOpts) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23CallerSession) FallbackTo() (common.Address, error) { + return _IAutomationRegistryMaster23.Contract.FallbackTo(&_IAutomationRegistryMaster23.CallOpts) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterCaller) GetActiveUpkeepIDs(opts *bind.CallOpts, startIndex *big.Int, maxCount *big.Int) ([]*big.Int, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Caller) GetActiveUpkeepIDs(opts *bind.CallOpts, startIndex *big.Int, maxCount *big.Int) ([]*big.Int, error) { var out []interface{} - err := _IAutomationRegistryMaster.contract.Call(opts, &out, "getActiveUpkeepIDs", startIndex, maxCount) + err := _IAutomationRegistryMaster23.contract.Call(opts, &out, "getActiveUpkeepIDs", startIndex, maxCount) if err != nil { return *new([]*big.Int), err @@ -354,17 +387,17 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterCaller) GetActiveUpke } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterSession) GetActiveUpkeepIDs(startIndex *big.Int, maxCount *big.Int) ([]*big.Int, error) { - return _IAutomationRegistryMaster.Contract.GetActiveUpkeepIDs(&_IAutomationRegistryMaster.CallOpts, startIndex, maxCount) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Session) GetActiveUpkeepIDs(startIndex *big.Int, maxCount *big.Int) ([]*big.Int, error) { + return _IAutomationRegistryMaster23.Contract.GetActiveUpkeepIDs(&_IAutomationRegistryMaster23.CallOpts, startIndex, maxCount) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterCallerSession) GetActiveUpkeepIDs(startIndex *big.Int, maxCount *big.Int) ([]*big.Int, error) { - return _IAutomationRegistryMaster.Contract.GetActiveUpkeepIDs(&_IAutomationRegistryMaster.CallOpts, startIndex, maxCount) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23CallerSession) GetActiveUpkeepIDs(startIndex *big.Int, maxCount *big.Int) ([]*big.Int, error) { + return _IAutomationRegistryMaster23.Contract.GetActiveUpkeepIDs(&_IAutomationRegistryMaster23.CallOpts, startIndex, maxCount) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterCaller) GetAdminPrivilegeConfig(opts *bind.CallOpts, admin common.Address) ([]byte, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Caller) GetAdminPrivilegeConfig(opts *bind.CallOpts, admin common.Address) ([]byte, error) { var out []interface{} - err := _IAutomationRegistryMaster.contract.Call(opts, &out, "getAdminPrivilegeConfig", admin) + err := _IAutomationRegistryMaster23.contract.Call(opts, &out, "getAdminPrivilegeConfig", admin) if err != nil { return *new([]byte), err @@ -376,17 +409,17 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterCaller) GetAdminPrivi } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterSession) GetAdminPrivilegeConfig(admin common.Address) ([]byte, error) { - return _IAutomationRegistryMaster.Contract.GetAdminPrivilegeConfig(&_IAutomationRegistryMaster.CallOpts, admin) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Session) GetAdminPrivilegeConfig(admin common.Address) ([]byte, error) { + return _IAutomationRegistryMaster23.Contract.GetAdminPrivilegeConfig(&_IAutomationRegistryMaster23.CallOpts, admin) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterCallerSession) GetAdminPrivilegeConfig(admin common.Address) ([]byte, error) { - return _IAutomationRegistryMaster.Contract.GetAdminPrivilegeConfig(&_IAutomationRegistryMaster.CallOpts, admin) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23CallerSession) GetAdminPrivilegeConfig(admin common.Address) ([]byte, error) { + return _IAutomationRegistryMaster23.Contract.GetAdminPrivilegeConfig(&_IAutomationRegistryMaster23.CallOpts, admin) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterCaller) GetAllowedReadOnlyAddress(opts *bind.CallOpts) (common.Address, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Caller) GetAllowedReadOnlyAddress(opts *bind.CallOpts) (common.Address, error) { var out []interface{} - err := _IAutomationRegistryMaster.contract.Call(opts, &out, "getAllowedReadOnlyAddress") + err := _IAutomationRegistryMaster23.contract.Call(opts, &out, "getAllowedReadOnlyAddress") if err != nil { return *new(common.Address), err @@ -398,17 +431,17 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterCaller) GetAllowedRea } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterSession) GetAllowedReadOnlyAddress() (common.Address, error) { - return _IAutomationRegistryMaster.Contract.GetAllowedReadOnlyAddress(&_IAutomationRegistryMaster.CallOpts) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Session) GetAllowedReadOnlyAddress() (common.Address, error) { + return _IAutomationRegistryMaster23.Contract.GetAllowedReadOnlyAddress(&_IAutomationRegistryMaster23.CallOpts) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterCallerSession) GetAllowedReadOnlyAddress() (common.Address, error) { - return _IAutomationRegistryMaster.Contract.GetAllowedReadOnlyAddress(&_IAutomationRegistryMaster.CallOpts) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23CallerSession) GetAllowedReadOnlyAddress() (common.Address, error) { + return _IAutomationRegistryMaster23.Contract.GetAllowedReadOnlyAddress(&_IAutomationRegistryMaster23.CallOpts) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterCaller) GetAutomationForwarderLogic(opts *bind.CallOpts) (common.Address, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Caller) GetAutomationForwarderLogic(opts *bind.CallOpts) (common.Address, error) { var out []interface{} - err := _IAutomationRegistryMaster.contract.Call(opts, &out, "getAutomationForwarderLogic") + err := _IAutomationRegistryMaster23.contract.Call(opts, &out, "getAutomationForwarderLogic") if err != nil { return *new(common.Address), err @@ -420,17 +453,17 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterCaller) GetAutomation } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterSession) GetAutomationForwarderLogic() (common.Address, error) { - return _IAutomationRegistryMaster.Contract.GetAutomationForwarderLogic(&_IAutomationRegistryMaster.CallOpts) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Session) GetAutomationForwarderLogic() (common.Address, error) { + return _IAutomationRegistryMaster23.Contract.GetAutomationForwarderLogic(&_IAutomationRegistryMaster23.CallOpts) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterCallerSession) GetAutomationForwarderLogic() (common.Address, error) { - return _IAutomationRegistryMaster.Contract.GetAutomationForwarderLogic(&_IAutomationRegistryMaster.CallOpts) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23CallerSession) GetAutomationForwarderLogic() (common.Address, error) { + return _IAutomationRegistryMaster23.Contract.GetAutomationForwarderLogic(&_IAutomationRegistryMaster23.CallOpts) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterCaller) GetBalance(opts *bind.CallOpts, id *big.Int) (*big.Int, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Caller) GetBalance(opts *bind.CallOpts, id *big.Int) (*big.Int, error) { var out []interface{} - err := _IAutomationRegistryMaster.contract.Call(opts, &out, "getBalance", id) + err := _IAutomationRegistryMaster23.contract.Call(opts, &out, "getBalance", id) if err != nil { return *new(*big.Int), err @@ -442,17 +475,83 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterCaller) GetBalance(op } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterSession) GetBalance(id *big.Int) (*big.Int, error) { - return _IAutomationRegistryMaster.Contract.GetBalance(&_IAutomationRegistryMaster.CallOpts, id) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Session) GetBalance(id *big.Int) (*big.Int, error) { + return _IAutomationRegistryMaster23.Contract.GetBalance(&_IAutomationRegistryMaster23.CallOpts, id) +} + +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23CallerSession) GetBalance(id *big.Int) (*big.Int, error) { + return _IAutomationRegistryMaster23.Contract.GetBalance(&_IAutomationRegistryMaster23.CallOpts, id) +} + +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Caller) GetBillingToken(opts *bind.CallOpts, upkeepID *big.Int) (common.Address, error) { + var out []interface{} + err := _IAutomationRegistryMaster23.contract.Call(opts, &out, "getBillingToken", upkeepID) + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Session) GetBillingToken(upkeepID *big.Int) (common.Address, error) { + return _IAutomationRegistryMaster23.Contract.GetBillingToken(&_IAutomationRegistryMaster23.CallOpts, upkeepID) +} + +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23CallerSession) GetBillingToken(upkeepID *big.Int) (common.Address, error) { + return _IAutomationRegistryMaster23.Contract.GetBillingToken(&_IAutomationRegistryMaster23.CallOpts, upkeepID) +} + +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Caller) GetBillingTokenConfig(opts *bind.CallOpts, token common.Address) (AutomationRegistryBase23BillingConfig, error) { + var out []interface{} + err := _IAutomationRegistryMaster23.contract.Call(opts, &out, "getBillingTokenConfig", token) + + if err != nil { + return *new(AutomationRegistryBase23BillingConfig), err + } + + out0 := *abi.ConvertType(out[0], new(AutomationRegistryBase23BillingConfig)).(*AutomationRegistryBase23BillingConfig) + + return out0, err + +} + +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Session) GetBillingTokenConfig(token common.Address) (AutomationRegistryBase23BillingConfig, error) { + return _IAutomationRegistryMaster23.Contract.GetBillingTokenConfig(&_IAutomationRegistryMaster23.CallOpts, token) +} + +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23CallerSession) GetBillingTokenConfig(token common.Address) (AutomationRegistryBase23BillingConfig, error) { + return _IAutomationRegistryMaster23.Contract.GetBillingTokenConfig(&_IAutomationRegistryMaster23.CallOpts, token) +} + +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Caller) GetBillingTokens(opts *bind.CallOpts) ([]common.Address, error) { + var out []interface{} + err := _IAutomationRegistryMaster23.contract.Call(opts, &out, "getBillingTokens") + + if err != nil { + return *new([]common.Address), err + } + + out0 := *abi.ConvertType(out[0], new([]common.Address)).(*[]common.Address) + + return out0, err + +} + +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Session) GetBillingTokens() ([]common.Address, error) { + return _IAutomationRegistryMaster23.Contract.GetBillingTokens(&_IAutomationRegistryMaster23.CallOpts) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterCallerSession) GetBalance(id *big.Int) (*big.Int, error) { - return _IAutomationRegistryMaster.Contract.GetBalance(&_IAutomationRegistryMaster.CallOpts, id) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23CallerSession) GetBillingTokens() ([]common.Address, error) { + return _IAutomationRegistryMaster23.Contract.GetBillingTokens(&_IAutomationRegistryMaster23.CallOpts) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterCaller) GetCancellationDelay(opts *bind.CallOpts) (*big.Int, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Caller) GetCancellationDelay(opts *bind.CallOpts) (*big.Int, error) { var out []interface{} - err := _IAutomationRegistryMaster.contract.Call(opts, &out, "getCancellationDelay") + err := _IAutomationRegistryMaster23.contract.Call(opts, &out, "getCancellationDelay") if err != nil { return *new(*big.Int), err @@ -464,17 +563,17 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterCaller) GetCancellati } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterSession) GetCancellationDelay() (*big.Int, error) { - return _IAutomationRegistryMaster.Contract.GetCancellationDelay(&_IAutomationRegistryMaster.CallOpts) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Session) GetCancellationDelay() (*big.Int, error) { + return _IAutomationRegistryMaster23.Contract.GetCancellationDelay(&_IAutomationRegistryMaster23.CallOpts) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterCallerSession) GetCancellationDelay() (*big.Int, error) { - return _IAutomationRegistryMaster.Contract.GetCancellationDelay(&_IAutomationRegistryMaster.CallOpts) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23CallerSession) GetCancellationDelay() (*big.Int, error) { + return _IAutomationRegistryMaster23.Contract.GetCancellationDelay(&_IAutomationRegistryMaster23.CallOpts) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterCaller) GetChainModule(opts *bind.CallOpts) (common.Address, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Caller) GetChainModule(opts *bind.CallOpts) (common.Address, error) { var out []interface{} - err := _IAutomationRegistryMaster.contract.Call(opts, &out, "getChainModule") + err := _IAutomationRegistryMaster23.contract.Call(opts, &out, "getChainModule") if err != nil { return *new(common.Address), err @@ -486,17 +585,17 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterCaller) GetChainModul } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterSession) GetChainModule() (common.Address, error) { - return _IAutomationRegistryMaster.Contract.GetChainModule(&_IAutomationRegistryMaster.CallOpts) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Session) GetChainModule() (common.Address, error) { + return _IAutomationRegistryMaster23.Contract.GetChainModule(&_IAutomationRegistryMaster23.CallOpts) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterCallerSession) GetChainModule() (common.Address, error) { - return _IAutomationRegistryMaster.Contract.GetChainModule(&_IAutomationRegistryMaster.CallOpts) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23CallerSession) GetChainModule() (common.Address, error) { + return _IAutomationRegistryMaster23.Contract.GetChainModule(&_IAutomationRegistryMaster23.CallOpts) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterCaller) GetConditionalGasOverhead(opts *bind.CallOpts) (*big.Int, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Caller) GetConditionalGasOverhead(opts *bind.CallOpts) (*big.Int, error) { var out []interface{} - err := _IAutomationRegistryMaster.contract.Call(opts, &out, "getConditionalGasOverhead") + err := _IAutomationRegistryMaster23.contract.Call(opts, &out, "getConditionalGasOverhead") if err != nil { return *new(*big.Int), err @@ -508,17 +607,61 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterCaller) GetConditiona } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterSession) GetConditionalGasOverhead() (*big.Int, error) { - return _IAutomationRegistryMaster.Contract.GetConditionalGasOverhead(&_IAutomationRegistryMaster.CallOpts) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Session) GetConditionalGasOverhead() (*big.Int, error) { + return _IAutomationRegistryMaster23.Contract.GetConditionalGasOverhead(&_IAutomationRegistryMaster23.CallOpts) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterCallerSession) GetConditionalGasOverhead() (*big.Int, error) { - return _IAutomationRegistryMaster.Contract.GetConditionalGasOverhead(&_IAutomationRegistryMaster.CallOpts) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23CallerSession) GetConditionalGasOverhead() (*big.Int, error) { + return _IAutomationRegistryMaster23.Contract.GetConditionalGasOverhead(&_IAutomationRegistryMaster23.CallOpts) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterCaller) GetFastGasFeedAddress(opts *bind.CallOpts) (common.Address, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Caller) GetConfig(opts *bind.CallOpts) (AutomationRegistryBase23OnchainConfig, error) { var out []interface{} - err := _IAutomationRegistryMaster.contract.Call(opts, &out, "getFastGasFeedAddress") + err := _IAutomationRegistryMaster23.contract.Call(opts, &out, "getConfig") + + if err != nil { + return *new(AutomationRegistryBase23OnchainConfig), err + } + + out0 := *abi.ConvertType(out[0], new(AutomationRegistryBase23OnchainConfig)).(*AutomationRegistryBase23OnchainConfig) + + return out0, err + +} + +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Session) GetConfig() (AutomationRegistryBase23OnchainConfig, error) { + return _IAutomationRegistryMaster23.Contract.GetConfig(&_IAutomationRegistryMaster23.CallOpts) +} + +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23CallerSession) GetConfig() (AutomationRegistryBase23OnchainConfig, error) { + return _IAutomationRegistryMaster23.Contract.GetConfig(&_IAutomationRegistryMaster23.CallOpts) +} + +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Caller) GetFallbackNativePrice(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _IAutomationRegistryMaster23.contract.Call(opts, &out, "getFallbackNativePrice") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Session) GetFallbackNativePrice() (*big.Int, error) { + return _IAutomationRegistryMaster23.Contract.GetFallbackNativePrice(&_IAutomationRegistryMaster23.CallOpts) +} + +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23CallerSession) GetFallbackNativePrice() (*big.Int, error) { + return _IAutomationRegistryMaster23.Contract.GetFallbackNativePrice(&_IAutomationRegistryMaster23.CallOpts) +} + +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Caller) GetFastGasFeedAddress(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _IAutomationRegistryMaster23.contract.Call(opts, &out, "getFastGasFeedAddress") if err != nil { return *new(common.Address), err @@ -530,17 +673,17 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterCaller) GetFastGasFee } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterSession) GetFastGasFeedAddress() (common.Address, error) { - return _IAutomationRegistryMaster.Contract.GetFastGasFeedAddress(&_IAutomationRegistryMaster.CallOpts) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Session) GetFastGasFeedAddress() (common.Address, error) { + return _IAutomationRegistryMaster23.Contract.GetFastGasFeedAddress(&_IAutomationRegistryMaster23.CallOpts) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterCallerSession) GetFastGasFeedAddress() (common.Address, error) { - return _IAutomationRegistryMaster.Contract.GetFastGasFeedAddress(&_IAutomationRegistryMaster.CallOpts) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23CallerSession) GetFastGasFeedAddress() (common.Address, error) { + return _IAutomationRegistryMaster23.Contract.GetFastGasFeedAddress(&_IAutomationRegistryMaster23.CallOpts) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterCaller) GetForwarder(opts *bind.CallOpts, upkeepID *big.Int) (common.Address, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Caller) GetForwarder(opts *bind.CallOpts, upkeepID *big.Int) (common.Address, error) { var out []interface{} - err := _IAutomationRegistryMaster.contract.Call(opts, &out, "getForwarder", upkeepID) + err := _IAutomationRegistryMaster23.contract.Call(opts, &out, "getForwarder", upkeepID) if err != nil { return *new(common.Address), err @@ -552,17 +695,39 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterCaller) GetForwarder( } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterSession) GetForwarder(upkeepID *big.Int) (common.Address, error) { - return _IAutomationRegistryMaster.Contract.GetForwarder(&_IAutomationRegistryMaster.CallOpts, upkeepID) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Session) GetForwarder(upkeepID *big.Int) (common.Address, error) { + return _IAutomationRegistryMaster23.Contract.GetForwarder(&_IAutomationRegistryMaster23.CallOpts, upkeepID) +} + +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23CallerSession) GetForwarder(upkeepID *big.Int) (common.Address, error) { + return _IAutomationRegistryMaster23.Contract.GetForwarder(&_IAutomationRegistryMaster23.CallOpts, upkeepID) +} + +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Caller) GetHotVars(opts *bind.CallOpts) (AutomationRegistryBase23HotVars, error) { + var out []interface{} + err := _IAutomationRegistryMaster23.contract.Call(opts, &out, "getHotVars") + + if err != nil { + return *new(AutomationRegistryBase23HotVars), err + } + + out0 := *abi.ConvertType(out[0], new(AutomationRegistryBase23HotVars)).(*AutomationRegistryBase23HotVars) + + return out0, err + +} + +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Session) GetHotVars() (AutomationRegistryBase23HotVars, error) { + return _IAutomationRegistryMaster23.Contract.GetHotVars(&_IAutomationRegistryMaster23.CallOpts) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterCallerSession) GetForwarder(upkeepID *big.Int) (common.Address, error) { - return _IAutomationRegistryMaster.Contract.GetForwarder(&_IAutomationRegistryMaster.CallOpts, upkeepID) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23CallerSession) GetHotVars() (AutomationRegistryBase23HotVars, error) { + return _IAutomationRegistryMaster23.Contract.GetHotVars(&_IAutomationRegistryMaster23.CallOpts) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterCaller) GetLinkAddress(opts *bind.CallOpts) (common.Address, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Caller) GetLinkAddress(opts *bind.CallOpts) (common.Address, error) { var out []interface{} - err := _IAutomationRegistryMaster.contract.Call(opts, &out, "getLinkAddress") + err := _IAutomationRegistryMaster23.contract.Call(opts, &out, "getLinkAddress") if err != nil { return *new(common.Address), err @@ -574,17 +739,17 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterCaller) GetLinkAddres } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterSession) GetLinkAddress() (common.Address, error) { - return _IAutomationRegistryMaster.Contract.GetLinkAddress(&_IAutomationRegistryMaster.CallOpts) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Session) GetLinkAddress() (common.Address, error) { + return _IAutomationRegistryMaster23.Contract.GetLinkAddress(&_IAutomationRegistryMaster23.CallOpts) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterCallerSession) GetLinkAddress() (common.Address, error) { - return _IAutomationRegistryMaster.Contract.GetLinkAddress(&_IAutomationRegistryMaster.CallOpts) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23CallerSession) GetLinkAddress() (common.Address, error) { + return _IAutomationRegistryMaster23.Contract.GetLinkAddress(&_IAutomationRegistryMaster23.CallOpts) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterCaller) GetLinkNativeFeedAddress(opts *bind.CallOpts) (common.Address, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Caller) GetLinkUSDFeedAddress(opts *bind.CallOpts) (common.Address, error) { var out []interface{} - err := _IAutomationRegistryMaster.contract.Call(opts, &out, "getLinkNativeFeedAddress") + err := _IAutomationRegistryMaster23.contract.Call(opts, &out, "getLinkUSDFeedAddress") if err != nil { return *new(common.Address), err @@ -596,17 +761,17 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterCaller) GetLinkNative } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterSession) GetLinkNativeFeedAddress() (common.Address, error) { - return _IAutomationRegistryMaster.Contract.GetLinkNativeFeedAddress(&_IAutomationRegistryMaster.CallOpts) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Session) GetLinkUSDFeedAddress() (common.Address, error) { + return _IAutomationRegistryMaster23.Contract.GetLinkUSDFeedAddress(&_IAutomationRegistryMaster23.CallOpts) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterCallerSession) GetLinkNativeFeedAddress() (common.Address, error) { - return _IAutomationRegistryMaster.Contract.GetLinkNativeFeedAddress(&_IAutomationRegistryMaster.CallOpts) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23CallerSession) GetLinkUSDFeedAddress() (common.Address, error) { + return _IAutomationRegistryMaster23.Contract.GetLinkUSDFeedAddress(&_IAutomationRegistryMaster23.CallOpts) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterCaller) GetLogGasOverhead(opts *bind.CallOpts) (*big.Int, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Caller) GetLogGasOverhead(opts *bind.CallOpts) (*big.Int, error) { var out []interface{} - err := _IAutomationRegistryMaster.contract.Call(opts, &out, "getLogGasOverhead") + err := _IAutomationRegistryMaster23.contract.Call(opts, &out, "getLogGasOverhead") if err != nil { return *new(*big.Int), err @@ -618,17 +783,17 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterCaller) GetLogGasOver } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterSession) GetLogGasOverhead() (*big.Int, error) { - return _IAutomationRegistryMaster.Contract.GetLogGasOverhead(&_IAutomationRegistryMaster.CallOpts) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Session) GetLogGasOverhead() (*big.Int, error) { + return _IAutomationRegistryMaster23.Contract.GetLogGasOverhead(&_IAutomationRegistryMaster23.CallOpts) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterCallerSession) GetLogGasOverhead() (*big.Int, error) { - return _IAutomationRegistryMaster.Contract.GetLogGasOverhead(&_IAutomationRegistryMaster.CallOpts) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23CallerSession) GetLogGasOverhead() (*big.Int, error) { + return _IAutomationRegistryMaster23.Contract.GetLogGasOverhead(&_IAutomationRegistryMaster23.CallOpts) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterCaller) GetMaxPaymentForGas(opts *bind.CallOpts, triggerType uint8, gasLimit uint32) (*big.Int, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Caller) GetMaxPaymentForGas(opts *bind.CallOpts, triggerType uint8, gasLimit uint32, billingToken common.Address) (*big.Int, error) { var out []interface{} - err := _IAutomationRegistryMaster.contract.Call(opts, &out, "getMaxPaymentForGas", triggerType, gasLimit) + err := _IAutomationRegistryMaster23.contract.Call(opts, &out, "getMaxPaymentForGas", triggerType, gasLimit, billingToken) if err != nil { return *new(*big.Int), err @@ -640,17 +805,17 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterCaller) GetMaxPayment } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterSession) GetMaxPaymentForGas(triggerType uint8, gasLimit uint32) (*big.Int, error) { - return _IAutomationRegistryMaster.Contract.GetMaxPaymentForGas(&_IAutomationRegistryMaster.CallOpts, triggerType, gasLimit) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Session) GetMaxPaymentForGas(triggerType uint8, gasLimit uint32, billingToken common.Address) (*big.Int, error) { + return _IAutomationRegistryMaster23.Contract.GetMaxPaymentForGas(&_IAutomationRegistryMaster23.CallOpts, triggerType, gasLimit, billingToken) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterCallerSession) GetMaxPaymentForGas(triggerType uint8, gasLimit uint32) (*big.Int, error) { - return _IAutomationRegistryMaster.Contract.GetMaxPaymentForGas(&_IAutomationRegistryMaster.CallOpts, triggerType, gasLimit) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23CallerSession) GetMaxPaymentForGas(triggerType uint8, gasLimit uint32, billingToken common.Address) (*big.Int, error) { + return _IAutomationRegistryMaster23.Contract.GetMaxPaymentForGas(&_IAutomationRegistryMaster23.CallOpts, triggerType, gasLimit, billingToken) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterCaller) GetMinBalance(opts *bind.CallOpts, id *big.Int) (*big.Int, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Caller) GetMinBalance(opts *bind.CallOpts, id *big.Int) (*big.Int, error) { var out []interface{} - err := _IAutomationRegistryMaster.contract.Call(opts, &out, "getMinBalance", id) + err := _IAutomationRegistryMaster23.contract.Call(opts, &out, "getMinBalance", id) if err != nil { return *new(*big.Int), err @@ -662,17 +827,17 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterCaller) GetMinBalance } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterSession) GetMinBalance(id *big.Int) (*big.Int, error) { - return _IAutomationRegistryMaster.Contract.GetMinBalance(&_IAutomationRegistryMaster.CallOpts, id) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Session) GetMinBalance(id *big.Int) (*big.Int, error) { + return _IAutomationRegistryMaster23.Contract.GetMinBalance(&_IAutomationRegistryMaster23.CallOpts, id) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterCallerSession) GetMinBalance(id *big.Int) (*big.Int, error) { - return _IAutomationRegistryMaster.Contract.GetMinBalance(&_IAutomationRegistryMaster.CallOpts, id) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23CallerSession) GetMinBalance(id *big.Int) (*big.Int, error) { + return _IAutomationRegistryMaster23.Contract.GetMinBalance(&_IAutomationRegistryMaster23.CallOpts, id) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterCaller) GetMinBalanceForUpkeep(opts *bind.CallOpts, id *big.Int) (*big.Int, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Caller) GetMinBalanceForUpkeep(opts *bind.CallOpts, id *big.Int) (*big.Int, error) { var out []interface{} - err := _IAutomationRegistryMaster.contract.Call(opts, &out, "getMinBalanceForUpkeep", id) + err := _IAutomationRegistryMaster23.contract.Call(opts, &out, "getMinBalanceForUpkeep", id) if err != nil { return *new(*big.Int), err @@ -684,17 +849,61 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterCaller) GetMinBalance } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterSession) GetMinBalanceForUpkeep(id *big.Int) (*big.Int, error) { - return _IAutomationRegistryMaster.Contract.GetMinBalanceForUpkeep(&_IAutomationRegistryMaster.CallOpts, id) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Session) GetMinBalanceForUpkeep(id *big.Int) (*big.Int, error) { + return _IAutomationRegistryMaster23.Contract.GetMinBalanceForUpkeep(&_IAutomationRegistryMaster23.CallOpts, id) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterCallerSession) GetMinBalanceForUpkeep(id *big.Int) (*big.Int, error) { - return _IAutomationRegistryMaster.Contract.GetMinBalanceForUpkeep(&_IAutomationRegistryMaster.CallOpts, id) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23CallerSession) GetMinBalanceForUpkeep(id *big.Int) (*big.Int, error) { + return _IAutomationRegistryMaster23.Contract.GetMinBalanceForUpkeep(&_IAutomationRegistryMaster23.CallOpts, id) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterCaller) GetPeerRegistryMigrationPermission(opts *bind.CallOpts, peer common.Address) (uint8, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Caller) GetNativeUSDFeedAddress(opts *bind.CallOpts) (common.Address, error) { var out []interface{} - err := _IAutomationRegistryMaster.contract.Call(opts, &out, "getPeerRegistryMigrationPermission", peer) + err := _IAutomationRegistryMaster23.contract.Call(opts, &out, "getNativeUSDFeedAddress") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Session) GetNativeUSDFeedAddress() (common.Address, error) { + return _IAutomationRegistryMaster23.Contract.GetNativeUSDFeedAddress(&_IAutomationRegistryMaster23.CallOpts) +} + +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23CallerSession) GetNativeUSDFeedAddress() (common.Address, error) { + return _IAutomationRegistryMaster23.Contract.GetNativeUSDFeedAddress(&_IAutomationRegistryMaster23.CallOpts) +} + +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Caller) GetNumUpkeeps(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _IAutomationRegistryMaster23.contract.Call(opts, &out, "getNumUpkeeps") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Session) GetNumUpkeeps() (*big.Int, error) { + return _IAutomationRegistryMaster23.Contract.GetNumUpkeeps(&_IAutomationRegistryMaster23.CallOpts) +} + +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23CallerSession) GetNumUpkeeps() (*big.Int, error) { + return _IAutomationRegistryMaster23.Contract.GetNumUpkeeps(&_IAutomationRegistryMaster23.CallOpts) +} + +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Caller) GetPeerRegistryMigrationPermission(opts *bind.CallOpts, peer common.Address) (uint8, error) { + var out []interface{} + err := _IAutomationRegistryMaster23.contract.Call(opts, &out, "getPeerRegistryMigrationPermission", peer) if err != nil { return *new(uint8), err @@ -706,17 +915,17 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterCaller) GetPeerRegist } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterSession) GetPeerRegistryMigrationPermission(peer common.Address) (uint8, error) { - return _IAutomationRegistryMaster.Contract.GetPeerRegistryMigrationPermission(&_IAutomationRegistryMaster.CallOpts, peer) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Session) GetPeerRegistryMigrationPermission(peer common.Address) (uint8, error) { + return _IAutomationRegistryMaster23.Contract.GetPeerRegistryMigrationPermission(&_IAutomationRegistryMaster23.CallOpts, peer) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterCallerSession) GetPeerRegistryMigrationPermission(peer common.Address) (uint8, error) { - return _IAutomationRegistryMaster.Contract.GetPeerRegistryMigrationPermission(&_IAutomationRegistryMaster.CallOpts, peer) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23CallerSession) GetPeerRegistryMigrationPermission(peer common.Address) (uint8, error) { + return _IAutomationRegistryMaster23.Contract.GetPeerRegistryMigrationPermission(&_IAutomationRegistryMaster23.CallOpts, peer) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterCaller) GetPerPerformByteGasOverhead(opts *bind.CallOpts) (*big.Int, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Caller) GetPerPerformByteGasOverhead(opts *bind.CallOpts) (*big.Int, error) { var out []interface{} - err := _IAutomationRegistryMaster.contract.Call(opts, &out, "getPerPerformByteGasOverhead") + err := _IAutomationRegistryMaster23.contract.Call(opts, &out, "getPerPerformByteGasOverhead") if err != nil { return *new(*big.Int), err @@ -728,17 +937,17 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterCaller) GetPerPerform } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterSession) GetPerPerformByteGasOverhead() (*big.Int, error) { - return _IAutomationRegistryMaster.Contract.GetPerPerformByteGasOverhead(&_IAutomationRegistryMaster.CallOpts) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Session) GetPerPerformByteGasOverhead() (*big.Int, error) { + return _IAutomationRegistryMaster23.Contract.GetPerPerformByteGasOverhead(&_IAutomationRegistryMaster23.CallOpts) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterCallerSession) GetPerPerformByteGasOverhead() (*big.Int, error) { - return _IAutomationRegistryMaster.Contract.GetPerPerformByteGasOverhead(&_IAutomationRegistryMaster.CallOpts) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23CallerSession) GetPerPerformByteGasOverhead() (*big.Int, error) { + return _IAutomationRegistryMaster23.Contract.GetPerPerformByteGasOverhead(&_IAutomationRegistryMaster23.CallOpts) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterCaller) GetPerSignerGasOverhead(opts *bind.CallOpts) (*big.Int, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Caller) GetPerSignerGasOverhead(opts *bind.CallOpts) (*big.Int, error) { var out []interface{} - err := _IAutomationRegistryMaster.contract.Call(opts, &out, "getPerSignerGasOverhead") + err := _IAutomationRegistryMaster23.contract.Call(opts, &out, "getPerSignerGasOverhead") if err != nil { return *new(*big.Int), err @@ -750,17 +959,17 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterCaller) GetPerSignerG } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterSession) GetPerSignerGasOverhead() (*big.Int, error) { - return _IAutomationRegistryMaster.Contract.GetPerSignerGasOverhead(&_IAutomationRegistryMaster.CallOpts) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Session) GetPerSignerGasOverhead() (*big.Int, error) { + return _IAutomationRegistryMaster23.Contract.GetPerSignerGasOverhead(&_IAutomationRegistryMaster23.CallOpts) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterCallerSession) GetPerSignerGasOverhead() (*big.Int, error) { - return _IAutomationRegistryMaster.Contract.GetPerSignerGasOverhead(&_IAutomationRegistryMaster.CallOpts) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23CallerSession) GetPerSignerGasOverhead() (*big.Int, error) { + return _IAutomationRegistryMaster23.Contract.GetPerSignerGasOverhead(&_IAutomationRegistryMaster23.CallOpts) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterCaller) GetReorgProtectionEnabled(opts *bind.CallOpts) (bool, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Caller) GetReorgProtectionEnabled(opts *bind.CallOpts) (bool, error) { var out []interface{} - err := _IAutomationRegistryMaster.contract.Call(opts, &out, "getReorgProtectionEnabled") + err := _IAutomationRegistryMaster23.contract.Call(opts, &out, "getReorgProtectionEnabled") if err != nil { return *new(bool), err @@ -772,19 +981,41 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterCaller) GetReorgProte } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterSession) GetReorgProtectionEnabled() (bool, error) { - return _IAutomationRegistryMaster.Contract.GetReorgProtectionEnabled(&_IAutomationRegistryMaster.CallOpts) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Session) GetReorgProtectionEnabled() (bool, error) { + return _IAutomationRegistryMaster23.Contract.GetReorgProtectionEnabled(&_IAutomationRegistryMaster23.CallOpts) +} + +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23CallerSession) GetReorgProtectionEnabled() (bool, error) { + return _IAutomationRegistryMaster23.Contract.GetReorgProtectionEnabled(&_IAutomationRegistryMaster23.CallOpts) +} + +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Caller) GetReserveAmount(opts *bind.CallOpts, billingToken common.Address) (*big.Int, error) { + var out []interface{} + err := _IAutomationRegistryMaster23.contract.Call(opts, &out, "getReserveAmount", billingToken) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Session) GetReserveAmount(billingToken common.Address) (*big.Int, error) { + return _IAutomationRegistryMaster23.Contract.GetReserveAmount(&_IAutomationRegistryMaster23.CallOpts, billingToken) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterCallerSession) GetReorgProtectionEnabled() (bool, error) { - return _IAutomationRegistryMaster.Contract.GetReorgProtectionEnabled(&_IAutomationRegistryMaster.CallOpts) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23CallerSession) GetReserveAmount(billingToken common.Address) (*big.Int, error) { + return _IAutomationRegistryMaster23.Contract.GetReserveAmount(&_IAutomationRegistryMaster23.CallOpts, billingToken) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterCaller) GetSignerInfo(opts *bind.CallOpts, query common.Address) (GetSignerInfo, +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Caller) GetSignerInfo(opts *bind.CallOpts, query common.Address) (GetSignerInfo, error) { var out []interface{} - err := _IAutomationRegistryMaster.contract.Call(opts, &out, "getSignerInfo", query) + err := _IAutomationRegistryMaster23.contract.Call(opts, &out, "getSignerInfo", query) outstruct := new(GetSignerInfo) if err != nil { @@ -798,31 +1029,31 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterCaller) GetSignerInfo } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterSession) GetSignerInfo(query common.Address) (GetSignerInfo, +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Session) GetSignerInfo(query common.Address) (GetSignerInfo, error) { - return _IAutomationRegistryMaster.Contract.GetSignerInfo(&_IAutomationRegistryMaster.CallOpts, query) + return _IAutomationRegistryMaster23.Contract.GetSignerInfo(&_IAutomationRegistryMaster23.CallOpts, query) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterCallerSession) GetSignerInfo(query common.Address) (GetSignerInfo, +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23CallerSession) GetSignerInfo(query common.Address) (GetSignerInfo, error) { - return _IAutomationRegistryMaster.Contract.GetSignerInfo(&_IAutomationRegistryMaster.CallOpts, query) + return _IAutomationRegistryMaster23.Contract.GetSignerInfo(&_IAutomationRegistryMaster23.CallOpts, query) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterCaller) GetState(opts *bind.CallOpts) (GetState, +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Caller) GetState(opts *bind.CallOpts) (GetState, error) { var out []interface{} - err := _IAutomationRegistryMaster.contract.Call(opts, &out, "getState") + err := _IAutomationRegistryMaster23.contract.Call(opts, &out, "getState") outstruct := new(GetState) if err != nil { return *outstruct, err } - outstruct.State = *abi.ConvertType(out[0], new(AutomationRegistryBase23State)).(*AutomationRegistryBase23State) - outstruct.Config = *abi.ConvertType(out[1], new(AutomationRegistryBase23OnchainConfigLegacy)).(*AutomationRegistryBase23OnchainConfigLegacy) + outstruct.State = *abi.ConvertType(out[0], new(IAutomationV21PlusCommonStateLegacy)).(*IAutomationV21PlusCommonStateLegacy) + outstruct.Config = *abi.ConvertType(out[1], new(IAutomationV21PlusCommonOnchainConfigLegacy)).(*IAutomationV21PlusCommonOnchainConfigLegacy) outstruct.Signers = *abi.ConvertType(out[2], new([]common.Address)).(*[]common.Address) outstruct.Transmitters = *abi.ConvertType(out[3], new([]common.Address)).(*[]common.Address) outstruct.F = *abi.ConvertType(out[4], new(uint8)).(*uint8) @@ -831,21 +1062,43 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterCaller) GetState(opts } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterSession) GetState() (GetState, +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Session) GetState() (GetState, error) { - return _IAutomationRegistryMaster.Contract.GetState(&_IAutomationRegistryMaster.CallOpts) + return _IAutomationRegistryMaster23.Contract.GetState(&_IAutomationRegistryMaster23.CallOpts) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterCallerSession) GetState() (GetState, +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23CallerSession) GetState() (GetState, error) { - return _IAutomationRegistryMaster.Contract.GetState(&_IAutomationRegistryMaster.CallOpts) + return _IAutomationRegistryMaster23.Contract.GetState(&_IAutomationRegistryMaster23.CallOpts) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterCaller) GetTransmitCalldataFixedBytesOverhead(opts *bind.CallOpts) (*big.Int, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Caller) GetStorage(opts *bind.CallOpts) (AutomationRegistryBase23Storage, error) { var out []interface{} - err := _IAutomationRegistryMaster.contract.Call(opts, &out, "getTransmitCalldataFixedBytesOverhead") + err := _IAutomationRegistryMaster23.contract.Call(opts, &out, "getStorage") + + if err != nil { + return *new(AutomationRegistryBase23Storage), err + } + + out0 := *abi.ConvertType(out[0], new(AutomationRegistryBase23Storage)).(*AutomationRegistryBase23Storage) + + return out0, err + +} + +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Session) GetStorage() (AutomationRegistryBase23Storage, error) { + return _IAutomationRegistryMaster23.Contract.GetStorage(&_IAutomationRegistryMaster23.CallOpts) +} + +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23CallerSession) GetStorage() (AutomationRegistryBase23Storage, error) { + return _IAutomationRegistryMaster23.Contract.GetStorage(&_IAutomationRegistryMaster23.CallOpts) +} + +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Caller) GetTransmitCalldataFixedBytesOverhead(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _IAutomationRegistryMaster23.contract.Call(opts, &out, "getTransmitCalldataFixedBytesOverhead") if err != nil { return *new(*big.Int), err @@ -857,17 +1110,17 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterCaller) GetTransmitCa } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterSession) GetTransmitCalldataFixedBytesOverhead() (*big.Int, error) { - return _IAutomationRegistryMaster.Contract.GetTransmitCalldataFixedBytesOverhead(&_IAutomationRegistryMaster.CallOpts) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Session) GetTransmitCalldataFixedBytesOverhead() (*big.Int, error) { + return _IAutomationRegistryMaster23.Contract.GetTransmitCalldataFixedBytesOverhead(&_IAutomationRegistryMaster23.CallOpts) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterCallerSession) GetTransmitCalldataFixedBytesOverhead() (*big.Int, error) { - return _IAutomationRegistryMaster.Contract.GetTransmitCalldataFixedBytesOverhead(&_IAutomationRegistryMaster.CallOpts) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23CallerSession) GetTransmitCalldataFixedBytesOverhead() (*big.Int, error) { + return _IAutomationRegistryMaster23.Contract.GetTransmitCalldataFixedBytesOverhead(&_IAutomationRegistryMaster23.CallOpts) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterCaller) GetTransmitCalldataPerSignerBytesOverhead(opts *bind.CallOpts) (*big.Int, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Caller) GetTransmitCalldataPerSignerBytesOverhead(opts *bind.CallOpts) (*big.Int, error) { var out []interface{} - err := _IAutomationRegistryMaster.contract.Call(opts, &out, "getTransmitCalldataPerSignerBytesOverhead") + err := _IAutomationRegistryMaster23.contract.Call(opts, &out, "getTransmitCalldataPerSignerBytesOverhead") if err != nil { return *new(*big.Int), err @@ -879,19 +1132,19 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterCaller) GetTransmitCa } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterSession) GetTransmitCalldataPerSignerBytesOverhead() (*big.Int, error) { - return _IAutomationRegistryMaster.Contract.GetTransmitCalldataPerSignerBytesOverhead(&_IAutomationRegistryMaster.CallOpts) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Session) GetTransmitCalldataPerSignerBytesOverhead() (*big.Int, error) { + return _IAutomationRegistryMaster23.Contract.GetTransmitCalldataPerSignerBytesOverhead(&_IAutomationRegistryMaster23.CallOpts) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterCallerSession) GetTransmitCalldataPerSignerBytesOverhead() (*big.Int, error) { - return _IAutomationRegistryMaster.Contract.GetTransmitCalldataPerSignerBytesOverhead(&_IAutomationRegistryMaster.CallOpts) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23CallerSession) GetTransmitCalldataPerSignerBytesOverhead() (*big.Int, error) { + return _IAutomationRegistryMaster23.Contract.GetTransmitCalldataPerSignerBytesOverhead(&_IAutomationRegistryMaster23.CallOpts) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterCaller) GetTransmitterInfo(opts *bind.CallOpts, query common.Address) (GetTransmitterInfo, +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Caller) GetTransmitterInfo(opts *bind.CallOpts, query common.Address) (GetTransmitterInfo, error) { var out []interface{} - err := _IAutomationRegistryMaster.contract.Call(opts, &out, "getTransmitterInfo", query) + err := _IAutomationRegistryMaster23.contract.Call(opts, &out, "getTransmitterInfo", query) outstruct := new(GetTransmitterInfo) if err != nil { @@ -908,21 +1161,21 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterCaller) GetTransmitte } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterSession) GetTransmitterInfo(query common.Address) (GetTransmitterInfo, +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Session) GetTransmitterInfo(query common.Address) (GetTransmitterInfo, error) { - return _IAutomationRegistryMaster.Contract.GetTransmitterInfo(&_IAutomationRegistryMaster.CallOpts, query) + return _IAutomationRegistryMaster23.Contract.GetTransmitterInfo(&_IAutomationRegistryMaster23.CallOpts, query) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterCallerSession) GetTransmitterInfo(query common.Address) (GetTransmitterInfo, +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23CallerSession) GetTransmitterInfo(query common.Address) (GetTransmitterInfo, error) { - return _IAutomationRegistryMaster.Contract.GetTransmitterInfo(&_IAutomationRegistryMaster.CallOpts, query) + return _IAutomationRegistryMaster23.Contract.GetTransmitterInfo(&_IAutomationRegistryMaster23.CallOpts, query) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterCaller) GetTriggerType(opts *bind.CallOpts, upkeepId *big.Int) (uint8, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Caller) GetTriggerType(opts *bind.CallOpts, upkeepId *big.Int) (uint8, error) { var out []interface{} - err := _IAutomationRegistryMaster.contract.Call(opts, &out, "getTriggerType", upkeepId) + err := _IAutomationRegistryMaster23.contract.Call(opts, &out, "getTriggerType", upkeepId) if err != nil { return *new(uint8), err @@ -934,39 +1187,39 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterCaller) GetTriggerTyp } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterSession) GetTriggerType(upkeepId *big.Int) (uint8, error) { - return _IAutomationRegistryMaster.Contract.GetTriggerType(&_IAutomationRegistryMaster.CallOpts, upkeepId) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Session) GetTriggerType(upkeepId *big.Int) (uint8, error) { + return _IAutomationRegistryMaster23.Contract.GetTriggerType(&_IAutomationRegistryMaster23.CallOpts, upkeepId) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterCallerSession) GetTriggerType(upkeepId *big.Int) (uint8, error) { - return _IAutomationRegistryMaster.Contract.GetTriggerType(&_IAutomationRegistryMaster.CallOpts, upkeepId) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23CallerSession) GetTriggerType(upkeepId *big.Int) (uint8, error) { + return _IAutomationRegistryMaster23.Contract.GetTriggerType(&_IAutomationRegistryMaster23.CallOpts, upkeepId) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterCaller) GetUpkeep(opts *bind.CallOpts, id *big.Int) (AutomationRegistryBase23UpkeepInfo, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Caller) GetUpkeep(opts *bind.CallOpts, id *big.Int) (IAutomationV21PlusCommonUpkeepInfoLegacy, error) { var out []interface{} - err := _IAutomationRegistryMaster.contract.Call(opts, &out, "getUpkeep", id) + err := _IAutomationRegistryMaster23.contract.Call(opts, &out, "getUpkeep", id) if err != nil { - return *new(AutomationRegistryBase23UpkeepInfo), err + return *new(IAutomationV21PlusCommonUpkeepInfoLegacy), err } - out0 := *abi.ConvertType(out[0], new(AutomationRegistryBase23UpkeepInfo)).(*AutomationRegistryBase23UpkeepInfo) + out0 := *abi.ConvertType(out[0], new(IAutomationV21PlusCommonUpkeepInfoLegacy)).(*IAutomationV21PlusCommonUpkeepInfoLegacy) return out0, err } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterSession) GetUpkeep(id *big.Int) (AutomationRegistryBase23UpkeepInfo, error) { - return _IAutomationRegistryMaster.Contract.GetUpkeep(&_IAutomationRegistryMaster.CallOpts, id) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Session) GetUpkeep(id *big.Int) (IAutomationV21PlusCommonUpkeepInfoLegacy, error) { + return _IAutomationRegistryMaster23.Contract.GetUpkeep(&_IAutomationRegistryMaster23.CallOpts, id) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterCallerSession) GetUpkeep(id *big.Int) (AutomationRegistryBase23UpkeepInfo, error) { - return _IAutomationRegistryMaster.Contract.GetUpkeep(&_IAutomationRegistryMaster.CallOpts, id) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23CallerSession) GetUpkeep(id *big.Int) (IAutomationV21PlusCommonUpkeepInfoLegacy, error) { + return _IAutomationRegistryMaster23.Contract.GetUpkeep(&_IAutomationRegistryMaster23.CallOpts, id) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterCaller) GetUpkeepPrivilegeConfig(opts *bind.CallOpts, upkeepId *big.Int) ([]byte, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Caller) GetUpkeepPrivilegeConfig(opts *bind.CallOpts, upkeepId *big.Int) ([]byte, error) { var out []interface{} - err := _IAutomationRegistryMaster.contract.Call(opts, &out, "getUpkeepPrivilegeConfig", upkeepId) + err := _IAutomationRegistryMaster23.contract.Call(opts, &out, "getUpkeepPrivilegeConfig", upkeepId) if err != nil { return *new([]byte), err @@ -978,17 +1231,17 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterCaller) GetUpkeepPriv } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterSession) GetUpkeepPrivilegeConfig(upkeepId *big.Int) ([]byte, error) { - return _IAutomationRegistryMaster.Contract.GetUpkeepPrivilegeConfig(&_IAutomationRegistryMaster.CallOpts, upkeepId) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Session) GetUpkeepPrivilegeConfig(upkeepId *big.Int) ([]byte, error) { + return _IAutomationRegistryMaster23.Contract.GetUpkeepPrivilegeConfig(&_IAutomationRegistryMaster23.CallOpts, upkeepId) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterCallerSession) GetUpkeepPrivilegeConfig(upkeepId *big.Int) ([]byte, error) { - return _IAutomationRegistryMaster.Contract.GetUpkeepPrivilegeConfig(&_IAutomationRegistryMaster.CallOpts, upkeepId) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23CallerSession) GetUpkeepPrivilegeConfig(upkeepId *big.Int) ([]byte, error) { + return _IAutomationRegistryMaster23.Contract.GetUpkeepPrivilegeConfig(&_IAutomationRegistryMaster23.CallOpts, upkeepId) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterCaller) GetUpkeepTriggerConfig(opts *bind.CallOpts, upkeepId *big.Int) ([]byte, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Caller) GetUpkeepTriggerConfig(opts *bind.CallOpts, upkeepId *big.Int) ([]byte, error) { var out []interface{} - err := _IAutomationRegistryMaster.contract.Call(opts, &out, "getUpkeepTriggerConfig", upkeepId) + err := _IAutomationRegistryMaster23.contract.Call(opts, &out, "getUpkeepTriggerConfig", upkeepId) if err != nil { return *new([]byte), err @@ -1000,17 +1253,17 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterCaller) GetUpkeepTrig } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterSession) GetUpkeepTriggerConfig(upkeepId *big.Int) ([]byte, error) { - return _IAutomationRegistryMaster.Contract.GetUpkeepTriggerConfig(&_IAutomationRegistryMaster.CallOpts, upkeepId) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Session) GetUpkeepTriggerConfig(upkeepId *big.Int) ([]byte, error) { + return _IAutomationRegistryMaster23.Contract.GetUpkeepTriggerConfig(&_IAutomationRegistryMaster23.CallOpts, upkeepId) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterCallerSession) GetUpkeepTriggerConfig(upkeepId *big.Int) ([]byte, error) { - return _IAutomationRegistryMaster.Contract.GetUpkeepTriggerConfig(&_IAutomationRegistryMaster.CallOpts, upkeepId) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23CallerSession) GetUpkeepTriggerConfig(upkeepId *big.Int) ([]byte, error) { + return _IAutomationRegistryMaster23.Contract.GetUpkeepTriggerConfig(&_IAutomationRegistryMaster23.CallOpts, upkeepId) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterCaller) HasDedupKey(opts *bind.CallOpts, dedupKey [32]byte) (bool, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Caller) HasDedupKey(opts *bind.CallOpts, dedupKey [32]byte) (bool, error) { var out []interface{} - err := _IAutomationRegistryMaster.contract.Call(opts, &out, "hasDedupKey", dedupKey) + err := _IAutomationRegistryMaster23.contract.Call(opts, &out, "hasDedupKey", dedupKey) if err != nil { return *new(bool), err @@ -1022,19 +1275,19 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterCaller) HasDedupKey(o } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterSession) HasDedupKey(dedupKey [32]byte) (bool, error) { - return _IAutomationRegistryMaster.Contract.HasDedupKey(&_IAutomationRegistryMaster.CallOpts, dedupKey) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Session) HasDedupKey(dedupKey [32]byte) (bool, error) { + return _IAutomationRegistryMaster23.Contract.HasDedupKey(&_IAutomationRegistryMaster23.CallOpts, dedupKey) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterCallerSession) HasDedupKey(dedupKey [32]byte) (bool, error) { - return _IAutomationRegistryMaster.Contract.HasDedupKey(&_IAutomationRegistryMaster.CallOpts, dedupKey) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23CallerSession) HasDedupKey(dedupKey [32]byte) (bool, error) { + return _IAutomationRegistryMaster23.Contract.HasDedupKey(&_IAutomationRegistryMaster23.CallOpts, dedupKey) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterCaller) LatestConfigDetails(opts *bind.CallOpts) (LatestConfigDetails, +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Caller) LatestConfigDetails(opts *bind.CallOpts) (LatestConfigDetails, error) { var out []interface{} - err := _IAutomationRegistryMaster.contract.Call(opts, &out, "latestConfigDetails") + err := _IAutomationRegistryMaster23.contract.Call(opts, &out, "latestConfigDetails") outstruct := new(LatestConfigDetails) if err != nil { @@ -1049,23 +1302,23 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterCaller) LatestConfigD } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterSession) LatestConfigDetails() (LatestConfigDetails, +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Session) LatestConfigDetails() (LatestConfigDetails, error) { - return _IAutomationRegistryMaster.Contract.LatestConfigDetails(&_IAutomationRegistryMaster.CallOpts) + return _IAutomationRegistryMaster23.Contract.LatestConfigDetails(&_IAutomationRegistryMaster23.CallOpts) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterCallerSession) LatestConfigDetails() (LatestConfigDetails, +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23CallerSession) LatestConfigDetails() (LatestConfigDetails, error) { - return _IAutomationRegistryMaster.Contract.LatestConfigDetails(&_IAutomationRegistryMaster.CallOpts) + return _IAutomationRegistryMaster23.Contract.LatestConfigDetails(&_IAutomationRegistryMaster23.CallOpts) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterCaller) LatestConfigDigestAndEpoch(opts *bind.CallOpts) (LatestConfigDigestAndEpoch, +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Caller) LatestConfigDigestAndEpoch(opts *bind.CallOpts) (LatestConfigDigestAndEpoch, error) { var out []interface{} - err := _IAutomationRegistryMaster.contract.Call(opts, &out, "latestConfigDigestAndEpoch") + err := _IAutomationRegistryMaster23.contract.Call(opts, &out, "latestConfigDigestAndEpoch") outstruct := new(LatestConfigDigestAndEpoch) if err != nil { @@ -1080,21 +1333,43 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterCaller) LatestConfigD } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterSession) LatestConfigDigestAndEpoch() (LatestConfigDigestAndEpoch, +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Session) LatestConfigDigestAndEpoch() (LatestConfigDigestAndEpoch, error) { - return _IAutomationRegistryMaster.Contract.LatestConfigDigestAndEpoch(&_IAutomationRegistryMaster.CallOpts) + return _IAutomationRegistryMaster23.Contract.LatestConfigDigestAndEpoch(&_IAutomationRegistryMaster23.CallOpts) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterCallerSession) LatestConfigDigestAndEpoch() (LatestConfigDigestAndEpoch, +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23CallerSession) LatestConfigDigestAndEpoch() (LatestConfigDigestAndEpoch, error) { - return _IAutomationRegistryMaster.Contract.LatestConfigDigestAndEpoch(&_IAutomationRegistryMaster.CallOpts) + return _IAutomationRegistryMaster23.Contract.LatestConfigDigestAndEpoch(&_IAutomationRegistryMaster23.CallOpts) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterCaller) Owner(opts *bind.CallOpts) (common.Address, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Caller) LinkAvailableForPayment(opts *bind.CallOpts) (*big.Int, error) { var out []interface{} - err := _IAutomationRegistryMaster.contract.Call(opts, &out, "owner") + err := _IAutomationRegistryMaster23.contract.Call(opts, &out, "linkAvailableForPayment") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Session) LinkAvailableForPayment() (*big.Int, error) { + return _IAutomationRegistryMaster23.Contract.LinkAvailableForPayment(&_IAutomationRegistryMaster23.CallOpts) +} + +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23CallerSession) LinkAvailableForPayment() (*big.Int, error) { + return _IAutomationRegistryMaster23.Contract.LinkAvailableForPayment(&_IAutomationRegistryMaster23.CallOpts) +} + +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Caller) Owner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _IAutomationRegistryMaster23.contract.Call(opts, &out, "owner") if err != nil { return *new(common.Address), err @@ -1106,19 +1381,19 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterCaller) Owner(opts *b } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterSession) Owner() (common.Address, error) { - return _IAutomationRegistryMaster.Contract.Owner(&_IAutomationRegistryMaster.CallOpts) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Session) Owner() (common.Address, error) { + return _IAutomationRegistryMaster23.Contract.Owner(&_IAutomationRegistryMaster23.CallOpts) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterCallerSession) Owner() (common.Address, error) { - return _IAutomationRegistryMaster.Contract.Owner(&_IAutomationRegistryMaster.CallOpts) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23CallerSession) Owner() (common.Address, error) { + return _IAutomationRegistryMaster23.Contract.Owner(&_IAutomationRegistryMaster23.CallOpts) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterCaller) SimulatePerformUpkeep(opts *bind.CallOpts, id *big.Int, performData []byte) (SimulatePerformUpkeep, +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Caller) SimulatePerformUpkeep(opts *bind.CallOpts, id *big.Int, performData []byte) (SimulatePerformUpkeep, error) { var out []interface{} - err := _IAutomationRegistryMaster.contract.Call(opts, &out, "simulatePerformUpkeep", id, performData) + err := _IAutomationRegistryMaster23.contract.Call(opts, &out, "simulatePerformUpkeep", id, performData) outstruct := new(SimulatePerformUpkeep) if err != nil { @@ -1132,65 +1407,65 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterCaller) SimulatePerfo } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterSession) SimulatePerformUpkeep(id *big.Int, performData []byte) (SimulatePerformUpkeep, +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Session) SimulatePerformUpkeep(id *big.Int, performData []byte) (SimulatePerformUpkeep, error) { - return _IAutomationRegistryMaster.Contract.SimulatePerformUpkeep(&_IAutomationRegistryMaster.CallOpts, id, performData) + return _IAutomationRegistryMaster23.Contract.SimulatePerformUpkeep(&_IAutomationRegistryMaster23.CallOpts, id, performData) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterCallerSession) SimulatePerformUpkeep(id *big.Int, performData []byte) (SimulatePerformUpkeep, +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23CallerSession) SimulatePerformUpkeep(id *big.Int, performData []byte) (SimulatePerformUpkeep, error) { - return _IAutomationRegistryMaster.Contract.SimulatePerformUpkeep(&_IAutomationRegistryMaster.CallOpts, id, performData) + return _IAutomationRegistryMaster23.Contract.SimulatePerformUpkeep(&_IAutomationRegistryMaster23.CallOpts, id, performData) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterCaller) TypeAndVersion(opts *bind.CallOpts) (string, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Caller) SupportsBillingToken(opts *bind.CallOpts, token common.Address) (bool, error) { var out []interface{} - err := _IAutomationRegistryMaster.contract.Call(opts, &out, "typeAndVersion") + err := _IAutomationRegistryMaster23.contract.Call(opts, &out, "supportsBillingToken", token) if err != nil { - return *new(string), err + return *new(bool), err } - out0 := *abi.ConvertType(out[0], new(string)).(*string) + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) return out0, err } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterSession) TypeAndVersion() (string, error) { - return _IAutomationRegistryMaster.Contract.TypeAndVersion(&_IAutomationRegistryMaster.CallOpts) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Session) SupportsBillingToken(token common.Address) (bool, error) { + return _IAutomationRegistryMaster23.Contract.SupportsBillingToken(&_IAutomationRegistryMaster23.CallOpts, token) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterCallerSession) TypeAndVersion() (string, error) { - return _IAutomationRegistryMaster.Contract.TypeAndVersion(&_IAutomationRegistryMaster.CallOpts) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23CallerSession) SupportsBillingToken(token common.Address) (bool, error) { + return _IAutomationRegistryMaster23.Contract.SupportsBillingToken(&_IAutomationRegistryMaster23.CallOpts, token) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterCaller) UpkeepTranscoderVersion(opts *bind.CallOpts) (uint8, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Caller) TypeAndVersion(opts *bind.CallOpts) (string, error) { var out []interface{} - err := _IAutomationRegistryMaster.contract.Call(opts, &out, "upkeepTranscoderVersion") + err := _IAutomationRegistryMaster23.contract.Call(opts, &out, "typeAndVersion") if err != nil { - return *new(uint8), err + return *new(string), err } - out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) + out0 := *abi.ConvertType(out[0], new(string)).(*string) return out0, err } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterSession) UpkeepTranscoderVersion() (uint8, error) { - return _IAutomationRegistryMaster.Contract.UpkeepTranscoderVersion(&_IAutomationRegistryMaster.CallOpts) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Session) TypeAndVersion() (string, error) { + return _IAutomationRegistryMaster23.Contract.TypeAndVersion(&_IAutomationRegistryMaster23.CallOpts) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterCallerSession) UpkeepTranscoderVersion() (uint8, error) { - return _IAutomationRegistryMaster.Contract.UpkeepTranscoderVersion(&_IAutomationRegistryMaster.CallOpts) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23CallerSession) TypeAndVersion() (string, error) { + return _IAutomationRegistryMaster23.Contract.TypeAndVersion(&_IAutomationRegistryMaster23.CallOpts) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterCaller) UpkeepVersion(opts *bind.CallOpts) (uint8, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Caller) UpkeepTranscoderVersion(opts *bind.CallOpts) (uint8, error) { var out []interface{} - err := _IAutomationRegistryMaster.contract.Call(opts, &out, "upkeepVersion") + err := _IAutomationRegistryMaster23.contract.Call(opts, &out, "upkeepTranscoderVersion") if err != nil { return *new(uint8), err @@ -1202,424 +1477,434 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterCaller) UpkeepVersion } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterSession) UpkeepVersion() (uint8, error) { - return _IAutomationRegistryMaster.Contract.UpkeepVersion(&_IAutomationRegistryMaster.CallOpts) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Session) UpkeepTranscoderVersion() (uint8, error) { + return _IAutomationRegistryMaster23.Contract.UpkeepTranscoderVersion(&_IAutomationRegistryMaster23.CallOpts) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterCallerSession) UpkeepVersion() (uint8, error) { - return _IAutomationRegistryMaster.Contract.UpkeepVersion(&_IAutomationRegistryMaster.CallOpts) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23CallerSession) UpkeepTranscoderVersion() (uint8, error) { + return _IAutomationRegistryMaster23.Contract.UpkeepTranscoderVersion(&_IAutomationRegistryMaster23.CallOpts) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterTransactor) AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { - return _IAutomationRegistryMaster.contract.Transact(opts, "acceptOwnership") +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Caller) UpkeepVersion(opts *bind.CallOpts) (uint8, error) { + var out []interface{} + err := _IAutomationRegistryMaster23.contract.Call(opts, &out, "upkeepVersion") + + if err != nil { + return *new(uint8), err + } + + out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) + + return out0, err + } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterSession) AcceptOwnership() (*types.Transaction, error) { - return _IAutomationRegistryMaster.Contract.AcceptOwnership(&_IAutomationRegistryMaster.TransactOpts) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Session) UpkeepVersion() (uint8, error) { + return _IAutomationRegistryMaster23.Contract.UpkeepVersion(&_IAutomationRegistryMaster23.CallOpts) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterTransactorSession) AcceptOwnership() (*types.Transaction, error) { - return _IAutomationRegistryMaster.Contract.AcceptOwnership(&_IAutomationRegistryMaster.TransactOpts) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23CallerSession) UpkeepVersion() (uint8, error) { + return _IAutomationRegistryMaster23.Contract.UpkeepVersion(&_IAutomationRegistryMaster23.CallOpts) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterTransactor) AcceptPayeeship(opts *bind.TransactOpts, transmitter common.Address) (*types.Transaction, error) { - return _IAutomationRegistryMaster.contract.Transact(opts, "acceptPayeeship", transmitter) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Transactor) AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.contract.Transact(opts, "acceptOwnership") } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterSession) AcceptPayeeship(transmitter common.Address) (*types.Transaction, error) { - return _IAutomationRegistryMaster.Contract.AcceptPayeeship(&_IAutomationRegistryMaster.TransactOpts, transmitter) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Session) AcceptOwnership() (*types.Transaction, error) { + return _IAutomationRegistryMaster23.Contract.AcceptOwnership(&_IAutomationRegistryMaster23.TransactOpts) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterTransactorSession) AcceptPayeeship(transmitter common.Address) (*types.Transaction, error) { - return _IAutomationRegistryMaster.Contract.AcceptPayeeship(&_IAutomationRegistryMaster.TransactOpts, transmitter) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23TransactorSession) AcceptOwnership() (*types.Transaction, error) { + return _IAutomationRegistryMaster23.Contract.AcceptOwnership(&_IAutomationRegistryMaster23.TransactOpts) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterTransactor) AcceptUpkeepAdmin(opts *bind.TransactOpts, id *big.Int) (*types.Transaction, error) { - return _IAutomationRegistryMaster.contract.Transact(opts, "acceptUpkeepAdmin", id) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Transactor) AcceptPayeeship(opts *bind.TransactOpts, transmitter common.Address) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.contract.Transact(opts, "acceptPayeeship", transmitter) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterSession) AcceptUpkeepAdmin(id *big.Int) (*types.Transaction, error) { - return _IAutomationRegistryMaster.Contract.AcceptUpkeepAdmin(&_IAutomationRegistryMaster.TransactOpts, id) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Session) AcceptPayeeship(transmitter common.Address) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.Contract.AcceptPayeeship(&_IAutomationRegistryMaster23.TransactOpts, transmitter) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterTransactorSession) AcceptUpkeepAdmin(id *big.Int) (*types.Transaction, error) { - return _IAutomationRegistryMaster.Contract.AcceptUpkeepAdmin(&_IAutomationRegistryMaster.TransactOpts, id) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23TransactorSession) AcceptPayeeship(transmitter common.Address) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.Contract.AcceptPayeeship(&_IAutomationRegistryMaster23.TransactOpts, transmitter) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterTransactor) AddFunds(opts *bind.TransactOpts, id *big.Int, amount *big.Int) (*types.Transaction, error) { - return _IAutomationRegistryMaster.contract.Transact(opts, "addFunds", id, amount) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Transactor) AcceptUpkeepAdmin(opts *bind.TransactOpts, id *big.Int) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.contract.Transact(opts, "acceptUpkeepAdmin", id) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterSession) AddFunds(id *big.Int, amount *big.Int) (*types.Transaction, error) { - return _IAutomationRegistryMaster.Contract.AddFunds(&_IAutomationRegistryMaster.TransactOpts, id, amount) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Session) AcceptUpkeepAdmin(id *big.Int) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.Contract.AcceptUpkeepAdmin(&_IAutomationRegistryMaster23.TransactOpts, id) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterTransactorSession) AddFunds(id *big.Int, amount *big.Int) (*types.Transaction, error) { - return _IAutomationRegistryMaster.Contract.AddFunds(&_IAutomationRegistryMaster.TransactOpts, id, amount) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23TransactorSession) AcceptUpkeepAdmin(id *big.Int) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.Contract.AcceptUpkeepAdmin(&_IAutomationRegistryMaster23.TransactOpts, id) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterTransactor) CancelUpkeep(opts *bind.TransactOpts, id *big.Int) (*types.Transaction, error) { - return _IAutomationRegistryMaster.contract.Transact(opts, "cancelUpkeep", id) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Transactor) AddFunds(opts *bind.TransactOpts, id *big.Int, amount *big.Int) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.contract.Transact(opts, "addFunds", id, amount) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterSession) CancelUpkeep(id *big.Int) (*types.Transaction, error) { - return _IAutomationRegistryMaster.Contract.CancelUpkeep(&_IAutomationRegistryMaster.TransactOpts, id) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Session) AddFunds(id *big.Int, amount *big.Int) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.Contract.AddFunds(&_IAutomationRegistryMaster23.TransactOpts, id, amount) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterTransactorSession) CancelUpkeep(id *big.Int) (*types.Transaction, error) { - return _IAutomationRegistryMaster.Contract.CancelUpkeep(&_IAutomationRegistryMaster.TransactOpts, id) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23TransactorSession) AddFunds(id *big.Int, amount *big.Int) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.Contract.AddFunds(&_IAutomationRegistryMaster23.TransactOpts, id, amount) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterTransactor) ExecuteCallback(opts *bind.TransactOpts, id *big.Int, payload []byte) (*types.Transaction, error) { - return _IAutomationRegistryMaster.contract.Transact(opts, "executeCallback", id, payload) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Transactor) CancelUpkeep(opts *bind.TransactOpts, id *big.Int) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.contract.Transact(opts, "cancelUpkeep", id) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterSession) ExecuteCallback(id *big.Int, payload []byte) (*types.Transaction, error) { - return _IAutomationRegistryMaster.Contract.ExecuteCallback(&_IAutomationRegistryMaster.TransactOpts, id, payload) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Session) CancelUpkeep(id *big.Int) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.Contract.CancelUpkeep(&_IAutomationRegistryMaster23.TransactOpts, id) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterTransactorSession) ExecuteCallback(id *big.Int, payload []byte) (*types.Transaction, error) { - return _IAutomationRegistryMaster.Contract.ExecuteCallback(&_IAutomationRegistryMaster.TransactOpts, id, payload) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23TransactorSession) CancelUpkeep(id *big.Int) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.Contract.CancelUpkeep(&_IAutomationRegistryMaster23.TransactOpts, id) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterTransactor) MigrateUpkeeps(opts *bind.TransactOpts, ids []*big.Int, destination common.Address) (*types.Transaction, error) { - return _IAutomationRegistryMaster.contract.Transact(opts, "migrateUpkeeps", ids, destination) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Transactor) ExecuteCallback(opts *bind.TransactOpts, id *big.Int, payload []byte) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.contract.Transact(opts, "executeCallback", id, payload) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterSession) MigrateUpkeeps(ids []*big.Int, destination common.Address) (*types.Transaction, error) { - return _IAutomationRegistryMaster.Contract.MigrateUpkeeps(&_IAutomationRegistryMaster.TransactOpts, ids, destination) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Session) ExecuteCallback(id *big.Int, payload []byte) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.Contract.ExecuteCallback(&_IAutomationRegistryMaster23.TransactOpts, id, payload) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterTransactorSession) MigrateUpkeeps(ids []*big.Int, destination common.Address) (*types.Transaction, error) { - return _IAutomationRegistryMaster.Contract.MigrateUpkeeps(&_IAutomationRegistryMaster.TransactOpts, ids, destination) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23TransactorSession) ExecuteCallback(id *big.Int, payload []byte) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.Contract.ExecuteCallback(&_IAutomationRegistryMaster23.TransactOpts, id, payload) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterTransactor) OnTokenTransfer(opts *bind.TransactOpts, sender common.Address, amount *big.Int, data []byte) (*types.Transaction, error) { - return _IAutomationRegistryMaster.contract.Transact(opts, "onTokenTransfer", sender, amount, data) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Transactor) MigrateUpkeeps(opts *bind.TransactOpts, ids []*big.Int, destination common.Address) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.contract.Transact(opts, "migrateUpkeeps", ids, destination) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterSession) OnTokenTransfer(sender common.Address, amount *big.Int, data []byte) (*types.Transaction, error) { - return _IAutomationRegistryMaster.Contract.OnTokenTransfer(&_IAutomationRegistryMaster.TransactOpts, sender, amount, data) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Session) MigrateUpkeeps(ids []*big.Int, destination common.Address) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.Contract.MigrateUpkeeps(&_IAutomationRegistryMaster23.TransactOpts, ids, destination) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterTransactorSession) OnTokenTransfer(sender common.Address, amount *big.Int, data []byte) (*types.Transaction, error) { - return _IAutomationRegistryMaster.Contract.OnTokenTransfer(&_IAutomationRegistryMaster.TransactOpts, sender, amount, data) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23TransactorSession) MigrateUpkeeps(ids []*big.Int, destination common.Address) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.Contract.MigrateUpkeeps(&_IAutomationRegistryMaster23.TransactOpts, ids, destination) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterTransactor) Pause(opts *bind.TransactOpts) (*types.Transaction, error) { - return _IAutomationRegistryMaster.contract.Transact(opts, "pause") +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Transactor) OnTokenTransfer(opts *bind.TransactOpts, sender common.Address, amount *big.Int, data []byte) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.contract.Transact(opts, "onTokenTransfer", sender, amount, data) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterSession) Pause() (*types.Transaction, error) { - return _IAutomationRegistryMaster.Contract.Pause(&_IAutomationRegistryMaster.TransactOpts) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Session) OnTokenTransfer(sender common.Address, amount *big.Int, data []byte) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.Contract.OnTokenTransfer(&_IAutomationRegistryMaster23.TransactOpts, sender, amount, data) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterTransactorSession) Pause() (*types.Transaction, error) { - return _IAutomationRegistryMaster.Contract.Pause(&_IAutomationRegistryMaster.TransactOpts) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23TransactorSession) OnTokenTransfer(sender common.Address, amount *big.Int, data []byte) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.Contract.OnTokenTransfer(&_IAutomationRegistryMaster23.TransactOpts, sender, amount, data) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterTransactor) PauseUpkeep(opts *bind.TransactOpts, id *big.Int) (*types.Transaction, error) { - return _IAutomationRegistryMaster.contract.Transact(opts, "pauseUpkeep", id) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Transactor) Pause(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.contract.Transact(opts, "pause") } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterSession) PauseUpkeep(id *big.Int) (*types.Transaction, error) { - return _IAutomationRegistryMaster.Contract.PauseUpkeep(&_IAutomationRegistryMaster.TransactOpts, id) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Session) Pause() (*types.Transaction, error) { + return _IAutomationRegistryMaster23.Contract.Pause(&_IAutomationRegistryMaster23.TransactOpts) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterTransactorSession) PauseUpkeep(id *big.Int) (*types.Transaction, error) { - return _IAutomationRegistryMaster.Contract.PauseUpkeep(&_IAutomationRegistryMaster.TransactOpts, id) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23TransactorSession) Pause() (*types.Transaction, error) { + return _IAutomationRegistryMaster23.Contract.Pause(&_IAutomationRegistryMaster23.TransactOpts) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterTransactor) ReceiveUpkeeps(opts *bind.TransactOpts, encodedUpkeeps []byte) (*types.Transaction, error) { - return _IAutomationRegistryMaster.contract.Transact(opts, "receiveUpkeeps", encodedUpkeeps) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Transactor) PauseUpkeep(opts *bind.TransactOpts, id *big.Int) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.contract.Transact(opts, "pauseUpkeep", id) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterSession) ReceiveUpkeeps(encodedUpkeeps []byte) (*types.Transaction, error) { - return _IAutomationRegistryMaster.Contract.ReceiveUpkeeps(&_IAutomationRegistryMaster.TransactOpts, encodedUpkeeps) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Session) PauseUpkeep(id *big.Int) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.Contract.PauseUpkeep(&_IAutomationRegistryMaster23.TransactOpts, id) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterTransactorSession) ReceiveUpkeeps(encodedUpkeeps []byte) (*types.Transaction, error) { - return _IAutomationRegistryMaster.Contract.ReceiveUpkeeps(&_IAutomationRegistryMaster.TransactOpts, encodedUpkeeps) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23TransactorSession) PauseUpkeep(id *big.Int) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.Contract.PauseUpkeep(&_IAutomationRegistryMaster23.TransactOpts, id) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterTransactor) RecoverFunds(opts *bind.TransactOpts) (*types.Transaction, error) { - return _IAutomationRegistryMaster.contract.Transact(opts, "recoverFunds") +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Transactor) ReceiveUpkeeps(opts *bind.TransactOpts, encodedUpkeeps []byte) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.contract.Transact(opts, "receiveUpkeeps", encodedUpkeeps) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterSession) RecoverFunds() (*types.Transaction, error) { - return _IAutomationRegistryMaster.Contract.RecoverFunds(&_IAutomationRegistryMaster.TransactOpts) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Session) ReceiveUpkeeps(encodedUpkeeps []byte) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.Contract.ReceiveUpkeeps(&_IAutomationRegistryMaster23.TransactOpts, encodedUpkeeps) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterTransactorSession) RecoverFunds() (*types.Transaction, error) { - return _IAutomationRegistryMaster.Contract.RecoverFunds(&_IAutomationRegistryMaster.TransactOpts) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23TransactorSession) ReceiveUpkeeps(encodedUpkeeps []byte) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.Contract.ReceiveUpkeeps(&_IAutomationRegistryMaster23.TransactOpts, encodedUpkeeps) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterTransactor) RegisterUpkeep(opts *bind.TransactOpts, target common.Address, gasLimit uint32, admin common.Address, triggerType uint8, checkData []byte, triggerConfig []byte, offchainConfig []byte) (*types.Transaction, error) { - return _IAutomationRegistryMaster.contract.Transact(opts, "registerUpkeep", target, gasLimit, admin, triggerType, checkData, triggerConfig, offchainConfig) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Transactor) RegisterUpkeep(opts *bind.TransactOpts, target common.Address, gasLimit uint32, admin common.Address, triggerType uint8, billingToken common.Address, checkData []byte, triggerConfig []byte, offchainConfig []byte) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.contract.Transact(opts, "registerUpkeep", target, gasLimit, admin, triggerType, billingToken, checkData, triggerConfig, offchainConfig) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterSession) RegisterUpkeep(target common.Address, gasLimit uint32, admin common.Address, triggerType uint8, checkData []byte, triggerConfig []byte, offchainConfig []byte) (*types.Transaction, error) { - return _IAutomationRegistryMaster.Contract.RegisterUpkeep(&_IAutomationRegistryMaster.TransactOpts, target, gasLimit, admin, triggerType, checkData, triggerConfig, offchainConfig) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Session) RegisterUpkeep(target common.Address, gasLimit uint32, admin common.Address, triggerType uint8, billingToken common.Address, checkData []byte, triggerConfig []byte, offchainConfig []byte) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.Contract.RegisterUpkeep(&_IAutomationRegistryMaster23.TransactOpts, target, gasLimit, admin, triggerType, billingToken, checkData, triggerConfig, offchainConfig) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterTransactorSession) RegisterUpkeep(target common.Address, gasLimit uint32, admin common.Address, triggerType uint8, checkData []byte, triggerConfig []byte, offchainConfig []byte) (*types.Transaction, error) { - return _IAutomationRegistryMaster.Contract.RegisterUpkeep(&_IAutomationRegistryMaster.TransactOpts, target, gasLimit, admin, triggerType, checkData, triggerConfig, offchainConfig) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23TransactorSession) RegisterUpkeep(target common.Address, gasLimit uint32, admin common.Address, triggerType uint8, billingToken common.Address, checkData []byte, triggerConfig []byte, offchainConfig []byte) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.Contract.RegisterUpkeep(&_IAutomationRegistryMaster23.TransactOpts, target, gasLimit, admin, triggerType, billingToken, checkData, triggerConfig, offchainConfig) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterTransactor) RegisterUpkeep0(opts *bind.TransactOpts, target common.Address, gasLimit uint32, admin common.Address, checkData []byte, offchainConfig []byte) (*types.Transaction, error) { - return _IAutomationRegistryMaster.contract.Transact(opts, "registerUpkeep0", target, gasLimit, admin, checkData, offchainConfig) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Transactor) SetAdminPrivilegeConfig(opts *bind.TransactOpts, admin common.Address, newPrivilegeConfig []byte) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.contract.Transact(opts, "setAdminPrivilegeConfig", admin, newPrivilegeConfig) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterSession) RegisterUpkeep0(target common.Address, gasLimit uint32, admin common.Address, checkData []byte, offchainConfig []byte) (*types.Transaction, error) { - return _IAutomationRegistryMaster.Contract.RegisterUpkeep0(&_IAutomationRegistryMaster.TransactOpts, target, gasLimit, admin, checkData, offchainConfig) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Session) SetAdminPrivilegeConfig(admin common.Address, newPrivilegeConfig []byte) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.Contract.SetAdminPrivilegeConfig(&_IAutomationRegistryMaster23.TransactOpts, admin, newPrivilegeConfig) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterTransactorSession) RegisterUpkeep0(target common.Address, gasLimit uint32, admin common.Address, checkData []byte, offchainConfig []byte) (*types.Transaction, error) { - return _IAutomationRegistryMaster.Contract.RegisterUpkeep0(&_IAutomationRegistryMaster.TransactOpts, target, gasLimit, admin, checkData, offchainConfig) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23TransactorSession) SetAdminPrivilegeConfig(admin common.Address, newPrivilegeConfig []byte) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.Contract.SetAdminPrivilegeConfig(&_IAutomationRegistryMaster23.TransactOpts, admin, newPrivilegeConfig) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterTransactor) SetAdminPrivilegeConfig(opts *bind.TransactOpts, admin common.Address, newPrivilegeConfig []byte) (*types.Transaction, error) { - return _IAutomationRegistryMaster.contract.Transact(opts, "setAdminPrivilegeConfig", admin, newPrivilegeConfig) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Transactor) SetConfig(opts *bind.TransactOpts, signers []common.Address, transmitters []common.Address, f uint8, onchainConfigBytes []byte, offchainConfigVersion uint64, offchainConfig []byte) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.contract.Transact(opts, "setConfig", signers, transmitters, f, onchainConfigBytes, offchainConfigVersion, offchainConfig) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterSession) SetAdminPrivilegeConfig(admin common.Address, newPrivilegeConfig []byte) (*types.Transaction, error) { - return _IAutomationRegistryMaster.Contract.SetAdminPrivilegeConfig(&_IAutomationRegistryMaster.TransactOpts, admin, newPrivilegeConfig) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Session) SetConfig(signers []common.Address, transmitters []common.Address, f uint8, onchainConfigBytes []byte, offchainConfigVersion uint64, offchainConfig []byte) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.Contract.SetConfig(&_IAutomationRegistryMaster23.TransactOpts, signers, transmitters, f, onchainConfigBytes, offchainConfigVersion, offchainConfig) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterTransactorSession) SetAdminPrivilegeConfig(admin common.Address, newPrivilegeConfig []byte) (*types.Transaction, error) { - return _IAutomationRegistryMaster.Contract.SetAdminPrivilegeConfig(&_IAutomationRegistryMaster.TransactOpts, admin, newPrivilegeConfig) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23TransactorSession) SetConfig(signers []common.Address, transmitters []common.Address, f uint8, onchainConfigBytes []byte, offchainConfigVersion uint64, offchainConfig []byte) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.Contract.SetConfig(&_IAutomationRegistryMaster23.TransactOpts, signers, transmitters, f, onchainConfigBytes, offchainConfigVersion, offchainConfig) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterTransactor) SetConfig(opts *bind.TransactOpts, signers []common.Address, transmitters []common.Address, f uint8, onchainConfigBytes []byte, offchainConfigVersion uint64, offchainConfig []byte) (*types.Transaction, error) { - return _IAutomationRegistryMaster.contract.Transact(opts, "setConfig", signers, transmitters, f, onchainConfigBytes, offchainConfigVersion, offchainConfig) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Transactor) SetConfigTypeSafe(opts *bind.TransactOpts, signers []common.Address, transmitters []common.Address, f uint8, onchainConfig AutomationRegistryBase23OnchainConfig, offchainConfigVersion uint64, offchainConfig []byte, billingTokens []common.Address, billingConfigs []AutomationRegistryBase23BillingConfig) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.contract.Transact(opts, "setConfigTypeSafe", signers, transmitters, f, onchainConfig, offchainConfigVersion, offchainConfig, billingTokens, billingConfigs) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterSession) SetConfig(signers []common.Address, transmitters []common.Address, f uint8, onchainConfigBytes []byte, offchainConfigVersion uint64, offchainConfig []byte) (*types.Transaction, error) { - return _IAutomationRegistryMaster.Contract.SetConfig(&_IAutomationRegistryMaster.TransactOpts, signers, transmitters, f, onchainConfigBytes, offchainConfigVersion, offchainConfig) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Session) SetConfigTypeSafe(signers []common.Address, transmitters []common.Address, f uint8, onchainConfig AutomationRegistryBase23OnchainConfig, offchainConfigVersion uint64, offchainConfig []byte, billingTokens []common.Address, billingConfigs []AutomationRegistryBase23BillingConfig) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.Contract.SetConfigTypeSafe(&_IAutomationRegistryMaster23.TransactOpts, signers, transmitters, f, onchainConfig, offchainConfigVersion, offchainConfig, billingTokens, billingConfigs) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterTransactorSession) SetConfig(signers []common.Address, transmitters []common.Address, f uint8, onchainConfigBytes []byte, offchainConfigVersion uint64, offchainConfig []byte) (*types.Transaction, error) { - return _IAutomationRegistryMaster.Contract.SetConfig(&_IAutomationRegistryMaster.TransactOpts, signers, transmitters, f, onchainConfigBytes, offchainConfigVersion, offchainConfig) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23TransactorSession) SetConfigTypeSafe(signers []common.Address, transmitters []common.Address, f uint8, onchainConfig AutomationRegistryBase23OnchainConfig, offchainConfigVersion uint64, offchainConfig []byte, billingTokens []common.Address, billingConfigs []AutomationRegistryBase23BillingConfig) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.Contract.SetConfigTypeSafe(&_IAutomationRegistryMaster23.TransactOpts, signers, transmitters, f, onchainConfig, offchainConfigVersion, offchainConfig, billingTokens, billingConfigs) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterTransactor) SetConfigTypeSafe(opts *bind.TransactOpts, signers []common.Address, transmitters []common.Address, f uint8, onchainConfig AutomationRegistryBase23OnchainConfig, offchainConfigVersion uint64, offchainConfig []byte) (*types.Transaction, error) { - return _IAutomationRegistryMaster.contract.Transact(opts, "setConfigTypeSafe", signers, transmitters, f, onchainConfig, offchainConfigVersion, offchainConfig) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Transactor) SetPayees(opts *bind.TransactOpts, payees []common.Address) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.contract.Transact(opts, "setPayees", payees) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterSession) SetConfigTypeSafe(signers []common.Address, transmitters []common.Address, f uint8, onchainConfig AutomationRegistryBase23OnchainConfig, offchainConfigVersion uint64, offchainConfig []byte) (*types.Transaction, error) { - return _IAutomationRegistryMaster.Contract.SetConfigTypeSafe(&_IAutomationRegistryMaster.TransactOpts, signers, transmitters, f, onchainConfig, offchainConfigVersion, offchainConfig) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Session) SetPayees(payees []common.Address) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.Contract.SetPayees(&_IAutomationRegistryMaster23.TransactOpts, payees) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterTransactorSession) SetConfigTypeSafe(signers []common.Address, transmitters []common.Address, f uint8, onchainConfig AutomationRegistryBase23OnchainConfig, offchainConfigVersion uint64, offchainConfig []byte) (*types.Transaction, error) { - return _IAutomationRegistryMaster.Contract.SetConfigTypeSafe(&_IAutomationRegistryMaster.TransactOpts, signers, transmitters, f, onchainConfig, offchainConfigVersion, offchainConfig) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23TransactorSession) SetPayees(payees []common.Address) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.Contract.SetPayees(&_IAutomationRegistryMaster23.TransactOpts, payees) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterTransactor) SetPayees(opts *bind.TransactOpts, payees []common.Address) (*types.Transaction, error) { - return _IAutomationRegistryMaster.contract.Transact(opts, "setPayees", payees) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Transactor) SetPeerRegistryMigrationPermission(opts *bind.TransactOpts, peer common.Address, permission uint8) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.contract.Transact(opts, "setPeerRegistryMigrationPermission", peer, permission) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterSession) SetPayees(payees []common.Address) (*types.Transaction, error) { - return _IAutomationRegistryMaster.Contract.SetPayees(&_IAutomationRegistryMaster.TransactOpts, payees) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Session) SetPeerRegistryMigrationPermission(peer common.Address, permission uint8) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.Contract.SetPeerRegistryMigrationPermission(&_IAutomationRegistryMaster23.TransactOpts, peer, permission) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterTransactorSession) SetPayees(payees []common.Address) (*types.Transaction, error) { - return _IAutomationRegistryMaster.Contract.SetPayees(&_IAutomationRegistryMaster.TransactOpts, payees) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23TransactorSession) SetPeerRegistryMigrationPermission(peer common.Address, permission uint8) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.Contract.SetPeerRegistryMigrationPermission(&_IAutomationRegistryMaster23.TransactOpts, peer, permission) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterTransactor) SetPeerRegistryMigrationPermission(opts *bind.TransactOpts, peer common.Address, permission uint8) (*types.Transaction, error) { - return _IAutomationRegistryMaster.contract.Transact(opts, "setPeerRegistryMigrationPermission", peer, permission) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Transactor) SetUpkeepCheckData(opts *bind.TransactOpts, id *big.Int, newCheckData []byte) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.contract.Transact(opts, "setUpkeepCheckData", id, newCheckData) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterSession) SetPeerRegistryMigrationPermission(peer common.Address, permission uint8) (*types.Transaction, error) { - return _IAutomationRegistryMaster.Contract.SetPeerRegistryMigrationPermission(&_IAutomationRegistryMaster.TransactOpts, peer, permission) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Session) SetUpkeepCheckData(id *big.Int, newCheckData []byte) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.Contract.SetUpkeepCheckData(&_IAutomationRegistryMaster23.TransactOpts, id, newCheckData) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterTransactorSession) SetPeerRegistryMigrationPermission(peer common.Address, permission uint8) (*types.Transaction, error) { - return _IAutomationRegistryMaster.Contract.SetPeerRegistryMigrationPermission(&_IAutomationRegistryMaster.TransactOpts, peer, permission) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23TransactorSession) SetUpkeepCheckData(id *big.Int, newCheckData []byte) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.Contract.SetUpkeepCheckData(&_IAutomationRegistryMaster23.TransactOpts, id, newCheckData) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterTransactor) SetUpkeepCheckData(opts *bind.TransactOpts, id *big.Int, newCheckData []byte) (*types.Transaction, error) { - return _IAutomationRegistryMaster.contract.Transact(opts, "setUpkeepCheckData", id, newCheckData) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Transactor) SetUpkeepGasLimit(opts *bind.TransactOpts, id *big.Int, gasLimit uint32) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.contract.Transact(opts, "setUpkeepGasLimit", id, gasLimit) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterSession) SetUpkeepCheckData(id *big.Int, newCheckData []byte) (*types.Transaction, error) { - return _IAutomationRegistryMaster.Contract.SetUpkeepCheckData(&_IAutomationRegistryMaster.TransactOpts, id, newCheckData) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Session) SetUpkeepGasLimit(id *big.Int, gasLimit uint32) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.Contract.SetUpkeepGasLimit(&_IAutomationRegistryMaster23.TransactOpts, id, gasLimit) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterTransactorSession) SetUpkeepCheckData(id *big.Int, newCheckData []byte) (*types.Transaction, error) { - return _IAutomationRegistryMaster.Contract.SetUpkeepCheckData(&_IAutomationRegistryMaster.TransactOpts, id, newCheckData) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23TransactorSession) SetUpkeepGasLimit(id *big.Int, gasLimit uint32) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.Contract.SetUpkeepGasLimit(&_IAutomationRegistryMaster23.TransactOpts, id, gasLimit) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterTransactor) SetUpkeepGasLimit(opts *bind.TransactOpts, id *big.Int, gasLimit uint32) (*types.Transaction, error) { - return _IAutomationRegistryMaster.contract.Transact(opts, "setUpkeepGasLimit", id, gasLimit) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Transactor) SetUpkeepOffchainConfig(opts *bind.TransactOpts, id *big.Int, config []byte) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.contract.Transact(opts, "setUpkeepOffchainConfig", id, config) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterSession) SetUpkeepGasLimit(id *big.Int, gasLimit uint32) (*types.Transaction, error) { - return _IAutomationRegistryMaster.Contract.SetUpkeepGasLimit(&_IAutomationRegistryMaster.TransactOpts, id, gasLimit) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Session) SetUpkeepOffchainConfig(id *big.Int, config []byte) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.Contract.SetUpkeepOffchainConfig(&_IAutomationRegistryMaster23.TransactOpts, id, config) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterTransactorSession) SetUpkeepGasLimit(id *big.Int, gasLimit uint32) (*types.Transaction, error) { - return _IAutomationRegistryMaster.Contract.SetUpkeepGasLimit(&_IAutomationRegistryMaster.TransactOpts, id, gasLimit) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23TransactorSession) SetUpkeepOffchainConfig(id *big.Int, config []byte) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.Contract.SetUpkeepOffchainConfig(&_IAutomationRegistryMaster23.TransactOpts, id, config) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterTransactor) SetUpkeepOffchainConfig(opts *bind.TransactOpts, id *big.Int, config []byte) (*types.Transaction, error) { - return _IAutomationRegistryMaster.contract.Transact(opts, "setUpkeepOffchainConfig", id, config) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Transactor) SetUpkeepPrivilegeConfig(opts *bind.TransactOpts, upkeepId *big.Int, newPrivilegeConfig []byte) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.contract.Transact(opts, "setUpkeepPrivilegeConfig", upkeepId, newPrivilegeConfig) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterSession) SetUpkeepOffchainConfig(id *big.Int, config []byte) (*types.Transaction, error) { - return _IAutomationRegistryMaster.Contract.SetUpkeepOffchainConfig(&_IAutomationRegistryMaster.TransactOpts, id, config) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Session) SetUpkeepPrivilegeConfig(upkeepId *big.Int, newPrivilegeConfig []byte) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.Contract.SetUpkeepPrivilegeConfig(&_IAutomationRegistryMaster23.TransactOpts, upkeepId, newPrivilegeConfig) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterTransactorSession) SetUpkeepOffchainConfig(id *big.Int, config []byte) (*types.Transaction, error) { - return _IAutomationRegistryMaster.Contract.SetUpkeepOffchainConfig(&_IAutomationRegistryMaster.TransactOpts, id, config) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23TransactorSession) SetUpkeepPrivilegeConfig(upkeepId *big.Int, newPrivilegeConfig []byte) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.Contract.SetUpkeepPrivilegeConfig(&_IAutomationRegistryMaster23.TransactOpts, upkeepId, newPrivilegeConfig) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterTransactor) SetUpkeepPrivilegeConfig(opts *bind.TransactOpts, upkeepId *big.Int, newPrivilegeConfig []byte) (*types.Transaction, error) { - return _IAutomationRegistryMaster.contract.Transact(opts, "setUpkeepPrivilegeConfig", upkeepId, newPrivilegeConfig) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Transactor) SetUpkeepTriggerConfig(opts *bind.TransactOpts, id *big.Int, triggerConfig []byte) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.contract.Transact(opts, "setUpkeepTriggerConfig", id, triggerConfig) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterSession) SetUpkeepPrivilegeConfig(upkeepId *big.Int, newPrivilegeConfig []byte) (*types.Transaction, error) { - return _IAutomationRegistryMaster.Contract.SetUpkeepPrivilegeConfig(&_IAutomationRegistryMaster.TransactOpts, upkeepId, newPrivilegeConfig) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Session) SetUpkeepTriggerConfig(id *big.Int, triggerConfig []byte) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.Contract.SetUpkeepTriggerConfig(&_IAutomationRegistryMaster23.TransactOpts, id, triggerConfig) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterTransactorSession) SetUpkeepPrivilegeConfig(upkeepId *big.Int, newPrivilegeConfig []byte) (*types.Transaction, error) { - return _IAutomationRegistryMaster.Contract.SetUpkeepPrivilegeConfig(&_IAutomationRegistryMaster.TransactOpts, upkeepId, newPrivilegeConfig) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23TransactorSession) SetUpkeepTriggerConfig(id *big.Int, triggerConfig []byte) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.Contract.SetUpkeepTriggerConfig(&_IAutomationRegistryMaster23.TransactOpts, id, triggerConfig) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterTransactor) SetUpkeepTriggerConfig(opts *bind.TransactOpts, id *big.Int, triggerConfig []byte) (*types.Transaction, error) { - return _IAutomationRegistryMaster.contract.Transact(opts, "setUpkeepTriggerConfig", id, triggerConfig) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Transactor) TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.contract.Transact(opts, "transferOwnership", to) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterSession) SetUpkeepTriggerConfig(id *big.Int, triggerConfig []byte) (*types.Transaction, error) { - return _IAutomationRegistryMaster.Contract.SetUpkeepTriggerConfig(&_IAutomationRegistryMaster.TransactOpts, id, triggerConfig) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Session) TransferOwnership(to common.Address) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.Contract.TransferOwnership(&_IAutomationRegistryMaster23.TransactOpts, to) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterTransactorSession) SetUpkeepTriggerConfig(id *big.Int, triggerConfig []byte) (*types.Transaction, error) { - return _IAutomationRegistryMaster.Contract.SetUpkeepTriggerConfig(&_IAutomationRegistryMaster.TransactOpts, id, triggerConfig) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23TransactorSession) TransferOwnership(to common.Address) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.Contract.TransferOwnership(&_IAutomationRegistryMaster23.TransactOpts, to) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterTransactor) TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) { - return _IAutomationRegistryMaster.contract.Transact(opts, "transferOwnership", to) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Transactor) TransferPayeeship(opts *bind.TransactOpts, transmitter common.Address, proposed common.Address) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.contract.Transact(opts, "transferPayeeship", transmitter, proposed) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterSession) TransferOwnership(to common.Address) (*types.Transaction, error) { - return _IAutomationRegistryMaster.Contract.TransferOwnership(&_IAutomationRegistryMaster.TransactOpts, to) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Session) TransferPayeeship(transmitter common.Address, proposed common.Address) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.Contract.TransferPayeeship(&_IAutomationRegistryMaster23.TransactOpts, transmitter, proposed) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterTransactorSession) TransferOwnership(to common.Address) (*types.Transaction, error) { - return _IAutomationRegistryMaster.Contract.TransferOwnership(&_IAutomationRegistryMaster.TransactOpts, to) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23TransactorSession) TransferPayeeship(transmitter common.Address, proposed common.Address) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.Contract.TransferPayeeship(&_IAutomationRegistryMaster23.TransactOpts, transmitter, proposed) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterTransactor) TransferPayeeship(opts *bind.TransactOpts, transmitter common.Address, proposed common.Address) (*types.Transaction, error) { - return _IAutomationRegistryMaster.contract.Transact(opts, "transferPayeeship", transmitter, proposed) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Transactor) TransferUpkeepAdmin(opts *bind.TransactOpts, id *big.Int, proposed common.Address) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.contract.Transact(opts, "transferUpkeepAdmin", id, proposed) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterSession) TransferPayeeship(transmitter common.Address, proposed common.Address) (*types.Transaction, error) { - return _IAutomationRegistryMaster.Contract.TransferPayeeship(&_IAutomationRegistryMaster.TransactOpts, transmitter, proposed) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Session) TransferUpkeepAdmin(id *big.Int, proposed common.Address) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.Contract.TransferUpkeepAdmin(&_IAutomationRegistryMaster23.TransactOpts, id, proposed) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterTransactorSession) TransferPayeeship(transmitter common.Address, proposed common.Address) (*types.Transaction, error) { - return _IAutomationRegistryMaster.Contract.TransferPayeeship(&_IAutomationRegistryMaster.TransactOpts, transmitter, proposed) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23TransactorSession) TransferUpkeepAdmin(id *big.Int, proposed common.Address) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.Contract.TransferUpkeepAdmin(&_IAutomationRegistryMaster23.TransactOpts, id, proposed) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterTransactor) TransferUpkeepAdmin(opts *bind.TransactOpts, id *big.Int, proposed common.Address) (*types.Transaction, error) { - return _IAutomationRegistryMaster.contract.Transact(opts, "transferUpkeepAdmin", id, proposed) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Transactor) Transmit(opts *bind.TransactOpts, reportContext [3][32]byte, rawReport []byte, rs [][32]byte, ss [][32]byte, rawVs [32]byte) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.contract.Transact(opts, "transmit", reportContext, rawReport, rs, ss, rawVs) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterSession) TransferUpkeepAdmin(id *big.Int, proposed common.Address) (*types.Transaction, error) { - return _IAutomationRegistryMaster.Contract.TransferUpkeepAdmin(&_IAutomationRegistryMaster.TransactOpts, id, proposed) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Session) Transmit(reportContext [3][32]byte, rawReport []byte, rs [][32]byte, ss [][32]byte, rawVs [32]byte) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.Contract.Transmit(&_IAutomationRegistryMaster23.TransactOpts, reportContext, rawReport, rs, ss, rawVs) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterTransactorSession) TransferUpkeepAdmin(id *big.Int, proposed common.Address) (*types.Transaction, error) { - return _IAutomationRegistryMaster.Contract.TransferUpkeepAdmin(&_IAutomationRegistryMaster.TransactOpts, id, proposed) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23TransactorSession) Transmit(reportContext [3][32]byte, rawReport []byte, rs [][32]byte, ss [][32]byte, rawVs [32]byte) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.Contract.Transmit(&_IAutomationRegistryMaster23.TransactOpts, reportContext, rawReport, rs, ss, rawVs) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterTransactor) Transmit(opts *bind.TransactOpts, reportContext [3][32]byte, rawReport []byte, rs [][32]byte, ss [][32]byte, rawVs [32]byte) (*types.Transaction, error) { - return _IAutomationRegistryMaster.contract.Transact(opts, "transmit", reportContext, rawReport, rs, ss, rawVs) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Transactor) Unpause(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.contract.Transact(opts, "unpause") } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterSession) Transmit(reportContext [3][32]byte, rawReport []byte, rs [][32]byte, ss [][32]byte, rawVs [32]byte) (*types.Transaction, error) { - return _IAutomationRegistryMaster.Contract.Transmit(&_IAutomationRegistryMaster.TransactOpts, reportContext, rawReport, rs, ss, rawVs) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Session) Unpause() (*types.Transaction, error) { + return _IAutomationRegistryMaster23.Contract.Unpause(&_IAutomationRegistryMaster23.TransactOpts) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterTransactorSession) Transmit(reportContext [3][32]byte, rawReport []byte, rs [][32]byte, ss [][32]byte, rawVs [32]byte) (*types.Transaction, error) { - return _IAutomationRegistryMaster.Contract.Transmit(&_IAutomationRegistryMaster.TransactOpts, reportContext, rawReport, rs, ss, rawVs) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23TransactorSession) Unpause() (*types.Transaction, error) { + return _IAutomationRegistryMaster23.Contract.Unpause(&_IAutomationRegistryMaster23.TransactOpts) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterTransactor) Unpause(opts *bind.TransactOpts) (*types.Transaction, error) { - return _IAutomationRegistryMaster.contract.Transact(opts, "unpause") +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Transactor) UnpauseUpkeep(opts *bind.TransactOpts, id *big.Int) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.contract.Transact(opts, "unpauseUpkeep", id) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterSession) Unpause() (*types.Transaction, error) { - return _IAutomationRegistryMaster.Contract.Unpause(&_IAutomationRegistryMaster.TransactOpts) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Session) UnpauseUpkeep(id *big.Int) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.Contract.UnpauseUpkeep(&_IAutomationRegistryMaster23.TransactOpts, id) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterTransactorSession) Unpause() (*types.Transaction, error) { - return _IAutomationRegistryMaster.Contract.Unpause(&_IAutomationRegistryMaster.TransactOpts) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23TransactorSession) UnpauseUpkeep(id *big.Int) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.Contract.UnpauseUpkeep(&_IAutomationRegistryMaster23.TransactOpts, id) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterTransactor) UnpauseUpkeep(opts *bind.TransactOpts, id *big.Int) (*types.Transaction, error) { - return _IAutomationRegistryMaster.contract.Transact(opts, "unpauseUpkeep", id) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Transactor) WithdrawERC20Fees(opts *bind.TransactOpts, assetAddress common.Address, to common.Address, amount *big.Int) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.contract.Transact(opts, "withdrawERC20Fees", assetAddress, to, amount) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterSession) UnpauseUpkeep(id *big.Int) (*types.Transaction, error) { - return _IAutomationRegistryMaster.Contract.UnpauseUpkeep(&_IAutomationRegistryMaster.TransactOpts, id) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Session) WithdrawERC20Fees(assetAddress common.Address, to common.Address, amount *big.Int) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.Contract.WithdrawERC20Fees(&_IAutomationRegistryMaster23.TransactOpts, assetAddress, to, amount) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterTransactorSession) UnpauseUpkeep(id *big.Int) (*types.Transaction, error) { - return _IAutomationRegistryMaster.Contract.UnpauseUpkeep(&_IAutomationRegistryMaster.TransactOpts, id) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23TransactorSession) WithdrawERC20Fees(assetAddress common.Address, to common.Address, amount *big.Int) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.Contract.WithdrawERC20Fees(&_IAutomationRegistryMaster23.TransactOpts, assetAddress, to, amount) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterTransactor) WithdrawFunds(opts *bind.TransactOpts, id *big.Int, to common.Address) (*types.Transaction, error) { - return _IAutomationRegistryMaster.contract.Transact(opts, "withdrawFunds", id, to) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Transactor) WithdrawFunds(opts *bind.TransactOpts, id *big.Int, to common.Address) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.contract.Transact(opts, "withdrawFunds", id, to) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterSession) WithdrawFunds(id *big.Int, to common.Address) (*types.Transaction, error) { - return _IAutomationRegistryMaster.Contract.WithdrawFunds(&_IAutomationRegistryMaster.TransactOpts, id, to) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Session) WithdrawFunds(id *big.Int, to common.Address) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.Contract.WithdrawFunds(&_IAutomationRegistryMaster23.TransactOpts, id, to) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterTransactorSession) WithdrawFunds(id *big.Int, to common.Address) (*types.Transaction, error) { - return _IAutomationRegistryMaster.Contract.WithdrawFunds(&_IAutomationRegistryMaster.TransactOpts, id, to) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23TransactorSession) WithdrawFunds(id *big.Int, to common.Address) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.Contract.WithdrawFunds(&_IAutomationRegistryMaster23.TransactOpts, id, to) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterTransactor) WithdrawOwnerFunds(opts *bind.TransactOpts) (*types.Transaction, error) { - return _IAutomationRegistryMaster.contract.Transact(opts, "withdrawOwnerFunds") +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Transactor) WithdrawLinkFees(opts *bind.TransactOpts, to common.Address, amount *big.Int) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.contract.Transact(opts, "withdrawLinkFees", to, amount) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterSession) WithdrawOwnerFunds() (*types.Transaction, error) { - return _IAutomationRegistryMaster.Contract.WithdrawOwnerFunds(&_IAutomationRegistryMaster.TransactOpts) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Session) WithdrawLinkFees(to common.Address, amount *big.Int) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.Contract.WithdrawLinkFees(&_IAutomationRegistryMaster23.TransactOpts, to, amount) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterTransactorSession) WithdrawOwnerFunds() (*types.Transaction, error) { - return _IAutomationRegistryMaster.Contract.WithdrawOwnerFunds(&_IAutomationRegistryMaster.TransactOpts) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23TransactorSession) WithdrawLinkFees(to common.Address, amount *big.Int) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.Contract.WithdrawLinkFees(&_IAutomationRegistryMaster23.TransactOpts, to, amount) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterTransactor) WithdrawPayment(opts *bind.TransactOpts, from common.Address, to common.Address) (*types.Transaction, error) { - return _IAutomationRegistryMaster.contract.Transact(opts, "withdrawPayment", from, to) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Transactor) WithdrawPayment(opts *bind.TransactOpts, from common.Address, to common.Address) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.contract.Transact(opts, "withdrawPayment", from, to) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterSession) WithdrawPayment(from common.Address, to common.Address) (*types.Transaction, error) { - return _IAutomationRegistryMaster.Contract.WithdrawPayment(&_IAutomationRegistryMaster.TransactOpts, from, to) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Session) WithdrawPayment(from common.Address, to common.Address) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.Contract.WithdrawPayment(&_IAutomationRegistryMaster23.TransactOpts, from, to) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterTransactorSession) WithdrawPayment(from common.Address, to common.Address) (*types.Transaction, error) { - return _IAutomationRegistryMaster.Contract.WithdrawPayment(&_IAutomationRegistryMaster.TransactOpts, from, to) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23TransactorSession) WithdrawPayment(from common.Address, to common.Address) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.Contract.WithdrawPayment(&_IAutomationRegistryMaster23.TransactOpts, from, to) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterTransactor) Fallback(opts *bind.TransactOpts, calldata []byte) (*types.Transaction, error) { - return _IAutomationRegistryMaster.contract.RawTransact(opts, calldata) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Transactor) Fallback(opts *bind.TransactOpts, calldata []byte) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.contract.RawTransact(opts, calldata) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterSession) Fallback(calldata []byte) (*types.Transaction, error) { - return _IAutomationRegistryMaster.Contract.Fallback(&_IAutomationRegistryMaster.TransactOpts, calldata) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Session) Fallback(calldata []byte) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.Contract.Fallback(&_IAutomationRegistryMaster23.TransactOpts, calldata) } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterTransactorSession) Fallback(calldata []byte) (*types.Transaction, error) { - return _IAutomationRegistryMaster.Contract.Fallback(&_IAutomationRegistryMaster.TransactOpts, calldata) +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23TransactorSession) Fallback(calldata []byte) (*types.Transaction, error) { + return _IAutomationRegistryMaster23.Contract.Fallback(&_IAutomationRegistryMaster23.TransactOpts, calldata) } -type IAutomationRegistryMasterAdminPrivilegeConfigSetIterator struct { - Event *IAutomationRegistryMasterAdminPrivilegeConfigSet +type IAutomationRegistryMaster23AdminPrivilegeConfigSetIterator struct { + Event *IAutomationRegistryMaster23AdminPrivilegeConfigSet contract *bind.BoundContract event string @@ -1630,7 +1915,7 @@ type IAutomationRegistryMasterAdminPrivilegeConfigSetIterator struct { fail error } -func (it *IAutomationRegistryMasterAdminPrivilegeConfigSetIterator) Next() bool { +func (it *IAutomationRegistryMaster23AdminPrivilegeConfigSetIterator) Next() bool { if it.fail != nil { return false @@ -1639,7 +1924,7 @@ func (it *IAutomationRegistryMasterAdminPrivilegeConfigSetIterator) Next() bool if it.done { select { case log := <-it.logs: - it.Event = new(IAutomationRegistryMasterAdminPrivilegeConfigSet) + it.Event = new(IAutomationRegistryMaster23AdminPrivilegeConfigSet) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1654,7 +1939,7 @@ func (it *IAutomationRegistryMasterAdminPrivilegeConfigSetIterator) Next() bool select { case log := <-it.logs: - it.Event = new(IAutomationRegistryMasterAdminPrivilegeConfigSet) + it.Event = new(IAutomationRegistryMaster23AdminPrivilegeConfigSet) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1669,43 +1954,43 @@ func (it *IAutomationRegistryMasterAdminPrivilegeConfigSetIterator) Next() bool } } -func (it *IAutomationRegistryMasterAdminPrivilegeConfigSetIterator) Error() error { +func (it *IAutomationRegistryMaster23AdminPrivilegeConfigSetIterator) Error() error { return it.fail } -func (it *IAutomationRegistryMasterAdminPrivilegeConfigSetIterator) Close() error { +func (it *IAutomationRegistryMaster23AdminPrivilegeConfigSetIterator) Close() error { it.sub.Unsubscribe() return nil } -type IAutomationRegistryMasterAdminPrivilegeConfigSet struct { +type IAutomationRegistryMaster23AdminPrivilegeConfigSet struct { Admin common.Address PrivilegeConfig []byte Raw types.Log } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) FilterAdminPrivilegeConfigSet(opts *bind.FilterOpts, admin []common.Address) (*IAutomationRegistryMasterAdminPrivilegeConfigSetIterator, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) FilterAdminPrivilegeConfigSet(opts *bind.FilterOpts, admin []common.Address) (*IAutomationRegistryMaster23AdminPrivilegeConfigSetIterator, error) { var adminRule []interface{} for _, adminItem := range admin { adminRule = append(adminRule, adminItem) } - logs, sub, err := _IAutomationRegistryMaster.contract.FilterLogs(opts, "AdminPrivilegeConfigSet", adminRule) + logs, sub, err := _IAutomationRegistryMaster23.contract.FilterLogs(opts, "AdminPrivilegeConfigSet", adminRule) if err != nil { return nil, err } - return &IAutomationRegistryMasterAdminPrivilegeConfigSetIterator{contract: _IAutomationRegistryMaster.contract, event: "AdminPrivilegeConfigSet", logs: logs, sub: sub}, nil + return &IAutomationRegistryMaster23AdminPrivilegeConfigSetIterator{contract: _IAutomationRegistryMaster23.contract, event: "AdminPrivilegeConfigSet", logs: logs, sub: sub}, nil } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchAdminPrivilegeConfigSet(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMasterAdminPrivilegeConfigSet, admin []common.Address) (event.Subscription, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) WatchAdminPrivilegeConfigSet(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMaster23AdminPrivilegeConfigSet, admin []common.Address) (event.Subscription, error) { var adminRule []interface{} for _, adminItem := range admin { adminRule = append(adminRule, adminItem) } - logs, sub, err := _IAutomationRegistryMaster.contract.WatchLogs(opts, "AdminPrivilegeConfigSet", adminRule) + logs, sub, err := _IAutomationRegistryMaster23.contract.WatchLogs(opts, "AdminPrivilegeConfigSet", adminRule) if err != nil { return nil, err } @@ -1715,8 +2000,8 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchAdminP select { case log := <-logs: - event := new(IAutomationRegistryMasterAdminPrivilegeConfigSet) - if err := _IAutomationRegistryMaster.contract.UnpackLog(event, "AdminPrivilegeConfigSet", log); err != nil { + event := new(IAutomationRegistryMaster23AdminPrivilegeConfigSet) + if err := _IAutomationRegistryMaster23.contract.UnpackLog(event, "AdminPrivilegeConfigSet", log); err != nil { return err } event.Raw = log @@ -1737,17 +2022,17 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchAdminP }), nil } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) ParseAdminPrivilegeConfigSet(log types.Log) (*IAutomationRegistryMasterAdminPrivilegeConfigSet, error) { - event := new(IAutomationRegistryMasterAdminPrivilegeConfigSet) - if err := _IAutomationRegistryMaster.contract.UnpackLog(event, "AdminPrivilegeConfigSet", log); err != nil { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) ParseAdminPrivilegeConfigSet(log types.Log) (*IAutomationRegistryMaster23AdminPrivilegeConfigSet, error) { + event := new(IAutomationRegistryMaster23AdminPrivilegeConfigSet) + if err := _IAutomationRegistryMaster23.contract.UnpackLog(event, "AdminPrivilegeConfigSet", log); err != nil { return nil, err } event.Raw = log return event, nil } -type IAutomationRegistryMasterCancelledUpkeepReportIterator struct { - Event *IAutomationRegistryMasterCancelledUpkeepReport +type IAutomationRegistryMaster23BillingConfigSetIterator struct { + Event *IAutomationRegistryMaster23BillingConfigSet contract *bind.BoundContract event string @@ -1758,7 +2043,7 @@ type IAutomationRegistryMasterCancelledUpkeepReportIterator struct { fail error } -func (it *IAutomationRegistryMasterCancelledUpkeepReportIterator) Next() bool { +func (it *IAutomationRegistryMaster23BillingConfigSetIterator) Next() bool { if it.fail != nil { return false @@ -1767,7 +2052,7 @@ func (it *IAutomationRegistryMasterCancelledUpkeepReportIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(IAutomationRegistryMasterCancelledUpkeepReport) + it.Event = new(IAutomationRegistryMaster23BillingConfigSet) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1782,7 +2067,7 @@ func (it *IAutomationRegistryMasterCancelledUpkeepReportIterator) Next() bool { select { case log := <-it.logs: - it.Event = new(IAutomationRegistryMasterCancelledUpkeepReport) + it.Event = new(IAutomationRegistryMaster23BillingConfigSet) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1797,43 +2082,171 @@ func (it *IAutomationRegistryMasterCancelledUpkeepReportIterator) Next() bool { } } -func (it *IAutomationRegistryMasterCancelledUpkeepReportIterator) Error() error { +func (it *IAutomationRegistryMaster23BillingConfigSetIterator) Error() error { return it.fail } -func (it *IAutomationRegistryMasterCancelledUpkeepReportIterator) Close() error { +func (it *IAutomationRegistryMaster23BillingConfigSetIterator) Close() error { it.sub.Unsubscribe() return nil } -type IAutomationRegistryMasterCancelledUpkeepReport struct { +type IAutomationRegistryMaster23BillingConfigSet struct { + Token common.Address + Config AutomationRegistryBase23BillingConfig + Raw types.Log +} + +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) FilterBillingConfigSet(opts *bind.FilterOpts, token []common.Address) (*IAutomationRegistryMaster23BillingConfigSetIterator, error) { + + var tokenRule []interface{} + for _, tokenItem := range token { + tokenRule = append(tokenRule, tokenItem) + } + + logs, sub, err := _IAutomationRegistryMaster23.contract.FilterLogs(opts, "BillingConfigSet", tokenRule) + if err != nil { + return nil, err + } + return &IAutomationRegistryMaster23BillingConfigSetIterator{contract: _IAutomationRegistryMaster23.contract, event: "BillingConfigSet", logs: logs, sub: sub}, nil +} + +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) WatchBillingConfigSet(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMaster23BillingConfigSet, token []common.Address) (event.Subscription, error) { + + var tokenRule []interface{} + for _, tokenItem := range token { + tokenRule = append(tokenRule, tokenItem) + } + + logs, sub, err := _IAutomationRegistryMaster23.contract.WatchLogs(opts, "BillingConfigSet", tokenRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(IAutomationRegistryMaster23BillingConfigSet) + if err := _IAutomationRegistryMaster23.contract.UnpackLog(event, "BillingConfigSet", 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 (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) ParseBillingConfigSet(log types.Log) (*IAutomationRegistryMaster23BillingConfigSet, error) { + event := new(IAutomationRegistryMaster23BillingConfigSet) + if err := _IAutomationRegistryMaster23.contract.UnpackLog(event, "BillingConfigSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type IAutomationRegistryMaster23CancelledUpkeepReportIterator struct { + Event *IAutomationRegistryMaster23CancelledUpkeepReport + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *IAutomationRegistryMaster23CancelledUpkeepReportIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(IAutomationRegistryMaster23CancelledUpkeepReport) + 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(IAutomationRegistryMaster23CancelledUpkeepReport) + 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 *IAutomationRegistryMaster23CancelledUpkeepReportIterator) Error() error { + return it.fail +} + +func (it *IAutomationRegistryMaster23CancelledUpkeepReportIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type IAutomationRegistryMaster23CancelledUpkeepReport struct { Id *big.Int Trigger []byte Raw types.Log } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) FilterCancelledUpkeepReport(opts *bind.FilterOpts, id []*big.Int) (*IAutomationRegistryMasterCancelledUpkeepReportIterator, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) FilterCancelledUpkeepReport(opts *bind.FilterOpts, id []*big.Int) (*IAutomationRegistryMaster23CancelledUpkeepReportIterator, error) { var idRule []interface{} for _, idItem := range id { idRule = append(idRule, idItem) } - logs, sub, err := _IAutomationRegistryMaster.contract.FilterLogs(opts, "CancelledUpkeepReport", idRule) + logs, sub, err := _IAutomationRegistryMaster23.contract.FilterLogs(opts, "CancelledUpkeepReport", idRule) if err != nil { return nil, err } - return &IAutomationRegistryMasterCancelledUpkeepReportIterator{contract: _IAutomationRegistryMaster.contract, event: "CancelledUpkeepReport", logs: logs, sub: sub}, nil + return &IAutomationRegistryMaster23CancelledUpkeepReportIterator{contract: _IAutomationRegistryMaster23.contract, event: "CancelledUpkeepReport", logs: logs, sub: sub}, nil } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchCancelledUpkeepReport(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMasterCancelledUpkeepReport, id []*big.Int) (event.Subscription, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) WatchCancelledUpkeepReport(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMaster23CancelledUpkeepReport, id []*big.Int) (event.Subscription, error) { var idRule []interface{} for _, idItem := range id { idRule = append(idRule, idItem) } - logs, sub, err := _IAutomationRegistryMaster.contract.WatchLogs(opts, "CancelledUpkeepReport", idRule) + logs, sub, err := _IAutomationRegistryMaster23.contract.WatchLogs(opts, "CancelledUpkeepReport", idRule) if err != nil { return nil, err } @@ -1843,8 +2256,8 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchCancel select { case log := <-logs: - event := new(IAutomationRegistryMasterCancelledUpkeepReport) - if err := _IAutomationRegistryMaster.contract.UnpackLog(event, "CancelledUpkeepReport", log); err != nil { + event := new(IAutomationRegistryMaster23CancelledUpkeepReport) + if err := _IAutomationRegistryMaster23.contract.UnpackLog(event, "CancelledUpkeepReport", log); err != nil { return err } event.Raw = log @@ -1865,17 +2278,17 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchCancel }), nil } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) ParseCancelledUpkeepReport(log types.Log) (*IAutomationRegistryMasterCancelledUpkeepReport, error) { - event := new(IAutomationRegistryMasterCancelledUpkeepReport) - if err := _IAutomationRegistryMaster.contract.UnpackLog(event, "CancelledUpkeepReport", log); err != nil { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) ParseCancelledUpkeepReport(log types.Log) (*IAutomationRegistryMaster23CancelledUpkeepReport, error) { + event := new(IAutomationRegistryMaster23CancelledUpkeepReport) + if err := _IAutomationRegistryMaster23.contract.UnpackLog(event, "CancelledUpkeepReport", log); err != nil { return nil, err } event.Raw = log return event, nil } -type IAutomationRegistryMasterChainSpecificModuleUpdatedIterator struct { - Event *IAutomationRegistryMasterChainSpecificModuleUpdated +type IAutomationRegistryMaster23ChainSpecificModuleUpdatedIterator struct { + Event *IAutomationRegistryMaster23ChainSpecificModuleUpdated contract *bind.BoundContract event string @@ -1886,7 +2299,7 @@ type IAutomationRegistryMasterChainSpecificModuleUpdatedIterator struct { fail error } -func (it *IAutomationRegistryMasterChainSpecificModuleUpdatedIterator) Next() bool { +func (it *IAutomationRegistryMaster23ChainSpecificModuleUpdatedIterator) Next() bool { if it.fail != nil { return false @@ -1895,7 +2308,7 @@ func (it *IAutomationRegistryMasterChainSpecificModuleUpdatedIterator) Next() bo if it.done { select { case log := <-it.logs: - it.Event = new(IAutomationRegistryMasterChainSpecificModuleUpdated) + it.Event = new(IAutomationRegistryMaster23ChainSpecificModuleUpdated) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1910,7 +2323,7 @@ func (it *IAutomationRegistryMasterChainSpecificModuleUpdatedIterator) Next() bo select { case log := <-it.logs: - it.Event = new(IAutomationRegistryMasterChainSpecificModuleUpdated) + it.Event = new(IAutomationRegistryMaster23ChainSpecificModuleUpdated) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1925,32 +2338,32 @@ func (it *IAutomationRegistryMasterChainSpecificModuleUpdatedIterator) Next() bo } } -func (it *IAutomationRegistryMasterChainSpecificModuleUpdatedIterator) Error() error { +func (it *IAutomationRegistryMaster23ChainSpecificModuleUpdatedIterator) Error() error { return it.fail } -func (it *IAutomationRegistryMasterChainSpecificModuleUpdatedIterator) Close() error { +func (it *IAutomationRegistryMaster23ChainSpecificModuleUpdatedIterator) Close() error { it.sub.Unsubscribe() return nil } -type IAutomationRegistryMasterChainSpecificModuleUpdated struct { +type IAutomationRegistryMaster23ChainSpecificModuleUpdated struct { NewModule common.Address Raw types.Log } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) FilterChainSpecificModuleUpdated(opts *bind.FilterOpts) (*IAutomationRegistryMasterChainSpecificModuleUpdatedIterator, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) FilterChainSpecificModuleUpdated(opts *bind.FilterOpts) (*IAutomationRegistryMaster23ChainSpecificModuleUpdatedIterator, error) { - logs, sub, err := _IAutomationRegistryMaster.contract.FilterLogs(opts, "ChainSpecificModuleUpdated") + logs, sub, err := _IAutomationRegistryMaster23.contract.FilterLogs(opts, "ChainSpecificModuleUpdated") if err != nil { return nil, err } - return &IAutomationRegistryMasterChainSpecificModuleUpdatedIterator{contract: _IAutomationRegistryMaster.contract, event: "ChainSpecificModuleUpdated", logs: logs, sub: sub}, nil + return &IAutomationRegistryMaster23ChainSpecificModuleUpdatedIterator{contract: _IAutomationRegistryMaster23.contract, event: "ChainSpecificModuleUpdated", logs: logs, sub: sub}, nil } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchChainSpecificModuleUpdated(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMasterChainSpecificModuleUpdated) (event.Subscription, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) WatchChainSpecificModuleUpdated(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMaster23ChainSpecificModuleUpdated) (event.Subscription, error) { - logs, sub, err := _IAutomationRegistryMaster.contract.WatchLogs(opts, "ChainSpecificModuleUpdated") + logs, sub, err := _IAutomationRegistryMaster23.contract.WatchLogs(opts, "ChainSpecificModuleUpdated") if err != nil { return nil, err } @@ -1960,8 +2373,8 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchChainS select { case log := <-logs: - event := new(IAutomationRegistryMasterChainSpecificModuleUpdated) - if err := _IAutomationRegistryMaster.contract.UnpackLog(event, "ChainSpecificModuleUpdated", log); err != nil { + event := new(IAutomationRegistryMaster23ChainSpecificModuleUpdated) + if err := _IAutomationRegistryMaster23.contract.UnpackLog(event, "ChainSpecificModuleUpdated", log); err != nil { return err } event.Raw = log @@ -1982,17 +2395,17 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchChainS }), nil } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) ParseChainSpecificModuleUpdated(log types.Log) (*IAutomationRegistryMasterChainSpecificModuleUpdated, error) { - event := new(IAutomationRegistryMasterChainSpecificModuleUpdated) - if err := _IAutomationRegistryMaster.contract.UnpackLog(event, "ChainSpecificModuleUpdated", log); err != nil { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) ParseChainSpecificModuleUpdated(log types.Log) (*IAutomationRegistryMaster23ChainSpecificModuleUpdated, error) { + event := new(IAutomationRegistryMaster23ChainSpecificModuleUpdated) + if err := _IAutomationRegistryMaster23.contract.UnpackLog(event, "ChainSpecificModuleUpdated", log); err != nil { return nil, err } event.Raw = log return event, nil } -type IAutomationRegistryMasterConfigSetIterator struct { - Event *IAutomationRegistryMasterConfigSet +type IAutomationRegistryMaster23ConfigSetIterator struct { + Event *IAutomationRegistryMaster23ConfigSet contract *bind.BoundContract event string @@ -2003,7 +2416,7 @@ type IAutomationRegistryMasterConfigSetIterator struct { fail error } -func (it *IAutomationRegistryMasterConfigSetIterator) Next() bool { +func (it *IAutomationRegistryMaster23ConfigSetIterator) Next() bool { if it.fail != nil { return false @@ -2012,7 +2425,7 @@ func (it *IAutomationRegistryMasterConfigSetIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(IAutomationRegistryMasterConfigSet) + it.Event = new(IAutomationRegistryMaster23ConfigSet) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -2027,7 +2440,7 @@ func (it *IAutomationRegistryMasterConfigSetIterator) Next() bool { select { case log := <-it.logs: - it.Event = new(IAutomationRegistryMasterConfigSet) + it.Event = new(IAutomationRegistryMaster23ConfigSet) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -2042,16 +2455,16 @@ func (it *IAutomationRegistryMasterConfigSetIterator) Next() bool { } } -func (it *IAutomationRegistryMasterConfigSetIterator) Error() error { +func (it *IAutomationRegistryMaster23ConfigSetIterator) Error() error { return it.fail } -func (it *IAutomationRegistryMasterConfigSetIterator) Close() error { +func (it *IAutomationRegistryMaster23ConfigSetIterator) Close() error { it.sub.Unsubscribe() return nil } -type IAutomationRegistryMasterConfigSet struct { +type IAutomationRegistryMaster23ConfigSet struct { PreviousConfigBlockNumber uint32 ConfigDigest [32]byte ConfigCount uint64 @@ -2064,18 +2477,18 @@ type IAutomationRegistryMasterConfigSet struct { Raw types.Log } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) FilterConfigSet(opts *bind.FilterOpts) (*IAutomationRegistryMasterConfigSetIterator, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) FilterConfigSet(opts *bind.FilterOpts) (*IAutomationRegistryMaster23ConfigSetIterator, error) { - logs, sub, err := _IAutomationRegistryMaster.contract.FilterLogs(opts, "ConfigSet") + logs, sub, err := _IAutomationRegistryMaster23.contract.FilterLogs(opts, "ConfigSet") if err != nil { return nil, err } - return &IAutomationRegistryMasterConfigSetIterator{contract: _IAutomationRegistryMaster.contract, event: "ConfigSet", logs: logs, sub: sub}, nil + return &IAutomationRegistryMaster23ConfigSetIterator{contract: _IAutomationRegistryMaster23.contract, event: "ConfigSet", logs: logs, sub: sub}, nil } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchConfigSet(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMasterConfigSet) (event.Subscription, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) WatchConfigSet(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMaster23ConfigSet) (event.Subscription, error) { - logs, sub, err := _IAutomationRegistryMaster.contract.WatchLogs(opts, "ConfigSet") + logs, sub, err := _IAutomationRegistryMaster23.contract.WatchLogs(opts, "ConfigSet") if err != nil { return nil, err } @@ -2085,8 +2498,8 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchConfig select { case log := <-logs: - event := new(IAutomationRegistryMasterConfigSet) - if err := _IAutomationRegistryMaster.contract.UnpackLog(event, "ConfigSet", log); err != nil { + event := new(IAutomationRegistryMaster23ConfigSet) + if err := _IAutomationRegistryMaster23.contract.UnpackLog(event, "ConfigSet", log); err != nil { return err } event.Raw = log @@ -2107,17 +2520,17 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchConfig }), nil } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) ParseConfigSet(log types.Log) (*IAutomationRegistryMasterConfigSet, error) { - event := new(IAutomationRegistryMasterConfigSet) - if err := _IAutomationRegistryMaster.contract.UnpackLog(event, "ConfigSet", log); err != nil { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) ParseConfigSet(log types.Log) (*IAutomationRegistryMaster23ConfigSet, error) { + event := new(IAutomationRegistryMaster23ConfigSet) + if err := _IAutomationRegistryMaster23.contract.UnpackLog(event, "ConfigSet", log); err != nil { return nil, err } event.Raw = log return event, nil } -type IAutomationRegistryMasterDedupKeyAddedIterator struct { - Event *IAutomationRegistryMasterDedupKeyAdded +type IAutomationRegistryMaster23DedupKeyAddedIterator struct { + Event *IAutomationRegistryMaster23DedupKeyAdded contract *bind.BoundContract event string @@ -2128,7 +2541,7 @@ type IAutomationRegistryMasterDedupKeyAddedIterator struct { fail error } -func (it *IAutomationRegistryMasterDedupKeyAddedIterator) Next() bool { +func (it *IAutomationRegistryMaster23DedupKeyAddedIterator) Next() bool { if it.fail != nil { return false @@ -2137,7 +2550,7 @@ func (it *IAutomationRegistryMasterDedupKeyAddedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(IAutomationRegistryMasterDedupKeyAdded) + it.Event = new(IAutomationRegistryMaster23DedupKeyAdded) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -2152,7 +2565,7 @@ func (it *IAutomationRegistryMasterDedupKeyAddedIterator) Next() bool { select { case log := <-it.logs: - it.Event = new(IAutomationRegistryMasterDedupKeyAdded) + it.Event = new(IAutomationRegistryMaster23DedupKeyAdded) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -2167,42 +2580,42 @@ func (it *IAutomationRegistryMasterDedupKeyAddedIterator) Next() bool { } } -func (it *IAutomationRegistryMasterDedupKeyAddedIterator) Error() error { +func (it *IAutomationRegistryMaster23DedupKeyAddedIterator) Error() error { return it.fail } -func (it *IAutomationRegistryMasterDedupKeyAddedIterator) Close() error { +func (it *IAutomationRegistryMaster23DedupKeyAddedIterator) Close() error { it.sub.Unsubscribe() return nil } -type IAutomationRegistryMasterDedupKeyAdded struct { +type IAutomationRegistryMaster23DedupKeyAdded struct { DedupKey [32]byte Raw types.Log } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) FilterDedupKeyAdded(opts *bind.FilterOpts, dedupKey [][32]byte) (*IAutomationRegistryMasterDedupKeyAddedIterator, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) FilterDedupKeyAdded(opts *bind.FilterOpts, dedupKey [][32]byte) (*IAutomationRegistryMaster23DedupKeyAddedIterator, error) { var dedupKeyRule []interface{} for _, dedupKeyItem := range dedupKey { dedupKeyRule = append(dedupKeyRule, dedupKeyItem) } - logs, sub, err := _IAutomationRegistryMaster.contract.FilterLogs(opts, "DedupKeyAdded", dedupKeyRule) + logs, sub, err := _IAutomationRegistryMaster23.contract.FilterLogs(opts, "DedupKeyAdded", dedupKeyRule) if err != nil { return nil, err } - return &IAutomationRegistryMasterDedupKeyAddedIterator{contract: _IAutomationRegistryMaster.contract, event: "DedupKeyAdded", logs: logs, sub: sub}, nil + return &IAutomationRegistryMaster23DedupKeyAddedIterator{contract: _IAutomationRegistryMaster23.contract, event: "DedupKeyAdded", logs: logs, sub: sub}, nil } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchDedupKeyAdded(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMasterDedupKeyAdded, dedupKey [][32]byte) (event.Subscription, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) WatchDedupKeyAdded(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMaster23DedupKeyAdded, dedupKey [][32]byte) (event.Subscription, error) { var dedupKeyRule []interface{} for _, dedupKeyItem := range dedupKey { dedupKeyRule = append(dedupKeyRule, dedupKeyItem) } - logs, sub, err := _IAutomationRegistryMaster.contract.WatchLogs(opts, "DedupKeyAdded", dedupKeyRule) + logs, sub, err := _IAutomationRegistryMaster23.contract.WatchLogs(opts, "DedupKeyAdded", dedupKeyRule) if err != nil { return nil, err } @@ -2212,8 +2625,8 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchDedupK select { case log := <-logs: - event := new(IAutomationRegistryMasterDedupKeyAdded) - if err := _IAutomationRegistryMaster.contract.UnpackLog(event, "DedupKeyAdded", log); err != nil { + event := new(IAutomationRegistryMaster23DedupKeyAdded) + if err := _IAutomationRegistryMaster23.contract.UnpackLog(event, "DedupKeyAdded", log); err != nil { return err } event.Raw = log @@ -2234,17 +2647,17 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchDedupK }), nil } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) ParseDedupKeyAdded(log types.Log) (*IAutomationRegistryMasterDedupKeyAdded, error) { - event := new(IAutomationRegistryMasterDedupKeyAdded) - if err := _IAutomationRegistryMaster.contract.UnpackLog(event, "DedupKeyAdded", log); err != nil { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) ParseDedupKeyAdded(log types.Log) (*IAutomationRegistryMaster23DedupKeyAdded, error) { + event := new(IAutomationRegistryMaster23DedupKeyAdded) + if err := _IAutomationRegistryMaster23.contract.UnpackLog(event, "DedupKeyAdded", log); err != nil { return nil, err } event.Raw = log return event, nil } -type IAutomationRegistryMasterFundsAddedIterator struct { - Event *IAutomationRegistryMasterFundsAdded +type IAutomationRegistryMaster23FeesWithdrawnIterator struct { + Event *IAutomationRegistryMaster23FeesWithdrawn contract *bind.BoundContract event string @@ -2255,7 +2668,7 @@ type IAutomationRegistryMasterFundsAddedIterator struct { fail error } -func (it *IAutomationRegistryMasterFundsAddedIterator) Next() bool { +func (it *IAutomationRegistryMaster23FeesWithdrawnIterator) Next() bool { if it.fail != nil { return false @@ -2264,7 +2677,7 @@ func (it *IAutomationRegistryMasterFundsAddedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(IAutomationRegistryMasterFundsAdded) + it.Event = new(IAutomationRegistryMaster23FeesWithdrawn) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -2279,7 +2692,7 @@ func (it *IAutomationRegistryMasterFundsAddedIterator) Next() bool { select { case log := <-it.logs: - it.Event = new(IAutomationRegistryMasterFundsAdded) + it.Event = new(IAutomationRegistryMaster23FeesWithdrawn) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -2294,52 +2707,52 @@ func (it *IAutomationRegistryMasterFundsAddedIterator) Next() bool { } } -func (it *IAutomationRegistryMasterFundsAddedIterator) Error() error { +func (it *IAutomationRegistryMaster23FeesWithdrawnIterator) Error() error { return it.fail } -func (it *IAutomationRegistryMasterFundsAddedIterator) Close() error { +func (it *IAutomationRegistryMaster23FeesWithdrawnIterator) Close() error { it.sub.Unsubscribe() return nil } -type IAutomationRegistryMasterFundsAdded struct { - Id *big.Int - From common.Address - Amount *big.Int - Raw types.Log +type IAutomationRegistryMaster23FeesWithdrawn struct { + Recipient common.Address + AssetAddress common.Address + Amount *big.Int + Raw types.Log } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) FilterFundsAdded(opts *bind.FilterOpts, id []*big.Int, from []common.Address) (*IAutomationRegistryMasterFundsAddedIterator, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) FilterFeesWithdrawn(opts *bind.FilterOpts, recipient []common.Address, assetAddress []common.Address) (*IAutomationRegistryMaster23FeesWithdrawnIterator, error) { - var idRule []interface{} - for _, idItem := range id { - idRule = append(idRule, idItem) + var recipientRule []interface{} + for _, recipientItem := range recipient { + recipientRule = append(recipientRule, recipientItem) } - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) + var assetAddressRule []interface{} + for _, assetAddressItem := range assetAddress { + assetAddressRule = append(assetAddressRule, assetAddressItem) } - logs, sub, err := _IAutomationRegistryMaster.contract.FilterLogs(opts, "FundsAdded", idRule, fromRule) + logs, sub, err := _IAutomationRegistryMaster23.contract.FilterLogs(opts, "FeesWithdrawn", recipientRule, assetAddressRule) if err != nil { return nil, err } - return &IAutomationRegistryMasterFundsAddedIterator{contract: _IAutomationRegistryMaster.contract, event: "FundsAdded", logs: logs, sub: sub}, nil + return &IAutomationRegistryMaster23FeesWithdrawnIterator{contract: _IAutomationRegistryMaster23.contract, event: "FeesWithdrawn", logs: logs, sub: sub}, nil } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchFundsAdded(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMasterFundsAdded, id []*big.Int, from []common.Address) (event.Subscription, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) WatchFeesWithdrawn(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMaster23FeesWithdrawn, recipient []common.Address, assetAddress []common.Address) (event.Subscription, error) { - var idRule []interface{} - for _, idItem := range id { - idRule = append(idRule, idItem) + var recipientRule []interface{} + for _, recipientItem := range recipient { + recipientRule = append(recipientRule, recipientItem) } - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) + var assetAddressRule []interface{} + for _, assetAddressItem := range assetAddress { + assetAddressRule = append(assetAddressRule, assetAddressItem) } - logs, sub, err := _IAutomationRegistryMaster.contract.WatchLogs(opts, "FundsAdded", idRule, fromRule) + logs, sub, err := _IAutomationRegistryMaster23.contract.WatchLogs(opts, "FeesWithdrawn", recipientRule, assetAddressRule) if err != nil { return nil, err } @@ -2349,8 +2762,8 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchFundsA select { case log := <-logs: - event := new(IAutomationRegistryMasterFundsAdded) - if err := _IAutomationRegistryMaster.contract.UnpackLog(event, "FundsAdded", log); err != nil { + event := new(IAutomationRegistryMaster23FeesWithdrawn) + if err := _IAutomationRegistryMaster23.contract.UnpackLog(event, "FeesWithdrawn", log); err != nil { return err } event.Raw = log @@ -2371,17 +2784,17 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchFundsA }), nil } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) ParseFundsAdded(log types.Log) (*IAutomationRegistryMasterFundsAdded, error) { - event := new(IAutomationRegistryMasterFundsAdded) - if err := _IAutomationRegistryMaster.contract.UnpackLog(event, "FundsAdded", log); err != nil { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) ParseFeesWithdrawn(log types.Log) (*IAutomationRegistryMaster23FeesWithdrawn, error) { + event := new(IAutomationRegistryMaster23FeesWithdrawn) + if err := _IAutomationRegistryMaster23.contract.UnpackLog(event, "FeesWithdrawn", log); err != nil { return nil, err } event.Raw = log return event, nil } -type IAutomationRegistryMasterFundsWithdrawnIterator struct { - Event *IAutomationRegistryMasterFundsWithdrawn +type IAutomationRegistryMaster23FundsAddedIterator struct { + Event *IAutomationRegistryMaster23FundsAdded contract *bind.BoundContract event string @@ -2392,7 +2805,7 @@ type IAutomationRegistryMasterFundsWithdrawnIterator struct { fail error } -func (it *IAutomationRegistryMasterFundsWithdrawnIterator) Next() bool { +func (it *IAutomationRegistryMaster23FundsAddedIterator) Next() bool { if it.fail != nil { return false @@ -2401,7 +2814,7 @@ func (it *IAutomationRegistryMasterFundsWithdrawnIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(IAutomationRegistryMasterFundsWithdrawn) + it.Event = new(IAutomationRegistryMaster23FundsAdded) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -2416,7 +2829,7 @@ func (it *IAutomationRegistryMasterFundsWithdrawnIterator) Next() bool { select { case log := <-it.logs: - it.Event = new(IAutomationRegistryMasterFundsWithdrawn) + it.Event = new(IAutomationRegistryMaster23FundsAdded) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -2431,44 +2844,52 @@ func (it *IAutomationRegistryMasterFundsWithdrawnIterator) Next() bool { } } -func (it *IAutomationRegistryMasterFundsWithdrawnIterator) Error() error { +func (it *IAutomationRegistryMaster23FundsAddedIterator) Error() error { return it.fail } -func (it *IAutomationRegistryMasterFundsWithdrawnIterator) Close() error { +func (it *IAutomationRegistryMaster23FundsAddedIterator) Close() error { it.sub.Unsubscribe() return nil } -type IAutomationRegistryMasterFundsWithdrawn struct { +type IAutomationRegistryMaster23FundsAdded struct { Id *big.Int + From common.Address Amount *big.Int - To common.Address Raw types.Log } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) FilterFundsWithdrawn(opts *bind.FilterOpts, id []*big.Int) (*IAutomationRegistryMasterFundsWithdrawnIterator, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) FilterFundsAdded(opts *bind.FilterOpts, id []*big.Int, from []common.Address) (*IAutomationRegistryMaster23FundsAddedIterator, error) { var idRule []interface{} for _, idItem := range id { idRule = append(idRule, idItem) } + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } - logs, sub, err := _IAutomationRegistryMaster.contract.FilterLogs(opts, "FundsWithdrawn", idRule) + logs, sub, err := _IAutomationRegistryMaster23.contract.FilterLogs(opts, "FundsAdded", idRule, fromRule) if err != nil { return nil, err } - return &IAutomationRegistryMasterFundsWithdrawnIterator{contract: _IAutomationRegistryMaster.contract, event: "FundsWithdrawn", logs: logs, sub: sub}, nil + return &IAutomationRegistryMaster23FundsAddedIterator{contract: _IAutomationRegistryMaster23.contract, event: "FundsAdded", logs: logs, sub: sub}, nil } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchFundsWithdrawn(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMasterFundsWithdrawn, id []*big.Int) (event.Subscription, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) WatchFundsAdded(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMaster23FundsAdded, id []*big.Int, from []common.Address) (event.Subscription, error) { var idRule []interface{} for _, idItem := range id { idRule = append(idRule, idItem) } + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } - logs, sub, err := _IAutomationRegistryMaster.contract.WatchLogs(opts, "FundsWithdrawn", idRule) + logs, sub, err := _IAutomationRegistryMaster23.contract.WatchLogs(opts, "FundsAdded", idRule, fromRule) if err != nil { return nil, err } @@ -2478,8 +2899,8 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchFundsW select { case log := <-logs: - event := new(IAutomationRegistryMasterFundsWithdrawn) - if err := _IAutomationRegistryMaster.contract.UnpackLog(event, "FundsWithdrawn", log); err != nil { + event := new(IAutomationRegistryMaster23FundsAdded) + if err := _IAutomationRegistryMaster23.contract.UnpackLog(event, "FundsAdded", log); err != nil { return err } event.Raw = log @@ -2500,17 +2921,17 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchFundsW }), nil } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) ParseFundsWithdrawn(log types.Log) (*IAutomationRegistryMasterFundsWithdrawn, error) { - event := new(IAutomationRegistryMasterFundsWithdrawn) - if err := _IAutomationRegistryMaster.contract.UnpackLog(event, "FundsWithdrawn", log); err != nil { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) ParseFundsAdded(log types.Log) (*IAutomationRegistryMaster23FundsAdded, error) { + event := new(IAutomationRegistryMaster23FundsAdded) + if err := _IAutomationRegistryMaster23.contract.UnpackLog(event, "FundsAdded", log); err != nil { return nil, err } event.Raw = log return event, nil } -type IAutomationRegistryMasterInsufficientFundsUpkeepReportIterator struct { - Event *IAutomationRegistryMasterInsufficientFundsUpkeepReport +type IAutomationRegistryMaster23FundsWithdrawnIterator struct { + Event *IAutomationRegistryMaster23FundsWithdrawn contract *bind.BoundContract event string @@ -2521,7 +2942,7 @@ type IAutomationRegistryMasterInsufficientFundsUpkeepReportIterator struct { fail error } -func (it *IAutomationRegistryMasterInsufficientFundsUpkeepReportIterator) Next() bool { +func (it *IAutomationRegistryMaster23FundsWithdrawnIterator) Next() bool { if it.fail != nil { return false @@ -2530,7 +2951,7 @@ func (it *IAutomationRegistryMasterInsufficientFundsUpkeepReportIterator) Next() if it.done { select { case log := <-it.logs: - it.Event = new(IAutomationRegistryMasterInsufficientFundsUpkeepReport) + it.Event = new(IAutomationRegistryMaster23FundsWithdrawn) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -2545,7 +2966,7 @@ func (it *IAutomationRegistryMasterInsufficientFundsUpkeepReportIterator) Next() select { case log := <-it.logs: - it.Event = new(IAutomationRegistryMasterInsufficientFundsUpkeepReport) + it.Event = new(IAutomationRegistryMaster23FundsWithdrawn) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -2560,43 +2981,44 @@ func (it *IAutomationRegistryMasterInsufficientFundsUpkeepReportIterator) Next() } } -func (it *IAutomationRegistryMasterInsufficientFundsUpkeepReportIterator) Error() error { +func (it *IAutomationRegistryMaster23FundsWithdrawnIterator) Error() error { return it.fail } -func (it *IAutomationRegistryMasterInsufficientFundsUpkeepReportIterator) Close() error { +func (it *IAutomationRegistryMaster23FundsWithdrawnIterator) Close() error { it.sub.Unsubscribe() return nil } -type IAutomationRegistryMasterInsufficientFundsUpkeepReport struct { - Id *big.Int - Trigger []byte - Raw types.Log +type IAutomationRegistryMaster23FundsWithdrawn struct { + Id *big.Int + Amount *big.Int + To common.Address + Raw types.Log } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) FilterInsufficientFundsUpkeepReport(opts *bind.FilterOpts, id []*big.Int) (*IAutomationRegistryMasterInsufficientFundsUpkeepReportIterator, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) FilterFundsWithdrawn(opts *bind.FilterOpts, id []*big.Int) (*IAutomationRegistryMaster23FundsWithdrawnIterator, error) { var idRule []interface{} for _, idItem := range id { idRule = append(idRule, idItem) } - logs, sub, err := _IAutomationRegistryMaster.contract.FilterLogs(opts, "InsufficientFundsUpkeepReport", idRule) + logs, sub, err := _IAutomationRegistryMaster23.contract.FilterLogs(opts, "FundsWithdrawn", idRule) if err != nil { return nil, err } - return &IAutomationRegistryMasterInsufficientFundsUpkeepReportIterator{contract: _IAutomationRegistryMaster.contract, event: "InsufficientFundsUpkeepReport", logs: logs, sub: sub}, nil + return &IAutomationRegistryMaster23FundsWithdrawnIterator{contract: _IAutomationRegistryMaster23.contract, event: "FundsWithdrawn", logs: logs, sub: sub}, nil } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchInsufficientFundsUpkeepReport(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMasterInsufficientFundsUpkeepReport, id []*big.Int) (event.Subscription, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) WatchFundsWithdrawn(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMaster23FundsWithdrawn, id []*big.Int) (event.Subscription, error) { var idRule []interface{} for _, idItem := range id { idRule = append(idRule, idItem) } - logs, sub, err := _IAutomationRegistryMaster.contract.WatchLogs(opts, "InsufficientFundsUpkeepReport", idRule) + logs, sub, err := _IAutomationRegistryMaster23.contract.WatchLogs(opts, "FundsWithdrawn", idRule) if err != nil { return nil, err } @@ -2606,8 +3028,8 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchInsuff select { case log := <-logs: - event := new(IAutomationRegistryMasterInsufficientFundsUpkeepReport) - if err := _IAutomationRegistryMaster.contract.UnpackLog(event, "InsufficientFundsUpkeepReport", log); err != nil { + event := new(IAutomationRegistryMaster23FundsWithdrawn) + if err := _IAutomationRegistryMaster23.contract.UnpackLog(event, "FundsWithdrawn", log); err != nil { return err } event.Raw = log @@ -2628,17 +3050,17 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchInsuff }), nil } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) ParseInsufficientFundsUpkeepReport(log types.Log) (*IAutomationRegistryMasterInsufficientFundsUpkeepReport, error) { - event := new(IAutomationRegistryMasterInsufficientFundsUpkeepReport) - if err := _IAutomationRegistryMaster.contract.UnpackLog(event, "InsufficientFundsUpkeepReport", log); err != nil { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) ParseFundsWithdrawn(log types.Log) (*IAutomationRegistryMaster23FundsWithdrawn, error) { + event := new(IAutomationRegistryMaster23FundsWithdrawn) + if err := _IAutomationRegistryMaster23.contract.UnpackLog(event, "FundsWithdrawn", log); err != nil { return nil, err } event.Raw = log return event, nil } -type IAutomationRegistryMasterOwnerFundsWithdrawnIterator struct { - Event *IAutomationRegistryMasterOwnerFundsWithdrawn +type IAutomationRegistryMaster23InsufficientFundsUpkeepReportIterator struct { + Event *IAutomationRegistryMaster23InsufficientFundsUpkeepReport contract *bind.BoundContract event string @@ -2649,7 +3071,7 @@ type IAutomationRegistryMasterOwnerFundsWithdrawnIterator struct { fail error } -func (it *IAutomationRegistryMasterOwnerFundsWithdrawnIterator) Next() bool { +func (it *IAutomationRegistryMaster23InsufficientFundsUpkeepReportIterator) Next() bool { if it.fail != nil { return false @@ -2658,7 +3080,7 @@ func (it *IAutomationRegistryMasterOwnerFundsWithdrawnIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(IAutomationRegistryMasterOwnerFundsWithdrawn) + it.Event = new(IAutomationRegistryMaster23InsufficientFundsUpkeepReport) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -2673,7 +3095,7 @@ func (it *IAutomationRegistryMasterOwnerFundsWithdrawnIterator) Next() bool { select { case log := <-it.logs: - it.Event = new(IAutomationRegistryMasterOwnerFundsWithdrawn) + it.Event = new(IAutomationRegistryMaster23InsufficientFundsUpkeepReport) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -2688,32 +3110,43 @@ func (it *IAutomationRegistryMasterOwnerFundsWithdrawnIterator) Next() bool { } } -func (it *IAutomationRegistryMasterOwnerFundsWithdrawnIterator) Error() error { +func (it *IAutomationRegistryMaster23InsufficientFundsUpkeepReportIterator) Error() error { return it.fail } -func (it *IAutomationRegistryMasterOwnerFundsWithdrawnIterator) Close() error { +func (it *IAutomationRegistryMaster23InsufficientFundsUpkeepReportIterator) Close() error { it.sub.Unsubscribe() return nil } -type IAutomationRegistryMasterOwnerFundsWithdrawn struct { - Amount *big.Int - Raw types.Log +type IAutomationRegistryMaster23InsufficientFundsUpkeepReport struct { + Id *big.Int + Trigger []byte + Raw types.Log } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) FilterOwnerFundsWithdrawn(opts *bind.FilterOpts) (*IAutomationRegistryMasterOwnerFundsWithdrawnIterator, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) FilterInsufficientFundsUpkeepReport(opts *bind.FilterOpts, id []*big.Int) (*IAutomationRegistryMaster23InsufficientFundsUpkeepReportIterator, error) { - logs, sub, err := _IAutomationRegistryMaster.contract.FilterLogs(opts, "OwnerFundsWithdrawn") + var idRule []interface{} + for _, idItem := range id { + idRule = append(idRule, idItem) + } + + logs, sub, err := _IAutomationRegistryMaster23.contract.FilterLogs(opts, "InsufficientFundsUpkeepReport", idRule) if err != nil { return nil, err } - return &IAutomationRegistryMasterOwnerFundsWithdrawnIterator{contract: _IAutomationRegistryMaster.contract, event: "OwnerFundsWithdrawn", logs: logs, sub: sub}, nil + return &IAutomationRegistryMaster23InsufficientFundsUpkeepReportIterator{contract: _IAutomationRegistryMaster23.contract, event: "InsufficientFundsUpkeepReport", logs: logs, sub: sub}, nil } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchOwnerFundsWithdrawn(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMasterOwnerFundsWithdrawn) (event.Subscription, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) WatchInsufficientFundsUpkeepReport(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMaster23InsufficientFundsUpkeepReport, id []*big.Int) (event.Subscription, error) { - logs, sub, err := _IAutomationRegistryMaster.contract.WatchLogs(opts, "OwnerFundsWithdrawn") + var idRule []interface{} + for _, idItem := range id { + idRule = append(idRule, idItem) + } + + logs, sub, err := _IAutomationRegistryMaster23.contract.WatchLogs(opts, "InsufficientFundsUpkeepReport", idRule) if err != nil { return nil, err } @@ -2723,8 +3156,8 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchOwnerF select { case log := <-logs: - event := new(IAutomationRegistryMasterOwnerFundsWithdrawn) - if err := _IAutomationRegistryMaster.contract.UnpackLog(event, "OwnerFundsWithdrawn", log); err != nil { + event := new(IAutomationRegistryMaster23InsufficientFundsUpkeepReport) + if err := _IAutomationRegistryMaster23.contract.UnpackLog(event, "InsufficientFundsUpkeepReport", log); err != nil { return err } event.Raw = log @@ -2745,17 +3178,17 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchOwnerF }), nil } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) ParseOwnerFundsWithdrawn(log types.Log) (*IAutomationRegistryMasterOwnerFundsWithdrawn, error) { - event := new(IAutomationRegistryMasterOwnerFundsWithdrawn) - if err := _IAutomationRegistryMaster.contract.UnpackLog(event, "OwnerFundsWithdrawn", log); err != nil { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) ParseInsufficientFundsUpkeepReport(log types.Log) (*IAutomationRegistryMaster23InsufficientFundsUpkeepReport, error) { + event := new(IAutomationRegistryMaster23InsufficientFundsUpkeepReport) + if err := _IAutomationRegistryMaster23.contract.UnpackLog(event, "InsufficientFundsUpkeepReport", log); err != nil { return nil, err } event.Raw = log return event, nil } -type IAutomationRegistryMasterOwnershipTransferRequestedIterator struct { - Event *IAutomationRegistryMasterOwnershipTransferRequested +type IAutomationRegistryMaster23OwnershipTransferRequestedIterator struct { + Event *IAutomationRegistryMaster23OwnershipTransferRequested contract *bind.BoundContract event string @@ -2766,7 +3199,7 @@ type IAutomationRegistryMasterOwnershipTransferRequestedIterator struct { fail error } -func (it *IAutomationRegistryMasterOwnershipTransferRequestedIterator) Next() bool { +func (it *IAutomationRegistryMaster23OwnershipTransferRequestedIterator) Next() bool { if it.fail != nil { return false @@ -2775,7 +3208,7 @@ func (it *IAutomationRegistryMasterOwnershipTransferRequestedIterator) Next() bo if it.done { select { case log := <-it.logs: - it.Event = new(IAutomationRegistryMasterOwnershipTransferRequested) + it.Event = new(IAutomationRegistryMaster23OwnershipTransferRequested) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -2790,7 +3223,7 @@ func (it *IAutomationRegistryMasterOwnershipTransferRequestedIterator) Next() bo select { case log := <-it.logs: - it.Event = new(IAutomationRegistryMasterOwnershipTransferRequested) + it.Event = new(IAutomationRegistryMaster23OwnershipTransferRequested) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -2805,22 +3238,22 @@ func (it *IAutomationRegistryMasterOwnershipTransferRequestedIterator) Next() bo } } -func (it *IAutomationRegistryMasterOwnershipTransferRequestedIterator) Error() error { +func (it *IAutomationRegistryMaster23OwnershipTransferRequestedIterator) Error() error { return it.fail } -func (it *IAutomationRegistryMasterOwnershipTransferRequestedIterator) Close() error { +func (it *IAutomationRegistryMaster23OwnershipTransferRequestedIterator) Close() error { it.sub.Unsubscribe() return nil } -type IAutomationRegistryMasterOwnershipTransferRequested struct { +type IAutomationRegistryMaster23OwnershipTransferRequested struct { From common.Address To common.Address Raw types.Log } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*IAutomationRegistryMasterOwnershipTransferRequestedIterator, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*IAutomationRegistryMaster23OwnershipTransferRequestedIterator, error) { var fromRule []interface{} for _, fromItem := range from { @@ -2831,14 +3264,14 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) FilterOwner toRule = append(toRule, toItem) } - logs, sub, err := _IAutomationRegistryMaster.contract.FilterLogs(opts, "OwnershipTransferRequested", fromRule, toRule) + logs, sub, err := _IAutomationRegistryMaster23.contract.FilterLogs(opts, "OwnershipTransferRequested", fromRule, toRule) if err != nil { return nil, err } - return &IAutomationRegistryMasterOwnershipTransferRequestedIterator{contract: _IAutomationRegistryMaster.contract, event: "OwnershipTransferRequested", logs: logs, sub: sub}, nil + return &IAutomationRegistryMaster23OwnershipTransferRequestedIterator{contract: _IAutomationRegistryMaster23.contract, event: "OwnershipTransferRequested", logs: logs, sub: sub}, nil } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMasterOwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMaster23OwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) { var fromRule []interface{} for _, fromItem := range from { @@ -2849,7 +3282,7 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchOwners toRule = append(toRule, toItem) } - logs, sub, err := _IAutomationRegistryMaster.contract.WatchLogs(opts, "OwnershipTransferRequested", fromRule, toRule) + logs, sub, err := _IAutomationRegistryMaster23.contract.WatchLogs(opts, "OwnershipTransferRequested", fromRule, toRule) if err != nil { return nil, err } @@ -2859,8 +3292,8 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchOwners select { case log := <-logs: - event := new(IAutomationRegistryMasterOwnershipTransferRequested) - if err := _IAutomationRegistryMaster.contract.UnpackLog(event, "OwnershipTransferRequested", log); err != nil { + event := new(IAutomationRegistryMaster23OwnershipTransferRequested) + if err := _IAutomationRegistryMaster23.contract.UnpackLog(event, "OwnershipTransferRequested", log); err != nil { return err } event.Raw = log @@ -2881,17 +3314,17 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchOwners }), nil } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) ParseOwnershipTransferRequested(log types.Log) (*IAutomationRegistryMasterOwnershipTransferRequested, error) { - event := new(IAutomationRegistryMasterOwnershipTransferRequested) - if err := _IAutomationRegistryMaster.contract.UnpackLog(event, "OwnershipTransferRequested", log); err != nil { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) ParseOwnershipTransferRequested(log types.Log) (*IAutomationRegistryMaster23OwnershipTransferRequested, error) { + event := new(IAutomationRegistryMaster23OwnershipTransferRequested) + if err := _IAutomationRegistryMaster23.contract.UnpackLog(event, "OwnershipTransferRequested", log); err != nil { return nil, err } event.Raw = log return event, nil } -type IAutomationRegistryMasterOwnershipTransferredIterator struct { - Event *IAutomationRegistryMasterOwnershipTransferred +type IAutomationRegistryMaster23OwnershipTransferredIterator struct { + Event *IAutomationRegistryMaster23OwnershipTransferred contract *bind.BoundContract event string @@ -2902,7 +3335,7 @@ type IAutomationRegistryMasterOwnershipTransferredIterator struct { fail error } -func (it *IAutomationRegistryMasterOwnershipTransferredIterator) Next() bool { +func (it *IAutomationRegistryMaster23OwnershipTransferredIterator) Next() bool { if it.fail != nil { return false @@ -2911,7 +3344,7 @@ func (it *IAutomationRegistryMasterOwnershipTransferredIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(IAutomationRegistryMasterOwnershipTransferred) + it.Event = new(IAutomationRegistryMaster23OwnershipTransferred) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -2926,7 +3359,7 @@ func (it *IAutomationRegistryMasterOwnershipTransferredIterator) Next() bool { select { case log := <-it.logs: - it.Event = new(IAutomationRegistryMasterOwnershipTransferred) + it.Event = new(IAutomationRegistryMaster23OwnershipTransferred) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -2941,22 +3374,22 @@ func (it *IAutomationRegistryMasterOwnershipTransferredIterator) Next() bool { } } -func (it *IAutomationRegistryMasterOwnershipTransferredIterator) Error() error { +func (it *IAutomationRegistryMaster23OwnershipTransferredIterator) Error() error { return it.fail } -func (it *IAutomationRegistryMasterOwnershipTransferredIterator) Close() error { +func (it *IAutomationRegistryMaster23OwnershipTransferredIterator) Close() error { it.sub.Unsubscribe() return nil } -type IAutomationRegistryMasterOwnershipTransferred struct { +type IAutomationRegistryMaster23OwnershipTransferred struct { From common.Address To common.Address Raw types.Log } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*IAutomationRegistryMasterOwnershipTransferredIterator, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*IAutomationRegistryMaster23OwnershipTransferredIterator, error) { var fromRule []interface{} for _, fromItem := range from { @@ -2967,14 +3400,14 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) FilterOwner toRule = append(toRule, toItem) } - logs, sub, err := _IAutomationRegistryMaster.contract.FilterLogs(opts, "OwnershipTransferred", fromRule, toRule) + logs, sub, err := _IAutomationRegistryMaster23.contract.FilterLogs(opts, "OwnershipTransferred", fromRule, toRule) if err != nil { return nil, err } - return &IAutomationRegistryMasterOwnershipTransferredIterator{contract: _IAutomationRegistryMaster.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil + return &IAutomationRegistryMaster23OwnershipTransferredIterator{contract: _IAutomationRegistryMaster23.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMasterOwnershipTransferred, from []common.Address, to []common.Address) (event.Subscription, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMaster23OwnershipTransferred, from []common.Address, to []common.Address) (event.Subscription, error) { var fromRule []interface{} for _, fromItem := range from { @@ -2985,7 +3418,7 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchOwners toRule = append(toRule, toItem) } - logs, sub, err := _IAutomationRegistryMaster.contract.WatchLogs(opts, "OwnershipTransferred", fromRule, toRule) + logs, sub, err := _IAutomationRegistryMaster23.contract.WatchLogs(opts, "OwnershipTransferred", fromRule, toRule) if err != nil { return nil, err } @@ -2995,8 +3428,8 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchOwners select { case log := <-logs: - event := new(IAutomationRegistryMasterOwnershipTransferred) - if err := _IAutomationRegistryMaster.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + event := new(IAutomationRegistryMaster23OwnershipTransferred) + if err := _IAutomationRegistryMaster23.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { return err } event.Raw = log @@ -3017,17 +3450,17 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchOwners }), nil } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) ParseOwnershipTransferred(log types.Log) (*IAutomationRegistryMasterOwnershipTransferred, error) { - event := new(IAutomationRegistryMasterOwnershipTransferred) - if err := _IAutomationRegistryMaster.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) ParseOwnershipTransferred(log types.Log) (*IAutomationRegistryMaster23OwnershipTransferred, error) { + event := new(IAutomationRegistryMaster23OwnershipTransferred) + if err := _IAutomationRegistryMaster23.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { return nil, err } event.Raw = log return event, nil } -type IAutomationRegistryMasterPausedIterator struct { - Event *IAutomationRegistryMasterPaused +type IAutomationRegistryMaster23PausedIterator struct { + Event *IAutomationRegistryMaster23Paused contract *bind.BoundContract event string @@ -3038,7 +3471,7 @@ type IAutomationRegistryMasterPausedIterator struct { fail error } -func (it *IAutomationRegistryMasterPausedIterator) Next() bool { +func (it *IAutomationRegistryMaster23PausedIterator) Next() bool { if it.fail != nil { return false @@ -3047,7 +3480,7 @@ func (it *IAutomationRegistryMasterPausedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(IAutomationRegistryMasterPaused) + it.Event = new(IAutomationRegistryMaster23Paused) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -3062,7 +3495,7 @@ func (it *IAutomationRegistryMasterPausedIterator) Next() bool { select { case log := <-it.logs: - it.Event = new(IAutomationRegistryMasterPaused) + it.Event = new(IAutomationRegistryMaster23Paused) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -3077,32 +3510,32 @@ func (it *IAutomationRegistryMasterPausedIterator) Next() bool { } } -func (it *IAutomationRegistryMasterPausedIterator) Error() error { +func (it *IAutomationRegistryMaster23PausedIterator) Error() error { return it.fail } -func (it *IAutomationRegistryMasterPausedIterator) Close() error { +func (it *IAutomationRegistryMaster23PausedIterator) Close() error { it.sub.Unsubscribe() return nil } -type IAutomationRegistryMasterPaused struct { +type IAutomationRegistryMaster23Paused struct { Account common.Address Raw types.Log } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) FilterPaused(opts *bind.FilterOpts) (*IAutomationRegistryMasterPausedIterator, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) FilterPaused(opts *bind.FilterOpts) (*IAutomationRegistryMaster23PausedIterator, error) { - logs, sub, err := _IAutomationRegistryMaster.contract.FilterLogs(opts, "Paused") + logs, sub, err := _IAutomationRegistryMaster23.contract.FilterLogs(opts, "Paused") if err != nil { return nil, err } - return &IAutomationRegistryMasterPausedIterator{contract: _IAutomationRegistryMaster.contract, event: "Paused", logs: logs, sub: sub}, nil + return &IAutomationRegistryMaster23PausedIterator{contract: _IAutomationRegistryMaster23.contract, event: "Paused", logs: logs, sub: sub}, nil } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchPaused(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMasterPaused) (event.Subscription, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) WatchPaused(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMaster23Paused) (event.Subscription, error) { - logs, sub, err := _IAutomationRegistryMaster.contract.WatchLogs(opts, "Paused") + logs, sub, err := _IAutomationRegistryMaster23.contract.WatchLogs(opts, "Paused") if err != nil { return nil, err } @@ -3112,8 +3545,8 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchPaused select { case log := <-logs: - event := new(IAutomationRegistryMasterPaused) - if err := _IAutomationRegistryMaster.contract.UnpackLog(event, "Paused", log); err != nil { + event := new(IAutomationRegistryMaster23Paused) + if err := _IAutomationRegistryMaster23.contract.UnpackLog(event, "Paused", log); err != nil { return err } event.Raw = log @@ -3134,17 +3567,17 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchPaused }), nil } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) ParsePaused(log types.Log) (*IAutomationRegistryMasterPaused, error) { - event := new(IAutomationRegistryMasterPaused) - if err := _IAutomationRegistryMaster.contract.UnpackLog(event, "Paused", log); err != nil { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) ParsePaused(log types.Log) (*IAutomationRegistryMaster23Paused, error) { + event := new(IAutomationRegistryMaster23Paused) + if err := _IAutomationRegistryMaster23.contract.UnpackLog(event, "Paused", log); err != nil { return nil, err } event.Raw = log return event, nil } -type IAutomationRegistryMasterPayeesUpdatedIterator struct { - Event *IAutomationRegistryMasterPayeesUpdated +type IAutomationRegistryMaster23PayeesUpdatedIterator struct { + Event *IAutomationRegistryMaster23PayeesUpdated contract *bind.BoundContract event string @@ -3155,7 +3588,7 @@ type IAutomationRegistryMasterPayeesUpdatedIterator struct { fail error } -func (it *IAutomationRegistryMasterPayeesUpdatedIterator) Next() bool { +func (it *IAutomationRegistryMaster23PayeesUpdatedIterator) Next() bool { if it.fail != nil { return false @@ -3164,7 +3597,7 @@ func (it *IAutomationRegistryMasterPayeesUpdatedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(IAutomationRegistryMasterPayeesUpdated) + it.Event = new(IAutomationRegistryMaster23PayeesUpdated) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -3179,7 +3612,7 @@ func (it *IAutomationRegistryMasterPayeesUpdatedIterator) Next() bool { select { case log := <-it.logs: - it.Event = new(IAutomationRegistryMasterPayeesUpdated) + it.Event = new(IAutomationRegistryMaster23PayeesUpdated) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -3194,33 +3627,33 @@ func (it *IAutomationRegistryMasterPayeesUpdatedIterator) Next() bool { } } -func (it *IAutomationRegistryMasterPayeesUpdatedIterator) Error() error { +func (it *IAutomationRegistryMaster23PayeesUpdatedIterator) Error() error { return it.fail } -func (it *IAutomationRegistryMasterPayeesUpdatedIterator) Close() error { +func (it *IAutomationRegistryMaster23PayeesUpdatedIterator) Close() error { it.sub.Unsubscribe() return nil } -type IAutomationRegistryMasterPayeesUpdated struct { +type IAutomationRegistryMaster23PayeesUpdated struct { Transmitters []common.Address Payees []common.Address Raw types.Log } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) FilterPayeesUpdated(opts *bind.FilterOpts) (*IAutomationRegistryMasterPayeesUpdatedIterator, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) FilterPayeesUpdated(opts *bind.FilterOpts) (*IAutomationRegistryMaster23PayeesUpdatedIterator, error) { - logs, sub, err := _IAutomationRegistryMaster.contract.FilterLogs(opts, "PayeesUpdated") + logs, sub, err := _IAutomationRegistryMaster23.contract.FilterLogs(opts, "PayeesUpdated") if err != nil { return nil, err } - return &IAutomationRegistryMasterPayeesUpdatedIterator{contract: _IAutomationRegistryMaster.contract, event: "PayeesUpdated", logs: logs, sub: sub}, nil + return &IAutomationRegistryMaster23PayeesUpdatedIterator{contract: _IAutomationRegistryMaster23.contract, event: "PayeesUpdated", logs: logs, sub: sub}, nil } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchPayeesUpdated(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMasterPayeesUpdated) (event.Subscription, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) WatchPayeesUpdated(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMaster23PayeesUpdated) (event.Subscription, error) { - logs, sub, err := _IAutomationRegistryMaster.contract.WatchLogs(opts, "PayeesUpdated") + logs, sub, err := _IAutomationRegistryMaster23.contract.WatchLogs(opts, "PayeesUpdated") if err != nil { return nil, err } @@ -3230,8 +3663,8 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchPayees select { case log := <-logs: - event := new(IAutomationRegistryMasterPayeesUpdated) - if err := _IAutomationRegistryMaster.contract.UnpackLog(event, "PayeesUpdated", log); err != nil { + event := new(IAutomationRegistryMaster23PayeesUpdated) + if err := _IAutomationRegistryMaster23.contract.UnpackLog(event, "PayeesUpdated", log); err != nil { return err } event.Raw = log @@ -3252,17 +3685,17 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchPayees }), nil } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) ParsePayeesUpdated(log types.Log) (*IAutomationRegistryMasterPayeesUpdated, error) { - event := new(IAutomationRegistryMasterPayeesUpdated) - if err := _IAutomationRegistryMaster.contract.UnpackLog(event, "PayeesUpdated", log); err != nil { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) ParsePayeesUpdated(log types.Log) (*IAutomationRegistryMaster23PayeesUpdated, error) { + event := new(IAutomationRegistryMaster23PayeesUpdated) + if err := _IAutomationRegistryMaster23.contract.UnpackLog(event, "PayeesUpdated", log); err != nil { return nil, err } event.Raw = log return event, nil } -type IAutomationRegistryMasterPayeeshipTransferRequestedIterator struct { - Event *IAutomationRegistryMasterPayeeshipTransferRequested +type IAutomationRegistryMaster23PayeeshipTransferRequestedIterator struct { + Event *IAutomationRegistryMaster23PayeeshipTransferRequested contract *bind.BoundContract event string @@ -3273,7 +3706,7 @@ type IAutomationRegistryMasterPayeeshipTransferRequestedIterator struct { fail error } -func (it *IAutomationRegistryMasterPayeeshipTransferRequestedIterator) Next() bool { +func (it *IAutomationRegistryMaster23PayeeshipTransferRequestedIterator) Next() bool { if it.fail != nil { return false @@ -3282,7 +3715,7 @@ func (it *IAutomationRegistryMasterPayeeshipTransferRequestedIterator) Next() bo if it.done { select { case log := <-it.logs: - it.Event = new(IAutomationRegistryMasterPayeeshipTransferRequested) + it.Event = new(IAutomationRegistryMaster23PayeeshipTransferRequested) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -3297,7 +3730,7 @@ func (it *IAutomationRegistryMasterPayeeshipTransferRequestedIterator) Next() bo select { case log := <-it.logs: - it.Event = new(IAutomationRegistryMasterPayeeshipTransferRequested) + it.Event = new(IAutomationRegistryMaster23PayeeshipTransferRequested) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -3312,23 +3745,23 @@ func (it *IAutomationRegistryMasterPayeeshipTransferRequestedIterator) Next() bo } } -func (it *IAutomationRegistryMasterPayeeshipTransferRequestedIterator) Error() error { +func (it *IAutomationRegistryMaster23PayeeshipTransferRequestedIterator) Error() error { return it.fail } -func (it *IAutomationRegistryMasterPayeeshipTransferRequestedIterator) Close() error { +func (it *IAutomationRegistryMaster23PayeeshipTransferRequestedIterator) Close() error { it.sub.Unsubscribe() return nil } -type IAutomationRegistryMasterPayeeshipTransferRequested struct { +type IAutomationRegistryMaster23PayeeshipTransferRequested struct { Transmitter common.Address From common.Address To common.Address Raw types.Log } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) FilterPayeeshipTransferRequested(opts *bind.FilterOpts, transmitter []common.Address, from []common.Address, to []common.Address) (*IAutomationRegistryMasterPayeeshipTransferRequestedIterator, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) FilterPayeeshipTransferRequested(opts *bind.FilterOpts, transmitter []common.Address, from []common.Address, to []common.Address) (*IAutomationRegistryMaster23PayeeshipTransferRequestedIterator, error) { var transmitterRule []interface{} for _, transmitterItem := range transmitter { @@ -3343,14 +3776,14 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) FilterPayee toRule = append(toRule, toItem) } - logs, sub, err := _IAutomationRegistryMaster.contract.FilterLogs(opts, "PayeeshipTransferRequested", transmitterRule, fromRule, toRule) + logs, sub, err := _IAutomationRegistryMaster23.contract.FilterLogs(opts, "PayeeshipTransferRequested", transmitterRule, fromRule, toRule) if err != nil { return nil, err } - return &IAutomationRegistryMasterPayeeshipTransferRequestedIterator{contract: _IAutomationRegistryMaster.contract, event: "PayeeshipTransferRequested", logs: logs, sub: sub}, nil + return &IAutomationRegistryMaster23PayeeshipTransferRequestedIterator{contract: _IAutomationRegistryMaster23.contract, event: "PayeeshipTransferRequested", logs: logs, sub: sub}, nil } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchPayeeshipTransferRequested(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMasterPayeeshipTransferRequested, transmitter []common.Address, from []common.Address, to []common.Address) (event.Subscription, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) WatchPayeeshipTransferRequested(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMaster23PayeeshipTransferRequested, transmitter []common.Address, from []common.Address, to []common.Address) (event.Subscription, error) { var transmitterRule []interface{} for _, transmitterItem := range transmitter { @@ -3365,7 +3798,7 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchPayees toRule = append(toRule, toItem) } - logs, sub, err := _IAutomationRegistryMaster.contract.WatchLogs(opts, "PayeeshipTransferRequested", transmitterRule, fromRule, toRule) + logs, sub, err := _IAutomationRegistryMaster23.contract.WatchLogs(opts, "PayeeshipTransferRequested", transmitterRule, fromRule, toRule) if err != nil { return nil, err } @@ -3375,8 +3808,8 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchPayees select { case log := <-logs: - event := new(IAutomationRegistryMasterPayeeshipTransferRequested) - if err := _IAutomationRegistryMaster.contract.UnpackLog(event, "PayeeshipTransferRequested", log); err != nil { + event := new(IAutomationRegistryMaster23PayeeshipTransferRequested) + if err := _IAutomationRegistryMaster23.contract.UnpackLog(event, "PayeeshipTransferRequested", log); err != nil { return err } event.Raw = log @@ -3397,17 +3830,17 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchPayees }), nil } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) ParsePayeeshipTransferRequested(log types.Log) (*IAutomationRegistryMasterPayeeshipTransferRequested, error) { - event := new(IAutomationRegistryMasterPayeeshipTransferRequested) - if err := _IAutomationRegistryMaster.contract.UnpackLog(event, "PayeeshipTransferRequested", log); err != nil { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) ParsePayeeshipTransferRequested(log types.Log) (*IAutomationRegistryMaster23PayeeshipTransferRequested, error) { + event := new(IAutomationRegistryMaster23PayeeshipTransferRequested) + if err := _IAutomationRegistryMaster23.contract.UnpackLog(event, "PayeeshipTransferRequested", log); err != nil { return nil, err } event.Raw = log return event, nil } -type IAutomationRegistryMasterPayeeshipTransferredIterator struct { - Event *IAutomationRegistryMasterPayeeshipTransferred +type IAutomationRegistryMaster23PayeeshipTransferredIterator struct { + Event *IAutomationRegistryMaster23PayeeshipTransferred contract *bind.BoundContract event string @@ -3418,7 +3851,7 @@ type IAutomationRegistryMasterPayeeshipTransferredIterator struct { fail error } -func (it *IAutomationRegistryMasterPayeeshipTransferredIterator) Next() bool { +func (it *IAutomationRegistryMaster23PayeeshipTransferredIterator) Next() bool { if it.fail != nil { return false @@ -3427,7 +3860,7 @@ func (it *IAutomationRegistryMasterPayeeshipTransferredIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(IAutomationRegistryMasterPayeeshipTransferred) + it.Event = new(IAutomationRegistryMaster23PayeeshipTransferred) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -3442,7 +3875,7 @@ func (it *IAutomationRegistryMasterPayeeshipTransferredIterator) Next() bool { select { case log := <-it.logs: - it.Event = new(IAutomationRegistryMasterPayeeshipTransferred) + it.Event = new(IAutomationRegistryMaster23PayeeshipTransferred) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -3457,23 +3890,23 @@ func (it *IAutomationRegistryMasterPayeeshipTransferredIterator) Next() bool { } } -func (it *IAutomationRegistryMasterPayeeshipTransferredIterator) Error() error { +func (it *IAutomationRegistryMaster23PayeeshipTransferredIterator) Error() error { return it.fail } -func (it *IAutomationRegistryMasterPayeeshipTransferredIterator) Close() error { +func (it *IAutomationRegistryMaster23PayeeshipTransferredIterator) Close() error { it.sub.Unsubscribe() return nil } -type IAutomationRegistryMasterPayeeshipTransferred struct { +type IAutomationRegistryMaster23PayeeshipTransferred struct { Transmitter common.Address From common.Address To common.Address Raw types.Log } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) FilterPayeeshipTransferred(opts *bind.FilterOpts, transmitter []common.Address, from []common.Address, to []common.Address) (*IAutomationRegistryMasterPayeeshipTransferredIterator, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) FilterPayeeshipTransferred(opts *bind.FilterOpts, transmitter []common.Address, from []common.Address, to []common.Address) (*IAutomationRegistryMaster23PayeeshipTransferredIterator, error) { var transmitterRule []interface{} for _, transmitterItem := range transmitter { @@ -3488,14 +3921,14 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) FilterPayee toRule = append(toRule, toItem) } - logs, sub, err := _IAutomationRegistryMaster.contract.FilterLogs(opts, "PayeeshipTransferred", transmitterRule, fromRule, toRule) + logs, sub, err := _IAutomationRegistryMaster23.contract.FilterLogs(opts, "PayeeshipTransferred", transmitterRule, fromRule, toRule) if err != nil { return nil, err } - return &IAutomationRegistryMasterPayeeshipTransferredIterator{contract: _IAutomationRegistryMaster.contract, event: "PayeeshipTransferred", logs: logs, sub: sub}, nil + return &IAutomationRegistryMaster23PayeeshipTransferredIterator{contract: _IAutomationRegistryMaster23.contract, event: "PayeeshipTransferred", logs: logs, sub: sub}, nil } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchPayeeshipTransferred(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMasterPayeeshipTransferred, transmitter []common.Address, from []common.Address, to []common.Address) (event.Subscription, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) WatchPayeeshipTransferred(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMaster23PayeeshipTransferred, transmitter []common.Address, from []common.Address, to []common.Address) (event.Subscription, error) { var transmitterRule []interface{} for _, transmitterItem := range transmitter { @@ -3510,7 +3943,7 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchPayees toRule = append(toRule, toItem) } - logs, sub, err := _IAutomationRegistryMaster.contract.WatchLogs(opts, "PayeeshipTransferred", transmitterRule, fromRule, toRule) + logs, sub, err := _IAutomationRegistryMaster23.contract.WatchLogs(opts, "PayeeshipTransferred", transmitterRule, fromRule, toRule) if err != nil { return nil, err } @@ -3520,8 +3953,8 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchPayees select { case log := <-logs: - event := new(IAutomationRegistryMasterPayeeshipTransferred) - if err := _IAutomationRegistryMaster.contract.UnpackLog(event, "PayeeshipTransferred", log); err != nil { + event := new(IAutomationRegistryMaster23PayeeshipTransferred) + if err := _IAutomationRegistryMaster23.contract.UnpackLog(event, "PayeeshipTransferred", log); err != nil { return err } event.Raw = log @@ -3542,17 +3975,17 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchPayees }), nil } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) ParsePayeeshipTransferred(log types.Log) (*IAutomationRegistryMasterPayeeshipTransferred, error) { - event := new(IAutomationRegistryMasterPayeeshipTransferred) - if err := _IAutomationRegistryMaster.contract.UnpackLog(event, "PayeeshipTransferred", log); err != nil { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) ParsePayeeshipTransferred(log types.Log) (*IAutomationRegistryMaster23PayeeshipTransferred, error) { + event := new(IAutomationRegistryMaster23PayeeshipTransferred) + if err := _IAutomationRegistryMaster23.contract.UnpackLog(event, "PayeeshipTransferred", log); err != nil { return nil, err } event.Raw = log return event, nil } -type IAutomationRegistryMasterPaymentWithdrawnIterator struct { - Event *IAutomationRegistryMasterPaymentWithdrawn +type IAutomationRegistryMaster23PaymentWithdrawnIterator struct { + Event *IAutomationRegistryMaster23PaymentWithdrawn contract *bind.BoundContract event string @@ -3563,7 +3996,7 @@ type IAutomationRegistryMasterPaymentWithdrawnIterator struct { fail error } -func (it *IAutomationRegistryMasterPaymentWithdrawnIterator) Next() bool { +func (it *IAutomationRegistryMaster23PaymentWithdrawnIterator) Next() bool { if it.fail != nil { return false @@ -3572,7 +4005,7 @@ func (it *IAutomationRegistryMasterPaymentWithdrawnIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(IAutomationRegistryMasterPaymentWithdrawn) + it.Event = new(IAutomationRegistryMaster23PaymentWithdrawn) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -3587,7 +4020,7 @@ func (it *IAutomationRegistryMasterPaymentWithdrawnIterator) Next() bool { select { case log := <-it.logs: - it.Event = new(IAutomationRegistryMasterPaymentWithdrawn) + it.Event = new(IAutomationRegistryMaster23PaymentWithdrawn) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -3602,16 +4035,16 @@ func (it *IAutomationRegistryMasterPaymentWithdrawnIterator) Next() bool { } } -func (it *IAutomationRegistryMasterPaymentWithdrawnIterator) Error() error { +func (it *IAutomationRegistryMaster23PaymentWithdrawnIterator) Error() error { return it.fail } -func (it *IAutomationRegistryMasterPaymentWithdrawnIterator) Close() error { +func (it *IAutomationRegistryMaster23PaymentWithdrawnIterator) Close() error { it.sub.Unsubscribe() return nil } -type IAutomationRegistryMasterPaymentWithdrawn struct { +type IAutomationRegistryMaster23PaymentWithdrawn struct { Transmitter common.Address Amount *big.Int To common.Address @@ -3619,7 +4052,7 @@ type IAutomationRegistryMasterPaymentWithdrawn struct { Raw types.Log } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) FilterPaymentWithdrawn(opts *bind.FilterOpts, transmitter []common.Address, amount []*big.Int, to []common.Address) (*IAutomationRegistryMasterPaymentWithdrawnIterator, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) FilterPaymentWithdrawn(opts *bind.FilterOpts, transmitter []common.Address, amount []*big.Int, to []common.Address) (*IAutomationRegistryMaster23PaymentWithdrawnIterator, error) { var transmitterRule []interface{} for _, transmitterItem := range transmitter { @@ -3634,14 +4067,14 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) FilterPayme toRule = append(toRule, toItem) } - logs, sub, err := _IAutomationRegistryMaster.contract.FilterLogs(opts, "PaymentWithdrawn", transmitterRule, amountRule, toRule) + logs, sub, err := _IAutomationRegistryMaster23.contract.FilterLogs(opts, "PaymentWithdrawn", transmitterRule, amountRule, toRule) if err != nil { return nil, err } - return &IAutomationRegistryMasterPaymentWithdrawnIterator{contract: _IAutomationRegistryMaster.contract, event: "PaymentWithdrawn", logs: logs, sub: sub}, nil + return &IAutomationRegistryMaster23PaymentWithdrawnIterator{contract: _IAutomationRegistryMaster23.contract, event: "PaymentWithdrawn", logs: logs, sub: sub}, nil } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchPaymentWithdrawn(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMasterPaymentWithdrawn, transmitter []common.Address, amount []*big.Int, to []common.Address) (event.Subscription, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) WatchPaymentWithdrawn(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMaster23PaymentWithdrawn, transmitter []common.Address, amount []*big.Int, to []common.Address) (event.Subscription, error) { var transmitterRule []interface{} for _, transmitterItem := range transmitter { @@ -3656,7 +4089,7 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchPaymen toRule = append(toRule, toItem) } - logs, sub, err := _IAutomationRegistryMaster.contract.WatchLogs(opts, "PaymentWithdrawn", transmitterRule, amountRule, toRule) + logs, sub, err := _IAutomationRegistryMaster23.contract.WatchLogs(opts, "PaymentWithdrawn", transmitterRule, amountRule, toRule) if err != nil { return nil, err } @@ -3666,8 +4099,8 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchPaymen select { case log := <-logs: - event := new(IAutomationRegistryMasterPaymentWithdrawn) - if err := _IAutomationRegistryMaster.contract.UnpackLog(event, "PaymentWithdrawn", log); err != nil { + event := new(IAutomationRegistryMaster23PaymentWithdrawn) + if err := _IAutomationRegistryMaster23.contract.UnpackLog(event, "PaymentWithdrawn", log); err != nil { return err } event.Raw = log @@ -3688,17 +4121,17 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchPaymen }), nil } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) ParsePaymentWithdrawn(log types.Log) (*IAutomationRegistryMasterPaymentWithdrawn, error) { - event := new(IAutomationRegistryMasterPaymentWithdrawn) - if err := _IAutomationRegistryMaster.contract.UnpackLog(event, "PaymentWithdrawn", log); err != nil { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) ParsePaymentWithdrawn(log types.Log) (*IAutomationRegistryMaster23PaymentWithdrawn, error) { + event := new(IAutomationRegistryMaster23PaymentWithdrawn) + if err := _IAutomationRegistryMaster23.contract.UnpackLog(event, "PaymentWithdrawn", log); err != nil { return nil, err } event.Raw = log return event, nil } -type IAutomationRegistryMasterReorgedUpkeepReportIterator struct { - Event *IAutomationRegistryMasterReorgedUpkeepReport +type IAutomationRegistryMaster23ReorgedUpkeepReportIterator struct { + Event *IAutomationRegistryMaster23ReorgedUpkeepReport contract *bind.BoundContract event string @@ -3709,7 +4142,7 @@ type IAutomationRegistryMasterReorgedUpkeepReportIterator struct { fail error } -func (it *IAutomationRegistryMasterReorgedUpkeepReportIterator) Next() bool { +func (it *IAutomationRegistryMaster23ReorgedUpkeepReportIterator) Next() bool { if it.fail != nil { return false @@ -3718,7 +4151,7 @@ func (it *IAutomationRegistryMasterReorgedUpkeepReportIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(IAutomationRegistryMasterReorgedUpkeepReport) + it.Event = new(IAutomationRegistryMaster23ReorgedUpkeepReport) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -3733,7 +4166,7 @@ func (it *IAutomationRegistryMasterReorgedUpkeepReportIterator) Next() bool { select { case log := <-it.logs: - it.Event = new(IAutomationRegistryMasterReorgedUpkeepReport) + it.Event = new(IAutomationRegistryMaster23ReorgedUpkeepReport) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -3748,43 +4181,43 @@ func (it *IAutomationRegistryMasterReorgedUpkeepReportIterator) Next() bool { } } -func (it *IAutomationRegistryMasterReorgedUpkeepReportIterator) Error() error { +func (it *IAutomationRegistryMaster23ReorgedUpkeepReportIterator) Error() error { return it.fail } -func (it *IAutomationRegistryMasterReorgedUpkeepReportIterator) Close() error { +func (it *IAutomationRegistryMaster23ReorgedUpkeepReportIterator) Close() error { it.sub.Unsubscribe() return nil } -type IAutomationRegistryMasterReorgedUpkeepReport struct { +type IAutomationRegistryMaster23ReorgedUpkeepReport struct { Id *big.Int Trigger []byte Raw types.Log } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) FilterReorgedUpkeepReport(opts *bind.FilterOpts, id []*big.Int) (*IAutomationRegistryMasterReorgedUpkeepReportIterator, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) FilterReorgedUpkeepReport(opts *bind.FilterOpts, id []*big.Int) (*IAutomationRegistryMaster23ReorgedUpkeepReportIterator, error) { var idRule []interface{} for _, idItem := range id { idRule = append(idRule, idItem) } - logs, sub, err := _IAutomationRegistryMaster.contract.FilterLogs(opts, "ReorgedUpkeepReport", idRule) + logs, sub, err := _IAutomationRegistryMaster23.contract.FilterLogs(opts, "ReorgedUpkeepReport", idRule) if err != nil { return nil, err } - return &IAutomationRegistryMasterReorgedUpkeepReportIterator{contract: _IAutomationRegistryMaster.contract, event: "ReorgedUpkeepReport", logs: logs, sub: sub}, nil + return &IAutomationRegistryMaster23ReorgedUpkeepReportIterator{contract: _IAutomationRegistryMaster23.contract, event: "ReorgedUpkeepReport", logs: logs, sub: sub}, nil } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchReorgedUpkeepReport(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMasterReorgedUpkeepReport, id []*big.Int) (event.Subscription, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) WatchReorgedUpkeepReport(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMaster23ReorgedUpkeepReport, id []*big.Int) (event.Subscription, error) { var idRule []interface{} for _, idItem := range id { idRule = append(idRule, idItem) } - logs, sub, err := _IAutomationRegistryMaster.contract.WatchLogs(opts, "ReorgedUpkeepReport", idRule) + logs, sub, err := _IAutomationRegistryMaster23.contract.WatchLogs(opts, "ReorgedUpkeepReport", idRule) if err != nil { return nil, err } @@ -3794,8 +4227,8 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchReorge select { case log := <-logs: - event := new(IAutomationRegistryMasterReorgedUpkeepReport) - if err := _IAutomationRegistryMaster.contract.UnpackLog(event, "ReorgedUpkeepReport", log); err != nil { + event := new(IAutomationRegistryMaster23ReorgedUpkeepReport) + if err := _IAutomationRegistryMaster23.contract.UnpackLog(event, "ReorgedUpkeepReport", log); err != nil { return err } event.Raw = log @@ -3816,17 +4249,17 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchReorge }), nil } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) ParseReorgedUpkeepReport(log types.Log) (*IAutomationRegistryMasterReorgedUpkeepReport, error) { - event := new(IAutomationRegistryMasterReorgedUpkeepReport) - if err := _IAutomationRegistryMaster.contract.UnpackLog(event, "ReorgedUpkeepReport", log); err != nil { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) ParseReorgedUpkeepReport(log types.Log) (*IAutomationRegistryMaster23ReorgedUpkeepReport, error) { + event := new(IAutomationRegistryMaster23ReorgedUpkeepReport) + if err := _IAutomationRegistryMaster23.contract.UnpackLog(event, "ReorgedUpkeepReport", log); err != nil { return nil, err } event.Raw = log return event, nil } -type IAutomationRegistryMasterStaleUpkeepReportIterator struct { - Event *IAutomationRegistryMasterStaleUpkeepReport +type IAutomationRegistryMaster23StaleUpkeepReportIterator struct { + Event *IAutomationRegistryMaster23StaleUpkeepReport contract *bind.BoundContract event string @@ -3837,7 +4270,7 @@ type IAutomationRegistryMasterStaleUpkeepReportIterator struct { fail error } -func (it *IAutomationRegistryMasterStaleUpkeepReportIterator) Next() bool { +func (it *IAutomationRegistryMaster23StaleUpkeepReportIterator) Next() bool { if it.fail != nil { return false @@ -3846,7 +4279,7 @@ func (it *IAutomationRegistryMasterStaleUpkeepReportIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(IAutomationRegistryMasterStaleUpkeepReport) + it.Event = new(IAutomationRegistryMaster23StaleUpkeepReport) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -3861,7 +4294,7 @@ func (it *IAutomationRegistryMasterStaleUpkeepReportIterator) Next() bool { select { case log := <-it.logs: - it.Event = new(IAutomationRegistryMasterStaleUpkeepReport) + it.Event = new(IAutomationRegistryMaster23StaleUpkeepReport) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -3876,43 +4309,43 @@ func (it *IAutomationRegistryMasterStaleUpkeepReportIterator) Next() bool { } } -func (it *IAutomationRegistryMasterStaleUpkeepReportIterator) Error() error { +func (it *IAutomationRegistryMaster23StaleUpkeepReportIterator) Error() error { return it.fail } -func (it *IAutomationRegistryMasterStaleUpkeepReportIterator) Close() error { +func (it *IAutomationRegistryMaster23StaleUpkeepReportIterator) Close() error { it.sub.Unsubscribe() return nil } -type IAutomationRegistryMasterStaleUpkeepReport struct { +type IAutomationRegistryMaster23StaleUpkeepReport struct { Id *big.Int Trigger []byte Raw types.Log } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) FilterStaleUpkeepReport(opts *bind.FilterOpts, id []*big.Int) (*IAutomationRegistryMasterStaleUpkeepReportIterator, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) FilterStaleUpkeepReport(opts *bind.FilterOpts, id []*big.Int) (*IAutomationRegistryMaster23StaleUpkeepReportIterator, error) { var idRule []interface{} for _, idItem := range id { idRule = append(idRule, idItem) } - logs, sub, err := _IAutomationRegistryMaster.contract.FilterLogs(opts, "StaleUpkeepReport", idRule) + logs, sub, err := _IAutomationRegistryMaster23.contract.FilterLogs(opts, "StaleUpkeepReport", idRule) if err != nil { return nil, err } - return &IAutomationRegistryMasterStaleUpkeepReportIterator{contract: _IAutomationRegistryMaster.contract, event: "StaleUpkeepReport", logs: logs, sub: sub}, nil + return &IAutomationRegistryMaster23StaleUpkeepReportIterator{contract: _IAutomationRegistryMaster23.contract, event: "StaleUpkeepReport", logs: logs, sub: sub}, nil } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchStaleUpkeepReport(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMasterStaleUpkeepReport, id []*big.Int) (event.Subscription, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) WatchStaleUpkeepReport(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMaster23StaleUpkeepReport, id []*big.Int) (event.Subscription, error) { var idRule []interface{} for _, idItem := range id { idRule = append(idRule, idItem) } - logs, sub, err := _IAutomationRegistryMaster.contract.WatchLogs(opts, "StaleUpkeepReport", idRule) + logs, sub, err := _IAutomationRegistryMaster23.contract.WatchLogs(opts, "StaleUpkeepReport", idRule) if err != nil { return nil, err } @@ -3922,8 +4355,8 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchStaleU select { case log := <-logs: - event := new(IAutomationRegistryMasterStaleUpkeepReport) - if err := _IAutomationRegistryMaster.contract.UnpackLog(event, "StaleUpkeepReport", log); err != nil { + event := new(IAutomationRegistryMaster23StaleUpkeepReport) + if err := _IAutomationRegistryMaster23.contract.UnpackLog(event, "StaleUpkeepReport", log); err != nil { return err } event.Raw = log @@ -3944,17 +4377,17 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchStaleU }), nil } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) ParseStaleUpkeepReport(log types.Log) (*IAutomationRegistryMasterStaleUpkeepReport, error) { - event := new(IAutomationRegistryMasterStaleUpkeepReport) - if err := _IAutomationRegistryMaster.contract.UnpackLog(event, "StaleUpkeepReport", log); err != nil { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) ParseStaleUpkeepReport(log types.Log) (*IAutomationRegistryMaster23StaleUpkeepReport, error) { + event := new(IAutomationRegistryMaster23StaleUpkeepReport) + if err := _IAutomationRegistryMaster23.contract.UnpackLog(event, "StaleUpkeepReport", log); err != nil { return nil, err } event.Raw = log return event, nil } -type IAutomationRegistryMasterTransmittedIterator struct { - Event *IAutomationRegistryMasterTransmitted +type IAutomationRegistryMaster23TransmittedIterator struct { + Event *IAutomationRegistryMaster23Transmitted contract *bind.BoundContract event string @@ -3965,7 +4398,7 @@ type IAutomationRegistryMasterTransmittedIterator struct { fail error } -func (it *IAutomationRegistryMasterTransmittedIterator) Next() bool { +func (it *IAutomationRegistryMaster23TransmittedIterator) Next() bool { if it.fail != nil { return false @@ -3974,7 +4407,7 @@ func (it *IAutomationRegistryMasterTransmittedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(IAutomationRegistryMasterTransmitted) + it.Event = new(IAutomationRegistryMaster23Transmitted) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -3989,7 +4422,7 @@ func (it *IAutomationRegistryMasterTransmittedIterator) Next() bool { select { case log := <-it.logs: - it.Event = new(IAutomationRegistryMasterTransmitted) + it.Event = new(IAutomationRegistryMaster23Transmitted) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -4004,33 +4437,33 @@ func (it *IAutomationRegistryMasterTransmittedIterator) Next() bool { } } -func (it *IAutomationRegistryMasterTransmittedIterator) Error() error { +func (it *IAutomationRegistryMaster23TransmittedIterator) Error() error { return it.fail } -func (it *IAutomationRegistryMasterTransmittedIterator) Close() error { +func (it *IAutomationRegistryMaster23TransmittedIterator) Close() error { it.sub.Unsubscribe() return nil } -type IAutomationRegistryMasterTransmitted struct { +type IAutomationRegistryMaster23Transmitted struct { ConfigDigest [32]byte Epoch uint32 Raw types.Log } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) FilterTransmitted(opts *bind.FilterOpts) (*IAutomationRegistryMasterTransmittedIterator, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) FilterTransmitted(opts *bind.FilterOpts) (*IAutomationRegistryMaster23TransmittedIterator, error) { - logs, sub, err := _IAutomationRegistryMaster.contract.FilterLogs(opts, "Transmitted") + logs, sub, err := _IAutomationRegistryMaster23.contract.FilterLogs(opts, "Transmitted") if err != nil { return nil, err } - return &IAutomationRegistryMasterTransmittedIterator{contract: _IAutomationRegistryMaster.contract, event: "Transmitted", logs: logs, sub: sub}, nil + return &IAutomationRegistryMaster23TransmittedIterator{contract: _IAutomationRegistryMaster23.contract, event: "Transmitted", logs: logs, sub: sub}, nil } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchTransmitted(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMasterTransmitted) (event.Subscription, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) WatchTransmitted(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMaster23Transmitted) (event.Subscription, error) { - logs, sub, err := _IAutomationRegistryMaster.contract.WatchLogs(opts, "Transmitted") + logs, sub, err := _IAutomationRegistryMaster23.contract.WatchLogs(opts, "Transmitted") if err != nil { return nil, err } @@ -4040,8 +4473,8 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchTransm select { case log := <-logs: - event := new(IAutomationRegistryMasterTransmitted) - if err := _IAutomationRegistryMaster.contract.UnpackLog(event, "Transmitted", log); err != nil { + event := new(IAutomationRegistryMaster23Transmitted) + if err := _IAutomationRegistryMaster23.contract.UnpackLog(event, "Transmitted", log); err != nil { return err } event.Raw = log @@ -4062,17 +4495,17 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchTransm }), nil } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) ParseTransmitted(log types.Log) (*IAutomationRegistryMasterTransmitted, error) { - event := new(IAutomationRegistryMasterTransmitted) - if err := _IAutomationRegistryMaster.contract.UnpackLog(event, "Transmitted", log); err != nil { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) ParseTransmitted(log types.Log) (*IAutomationRegistryMaster23Transmitted, error) { + event := new(IAutomationRegistryMaster23Transmitted) + if err := _IAutomationRegistryMaster23.contract.UnpackLog(event, "Transmitted", log); err != nil { return nil, err } event.Raw = log return event, nil } -type IAutomationRegistryMasterUnpausedIterator struct { - Event *IAutomationRegistryMasterUnpaused +type IAutomationRegistryMaster23UnpausedIterator struct { + Event *IAutomationRegistryMaster23Unpaused contract *bind.BoundContract event string @@ -4083,7 +4516,7 @@ type IAutomationRegistryMasterUnpausedIterator struct { fail error } -func (it *IAutomationRegistryMasterUnpausedIterator) Next() bool { +func (it *IAutomationRegistryMaster23UnpausedIterator) Next() bool { if it.fail != nil { return false @@ -4092,7 +4525,7 @@ func (it *IAutomationRegistryMasterUnpausedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(IAutomationRegistryMasterUnpaused) + it.Event = new(IAutomationRegistryMaster23Unpaused) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -4107,7 +4540,7 @@ func (it *IAutomationRegistryMasterUnpausedIterator) Next() bool { select { case log := <-it.logs: - it.Event = new(IAutomationRegistryMasterUnpaused) + it.Event = new(IAutomationRegistryMaster23Unpaused) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -4122,32 +4555,32 @@ func (it *IAutomationRegistryMasterUnpausedIterator) Next() bool { } } -func (it *IAutomationRegistryMasterUnpausedIterator) Error() error { +func (it *IAutomationRegistryMaster23UnpausedIterator) Error() error { return it.fail } -func (it *IAutomationRegistryMasterUnpausedIterator) Close() error { +func (it *IAutomationRegistryMaster23UnpausedIterator) Close() error { it.sub.Unsubscribe() return nil } -type IAutomationRegistryMasterUnpaused struct { +type IAutomationRegistryMaster23Unpaused struct { Account common.Address Raw types.Log } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) FilterUnpaused(opts *bind.FilterOpts) (*IAutomationRegistryMasterUnpausedIterator, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) FilterUnpaused(opts *bind.FilterOpts) (*IAutomationRegistryMaster23UnpausedIterator, error) { - logs, sub, err := _IAutomationRegistryMaster.contract.FilterLogs(opts, "Unpaused") + logs, sub, err := _IAutomationRegistryMaster23.contract.FilterLogs(opts, "Unpaused") if err != nil { return nil, err } - return &IAutomationRegistryMasterUnpausedIterator{contract: _IAutomationRegistryMaster.contract, event: "Unpaused", logs: logs, sub: sub}, nil + return &IAutomationRegistryMaster23UnpausedIterator{contract: _IAutomationRegistryMaster23.contract, event: "Unpaused", logs: logs, sub: sub}, nil } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchUnpaused(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMasterUnpaused) (event.Subscription, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) WatchUnpaused(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMaster23Unpaused) (event.Subscription, error) { - logs, sub, err := _IAutomationRegistryMaster.contract.WatchLogs(opts, "Unpaused") + logs, sub, err := _IAutomationRegistryMaster23.contract.WatchLogs(opts, "Unpaused") if err != nil { return nil, err } @@ -4157,8 +4590,8 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchUnpaus select { case log := <-logs: - event := new(IAutomationRegistryMasterUnpaused) - if err := _IAutomationRegistryMaster.contract.UnpackLog(event, "Unpaused", log); err != nil { + event := new(IAutomationRegistryMaster23Unpaused) + if err := _IAutomationRegistryMaster23.contract.UnpackLog(event, "Unpaused", log); err != nil { return err } event.Raw = log @@ -4179,17 +4612,17 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchUnpaus }), nil } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) ParseUnpaused(log types.Log) (*IAutomationRegistryMasterUnpaused, error) { - event := new(IAutomationRegistryMasterUnpaused) - if err := _IAutomationRegistryMaster.contract.UnpackLog(event, "Unpaused", log); err != nil { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) ParseUnpaused(log types.Log) (*IAutomationRegistryMaster23Unpaused, error) { + event := new(IAutomationRegistryMaster23Unpaused) + if err := _IAutomationRegistryMaster23.contract.UnpackLog(event, "Unpaused", log); err != nil { return nil, err } event.Raw = log return event, nil } -type IAutomationRegistryMasterUpkeepAdminTransferRequestedIterator struct { - Event *IAutomationRegistryMasterUpkeepAdminTransferRequested +type IAutomationRegistryMaster23UpkeepAdminTransferRequestedIterator struct { + Event *IAutomationRegistryMaster23UpkeepAdminTransferRequested contract *bind.BoundContract event string @@ -4200,7 +4633,7 @@ type IAutomationRegistryMasterUpkeepAdminTransferRequestedIterator struct { fail error } -func (it *IAutomationRegistryMasterUpkeepAdminTransferRequestedIterator) Next() bool { +func (it *IAutomationRegistryMaster23UpkeepAdminTransferRequestedIterator) Next() bool { if it.fail != nil { return false @@ -4209,7 +4642,7 @@ func (it *IAutomationRegistryMasterUpkeepAdminTransferRequestedIterator) Next() if it.done { select { case log := <-it.logs: - it.Event = new(IAutomationRegistryMasterUpkeepAdminTransferRequested) + it.Event = new(IAutomationRegistryMaster23UpkeepAdminTransferRequested) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -4224,7 +4657,7 @@ func (it *IAutomationRegistryMasterUpkeepAdminTransferRequestedIterator) Next() select { case log := <-it.logs: - it.Event = new(IAutomationRegistryMasterUpkeepAdminTransferRequested) + it.Event = new(IAutomationRegistryMaster23UpkeepAdminTransferRequested) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -4239,23 +4672,23 @@ func (it *IAutomationRegistryMasterUpkeepAdminTransferRequestedIterator) Next() } } -func (it *IAutomationRegistryMasterUpkeepAdminTransferRequestedIterator) Error() error { +func (it *IAutomationRegistryMaster23UpkeepAdminTransferRequestedIterator) Error() error { return it.fail } -func (it *IAutomationRegistryMasterUpkeepAdminTransferRequestedIterator) Close() error { +func (it *IAutomationRegistryMaster23UpkeepAdminTransferRequestedIterator) Close() error { it.sub.Unsubscribe() return nil } -type IAutomationRegistryMasterUpkeepAdminTransferRequested struct { +type IAutomationRegistryMaster23UpkeepAdminTransferRequested struct { Id *big.Int From common.Address To common.Address Raw types.Log } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) FilterUpkeepAdminTransferRequested(opts *bind.FilterOpts, id []*big.Int, from []common.Address, to []common.Address) (*IAutomationRegistryMasterUpkeepAdminTransferRequestedIterator, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) FilterUpkeepAdminTransferRequested(opts *bind.FilterOpts, id []*big.Int, from []common.Address, to []common.Address) (*IAutomationRegistryMaster23UpkeepAdminTransferRequestedIterator, error) { var idRule []interface{} for _, idItem := range id { @@ -4270,14 +4703,14 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) FilterUpkee toRule = append(toRule, toItem) } - logs, sub, err := _IAutomationRegistryMaster.contract.FilterLogs(opts, "UpkeepAdminTransferRequested", idRule, fromRule, toRule) + logs, sub, err := _IAutomationRegistryMaster23.contract.FilterLogs(opts, "UpkeepAdminTransferRequested", idRule, fromRule, toRule) if err != nil { return nil, err } - return &IAutomationRegistryMasterUpkeepAdminTransferRequestedIterator{contract: _IAutomationRegistryMaster.contract, event: "UpkeepAdminTransferRequested", logs: logs, sub: sub}, nil + return &IAutomationRegistryMaster23UpkeepAdminTransferRequestedIterator{contract: _IAutomationRegistryMaster23.contract, event: "UpkeepAdminTransferRequested", logs: logs, sub: sub}, nil } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchUpkeepAdminTransferRequested(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMasterUpkeepAdminTransferRequested, id []*big.Int, from []common.Address, to []common.Address) (event.Subscription, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) WatchUpkeepAdminTransferRequested(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMaster23UpkeepAdminTransferRequested, id []*big.Int, from []common.Address, to []common.Address) (event.Subscription, error) { var idRule []interface{} for _, idItem := range id { @@ -4292,7 +4725,7 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchUpkeep toRule = append(toRule, toItem) } - logs, sub, err := _IAutomationRegistryMaster.contract.WatchLogs(opts, "UpkeepAdminTransferRequested", idRule, fromRule, toRule) + logs, sub, err := _IAutomationRegistryMaster23.contract.WatchLogs(opts, "UpkeepAdminTransferRequested", idRule, fromRule, toRule) if err != nil { return nil, err } @@ -4302,8 +4735,8 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchUpkeep select { case log := <-logs: - event := new(IAutomationRegistryMasterUpkeepAdminTransferRequested) - if err := _IAutomationRegistryMaster.contract.UnpackLog(event, "UpkeepAdminTransferRequested", log); err != nil { + event := new(IAutomationRegistryMaster23UpkeepAdminTransferRequested) + if err := _IAutomationRegistryMaster23.contract.UnpackLog(event, "UpkeepAdminTransferRequested", log); err != nil { return err } event.Raw = log @@ -4324,17 +4757,17 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchUpkeep }), nil } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) ParseUpkeepAdminTransferRequested(log types.Log) (*IAutomationRegistryMasterUpkeepAdminTransferRequested, error) { - event := new(IAutomationRegistryMasterUpkeepAdminTransferRequested) - if err := _IAutomationRegistryMaster.contract.UnpackLog(event, "UpkeepAdminTransferRequested", log); err != nil { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) ParseUpkeepAdminTransferRequested(log types.Log) (*IAutomationRegistryMaster23UpkeepAdminTransferRequested, error) { + event := new(IAutomationRegistryMaster23UpkeepAdminTransferRequested) + if err := _IAutomationRegistryMaster23.contract.UnpackLog(event, "UpkeepAdminTransferRequested", log); err != nil { return nil, err } event.Raw = log return event, nil } -type IAutomationRegistryMasterUpkeepAdminTransferredIterator struct { - Event *IAutomationRegistryMasterUpkeepAdminTransferred +type IAutomationRegistryMaster23UpkeepAdminTransferredIterator struct { + Event *IAutomationRegistryMaster23UpkeepAdminTransferred contract *bind.BoundContract event string @@ -4345,7 +4778,7 @@ type IAutomationRegistryMasterUpkeepAdminTransferredIterator struct { fail error } -func (it *IAutomationRegistryMasterUpkeepAdminTransferredIterator) Next() bool { +func (it *IAutomationRegistryMaster23UpkeepAdminTransferredIterator) Next() bool { if it.fail != nil { return false @@ -4354,7 +4787,7 @@ func (it *IAutomationRegistryMasterUpkeepAdminTransferredIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(IAutomationRegistryMasterUpkeepAdminTransferred) + it.Event = new(IAutomationRegistryMaster23UpkeepAdminTransferred) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -4369,7 +4802,7 @@ func (it *IAutomationRegistryMasterUpkeepAdminTransferredIterator) Next() bool { select { case log := <-it.logs: - it.Event = new(IAutomationRegistryMasterUpkeepAdminTransferred) + it.Event = new(IAutomationRegistryMaster23UpkeepAdminTransferred) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -4384,23 +4817,23 @@ func (it *IAutomationRegistryMasterUpkeepAdminTransferredIterator) Next() bool { } } -func (it *IAutomationRegistryMasterUpkeepAdminTransferredIterator) Error() error { +func (it *IAutomationRegistryMaster23UpkeepAdminTransferredIterator) Error() error { return it.fail } -func (it *IAutomationRegistryMasterUpkeepAdminTransferredIterator) Close() error { +func (it *IAutomationRegistryMaster23UpkeepAdminTransferredIterator) Close() error { it.sub.Unsubscribe() return nil } -type IAutomationRegistryMasterUpkeepAdminTransferred struct { +type IAutomationRegistryMaster23UpkeepAdminTransferred struct { Id *big.Int From common.Address To common.Address Raw types.Log } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) FilterUpkeepAdminTransferred(opts *bind.FilterOpts, id []*big.Int, from []common.Address, to []common.Address) (*IAutomationRegistryMasterUpkeepAdminTransferredIterator, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) FilterUpkeepAdminTransferred(opts *bind.FilterOpts, id []*big.Int, from []common.Address, to []common.Address) (*IAutomationRegistryMaster23UpkeepAdminTransferredIterator, error) { var idRule []interface{} for _, idItem := range id { @@ -4415,14 +4848,14 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) FilterUpkee toRule = append(toRule, toItem) } - logs, sub, err := _IAutomationRegistryMaster.contract.FilterLogs(opts, "UpkeepAdminTransferred", idRule, fromRule, toRule) + logs, sub, err := _IAutomationRegistryMaster23.contract.FilterLogs(opts, "UpkeepAdminTransferred", idRule, fromRule, toRule) if err != nil { return nil, err } - return &IAutomationRegistryMasterUpkeepAdminTransferredIterator{contract: _IAutomationRegistryMaster.contract, event: "UpkeepAdminTransferred", logs: logs, sub: sub}, nil + return &IAutomationRegistryMaster23UpkeepAdminTransferredIterator{contract: _IAutomationRegistryMaster23.contract, event: "UpkeepAdminTransferred", logs: logs, sub: sub}, nil } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchUpkeepAdminTransferred(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMasterUpkeepAdminTransferred, id []*big.Int, from []common.Address, to []common.Address) (event.Subscription, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) WatchUpkeepAdminTransferred(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMaster23UpkeepAdminTransferred, id []*big.Int, from []common.Address, to []common.Address) (event.Subscription, error) { var idRule []interface{} for _, idItem := range id { @@ -4437,7 +4870,7 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchUpkeep toRule = append(toRule, toItem) } - logs, sub, err := _IAutomationRegistryMaster.contract.WatchLogs(opts, "UpkeepAdminTransferred", idRule, fromRule, toRule) + logs, sub, err := _IAutomationRegistryMaster23.contract.WatchLogs(opts, "UpkeepAdminTransferred", idRule, fromRule, toRule) if err != nil { return nil, err } @@ -4447,8 +4880,8 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchUpkeep select { case log := <-logs: - event := new(IAutomationRegistryMasterUpkeepAdminTransferred) - if err := _IAutomationRegistryMaster.contract.UnpackLog(event, "UpkeepAdminTransferred", log); err != nil { + event := new(IAutomationRegistryMaster23UpkeepAdminTransferred) + if err := _IAutomationRegistryMaster23.contract.UnpackLog(event, "UpkeepAdminTransferred", log); err != nil { return err } event.Raw = log @@ -4469,17 +4902,17 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchUpkeep }), nil } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) ParseUpkeepAdminTransferred(log types.Log) (*IAutomationRegistryMasterUpkeepAdminTransferred, error) { - event := new(IAutomationRegistryMasterUpkeepAdminTransferred) - if err := _IAutomationRegistryMaster.contract.UnpackLog(event, "UpkeepAdminTransferred", log); err != nil { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) ParseUpkeepAdminTransferred(log types.Log) (*IAutomationRegistryMaster23UpkeepAdminTransferred, error) { + event := new(IAutomationRegistryMaster23UpkeepAdminTransferred) + if err := _IAutomationRegistryMaster23.contract.UnpackLog(event, "UpkeepAdminTransferred", log); err != nil { return nil, err } event.Raw = log return event, nil } -type IAutomationRegistryMasterUpkeepCanceledIterator struct { - Event *IAutomationRegistryMasterUpkeepCanceled +type IAutomationRegistryMaster23UpkeepCanceledIterator struct { + Event *IAutomationRegistryMaster23UpkeepCanceled contract *bind.BoundContract event string @@ -4490,7 +4923,7 @@ type IAutomationRegistryMasterUpkeepCanceledIterator struct { fail error } -func (it *IAutomationRegistryMasterUpkeepCanceledIterator) Next() bool { +func (it *IAutomationRegistryMaster23UpkeepCanceledIterator) Next() bool { if it.fail != nil { return false @@ -4499,7 +4932,7 @@ func (it *IAutomationRegistryMasterUpkeepCanceledIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(IAutomationRegistryMasterUpkeepCanceled) + it.Event = new(IAutomationRegistryMaster23UpkeepCanceled) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -4514,7 +4947,7 @@ func (it *IAutomationRegistryMasterUpkeepCanceledIterator) Next() bool { select { case log := <-it.logs: - it.Event = new(IAutomationRegistryMasterUpkeepCanceled) + it.Event = new(IAutomationRegistryMaster23UpkeepCanceled) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -4529,22 +4962,22 @@ func (it *IAutomationRegistryMasterUpkeepCanceledIterator) Next() bool { } } -func (it *IAutomationRegistryMasterUpkeepCanceledIterator) Error() error { +func (it *IAutomationRegistryMaster23UpkeepCanceledIterator) Error() error { return it.fail } -func (it *IAutomationRegistryMasterUpkeepCanceledIterator) Close() error { +func (it *IAutomationRegistryMaster23UpkeepCanceledIterator) Close() error { it.sub.Unsubscribe() return nil } -type IAutomationRegistryMasterUpkeepCanceled struct { +type IAutomationRegistryMaster23UpkeepCanceled struct { Id *big.Int AtBlockHeight uint64 Raw types.Log } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) FilterUpkeepCanceled(opts *bind.FilterOpts, id []*big.Int, atBlockHeight []uint64) (*IAutomationRegistryMasterUpkeepCanceledIterator, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) FilterUpkeepCanceled(opts *bind.FilterOpts, id []*big.Int, atBlockHeight []uint64) (*IAutomationRegistryMaster23UpkeepCanceledIterator, error) { var idRule []interface{} for _, idItem := range id { @@ -4555,14 +4988,14 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) FilterUpkee atBlockHeightRule = append(atBlockHeightRule, atBlockHeightItem) } - logs, sub, err := _IAutomationRegistryMaster.contract.FilterLogs(opts, "UpkeepCanceled", idRule, atBlockHeightRule) + logs, sub, err := _IAutomationRegistryMaster23.contract.FilterLogs(opts, "UpkeepCanceled", idRule, atBlockHeightRule) if err != nil { return nil, err } - return &IAutomationRegistryMasterUpkeepCanceledIterator{contract: _IAutomationRegistryMaster.contract, event: "UpkeepCanceled", logs: logs, sub: sub}, nil + return &IAutomationRegistryMaster23UpkeepCanceledIterator{contract: _IAutomationRegistryMaster23.contract, event: "UpkeepCanceled", logs: logs, sub: sub}, nil } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchUpkeepCanceled(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMasterUpkeepCanceled, id []*big.Int, atBlockHeight []uint64) (event.Subscription, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) WatchUpkeepCanceled(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMaster23UpkeepCanceled, id []*big.Int, atBlockHeight []uint64) (event.Subscription, error) { var idRule []interface{} for _, idItem := range id { @@ -4573,7 +5006,7 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchUpkeep atBlockHeightRule = append(atBlockHeightRule, atBlockHeightItem) } - logs, sub, err := _IAutomationRegistryMaster.contract.WatchLogs(opts, "UpkeepCanceled", idRule, atBlockHeightRule) + logs, sub, err := _IAutomationRegistryMaster23.contract.WatchLogs(opts, "UpkeepCanceled", idRule, atBlockHeightRule) if err != nil { return nil, err } @@ -4583,8 +5016,8 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchUpkeep select { case log := <-logs: - event := new(IAutomationRegistryMasterUpkeepCanceled) - if err := _IAutomationRegistryMaster.contract.UnpackLog(event, "UpkeepCanceled", log); err != nil { + event := new(IAutomationRegistryMaster23UpkeepCanceled) + if err := _IAutomationRegistryMaster23.contract.UnpackLog(event, "UpkeepCanceled", log); err != nil { return err } event.Raw = log @@ -4605,17 +5038,17 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchUpkeep }), nil } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) ParseUpkeepCanceled(log types.Log) (*IAutomationRegistryMasterUpkeepCanceled, error) { - event := new(IAutomationRegistryMasterUpkeepCanceled) - if err := _IAutomationRegistryMaster.contract.UnpackLog(event, "UpkeepCanceled", log); err != nil { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) ParseUpkeepCanceled(log types.Log) (*IAutomationRegistryMaster23UpkeepCanceled, error) { + event := new(IAutomationRegistryMaster23UpkeepCanceled) + if err := _IAutomationRegistryMaster23.contract.UnpackLog(event, "UpkeepCanceled", log); err != nil { return nil, err } event.Raw = log return event, nil } -type IAutomationRegistryMasterUpkeepCheckDataSetIterator struct { - Event *IAutomationRegistryMasterUpkeepCheckDataSet +type IAutomationRegistryMaster23UpkeepCheckDataSetIterator struct { + Event *IAutomationRegistryMaster23UpkeepCheckDataSet contract *bind.BoundContract event string @@ -4626,7 +5059,7 @@ type IAutomationRegistryMasterUpkeepCheckDataSetIterator struct { fail error } -func (it *IAutomationRegistryMasterUpkeepCheckDataSetIterator) Next() bool { +func (it *IAutomationRegistryMaster23UpkeepCheckDataSetIterator) Next() bool { if it.fail != nil { return false @@ -4635,7 +5068,7 @@ func (it *IAutomationRegistryMasterUpkeepCheckDataSetIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(IAutomationRegistryMasterUpkeepCheckDataSet) + it.Event = new(IAutomationRegistryMaster23UpkeepCheckDataSet) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -4650,7 +5083,7 @@ func (it *IAutomationRegistryMasterUpkeepCheckDataSetIterator) Next() bool { select { case log := <-it.logs: - it.Event = new(IAutomationRegistryMasterUpkeepCheckDataSet) + it.Event = new(IAutomationRegistryMaster23UpkeepCheckDataSet) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -4665,43 +5098,43 @@ func (it *IAutomationRegistryMasterUpkeepCheckDataSetIterator) Next() bool { } } -func (it *IAutomationRegistryMasterUpkeepCheckDataSetIterator) Error() error { +func (it *IAutomationRegistryMaster23UpkeepCheckDataSetIterator) Error() error { return it.fail } -func (it *IAutomationRegistryMasterUpkeepCheckDataSetIterator) Close() error { +func (it *IAutomationRegistryMaster23UpkeepCheckDataSetIterator) Close() error { it.sub.Unsubscribe() return nil } -type IAutomationRegistryMasterUpkeepCheckDataSet struct { +type IAutomationRegistryMaster23UpkeepCheckDataSet struct { Id *big.Int NewCheckData []byte Raw types.Log } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) FilterUpkeepCheckDataSet(opts *bind.FilterOpts, id []*big.Int) (*IAutomationRegistryMasterUpkeepCheckDataSetIterator, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) FilterUpkeepCheckDataSet(opts *bind.FilterOpts, id []*big.Int) (*IAutomationRegistryMaster23UpkeepCheckDataSetIterator, error) { var idRule []interface{} for _, idItem := range id { idRule = append(idRule, idItem) } - logs, sub, err := _IAutomationRegistryMaster.contract.FilterLogs(opts, "UpkeepCheckDataSet", idRule) + logs, sub, err := _IAutomationRegistryMaster23.contract.FilterLogs(opts, "UpkeepCheckDataSet", idRule) if err != nil { return nil, err } - return &IAutomationRegistryMasterUpkeepCheckDataSetIterator{contract: _IAutomationRegistryMaster.contract, event: "UpkeepCheckDataSet", logs: logs, sub: sub}, nil + return &IAutomationRegistryMaster23UpkeepCheckDataSetIterator{contract: _IAutomationRegistryMaster23.contract, event: "UpkeepCheckDataSet", logs: logs, sub: sub}, nil } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchUpkeepCheckDataSet(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMasterUpkeepCheckDataSet, id []*big.Int) (event.Subscription, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) WatchUpkeepCheckDataSet(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMaster23UpkeepCheckDataSet, id []*big.Int) (event.Subscription, error) { var idRule []interface{} for _, idItem := range id { idRule = append(idRule, idItem) } - logs, sub, err := _IAutomationRegistryMaster.contract.WatchLogs(opts, "UpkeepCheckDataSet", idRule) + logs, sub, err := _IAutomationRegistryMaster23.contract.WatchLogs(opts, "UpkeepCheckDataSet", idRule) if err != nil { return nil, err } @@ -4711,8 +5144,8 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchUpkeep select { case log := <-logs: - event := new(IAutomationRegistryMasterUpkeepCheckDataSet) - if err := _IAutomationRegistryMaster.contract.UnpackLog(event, "UpkeepCheckDataSet", log); err != nil { + event := new(IAutomationRegistryMaster23UpkeepCheckDataSet) + if err := _IAutomationRegistryMaster23.contract.UnpackLog(event, "UpkeepCheckDataSet", log); err != nil { return err } event.Raw = log @@ -4733,17 +5166,17 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchUpkeep }), nil } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) ParseUpkeepCheckDataSet(log types.Log) (*IAutomationRegistryMasterUpkeepCheckDataSet, error) { - event := new(IAutomationRegistryMasterUpkeepCheckDataSet) - if err := _IAutomationRegistryMaster.contract.UnpackLog(event, "UpkeepCheckDataSet", log); err != nil { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) ParseUpkeepCheckDataSet(log types.Log) (*IAutomationRegistryMaster23UpkeepCheckDataSet, error) { + event := new(IAutomationRegistryMaster23UpkeepCheckDataSet) + if err := _IAutomationRegistryMaster23.contract.UnpackLog(event, "UpkeepCheckDataSet", log); err != nil { return nil, err } event.Raw = log return event, nil } -type IAutomationRegistryMasterUpkeepGasLimitSetIterator struct { - Event *IAutomationRegistryMasterUpkeepGasLimitSet +type IAutomationRegistryMaster23UpkeepGasLimitSetIterator struct { + Event *IAutomationRegistryMaster23UpkeepGasLimitSet contract *bind.BoundContract event string @@ -4754,7 +5187,7 @@ type IAutomationRegistryMasterUpkeepGasLimitSetIterator struct { fail error } -func (it *IAutomationRegistryMasterUpkeepGasLimitSetIterator) Next() bool { +func (it *IAutomationRegistryMaster23UpkeepGasLimitSetIterator) Next() bool { if it.fail != nil { return false @@ -4763,7 +5196,7 @@ func (it *IAutomationRegistryMasterUpkeepGasLimitSetIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(IAutomationRegistryMasterUpkeepGasLimitSet) + it.Event = new(IAutomationRegistryMaster23UpkeepGasLimitSet) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -4778,7 +5211,7 @@ func (it *IAutomationRegistryMasterUpkeepGasLimitSetIterator) Next() bool { select { case log := <-it.logs: - it.Event = new(IAutomationRegistryMasterUpkeepGasLimitSet) + it.Event = new(IAutomationRegistryMaster23UpkeepGasLimitSet) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -4793,43 +5226,43 @@ func (it *IAutomationRegistryMasterUpkeepGasLimitSetIterator) Next() bool { } } -func (it *IAutomationRegistryMasterUpkeepGasLimitSetIterator) Error() error { +func (it *IAutomationRegistryMaster23UpkeepGasLimitSetIterator) Error() error { return it.fail } -func (it *IAutomationRegistryMasterUpkeepGasLimitSetIterator) Close() error { +func (it *IAutomationRegistryMaster23UpkeepGasLimitSetIterator) Close() error { it.sub.Unsubscribe() return nil } -type IAutomationRegistryMasterUpkeepGasLimitSet struct { +type IAutomationRegistryMaster23UpkeepGasLimitSet struct { Id *big.Int GasLimit *big.Int Raw types.Log } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) FilterUpkeepGasLimitSet(opts *bind.FilterOpts, id []*big.Int) (*IAutomationRegistryMasterUpkeepGasLimitSetIterator, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) FilterUpkeepGasLimitSet(opts *bind.FilterOpts, id []*big.Int) (*IAutomationRegistryMaster23UpkeepGasLimitSetIterator, error) { var idRule []interface{} for _, idItem := range id { idRule = append(idRule, idItem) } - logs, sub, err := _IAutomationRegistryMaster.contract.FilterLogs(opts, "UpkeepGasLimitSet", idRule) + logs, sub, err := _IAutomationRegistryMaster23.contract.FilterLogs(opts, "UpkeepGasLimitSet", idRule) if err != nil { return nil, err } - return &IAutomationRegistryMasterUpkeepGasLimitSetIterator{contract: _IAutomationRegistryMaster.contract, event: "UpkeepGasLimitSet", logs: logs, sub: sub}, nil + return &IAutomationRegistryMaster23UpkeepGasLimitSetIterator{contract: _IAutomationRegistryMaster23.contract, event: "UpkeepGasLimitSet", logs: logs, sub: sub}, nil } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchUpkeepGasLimitSet(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMasterUpkeepGasLimitSet, id []*big.Int) (event.Subscription, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) WatchUpkeepGasLimitSet(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMaster23UpkeepGasLimitSet, id []*big.Int) (event.Subscription, error) { var idRule []interface{} for _, idItem := range id { idRule = append(idRule, idItem) } - logs, sub, err := _IAutomationRegistryMaster.contract.WatchLogs(opts, "UpkeepGasLimitSet", idRule) + logs, sub, err := _IAutomationRegistryMaster23.contract.WatchLogs(opts, "UpkeepGasLimitSet", idRule) if err != nil { return nil, err } @@ -4839,8 +5272,8 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchUpkeep select { case log := <-logs: - event := new(IAutomationRegistryMasterUpkeepGasLimitSet) - if err := _IAutomationRegistryMaster.contract.UnpackLog(event, "UpkeepGasLimitSet", log); err != nil { + event := new(IAutomationRegistryMaster23UpkeepGasLimitSet) + if err := _IAutomationRegistryMaster23.contract.UnpackLog(event, "UpkeepGasLimitSet", log); err != nil { return err } event.Raw = log @@ -4861,17 +5294,17 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchUpkeep }), nil } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) ParseUpkeepGasLimitSet(log types.Log) (*IAutomationRegistryMasterUpkeepGasLimitSet, error) { - event := new(IAutomationRegistryMasterUpkeepGasLimitSet) - if err := _IAutomationRegistryMaster.contract.UnpackLog(event, "UpkeepGasLimitSet", log); err != nil { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) ParseUpkeepGasLimitSet(log types.Log) (*IAutomationRegistryMaster23UpkeepGasLimitSet, error) { + event := new(IAutomationRegistryMaster23UpkeepGasLimitSet) + if err := _IAutomationRegistryMaster23.contract.UnpackLog(event, "UpkeepGasLimitSet", log); err != nil { return nil, err } event.Raw = log return event, nil } -type IAutomationRegistryMasterUpkeepMigratedIterator struct { - Event *IAutomationRegistryMasterUpkeepMigrated +type IAutomationRegistryMaster23UpkeepMigratedIterator struct { + Event *IAutomationRegistryMaster23UpkeepMigrated contract *bind.BoundContract event string @@ -4882,7 +5315,7 @@ type IAutomationRegistryMasterUpkeepMigratedIterator struct { fail error } -func (it *IAutomationRegistryMasterUpkeepMigratedIterator) Next() bool { +func (it *IAutomationRegistryMaster23UpkeepMigratedIterator) Next() bool { if it.fail != nil { return false @@ -4891,7 +5324,7 @@ func (it *IAutomationRegistryMasterUpkeepMigratedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(IAutomationRegistryMasterUpkeepMigrated) + it.Event = new(IAutomationRegistryMaster23UpkeepMigrated) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -4906,7 +5339,7 @@ func (it *IAutomationRegistryMasterUpkeepMigratedIterator) Next() bool { select { case log := <-it.logs: - it.Event = new(IAutomationRegistryMasterUpkeepMigrated) + it.Event = new(IAutomationRegistryMaster23UpkeepMigrated) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -4921,44 +5354,44 @@ func (it *IAutomationRegistryMasterUpkeepMigratedIterator) Next() bool { } } -func (it *IAutomationRegistryMasterUpkeepMigratedIterator) Error() error { +func (it *IAutomationRegistryMaster23UpkeepMigratedIterator) Error() error { return it.fail } -func (it *IAutomationRegistryMasterUpkeepMigratedIterator) Close() error { +func (it *IAutomationRegistryMaster23UpkeepMigratedIterator) Close() error { it.sub.Unsubscribe() return nil } -type IAutomationRegistryMasterUpkeepMigrated struct { +type IAutomationRegistryMaster23UpkeepMigrated struct { Id *big.Int RemainingBalance *big.Int Destination common.Address Raw types.Log } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) FilterUpkeepMigrated(opts *bind.FilterOpts, id []*big.Int) (*IAutomationRegistryMasterUpkeepMigratedIterator, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) FilterUpkeepMigrated(opts *bind.FilterOpts, id []*big.Int) (*IAutomationRegistryMaster23UpkeepMigratedIterator, error) { var idRule []interface{} for _, idItem := range id { idRule = append(idRule, idItem) } - logs, sub, err := _IAutomationRegistryMaster.contract.FilterLogs(opts, "UpkeepMigrated", idRule) + logs, sub, err := _IAutomationRegistryMaster23.contract.FilterLogs(opts, "UpkeepMigrated", idRule) if err != nil { return nil, err } - return &IAutomationRegistryMasterUpkeepMigratedIterator{contract: _IAutomationRegistryMaster.contract, event: "UpkeepMigrated", logs: logs, sub: sub}, nil + return &IAutomationRegistryMaster23UpkeepMigratedIterator{contract: _IAutomationRegistryMaster23.contract, event: "UpkeepMigrated", logs: logs, sub: sub}, nil } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchUpkeepMigrated(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMasterUpkeepMigrated, id []*big.Int) (event.Subscription, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) WatchUpkeepMigrated(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMaster23UpkeepMigrated, id []*big.Int) (event.Subscription, error) { var idRule []interface{} for _, idItem := range id { idRule = append(idRule, idItem) } - logs, sub, err := _IAutomationRegistryMaster.contract.WatchLogs(opts, "UpkeepMigrated", idRule) + logs, sub, err := _IAutomationRegistryMaster23.contract.WatchLogs(opts, "UpkeepMigrated", idRule) if err != nil { return nil, err } @@ -4968,8 +5401,8 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchUpkeep select { case log := <-logs: - event := new(IAutomationRegistryMasterUpkeepMigrated) - if err := _IAutomationRegistryMaster.contract.UnpackLog(event, "UpkeepMigrated", log); err != nil { + event := new(IAutomationRegistryMaster23UpkeepMigrated) + if err := _IAutomationRegistryMaster23.contract.UnpackLog(event, "UpkeepMigrated", log); err != nil { return err } event.Raw = log @@ -4990,17 +5423,17 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchUpkeep }), nil } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) ParseUpkeepMigrated(log types.Log) (*IAutomationRegistryMasterUpkeepMigrated, error) { - event := new(IAutomationRegistryMasterUpkeepMigrated) - if err := _IAutomationRegistryMaster.contract.UnpackLog(event, "UpkeepMigrated", log); err != nil { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) ParseUpkeepMigrated(log types.Log) (*IAutomationRegistryMaster23UpkeepMigrated, error) { + event := new(IAutomationRegistryMaster23UpkeepMigrated) + if err := _IAutomationRegistryMaster23.contract.UnpackLog(event, "UpkeepMigrated", log); err != nil { return nil, err } event.Raw = log return event, nil } -type IAutomationRegistryMasterUpkeepOffchainConfigSetIterator struct { - Event *IAutomationRegistryMasterUpkeepOffchainConfigSet +type IAutomationRegistryMaster23UpkeepOffchainConfigSetIterator struct { + Event *IAutomationRegistryMaster23UpkeepOffchainConfigSet contract *bind.BoundContract event string @@ -5011,7 +5444,7 @@ type IAutomationRegistryMasterUpkeepOffchainConfigSetIterator struct { fail error } -func (it *IAutomationRegistryMasterUpkeepOffchainConfigSetIterator) Next() bool { +func (it *IAutomationRegistryMaster23UpkeepOffchainConfigSetIterator) Next() bool { if it.fail != nil { return false @@ -5020,7 +5453,7 @@ func (it *IAutomationRegistryMasterUpkeepOffchainConfigSetIterator) Next() bool if it.done { select { case log := <-it.logs: - it.Event = new(IAutomationRegistryMasterUpkeepOffchainConfigSet) + it.Event = new(IAutomationRegistryMaster23UpkeepOffchainConfigSet) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -5035,7 +5468,7 @@ func (it *IAutomationRegistryMasterUpkeepOffchainConfigSetIterator) Next() bool select { case log := <-it.logs: - it.Event = new(IAutomationRegistryMasterUpkeepOffchainConfigSet) + it.Event = new(IAutomationRegistryMaster23UpkeepOffchainConfigSet) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -5050,43 +5483,43 @@ func (it *IAutomationRegistryMasterUpkeepOffchainConfigSetIterator) Next() bool } } -func (it *IAutomationRegistryMasterUpkeepOffchainConfigSetIterator) Error() error { +func (it *IAutomationRegistryMaster23UpkeepOffchainConfigSetIterator) Error() error { return it.fail } -func (it *IAutomationRegistryMasterUpkeepOffchainConfigSetIterator) Close() error { +func (it *IAutomationRegistryMaster23UpkeepOffchainConfigSetIterator) Close() error { it.sub.Unsubscribe() return nil } -type IAutomationRegistryMasterUpkeepOffchainConfigSet struct { +type IAutomationRegistryMaster23UpkeepOffchainConfigSet struct { Id *big.Int OffchainConfig []byte Raw types.Log } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) FilterUpkeepOffchainConfigSet(opts *bind.FilterOpts, id []*big.Int) (*IAutomationRegistryMasterUpkeepOffchainConfigSetIterator, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) FilterUpkeepOffchainConfigSet(opts *bind.FilterOpts, id []*big.Int) (*IAutomationRegistryMaster23UpkeepOffchainConfigSetIterator, error) { var idRule []interface{} for _, idItem := range id { idRule = append(idRule, idItem) } - logs, sub, err := _IAutomationRegistryMaster.contract.FilterLogs(opts, "UpkeepOffchainConfigSet", idRule) + logs, sub, err := _IAutomationRegistryMaster23.contract.FilterLogs(opts, "UpkeepOffchainConfigSet", idRule) if err != nil { return nil, err } - return &IAutomationRegistryMasterUpkeepOffchainConfigSetIterator{contract: _IAutomationRegistryMaster.contract, event: "UpkeepOffchainConfigSet", logs: logs, sub: sub}, nil + return &IAutomationRegistryMaster23UpkeepOffchainConfigSetIterator{contract: _IAutomationRegistryMaster23.contract, event: "UpkeepOffchainConfigSet", logs: logs, sub: sub}, nil } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchUpkeepOffchainConfigSet(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMasterUpkeepOffchainConfigSet, id []*big.Int) (event.Subscription, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) WatchUpkeepOffchainConfigSet(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMaster23UpkeepOffchainConfigSet, id []*big.Int) (event.Subscription, error) { var idRule []interface{} for _, idItem := range id { idRule = append(idRule, idItem) } - logs, sub, err := _IAutomationRegistryMaster.contract.WatchLogs(opts, "UpkeepOffchainConfigSet", idRule) + logs, sub, err := _IAutomationRegistryMaster23.contract.WatchLogs(opts, "UpkeepOffchainConfigSet", idRule) if err != nil { return nil, err } @@ -5096,8 +5529,8 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchUpkeep select { case log := <-logs: - event := new(IAutomationRegistryMasterUpkeepOffchainConfigSet) - if err := _IAutomationRegistryMaster.contract.UnpackLog(event, "UpkeepOffchainConfigSet", log); err != nil { + event := new(IAutomationRegistryMaster23UpkeepOffchainConfigSet) + if err := _IAutomationRegistryMaster23.contract.UnpackLog(event, "UpkeepOffchainConfigSet", log); err != nil { return err } event.Raw = log @@ -5118,17 +5551,17 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchUpkeep }), nil } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) ParseUpkeepOffchainConfigSet(log types.Log) (*IAutomationRegistryMasterUpkeepOffchainConfigSet, error) { - event := new(IAutomationRegistryMasterUpkeepOffchainConfigSet) - if err := _IAutomationRegistryMaster.contract.UnpackLog(event, "UpkeepOffchainConfigSet", log); err != nil { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) ParseUpkeepOffchainConfigSet(log types.Log) (*IAutomationRegistryMaster23UpkeepOffchainConfigSet, error) { + event := new(IAutomationRegistryMaster23UpkeepOffchainConfigSet) + if err := _IAutomationRegistryMaster23.contract.UnpackLog(event, "UpkeepOffchainConfigSet", log); err != nil { return nil, err } event.Raw = log return event, nil } -type IAutomationRegistryMasterUpkeepPausedIterator struct { - Event *IAutomationRegistryMasterUpkeepPaused +type IAutomationRegistryMaster23UpkeepPausedIterator struct { + Event *IAutomationRegistryMaster23UpkeepPaused contract *bind.BoundContract event string @@ -5139,7 +5572,7 @@ type IAutomationRegistryMasterUpkeepPausedIterator struct { fail error } -func (it *IAutomationRegistryMasterUpkeepPausedIterator) Next() bool { +func (it *IAutomationRegistryMaster23UpkeepPausedIterator) Next() bool { if it.fail != nil { return false @@ -5148,7 +5581,7 @@ func (it *IAutomationRegistryMasterUpkeepPausedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(IAutomationRegistryMasterUpkeepPaused) + it.Event = new(IAutomationRegistryMaster23UpkeepPaused) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -5163,7 +5596,7 @@ func (it *IAutomationRegistryMasterUpkeepPausedIterator) Next() bool { select { case log := <-it.logs: - it.Event = new(IAutomationRegistryMasterUpkeepPaused) + it.Event = new(IAutomationRegistryMaster23UpkeepPaused) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -5178,42 +5611,42 @@ func (it *IAutomationRegistryMasterUpkeepPausedIterator) Next() bool { } } -func (it *IAutomationRegistryMasterUpkeepPausedIterator) Error() error { +func (it *IAutomationRegistryMaster23UpkeepPausedIterator) Error() error { return it.fail } -func (it *IAutomationRegistryMasterUpkeepPausedIterator) Close() error { +func (it *IAutomationRegistryMaster23UpkeepPausedIterator) Close() error { it.sub.Unsubscribe() return nil } -type IAutomationRegistryMasterUpkeepPaused struct { +type IAutomationRegistryMaster23UpkeepPaused struct { Id *big.Int Raw types.Log } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) FilterUpkeepPaused(opts *bind.FilterOpts, id []*big.Int) (*IAutomationRegistryMasterUpkeepPausedIterator, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) FilterUpkeepPaused(opts *bind.FilterOpts, id []*big.Int) (*IAutomationRegistryMaster23UpkeepPausedIterator, error) { var idRule []interface{} for _, idItem := range id { idRule = append(idRule, idItem) } - logs, sub, err := _IAutomationRegistryMaster.contract.FilterLogs(opts, "UpkeepPaused", idRule) + logs, sub, err := _IAutomationRegistryMaster23.contract.FilterLogs(opts, "UpkeepPaused", idRule) if err != nil { return nil, err } - return &IAutomationRegistryMasterUpkeepPausedIterator{contract: _IAutomationRegistryMaster.contract, event: "UpkeepPaused", logs: logs, sub: sub}, nil + return &IAutomationRegistryMaster23UpkeepPausedIterator{contract: _IAutomationRegistryMaster23.contract, event: "UpkeepPaused", logs: logs, sub: sub}, nil } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchUpkeepPaused(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMasterUpkeepPaused, id []*big.Int) (event.Subscription, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) WatchUpkeepPaused(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMaster23UpkeepPaused, id []*big.Int) (event.Subscription, error) { var idRule []interface{} for _, idItem := range id { idRule = append(idRule, idItem) } - logs, sub, err := _IAutomationRegistryMaster.contract.WatchLogs(opts, "UpkeepPaused", idRule) + logs, sub, err := _IAutomationRegistryMaster23.contract.WatchLogs(opts, "UpkeepPaused", idRule) if err != nil { return nil, err } @@ -5223,8 +5656,8 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchUpkeep select { case log := <-logs: - event := new(IAutomationRegistryMasterUpkeepPaused) - if err := _IAutomationRegistryMaster.contract.UnpackLog(event, "UpkeepPaused", log); err != nil { + event := new(IAutomationRegistryMaster23UpkeepPaused) + if err := _IAutomationRegistryMaster23.contract.UnpackLog(event, "UpkeepPaused", log); err != nil { return err } event.Raw = log @@ -5245,17 +5678,17 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchUpkeep }), nil } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) ParseUpkeepPaused(log types.Log) (*IAutomationRegistryMasterUpkeepPaused, error) { - event := new(IAutomationRegistryMasterUpkeepPaused) - if err := _IAutomationRegistryMaster.contract.UnpackLog(event, "UpkeepPaused", log); err != nil { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) ParseUpkeepPaused(log types.Log) (*IAutomationRegistryMaster23UpkeepPaused, error) { + event := new(IAutomationRegistryMaster23UpkeepPaused) + if err := _IAutomationRegistryMaster23.contract.UnpackLog(event, "UpkeepPaused", log); err != nil { return nil, err } event.Raw = log return event, nil } -type IAutomationRegistryMasterUpkeepPerformedIterator struct { - Event *IAutomationRegistryMasterUpkeepPerformed +type IAutomationRegistryMaster23UpkeepPerformedIterator struct { + Event *IAutomationRegistryMaster23UpkeepPerformed contract *bind.BoundContract event string @@ -5266,7 +5699,7 @@ type IAutomationRegistryMasterUpkeepPerformedIterator struct { fail error } -func (it *IAutomationRegistryMasterUpkeepPerformedIterator) Next() bool { +func (it *IAutomationRegistryMaster23UpkeepPerformedIterator) Next() bool { if it.fail != nil { return false @@ -5275,7 +5708,7 @@ func (it *IAutomationRegistryMasterUpkeepPerformedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(IAutomationRegistryMasterUpkeepPerformed) + it.Event = new(IAutomationRegistryMaster23UpkeepPerformed) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -5290,7 +5723,7 @@ func (it *IAutomationRegistryMasterUpkeepPerformedIterator) Next() bool { select { case log := <-it.logs: - it.Event = new(IAutomationRegistryMasterUpkeepPerformed) + it.Event = new(IAutomationRegistryMaster23UpkeepPerformed) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -5305,16 +5738,16 @@ func (it *IAutomationRegistryMasterUpkeepPerformedIterator) Next() bool { } } -func (it *IAutomationRegistryMasterUpkeepPerformedIterator) Error() error { +func (it *IAutomationRegistryMaster23UpkeepPerformedIterator) Error() error { return it.fail } -func (it *IAutomationRegistryMasterUpkeepPerformedIterator) Close() error { +func (it *IAutomationRegistryMaster23UpkeepPerformedIterator) Close() error { it.sub.Unsubscribe() return nil } -type IAutomationRegistryMasterUpkeepPerformed struct { +type IAutomationRegistryMaster23UpkeepPerformed struct { Id *big.Int Success bool TotalPayment *big.Int @@ -5324,7 +5757,7 @@ type IAutomationRegistryMasterUpkeepPerformed struct { Raw types.Log } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) FilterUpkeepPerformed(opts *bind.FilterOpts, id []*big.Int, success []bool) (*IAutomationRegistryMasterUpkeepPerformedIterator, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) FilterUpkeepPerformed(opts *bind.FilterOpts, id []*big.Int, success []bool) (*IAutomationRegistryMaster23UpkeepPerformedIterator, error) { var idRule []interface{} for _, idItem := range id { @@ -5335,14 +5768,14 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) FilterUpkee successRule = append(successRule, successItem) } - logs, sub, err := _IAutomationRegistryMaster.contract.FilterLogs(opts, "UpkeepPerformed", idRule, successRule) + logs, sub, err := _IAutomationRegistryMaster23.contract.FilterLogs(opts, "UpkeepPerformed", idRule, successRule) if err != nil { return nil, err } - return &IAutomationRegistryMasterUpkeepPerformedIterator{contract: _IAutomationRegistryMaster.contract, event: "UpkeepPerformed", logs: logs, sub: sub}, nil + return &IAutomationRegistryMaster23UpkeepPerformedIterator{contract: _IAutomationRegistryMaster23.contract, event: "UpkeepPerformed", logs: logs, sub: sub}, nil } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchUpkeepPerformed(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMasterUpkeepPerformed, id []*big.Int, success []bool) (event.Subscription, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) WatchUpkeepPerformed(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMaster23UpkeepPerformed, id []*big.Int, success []bool) (event.Subscription, error) { var idRule []interface{} for _, idItem := range id { @@ -5353,7 +5786,7 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchUpkeep successRule = append(successRule, successItem) } - logs, sub, err := _IAutomationRegistryMaster.contract.WatchLogs(opts, "UpkeepPerformed", idRule, successRule) + logs, sub, err := _IAutomationRegistryMaster23.contract.WatchLogs(opts, "UpkeepPerformed", idRule, successRule) if err != nil { return nil, err } @@ -5363,8 +5796,8 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchUpkeep select { case log := <-logs: - event := new(IAutomationRegistryMasterUpkeepPerformed) - if err := _IAutomationRegistryMaster.contract.UnpackLog(event, "UpkeepPerformed", log); err != nil { + event := new(IAutomationRegistryMaster23UpkeepPerformed) + if err := _IAutomationRegistryMaster23.contract.UnpackLog(event, "UpkeepPerformed", log); err != nil { return err } event.Raw = log @@ -5385,17 +5818,17 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchUpkeep }), nil } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) ParseUpkeepPerformed(log types.Log) (*IAutomationRegistryMasterUpkeepPerformed, error) { - event := new(IAutomationRegistryMasterUpkeepPerformed) - if err := _IAutomationRegistryMaster.contract.UnpackLog(event, "UpkeepPerformed", log); err != nil { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) ParseUpkeepPerformed(log types.Log) (*IAutomationRegistryMaster23UpkeepPerformed, error) { + event := new(IAutomationRegistryMaster23UpkeepPerformed) + if err := _IAutomationRegistryMaster23.contract.UnpackLog(event, "UpkeepPerformed", log); err != nil { return nil, err } event.Raw = log return event, nil } -type IAutomationRegistryMasterUpkeepPrivilegeConfigSetIterator struct { - Event *IAutomationRegistryMasterUpkeepPrivilegeConfigSet +type IAutomationRegistryMaster23UpkeepPrivilegeConfigSetIterator struct { + Event *IAutomationRegistryMaster23UpkeepPrivilegeConfigSet contract *bind.BoundContract event string @@ -5406,7 +5839,7 @@ type IAutomationRegistryMasterUpkeepPrivilegeConfigSetIterator struct { fail error } -func (it *IAutomationRegistryMasterUpkeepPrivilegeConfigSetIterator) Next() bool { +func (it *IAutomationRegistryMaster23UpkeepPrivilegeConfigSetIterator) Next() bool { if it.fail != nil { return false @@ -5415,7 +5848,7 @@ func (it *IAutomationRegistryMasterUpkeepPrivilegeConfigSetIterator) Next() bool if it.done { select { case log := <-it.logs: - it.Event = new(IAutomationRegistryMasterUpkeepPrivilegeConfigSet) + it.Event = new(IAutomationRegistryMaster23UpkeepPrivilegeConfigSet) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -5430,7 +5863,7 @@ func (it *IAutomationRegistryMasterUpkeepPrivilegeConfigSetIterator) Next() bool select { case log := <-it.logs: - it.Event = new(IAutomationRegistryMasterUpkeepPrivilegeConfigSet) + it.Event = new(IAutomationRegistryMaster23UpkeepPrivilegeConfigSet) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -5445,43 +5878,43 @@ func (it *IAutomationRegistryMasterUpkeepPrivilegeConfigSetIterator) Next() bool } } -func (it *IAutomationRegistryMasterUpkeepPrivilegeConfigSetIterator) Error() error { +func (it *IAutomationRegistryMaster23UpkeepPrivilegeConfigSetIterator) Error() error { return it.fail } -func (it *IAutomationRegistryMasterUpkeepPrivilegeConfigSetIterator) Close() error { +func (it *IAutomationRegistryMaster23UpkeepPrivilegeConfigSetIterator) Close() error { it.sub.Unsubscribe() return nil } -type IAutomationRegistryMasterUpkeepPrivilegeConfigSet struct { +type IAutomationRegistryMaster23UpkeepPrivilegeConfigSet struct { Id *big.Int PrivilegeConfig []byte Raw types.Log } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) FilterUpkeepPrivilegeConfigSet(opts *bind.FilterOpts, id []*big.Int) (*IAutomationRegistryMasterUpkeepPrivilegeConfigSetIterator, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) FilterUpkeepPrivilegeConfigSet(opts *bind.FilterOpts, id []*big.Int) (*IAutomationRegistryMaster23UpkeepPrivilegeConfigSetIterator, error) { var idRule []interface{} for _, idItem := range id { idRule = append(idRule, idItem) } - logs, sub, err := _IAutomationRegistryMaster.contract.FilterLogs(opts, "UpkeepPrivilegeConfigSet", idRule) + logs, sub, err := _IAutomationRegistryMaster23.contract.FilterLogs(opts, "UpkeepPrivilegeConfigSet", idRule) if err != nil { return nil, err } - return &IAutomationRegistryMasterUpkeepPrivilegeConfigSetIterator{contract: _IAutomationRegistryMaster.contract, event: "UpkeepPrivilegeConfigSet", logs: logs, sub: sub}, nil + return &IAutomationRegistryMaster23UpkeepPrivilegeConfigSetIterator{contract: _IAutomationRegistryMaster23.contract, event: "UpkeepPrivilegeConfigSet", logs: logs, sub: sub}, nil } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchUpkeepPrivilegeConfigSet(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMasterUpkeepPrivilegeConfigSet, id []*big.Int) (event.Subscription, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) WatchUpkeepPrivilegeConfigSet(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMaster23UpkeepPrivilegeConfigSet, id []*big.Int) (event.Subscription, error) { var idRule []interface{} for _, idItem := range id { idRule = append(idRule, idItem) } - logs, sub, err := _IAutomationRegistryMaster.contract.WatchLogs(opts, "UpkeepPrivilegeConfigSet", idRule) + logs, sub, err := _IAutomationRegistryMaster23.contract.WatchLogs(opts, "UpkeepPrivilegeConfigSet", idRule) if err != nil { return nil, err } @@ -5491,8 +5924,8 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchUpkeep select { case log := <-logs: - event := new(IAutomationRegistryMasterUpkeepPrivilegeConfigSet) - if err := _IAutomationRegistryMaster.contract.UnpackLog(event, "UpkeepPrivilegeConfigSet", log); err != nil { + event := new(IAutomationRegistryMaster23UpkeepPrivilegeConfigSet) + if err := _IAutomationRegistryMaster23.contract.UnpackLog(event, "UpkeepPrivilegeConfigSet", log); err != nil { return err } event.Raw = log @@ -5513,17 +5946,17 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchUpkeep }), nil } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) ParseUpkeepPrivilegeConfigSet(log types.Log) (*IAutomationRegistryMasterUpkeepPrivilegeConfigSet, error) { - event := new(IAutomationRegistryMasterUpkeepPrivilegeConfigSet) - if err := _IAutomationRegistryMaster.contract.UnpackLog(event, "UpkeepPrivilegeConfigSet", log); err != nil { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) ParseUpkeepPrivilegeConfigSet(log types.Log) (*IAutomationRegistryMaster23UpkeepPrivilegeConfigSet, error) { + event := new(IAutomationRegistryMaster23UpkeepPrivilegeConfigSet) + if err := _IAutomationRegistryMaster23.contract.UnpackLog(event, "UpkeepPrivilegeConfigSet", log); err != nil { return nil, err } event.Raw = log return event, nil } -type IAutomationRegistryMasterUpkeepReceivedIterator struct { - Event *IAutomationRegistryMasterUpkeepReceived +type IAutomationRegistryMaster23UpkeepReceivedIterator struct { + Event *IAutomationRegistryMaster23UpkeepReceived contract *bind.BoundContract event string @@ -5534,7 +5967,7 @@ type IAutomationRegistryMasterUpkeepReceivedIterator struct { fail error } -func (it *IAutomationRegistryMasterUpkeepReceivedIterator) Next() bool { +func (it *IAutomationRegistryMaster23UpkeepReceivedIterator) Next() bool { if it.fail != nil { return false @@ -5543,7 +5976,7 @@ func (it *IAutomationRegistryMasterUpkeepReceivedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(IAutomationRegistryMasterUpkeepReceived) + it.Event = new(IAutomationRegistryMaster23UpkeepReceived) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -5558,7 +5991,7 @@ func (it *IAutomationRegistryMasterUpkeepReceivedIterator) Next() bool { select { case log := <-it.logs: - it.Event = new(IAutomationRegistryMasterUpkeepReceived) + it.Event = new(IAutomationRegistryMaster23UpkeepReceived) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -5573,44 +6006,44 @@ func (it *IAutomationRegistryMasterUpkeepReceivedIterator) Next() bool { } } -func (it *IAutomationRegistryMasterUpkeepReceivedIterator) Error() error { +func (it *IAutomationRegistryMaster23UpkeepReceivedIterator) Error() error { return it.fail } -func (it *IAutomationRegistryMasterUpkeepReceivedIterator) Close() error { +func (it *IAutomationRegistryMaster23UpkeepReceivedIterator) Close() error { it.sub.Unsubscribe() return nil } -type IAutomationRegistryMasterUpkeepReceived struct { +type IAutomationRegistryMaster23UpkeepReceived struct { Id *big.Int StartingBalance *big.Int ImportedFrom common.Address Raw types.Log } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) FilterUpkeepReceived(opts *bind.FilterOpts, id []*big.Int) (*IAutomationRegistryMasterUpkeepReceivedIterator, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) FilterUpkeepReceived(opts *bind.FilterOpts, id []*big.Int) (*IAutomationRegistryMaster23UpkeepReceivedIterator, error) { var idRule []interface{} for _, idItem := range id { idRule = append(idRule, idItem) } - logs, sub, err := _IAutomationRegistryMaster.contract.FilterLogs(opts, "UpkeepReceived", idRule) + logs, sub, err := _IAutomationRegistryMaster23.contract.FilterLogs(opts, "UpkeepReceived", idRule) if err != nil { return nil, err } - return &IAutomationRegistryMasterUpkeepReceivedIterator{contract: _IAutomationRegistryMaster.contract, event: "UpkeepReceived", logs: logs, sub: sub}, nil + return &IAutomationRegistryMaster23UpkeepReceivedIterator{contract: _IAutomationRegistryMaster23.contract, event: "UpkeepReceived", logs: logs, sub: sub}, nil } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchUpkeepReceived(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMasterUpkeepReceived, id []*big.Int) (event.Subscription, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) WatchUpkeepReceived(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMaster23UpkeepReceived, id []*big.Int) (event.Subscription, error) { var idRule []interface{} for _, idItem := range id { idRule = append(idRule, idItem) } - logs, sub, err := _IAutomationRegistryMaster.contract.WatchLogs(opts, "UpkeepReceived", idRule) + logs, sub, err := _IAutomationRegistryMaster23.contract.WatchLogs(opts, "UpkeepReceived", idRule) if err != nil { return nil, err } @@ -5620,8 +6053,8 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchUpkeep select { case log := <-logs: - event := new(IAutomationRegistryMasterUpkeepReceived) - if err := _IAutomationRegistryMaster.contract.UnpackLog(event, "UpkeepReceived", log); err != nil { + event := new(IAutomationRegistryMaster23UpkeepReceived) + if err := _IAutomationRegistryMaster23.contract.UnpackLog(event, "UpkeepReceived", log); err != nil { return err } event.Raw = log @@ -5642,17 +6075,17 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchUpkeep }), nil } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) ParseUpkeepReceived(log types.Log) (*IAutomationRegistryMasterUpkeepReceived, error) { - event := new(IAutomationRegistryMasterUpkeepReceived) - if err := _IAutomationRegistryMaster.contract.UnpackLog(event, "UpkeepReceived", log); err != nil { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) ParseUpkeepReceived(log types.Log) (*IAutomationRegistryMaster23UpkeepReceived, error) { + event := new(IAutomationRegistryMaster23UpkeepReceived) + if err := _IAutomationRegistryMaster23.contract.UnpackLog(event, "UpkeepReceived", log); err != nil { return nil, err } event.Raw = log return event, nil } -type IAutomationRegistryMasterUpkeepRegisteredIterator struct { - Event *IAutomationRegistryMasterUpkeepRegistered +type IAutomationRegistryMaster23UpkeepRegisteredIterator struct { + Event *IAutomationRegistryMaster23UpkeepRegistered contract *bind.BoundContract event string @@ -5663,7 +6096,7 @@ type IAutomationRegistryMasterUpkeepRegisteredIterator struct { fail error } -func (it *IAutomationRegistryMasterUpkeepRegisteredIterator) Next() bool { +func (it *IAutomationRegistryMaster23UpkeepRegisteredIterator) Next() bool { if it.fail != nil { return false @@ -5672,7 +6105,7 @@ func (it *IAutomationRegistryMasterUpkeepRegisteredIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(IAutomationRegistryMasterUpkeepRegistered) + it.Event = new(IAutomationRegistryMaster23UpkeepRegistered) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -5687,7 +6120,7 @@ func (it *IAutomationRegistryMasterUpkeepRegisteredIterator) Next() bool { select { case log := <-it.logs: - it.Event = new(IAutomationRegistryMasterUpkeepRegistered) + it.Event = new(IAutomationRegistryMaster23UpkeepRegistered) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -5702,44 +6135,44 @@ func (it *IAutomationRegistryMasterUpkeepRegisteredIterator) Next() bool { } } -func (it *IAutomationRegistryMasterUpkeepRegisteredIterator) Error() error { +func (it *IAutomationRegistryMaster23UpkeepRegisteredIterator) Error() error { return it.fail } -func (it *IAutomationRegistryMasterUpkeepRegisteredIterator) Close() error { +func (it *IAutomationRegistryMaster23UpkeepRegisteredIterator) Close() error { it.sub.Unsubscribe() return nil } -type IAutomationRegistryMasterUpkeepRegistered struct { +type IAutomationRegistryMaster23UpkeepRegistered struct { Id *big.Int PerformGas uint32 Admin common.Address Raw types.Log } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) FilterUpkeepRegistered(opts *bind.FilterOpts, id []*big.Int) (*IAutomationRegistryMasterUpkeepRegisteredIterator, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) FilterUpkeepRegistered(opts *bind.FilterOpts, id []*big.Int) (*IAutomationRegistryMaster23UpkeepRegisteredIterator, error) { var idRule []interface{} for _, idItem := range id { idRule = append(idRule, idItem) } - logs, sub, err := _IAutomationRegistryMaster.contract.FilterLogs(opts, "UpkeepRegistered", idRule) + logs, sub, err := _IAutomationRegistryMaster23.contract.FilterLogs(opts, "UpkeepRegistered", idRule) if err != nil { return nil, err } - return &IAutomationRegistryMasterUpkeepRegisteredIterator{contract: _IAutomationRegistryMaster.contract, event: "UpkeepRegistered", logs: logs, sub: sub}, nil + return &IAutomationRegistryMaster23UpkeepRegisteredIterator{contract: _IAutomationRegistryMaster23.contract, event: "UpkeepRegistered", logs: logs, sub: sub}, nil } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchUpkeepRegistered(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMasterUpkeepRegistered, id []*big.Int) (event.Subscription, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) WatchUpkeepRegistered(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMaster23UpkeepRegistered, id []*big.Int) (event.Subscription, error) { var idRule []interface{} for _, idItem := range id { idRule = append(idRule, idItem) } - logs, sub, err := _IAutomationRegistryMaster.contract.WatchLogs(opts, "UpkeepRegistered", idRule) + logs, sub, err := _IAutomationRegistryMaster23.contract.WatchLogs(opts, "UpkeepRegistered", idRule) if err != nil { return nil, err } @@ -5749,8 +6182,8 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchUpkeep select { case log := <-logs: - event := new(IAutomationRegistryMasterUpkeepRegistered) - if err := _IAutomationRegistryMaster.contract.UnpackLog(event, "UpkeepRegistered", log); err != nil { + event := new(IAutomationRegistryMaster23UpkeepRegistered) + if err := _IAutomationRegistryMaster23.contract.UnpackLog(event, "UpkeepRegistered", log); err != nil { return err } event.Raw = log @@ -5771,17 +6204,17 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchUpkeep }), nil } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) ParseUpkeepRegistered(log types.Log) (*IAutomationRegistryMasterUpkeepRegistered, error) { - event := new(IAutomationRegistryMasterUpkeepRegistered) - if err := _IAutomationRegistryMaster.contract.UnpackLog(event, "UpkeepRegistered", log); err != nil { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) ParseUpkeepRegistered(log types.Log) (*IAutomationRegistryMaster23UpkeepRegistered, error) { + event := new(IAutomationRegistryMaster23UpkeepRegistered) + if err := _IAutomationRegistryMaster23.contract.UnpackLog(event, "UpkeepRegistered", log); err != nil { return nil, err } event.Raw = log return event, nil } -type IAutomationRegistryMasterUpkeepTriggerConfigSetIterator struct { - Event *IAutomationRegistryMasterUpkeepTriggerConfigSet +type IAutomationRegistryMaster23UpkeepTriggerConfigSetIterator struct { + Event *IAutomationRegistryMaster23UpkeepTriggerConfigSet contract *bind.BoundContract event string @@ -5792,7 +6225,7 @@ type IAutomationRegistryMasterUpkeepTriggerConfigSetIterator struct { fail error } -func (it *IAutomationRegistryMasterUpkeepTriggerConfigSetIterator) Next() bool { +func (it *IAutomationRegistryMaster23UpkeepTriggerConfigSetIterator) Next() bool { if it.fail != nil { return false @@ -5801,7 +6234,7 @@ func (it *IAutomationRegistryMasterUpkeepTriggerConfigSetIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(IAutomationRegistryMasterUpkeepTriggerConfigSet) + it.Event = new(IAutomationRegistryMaster23UpkeepTriggerConfigSet) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -5816,7 +6249,7 @@ func (it *IAutomationRegistryMasterUpkeepTriggerConfigSetIterator) Next() bool { select { case log := <-it.logs: - it.Event = new(IAutomationRegistryMasterUpkeepTriggerConfigSet) + it.Event = new(IAutomationRegistryMaster23UpkeepTriggerConfigSet) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -5831,43 +6264,43 @@ func (it *IAutomationRegistryMasterUpkeepTriggerConfigSetIterator) Next() bool { } } -func (it *IAutomationRegistryMasterUpkeepTriggerConfigSetIterator) Error() error { +func (it *IAutomationRegistryMaster23UpkeepTriggerConfigSetIterator) Error() error { return it.fail } -func (it *IAutomationRegistryMasterUpkeepTriggerConfigSetIterator) Close() error { +func (it *IAutomationRegistryMaster23UpkeepTriggerConfigSetIterator) Close() error { it.sub.Unsubscribe() return nil } -type IAutomationRegistryMasterUpkeepTriggerConfigSet struct { +type IAutomationRegistryMaster23UpkeepTriggerConfigSet struct { Id *big.Int TriggerConfig []byte Raw types.Log } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) FilterUpkeepTriggerConfigSet(opts *bind.FilterOpts, id []*big.Int) (*IAutomationRegistryMasterUpkeepTriggerConfigSetIterator, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) FilterUpkeepTriggerConfigSet(opts *bind.FilterOpts, id []*big.Int) (*IAutomationRegistryMaster23UpkeepTriggerConfigSetIterator, error) { var idRule []interface{} for _, idItem := range id { idRule = append(idRule, idItem) } - logs, sub, err := _IAutomationRegistryMaster.contract.FilterLogs(opts, "UpkeepTriggerConfigSet", idRule) + logs, sub, err := _IAutomationRegistryMaster23.contract.FilterLogs(opts, "UpkeepTriggerConfigSet", idRule) if err != nil { return nil, err } - return &IAutomationRegistryMasterUpkeepTriggerConfigSetIterator{contract: _IAutomationRegistryMaster.contract, event: "UpkeepTriggerConfigSet", logs: logs, sub: sub}, nil + return &IAutomationRegistryMaster23UpkeepTriggerConfigSetIterator{contract: _IAutomationRegistryMaster23.contract, event: "UpkeepTriggerConfigSet", logs: logs, sub: sub}, nil } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchUpkeepTriggerConfigSet(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMasterUpkeepTriggerConfigSet, id []*big.Int) (event.Subscription, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) WatchUpkeepTriggerConfigSet(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMaster23UpkeepTriggerConfigSet, id []*big.Int) (event.Subscription, error) { var idRule []interface{} for _, idItem := range id { idRule = append(idRule, idItem) } - logs, sub, err := _IAutomationRegistryMaster.contract.WatchLogs(opts, "UpkeepTriggerConfigSet", idRule) + logs, sub, err := _IAutomationRegistryMaster23.contract.WatchLogs(opts, "UpkeepTriggerConfigSet", idRule) if err != nil { return nil, err } @@ -5877,8 +6310,8 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchUpkeep select { case log := <-logs: - event := new(IAutomationRegistryMasterUpkeepTriggerConfigSet) - if err := _IAutomationRegistryMaster.contract.UnpackLog(event, "UpkeepTriggerConfigSet", log); err != nil { + event := new(IAutomationRegistryMaster23UpkeepTriggerConfigSet) + if err := _IAutomationRegistryMaster23.contract.UnpackLog(event, "UpkeepTriggerConfigSet", log); err != nil { return err } event.Raw = log @@ -5899,17 +6332,17 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchUpkeep }), nil } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) ParseUpkeepTriggerConfigSet(log types.Log) (*IAutomationRegistryMasterUpkeepTriggerConfigSet, error) { - event := new(IAutomationRegistryMasterUpkeepTriggerConfigSet) - if err := _IAutomationRegistryMaster.contract.UnpackLog(event, "UpkeepTriggerConfigSet", log); err != nil { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) ParseUpkeepTriggerConfigSet(log types.Log) (*IAutomationRegistryMaster23UpkeepTriggerConfigSet, error) { + event := new(IAutomationRegistryMaster23UpkeepTriggerConfigSet) + if err := _IAutomationRegistryMaster23.contract.UnpackLog(event, "UpkeepTriggerConfigSet", log); err != nil { return nil, err } event.Raw = log return event, nil } -type IAutomationRegistryMasterUpkeepUnpausedIterator struct { - Event *IAutomationRegistryMasterUpkeepUnpaused +type IAutomationRegistryMaster23UpkeepUnpausedIterator struct { + Event *IAutomationRegistryMaster23UpkeepUnpaused contract *bind.BoundContract event string @@ -5920,7 +6353,7 @@ type IAutomationRegistryMasterUpkeepUnpausedIterator struct { fail error } -func (it *IAutomationRegistryMasterUpkeepUnpausedIterator) Next() bool { +func (it *IAutomationRegistryMaster23UpkeepUnpausedIterator) Next() bool { if it.fail != nil { return false @@ -5929,7 +6362,7 @@ func (it *IAutomationRegistryMasterUpkeepUnpausedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(IAutomationRegistryMasterUpkeepUnpaused) + it.Event = new(IAutomationRegistryMaster23UpkeepUnpaused) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -5944,7 +6377,7 @@ func (it *IAutomationRegistryMasterUpkeepUnpausedIterator) Next() bool { select { case log := <-it.logs: - it.Event = new(IAutomationRegistryMasterUpkeepUnpaused) + it.Event = new(IAutomationRegistryMaster23UpkeepUnpaused) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -5959,42 +6392,42 @@ func (it *IAutomationRegistryMasterUpkeepUnpausedIterator) Next() bool { } } -func (it *IAutomationRegistryMasterUpkeepUnpausedIterator) Error() error { +func (it *IAutomationRegistryMaster23UpkeepUnpausedIterator) Error() error { return it.fail } -func (it *IAutomationRegistryMasterUpkeepUnpausedIterator) Close() error { +func (it *IAutomationRegistryMaster23UpkeepUnpausedIterator) Close() error { it.sub.Unsubscribe() return nil } -type IAutomationRegistryMasterUpkeepUnpaused struct { +type IAutomationRegistryMaster23UpkeepUnpaused struct { Id *big.Int Raw types.Log } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) FilterUpkeepUnpaused(opts *bind.FilterOpts, id []*big.Int) (*IAutomationRegistryMasterUpkeepUnpausedIterator, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) FilterUpkeepUnpaused(opts *bind.FilterOpts, id []*big.Int) (*IAutomationRegistryMaster23UpkeepUnpausedIterator, error) { var idRule []interface{} for _, idItem := range id { idRule = append(idRule, idItem) } - logs, sub, err := _IAutomationRegistryMaster.contract.FilterLogs(opts, "UpkeepUnpaused", idRule) + logs, sub, err := _IAutomationRegistryMaster23.contract.FilterLogs(opts, "UpkeepUnpaused", idRule) if err != nil { return nil, err } - return &IAutomationRegistryMasterUpkeepUnpausedIterator{contract: _IAutomationRegistryMaster.contract, event: "UpkeepUnpaused", logs: logs, sub: sub}, nil + return &IAutomationRegistryMaster23UpkeepUnpausedIterator{contract: _IAutomationRegistryMaster23.contract, event: "UpkeepUnpaused", logs: logs, sub: sub}, nil } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchUpkeepUnpaused(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMasterUpkeepUnpaused, id []*big.Int) (event.Subscription, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) WatchUpkeepUnpaused(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMaster23UpkeepUnpaused, id []*big.Int) (event.Subscription, error) { var idRule []interface{} for _, idItem := range id { idRule = append(idRule, idItem) } - logs, sub, err := _IAutomationRegistryMaster.contract.WatchLogs(opts, "UpkeepUnpaused", idRule) + logs, sub, err := _IAutomationRegistryMaster23.contract.WatchLogs(opts, "UpkeepUnpaused", idRule) if err != nil { return nil, err } @@ -6004,8 +6437,8 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchUpkeep select { case log := <-logs: - event := new(IAutomationRegistryMasterUpkeepUnpaused) - if err := _IAutomationRegistryMaster.contract.UnpackLog(event, "UpkeepUnpaused", log); err != nil { + event := new(IAutomationRegistryMaster23UpkeepUnpaused) + if err := _IAutomationRegistryMaster23.contract.UnpackLog(event, "UpkeepUnpaused", log); err != nil { return err } event.Raw = log @@ -6026,9 +6459,9 @@ func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) WatchUpkeep }), nil } -func (_IAutomationRegistryMaster *IAutomationRegistryMasterFilterer) ParseUpkeepUnpaused(log types.Log) (*IAutomationRegistryMasterUpkeepUnpaused, error) { - event := new(IAutomationRegistryMasterUpkeepUnpaused) - if err := _IAutomationRegistryMaster.contract.UnpackLog(event, "UpkeepUnpaused", log); err != nil { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23Filterer) ParseUpkeepUnpaused(log types.Log) (*IAutomationRegistryMaster23UpkeepUnpaused, error) { + event := new(IAutomationRegistryMaster23UpkeepUnpaused) + if err := _IAutomationRegistryMaster23.contract.UnpackLog(event, "UpkeepUnpaused", log); err != nil { return nil, err } event.Raw = log @@ -6048,7 +6481,7 @@ type CheckUpkeep struct { GasUsed *big.Int GasLimit *big.Int FastGasWei *big.Int - LinkNative *big.Int + LinkUSD *big.Int } type CheckUpkeep0 struct { UpkeepNeeded bool @@ -6057,15 +6490,15 @@ type CheckUpkeep0 struct { GasUsed *big.Int GasLimit *big.Int FastGasWei *big.Int - LinkNative *big.Int + LinkUSD *big.Int } type GetSignerInfo struct { Active bool Index uint8 } type GetState struct { - State AutomationRegistryBase23State - Config AutomationRegistryBase23OnchainConfigLegacy + State IAutomationV21PlusCommonStateLegacy + Config IAutomationV21PlusCommonOnchainConfigLegacy Signers []common.Address Transmitters []common.Address F uint8 @@ -6092,223 +6525,229 @@ type SimulatePerformUpkeep struct { GasUsed *big.Int } -func (_IAutomationRegistryMaster *IAutomationRegistryMaster) ParseLog(log types.Log) (generated.AbigenLog, error) { +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23) ParseLog(log types.Log) (generated.AbigenLog, error) { switch log.Topics[0] { - case _IAutomationRegistryMaster.abi.Events["AdminPrivilegeConfigSet"].ID: - return _IAutomationRegistryMaster.ParseAdminPrivilegeConfigSet(log) - case _IAutomationRegistryMaster.abi.Events["CancelledUpkeepReport"].ID: - return _IAutomationRegistryMaster.ParseCancelledUpkeepReport(log) - case _IAutomationRegistryMaster.abi.Events["ChainSpecificModuleUpdated"].ID: - return _IAutomationRegistryMaster.ParseChainSpecificModuleUpdated(log) - case _IAutomationRegistryMaster.abi.Events["ConfigSet"].ID: - return _IAutomationRegistryMaster.ParseConfigSet(log) - case _IAutomationRegistryMaster.abi.Events["DedupKeyAdded"].ID: - return _IAutomationRegistryMaster.ParseDedupKeyAdded(log) - case _IAutomationRegistryMaster.abi.Events["FundsAdded"].ID: - return _IAutomationRegistryMaster.ParseFundsAdded(log) - case _IAutomationRegistryMaster.abi.Events["FundsWithdrawn"].ID: - return _IAutomationRegistryMaster.ParseFundsWithdrawn(log) - case _IAutomationRegistryMaster.abi.Events["InsufficientFundsUpkeepReport"].ID: - return _IAutomationRegistryMaster.ParseInsufficientFundsUpkeepReport(log) - case _IAutomationRegistryMaster.abi.Events["OwnerFundsWithdrawn"].ID: - return _IAutomationRegistryMaster.ParseOwnerFundsWithdrawn(log) - case _IAutomationRegistryMaster.abi.Events["OwnershipTransferRequested"].ID: - return _IAutomationRegistryMaster.ParseOwnershipTransferRequested(log) - case _IAutomationRegistryMaster.abi.Events["OwnershipTransferred"].ID: - return _IAutomationRegistryMaster.ParseOwnershipTransferred(log) - case _IAutomationRegistryMaster.abi.Events["Paused"].ID: - return _IAutomationRegistryMaster.ParsePaused(log) - case _IAutomationRegistryMaster.abi.Events["PayeesUpdated"].ID: - return _IAutomationRegistryMaster.ParsePayeesUpdated(log) - case _IAutomationRegistryMaster.abi.Events["PayeeshipTransferRequested"].ID: - return _IAutomationRegistryMaster.ParsePayeeshipTransferRequested(log) - case _IAutomationRegistryMaster.abi.Events["PayeeshipTransferred"].ID: - return _IAutomationRegistryMaster.ParsePayeeshipTransferred(log) - case _IAutomationRegistryMaster.abi.Events["PaymentWithdrawn"].ID: - return _IAutomationRegistryMaster.ParsePaymentWithdrawn(log) - case _IAutomationRegistryMaster.abi.Events["ReorgedUpkeepReport"].ID: - return _IAutomationRegistryMaster.ParseReorgedUpkeepReport(log) - case _IAutomationRegistryMaster.abi.Events["StaleUpkeepReport"].ID: - return _IAutomationRegistryMaster.ParseStaleUpkeepReport(log) - case _IAutomationRegistryMaster.abi.Events["Transmitted"].ID: - return _IAutomationRegistryMaster.ParseTransmitted(log) - case _IAutomationRegistryMaster.abi.Events["Unpaused"].ID: - return _IAutomationRegistryMaster.ParseUnpaused(log) - case _IAutomationRegistryMaster.abi.Events["UpkeepAdminTransferRequested"].ID: - return _IAutomationRegistryMaster.ParseUpkeepAdminTransferRequested(log) - case _IAutomationRegistryMaster.abi.Events["UpkeepAdminTransferred"].ID: - return _IAutomationRegistryMaster.ParseUpkeepAdminTransferred(log) - case _IAutomationRegistryMaster.abi.Events["UpkeepCanceled"].ID: - return _IAutomationRegistryMaster.ParseUpkeepCanceled(log) - case _IAutomationRegistryMaster.abi.Events["UpkeepCheckDataSet"].ID: - return _IAutomationRegistryMaster.ParseUpkeepCheckDataSet(log) - case _IAutomationRegistryMaster.abi.Events["UpkeepGasLimitSet"].ID: - return _IAutomationRegistryMaster.ParseUpkeepGasLimitSet(log) - case _IAutomationRegistryMaster.abi.Events["UpkeepMigrated"].ID: - return _IAutomationRegistryMaster.ParseUpkeepMigrated(log) - case _IAutomationRegistryMaster.abi.Events["UpkeepOffchainConfigSet"].ID: - return _IAutomationRegistryMaster.ParseUpkeepOffchainConfigSet(log) - case _IAutomationRegistryMaster.abi.Events["UpkeepPaused"].ID: - return _IAutomationRegistryMaster.ParseUpkeepPaused(log) - case _IAutomationRegistryMaster.abi.Events["UpkeepPerformed"].ID: - return _IAutomationRegistryMaster.ParseUpkeepPerformed(log) - case _IAutomationRegistryMaster.abi.Events["UpkeepPrivilegeConfigSet"].ID: - return _IAutomationRegistryMaster.ParseUpkeepPrivilegeConfigSet(log) - case _IAutomationRegistryMaster.abi.Events["UpkeepReceived"].ID: - return _IAutomationRegistryMaster.ParseUpkeepReceived(log) - case _IAutomationRegistryMaster.abi.Events["UpkeepRegistered"].ID: - return _IAutomationRegistryMaster.ParseUpkeepRegistered(log) - case _IAutomationRegistryMaster.abi.Events["UpkeepTriggerConfigSet"].ID: - return _IAutomationRegistryMaster.ParseUpkeepTriggerConfigSet(log) - case _IAutomationRegistryMaster.abi.Events["UpkeepUnpaused"].ID: - return _IAutomationRegistryMaster.ParseUpkeepUnpaused(log) + case _IAutomationRegistryMaster23.abi.Events["AdminPrivilegeConfigSet"].ID: + return _IAutomationRegistryMaster23.ParseAdminPrivilegeConfigSet(log) + case _IAutomationRegistryMaster23.abi.Events["BillingConfigSet"].ID: + return _IAutomationRegistryMaster23.ParseBillingConfigSet(log) + case _IAutomationRegistryMaster23.abi.Events["CancelledUpkeepReport"].ID: + return _IAutomationRegistryMaster23.ParseCancelledUpkeepReport(log) + case _IAutomationRegistryMaster23.abi.Events["ChainSpecificModuleUpdated"].ID: + return _IAutomationRegistryMaster23.ParseChainSpecificModuleUpdated(log) + case _IAutomationRegistryMaster23.abi.Events["ConfigSet"].ID: + return _IAutomationRegistryMaster23.ParseConfigSet(log) + case _IAutomationRegistryMaster23.abi.Events["DedupKeyAdded"].ID: + return _IAutomationRegistryMaster23.ParseDedupKeyAdded(log) + case _IAutomationRegistryMaster23.abi.Events["FeesWithdrawn"].ID: + return _IAutomationRegistryMaster23.ParseFeesWithdrawn(log) + case _IAutomationRegistryMaster23.abi.Events["FundsAdded"].ID: + return _IAutomationRegistryMaster23.ParseFundsAdded(log) + case _IAutomationRegistryMaster23.abi.Events["FundsWithdrawn"].ID: + return _IAutomationRegistryMaster23.ParseFundsWithdrawn(log) + case _IAutomationRegistryMaster23.abi.Events["InsufficientFundsUpkeepReport"].ID: + return _IAutomationRegistryMaster23.ParseInsufficientFundsUpkeepReport(log) + case _IAutomationRegistryMaster23.abi.Events["OwnershipTransferRequested"].ID: + return _IAutomationRegistryMaster23.ParseOwnershipTransferRequested(log) + case _IAutomationRegistryMaster23.abi.Events["OwnershipTransferred"].ID: + return _IAutomationRegistryMaster23.ParseOwnershipTransferred(log) + case _IAutomationRegistryMaster23.abi.Events["Paused"].ID: + return _IAutomationRegistryMaster23.ParsePaused(log) + case _IAutomationRegistryMaster23.abi.Events["PayeesUpdated"].ID: + return _IAutomationRegistryMaster23.ParsePayeesUpdated(log) + case _IAutomationRegistryMaster23.abi.Events["PayeeshipTransferRequested"].ID: + return _IAutomationRegistryMaster23.ParsePayeeshipTransferRequested(log) + case _IAutomationRegistryMaster23.abi.Events["PayeeshipTransferred"].ID: + return _IAutomationRegistryMaster23.ParsePayeeshipTransferred(log) + case _IAutomationRegistryMaster23.abi.Events["PaymentWithdrawn"].ID: + return _IAutomationRegistryMaster23.ParsePaymentWithdrawn(log) + case _IAutomationRegistryMaster23.abi.Events["ReorgedUpkeepReport"].ID: + return _IAutomationRegistryMaster23.ParseReorgedUpkeepReport(log) + case _IAutomationRegistryMaster23.abi.Events["StaleUpkeepReport"].ID: + return _IAutomationRegistryMaster23.ParseStaleUpkeepReport(log) + case _IAutomationRegistryMaster23.abi.Events["Transmitted"].ID: + return _IAutomationRegistryMaster23.ParseTransmitted(log) + case _IAutomationRegistryMaster23.abi.Events["Unpaused"].ID: + return _IAutomationRegistryMaster23.ParseUnpaused(log) + case _IAutomationRegistryMaster23.abi.Events["UpkeepAdminTransferRequested"].ID: + return _IAutomationRegistryMaster23.ParseUpkeepAdminTransferRequested(log) + case _IAutomationRegistryMaster23.abi.Events["UpkeepAdminTransferred"].ID: + return _IAutomationRegistryMaster23.ParseUpkeepAdminTransferred(log) + case _IAutomationRegistryMaster23.abi.Events["UpkeepCanceled"].ID: + return _IAutomationRegistryMaster23.ParseUpkeepCanceled(log) + case _IAutomationRegistryMaster23.abi.Events["UpkeepCheckDataSet"].ID: + return _IAutomationRegistryMaster23.ParseUpkeepCheckDataSet(log) + case _IAutomationRegistryMaster23.abi.Events["UpkeepGasLimitSet"].ID: + return _IAutomationRegistryMaster23.ParseUpkeepGasLimitSet(log) + case _IAutomationRegistryMaster23.abi.Events["UpkeepMigrated"].ID: + return _IAutomationRegistryMaster23.ParseUpkeepMigrated(log) + case _IAutomationRegistryMaster23.abi.Events["UpkeepOffchainConfigSet"].ID: + return _IAutomationRegistryMaster23.ParseUpkeepOffchainConfigSet(log) + case _IAutomationRegistryMaster23.abi.Events["UpkeepPaused"].ID: + return _IAutomationRegistryMaster23.ParseUpkeepPaused(log) + case _IAutomationRegistryMaster23.abi.Events["UpkeepPerformed"].ID: + return _IAutomationRegistryMaster23.ParseUpkeepPerformed(log) + case _IAutomationRegistryMaster23.abi.Events["UpkeepPrivilegeConfigSet"].ID: + return _IAutomationRegistryMaster23.ParseUpkeepPrivilegeConfigSet(log) + case _IAutomationRegistryMaster23.abi.Events["UpkeepReceived"].ID: + return _IAutomationRegistryMaster23.ParseUpkeepReceived(log) + case _IAutomationRegistryMaster23.abi.Events["UpkeepRegistered"].ID: + return _IAutomationRegistryMaster23.ParseUpkeepRegistered(log) + case _IAutomationRegistryMaster23.abi.Events["UpkeepTriggerConfigSet"].ID: + return _IAutomationRegistryMaster23.ParseUpkeepTriggerConfigSet(log) + case _IAutomationRegistryMaster23.abi.Events["UpkeepUnpaused"].ID: + return _IAutomationRegistryMaster23.ParseUpkeepUnpaused(log) default: return nil, fmt.Errorf("abigen wrapper received unknown log topic: %v", log.Topics[0]) } } -func (IAutomationRegistryMasterAdminPrivilegeConfigSet) Topic() common.Hash { +func (IAutomationRegistryMaster23AdminPrivilegeConfigSet) Topic() common.Hash { return common.HexToHash("0x7c44b4eb59ee7873514e7e43e7718c269d872965938b288aa143befca62f99d2") } -func (IAutomationRegistryMasterCancelledUpkeepReport) Topic() common.Hash { +func (IAutomationRegistryMaster23BillingConfigSet) Topic() common.Hash { + return common.HexToHash("0x720a5849025dc4fd0061aed1bb30efd713cde64ce7f8d807953ecca27c8f143c") +} + +func (IAutomationRegistryMaster23CancelledUpkeepReport) Topic() common.Hash { return common.HexToHash("0xc3237c8807c467c1b39b8d0395eff077313e691bf0a7388106792564ebfd5636") } -func (IAutomationRegistryMasterChainSpecificModuleUpdated) Topic() common.Hash { +func (IAutomationRegistryMaster23ChainSpecificModuleUpdated) Topic() common.Hash { return common.HexToHash("0xdefc28b11a7980dbe0c49dbbd7055a1584bc8075097d1e8b3b57fb7283df2ad7") } -func (IAutomationRegistryMasterConfigSet) Topic() common.Hash { +func (IAutomationRegistryMaster23ConfigSet) Topic() common.Hash { return common.HexToHash("0x1591690b8638f5fb2dbec82ac741805ac5da8b45dc5263f4875b0496fdce4e05") } -func (IAutomationRegistryMasterDedupKeyAdded) Topic() common.Hash { +func (IAutomationRegistryMaster23DedupKeyAdded) Topic() common.Hash { return common.HexToHash("0xa4a4e334c0e330143f9437484fe516c13bc560b86b5b0daf58e7084aaac228f2") } -func (IAutomationRegistryMasterFundsAdded) Topic() common.Hash { +func (IAutomationRegistryMaster23FeesWithdrawn) Topic() common.Hash { + return common.HexToHash("0x5e110f8bc8a20b65dcc87f224bdf1cc039346e267118bae2739847f07321ffa8") +} + +func (IAutomationRegistryMaster23FundsAdded) Topic() common.Hash { return common.HexToHash("0xafd24114486da8ebfc32f3626dada8863652e187461aa74d4bfa734891506203") } -func (IAutomationRegistryMasterFundsWithdrawn) Topic() common.Hash { +func (IAutomationRegistryMaster23FundsWithdrawn) Topic() common.Hash { return common.HexToHash("0xf3b5906e5672f3e524854103bcafbbdba80dbdfeca2c35e116127b1060a68318") } -func (IAutomationRegistryMasterInsufficientFundsUpkeepReport) Topic() common.Hash { +func (IAutomationRegistryMaster23InsufficientFundsUpkeepReport) Topic() common.Hash { return common.HexToHash("0x377c8b0c126ae5248d27aca1c76fac4608aff85673ee3caf09747e1044549e02") } -func (IAutomationRegistryMasterOwnerFundsWithdrawn) Topic() common.Hash { - return common.HexToHash("0x1d07d0b0be43d3e5fee41a80b579af370affee03fa595bf56d5d4c19328162f1") -} - -func (IAutomationRegistryMasterOwnershipTransferRequested) Topic() common.Hash { +func (IAutomationRegistryMaster23OwnershipTransferRequested) Topic() common.Hash { return common.HexToHash("0xed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae1278") } -func (IAutomationRegistryMasterOwnershipTransferred) Topic() common.Hash { +func (IAutomationRegistryMaster23OwnershipTransferred) Topic() common.Hash { return common.HexToHash("0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0") } -func (IAutomationRegistryMasterPaused) Topic() common.Hash { +func (IAutomationRegistryMaster23Paused) Topic() common.Hash { return common.HexToHash("0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258") } -func (IAutomationRegistryMasterPayeesUpdated) Topic() common.Hash { +func (IAutomationRegistryMaster23PayeesUpdated) Topic() common.Hash { return common.HexToHash("0xa46de38886467c59be07a0675f14781206a5477d871628af46c2443822fcb725") } -func (IAutomationRegistryMasterPayeeshipTransferRequested) Topic() common.Hash { +func (IAutomationRegistryMaster23PayeeshipTransferRequested) Topic() common.Hash { return common.HexToHash("0x84f7c7c80bb8ed2279b4aab5f61cd05e6374073d38f46d7f32de8c30e9e38367") } -func (IAutomationRegistryMasterPayeeshipTransferred) Topic() common.Hash { +func (IAutomationRegistryMaster23PayeeshipTransferred) Topic() common.Hash { return common.HexToHash("0x78af32efdcad432315431e9b03d27e6cd98fb79c405fdc5af7c1714d9c0f75b3") } -func (IAutomationRegistryMasterPaymentWithdrawn) Topic() common.Hash { +func (IAutomationRegistryMaster23PaymentWithdrawn) Topic() common.Hash { return common.HexToHash("0x9819093176a1851202c7bcfa46845809b4e47c261866550e94ed3775d2f40698") } -func (IAutomationRegistryMasterReorgedUpkeepReport) Topic() common.Hash { +func (IAutomationRegistryMaster23ReorgedUpkeepReport) Topic() common.Hash { return common.HexToHash("0x6aa7f60c176da7af894b384daea2249497448137f5943c1237ada8bc92bdc301") } -func (IAutomationRegistryMasterStaleUpkeepReport) Topic() common.Hash { +func (IAutomationRegistryMaster23StaleUpkeepReport) Topic() common.Hash { return common.HexToHash("0x405288ea7be309e16cfdf481367f90a413e1d4634fcdaf8966546db9b93012e8") } -func (IAutomationRegistryMasterTransmitted) Topic() common.Hash { +func (IAutomationRegistryMaster23Transmitted) Topic() common.Hash { return common.HexToHash("0xb04e63db38c49950639fa09d29872f21f5d49d614f3a969d8adf3d4b52e41a62") } -func (IAutomationRegistryMasterUnpaused) Topic() common.Hash { +func (IAutomationRegistryMaster23Unpaused) Topic() common.Hash { return common.HexToHash("0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa") } -func (IAutomationRegistryMasterUpkeepAdminTransferRequested) Topic() common.Hash { +func (IAutomationRegistryMaster23UpkeepAdminTransferRequested) Topic() common.Hash { return common.HexToHash("0xb1cbb2c4b8480034c27e06da5f096b8233a8fd4497028593a41ff6df79726b35") } -func (IAutomationRegistryMasterUpkeepAdminTransferred) Topic() common.Hash { +func (IAutomationRegistryMaster23UpkeepAdminTransferred) Topic() common.Hash { return common.HexToHash("0x5cff4db96bef051785e999f44bfcd21c18823e034fb92dd376e3db4ce0feeb2c") } -func (IAutomationRegistryMasterUpkeepCanceled) Topic() common.Hash { +func (IAutomationRegistryMaster23UpkeepCanceled) Topic() common.Hash { return common.HexToHash("0x91cb3bb75cfbd718bbfccc56b7f53d92d7048ef4ca39a3b7b7c6d4af1f791181") } -func (IAutomationRegistryMasterUpkeepCheckDataSet) Topic() common.Hash { +func (IAutomationRegistryMaster23UpkeepCheckDataSet) Topic() common.Hash { return common.HexToHash("0xcba2d5723b2ee59e53a8e8a82a4a7caf4fdfe70e9f7c582950bf7e7a5c24e83d") } -func (IAutomationRegistryMasterUpkeepGasLimitSet) Topic() common.Hash { +func (IAutomationRegistryMaster23UpkeepGasLimitSet) Topic() common.Hash { return common.HexToHash("0xc24c07e655ce79fba8a589778987d3c015bc6af1632bb20cf9182e02a65d972c") } -func (IAutomationRegistryMasterUpkeepMigrated) Topic() common.Hash { +func (IAutomationRegistryMaster23UpkeepMigrated) Topic() common.Hash { return common.HexToHash("0xb38647142fbb1ea4c000fc4569b37a4e9a9f6313317b84ee3e5326c1a6cd06ff") } -func (IAutomationRegistryMasterUpkeepOffchainConfigSet) Topic() common.Hash { +func (IAutomationRegistryMaster23UpkeepOffchainConfigSet) Topic() common.Hash { return common.HexToHash("0x3e8740446213c8a77d40e08f79136ce3f347d13ed270a6ebdf57159e0faf4850") } -func (IAutomationRegistryMasterUpkeepPaused) Topic() common.Hash { +func (IAutomationRegistryMaster23UpkeepPaused) Topic() common.Hash { return common.HexToHash("0x8ab10247ce168c27748e656ecf852b951fcaac790c18106b19aa0ae57a8b741f") } -func (IAutomationRegistryMasterUpkeepPerformed) Topic() common.Hash { +func (IAutomationRegistryMaster23UpkeepPerformed) Topic() common.Hash { return common.HexToHash("0xad8cc9579b21dfe2c2f6ea35ba15b656e46b4f5b0cb424f52739b8ce5cac9c5b") } -func (IAutomationRegistryMasterUpkeepPrivilegeConfigSet) Topic() common.Hash { +func (IAutomationRegistryMaster23UpkeepPrivilegeConfigSet) Topic() common.Hash { return common.HexToHash("0x2fd8d70753a007014349d4591843cc031c2dd7a260d7dd82eca8253686ae7769") } -func (IAutomationRegistryMasterUpkeepReceived) Topic() common.Hash { +func (IAutomationRegistryMaster23UpkeepReceived) Topic() common.Hash { return common.HexToHash("0x74931a144e43a50694897f241d973aecb5024c0e910f9bb80a163ea3c1cf5a71") } -func (IAutomationRegistryMasterUpkeepRegistered) Topic() common.Hash { +func (IAutomationRegistryMaster23UpkeepRegistered) Topic() common.Hash { return common.HexToHash("0xbae366358c023f887e791d7a62f2e4316f1026bd77f6fb49501a917b3bc5d012") } -func (IAutomationRegistryMasterUpkeepTriggerConfigSet) Topic() common.Hash { +func (IAutomationRegistryMaster23UpkeepTriggerConfigSet) Topic() common.Hash { return common.HexToHash("0x2b72ac786c97e68dbab71023ed6f2bdbfc80ad9bb7808941929229d71b7d5664") } -func (IAutomationRegistryMasterUpkeepUnpaused) Topic() common.Hash { +func (IAutomationRegistryMaster23UpkeepUnpaused) Topic() common.Hash { return common.HexToHash("0x7bada562044eb163f6b4003c4553e4e62825344c0418eea087bed5ee05a47456") } -func (_IAutomationRegistryMaster *IAutomationRegistryMaster) Address() common.Address { - return _IAutomationRegistryMaster.address +func (_IAutomationRegistryMaster23 *IAutomationRegistryMaster23) Address() common.Address { + return _IAutomationRegistryMaster23.address } -type IAutomationRegistryMasterInterface interface { +type IAutomationRegistryMaster23Interface interface { CheckCallback(opts *bind.CallOpts, id *big.Int, values [][]byte, extraData []byte) (CheckCallback, error) @@ -6333,28 +6772,44 @@ type IAutomationRegistryMasterInterface interface { GetBalance(opts *bind.CallOpts, id *big.Int) (*big.Int, error) + GetBillingToken(opts *bind.CallOpts, upkeepID *big.Int) (common.Address, error) + + GetBillingTokenConfig(opts *bind.CallOpts, token common.Address) (AutomationRegistryBase23BillingConfig, error) + + GetBillingTokens(opts *bind.CallOpts) ([]common.Address, error) + GetCancellationDelay(opts *bind.CallOpts) (*big.Int, error) GetChainModule(opts *bind.CallOpts) (common.Address, error) GetConditionalGasOverhead(opts *bind.CallOpts) (*big.Int, error) + GetConfig(opts *bind.CallOpts) (AutomationRegistryBase23OnchainConfig, error) + + GetFallbackNativePrice(opts *bind.CallOpts) (*big.Int, error) + GetFastGasFeedAddress(opts *bind.CallOpts) (common.Address, error) GetForwarder(opts *bind.CallOpts, upkeepID *big.Int) (common.Address, error) + GetHotVars(opts *bind.CallOpts) (AutomationRegistryBase23HotVars, error) + GetLinkAddress(opts *bind.CallOpts) (common.Address, error) - GetLinkNativeFeedAddress(opts *bind.CallOpts) (common.Address, error) + GetLinkUSDFeedAddress(opts *bind.CallOpts) (common.Address, error) GetLogGasOverhead(opts *bind.CallOpts) (*big.Int, error) - GetMaxPaymentForGas(opts *bind.CallOpts, triggerType uint8, gasLimit uint32) (*big.Int, error) + GetMaxPaymentForGas(opts *bind.CallOpts, triggerType uint8, gasLimit uint32, billingToken common.Address) (*big.Int, error) GetMinBalance(opts *bind.CallOpts, id *big.Int) (*big.Int, error) GetMinBalanceForUpkeep(opts *bind.CallOpts, id *big.Int) (*big.Int, error) + GetNativeUSDFeedAddress(opts *bind.CallOpts) (common.Address, error) + + GetNumUpkeeps(opts *bind.CallOpts) (*big.Int, error) + GetPeerRegistryMigrationPermission(opts *bind.CallOpts, peer common.Address) (uint8, error) GetPerPerformByteGasOverhead(opts *bind.CallOpts) (*big.Int, error) @@ -6363,6 +6818,8 @@ type IAutomationRegistryMasterInterface interface { GetReorgProtectionEnabled(opts *bind.CallOpts) (bool, error) + GetReserveAmount(opts *bind.CallOpts, billingToken common.Address) (*big.Int, error) + GetSignerInfo(opts *bind.CallOpts, query common.Address) (GetSignerInfo, error) @@ -6371,6 +6828,8 @@ type IAutomationRegistryMasterInterface interface { error) + GetStorage(opts *bind.CallOpts) (AutomationRegistryBase23Storage, error) + GetTransmitCalldataFixedBytesOverhead(opts *bind.CallOpts) (*big.Int, error) GetTransmitCalldataPerSignerBytesOverhead(opts *bind.CallOpts) (*big.Int, error) @@ -6381,7 +6840,7 @@ type IAutomationRegistryMasterInterface interface { GetTriggerType(opts *bind.CallOpts, upkeepId *big.Int) (uint8, error) - GetUpkeep(opts *bind.CallOpts, id *big.Int) (AutomationRegistryBase23UpkeepInfo, error) + GetUpkeep(opts *bind.CallOpts, id *big.Int) (IAutomationV21PlusCommonUpkeepInfoLegacy, error) GetUpkeepPrivilegeConfig(opts *bind.CallOpts, upkeepId *big.Int) ([]byte, error) @@ -6397,12 +6856,16 @@ type IAutomationRegistryMasterInterface interface { error) + LinkAvailableForPayment(opts *bind.CallOpts) (*big.Int, error) + Owner(opts *bind.CallOpts) (common.Address, error) SimulatePerformUpkeep(opts *bind.CallOpts, id *big.Int, performData []byte) (SimulatePerformUpkeep, error) + SupportsBillingToken(opts *bind.CallOpts, token common.Address) (bool, error) + TypeAndVersion(opts *bind.CallOpts) (string, error) UpkeepTranscoderVersion(opts *bind.CallOpts) (uint8, error) @@ -6431,17 +6894,13 @@ type IAutomationRegistryMasterInterface interface { ReceiveUpkeeps(opts *bind.TransactOpts, encodedUpkeeps []byte) (*types.Transaction, error) - RecoverFunds(opts *bind.TransactOpts) (*types.Transaction, error) - - RegisterUpkeep(opts *bind.TransactOpts, target common.Address, gasLimit uint32, admin common.Address, triggerType uint8, checkData []byte, triggerConfig []byte, offchainConfig []byte) (*types.Transaction, error) - - RegisterUpkeep0(opts *bind.TransactOpts, target common.Address, gasLimit uint32, admin common.Address, checkData []byte, offchainConfig []byte) (*types.Transaction, error) + RegisterUpkeep(opts *bind.TransactOpts, target common.Address, gasLimit uint32, admin common.Address, triggerType uint8, billingToken common.Address, checkData []byte, triggerConfig []byte, offchainConfig []byte) (*types.Transaction, error) SetAdminPrivilegeConfig(opts *bind.TransactOpts, admin common.Address, newPrivilegeConfig []byte) (*types.Transaction, error) SetConfig(opts *bind.TransactOpts, signers []common.Address, transmitters []common.Address, f uint8, onchainConfigBytes []byte, offchainConfigVersion uint64, offchainConfig []byte) (*types.Transaction, error) - SetConfigTypeSafe(opts *bind.TransactOpts, signers []common.Address, transmitters []common.Address, f uint8, onchainConfig AutomationRegistryBase23OnchainConfig, offchainConfigVersion uint64, offchainConfig []byte) (*types.Transaction, error) + SetConfigTypeSafe(opts *bind.TransactOpts, signers []common.Address, transmitters []common.Address, f uint8, onchainConfig AutomationRegistryBase23OnchainConfig, offchainConfigVersion uint64, offchainConfig []byte, billingTokens []common.Address, billingConfigs []AutomationRegistryBase23BillingConfig) (*types.Transaction, error) SetPayees(opts *bind.TransactOpts, payees []common.Address) (*types.Transaction, error) @@ -6469,217 +6928,225 @@ type IAutomationRegistryMasterInterface interface { UnpauseUpkeep(opts *bind.TransactOpts, id *big.Int) (*types.Transaction, error) + WithdrawERC20Fees(opts *bind.TransactOpts, assetAddress common.Address, to common.Address, amount *big.Int) (*types.Transaction, error) + WithdrawFunds(opts *bind.TransactOpts, id *big.Int, to common.Address) (*types.Transaction, error) - WithdrawOwnerFunds(opts *bind.TransactOpts) (*types.Transaction, error) + WithdrawLinkFees(opts *bind.TransactOpts, to common.Address, amount *big.Int) (*types.Transaction, error) WithdrawPayment(opts *bind.TransactOpts, from common.Address, to common.Address) (*types.Transaction, error) Fallback(opts *bind.TransactOpts, calldata []byte) (*types.Transaction, error) - FilterAdminPrivilegeConfigSet(opts *bind.FilterOpts, admin []common.Address) (*IAutomationRegistryMasterAdminPrivilegeConfigSetIterator, error) + FilterAdminPrivilegeConfigSet(opts *bind.FilterOpts, admin []common.Address) (*IAutomationRegistryMaster23AdminPrivilegeConfigSetIterator, error) + + WatchAdminPrivilegeConfigSet(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMaster23AdminPrivilegeConfigSet, admin []common.Address) (event.Subscription, error) + + ParseAdminPrivilegeConfigSet(log types.Log) (*IAutomationRegistryMaster23AdminPrivilegeConfigSet, error) + + FilterBillingConfigSet(opts *bind.FilterOpts, token []common.Address) (*IAutomationRegistryMaster23BillingConfigSetIterator, error) - WatchAdminPrivilegeConfigSet(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMasterAdminPrivilegeConfigSet, admin []common.Address) (event.Subscription, error) + WatchBillingConfigSet(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMaster23BillingConfigSet, token []common.Address) (event.Subscription, error) - ParseAdminPrivilegeConfigSet(log types.Log) (*IAutomationRegistryMasterAdminPrivilegeConfigSet, error) + ParseBillingConfigSet(log types.Log) (*IAutomationRegistryMaster23BillingConfigSet, error) - FilterCancelledUpkeepReport(opts *bind.FilterOpts, id []*big.Int) (*IAutomationRegistryMasterCancelledUpkeepReportIterator, error) + FilterCancelledUpkeepReport(opts *bind.FilterOpts, id []*big.Int) (*IAutomationRegistryMaster23CancelledUpkeepReportIterator, error) - WatchCancelledUpkeepReport(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMasterCancelledUpkeepReport, id []*big.Int) (event.Subscription, error) + WatchCancelledUpkeepReport(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMaster23CancelledUpkeepReport, id []*big.Int) (event.Subscription, error) - ParseCancelledUpkeepReport(log types.Log) (*IAutomationRegistryMasterCancelledUpkeepReport, error) + ParseCancelledUpkeepReport(log types.Log) (*IAutomationRegistryMaster23CancelledUpkeepReport, error) - FilterChainSpecificModuleUpdated(opts *bind.FilterOpts) (*IAutomationRegistryMasterChainSpecificModuleUpdatedIterator, error) + FilterChainSpecificModuleUpdated(opts *bind.FilterOpts) (*IAutomationRegistryMaster23ChainSpecificModuleUpdatedIterator, error) - WatchChainSpecificModuleUpdated(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMasterChainSpecificModuleUpdated) (event.Subscription, error) + WatchChainSpecificModuleUpdated(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMaster23ChainSpecificModuleUpdated) (event.Subscription, error) - ParseChainSpecificModuleUpdated(log types.Log) (*IAutomationRegistryMasterChainSpecificModuleUpdated, error) + ParseChainSpecificModuleUpdated(log types.Log) (*IAutomationRegistryMaster23ChainSpecificModuleUpdated, error) - FilterConfigSet(opts *bind.FilterOpts) (*IAutomationRegistryMasterConfigSetIterator, error) + FilterConfigSet(opts *bind.FilterOpts) (*IAutomationRegistryMaster23ConfigSetIterator, error) - WatchConfigSet(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMasterConfigSet) (event.Subscription, error) + WatchConfigSet(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMaster23ConfigSet) (event.Subscription, error) - ParseConfigSet(log types.Log) (*IAutomationRegistryMasterConfigSet, error) + ParseConfigSet(log types.Log) (*IAutomationRegistryMaster23ConfigSet, error) - FilterDedupKeyAdded(opts *bind.FilterOpts, dedupKey [][32]byte) (*IAutomationRegistryMasterDedupKeyAddedIterator, error) + FilterDedupKeyAdded(opts *bind.FilterOpts, dedupKey [][32]byte) (*IAutomationRegistryMaster23DedupKeyAddedIterator, error) - WatchDedupKeyAdded(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMasterDedupKeyAdded, dedupKey [][32]byte) (event.Subscription, error) + WatchDedupKeyAdded(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMaster23DedupKeyAdded, dedupKey [][32]byte) (event.Subscription, error) - ParseDedupKeyAdded(log types.Log) (*IAutomationRegistryMasterDedupKeyAdded, error) + ParseDedupKeyAdded(log types.Log) (*IAutomationRegistryMaster23DedupKeyAdded, error) - FilterFundsAdded(opts *bind.FilterOpts, id []*big.Int, from []common.Address) (*IAutomationRegistryMasterFundsAddedIterator, error) + FilterFeesWithdrawn(opts *bind.FilterOpts, recipient []common.Address, assetAddress []common.Address) (*IAutomationRegistryMaster23FeesWithdrawnIterator, error) - WatchFundsAdded(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMasterFundsAdded, id []*big.Int, from []common.Address) (event.Subscription, error) + WatchFeesWithdrawn(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMaster23FeesWithdrawn, recipient []common.Address, assetAddress []common.Address) (event.Subscription, error) - ParseFundsAdded(log types.Log) (*IAutomationRegistryMasterFundsAdded, error) + ParseFeesWithdrawn(log types.Log) (*IAutomationRegistryMaster23FeesWithdrawn, error) - FilterFundsWithdrawn(opts *bind.FilterOpts, id []*big.Int) (*IAutomationRegistryMasterFundsWithdrawnIterator, error) + FilterFundsAdded(opts *bind.FilterOpts, id []*big.Int, from []common.Address) (*IAutomationRegistryMaster23FundsAddedIterator, error) - WatchFundsWithdrawn(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMasterFundsWithdrawn, id []*big.Int) (event.Subscription, error) + WatchFundsAdded(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMaster23FundsAdded, id []*big.Int, from []common.Address) (event.Subscription, error) - ParseFundsWithdrawn(log types.Log) (*IAutomationRegistryMasterFundsWithdrawn, error) + ParseFundsAdded(log types.Log) (*IAutomationRegistryMaster23FundsAdded, error) - FilterInsufficientFundsUpkeepReport(opts *bind.FilterOpts, id []*big.Int) (*IAutomationRegistryMasterInsufficientFundsUpkeepReportIterator, error) + FilterFundsWithdrawn(opts *bind.FilterOpts, id []*big.Int) (*IAutomationRegistryMaster23FundsWithdrawnIterator, error) - WatchInsufficientFundsUpkeepReport(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMasterInsufficientFundsUpkeepReport, id []*big.Int) (event.Subscription, error) + WatchFundsWithdrawn(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMaster23FundsWithdrawn, id []*big.Int) (event.Subscription, error) - ParseInsufficientFundsUpkeepReport(log types.Log) (*IAutomationRegistryMasterInsufficientFundsUpkeepReport, error) + ParseFundsWithdrawn(log types.Log) (*IAutomationRegistryMaster23FundsWithdrawn, error) - FilterOwnerFundsWithdrawn(opts *bind.FilterOpts) (*IAutomationRegistryMasterOwnerFundsWithdrawnIterator, error) + FilterInsufficientFundsUpkeepReport(opts *bind.FilterOpts, id []*big.Int) (*IAutomationRegistryMaster23InsufficientFundsUpkeepReportIterator, error) - WatchOwnerFundsWithdrawn(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMasterOwnerFundsWithdrawn) (event.Subscription, error) + WatchInsufficientFundsUpkeepReport(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMaster23InsufficientFundsUpkeepReport, id []*big.Int) (event.Subscription, error) - ParseOwnerFundsWithdrawn(log types.Log) (*IAutomationRegistryMasterOwnerFundsWithdrawn, error) + ParseInsufficientFundsUpkeepReport(log types.Log) (*IAutomationRegistryMaster23InsufficientFundsUpkeepReport, error) - FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*IAutomationRegistryMasterOwnershipTransferRequestedIterator, error) + FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*IAutomationRegistryMaster23OwnershipTransferRequestedIterator, error) - WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMasterOwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) + WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMaster23OwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) - ParseOwnershipTransferRequested(log types.Log) (*IAutomationRegistryMasterOwnershipTransferRequested, error) + ParseOwnershipTransferRequested(log types.Log) (*IAutomationRegistryMaster23OwnershipTransferRequested, error) - FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*IAutomationRegistryMasterOwnershipTransferredIterator, error) + FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*IAutomationRegistryMaster23OwnershipTransferredIterator, error) - WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMasterOwnershipTransferred, from []common.Address, to []common.Address) (event.Subscription, error) + WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMaster23OwnershipTransferred, from []common.Address, to []common.Address) (event.Subscription, error) - ParseOwnershipTransferred(log types.Log) (*IAutomationRegistryMasterOwnershipTransferred, error) + ParseOwnershipTransferred(log types.Log) (*IAutomationRegistryMaster23OwnershipTransferred, error) - FilterPaused(opts *bind.FilterOpts) (*IAutomationRegistryMasterPausedIterator, error) + FilterPaused(opts *bind.FilterOpts) (*IAutomationRegistryMaster23PausedIterator, error) - WatchPaused(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMasterPaused) (event.Subscription, error) + WatchPaused(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMaster23Paused) (event.Subscription, error) - ParsePaused(log types.Log) (*IAutomationRegistryMasterPaused, error) + ParsePaused(log types.Log) (*IAutomationRegistryMaster23Paused, error) - FilterPayeesUpdated(opts *bind.FilterOpts) (*IAutomationRegistryMasterPayeesUpdatedIterator, error) + FilterPayeesUpdated(opts *bind.FilterOpts) (*IAutomationRegistryMaster23PayeesUpdatedIterator, error) - WatchPayeesUpdated(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMasterPayeesUpdated) (event.Subscription, error) + WatchPayeesUpdated(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMaster23PayeesUpdated) (event.Subscription, error) - ParsePayeesUpdated(log types.Log) (*IAutomationRegistryMasterPayeesUpdated, error) + ParsePayeesUpdated(log types.Log) (*IAutomationRegistryMaster23PayeesUpdated, error) - FilterPayeeshipTransferRequested(opts *bind.FilterOpts, transmitter []common.Address, from []common.Address, to []common.Address) (*IAutomationRegistryMasterPayeeshipTransferRequestedIterator, error) + FilterPayeeshipTransferRequested(opts *bind.FilterOpts, transmitter []common.Address, from []common.Address, to []common.Address) (*IAutomationRegistryMaster23PayeeshipTransferRequestedIterator, error) - WatchPayeeshipTransferRequested(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMasterPayeeshipTransferRequested, transmitter []common.Address, from []common.Address, to []common.Address) (event.Subscription, error) + WatchPayeeshipTransferRequested(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMaster23PayeeshipTransferRequested, transmitter []common.Address, from []common.Address, to []common.Address) (event.Subscription, error) - ParsePayeeshipTransferRequested(log types.Log) (*IAutomationRegistryMasterPayeeshipTransferRequested, error) + ParsePayeeshipTransferRequested(log types.Log) (*IAutomationRegistryMaster23PayeeshipTransferRequested, error) - FilterPayeeshipTransferred(opts *bind.FilterOpts, transmitter []common.Address, from []common.Address, to []common.Address) (*IAutomationRegistryMasterPayeeshipTransferredIterator, error) + FilterPayeeshipTransferred(opts *bind.FilterOpts, transmitter []common.Address, from []common.Address, to []common.Address) (*IAutomationRegistryMaster23PayeeshipTransferredIterator, error) - WatchPayeeshipTransferred(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMasterPayeeshipTransferred, transmitter []common.Address, from []common.Address, to []common.Address) (event.Subscription, error) + WatchPayeeshipTransferred(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMaster23PayeeshipTransferred, transmitter []common.Address, from []common.Address, to []common.Address) (event.Subscription, error) - ParsePayeeshipTransferred(log types.Log) (*IAutomationRegistryMasterPayeeshipTransferred, error) + ParsePayeeshipTransferred(log types.Log) (*IAutomationRegistryMaster23PayeeshipTransferred, error) - FilterPaymentWithdrawn(opts *bind.FilterOpts, transmitter []common.Address, amount []*big.Int, to []common.Address) (*IAutomationRegistryMasterPaymentWithdrawnIterator, error) + FilterPaymentWithdrawn(opts *bind.FilterOpts, transmitter []common.Address, amount []*big.Int, to []common.Address) (*IAutomationRegistryMaster23PaymentWithdrawnIterator, error) - WatchPaymentWithdrawn(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMasterPaymentWithdrawn, transmitter []common.Address, amount []*big.Int, to []common.Address) (event.Subscription, error) + WatchPaymentWithdrawn(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMaster23PaymentWithdrawn, transmitter []common.Address, amount []*big.Int, to []common.Address) (event.Subscription, error) - ParsePaymentWithdrawn(log types.Log) (*IAutomationRegistryMasterPaymentWithdrawn, error) + ParsePaymentWithdrawn(log types.Log) (*IAutomationRegistryMaster23PaymentWithdrawn, error) - FilterReorgedUpkeepReport(opts *bind.FilterOpts, id []*big.Int) (*IAutomationRegistryMasterReorgedUpkeepReportIterator, error) + FilterReorgedUpkeepReport(opts *bind.FilterOpts, id []*big.Int) (*IAutomationRegistryMaster23ReorgedUpkeepReportIterator, error) - WatchReorgedUpkeepReport(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMasterReorgedUpkeepReport, id []*big.Int) (event.Subscription, error) + WatchReorgedUpkeepReport(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMaster23ReorgedUpkeepReport, id []*big.Int) (event.Subscription, error) - ParseReorgedUpkeepReport(log types.Log) (*IAutomationRegistryMasterReorgedUpkeepReport, error) + ParseReorgedUpkeepReport(log types.Log) (*IAutomationRegistryMaster23ReorgedUpkeepReport, error) - FilterStaleUpkeepReport(opts *bind.FilterOpts, id []*big.Int) (*IAutomationRegistryMasterStaleUpkeepReportIterator, error) + FilterStaleUpkeepReport(opts *bind.FilterOpts, id []*big.Int) (*IAutomationRegistryMaster23StaleUpkeepReportIterator, error) - WatchStaleUpkeepReport(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMasterStaleUpkeepReport, id []*big.Int) (event.Subscription, error) + WatchStaleUpkeepReport(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMaster23StaleUpkeepReport, id []*big.Int) (event.Subscription, error) - ParseStaleUpkeepReport(log types.Log) (*IAutomationRegistryMasterStaleUpkeepReport, error) + ParseStaleUpkeepReport(log types.Log) (*IAutomationRegistryMaster23StaleUpkeepReport, error) - FilterTransmitted(opts *bind.FilterOpts) (*IAutomationRegistryMasterTransmittedIterator, error) + FilterTransmitted(opts *bind.FilterOpts) (*IAutomationRegistryMaster23TransmittedIterator, error) - WatchTransmitted(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMasterTransmitted) (event.Subscription, error) + WatchTransmitted(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMaster23Transmitted) (event.Subscription, error) - ParseTransmitted(log types.Log) (*IAutomationRegistryMasterTransmitted, error) + ParseTransmitted(log types.Log) (*IAutomationRegistryMaster23Transmitted, error) - FilterUnpaused(opts *bind.FilterOpts) (*IAutomationRegistryMasterUnpausedIterator, error) + FilterUnpaused(opts *bind.FilterOpts) (*IAutomationRegistryMaster23UnpausedIterator, error) - WatchUnpaused(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMasterUnpaused) (event.Subscription, error) + WatchUnpaused(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMaster23Unpaused) (event.Subscription, error) - ParseUnpaused(log types.Log) (*IAutomationRegistryMasterUnpaused, error) + ParseUnpaused(log types.Log) (*IAutomationRegistryMaster23Unpaused, error) - FilterUpkeepAdminTransferRequested(opts *bind.FilterOpts, id []*big.Int, from []common.Address, to []common.Address) (*IAutomationRegistryMasterUpkeepAdminTransferRequestedIterator, error) + FilterUpkeepAdminTransferRequested(opts *bind.FilterOpts, id []*big.Int, from []common.Address, to []common.Address) (*IAutomationRegistryMaster23UpkeepAdminTransferRequestedIterator, error) - WatchUpkeepAdminTransferRequested(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMasterUpkeepAdminTransferRequested, id []*big.Int, from []common.Address, to []common.Address) (event.Subscription, error) + WatchUpkeepAdminTransferRequested(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMaster23UpkeepAdminTransferRequested, id []*big.Int, from []common.Address, to []common.Address) (event.Subscription, error) - ParseUpkeepAdminTransferRequested(log types.Log) (*IAutomationRegistryMasterUpkeepAdminTransferRequested, error) + ParseUpkeepAdminTransferRequested(log types.Log) (*IAutomationRegistryMaster23UpkeepAdminTransferRequested, error) - FilterUpkeepAdminTransferred(opts *bind.FilterOpts, id []*big.Int, from []common.Address, to []common.Address) (*IAutomationRegistryMasterUpkeepAdminTransferredIterator, error) + FilterUpkeepAdminTransferred(opts *bind.FilterOpts, id []*big.Int, from []common.Address, to []common.Address) (*IAutomationRegistryMaster23UpkeepAdminTransferredIterator, error) - WatchUpkeepAdminTransferred(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMasterUpkeepAdminTransferred, id []*big.Int, from []common.Address, to []common.Address) (event.Subscription, error) + WatchUpkeepAdminTransferred(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMaster23UpkeepAdminTransferred, id []*big.Int, from []common.Address, to []common.Address) (event.Subscription, error) - ParseUpkeepAdminTransferred(log types.Log) (*IAutomationRegistryMasterUpkeepAdminTransferred, error) + ParseUpkeepAdminTransferred(log types.Log) (*IAutomationRegistryMaster23UpkeepAdminTransferred, error) - FilterUpkeepCanceled(opts *bind.FilterOpts, id []*big.Int, atBlockHeight []uint64) (*IAutomationRegistryMasterUpkeepCanceledIterator, error) + FilterUpkeepCanceled(opts *bind.FilterOpts, id []*big.Int, atBlockHeight []uint64) (*IAutomationRegistryMaster23UpkeepCanceledIterator, error) - WatchUpkeepCanceled(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMasterUpkeepCanceled, id []*big.Int, atBlockHeight []uint64) (event.Subscription, error) + WatchUpkeepCanceled(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMaster23UpkeepCanceled, id []*big.Int, atBlockHeight []uint64) (event.Subscription, error) - ParseUpkeepCanceled(log types.Log) (*IAutomationRegistryMasterUpkeepCanceled, error) + ParseUpkeepCanceled(log types.Log) (*IAutomationRegistryMaster23UpkeepCanceled, error) - FilterUpkeepCheckDataSet(opts *bind.FilterOpts, id []*big.Int) (*IAutomationRegistryMasterUpkeepCheckDataSetIterator, error) + FilterUpkeepCheckDataSet(opts *bind.FilterOpts, id []*big.Int) (*IAutomationRegistryMaster23UpkeepCheckDataSetIterator, error) - WatchUpkeepCheckDataSet(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMasterUpkeepCheckDataSet, id []*big.Int) (event.Subscription, error) + WatchUpkeepCheckDataSet(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMaster23UpkeepCheckDataSet, id []*big.Int) (event.Subscription, error) - ParseUpkeepCheckDataSet(log types.Log) (*IAutomationRegistryMasterUpkeepCheckDataSet, error) + ParseUpkeepCheckDataSet(log types.Log) (*IAutomationRegistryMaster23UpkeepCheckDataSet, error) - FilterUpkeepGasLimitSet(opts *bind.FilterOpts, id []*big.Int) (*IAutomationRegistryMasterUpkeepGasLimitSetIterator, error) + FilterUpkeepGasLimitSet(opts *bind.FilterOpts, id []*big.Int) (*IAutomationRegistryMaster23UpkeepGasLimitSetIterator, error) - WatchUpkeepGasLimitSet(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMasterUpkeepGasLimitSet, id []*big.Int) (event.Subscription, error) + WatchUpkeepGasLimitSet(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMaster23UpkeepGasLimitSet, id []*big.Int) (event.Subscription, error) - ParseUpkeepGasLimitSet(log types.Log) (*IAutomationRegistryMasterUpkeepGasLimitSet, error) + ParseUpkeepGasLimitSet(log types.Log) (*IAutomationRegistryMaster23UpkeepGasLimitSet, error) - FilterUpkeepMigrated(opts *bind.FilterOpts, id []*big.Int) (*IAutomationRegistryMasterUpkeepMigratedIterator, error) + FilterUpkeepMigrated(opts *bind.FilterOpts, id []*big.Int) (*IAutomationRegistryMaster23UpkeepMigratedIterator, error) - WatchUpkeepMigrated(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMasterUpkeepMigrated, id []*big.Int) (event.Subscription, error) + WatchUpkeepMigrated(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMaster23UpkeepMigrated, id []*big.Int) (event.Subscription, error) - ParseUpkeepMigrated(log types.Log) (*IAutomationRegistryMasterUpkeepMigrated, error) + ParseUpkeepMigrated(log types.Log) (*IAutomationRegistryMaster23UpkeepMigrated, error) - FilterUpkeepOffchainConfigSet(opts *bind.FilterOpts, id []*big.Int) (*IAutomationRegistryMasterUpkeepOffchainConfigSetIterator, error) + FilterUpkeepOffchainConfigSet(opts *bind.FilterOpts, id []*big.Int) (*IAutomationRegistryMaster23UpkeepOffchainConfigSetIterator, error) - WatchUpkeepOffchainConfigSet(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMasterUpkeepOffchainConfigSet, id []*big.Int) (event.Subscription, error) + WatchUpkeepOffchainConfigSet(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMaster23UpkeepOffchainConfigSet, id []*big.Int) (event.Subscription, error) - ParseUpkeepOffchainConfigSet(log types.Log) (*IAutomationRegistryMasterUpkeepOffchainConfigSet, error) + ParseUpkeepOffchainConfigSet(log types.Log) (*IAutomationRegistryMaster23UpkeepOffchainConfigSet, error) - FilterUpkeepPaused(opts *bind.FilterOpts, id []*big.Int) (*IAutomationRegistryMasterUpkeepPausedIterator, error) + FilterUpkeepPaused(opts *bind.FilterOpts, id []*big.Int) (*IAutomationRegistryMaster23UpkeepPausedIterator, error) - WatchUpkeepPaused(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMasterUpkeepPaused, id []*big.Int) (event.Subscription, error) + WatchUpkeepPaused(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMaster23UpkeepPaused, id []*big.Int) (event.Subscription, error) - ParseUpkeepPaused(log types.Log) (*IAutomationRegistryMasterUpkeepPaused, error) + ParseUpkeepPaused(log types.Log) (*IAutomationRegistryMaster23UpkeepPaused, error) - FilterUpkeepPerformed(opts *bind.FilterOpts, id []*big.Int, success []bool) (*IAutomationRegistryMasterUpkeepPerformedIterator, error) + FilterUpkeepPerformed(opts *bind.FilterOpts, id []*big.Int, success []bool) (*IAutomationRegistryMaster23UpkeepPerformedIterator, error) - WatchUpkeepPerformed(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMasterUpkeepPerformed, id []*big.Int, success []bool) (event.Subscription, error) + WatchUpkeepPerformed(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMaster23UpkeepPerformed, id []*big.Int, success []bool) (event.Subscription, error) - ParseUpkeepPerformed(log types.Log) (*IAutomationRegistryMasterUpkeepPerformed, error) + ParseUpkeepPerformed(log types.Log) (*IAutomationRegistryMaster23UpkeepPerformed, error) - FilterUpkeepPrivilegeConfigSet(opts *bind.FilterOpts, id []*big.Int) (*IAutomationRegistryMasterUpkeepPrivilegeConfigSetIterator, error) + FilterUpkeepPrivilegeConfigSet(opts *bind.FilterOpts, id []*big.Int) (*IAutomationRegistryMaster23UpkeepPrivilegeConfigSetIterator, error) - WatchUpkeepPrivilegeConfigSet(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMasterUpkeepPrivilegeConfigSet, id []*big.Int) (event.Subscription, error) + WatchUpkeepPrivilegeConfigSet(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMaster23UpkeepPrivilegeConfigSet, id []*big.Int) (event.Subscription, error) - ParseUpkeepPrivilegeConfigSet(log types.Log) (*IAutomationRegistryMasterUpkeepPrivilegeConfigSet, error) + ParseUpkeepPrivilegeConfigSet(log types.Log) (*IAutomationRegistryMaster23UpkeepPrivilegeConfigSet, error) - FilterUpkeepReceived(opts *bind.FilterOpts, id []*big.Int) (*IAutomationRegistryMasterUpkeepReceivedIterator, error) + FilterUpkeepReceived(opts *bind.FilterOpts, id []*big.Int) (*IAutomationRegistryMaster23UpkeepReceivedIterator, error) - WatchUpkeepReceived(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMasterUpkeepReceived, id []*big.Int) (event.Subscription, error) + WatchUpkeepReceived(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMaster23UpkeepReceived, id []*big.Int) (event.Subscription, error) - ParseUpkeepReceived(log types.Log) (*IAutomationRegistryMasterUpkeepReceived, error) + ParseUpkeepReceived(log types.Log) (*IAutomationRegistryMaster23UpkeepReceived, error) - FilterUpkeepRegistered(opts *bind.FilterOpts, id []*big.Int) (*IAutomationRegistryMasterUpkeepRegisteredIterator, error) + FilterUpkeepRegistered(opts *bind.FilterOpts, id []*big.Int) (*IAutomationRegistryMaster23UpkeepRegisteredIterator, error) - WatchUpkeepRegistered(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMasterUpkeepRegistered, id []*big.Int) (event.Subscription, error) + WatchUpkeepRegistered(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMaster23UpkeepRegistered, id []*big.Int) (event.Subscription, error) - ParseUpkeepRegistered(log types.Log) (*IAutomationRegistryMasterUpkeepRegistered, error) + ParseUpkeepRegistered(log types.Log) (*IAutomationRegistryMaster23UpkeepRegistered, error) - FilterUpkeepTriggerConfigSet(opts *bind.FilterOpts, id []*big.Int) (*IAutomationRegistryMasterUpkeepTriggerConfigSetIterator, error) + FilterUpkeepTriggerConfigSet(opts *bind.FilterOpts, id []*big.Int) (*IAutomationRegistryMaster23UpkeepTriggerConfigSetIterator, error) - WatchUpkeepTriggerConfigSet(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMasterUpkeepTriggerConfigSet, id []*big.Int) (event.Subscription, error) + WatchUpkeepTriggerConfigSet(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMaster23UpkeepTriggerConfigSet, id []*big.Int) (event.Subscription, error) - ParseUpkeepTriggerConfigSet(log types.Log) (*IAutomationRegistryMasterUpkeepTriggerConfigSet, error) + ParseUpkeepTriggerConfigSet(log types.Log) (*IAutomationRegistryMaster23UpkeepTriggerConfigSet, error) - FilterUpkeepUnpaused(opts *bind.FilterOpts, id []*big.Int) (*IAutomationRegistryMasterUpkeepUnpausedIterator, error) + FilterUpkeepUnpaused(opts *bind.FilterOpts, id []*big.Int) (*IAutomationRegistryMaster23UpkeepUnpausedIterator, error) - WatchUpkeepUnpaused(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMasterUpkeepUnpaused, id []*big.Int) (event.Subscription, error) + WatchUpkeepUnpaused(opts *bind.WatchOpts, sink chan<- *IAutomationRegistryMaster23UpkeepUnpaused, id []*big.Int) (event.Subscription, error) - ParseUpkeepUnpaused(log types.Log) (*IAutomationRegistryMasterUpkeepUnpaused, error) + ParseUpkeepUnpaused(log types.Log) (*IAutomationRegistryMaster23UpkeepUnpaused, error) ParseLog(log types.Log) (generated.AbigenLog, error) diff --git a/core/gethwrappers/generated/i_automation_v21_plus_common/i_automation_v21_plus_common.go b/core/gethwrappers/generated/i_automation_v21_plus_common/i_automation_v21_plus_common.go new file mode 100644 index 00000000000..c198e55bdde --- /dev/null +++ b/core/gethwrappers/generated/i_automation_v21_plus_common/i_automation_v21_plus_common.go @@ -0,0 +1,5359 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package i_automation_v21_plus_common + +import ( + "errors" + "fmt" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" + "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated" +) + +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +type IAutomationV21PlusCommonOnchainConfigLegacy struct { + PaymentPremiumPPB uint32 + FlatFeeMicroLink uint32 + CheckGasLimit uint32 + StalenessSeconds *big.Int + GasCeilingMultiplier uint16 + MinUpkeepSpend *big.Int + MaxPerformGas uint32 + MaxCheckDataSize uint32 + MaxPerformDataSize uint32 + MaxRevertDataSize uint32 + FallbackGasPrice *big.Int + FallbackLinkPrice *big.Int + Transcoder common.Address + Registrars []common.Address + UpkeepPrivilegeManager common.Address +} + +type IAutomationV21PlusCommonStateLegacy struct { + Nonce uint32 + OwnerLinkBalance *big.Int + ExpectedLinkBalance *big.Int + TotalPremium *big.Int + NumUpkeeps *big.Int + ConfigCount uint32 + LatestConfigBlockNumber uint32 + LatestConfigDigest [32]byte + LatestEpoch uint32 + Paused bool +} + +type IAutomationV21PlusCommonUpkeepInfoLegacy struct { + Target common.Address + PerformGas uint32 + CheckData []byte + Balance *big.Int + Admin common.Address + MaxValidBlocknumber uint64 + LastPerformedBlockNumber uint32 + AmountSpent *big.Int + Paused bool + OffchainConfig []byte +} + +var IAutomationV21PlusCommonMetaData = &bind.MetaData{ + ABI: "[{\"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\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"trigger\",\"type\":\"bytes\"}],\"name\":\"CancelledUpkeepReport\",\"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\":\"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\":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\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"addFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"cancelUpkeep\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bytes[]\",\"name\":\"values\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"checkCallback\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"upkeepNeeded\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"performData\",\"type\":\"bytes\"},{\"internalType\":\"uint8\",\"name\":\"upkeepFailureReason\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"gasUsed\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"triggerData\",\"type\":\"bytes\"}],\"name\":\"checkUpkeep\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"upkeepNeeded\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"performData\",\"type\":\"bytes\"},{\"internalType\":\"uint8\",\"name\":\"upkeepFailureReason\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"gasUsed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fastGasWei\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"linkNative\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"checkUpkeep\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"upkeepNeeded\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"performData\",\"type\":\"bytes\"},{\"internalType\":\"uint8\",\"name\":\"upkeepFailureReason\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"gasUsed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fastGasWei\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"linkNative\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"}],\"name\":\"executeCallback\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"upkeepNeeded\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"performData\",\"type\":\"bytes\"},{\"internalType\":\"uint8\",\"name\":\"upkeepFailureReason\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"gasUsed\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"startIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxCount\",\"type\":\"uint256\"}],\"name\":\"getActiveUpkeepIDs\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"getMinBalance\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getState\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"nonce\",\"type\":\"uint32\"},{\"internalType\":\"uint96\",\"name\":\"ownerLinkBalance\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"expectedLinkBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint96\",\"name\":\"totalPremium\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"numUpkeeps\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"configCount\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"latestConfigBlockNumber\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"latestConfigDigest\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"latestEpoch\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"}],\"internalType\":\"structIAutomationV21PlusCommon.StateLegacy\",\"name\":\"state\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint32\",\"name\":\"paymentPremiumPPB\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"flatFeeMicroLink\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"checkGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint24\",\"name\":\"stalenessSeconds\",\"type\":\"uint24\"},{\"internalType\":\"uint16\",\"name\":\"gasCeilingMultiplier\",\"type\":\"uint16\"},{\"internalType\":\"uint96\",\"name\":\"minUpkeepSpend\",\"type\":\"uint96\"},{\"internalType\":\"uint32\",\"name\":\"maxPerformGas\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxCheckDataSize\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxPerformDataSize\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxRevertDataSize\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"fallbackGasPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fallbackLinkPrice\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"transcoder\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"registrars\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"upkeepPrivilegeManager\",\"type\":\"address\"}],\"internalType\":\"structIAutomationV21PlusCommon.OnchainConfigLegacy\",\"name\":\"config\",\"type\":\"tuple\"},{\"internalType\":\"address[]\",\"name\":\"signers\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"transmitters\",\"type\":\"address[]\"},{\"internalType\":\"uint8\",\"name\":\"f\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"getTriggerType\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"getUpkeep\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"performGas\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"checkData\",\"type\":\"bytes\"},{\"internalType\":\"uint96\",\"name\":\"balance\",\"type\":\"uint96\"},{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"maxValidBlocknumber\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"lastPerformedBlockNumber\",\"type\":\"uint32\"},{\"internalType\":\"uint96\",\"name\":\"amountSpent\",\"type\":\"uint96\"},{\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"offchainConfig\",\"type\":\"bytes\"}],\"internalType\":\"structIAutomationV21PlusCommon.UpkeepInfoLegacy\",\"name\":\"upkeepInfo\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"getUpkeepPrivilegeConfig\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"getUpkeepTriggerConfig\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"dedupKey\",\"type\":\"bytes32\"}],\"name\":\"hasDedupKey\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"pauseUpkeep\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"newCheckData\",\"type\":\"bytes\"}],\"name\":\"setUpkeepCheckData\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"}],\"name\":\"setUpkeepGasLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"newPrivilegeConfig\",\"type\":\"bytes\"}],\"name\":\"setUpkeepPrivilegeConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"triggerConfig\",\"type\":\"bytes\"}],\"name\":\"setUpkeepTriggerConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"performData\",\"type\":\"bytes\"}],\"name\":\"simulatePerformUpkeep\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"gasUsed\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"typeAndVersion\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"unpauseUpkeep\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", +} + +var IAutomationV21PlusCommonABI = IAutomationV21PlusCommonMetaData.ABI + +type IAutomationV21PlusCommon struct { + address common.Address + abi abi.ABI + IAutomationV21PlusCommonCaller + IAutomationV21PlusCommonTransactor + IAutomationV21PlusCommonFilterer +} + +type IAutomationV21PlusCommonCaller struct { + contract *bind.BoundContract +} + +type IAutomationV21PlusCommonTransactor struct { + contract *bind.BoundContract +} + +type IAutomationV21PlusCommonFilterer struct { + contract *bind.BoundContract +} + +type IAutomationV21PlusCommonSession struct { + Contract *IAutomationV21PlusCommon + CallOpts bind.CallOpts + TransactOpts bind.TransactOpts +} + +type IAutomationV21PlusCommonCallerSession struct { + Contract *IAutomationV21PlusCommonCaller + CallOpts bind.CallOpts +} + +type IAutomationV21PlusCommonTransactorSession struct { + Contract *IAutomationV21PlusCommonTransactor + TransactOpts bind.TransactOpts +} + +type IAutomationV21PlusCommonRaw struct { + Contract *IAutomationV21PlusCommon +} + +type IAutomationV21PlusCommonCallerRaw struct { + Contract *IAutomationV21PlusCommonCaller +} + +type IAutomationV21PlusCommonTransactorRaw struct { + Contract *IAutomationV21PlusCommonTransactor +} + +func NewIAutomationV21PlusCommon(address common.Address, backend bind.ContractBackend) (*IAutomationV21PlusCommon, error) { + abi, err := abi.JSON(strings.NewReader(IAutomationV21PlusCommonABI)) + if err != nil { + return nil, err + } + contract, err := bindIAutomationV21PlusCommon(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &IAutomationV21PlusCommon{address: address, abi: abi, IAutomationV21PlusCommonCaller: IAutomationV21PlusCommonCaller{contract: contract}, IAutomationV21PlusCommonTransactor: IAutomationV21PlusCommonTransactor{contract: contract}, IAutomationV21PlusCommonFilterer: IAutomationV21PlusCommonFilterer{contract: contract}}, nil +} + +func NewIAutomationV21PlusCommonCaller(address common.Address, caller bind.ContractCaller) (*IAutomationV21PlusCommonCaller, error) { + contract, err := bindIAutomationV21PlusCommon(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &IAutomationV21PlusCommonCaller{contract: contract}, nil +} + +func NewIAutomationV21PlusCommonTransactor(address common.Address, transactor bind.ContractTransactor) (*IAutomationV21PlusCommonTransactor, error) { + contract, err := bindIAutomationV21PlusCommon(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &IAutomationV21PlusCommonTransactor{contract: contract}, nil +} + +func NewIAutomationV21PlusCommonFilterer(address common.Address, filterer bind.ContractFilterer) (*IAutomationV21PlusCommonFilterer, error) { + contract, err := bindIAutomationV21PlusCommon(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &IAutomationV21PlusCommonFilterer{contract: contract}, nil +} + +func bindIAutomationV21PlusCommon(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := IAutomationV21PlusCommonMetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _IAutomationV21PlusCommon.Contract.IAutomationV21PlusCommonCaller.contract.Call(opts, result, method, params...) +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IAutomationV21PlusCommon.Contract.IAutomationV21PlusCommonTransactor.contract.Transfer(opts) +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IAutomationV21PlusCommon.Contract.IAutomationV21PlusCommonTransactor.contract.Transact(opts, method, params...) +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _IAutomationV21PlusCommon.Contract.contract.Call(opts, result, method, params...) +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IAutomationV21PlusCommon.Contract.contract.Transfer(opts) +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IAutomationV21PlusCommon.Contract.contract.Transact(opts, method, params...) +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonCaller) CheckCallback(opts *bind.CallOpts, id *big.Int, values [][]byte, extraData []byte) (CheckCallback, + + error) { + var out []interface{} + err := _IAutomationV21PlusCommon.contract.Call(opts, &out, "checkCallback", id, values, extraData) + + outstruct := new(CheckCallback) + if err != nil { + return *outstruct, err + } + + outstruct.UpkeepNeeded = *abi.ConvertType(out[0], new(bool)).(*bool) + outstruct.PerformData = *abi.ConvertType(out[1], new([]byte)).(*[]byte) + outstruct.UpkeepFailureReason = *abi.ConvertType(out[2], new(uint8)).(*uint8) + outstruct.GasUsed = *abi.ConvertType(out[3], new(*big.Int)).(**big.Int) + + return *outstruct, err + +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonSession) CheckCallback(id *big.Int, values [][]byte, extraData []byte) (CheckCallback, + + error) { + return _IAutomationV21PlusCommon.Contract.CheckCallback(&_IAutomationV21PlusCommon.CallOpts, id, values, extraData) +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonCallerSession) CheckCallback(id *big.Int, values [][]byte, extraData []byte) (CheckCallback, + + error) { + return _IAutomationV21PlusCommon.Contract.CheckCallback(&_IAutomationV21PlusCommon.CallOpts, id, values, extraData) +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonCaller) CheckUpkeep(opts *bind.CallOpts, id *big.Int, triggerData []byte) (CheckUpkeep, + + error) { + var out []interface{} + err := _IAutomationV21PlusCommon.contract.Call(opts, &out, "checkUpkeep", id, triggerData) + + outstruct := new(CheckUpkeep) + if err != nil { + return *outstruct, err + } + + outstruct.UpkeepNeeded = *abi.ConvertType(out[0], new(bool)).(*bool) + outstruct.PerformData = *abi.ConvertType(out[1], new([]byte)).(*[]byte) + outstruct.UpkeepFailureReason = *abi.ConvertType(out[2], new(uint8)).(*uint8) + outstruct.GasUsed = *abi.ConvertType(out[3], new(*big.Int)).(**big.Int) + outstruct.GasLimit = *abi.ConvertType(out[4], new(*big.Int)).(**big.Int) + outstruct.FastGasWei = *abi.ConvertType(out[5], new(*big.Int)).(**big.Int) + outstruct.LinkNative = *abi.ConvertType(out[6], new(*big.Int)).(**big.Int) + + return *outstruct, err + +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonSession) CheckUpkeep(id *big.Int, triggerData []byte) (CheckUpkeep, + + error) { + return _IAutomationV21PlusCommon.Contract.CheckUpkeep(&_IAutomationV21PlusCommon.CallOpts, id, triggerData) +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonCallerSession) CheckUpkeep(id *big.Int, triggerData []byte) (CheckUpkeep, + + error) { + return _IAutomationV21PlusCommon.Contract.CheckUpkeep(&_IAutomationV21PlusCommon.CallOpts, id, triggerData) +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonCaller) CheckUpkeep0(opts *bind.CallOpts, id *big.Int) (CheckUpkeep0, + + error) { + var out []interface{} + err := _IAutomationV21PlusCommon.contract.Call(opts, &out, "checkUpkeep0", id) + + outstruct := new(CheckUpkeep0) + if err != nil { + return *outstruct, err + } + + outstruct.UpkeepNeeded = *abi.ConvertType(out[0], new(bool)).(*bool) + outstruct.PerformData = *abi.ConvertType(out[1], new([]byte)).(*[]byte) + outstruct.UpkeepFailureReason = *abi.ConvertType(out[2], new(uint8)).(*uint8) + outstruct.GasUsed = *abi.ConvertType(out[3], new(*big.Int)).(**big.Int) + outstruct.GasLimit = *abi.ConvertType(out[4], new(*big.Int)).(**big.Int) + outstruct.FastGasWei = *abi.ConvertType(out[5], new(*big.Int)).(**big.Int) + outstruct.LinkNative = *abi.ConvertType(out[6], new(*big.Int)).(**big.Int) + + return *outstruct, err + +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonSession) CheckUpkeep0(id *big.Int) (CheckUpkeep0, + + error) { + return _IAutomationV21PlusCommon.Contract.CheckUpkeep0(&_IAutomationV21PlusCommon.CallOpts, id) +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonCallerSession) CheckUpkeep0(id *big.Int) (CheckUpkeep0, + + error) { + return _IAutomationV21PlusCommon.Contract.CheckUpkeep0(&_IAutomationV21PlusCommon.CallOpts, id) +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonCaller) GetActiveUpkeepIDs(opts *bind.CallOpts, startIndex *big.Int, maxCount *big.Int) ([]*big.Int, error) { + var out []interface{} + err := _IAutomationV21PlusCommon.contract.Call(opts, &out, "getActiveUpkeepIDs", startIndex, maxCount) + + if err != nil { + return *new([]*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new([]*big.Int)).(*[]*big.Int) + + return out0, err + +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonSession) GetActiveUpkeepIDs(startIndex *big.Int, maxCount *big.Int) ([]*big.Int, error) { + return _IAutomationV21PlusCommon.Contract.GetActiveUpkeepIDs(&_IAutomationV21PlusCommon.CallOpts, startIndex, maxCount) +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonCallerSession) GetActiveUpkeepIDs(startIndex *big.Int, maxCount *big.Int) ([]*big.Int, error) { + return _IAutomationV21PlusCommon.Contract.GetActiveUpkeepIDs(&_IAutomationV21PlusCommon.CallOpts, startIndex, maxCount) +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonCaller) GetMinBalance(opts *bind.CallOpts, id *big.Int) (*big.Int, error) { + var out []interface{} + err := _IAutomationV21PlusCommon.contract.Call(opts, &out, "getMinBalance", id) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonSession) GetMinBalance(id *big.Int) (*big.Int, error) { + return _IAutomationV21PlusCommon.Contract.GetMinBalance(&_IAutomationV21PlusCommon.CallOpts, id) +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonCallerSession) GetMinBalance(id *big.Int) (*big.Int, error) { + return _IAutomationV21PlusCommon.Contract.GetMinBalance(&_IAutomationV21PlusCommon.CallOpts, id) +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonCaller) GetState(opts *bind.CallOpts) (GetState, + + error) { + var out []interface{} + err := _IAutomationV21PlusCommon.contract.Call(opts, &out, "getState") + + outstruct := new(GetState) + if err != nil { + return *outstruct, err + } + + outstruct.State = *abi.ConvertType(out[0], new(IAutomationV21PlusCommonStateLegacy)).(*IAutomationV21PlusCommonStateLegacy) + outstruct.Config = *abi.ConvertType(out[1], new(IAutomationV21PlusCommonOnchainConfigLegacy)).(*IAutomationV21PlusCommonOnchainConfigLegacy) + outstruct.Signers = *abi.ConvertType(out[2], new([]common.Address)).(*[]common.Address) + outstruct.Transmitters = *abi.ConvertType(out[3], new([]common.Address)).(*[]common.Address) + outstruct.F = *abi.ConvertType(out[4], new(uint8)).(*uint8) + + return *outstruct, err + +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonSession) GetState() (GetState, + + error) { + return _IAutomationV21PlusCommon.Contract.GetState(&_IAutomationV21PlusCommon.CallOpts) +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonCallerSession) GetState() (GetState, + + error) { + return _IAutomationV21PlusCommon.Contract.GetState(&_IAutomationV21PlusCommon.CallOpts) +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonCaller) GetTriggerType(opts *bind.CallOpts, upkeepId *big.Int) (uint8, error) { + var out []interface{} + err := _IAutomationV21PlusCommon.contract.Call(opts, &out, "getTriggerType", upkeepId) + + if err != nil { + return *new(uint8), err + } + + out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) + + return out0, err + +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonSession) GetTriggerType(upkeepId *big.Int) (uint8, error) { + return _IAutomationV21PlusCommon.Contract.GetTriggerType(&_IAutomationV21PlusCommon.CallOpts, upkeepId) +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonCallerSession) GetTriggerType(upkeepId *big.Int) (uint8, error) { + return _IAutomationV21PlusCommon.Contract.GetTriggerType(&_IAutomationV21PlusCommon.CallOpts, upkeepId) +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonCaller) GetUpkeep(opts *bind.CallOpts, id *big.Int) (IAutomationV21PlusCommonUpkeepInfoLegacy, error) { + var out []interface{} + err := _IAutomationV21PlusCommon.contract.Call(opts, &out, "getUpkeep", id) + + if err != nil { + return *new(IAutomationV21PlusCommonUpkeepInfoLegacy), err + } + + out0 := *abi.ConvertType(out[0], new(IAutomationV21PlusCommonUpkeepInfoLegacy)).(*IAutomationV21PlusCommonUpkeepInfoLegacy) + + return out0, err + +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonSession) GetUpkeep(id *big.Int) (IAutomationV21PlusCommonUpkeepInfoLegacy, error) { + return _IAutomationV21PlusCommon.Contract.GetUpkeep(&_IAutomationV21PlusCommon.CallOpts, id) +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonCallerSession) GetUpkeep(id *big.Int) (IAutomationV21PlusCommonUpkeepInfoLegacy, error) { + return _IAutomationV21PlusCommon.Contract.GetUpkeep(&_IAutomationV21PlusCommon.CallOpts, id) +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonCaller) GetUpkeepPrivilegeConfig(opts *bind.CallOpts, upkeepId *big.Int) ([]byte, error) { + var out []interface{} + err := _IAutomationV21PlusCommon.contract.Call(opts, &out, "getUpkeepPrivilegeConfig", upkeepId) + + if err != nil { + return *new([]byte), err + } + + out0 := *abi.ConvertType(out[0], new([]byte)).(*[]byte) + + return out0, err + +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonSession) GetUpkeepPrivilegeConfig(upkeepId *big.Int) ([]byte, error) { + return _IAutomationV21PlusCommon.Contract.GetUpkeepPrivilegeConfig(&_IAutomationV21PlusCommon.CallOpts, upkeepId) +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonCallerSession) GetUpkeepPrivilegeConfig(upkeepId *big.Int) ([]byte, error) { + return _IAutomationV21PlusCommon.Contract.GetUpkeepPrivilegeConfig(&_IAutomationV21PlusCommon.CallOpts, upkeepId) +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonCaller) GetUpkeepTriggerConfig(opts *bind.CallOpts, upkeepId *big.Int) ([]byte, error) { + var out []interface{} + err := _IAutomationV21PlusCommon.contract.Call(opts, &out, "getUpkeepTriggerConfig", upkeepId) + + if err != nil { + return *new([]byte), err + } + + out0 := *abi.ConvertType(out[0], new([]byte)).(*[]byte) + + return out0, err + +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonSession) GetUpkeepTriggerConfig(upkeepId *big.Int) ([]byte, error) { + return _IAutomationV21PlusCommon.Contract.GetUpkeepTriggerConfig(&_IAutomationV21PlusCommon.CallOpts, upkeepId) +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonCallerSession) GetUpkeepTriggerConfig(upkeepId *big.Int) ([]byte, error) { + return _IAutomationV21PlusCommon.Contract.GetUpkeepTriggerConfig(&_IAutomationV21PlusCommon.CallOpts, upkeepId) +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonCaller) HasDedupKey(opts *bind.CallOpts, dedupKey [32]byte) (bool, error) { + var out []interface{} + err := _IAutomationV21PlusCommon.contract.Call(opts, &out, "hasDedupKey", dedupKey) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonSession) HasDedupKey(dedupKey [32]byte) (bool, error) { + return _IAutomationV21PlusCommon.Contract.HasDedupKey(&_IAutomationV21PlusCommon.CallOpts, dedupKey) +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonCallerSession) HasDedupKey(dedupKey [32]byte) (bool, error) { + return _IAutomationV21PlusCommon.Contract.HasDedupKey(&_IAutomationV21PlusCommon.CallOpts, dedupKey) +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _IAutomationV21PlusCommon.contract.Call(opts, &out, "owner") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonSession) Owner() (common.Address, error) { + return _IAutomationV21PlusCommon.Contract.Owner(&_IAutomationV21PlusCommon.CallOpts) +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonCallerSession) Owner() (common.Address, error) { + return _IAutomationV21PlusCommon.Contract.Owner(&_IAutomationV21PlusCommon.CallOpts) +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonCaller) SimulatePerformUpkeep(opts *bind.CallOpts, id *big.Int, performData []byte) (SimulatePerformUpkeep, + + error) { + var out []interface{} + err := _IAutomationV21PlusCommon.contract.Call(opts, &out, "simulatePerformUpkeep", id, performData) + + outstruct := new(SimulatePerformUpkeep) + if err != nil { + return *outstruct, err + } + + outstruct.Success = *abi.ConvertType(out[0], new(bool)).(*bool) + outstruct.GasUsed = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) + + return *outstruct, err + +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonSession) SimulatePerformUpkeep(id *big.Int, performData []byte) (SimulatePerformUpkeep, + + error) { + return _IAutomationV21PlusCommon.Contract.SimulatePerformUpkeep(&_IAutomationV21PlusCommon.CallOpts, id, performData) +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonCallerSession) SimulatePerformUpkeep(id *big.Int, performData []byte) (SimulatePerformUpkeep, + + error) { + return _IAutomationV21PlusCommon.Contract.SimulatePerformUpkeep(&_IAutomationV21PlusCommon.CallOpts, id, performData) +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonCaller) TypeAndVersion(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _IAutomationV21PlusCommon.contract.Call(opts, &out, "typeAndVersion") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonSession) TypeAndVersion() (string, error) { + return _IAutomationV21PlusCommon.Contract.TypeAndVersion(&_IAutomationV21PlusCommon.CallOpts) +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonCallerSession) TypeAndVersion() (string, error) { + return _IAutomationV21PlusCommon.Contract.TypeAndVersion(&_IAutomationV21PlusCommon.CallOpts) +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonTransactor) AddFunds(opts *bind.TransactOpts, id *big.Int, amount *big.Int) (*types.Transaction, error) { + return _IAutomationV21PlusCommon.contract.Transact(opts, "addFunds", id, amount) +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonSession) AddFunds(id *big.Int, amount *big.Int) (*types.Transaction, error) { + return _IAutomationV21PlusCommon.Contract.AddFunds(&_IAutomationV21PlusCommon.TransactOpts, id, amount) +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonTransactorSession) AddFunds(id *big.Int, amount *big.Int) (*types.Transaction, error) { + return _IAutomationV21PlusCommon.Contract.AddFunds(&_IAutomationV21PlusCommon.TransactOpts, id, amount) +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonTransactor) CancelUpkeep(opts *bind.TransactOpts, id *big.Int) (*types.Transaction, error) { + return _IAutomationV21PlusCommon.contract.Transact(opts, "cancelUpkeep", id) +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonSession) CancelUpkeep(id *big.Int) (*types.Transaction, error) { + return _IAutomationV21PlusCommon.Contract.CancelUpkeep(&_IAutomationV21PlusCommon.TransactOpts, id) +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonTransactorSession) CancelUpkeep(id *big.Int) (*types.Transaction, error) { + return _IAutomationV21PlusCommon.Contract.CancelUpkeep(&_IAutomationV21PlusCommon.TransactOpts, id) +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonTransactor) ExecuteCallback(opts *bind.TransactOpts, id *big.Int, payload []byte) (*types.Transaction, error) { + return _IAutomationV21PlusCommon.contract.Transact(opts, "executeCallback", id, payload) +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonSession) ExecuteCallback(id *big.Int, payload []byte) (*types.Transaction, error) { + return _IAutomationV21PlusCommon.Contract.ExecuteCallback(&_IAutomationV21PlusCommon.TransactOpts, id, payload) +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonTransactorSession) ExecuteCallback(id *big.Int, payload []byte) (*types.Transaction, error) { + return _IAutomationV21PlusCommon.Contract.ExecuteCallback(&_IAutomationV21PlusCommon.TransactOpts, id, payload) +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonTransactor) Pause(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IAutomationV21PlusCommon.contract.Transact(opts, "pause") +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonSession) Pause() (*types.Transaction, error) { + return _IAutomationV21PlusCommon.Contract.Pause(&_IAutomationV21PlusCommon.TransactOpts) +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonTransactorSession) Pause() (*types.Transaction, error) { + return _IAutomationV21PlusCommon.Contract.Pause(&_IAutomationV21PlusCommon.TransactOpts) +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonTransactor) PauseUpkeep(opts *bind.TransactOpts, id *big.Int) (*types.Transaction, error) { + return _IAutomationV21PlusCommon.contract.Transact(opts, "pauseUpkeep", id) +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonSession) PauseUpkeep(id *big.Int) (*types.Transaction, error) { + return _IAutomationV21PlusCommon.Contract.PauseUpkeep(&_IAutomationV21PlusCommon.TransactOpts, id) +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonTransactorSession) PauseUpkeep(id *big.Int) (*types.Transaction, error) { + return _IAutomationV21PlusCommon.Contract.PauseUpkeep(&_IAutomationV21PlusCommon.TransactOpts, id) +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonTransactor) SetUpkeepCheckData(opts *bind.TransactOpts, id *big.Int, newCheckData []byte) (*types.Transaction, error) { + return _IAutomationV21PlusCommon.contract.Transact(opts, "setUpkeepCheckData", id, newCheckData) +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonSession) SetUpkeepCheckData(id *big.Int, newCheckData []byte) (*types.Transaction, error) { + return _IAutomationV21PlusCommon.Contract.SetUpkeepCheckData(&_IAutomationV21PlusCommon.TransactOpts, id, newCheckData) +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonTransactorSession) SetUpkeepCheckData(id *big.Int, newCheckData []byte) (*types.Transaction, error) { + return _IAutomationV21PlusCommon.Contract.SetUpkeepCheckData(&_IAutomationV21PlusCommon.TransactOpts, id, newCheckData) +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonTransactor) SetUpkeepGasLimit(opts *bind.TransactOpts, id *big.Int, gasLimit uint32) (*types.Transaction, error) { + return _IAutomationV21PlusCommon.contract.Transact(opts, "setUpkeepGasLimit", id, gasLimit) +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonSession) SetUpkeepGasLimit(id *big.Int, gasLimit uint32) (*types.Transaction, error) { + return _IAutomationV21PlusCommon.Contract.SetUpkeepGasLimit(&_IAutomationV21PlusCommon.TransactOpts, id, gasLimit) +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonTransactorSession) SetUpkeepGasLimit(id *big.Int, gasLimit uint32) (*types.Transaction, error) { + return _IAutomationV21PlusCommon.Contract.SetUpkeepGasLimit(&_IAutomationV21PlusCommon.TransactOpts, id, gasLimit) +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonTransactor) SetUpkeepPrivilegeConfig(opts *bind.TransactOpts, upkeepId *big.Int, newPrivilegeConfig []byte) (*types.Transaction, error) { + return _IAutomationV21PlusCommon.contract.Transact(opts, "setUpkeepPrivilegeConfig", upkeepId, newPrivilegeConfig) +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonSession) SetUpkeepPrivilegeConfig(upkeepId *big.Int, newPrivilegeConfig []byte) (*types.Transaction, error) { + return _IAutomationV21PlusCommon.Contract.SetUpkeepPrivilegeConfig(&_IAutomationV21PlusCommon.TransactOpts, upkeepId, newPrivilegeConfig) +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonTransactorSession) SetUpkeepPrivilegeConfig(upkeepId *big.Int, newPrivilegeConfig []byte) (*types.Transaction, error) { + return _IAutomationV21PlusCommon.Contract.SetUpkeepPrivilegeConfig(&_IAutomationV21PlusCommon.TransactOpts, upkeepId, newPrivilegeConfig) +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonTransactor) SetUpkeepTriggerConfig(opts *bind.TransactOpts, id *big.Int, triggerConfig []byte) (*types.Transaction, error) { + return _IAutomationV21PlusCommon.contract.Transact(opts, "setUpkeepTriggerConfig", id, triggerConfig) +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonSession) SetUpkeepTriggerConfig(id *big.Int, triggerConfig []byte) (*types.Transaction, error) { + return _IAutomationV21PlusCommon.Contract.SetUpkeepTriggerConfig(&_IAutomationV21PlusCommon.TransactOpts, id, triggerConfig) +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonTransactorSession) SetUpkeepTriggerConfig(id *big.Int, triggerConfig []byte) (*types.Transaction, error) { + return _IAutomationV21PlusCommon.Contract.SetUpkeepTriggerConfig(&_IAutomationV21PlusCommon.TransactOpts, id, triggerConfig) +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonTransactor) UnpauseUpkeep(opts *bind.TransactOpts, id *big.Int) (*types.Transaction, error) { + return _IAutomationV21PlusCommon.contract.Transact(opts, "unpauseUpkeep", id) +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonSession) UnpauseUpkeep(id *big.Int) (*types.Transaction, error) { + return _IAutomationV21PlusCommon.Contract.UnpauseUpkeep(&_IAutomationV21PlusCommon.TransactOpts, id) +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonTransactorSession) UnpauseUpkeep(id *big.Int) (*types.Transaction, error) { + return _IAutomationV21PlusCommon.Contract.UnpauseUpkeep(&_IAutomationV21PlusCommon.TransactOpts, id) +} + +type IAutomationV21PlusCommonAdminPrivilegeConfigSetIterator struct { + Event *IAutomationV21PlusCommonAdminPrivilegeConfigSet + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *IAutomationV21PlusCommonAdminPrivilegeConfigSetIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(IAutomationV21PlusCommonAdminPrivilegeConfigSet) + 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(IAutomationV21PlusCommonAdminPrivilegeConfigSet) + 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 *IAutomationV21PlusCommonAdminPrivilegeConfigSetIterator) Error() error { + return it.fail +} + +func (it *IAutomationV21PlusCommonAdminPrivilegeConfigSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type IAutomationV21PlusCommonAdminPrivilegeConfigSet struct { + Admin common.Address + PrivilegeConfig []byte + Raw types.Log +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) FilterAdminPrivilegeConfigSet(opts *bind.FilterOpts, admin []common.Address) (*IAutomationV21PlusCommonAdminPrivilegeConfigSetIterator, error) { + + var adminRule []interface{} + for _, adminItem := range admin { + adminRule = append(adminRule, adminItem) + } + + logs, sub, err := _IAutomationV21PlusCommon.contract.FilterLogs(opts, "AdminPrivilegeConfigSet", adminRule) + if err != nil { + return nil, err + } + return &IAutomationV21PlusCommonAdminPrivilegeConfigSetIterator{contract: _IAutomationV21PlusCommon.contract, event: "AdminPrivilegeConfigSet", logs: logs, sub: sub}, nil +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) WatchAdminPrivilegeConfigSet(opts *bind.WatchOpts, sink chan<- *IAutomationV21PlusCommonAdminPrivilegeConfigSet, admin []common.Address) (event.Subscription, error) { + + var adminRule []interface{} + for _, adminItem := range admin { + adminRule = append(adminRule, adminItem) + } + + logs, sub, err := _IAutomationV21PlusCommon.contract.WatchLogs(opts, "AdminPrivilegeConfigSet", adminRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(IAutomationV21PlusCommonAdminPrivilegeConfigSet) + if err := _IAutomationV21PlusCommon.contract.UnpackLog(event, "AdminPrivilegeConfigSet", 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 (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) ParseAdminPrivilegeConfigSet(log types.Log) (*IAutomationV21PlusCommonAdminPrivilegeConfigSet, error) { + event := new(IAutomationV21PlusCommonAdminPrivilegeConfigSet) + if err := _IAutomationV21PlusCommon.contract.UnpackLog(event, "AdminPrivilegeConfigSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type IAutomationV21PlusCommonCancelledUpkeepReportIterator struct { + Event *IAutomationV21PlusCommonCancelledUpkeepReport + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *IAutomationV21PlusCommonCancelledUpkeepReportIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(IAutomationV21PlusCommonCancelledUpkeepReport) + 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(IAutomationV21PlusCommonCancelledUpkeepReport) + 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 *IAutomationV21PlusCommonCancelledUpkeepReportIterator) Error() error { + return it.fail +} + +func (it *IAutomationV21PlusCommonCancelledUpkeepReportIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type IAutomationV21PlusCommonCancelledUpkeepReport struct { + Id *big.Int + Trigger []byte + Raw types.Log +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) FilterCancelledUpkeepReport(opts *bind.FilterOpts, id []*big.Int) (*IAutomationV21PlusCommonCancelledUpkeepReportIterator, error) { + + var idRule []interface{} + for _, idItem := range id { + idRule = append(idRule, idItem) + } + + logs, sub, err := _IAutomationV21PlusCommon.contract.FilterLogs(opts, "CancelledUpkeepReport", idRule) + if err != nil { + return nil, err + } + return &IAutomationV21PlusCommonCancelledUpkeepReportIterator{contract: _IAutomationV21PlusCommon.contract, event: "CancelledUpkeepReport", logs: logs, sub: sub}, nil +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) WatchCancelledUpkeepReport(opts *bind.WatchOpts, sink chan<- *IAutomationV21PlusCommonCancelledUpkeepReport, id []*big.Int) (event.Subscription, error) { + + var idRule []interface{} + for _, idItem := range id { + idRule = append(idRule, idItem) + } + + logs, sub, err := _IAutomationV21PlusCommon.contract.WatchLogs(opts, "CancelledUpkeepReport", idRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(IAutomationV21PlusCommonCancelledUpkeepReport) + if err := _IAutomationV21PlusCommon.contract.UnpackLog(event, "CancelledUpkeepReport", 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 (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) ParseCancelledUpkeepReport(log types.Log) (*IAutomationV21PlusCommonCancelledUpkeepReport, error) { + event := new(IAutomationV21PlusCommonCancelledUpkeepReport) + if err := _IAutomationV21PlusCommon.contract.UnpackLog(event, "CancelledUpkeepReport", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type IAutomationV21PlusCommonConfigSetIterator struct { + Event *IAutomationV21PlusCommonConfigSet + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *IAutomationV21PlusCommonConfigSetIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(IAutomationV21PlusCommonConfigSet) + 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(IAutomationV21PlusCommonConfigSet) + 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 *IAutomationV21PlusCommonConfigSetIterator) Error() error { + return it.fail +} + +func (it *IAutomationV21PlusCommonConfigSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type IAutomationV21PlusCommonConfigSet struct { + PreviousConfigBlockNumber uint32 + ConfigDigest [32]byte + ConfigCount uint64 + Signers []common.Address + Transmitters []common.Address + F uint8 + OnchainConfig []byte + OffchainConfigVersion uint64 + OffchainConfig []byte + Raw types.Log +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) FilterConfigSet(opts *bind.FilterOpts) (*IAutomationV21PlusCommonConfigSetIterator, error) { + + logs, sub, err := _IAutomationV21PlusCommon.contract.FilterLogs(opts, "ConfigSet") + if err != nil { + return nil, err + } + return &IAutomationV21PlusCommonConfigSetIterator{contract: _IAutomationV21PlusCommon.contract, event: "ConfigSet", logs: logs, sub: sub}, nil +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) WatchConfigSet(opts *bind.WatchOpts, sink chan<- *IAutomationV21PlusCommonConfigSet) (event.Subscription, error) { + + logs, sub, err := _IAutomationV21PlusCommon.contract.WatchLogs(opts, "ConfigSet") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(IAutomationV21PlusCommonConfigSet) + if err := _IAutomationV21PlusCommon.contract.UnpackLog(event, "ConfigSet", 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 (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) ParseConfigSet(log types.Log) (*IAutomationV21PlusCommonConfigSet, error) { + event := new(IAutomationV21PlusCommonConfigSet) + if err := _IAutomationV21PlusCommon.contract.UnpackLog(event, "ConfigSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type IAutomationV21PlusCommonDedupKeyAddedIterator struct { + Event *IAutomationV21PlusCommonDedupKeyAdded + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *IAutomationV21PlusCommonDedupKeyAddedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(IAutomationV21PlusCommonDedupKeyAdded) + 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(IAutomationV21PlusCommonDedupKeyAdded) + 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 *IAutomationV21PlusCommonDedupKeyAddedIterator) Error() error { + return it.fail +} + +func (it *IAutomationV21PlusCommonDedupKeyAddedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type IAutomationV21PlusCommonDedupKeyAdded struct { + DedupKey [32]byte + Raw types.Log +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) FilterDedupKeyAdded(opts *bind.FilterOpts, dedupKey [][32]byte) (*IAutomationV21PlusCommonDedupKeyAddedIterator, error) { + + var dedupKeyRule []interface{} + for _, dedupKeyItem := range dedupKey { + dedupKeyRule = append(dedupKeyRule, dedupKeyItem) + } + + logs, sub, err := _IAutomationV21PlusCommon.contract.FilterLogs(opts, "DedupKeyAdded", dedupKeyRule) + if err != nil { + return nil, err + } + return &IAutomationV21PlusCommonDedupKeyAddedIterator{contract: _IAutomationV21PlusCommon.contract, event: "DedupKeyAdded", logs: logs, sub: sub}, nil +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) WatchDedupKeyAdded(opts *bind.WatchOpts, sink chan<- *IAutomationV21PlusCommonDedupKeyAdded, dedupKey [][32]byte) (event.Subscription, error) { + + var dedupKeyRule []interface{} + for _, dedupKeyItem := range dedupKey { + dedupKeyRule = append(dedupKeyRule, dedupKeyItem) + } + + logs, sub, err := _IAutomationV21PlusCommon.contract.WatchLogs(opts, "DedupKeyAdded", dedupKeyRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(IAutomationV21PlusCommonDedupKeyAdded) + if err := _IAutomationV21PlusCommon.contract.UnpackLog(event, "DedupKeyAdded", 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 (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) ParseDedupKeyAdded(log types.Log) (*IAutomationV21PlusCommonDedupKeyAdded, error) { + event := new(IAutomationV21PlusCommonDedupKeyAdded) + if err := _IAutomationV21PlusCommon.contract.UnpackLog(event, "DedupKeyAdded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type IAutomationV21PlusCommonFundsAddedIterator struct { + Event *IAutomationV21PlusCommonFundsAdded + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *IAutomationV21PlusCommonFundsAddedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(IAutomationV21PlusCommonFundsAdded) + 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(IAutomationV21PlusCommonFundsAdded) + 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 *IAutomationV21PlusCommonFundsAddedIterator) Error() error { + return it.fail +} + +func (it *IAutomationV21PlusCommonFundsAddedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type IAutomationV21PlusCommonFundsAdded struct { + Id *big.Int + From common.Address + Amount *big.Int + Raw types.Log +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) FilterFundsAdded(opts *bind.FilterOpts, id []*big.Int, from []common.Address) (*IAutomationV21PlusCommonFundsAddedIterator, error) { + + var idRule []interface{} + for _, idItem := range id { + idRule = append(idRule, idItem) + } + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + + logs, sub, err := _IAutomationV21PlusCommon.contract.FilterLogs(opts, "FundsAdded", idRule, fromRule) + if err != nil { + return nil, err + } + return &IAutomationV21PlusCommonFundsAddedIterator{contract: _IAutomationV21PlusCommon.contract, event: "FundsAdded", logs: logs, sub: sub}, nil +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) WatchFundsAdded(opts *bind.WatchOpts, sink chan<- *IAutomationV21PlusCommonFundsAdded, id []*big.Int, from []common.Address) (event.Subscription, error) { + + var idRule []interface{} + for _, idItem := range id { + idRule = append(idRule, idItem) + } + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + + logs, sub, err := _IAutomationV21PlusCommon.contract.WatchLogs(opts, "FundsAdded", idRule, fromRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(IAutomationV21PlusCommonFundsAdded) + if err := _IAutomationV21PlusCommon.contract.UnpackLog(event, "FundsAdded", 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 (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) ParseFundsAdded(log types.Log) (*IAutomationV21PlusCommonFundsAdded, error) { + event := new(IAutomationV21PlusCommonFundsAdded) + if err := _IAutomationV21PlusCommon.contract.UnpackLog(event, "FundsAdded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type IAutomationV21PlusCommonFundsWithdrawnIterator struct { + Event *IAutomationV21PlusCommonFundsWithdrawn + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *IAutomationV21PlusCommonFundsWithdrawnIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(IAutomationV21PlusCommonFundsWithdrawn) + 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(IAutomationV21PlusCommonFundsWithdrawn) + 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 *IAutomationV21PlusCommonFundsWithdrawnIterator) Error() error { + return it.fail +} + +func (it *IAutomationV21PlusCommonFundsWithdrawnIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type IAutomationV21PlusCommonFundsWithdrawn struct { + Id *big.Int + Amount *big.Int + To common.Address + Raw types.Log +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) FilterFundsWithdrawn(opts *bind.FilterOpts, id []*big.Int) (*IAutomationV21PlusCommonFundsWithdrawnIterator, error) { + + var idRule []interface{} + for _, idItem := range id { + idRule = append(idRule, idItem) + } + + logs, sub, err := _IAutomationV21PlusCommon.contract.FilterLogs(opts, "FundsWithdrawn", idRule) + if err != nil { + return nil, err + } + return &IAutomationV21PlusCommonFundsWithdrawnIterator{contract: _IAutomationV21PlusCommon.contract, event: "FundsWithdrawn", logs: logs, sub: sub}, nil +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) WatchFundsWithdrawn(opts *bind.WatchOpts, sink chan<- *IAutomationV21PlusCommonFundsWithdrawn, id []*big.Int) (event.Subscription, error) { + + var idRule []interface{} + for _, idItem := range id { + idRule = append(idRule, idItem) + } + + logs, sub, err := _IAutomationV21PlusCommon.contract.WatchLogs(opts, "FundsWithdrawn", idRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(IAutomationV21PlusCommonFundsWithdrawn) + if err := _IAutomationV21PlusCommon.contract.UnpackLog(event, "FundsWithdrawn", 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 (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) ParseFundsWithdrawn(log types.Log) (*IAutomationV21PlusCommonFundsWithdrawn, error) { + event := new(IAutomationV21PlusCommonFundsWithdrawn) + if err := _IAutomationV21PlusCommon.contract.UnpackLog(event, "FundsWithdrawn", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type IAutomationV21PlusCommonInsufficientFundsUpkeepReportIterator struct { + Event *IAutomationV21PlusCommonInsufficientFundsUpkeepReport + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *IAutomationV21PlusCommonInsufficientFundsUpkeepReportIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(IAutomationV21PlusCommonInsufficientFundsUpkeepReport) + 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(IAutomationV21PlusCommonInsufficientFundsUpkeepReport) + 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 *IAutomationV21PlusCommonInsufficientFundsUpkeepReportIterator) Error() error { + return it.fail +} + +func (it *IAutomationV21PlusCommonInsufficientFundsUpkeepReportIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type IAutomationV21PlusCommonInsufficientFundsUpkeepReport struct { + Id *big.Int + Trigger []byte + Raw types.Log +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) FilterInsufficientFundsUpkeepReport(opts *bind.FilterOpts, id []*big.Int) (*IAutomationV21PlusCommonInsufficientFundsUpkeepReportIterator, error) { + + var idRule []interface{} + for _, idItem := range id { + idRule = append(idRule, idItem) + } + + logs, sub, err := _IAutomationV21PlusCommon.contract.FilterLogs(opts, "InsufficientFundsUpkeepReport", idRule) + if err != nil { + return nil, err + } + return &IAutomationV21PlusCommonInsufficientFundsUpkeepReportIterator{contract: _IAutomationV21PlusCommon.contract, event: "InsufficientFundsUpkeepReport", logs: logs, sub: sub}, nil +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) WatchInsufficientFundsUpkeepReport(opts *bind.WatchOpts, sink chan<- *IAutomationV21PlusCommonInsufficientFundsUpkeepReport, id []*big.Int) (event.Subscription, error) { + + var idRule []interface{} + for _, idItem := range id { + idRule = append(idRule, idItem) + } + + logs, sub, err := _IAutomationV21PlusCommon.contract.WatchLogs(opts, "InsufficientFundsUpkeepReport", idRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(IAutomationV21PlusCommonInsufficientFundsUpkeepReport) + if err := _IAutomationV21PlusCommon.contract.UnpackLog(event, "InsufficientFundsUpkeepReport", 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 (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) ParseInsufficientFundsUpkeepReport(log types.Log) (*IAutomationV21PlusCommonInsufficientFundsUpkeepReport, error) { + event := new(IAutomationV21PlusCommonInsufficientFundsUpkeepReport) + if err := _IAutomationV21PlusCommon.contract.UnpackLog(event, "InsufficientFundsUpkeepReport", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type IAutomationV21PlusCommonOwnershipTransferRequestedIterator struct { + Event *IAutomationV21PlusCommonOwnershipTransferRequested + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *IAutomationV21PlusCommonOwnershipTransferRequestedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(IAutomationV21PlusCommonOwnershipTransferRequested) + 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(IAutomationV21PlusCommonOwnershipTransferRequested) + 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 *IAutomationV21PlusCommonOwnershipTransferRequestedIterator) Error() error { + return it.fail +} + +func (it *IAutomationV21PlusCommonOwnershipTransferRequestedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type IAutomationV21PlusCommonOwnershipTransferRequested struct { + From common.Address + To common.Address + Raw types.Log +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*IAutomationV21PlusCommonOwnershipTransferRequestedIterator, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _IAutomationV21PlusCommon.contract.FilterLogs(opts, "OwnershipTransferRequested", fromRule, toRule) + if err != nil { + return nil, err + } + return &IAutomationV21PlusCommonOwnershipTransferRequestedIterator{contract: _IAutomationV21PlusCommon.contract, event: "OwnershipTransferRequested", logs: logs, sub: sub}, nil +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *IAutomationV21PlusCommonOwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _IAutomationV21PlusCommon.contract.WatchLogs(opts, "OwnershipTransferRequested", fromRule, toRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(IAutomationV21PlusCommonOwnershipTransferRequested) + if err := _IAutomationV21PlusCommon.contract.UnpackLog(event, "OwnershipTransferRequested", 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 (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) ParseOwnershipTransferRequested(log types.Log) (*IAutomationV21PlusCommonOwnershipTransferRequested, error) { + event := new(IAutomationV21PlusCommonOwnershipTransferRequested) + if err := _IAutomationV21PlusCommon.contract.UnpackLog(event, "OwnershipTransferRequested", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type IAutomationV21PlusCommonOwnershipTransferredIterator struct { + Event *IAutomationV21PlusCommonOwnershipTransferred + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *IAutomationV21PlusCommonOwnershipTransferredIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(IAutomationV21PlusCommonOwnershipTransferred) + 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(IAutomationV21PlusCommonOwnershipTransferred) + 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 *IAutomationV21PlusCommonOwnershipTransferredIterator) Error() error { + return it.fail +} + +func (it *IAutomationV21PlusCommonOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type IAutomationV21PlusCommonOwnershipTransferred struct { + From common.Address + To common.Address + Raw types.Log +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*IAutomationV21PlusCommonOwnershipTransferredIterator, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _IAutomationV21PlusCommon.contract.FilterLogs(opts, "OwnershipTransferred", fromRule, toRule) + if err != nil { + return nil, err + } + return &IAutomationV21PlusCommonOwnershipTransferredIterator{contract: _IAutomationV21PlusCommon.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *IAutomationV21PlusCommonOwnershipTransferred, from []common.Address, to []common.Address) (event.Subscription, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _IAutomationV21PlusCommon.contract.WatchLogs(opts, "OwnershipTransferred", fromRule, toRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(IAutomationV21PlusCommonOwnershipTransferred) + if err := _IAutomationV21PlusCommon.contract.UnpackLog(event, "OwnershipTransferred", 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 (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) ParseOwnershipTransferred(log types.Log) (*IAutomationV21PlusCommonOwnershipTransferred, error) { + event := new(IAutomationV21PlusCommonOwnershipTransferred) + if err := _IAutomationV21PlusCommon.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type IAutomationV21PlusCommonPausedIterator struct { + Event *IAutomationV21PlusCommonPaused + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *IAutomationV21PlusCommonPausedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(IAutomationV21PlusCommonPaused) + 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(IAutomationV21PlusCommonPaused) + 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 *IAutomationV21PlusCommonPausedIterator) Error() error { + return it.fail +} + +func (it *IAutomationV21PlusCommonPausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type IAutomationV21PlusCommonPaused struct { + Account common.Address + Raw types.Log +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) FilterPaused(opts *bind.FilterOpts) (*IAutomationV21PlusCommonPausedIterator, error) { + + logs, sub, err := _IAutomationV21PlusCommon.contract.FilterLogs(opts, "Paused") + if err != nil { + return nil, err + } + return &IAutomationV21PlusCommonPausedIterator{contract: _IAutomationV21PlusCommon.contract, event: "Paused", logs: logs, sub: sub}, nil +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) WatchPaused(opts *bind.WatchOpts, sink chan<- *IAutomationV21PlusCommonPaused) (event.Subscription, error) { + + logs, sub, err := _IAutomationV21PlusCommon.contract.WatchLogs(opts, "Paused") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(IAutomationV21PlusCommonPaused) + if err := _IAutomationV21PlusCommon.contract.UnpackLog(event, "Paused", 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 (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) ParsePaused(log types.Log) (*IAutomationV21PlusCommonPaused, error) { + event := new(IAutomationV21PlusCommonPaused) + if err := _IAutomationV21PlusCommon.contract.UnpackLog(event, "Paused", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type IAutomationV21PlusCommonPayeesUpdatedIterator struct { + Event *IAutomationV21PlusCommonPayeesUpdated + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *IAutomationV21PlusCommonPayeesUpdatedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(IAutomationV21PlusCommonPayeesUpdated) + 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(IAutomationV21PlusCommonPayeesUpdated) + 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 *IAutomationV21PlusCommonPayeesUpdatedIterator) Error() error { + return it.fail +} + +func (it *IAutomationV21PlusCommonPayeesUpdatedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type IAutomationV21PlusCommonPayeesUpdated struct { + Transmitters []common.Address + Payees []common.Address + Raw types.Log +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) FilterPayeesUpdated(opts *bind.FilterOpts) (*IAutomationV21PlusCommonPayeesUpdatedIterator, error) { + + logs, sub, err := _IAutomationV21PlusCommon.contract.FilterLogs(opts, "PayeesUpdated") + if err != nil { + return nil, err + } + return &IAutomationV21PlusCommonPayeesUpdatedIterator{contract: _IAutomationV21PlusCommon.contract, event: "PayeesUpdated", logs: logs, sub: sub}, nil +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) WatchPayeesUpdated(opts *bind.WatchOpts, sink chan<- *IAutomationV21PlusCommonPayeesUpdated) (event.Subscription, error) { + + logs, sub, err := _IAutomationV21PlusCommon.contract.WatchLogs(opts, "PayeesUpdated") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(IAutomationV21PlusCommonPayeesUpdated) + if err := _IAutomationV21PlusCommon.contract.UnpackLog(event, "PayeesUpdated", 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 (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) ParsePayeesUpdated(log types.Log) (*IAutomationV21PlusCommonPayeesUpdated, error) { + event := new(IAutomationV21PlusCommonPayeesUpdated) + if err := _IAutomationV21PlusCommon.contract.UnpackLog(event, "PayeesUpdated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type IAutomationV21PlusCommonPayeeshipTransferRequestedIterator struct { + Event *IAutomationV21PlusCommonPayeeshipTransferRequested + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *IAutomationV21PlusCommonPayeeshipTransferRequestedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(IAutomationV21PlusCommonPayeeshipTransferRequested) + 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(IAutomationV21PlusCommonPayeeshipTransferRequested) + 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 *IAutomationV21PlusCommonPayeeshipTransferRequestedIterator) Error() error { + return it.fail +} + +func (it *IAutomationV21PlusCommonPayeeshipTransferRequestedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type IAutomationV21PlusCommonPayeeshipTransferRequested struct { + Transmitter common.Address + From common.Address + To common.Address + Raw types.Log +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) FilterPayeeshipTransferRequested(opts *bind.FilterOpts, transmitter []common.Address, from []common.Address, to []common.Address) (*IAutomationV21PlusCommonPayeeshipTransferRequestedIterator, error) { + + var transmitterRule []interface{} + for _, transmitterItem := range transmitter { + transmitterRule = append(transmitterRule, transmitterItem) + } + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _IAutomationV21PlusCommon.contract.FilterLogs(opts, "PayeeshipTransferRequested", transmitterRule, fromRule, toRule) + if err != nil { + return nil, err + } + return &IAutomationV21PlusCommonPayeeshipTransferRequestedIterator{contract: _IAutomationV21PlusCommon.contract, event: "PayeeshipTransferRequested", logs: logs, sub: sub}, nil +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) WatchPayeeshipTransferRequested(opts *bind.WatchOpts, sink chan<- *IAutomationV21PlusCommonPayeeshipTransferRequested, transmitter []common.Address, from []common.Address, to []common.Address) (event.Subscription, error) { + + var transmitterRule []interface{} + for _, transmitterItem := range transmitter { + transmitterRule = append(transmitterRule, transmitterItem) + } + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _IAutomationV21PlusCommon.contract.WatchLogs(opts, "PayeeshipTransferRequested", transmitterRule, fromRule, toRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(IAutomationV21PlusCommonPayeeshipTransferRequested) + if err := _IAutomationV21PlusCommon.contract.UnpackLog(event, "PayeeshipTransferRequested", 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 (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) ParsePayeeshipTransferRequested(log types.Log) (*IAutomationV21PlusCommonPayeeshipTransferRequested, error) { + event := new(IAutomationV21PlusCommonPayeeshipTransferRequested) + if err := _IAutomationV21PlusCommon.contract.UnpackLog(event, "PayeeshipTransferRequested", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type IAutomationV21PlusCommonPayeeshipTransferredIterator struct { + Event *IAutomationV21PlusCommonPayeeshipTransferred + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *IAutomationV21PlusCommonPayeeshipTransferredIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(IAutomationV21PlusCommonPayeeshipTransferred) + 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(IAutomationV21PlusCommonPayeeshipTransferred) + 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 *IAutomationV21PlusCommonPayeeshipTransferredIterator) Error() error { + return it.fail +} + +func (it *IAutomationV21PlusCommonPayeeshipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type IAutomationV21PlusCommonPayeeshipTransferred struct { + Transmitter common.Address + From common.Address + To common.Address + Raw types.Log +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) FilterPayeeshipTransferred(opts *bind.FilterOpts, transmitter []common.Address, from []common.Address, to []common.Address) (*IAutomationV21PlusCommonPayeeshipTransferredIterator, error) { + + var transmitterRule []interface{} + for _, transmitterItem := range transmitter { + transmitterRule = append(transmitterRule, transmitterItem) + } + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _IAutomationV21PlusCommon.contract.FilterLogs(opts, "PayeeshipTransferred", transmitterRule, fromRule, toRule) + if err != nil { + return nil, err + } + return &IAutomationV21PlusCommonPayeeshipTransferredIterator{contract: _IAutomationV21PlusCommon.contract, event: "PayeeshipTransferred", logs: logs, sub: sub}, nil +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) WatchPayeeshipTransferred(opts *bind.WatchOpts, sink chan<- *IAutomationV21PlusCommonPayeeshipTransferred, transmitter []common.Address, from []common.Address, to []common.Address) (event.Subscription, error) { + + var transmitterRule []interface{} + for _, transmitterItem := range transmitter { + transmitterRule = append(transmitterRule, transmitterItem) + } + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _IAutomationV21PlusCommon.contract.WatchLogs(opts, "PayeeshipTransferred", transmitterRule, fromRule, toRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(IAutomationV21PlusCommonPayeeshipTransferred) + if err := _IAutomationV21PlusCommon.contract.UnpackLog(event, "PayeeshipTransferred", 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 (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) ParsePayeeshipTransferred(log types.Log) (*IAutomationV21PlusCommonPayeeshipTransferred, error) { + event := new(IAutomationV21PlusCommonPayeeshipTransferred) + if err := _IAutomationV21PlusCommon.contract.UnpackLog(event, "PayeeshipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type IAutomationV21PlusCommonPaymentWithdrawnIterator struct { + Event *IAutomationV21PlusCommonPaymentWithdrawn + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *IAutomationV21PlusCommonPaymentWithdrawnIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(IAutomationV21PlusCommonPaymentWithdrawn) + 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(IAutomationV21PlusCommonPaymentWithdrawn) + 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 *IAutomationV21PlusCommonPaymentWithdrawnIterator) Error() error { + return it.fail +} + +func (it *IAutomationV21PlusCommonPaymentWithdrawnIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type IAutomationV21PlusCommonPaymentWithdrawn struct { + Transmitter common.Address + Amount *big.Int + To common.Address + Payee common.Address + Raw types.Log +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) FilterPaymentWithdrawn(opts *bind.FilterOpts, transmitter []common.Address, amount []*big.Int, to []common.Address) (*IAutomationV21PlusCommonPaymentWithdrawnIterator, error) { + + var transmitterRule []interface{} + for _, transmitterItem := range transmitter { + transmitterRule = append(transmitterRule, transmitterItem) + } + var amountRule []interface{} + for _, amountItem := range amount { + amountRule = append(amountRule, amountItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _IAutomationV21PlusCommon.contract.FilterLogs(opts, "PaymentWithdrawn", transmitterRule, amountRule, toRule) + if err != nil { + return nil, err + } + return &IAutomationV21PlusCommonPaymentWithdrawnIterator{contract: _IAutomationV21PlusCommon.contract, event: "PaymentWithdrawn", logs: logs, sub: sub}, nil +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) WatchPaymentWithdrawn(opts *bind.WatchOpts, sink chan<- *IAutomationV21PlusCommonPaymentWithdrawn, transmitter []common.Address, amount []*big.Int, to []common.Address) (event.Subscription, error) { + + var transmitterRule []interface{} + for _, transmitterItem := range transmitter { + transmitterRule = append(transmitterRule, transmitterItem) + } + var amountRule []interface{} + for _, amountItem := range amount { + amountRule = append(amountRule, amountItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _IAutomationV21PlusCommon.contract.WatchLogs(opts, "PaymentWithdrawn", transmitterRule, amountRule, toRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(IAutomationV21PlusCommonPaymentWithdrawn) + if err := _IAutomationV21PlusCommon.contract.UnpackLog(event, "PaymentWithdrawn", 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 (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) ParsePaymentWithdrawn(log types.Log) (*IAutomationV21PlusCommonPaymentWithdrawn, error) { + event := new(IAutomationV21PlusCommonPaymentWithdrawn) + if err := _IAutomationV21PlusCommon.contract.UnpackLog(event, "PaymentWithdrawn", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type IAutomationV21PlusCommonReorgedUpkeepReportIterator struct { + Event *IAutomationV21PlusCommonReorgedUpkeepReport + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *IAutomationV21PlusCommonReorgedUpkeepReportIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(IAutomationV21PlusCommonReorgedUpkeepReport) + 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(IAutomationV21PlusCommonReorgedUpkeepReport) + 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 *IAutomationV21PlusCommonReorgedUpkeepReportIterator) Error() error { + return it.fail +} + +func (it *IAutomationV21PlusCommonReorgedUpkeepReportIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type IAutomationV21PlusCommonReorgedUpkeepReport struct { + Id *big.Int + Trigger []byte + Raw types.Log +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) FilterReorgedUpkeepReport(opts *bind.FilterOpts, id []*big.Int) (*IAutomationV21PlusCommonReorgedUpkeepReportIterator, error) { + + var idRule []interface{} + for _, idItem := range id { + idRule = append(idRule, idItem) + } + + logs, sub, err := _IAutomationV21PlusCommon.contract.FilterLogs(opts, "ReorgedUpkeepReport", idRule) + if err != nil { + return nil, err + } + return &IAutomationV21PlusCommonReorgedUpkeepReportIterator{contract: _IAutomationV21PlusCommon.contract, event: "ReorgedUpkeepReport", logs: logs, sub: sub}, nil +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) WatchReorgedUpkeepReport(opts *bind.WatchOpts, sink chan<- *IAutomationV21PlusCommonReorgedUpkeepReport, id []*big.Int) (event.Subscription, error) { + + var idRule []interface{} + for _, idItem := range id { + idRule = append(idRule, idItem) + } + + logs, sub, err := _IAutomationV21PlusCommon.contract.WatchLogs(opts, "ReorgedUpkeepReport", idRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(IAutomationV21PlusCommonReorgedUpkeepReport) + if err := _IAutomationV21PlusCommon.contract.UnpackLog(event, "ReorgedUpkeepReport", 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 (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) ParseReorgedUpkeepReport(log types.Log) (*IAutomationV21PlusCommonReorgedUpkeepReport, error) { + event := new(IAutomationV21PlusCommonReorgedUpkeepReport) + if err := _IAutomationV21PlusCommon.contract.UnpackLog(event, "ReorgedUpkeepReport", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type IAutomationV21PlusCommonStaleUpkeepReportIterator struct { + Event *IAutomationV21PlusCommonStaleUpkeepReport + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *IAutomationV21PlusCommonStaleUpkeepReportIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(IAutomationV21PlusCommonStaleUpkeepReport) + 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(IAutomationV21PlusCommonStaleUpkeepReport) + 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 *IAutomationV21PlusCommonStaleUpkeepReportIterator) Error() error { + return it.fail +} + +func (it *IAutomationV21PlusCommonStaleUpkeepReportIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type IAutomationV21PlusCommonStaleUpkeepReport struct { + Id *big.Int + Trigger []byte + Raw types.Log +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) FilterStaleUpkeepReport(opts *bind.FilterOpts, id []*big.Int) (*IAutomationV21PlusCommonStaleUpkeepReportIterator, error) { + + var idRule []interface{} + for _, idItem := range id { + idRule = append(idRule, idItem) + } + + logs, sub, err := _IAutomationV21PlusCommon.contract.FilterLogs(opts, "StaleUpkeepReport", idRule) + if err != nil { + return nil, err + } + return &IAutomationV21PlusCommonStaleUpkeepReportIterator{contract: _IAutomationV21PlusCommon.contract, event: "StaleUpkeepReport", logs: logs, sub: sub}, nil +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) WatchStaleUpkeepReport(opts *bind.WatchOpts, sink chan<- *IAutomationV21PlusCommonStaleUpkeepReport, id []*big.Int) (event.Subscription, error) { + + var idRule []interface{} + for _, idItem := range id { + idRule = append(idRule, idItem) + } + + logs, sub, err := _IAutomationV21PlusCommon.contract.WatchLogs(opts, "StaleUpkeepReport", idRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(IAutomationV21PlusCommonStaleUpkeepReport) + if err := _IAutomationV21PlusCommon.contract.UnpackLog(event, "StaleUpkeepReport", 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 (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) ParseStaleUpkeepReport(log types.Log) (*IAutomationV21PlusCommonStaleUpkeepReport, error) { + event := new(IAutomationV21PlusCommonStaleUpkeepReport) + if err := _IAutomationV21PlusCommon.contract.UnpackLog(event, "StaleUpkeepReport", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type IAutomationV21PlusCommonTransmittedIterator struct { + Event *IAutomationV21PlusCommonTransmitted + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *IAutomationV21PlusCommonTransmittedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(IAutomationV21PlusCommonTransmitted) + 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(IAutomationV21PlusCommonTransmitted) + 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 *IAutomationV21PlusCommonTransmittedIterator) Error() error { + return it.fail +} + +func (it *IAutomationV21PlusCommonTransmittedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type IAutomationV21PlusCommonTransmitted struct { + ConfigDigest [32]byte + Epoch uint32 + Raw types.Log +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) FilterTransmitted(opts *bind.FilterOpts) (*IAutomationV21PlusCommonTransmittedIterator, error) { + + logs, sub, err := _IAutomationV21PlusCommon.contract.FilterLogs(opts, "Transmitted") + if err != nil { + return nil, err + } + return &IAutomationV21PlusCommonTransmittedIterator{contract: _IAutomationV21PlusCommon.contract, event: "Transmitted", logs: logs, sub: sub}, nil +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) WatchTransmitted(opts *bind.WatchOpts, sink chan<- *IAutomationV21PlusCommonTransmitted) (event.Subscription, error) { + + logs, sub, err := _IAutomationV21PlusCommon.contract.WatchLogs(opts, "Transmitted") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(IAutomationV21PlusCommonTransmitted) + if err := _IAutomationV21PlusCommon.contract.UnpackLog(event, "Transmitted", 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 (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) ParseTransmitted(log types.Log) (*IAutomationV21PlusCommonTransmitted, error) { + event := new(IAutomationV21PlusCommonTransmitted) + if err := _IAutomationV21PlusCommon.contract.UnpackLog(event, "Transmitted", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type IAutomationV21PlusCommonUnpausedIterator struct { + Event *IAutomationV21PlusCommonUnpaused + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *IAutomationV21PlusCommonUnpausedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(IAutomationV21PlusCommonUnpaused) + 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(IAutomationV21PlusCommonUnpaused) + 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 *IAutomationV21PlusCommonUnpausedIterator) Error() error { + return it.fail +} + +func (it *IAutomationV21PlusCommonUnpausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type IAutomationV21PlusCommonUnpaused struct { + Account common.Address + Raw types.Log +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) FilterUnpaused(opts *bind.FilterOpts) (*IAutomationV21PlusCommonUnpausedIterator, error) { + + logs, sub, err := _IAutomationV21PlusCommon.contract.FilterLogs(opts, "Unpaused") + if err != nil { + return nil, err + } + return &IAutomationV21PlusCommonUnpausedIterator{contract: _IAutomationV21PlusCommon.contract, event: "Unpaused", logs: logs, sub: sub}, nil +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) WatchUnpaused(opts *bind.WatchOpts, sink chan<- *IAutomationV21PlusCommonUnpaused) (event.Subscription, error) { + + logs, sub, err := _IAutomationV21PlusCommon.contract.WatchLogs(opts, "Unpaused") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(IAutomationV21PlusCommonUnpaused) + if err := _IAutomationV21PlusCommon.contract.UnpackLog(event, "Unpaused", 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 (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) ParseUnpaused(log types.Log) (*IAutomationV21PlusCommonUnpaused, error) { + event := new(IAutomationV21PlusCommonUnpaused) + if err := _IAutomationV21PlusCommon.contract.UnpackLog(event, "Unpaused", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type IAutomationV21PlusCommonUpkeepAdminTransferRequestedIterator struct { + Event *IAutomationV21PlusCommonUpkeepAdminTransferRequested + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *IAutomationV21PlusCommonUpkeepAdminTransferRequestedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(IAutomationV21PlusCommonUpkeepAdminTransferRequested) + 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(IAutomationV21PlusCommonUpkeepAdminTransferRequested) + 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 *IAutomationV21PlusCommonUpkeepAdminTransferRequestedIterator) Error() error { + return it.fail +} + +func (it *IAutomationV21PlusCommonUpkeepAdminTransferRequestedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type IAutomationV21PlusCommonUpkeepAdminTransferRequested struct { + Id *big.Int + From common.Address + To common.Address + Raw types.Log +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) FilterUpkeepAdminTransferRequested(opts *bind.FilterOpts, id []*big.Int, from []common.Address, to []common.Address) (*IAutomationV21PlusCommonUpkeepAdminTransferRequestedIterator, error) { + + var idRule []interface{} + for _, idItem := range id { + idRule = append(idRule, idItem) + } + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _IAutomationV21PlusCommon.contract.FilterLogs(opts, "UpkeepAdminTransferRequested", idRule, fromRule, toRule) + if err != nil { + return nil, err + } + return &IAutomationV21PlusCommonUpkeepAdminTransferRequestedIterator{contract: _IAutomationV21PlusCommon.contract, event: "UpkeepAdminTransferRequested", logs: logs, sub: sub}, nil +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) WatchUpkeepAdminTransferRequested(opts *bind.WatchOpts, sink chan<- *IAutomationV21PlusCommonUpkeepAdminTransferRequested, id []*big.Int, from []common.Address, to []common.Address) (event.Subscription, error) { + + var idRule []interface{} + for _, idItem := range id { + idRule = append(idRule, idItem) + } + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _IAutomationV21PlusCommon.contract.WatchLogs(opts, "UpkeepAdminTransferRequested", idRule, fromRule, toRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(IAutomationV21PlusCommonUpkeepAdminTransferRequested) + if err := _IAutomationV21PlusCommon.contract.UnpackLog(event, "UpkeepAdminTransferRequested", 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 (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) ParseUpkeepAdminTransferRequested(log types.Log) (*IAutomationV21PlusCommonUpkeepAdminTransferRequested, error) { + event := new(IAutomationV21PlusCommonUpkeepAdminTransferRequested) + if err := _IAutomationV21PlusCommon.contract.UnpackLog(event, "UpkeepAdminTransferRequested", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type IAutomationV21PlusCommonUpkeepAdminTransferredIterator struct { + Event *IAutomationV21PlusCommonUpkeepAdminTransferred + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *IAutomationV21PlusCommonUpkeepAdminTransferredIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(IAutomationV21PlusCommonUpkeepAdminTransferred) + 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(IAutomationV21PlusCommonUpkeepAdminTransferred) + 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 *IAutomationV21PlusCommonUpkeepAdminTransferredIterator) Error() error { + return it.fail +} + +func (it *IAutomationV21PlusCommonUpkeepAdminTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type IAutomationV21PlusCommonUpkeepAdminTransferred struct { + Id *big.Int + From common.Address + To common.Address + Raw types.Log +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) FilterUpkeepAdminTransferred(opts *bind.FilterOpts, id []*big.Int, from []common.Address, to []common.Address) (*IAutomationV21PlusCommonUpkeepAdminTransferredIterator, error) { + + var idRule []interface{} + for _, idItem := range id { + idRule = append(idRule, idItem) + } + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _IAutomationV21PlusCommon.contract.FilterLogs(opts, "UpkeepAdminTransferred", idRule, fromRule, toRule) + if err != nil { + return nil, err + } + return &IAutomationV21PlusCommonUpkeepAdminTransferredIterator{contract: _IAutomationV21PlusCommon.contract, event: "UpkeepAdminTransferred", logs: logs, sub: sub}, nil +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) WatchUpkeepAdminTransferred(opts *bind.WatchOpts, sink chan<- *IAutomationV21PlusCommonUpkeepAdminTransferred, id []*big.Int, from []common.Address, to []common.Address) (event.Subscription, error) { + + var idRule []interface{} + for _, idItem := range id { + idRule = append(idRule, idItem) + } + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _IAutomationV21PlusCommon.contract.WatchLogs(opts, "UpkeepAdminTransferred", idRule, fromRule, toRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(IAutomationV21PlusCommonUpkeepAdminTransferred) + if err := _IAutomationV21PlusCommon.contract.UnpackLog(event, "UpkeepAdminTransferred", 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 (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) ParseUpkeepAdminTransferred(log types.Log) (*IAutomationV21PlusCommonUpkeepAdminTransferred, error) { + event := new(IAutomationV21PlusCommonUpkeepAdminTransferred) + if err := _IAutomationV21PlusCommon.contract.UnpackLog(event, "UpkeepAdminTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type IAutomationV21PlusCommonUpkeepCanceledIterator struct { + Event *IAutomationV21PlusCommonUpkeepCanceled + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *IAutomationV21PlusCommonUpkeepCanceledIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(IAutomationV21PlusCommonUpkeepCanceled) + 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(IAutomationV21PlusCommonUpkeepCanceled) + 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 *IAutomationV21PlusCommonUpkeepCanceledIterator) Error() error { + return it.fail +} + +func (it *IAutomationV21PlusCommonUpkeepCanceledIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type IAutomationV21PlusCommonUpkeepCanceled struct { + Id *big.Int + AtBlockHeight uint64 + Raw types.Log +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) FilterUpkeepCanceled(opts *bind.FilterOpts, id []*big.Int, atBlockHeight []uint64) (*IAutomationV21PlusCommonUpkeepCanceledIterator, error) { + + var idRule []interface{} + for _, idItem := range id { + idRule = append(idRule, idItem) + } + var atBlockHeightRule []interface{} + for _, atBlockHeightItem := range atBlockHeight { + atBlockHeightRule = append(atBlockHeightRule, atBlockHeightItem) + } + + logs, sub, err := _IAutomationV21PlusCommon.contract.FilterLogs(opts, "UpkeepCanceled", idRule, atBlockHeightRule) + if err != nil { + return nil, err + } + return &IAutomationV21PlusCommonUpkeepCanceledIterator{contract: _IAutomationV21PlusCommon.contract, event: "UpkeepCanceled", logs: logs, sub: sub}, nil +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) WatchUpkeepCanceled(opts *bind.WatchOpts, sink chan<- *IAutomationV21PlusCommonUpkeepCanceled, id []*big.Int, atBlockHeight []uint64) (event.Subscription, error) { + + var idRule []interface{} + for _, idItem := range id { + idRule = append(idRule, idItem) + } + var atBlockHeightRule []interface{} + for _, atBlockHeightItem := range atBlockHeight { + atBlockHeightRule = append(atBlockHeightRule, atBlockHeightItem) + } + + logs, sub, err := _IAutomationV21PlusCommon.contract.WatchLogs(opts, "UpkeepCanceled", idRule, atBlockHeightRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(IAutomationV21PlusCommonUpkeepCanceled) + if err := _IAutomationV21PlusCommon.contract.UnpackLog(event, "UpkeepCanceled", 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 (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) ParseUpkeepCanceled(log types.Log) (*IAutomationV21PlusCommonUpkeepCanceled, error) { + event := new(IAutomationV21PlusCommonUpkeepCanceled) + if err := _IAutomationV21PlusCommon.contract.UnpackLog(event, "UpkeepCanceled", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type IAutomationV21PlusCommonUpkeepCheckDataSetIterator struct { + Event *IAutomationV21PlusCommonUpkeepCheckDataSet + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *IAutomationV21PlusCommonUpkeepCheckDataSetIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(IAutomationV21PlusCommonUpkeepCheckDataSet) + 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(IAutomationV21PlusCommonUpkeepCheckDataSet) + 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 *IAutomationV21PlusCommonUpkeepCheckDataSetIterator) Error() error { + return it.fail +} + +func (it *IAutomationV21PlusCommonUpkeepCheckDataSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type IAutomationV21PlusCommonUpkeepCheckDataSet struct { + Id *big.Int + NewCheckData []byte + Raw types.Log +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) FilterUpkeepCheckDataSet(opts *bind.FilterOpts, id []*big.Int) (*IAutomationV21PlusCommonUpkeepCheckDataSetIterator, error) { + + var idRule []interface{} + for _, idItem := range id { + idRule = append(idRule, idItem) + } + + logs, sub, err := _IAutomationV21PlusCommon.contract.FilterLogs(opts, "UpkeepCheckDataSet", idRule) + if err != nil { + return nil, err + } + return &IAutomationV21PlusCommonUpkeepCheckDataSetIterator{contract: _IAutomationV21PlusCommon.contract, event: "UpkeepCheckDataSet", logs: logs, sub: sub}, nil +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) WatchUpkeepCheckDataSet(opts *bind.WatchOpts, sink chan<- *IAutomationV21PlusCommonUpkeepCheckDataSet, id []*big.Int) (event.Subscription, error) { + + var idRule []interface{} + for _, idItem := range id { + idRule = append(idRule, idItem) + } + + logs, sub, err := _IAutomationV21PlusCommon.contract.WatchLogs(opts, "UpkeepCheckDataSet", idRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(IAutomationV21PlusCommonUpkeepCheckDataSet) + if err := _IAutomationV21PlusCommon.contract.UnpackLog(event, "UpkeepCheckDataSet", 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 (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) ParseUpkeepCheckDataSet(log types.Log) (*IAutomationV21PlusCommonUpkeepCheckDataSet, error) { + event := new(IAutomationV21PlusCommonUpkeepCheckDataSet) + if err := _IAutomationV21PlusCommon.contract.UnpackLog(event, "UpkeepCheckDataSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type IAutomationV21PlusCommonUpkeepGasLimitSetIterator struct { + Event *IAutomationV21PlusCommonUpkeepGasLimitSet + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *IAutomationV21PlusCommonUpkeepGasLimitSetIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(IAutomationV21PlusCommonUpkeepGasLimitSet) + 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(IAutomationV21PlusCommonUpkeepGasLimitSet) + 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 *IAutomationV21PlusCommonUpkeepGasLimitSetIterator) Error() error { + return it.fail +} + +func (it *IAutomationV21PlusCommonUpkeepGasLimitSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type IAutomationV21PlusCommonUpkeepGasLimitSet struct { + Id *big.Int + GasLimit *big.Int + Raw types.Log +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) FilterUpkeepGasLimitSet(opts *bind.FilterOpts, id []*big.Int) (*IAutomationV21PlusCommonUpkeepGasLimitSetIterator, error) { + + var idRule []interface{} + for _, idItem := range id { + idRule = append(idRule, idItem) + } + + logs, sub, err := _IAutomationV21PlusCommon.contract.FilterLogs(opts, "UpkeepGasLimitSet", idRule) + if err != nil { + return nil, err + } + return &IAutomationV21PlusCommonUpkeepGasLimitSetIterator{contract: _IAutomationV21PlusCommon.contract, event: "UpkeepGasLimitSet", logs: logs, sub: sub}, nil +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) WatchUpkeepGasLimitSet(opts *bind.WatchOpts, sink chan<- *IAutomationV21PlusCommonUpkeepGasLimitSet, id []*big.Int) (event.Subscription, error) { + + var idRule []interface{} + for _, idItem := range id { + idRule = append(idRule, idItem) + } + + logs, sub, err := _IAutomationV21PlusCommon.contract.WatchLogs(opts, "UpkeepGasLimitSet", idRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(IAutomationV21PlusCommonUpkeepGasLimitSet) + if err := _IAutomationV21PlusCommon.contract.UnpackLog(event, "UpkeepGasLimitSet", 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 (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) ParseUpkeepGasLimitSet(log types.Log) (*IAutomationV21PlusCommonUpkeepGasLimitSet, error) { + event := new(IAutomationV21PlusCommonUpkeepGasLimitSet) + if err := _IAutomationV21PlusCommon.contract.UnpackLog(event, "UpkeepGasLimitSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type IAutomationV21PlusCommonUpkeepMigratedIterator struct { + Event *IAutomationV21PlusCommonUpkeepMigrated + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *IAutomationV21PlusCommonUpkeepMigratedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(IAutomationV21PlusCommonUpkeepMigrated) + 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(IAutomationV21PlusCommonUpkeepMigrated) + 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 *IAutomationV21PlusCommonUpkeepMigratedIterator) Error() error { + return it.fail +} + +func (it *IAutomationV21PlusCommonUpkeepMigratedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type IAutomationV21PlusCommonUpkeepMigrated struct { + Id *big.Int + RemainingBalance *big.Int + Destination common.Address + Raw types.Log +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) FilterUpkeepMigrated(opts *bind.FilterOpts, id []*big.Int) (*IAutomationV21PlusCommonUpkeepMigratedIterator, error) { + + var idRule []interface{} + for _, idItem := range id { + idRule = append(idRule, idItem) + } + + logs, sub, err := _IAutomationV21PlusCommon.contract.FilterLogs(opts, "UpkeepMigrated", idRule) + if err != nil { + return nil, err + } + return &IAutomationV21PlusCommonUpkeepMigratedIterator{contract: _IAutomationV21PlusCommon.contract, event: "UpkeepMigrated", logs: logs, sub: sub}, nil +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) WatchUpkeepMigrated(opts *bind.WatchOpts, sink chan<- *IAutomationV21PlusCommonUpkeepMigrated, id []*big.Int) (event.Subscription, error) { + + var idRule []interface{} + for _, idItem := range id { + idRule = append(idRule, idItem) + } + + logs, sub, err := _IAutomationV21PlusCommon.contract.WatchLogs(opts, "UpkeepMigrated", idRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(IAutomationV21PlusCommonUpkeepMigrated) + if err := _IAutomationV21PlusCommon.contract.UnpackLog(event, "UpkeepMigrated", 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 (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) ParseUpkeepMigrated(log types.Log) (*IAutomationV21PlusCommonUpkeepMigrated, error) { + event := new(IAutomationV21PlusCommonUpkeepMigrated) + if err := _IAutomationV21PlusCommon.contract.UnpackLog(event, "UpkeepMigrated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type IAutomationV21PlusCommonUpkeepOffchainConfigSetIterator struct { + Event *IAutomationV21PlusCommonUpkeepOffchainConfigSet + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *IAutomationV21PlusCommonUpkeepOffchainConfigSetIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(IAutomationV21PlusCommonUpkeepOffchainConfigSet) + 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(IAutomationV21PlusCommonUpkeepOffchainConfigSet) + 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 *IAutomationV21PlusCommonUpkeepOffchainConfigSetIterator) Error() error { + return it.fail +} + +func (it *IAutomationV21PlusCommonUpkeepOffchainConfigSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type IAutomationV21PlusCommonUpkeepOffchainConfigSet struct { + Id *big.Int + OffchainConfig []byte + Raw types.Log +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) FilterUpkeepOffchainConfigSet(opts *bind.FilterOpts, id []*big.Int) (*IAutomationV21PlusCommonUpkeepOffchainConfigSetIterator, error) { + + var idRule []interface{} + for _, idItem := range id { + idRule = append(idRule, idItem) + } + + logs, sub, err := _IAutomationV21PlusCommon.contract.FilterLogs(opts, "UpkeepOffchainConfigSet", idRule) + if err != nil { + return nil, err + } + return &IAutomationV21PlusCommonUpkeepOffchainConfigSetIterator{contract: _IAutomationV21PlusCommon.contract, event: "UpkeepOffchainConfigSet", logs: logs, sub: sub}, nil +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) WatchUpkeepOffchainConfigSet(opts *bind.WatchOpts, sink chan<- *IAutomationV21PlusCommonUpkeepOffchainConfigSet, id []*big.Int) (event.Subscription, error) { + + var idRule []interface{} + for _, idItem := range id { + idRule = append(idRule, idItem) + } + + logs, sub, err := _IAutomationV21PlusCommon.contract.WatchLogs(opts, "UpkeepOffchainConfigSet", idRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(IAutomationV21PlusCommonUpkeepOffchainConfigSet) + if err := _IAutomationV21PlusCommon.contract.UnpackLog(event, "UpkeepOffchainConfigSet", 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 (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) ParseUpkeepOffchainConfigSet(log types.Log) (*IAutomationV21PlusCommonUpkeepOffchainConfigSet, error) { + event := new(IAutomationV21PlusCommonUpkeepOffchainConfigSet) + if err := _IAutomationV21PlusCommon.contract.UnpackLog(event, "UpkeepOffchainConfigSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type IAutomationV21PlusCommonUpkeepPausedIterator struct { + Event *IAutomationV21PlusCommonUpkeepPaused + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *IAutomationV21PlusCommonUpkeepPausedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(IAutomationV21PlusCommonUpkeepPaused) + 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(IAutomationV21PlusCommonUpkeepPaused) + 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 *IAutomationV21PlusCommonUpkeepPausedIterator) Error() error { + return it.fail +} + +func (it *IAutomationV21PlusCommonUpkeepPausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type IAutomationV21PlusCommonUpkeepPaused struct { + Id *big.Int + Raw types.Log +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) FilterUpkeepPaused(opts *bind.FilterOpts, id []*big.Int) (*IAutomationV21PlusCommonUpkeepPausedIterator, error) { + + var idRule []interface{} + for _, idItem := range id { + idRule = append(idRule, idItem) + } + + logs, sub, err := _IAutomationV21PlusCommon.contract.FilterLogs(opts, "UpkeepPaused", idRule) + if err != nil { + return nil, err + } + return &IAutomationV21PlusCommonUpkeepPausedIterator{contract: _IAutomationV21PlusCommon.contract, event: "UpkeepPaused", logs: logs, sub: sub}, nil +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) WatchUpkeepPaused(opts *bind.WatchOpts, sink chan<- *IAutomationV21PlusCommonUpkeepPaused, id []*big.Int) (event.Subscription, error) { + + var idRule []interface{} + for _, idItem := range id { + idRule = append(idRule, idItem) + } + + logs, sub, err := _IAutomationV21PlusCommon.contract.WatchLogs(opts, "UpkeepPaused", idRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(IAutomationV21PlusCommonUpkeepPaused) + if err := _IAutomationV21PlusCommon.contract.UnpackLog(event, "UpkeepPaused", 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 (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) ParseUpkeepPaused(log types.Log) (*IAutomationV21PlusCommonUpkeepPaused, error) { + event := new(IAutomationV21PlusCommonUpkeepPaused) + if err := _IAutomationV21PlusCommon.contract.UnpackLog(event, "UpkeepPaused", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type IAutomationV21PlusCommonUpkeepPerformedIterator struct { + Event *IAutomationV21PlusCommonUpkeepPerformed + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *IAutomationV21PlusCommonUpkeepPerformedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(IAutomationV21PlusCommonUpkeepPerformed) + 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(IAutomationV21PlusCommonUpkeepPerformed) + 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 *IAutomationV21PlusCommonUpkeepPerformedIterator) Error() error { + return it.fail +} + +func (it *IAutomationV21PlusCommonUpkeepPerformedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type IAutomationV21PlusCommonUpkeepPerformed struct { + Id *big.Int + Success bool + TotalPayment *big.Int + GasUsed *big.Int + GasOverhead *big.Int + Trigger []byte + Raw types.Log +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) FilterUpkeepPerformed(opts *bind.FilterOpts, id []*big.Int, success []bool) (*IAutomationV21PlusCommonUpkeepPerformedIterator, error) { + + var idRule []interface{} + for _, idItem := range id { + idRule = append(idRule, idItem) + } + var successRule []interface{} + for _, successItem := range success { + successRule = append(successRule, successItem) + } + + logs, sub, err := _IAutomationV21PlusCommon.contract.FilterLogs(opts, "UpkeepPerformed", idRule, successRule) + if err != nil { + return nil, err + } + return &IAutomationV21PlusCommonUpkeepPerformedIterator{contract: _IAutomationV21PlusCommon.contract, event: "UpkeepPerformed", logs: logs, sub: sub}, nil +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) WatchUpkeepPerformed(opts *bind.WatchOpts, sink chan<- *IAutomationV21PlusCommonUpkeepPerformed, id []*big.Int, success []bool) (event.Subscription, error) { + + var idRule []interface{} + for _, idItem := range id { + idRule = append(idRule, idItem) + } + var successRule []interface{} + for _, successItem := range success { + successRule = append(successRule, successItem) + } + + logs, sub, err := _IAutomationV21PlusCommon.contract.WatchLogs(opts, "UpkeepPerformed", idRule, successRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(IAutomationV21PlusCommonUpkeepPerformed) + if err := _IAutomationV21PlusCommon.contract.UnpackLog(event, "UpkeepPerformed", 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 (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) ParseUpkeepPerformed(log types.Log) (*IAutomationV21PlusCommonUpkeepPerformed, error) { + event := new(IAutomationV21PlusCommonUpkeepPerformed) + if err := _IAutomationV21PlusCommon.contract.UnpackLog(event, "UpkeepPerformed", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type IAutomationV21PlusCommonUpkeepPrivilegeConfigSetIterator struct { + Event *IAutomationV21PlusCommonUpkeepPrivilegeConfigSet + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *IAutomationV21PlusCommonUpkeepPrivilegeConfigSetIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(IAutomationV21PlusCommonUpkeepPrivilegeConfigSet) + 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(IAutomationV21PlusCommonUpkeepPrivilegeConfigSet) + 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 *IAutomationV21PlusCommonUpkeepPrivilegeConfigSetIterator) Error() error { + return it.fail +} + +func (it *IAutomationV21PlusCommonUpkeepPrivilegeConfigSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type IAutomationV21PlusCommonUpkeepPrivilegeConfigSet struct { + Id *big.Int + PrivilegeConfig []byte + Raw types.Log +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) FilterUpkeepPrivilegeConfigSet(opts *bind.FilterOpts, id []*big.Int) (*IAutomationV21PlusCommonUpkeepPrivilegeConfigSetIterator, error) { + + var idRule []interface{} + for _, idItem := range id { + idRule = append(idRule, idItem) + } + + logs, sub, err := _IAutomationV21PlusCommon.contract.FilterLogs(opts, "UpkeepPrivilegeConfigSet", idRule) + if err != nil { + return nil, err + } + return &IAutomationV21PlusCommonUpkeepPrivilegeConfigSetIterator{contract: _IAutomationV21PlusCommon.contract, event: "UpkeepPrivilegeConfigSet", logs: logs, sub: sub}, nil +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) WatchUpkeepPrivilegeConfigSet(opts *bind.WatchOpts, sink chan<- *IAutomationV21PlusCommonUpkeepPrivilegeConfigSet, id []*big.Int) (event.Subscription, error) { + + var idRule []interface{} + for _, idItem := range id { + idRule = append(idRule, idItem) + } + + logs, sub, err := _IAutomationV21PlusCommon.contract.WatchLogs(opts, "UpkeepPrivilegeConfigSet", idRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(IAutomationV21PlusCommonUpkeepPrivilegeConfigSet) + if err := _IAutomationV21PlusCommon.contract.UnpackLog(event, "UpkeepPrivilegeConfigSet", 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 (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) ParseUpkeepPrivilegeConfigSet(log types.Log) (*IAutomationV21PlusCommonUpkeepPrivilegeConfigSet, error) { + event := new(IAutomationV21PlusCommonUpkeepPrivilegeConfigSet) + if err := _IAutomationV21PlusCommon.contract.UnpackLog(event, "UpkeepPrivilegeConfigSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type IAutomationV21PlusCommonUpkeepReceivedIterator struct { + Event *IAutomationV21PlusCommonUpkeepReceived + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *IAutomationV21PlusCommonUpkeepReceivedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(IAutomationV21PlusCommonUpkeepReceived) + 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(IAutomationV21PlusCommonUpkeepReceived) + 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 *IAutomationV21PlusCommonUpkeepReceivedIterator) Error() error { + return it.fail +} + +func (it *IAutomationV21PlusCommonUpkeepReceivedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type IAutomationV21PlusCommonUpkeepReceived struct { + Id *big.Int + StartingBalance *big.Int + ImportedFrom common.Address + Raw types.Log +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) FilterUpkeepReceived(opts *bind.FilterOpts, id []*big.Int) (*IAutomationV21PlusCommonUpkeepReceivedIterator, error) { + + var idRule []interface{} + for _, idItem := range id { + idRule = append(idRule, idItem) + } + + logs, sub, err := _IAutomationV21PlusCommon.contract.FilterLogs(opts, "UpkeepReceived", idRule) + if err != nil { + return nil, err + } + return &IAutomationV21PlusCommonUpkeepReceivedIterator{contract: _IAutomationV21PlusCommon.contract, event: "UpkeepReceived", logs: logs, sub: sub}, nil +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) WatchUpkeepReceived(opts *bind.WatchOpts, sink chan<- *IAutomationV21PlusCommonUpkeepReceived, id []*big.Int) (event.Subscription, error) { + + var idRule []interface{} + for _, idItem := range id { + idRule = append(idRule, idItem) + } + + logs, sub, err := _IAutomationV21PlusCommon.contract.WatchLogs(opts, "UpkeepReceived", idRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(IAutomationV21PlusCommonUpkeepReceived) + if err := _IAutomationV21PlusCommon.contract.UnpackLog(event, "UpkeepReceived", 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 (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) ParseUpkeepReceived(log types.Log) (*IAutomationV21PlusCommonUpkeepReceived, error) { + event := new(IAutomationV21PlusCommonUpkeepReceived) + if err := _IAutomationV21PlusCommon.contract.UnpackLog(event, "UpkeepReceived", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type IAutomationV21PlusCommonUpkeepRegisteredIterator struct { + Event *IAutomationV21PlusCommonUpkeepRegistered + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *IAutomationV21PlusCommonUpkeepRegisteredIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(IAutomationV21PlusCommonUpkeepRegistered) + 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(IAutomationV21PlusCommonUpkeepRegistered) + 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 *IAutomationV21PlusCommonUpkeepRegisteredIterator) Error() error { + return it.fail +} + +func (it *IAutomationV21PlusCommonUpkeepRegisteredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type IAutomationV21PlusCommonUpkeepRegistered struct { + Id *big.Int + PerformGas uint32 + Admin common.Address + Raw types.Log +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) FilterUpkeepRegistered(opts *bind.FilterOpts, id []*big.Int) (*IAutomationV21PlusCommonUpkeepRegisteredIterator, error) { + + var idRule []interface{} + for _, idItem := range id { + idRule = append(idRule, idItem) + } + + logs, sub, err := _IAutomationV21PlusCommon.contract.FilterLogs(opts, "UpkeepRegistered", idRule) + if err != nil { + return nil, err + } + return &IAutomationV21PlusCommonUpkeepRegisteredIterator{contract: _IAutomationV21PlusCommon.contract, event: "UpkeepRegistered", logs: logs, sub: sub}, nil +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) WatchUpkeepRegistered(opts *bind.WatchOpts, sink chan<- *IAutomationV21PlusCommonUpkeepRegistered, id []*big.Int) (event.Subscription, error) { + + var idRule []interface{} + for _, idItem := range id { + idRule = append(idRule, idItem) + } + + logs, sub, err := _IAutomationV21PlusCommon.contract.WatchLogs(opts, "UpkeepRegistered", idRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(IAutomationV21PlusCommonUpkeepRegistered) + if err := _IAutomationV21PlusCommon.contract.UnpackLog(event, "UpkeepRegistered", 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 (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) ParseUpkeepRegistered(log types.Log) (*IAutomationV21PlusCommonUpkeepRegistered, error) { + event := new(IAutomationV21PlusCommonUpkeepRegistered) + if err := _IAutomationV21PlusCommon.contract.UnpackLog(event, "UpkeepRegistered", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type IAutomationV21PlusCommonUpkeepTriggerConfigSetIterator struct { + Event *IAutomationV21PlusCommonUpkeepTriggerConfigSet + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *IAutomationV21PlusCommonUpkeepTriggerConfigSetIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(IAutomationV21PlusCommonUpkeepTriggerConfigSet) + 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(IAutomationV21PlusCommonUpkeepTriggerConfigSet) + 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 *IAutomationV21PlusCommonUpkeepTriggerConfigSetIterator) Error() error { + return it.fail +} + +func (it *IAutomationV21PlusCommonUpkeepTriggerConfigSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type IAutomationV21PlusCommonUpkeepTriggerConfigSet struct { + Id *big.Int + TriggerConfig []byte + Raw types.Log +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) FilterUpkeepTriggerConfigSet(opts *bind.FilterOpts, id []*big.Int) (*IAutomationV21PlusCommonUpkeepTriggerConfigSetIterator, error) { + + var idRule []interface{} + for _, idItem := range id { + idRule = append(idRule, idItem) + } + + logs, sub, err := _IAutomationV21PlusCommon.contract.FilterLogs(opts, "UpkeepTriggerConfigSet", idRule) + if err != nil { + return nil, err + } + return &IAutomationV21PlusCommonUpkeepTriggerConfigSetIterator{contract: _IAutomationV21PlusCommon.contract, event: "UpkeepTriggerConfigSet", logs: logs, sub: sub}, nil +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) WatchUpkeepTriggerConfigSet(opts *bind.WatchOpts, sink chan<- *IAutomationV21PlusCommonUpkeepTriggerConfigSet, id []*big.Int) (event.Subscription, error) { + + var idRule []interface{} + for _, idItem := range id { + idRule = append(idRule, idItem) + } + + logs, sub, err := _IAutomationV21PlusCommon.contract.WatchLogs(opts, "UpkeepTriggerConfigSet", idRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(IAutomationV21PlusCommonUpkeepTriggerConfigSet) + if err := _IAutomationV21PlusCommon.contract.UnpackLog(event, "UpkeepTriggerConfigSet", 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 (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) ParseUpkeepTriggerConfigSet(log types.Log) (*IAutomationV21PlusCommonUpkeepTriggerConfigSet, error) { + event := new(IAutomationV21PlusCommonUpkeepTriggerConfigSet) + if err := _IAutomationV21PlusCommon.contract.UnpackLog(event, "UpkeepTriggerConfigSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type IAutomationV21PlusCommonUpkeepUnpausedIterator struct { + Event *IAutomationV21PlusCommonUpkeepUnpaused + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *IAutomationV21PlusCommonUpkeepUnpausedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(IAutomationV21PlusCommonUpkeepUnpaused) + 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(IAutomationV21PlusCommonUpkeepUnpaused) + 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 *IAutomationV21PlusCommonUpkeepUnpausedIterator) Error() error { + return it.fail +} + +func (it *IAutomationV21PlusCommonUpkeepUnpausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type IAutomationV21PlusCommonUpkeepUnpaused struct { + Id *big.Int + Raw types.Log +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) FilterUpkeepUnpaused(opts *bind.FilterOpts, id []*big.Int) (*IAutomationV21PlusCommonUpkeepUnpausedIterator, error) { + + var idRule []interface{} + for _, idItem := range id { + idRule = append(idRule, idItem) + } + + logs, sub, err := _IAutomationV21PlusCommon.contract.FilterLogs(opts, "UpkeepUnpaused", idRule) + if err != nil { + return nil, err + } + return &IAutomationV21PlusCommonUpkeepUnpausedIterator{contract: _IAutomationV21PlusCommon.contract, event: "UpkeepUnpaused", logs: logs, sub: sub}, nil +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) WatchUpkeepUnpaused(opts *bind.WatchOpts, sink chan<- *IAutomationV21PlusCommonUpkeepUnpaused, id []*big.Int) (event.Subscription, error) { + + var idRule []interface{} + for _, idItem := range id { + idRule = append(idRule, idItem) + } + + logs, sub, err := _IAutomationV21PlusCommon.contract.WatchLogs(opts, "UpkeepUnpaused", idRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(IAutomationV21PlusCommonUpkeepUnpaused) + if err := _IAutomationV21PlusCommon.contract.UnpackLog(event, "UpkeepUnpaused", 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 (_IAutomationV21PlusCommon *IAutomationV21PlusCommonFilterer) ParseUpkeepUnpaused(log types.Log) (*IAutomationV21PlusCommonUpkeepUnpaused, error) { + event := new(IAutomationV21PlusCommonUpkeepUnpaused) + if err := _IAutomationV21PlusCommon.contract.UnpackLog(event, "UpkeepUnpaused", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type CheckCallback struct { + UpkeepNeeded bool + PerformData []byte + UpkeepFailureReason uint8 + GasUsed *big.Int +} +type CheckUpkeep struct { + UpkeepNeeded bool + PerformData []byte + UpkeepFailureReason uint8 + GasUsed *big.Int + GasLimit *big.Int + FastGasWei *big.Int + LinkNative *big.Int +} +type CheckUpkeep0 struct { + UpkeepNeeded bool + PerformData []byte + UpkeepFailureReason uint8 + GasUsed *big.Int + GasLimit *big.Int + FastGasWei *big.Int + LinkNative *big.Int +} +type GetState struct { + State IAutomationV21PlusCommonStateLegacy + Config IAutomationV21PlusCommonOnchainConfigLegacy + Signers []common.Address + Transmitters []common.Address + F uint8 +} +type SimulatePerformUpkeep struct { + Success bool + GasUsed *big.Int +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommon) ParseLog(log types.Log) (generated.AbigenLog, error) { + switch log.Topics[0] { + case _IAutomationV21PlusCommon.abi.Events["AdminPrivilegeConfigSet"].ID: + return _IAutomationV21PlusCommon.ParseAdminPrivilegeConfigSet(log) + case _IAutomationV21PlusCommon.abi.Events["CancelledUpkeepReport"].ID: + return _IAutomationV21PlusCommon.ParseCancelledUpkeepReport(log) + case _IAutomationV21PlusCommon.abi.Events["ConfigSet"].ID: + return _IAutomationV21PlusCommon.ParseConfigSet(log) + case _IAutomationV21PlusCommon.abi.Events["DedupKeyAdded"].ID: + return _IAutomationV21PlusCommon.ParseDedupKeyAdded(log) + case _IAutomationV21PlusCommon.abi.Events["FundsAdded"].ID: + return _IAutomationV21PlusCommon.ParseFundsAdded(log) + case _IAutomationV21PlusCommon.abi.Events["FundsWithdrawn"].ID: + return _IAutomationV21PlusCommon.ParseFundsWithdrawn(log) + case _IAutomationV21PlusCommon.abi.Events["InsufficientFundsUpkeepReport"].ID: + return _IAutomationV21PlusCommon.ParseInsufficientFundsUpkeepReport(log) + case _IAutomationV21PlusCommon.abi.Events["OwnershipTransferRequested"].ID: + return _IAutomationV21PlusCommon.ParseOwnershipTransferRequested(log) + case _IAutomationV21PlusCommon.abi.Events["OwnershipTransferred"].ID: + return _IAutomationV21PlusCommon.ParseOwnershipTransferred(log) + case _IAutomationV21PlusCommon.abi.Events["Paused"].ID: + return _IAutomationV21PlusCommon.ParsePaused(log) + case _IAutomationV21PlusCommon.abi.Events["PayeesUpdated"].ID: + return _IAutomationV21PlusCommon.ParsePayeesUpdated(log) + case _IAutomationV21PlusCommon.abi.Events["PayeeshipTransferRequested"].ID: + return _IAutomationV21PlusCommon.ParsePayeeshipTransferRequested(log) + case _IAutomationV21PlusCommon.abi.Events["PayeeshipTransferred"].ID: + return _IAutomationV21PlusCommon.ParsePayeeshipTransferred(log) + case _IAutomationV21PlusCommon.abi.Events["PaymentWithdrawn"].ID: + return _IAutomationV21PlusCommon.ParsePaymentWithdrawn(log) + case _IAutomationV21PlusCommon.abi.Events["ReorgedUpkeepReport"].ID: + return _IAutomationV21PlusCommon.ParseReorgedUpkeepReport(log) + case _IAutomationV21PlusCommon.abi.Events["StaleUpkeepReport"].ID: + return _IAutomationV21PlusCommon.ParseStaleUpkeepReport(log) + case _IAutomationV21PlusCommon.abi.Events["Transmitted"].ID: + return _IAutomationV21PlusCommon.ParseTransmitted(log) + case _IAutomationV21PlusCommon.abi.Events["Unpaused"].ID: + return _IAutomationV21PlusCommon.ParseUnpaused(log) + case _IAutomationV21PlusCommon.abi.Events["UpkeepAdminTransferRequested"].ID: + return _IAutomationV21PlusCommon.ParseUpkeepAdminTransferRequested(log) + case _IAutomationV21PlusCommon.abi.Events["UpkeepAdminTransferred"].ID: + return _IAutomationV21PlusCommon.ParseUpkeepAdminTransferred(log) + case _IAutomationV21PlusCommon.abi.Events["UpkeepCanceled"].ID: + return _IAutomationV21PlusCommon.ParseUpkeepCanceled(log) + case _IAutomationV21PlusCommon.abi.Events["UpkeepCheckDataSet"].ID: + return _IAutomationV21PlusCommon.ParseUpkeepCheckDataSet(log) + case _IAutomationV21PlusCommon.abi.Events["UpkeepGasLimitSet"].ID: + return _IAutomationV21PlusCommon.ParseUpkeepGasLimitSet(log) + case _IAutomationV21PlusCommon.abi.Events["UpkeepMigrated"].ID: + return _IAutomationV21PlusCommon.ParseUpkeepMigrated(log) + case _IAutomationV21PlusCommon.abi.Events["UpkeepOffchainConfigSet"].ID: + return _IAutomationV21PlusCommon.ParseUpkeepOffchainConfigSet(log) + case _IAutomationV21PlusCommon.abi.Events["UpkeepPaused"].ID: + return _IAutomationV21PlusCommon.ParseUpkeepPaused(log) + case _IAutomationV21PlusCommon.abi.Events["UpkeepPerformed"].ID: + return _IAutomationV21PlusCommon.ParseUpkeepPerformed(log) + case _IAutomationV21PlusCommon.abi.Events["UpkeepPrivilegeConfigSet"].ID: + return _IAutomationV21PlusCommon.ParseUpkeepPrivilegeConfigSet(log) + case _IAutomationV21PlusCommon.abi.Events["UpkeepReceived"].ID: + return _IAutomationV21PlusCommon.ParseUpkeepReceived(log) + case _IAutomationV21PlusCommon.abi.Events["UpkeepRegistered"].ID: + return _IAutomationV21PlusCommon.ParseUpkeepRegistered(log) + case _IAutomationV21PlusCommon.abi.Events["UpkeepTriggerConfigSet"].ID: + return _IAutomationV21PlusCommon.ParseUpkeepTriggerConfigSet(log) + case _IAutomationV21PlusCommon.abi.Events["UpkeepUnpaused"].ID: + return _IAutomationV21PlusCommon.ParseUpkeepUnpaused(log) + + default: + return nil, fmt.Errorf("abigen wrapper received unknown log topic: %v", log.Topics[0]) + } +} + +func (IAutomationV21PlusCommonAdminPrivilegeConfigSet) Topic() common.Hash { + return common.HexToHash("0x7c44b4eb59ee7873514e7e43e7718c269d872965938b288aa143befca62f99d2") +} + +func (IAutomationV21PlusCommonCancelledUpkeepReport) Topic() common.Hash { + return common.HexToHash("0xc3237c8807c467c1b39b8d0395eff077313e691bf0a7388106792564ebfd5636") +} + +func (IAutomationV21PlusCommonConfigSet) Topic() common.Hash { + return common.HexToHash("0x1591690b8638f5fb2dbec82ac741805ac5da8b45dc5263f4875b0496fdce4e05") +} + +func (IAutomationV21PlusCommonDedupKeyAdded) Topic() common.Hash { + return common.HexToHash("0xa4a4e334c0e330143f9437484fe516c13bc560b86b5b0daf58e7084aaac228f2") +} + +func (IAutomationV21PlusCommonFundsAdded) Topic() common.Hash { + return common.HexToHash("0xafd24114486da8ebfc32f3626dada8863652e187461aa74d4bfa734891506203") +} + +func (IAutomationV21PlusCommonFundsWithdrawn) Topic() common.Hash { + return common.HexToHash("0xf3b5906e5672f3e524854103bcafbbdba80dbdfeca2c35e116127b1060a68318") +} + +func (IAutomationV21PlusCommonInsufficientFundsUpkeepReport) Topic() common.Hash { + return common.HexToHash("0x377c8b0c126ae5248d27aca1c76fac4608aff85673ee3caf09747e1044549e02") +} + +func (IAutomationV21PlusCommonOwnershipTransferRequested) Topic() common.Hash { + return common.HexToHash("0xed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae1278") +} + +func (IAutomationV21PlusCommonOwnershipTransferred) Topic() common.Hash { + return common.HexToHash("0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0") +} + +func (IAutomationV21PlusCommonPaused) Topic() common.Hash { + return common.HexToHash("0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258") +} + +func (IAutomationV21PlusCommonPayeesUpdated) Topic() common.Hash { + return common.HexToHash("0xa46de38886467c59be07a0675f14781206a5477d871628af46c2443822fcb725") +} + +func (IAutomationV21PlusCommonPayeeshipTransferRequested) Topic() common.Hash { + return common.HexToHash("0x84f7c7c80bb8ed2279b4aab5f61cd05e6374073d38f46d7f32de8c30e9e38367") +} + +func (IAutomationV21PlusCommonPayeeshipTransferred) Topic() common.Hash { + return common.HexToHash("0x78af32efdcad432315431e9b03d27e6cd98fb79c405fdc5af7c1714d9c0f75b3") +} + +func (IAutomationV21PlusCommonPaymentWithdrawn) Topic() common.Hash { + return common.HexToHash("0x9819093176a1851202c7bcfa46845809b4e47c261866550e94ed3775d2f40698") +} + +func (IAutomationV21PlusCommonReorgedUpkeepReport) Topic() common.Hash { + return common.HexToHash("0x6aa7f60c176da7af894b384daea2249497448137f5943c1237ada8bc92bdc301") +} + +func (IAutomationV21PlusCommonStaleUpkeepReport) Topic() common.Hash { + return common.HexToHash("0x405288ea7be309e16cfdf481367f90a413e1d4634fcdaf8966546db9b93012e8") +} + +func (IAutomationV21PlusCommonTransmitted) Topic() common.Hash { + return common.HexToHash("0xb04e63db38c49950639fa09d29872f21f5d49d614f3a969d8adf3d4b52e41a62") +} + +func (IAutomationV21PlusCommonUnpaused) Topic() common.Hash { + return common.HexToHash("0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa") +} + +func (IAutomationV21PlusCommonUpkeepAdminTransferRequested) Topic() common.Hash { + return common.HexToHash("0xb1cbb2c4b8480034c27e06da5f096b8233a8fd4497028593a41ff6df79726b35") +} + +func (IAutomationV21PlusCommonUpkeepAdminTransferred) Topic() common.Hash { + return common.HexToHash("0x5cff4db96bef051785e999f44bfcd21c18823e034fb92dd376e3db4ce0feeb2c") +} + +func (IAutomationV21PlusCommonUpkeepCanceled) Topic() common.Hash { + return common.HexToHash("0x91cb3bb75cfbd718bbfccc56b7f53d92d7048ef4ca39a3b7b7c6d4af1f791181") +} + +func (IAutomationV21PlusCommonUpkeepCheckDataSet) Topic() common.Hash { + return common.HexToHash("0xcba2d5723b2ee59e53a8e8a82a4a7caf4fdfe70e9f7c582950bf7e7a5c24e83d") +} + +func (IAutomationV21PlusCommonUpkeepGasLimitSet) Topic() common.Hash { + return common.HexToHash("0xc24c07e655ce79fba8a589778987d3c015bc6af1632bb20cf9182e02a65d972c") +} + +func (IAutomationV21PlusCommonUpkeepMigrated) Topic() common.Hash { + return common.HexToHash("0xb38647142fbb1ea4c000fc4569b37a4e9a9f6313317b84ee3e5326c1a6cd06ff") +} + +func (IAutomationV21PlusCommonUpkeepOffchainConfigSet) Topic() common.Hash { + return common.HexToHash("0x3e8740446213c8a77d40e08f79136ce3f347d13ed270a6ebdf57159e0faf4850") +} + +func (IAutomationV21PlusCommonUpkeepPaused) Topic() common.Hash { + return common.HexToHash("0x8ab10247ce168c27748e656ecf852b951fcaac790c18106b19aa0ae57a8b741f") +} + +func (IAutomationV21PlusCommonUpkeepPerformed) Topic() common.Hash { + return common.HexToHash("0xad8cc9579b21dfe2c2f6ea35ba15b656e46b4f5b0cb424f52739b8ce5cac9c5b") +} + +func (IAutomationV21PlusCommonUpkeepPrivilegeConfigSet) Topic() common.Hash { + return common.HexToHash("0x2fd8d70753a007014349d4591843cc031c2dd7a260d7dd82eca8253686ae7769") +} + +func (IAutomationV21PlusCommonUpkeepReceived) Topic() common.Hash { + return common.HexToHash("0x74931a144e43a50694897f241d973aecb5024c0e910f9bb80a163ea3c1cf5a71") +} + +func (IAutomationV21PlusCommonUpkeepRegistered) Topic() common.Hash { + return common.HexToHash("0xbae366358c023f887e791d7a62f2e4316f1026bd77f6fb49501a917b3bc5d012") +} + +func (IAutomationV21PlusCommonUpkeepTriggerConfigSet) Topic() common.Hash { + return common.HexToHash("0x2b72ac786c97e68dbab71023ed6f2bdbfc80ad9bb7808941929229d71b7d5664") +} + +func (IAutomationV21PlusCommonUpkeepUnpaused) Topic() common.Hash { + return common.HexToHash("0x7bada562044eb163f6b4003c4553e4e62825344c0418eea087bed5ee05a47456") +} + +func (_IAutomationV21PlusCommon *IAutomationV21PlusCommon) Address() common.Address { + return _IAutomationV21PlusCommon.address +} + +type IAutomationV21PlusCommonInterface interface { + CheckCallback(opts *bind.CallOpts, id *big.Int, values [][]byte, extraData []byte) (CheckCallback, + + error) + + CheckUpkeep(opts *bind.CallOpts, id *big.Int, triggerData []byte) (CheckUpkeep, + + error) + + CheckUpkeep0(opts *bind.CallOpts, id *big.Int) (CheckUpkeep0, + + error) + + GetActiveUpkeepIDs(opts *bind.CallOpts, startIndex *big.Int, maxCount *big.Int) ([]*big.Int, error) + + GetMinBalance(opts *bind.CallOpts, id *big.Int) (*big.Int, error) + + GetState(opts *bind.CallOpts) (GetState, + + error) + + GetTriggerType(opts *bind.CallOpts, upkeepId *big.Int) (uint8, error) + + GetUpkeep(opts *bind.CallOpts, id *big.Int) (IAutomationV21PlusCommonUpkeepInfoLegacy, error) + + GetUpkeepPrivilegeConfig(opts *bind.CallOpts, upkeepId *big.Int) ([]byte, error) + + GetUpkeepTriggerConfig(opts *bind.CallOpts, upkeepId *big.Int) ([]byte, error) + + HasDedupKey(opts *bind.CallOpts, dedupKey [32]byte) (bool, error) + + Owner(opts *bind.CallOpts) (common.Address, error) + + SimulatePerformUpkeep(opts *bind.CallOpts, id *big.Int, performData []byte) (SimulatePerformUpkeep, + + error) + + TypeAndVersion(opts *bind.CallOpts) (string, error) + + AddFunds(opts *bind.TransactOpts, id *big.Int, amount *big.Int) (*types.Transaction, error) + + CancelUpkeep(opts *bind.TransactOpts, id *big.Int) (*types.Transaction, error) + + ExecuteCallback(opts *bind.TransactOpts, id *big.Int, payload []byte) (*types.Transaction, error) + + Pause(opts *bind.TransactOpts) (*types.Transaction, error) + + PauseUpkeep(opts *bind.TransactOpts, id *big.Int) (*types.Transaction, error) + + SetUpkeepCheckData(opts *bind.TransactOpts, id *big.Int, newCheckData []byte) (*types.Transaction, error) + + SetUpkeepGasLimit(opts *bind.TransactOpts, id *big.Int, gasLimit uint32) (*types.Transaction, error) + + SetUpkeepPrivilegeConfig(opts *bind.TransactOpts, upkeepId *big.Int, newPrivilegeConfig []byte) (*types.Transaction, error) + + SetUpkeepTriggerConfig(opts *bind.TransactOpts, id *big.Int, triggerConfig []byte) (*types.Transaction, error) + + UnpauseUpkeep(opts *bind.TransactOpts, id *big.Int) (*types.Transaction, error) + + FilterAdminPrivilegeConfigSet(opts *bind.FilterOpts, admin []common.Address) (*IAutomationV21PlusCommonAdminPrivilegeConfigSetIterator, error) + + WatchAdminPrivilegeConfigSet(opts *bind.WatchOpts, sink chan<- *IAutomationV21PlusCommonAdminPrivilegeConfigSet, admin []common.Address) (event.Subscription, error) + + ParseAdminPrivilegeConfigSet(log types.Log) (*IAutomationV21PlusCommonAdminPrivilegeConfigSet, error) + + FilterCancelledUpkeepReport(opts *bind.FilterOpts, id []*big.Int) (*IAutomationV21PlusCommonCancelledUpkeepReportIterator, error) + + WatchCancelledUpkeepReport(opts *bind.WatchOpts, sink chan<- *IAutomationV21PlusCommonCancelledUpkeepReport, id []*big.Int) (event.Subscription, error) + + ParseCancelledUpkeepReport(log types.Log) (*IAutomationV21PlusCommonCancelledUpkeepReport, error) + + FilterConfigSet(opts *bind.FilterOpts) (*IAutomationV21PlusCommonConfigSetIterator, error) + + WatchConfigSet(opts *bind.WatchOpts, sink chan<- *IAutomationV21PlusCommonConfigSet) (event.Subscription, error) + + ParseConfigSet(log types.Log) (*IAutomationV21PlusCommonConfigSet, error) + + FilterDedupKeyAdded(opts *bind.FilterOpts, dedupKey [][32]byte) (*IAutomationV21PlusCommonDedupKeyAddedIterator, error) + + WatchDedupKeyAdded(opts *bind.WatchOpts, sink chan<- *IAutomationV21PlusCommonDedupKeyAdded, dedupKey [][32]byte) (event.Subscription, error) + + ParseDedupKeyAdded(log types.Log) (*IAutomationV21PlusCommonDedupKeyAdded, error) + + FilterFundsAdded(opts *bind.FilterOpts, id []*big.Int, from []common.Address) (*IAutomationV21PlusCommonFundsAddedIterator, error) + + WatchFundsAdded(opts *bind.WatchOpts, sink chan<- *IAutomationV21PlusCommonFundsAdded, id []*big.Int, from []common.Address) (event.Subscription, error) + + ParseFundsAdded(log types.Log) (*IAutomationV21PlusCommonFundsAdded, error) + + FilterFundsWithdrawn(opts *bind.FilterOpts, id []*big.Int) (*IAutomationV21PlusCommonFundsWithdrawnIterator, error) + + WatchFundsWithdrawn(opts *bind.WatchOpts, sink chan<- *IAutomationV21PlusCommonFundsWithdrawn, id []*big.Int) (event.Subscription, error) + + ParseFundsWithdrawn(log types.Log) (*IAutomationV21PlusCommonFundsWithdrawn, error) + + FilterInsufficientFundsUpkeepReport(opts *bind.FilterOpts, id []*big.Int) (*IAutomationV21PlusCommonInsufficientFundsUpkeepReportIterator, error) + + WatchInsufficientFundsUpkeepReport(opts *bind.WatchOpts, sink chan<- *IAutomationV21PlusCommonInsufficientFundsUpkeepReport, id []*big.Int) (event.Subscription, error) + + ParseInsufficientFundsUpkeepReport(log types.Log) (*IAutomationV21PlusCommonInsufficientFundsUpkeepReport, error) + + FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*IAutomationV21PlusCommonOwnershipTransferRequestedIterator, error) + + WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *IAutomationV21PlusCommonOwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) + + ParseOwnershipTransferRequested(log types.Log) (*IAutomationV21PlusCommonOwnershipTransferRequested, error) + + FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*IAutomationV21PlusCommonOwnershipTransferredIterator, error) + + WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *IAutomationV21PlusCommonOwnershipTransferred, from []common.Address, to []common.Address) (event.Subscription, error) + + ParseOwnershipTransferred(log types.Log) (*IAutomationV21PlusCommonOwnershipTransferred, error) + + FilterPaused(opts *bind.FilterOpts) (*IAutomationV21PlusCommonPausedIterator, error) + + WatchPaused(opts *bind.WatchOpts, sink chan<- *IAutomationV21PlusCommonPaused) (event.Subscription, error) + + ParsePaused(log types.Log) (*IAutomationV21PlusCommonPaused, error) + + FilterPayeesUpdated(opts *bind.FilterOpts) (*IAutomationV21PlusCommonPayeesUpdatedIterator, error) + + WatchPayeesUpdated(opts *bind.WatchOpts, sink chan<- *IAutomationV21PlusCommonPayeesUpdated) (event.Subscription, error) + + ParsePayeesUpdated(log types.Log) (*IAutomationV21PlusCommonPayeesUpdated, error) + + FilterPayeeshipTransferRequested(opts *bind.FilterOpts, transmitter []common.Address, from []common.Address, to []common.Address) (*IAutomationV21PlusCommonPayeeshipTransferRequestedIterator, error) + + WatchPayeeshipTransferRequested(opts *bind.WatchOpts, sink chan<- *IAutomationV21PlusCommonPayeeshipTransferRequested, transmitter []common.Address, from []common.Address, to []common.Address) (event.Subscription, error) + + ParsePayeeshipTransferRequested(log types.Log) (*IAutomationV21PlusCommonPayeeshipTransferRequested, error) + + FilterPayeeshipTransferred(opts *bind.FilterOpts, transmitter []common.Address, from []common.Address, to []common.Address) (*IAutomationV21PlusCommonPayeeshipTransferredIterator, error) + + WatchPayeeshipTransferred(opts *bind.WatchOpts, sink chan<- *IAutomationV21PlusCommonPayeeshipTransferred, transmitter []common.Address, from []common.Address, to []common.Address) (event.Subscription, error) + + ParsePayeeshipTransferred(log types.Log) (*IAutomationV21PlusCommonPayeeshipTransferred, error) + + FilterPaymentWithdrawn(opts *bind.FilterOpts, transmitter []common.Address, amount []*big.Int, to []common.Address) (*IAutomationV21PlusCommonPaymentWithdrawnIterator, error) + + WatchPaymentWithdrawn(opts *bind.WatchOpts, sink chan<- *IAutomationV21PlusCommonPaymentWithdrawn, transmitter []common.Address, amount []*big.Int, to []common.Address) (event.Subscription, error) + + ParsePaymentWithdrawn(log types.Log) (*IAutomationV21PlusCommonPaymentWithdrawn, error) + + FilterReorgedUpkeepReport(opts *bind.FilterOpts, id []*big.Int) (*IAutomationV21PlusCommonReorgedUpkeepReportIterator, error) + + WatchReorgedUpkeepReport(opts *bind.WatchOpts, sink chan<- *IAutomationV21PlusCommonReorgedUpkeepReport, id []*big.Int) (event.Subscription, error) + + ParseReorgedUpkeepReport(log types.Log) (*IAutomationV21PlusCommonReorgedUpkeepReport, error) + + FilterStaleUpkeepReport(opts *bind.FilterOpts, id []*big.Int) (*IAutomationV21PlusCommonStaleUpkeepReportIterator, error) + + WatchStaleUpkeepReport(opts *bind.WatchOpts, sink chan<- *IAutomationV21PlusCommonStaleUpkeepReport, id []*big.Int) (event.Subscription, error) + + ParseStaleUpkeepReport(log types.Log) (*IAutomationV21PlusCommonStaleUpkeepReport, error) + + FilterTransmitted(opts *bind.FilterOpts) (*IAutomationV21PlusCommonTransmittedIterator, error) + + WatchTransmitted(opts *bind.WatchOpts, sink chan<- *IAutomationV21PlusCommonTransmitted) (event.Subscription, error) + + ParseTransmitted(log types.Log) (*IAutomationV21PlusCommonTransmitted, error) + + FilterUnpaused(opts *bind.FilterOpts) (*IAutomationV21PlusCommonUnpausedIterator, error) + + WatchUnpaused(opts *bind.WatchOpts, sink chan<- *IAutomationV21PlusCommonUnpaused) (event.Subscription, error) + + ParseUnpaused(log types.Log) (*IAutomationV21PlusCommonUnpaused, error) + + FilterUpkeepAdminTransferRequested(opts *bind.FilterOpts, id []*big.Int, from []common.Address, to []common.Address) (*IAutomationV21PlusCommonUpkeepAdminTransferRequestedIterator, error) + + WatchUpkeepAdminTransferRequested(opts *bind.WatchOpts, sink chan<- *IAutomationV21PlusCommonUpkeepAdminTransferRequested, id []*big.Int, from []common.Address, to []common.Address) (event.Subscription, error) + + ParseUpkeepAdminTransferRequested(log types.Log) (*IAutomationV21PlusCommonUpkeepAdminTransferRequested, error) + + FilterUpkeepAdminTransferred(opts *bind.FilterOpts, id []*big.Int, from []common.Address, to []common.Address) (*IAutomationV21PlusCommonUpkeepAdminTransferredIterator, error) + + WatchUpkeepAdminTransferred(opts *bind.WatchOpts, sink chan<- *IAutomationV21PlusCommonUpkeepAdminTransferred, id []*big.Int, from []common.Address, to []common.Address) (event.Subscription, error) + + ParseUpkeepAdminTransferred(log types.Log) (*IAutomationV21PlusCommonUpkeepAdminTransferred, error) + + FilterUpkeepCanceled(opts *bind.FilterOpts, id []*big.Int, atBlockHeight []uint64) (*IAutomationV21PlusCommonUpkeepCanceledIterator, error) + + WatchUpkeepCanceled(opts *bind.WatchOpts, sink chan<- *IAutomationV21PlusCommonUpkeepCanceled, id []*big.Int, atBlockHeight []uint64) (event.Subscription, error) + + ParseUpkeepCanceled(log types.Log) (*IAutomationV21PlusCommonUpkeepCanceled, error) + + FilterUpkeepCheckDataSet(opts *bind.FilterOpts, id []*big.Int) (*IAutomationV21PlusCommonUpkeepCheckDataSetIterator, error) + + WatchUpkeepCheckDataSet(opts *bind.WatchOpts, sink chan<- *IAutomationV21PlusCommonUpkeepCheckDataSet, id []*big.Int) (event.Subscription, error) + + ParseUpkeepCheckDataSet(log types.Log) (*IAutomationV21PlusCommonUpkeepCheckDataSet, error) + + FilterUpkeepGasLimitSet(opts *bind.FilterOpts, id []*big.Int) (*IAutomationV21PlusCommonUpkeepGasLimitSetIterator, error) + + WatchUpkeepGasLimitSet(opts *bind.WatchOpts, sink chan<- *IAutomationV21PlusCommonUpkeepGasLimitSet, id []*big.Int) (event.Subscription, error) + + ParseUpkeepGasLimitSet(log types.Log) (*IAutomationV21PlusCommonUpkeepGasLimitSet, error) + + FilterUpkeepMigrated(opts *bind.FilterOpts, id []*big.Int) (*IAutomationV21PlusCommonUpkeepMigratedIterator, error) + + WatchUpkeepMigrated(opts *bind.WatchOpts, sink chan<- *IAutomationV21PlusCommonUpkeepMigrated, id []*big.Int) (event.Subscription, error) + + ParseUpkeepMigrated(log types.Log) (*IAutomationV21PlusCommonUpkeepMigrated, error) + + FilterUpkeepOffchainConfigSet(opts *bind.FilterOpts, id []*big.Int) (*IAutomationV21PlusCommonUpkeepOffchainConfigSetIterator, error) + + WatchUpkeepOffchainConfigSet(opts *bind.WatchOpts, sink chan<- *IAutomationV21PlusCommonUpkeepOffchainConfigSet, id []*big.Int) (event.Subscription, error) + + ParseUpkeepOffchainConfigSet(log types.Log) (*IAutomationV21PlusCommonUpkeepOffchainConfigSet, error) + + FilterUpkeepPaused(opts *bind.FilterOpts, id []*big.Int) (*IAutomationV21PlusCommonUpkeepPausedIterator, error) + + WatchUpkeepPaused(opts *bind.WatchOpts, sink chan<- *IAutomationV21PlusCommonUpkeepPaused, id []*big.Int) (event.Subscription, error) + + ParseUpkeepPaused(log types.Log) (*IAutomationV21PlusCommonUpkeepPaused, error) + + FilterUpkeepPerformed(opts *bind.FilterOpts, id []*big.Int, success []bool) (*IAutomationV21PlusCommonUpkeepPerformedIterator, error) + + WatchUpkeepPerformed(opts *bind.WatchOpts, sink chan<- *IAutomationV21PlusCommonUpkeepPerformed, id []*big.Int, success []bool) (event.Subscription, error) + + ParseUpkeepPerformed(log types.Log) (*IAutomationV21PlusCommonUpkeepPerformed, error) + + FilterUpkeepPrivilegeConfigSet(opts *bind.FilterOpts, id []*big.Int) (*IAutomationV21PlusCommonUpkeepPrivilegeConfigSetIterator, error) + + WatchUpkeepPrivilegeConfigSet(opts *bind.WatchOpts, sink chan<- *IAutomationV21PlusCommonUpkeepPrivilegeConfigSet, id []*big.Int) (event.Subscription, error) + + ParseUpkeepPrivilegeConfigSet(log types.Log) (*IAutomationV21PlusCommonUpkeepPrivilegeConfigSet, error) + + FilterUpkeepReceived(opts *bind.FilterOpts, id []*big.Int) (*IAutomationV21PlusCommonUpkeepReceivedIterator, error) + + WatchUpkeepReceived(opts *bind.WatchOpts, sink chan<- *IAutomationV21PlusCommonUpkeepReceived, id []*big.Int) (event.Subscription, error) + + ParseUpkeepReceived(log types.Log) (*IAutomationV21PlusCommonUpkeepReceived, error) + + FilterUpkeepRegistered(opts *bind.FilterOpts, id []*big.Int) (*IAutomationV21PlusCommonUpkeepRegisteredIterator, error) + + WatchUpkeepRegistered(opts *bind.WatchOpts, sink chan<- *IAutomationV21PlusCommonUpkeepRegistered, id []*big.Int) (event.Subscription, error) + + ParseUpkeepRegistered(log types.Log) (*IAutomationV21PlusCommonUpkeepRegistered, error) + + FilterUpkeepTriggerConfigSet(opts *bind.FilterOpts, id []*big.Int) (*IAutomationV21PlusCommonUpkeepTriggerConfigSetIterator, error) + + WatchUpkeepTriggerConfigSet(opts *bind.WatchOpts, sink chan<- *IAutomationV21PlusCommonUpkeepTriggerConfigSet, id []*big.Int) (event.Subscription, error) + + ParseUpkeepTriggerConfigSet(log types.Log) (*IAutomationV21PlusCommonUpkeepTriggerConfigSet, error) + + FilterUpkeepUnpaused(opts *bind.FilterOpts, id []*big.Int) (*IAutomationV21PlusCommonUpkeepUnpausedIterator, error) + + WatchUpkeepUnpaused(opts *bind.WatchOpts, sink chan<- *IAutomationV21PlusCommonUpkeepUnpaused, id []*big.Int) (event.Subscription, error) + + ParseUpkeepUnpaused(log types.Log) (*IAutomationV21PlusCommonUpkeepUnpaused, error) + + ParseLog(log types.Log) (generated.AbigenLog, error) + + Address() common.Address +} diff --git a/core/gethwrappers/generated/i_keeper_registry_master_wrapper_2_1/i_keeper_registry_master_wrapper_2_1.go b/core/gethwrappers/generated/i_keeper_registry_master_wrapper_2_1/i_keeper_registry_master_wrapper_2_1.go index 640e871c084..1c67615d5ba 100644 --- a/core/gethwrappers/generated/i_keeper_registry_master_wrapper_2_1/i_keeper_registry_master_wrapper_2_1.go +++ b/core/gethwrappers/generated/i_keeper_registry_master_wrapper_2_1/i_keeper_registry_master_wrapper_2_1.go @@ -30,7 +30,7 @@ var ( _ = abi.ConvertType ) -type KeeperRegistryBase21OnchainConfig struct { +type IAutomationV21PlusCommonOnchainConfigLegacy struct { PaymentPremiumPPB uint32 FlatFeeMicroLink uint32 CheckGasLimit uint32 @@ -48,7 +48,7 @@ type KeeperRegistryBase21OnchainConfig struct { UpkeepPrivilegeManager common.Address } -type KeeperRegistryBase21State struct { +type IAutomationV21PlusCommonStateLegacy struct { Nonce uint32 OwnerLinkBalance *big.Int ExpectedLinkBalance *big.Int @@ -61,7 +61,7 @@ type KeeperRegistryBase21State struct { Paused bool } -type KeeperRegistryBase21UpkeepInfo struct { +type IAutomationV21PlusCommonUpkeepInfoLegacy struct { Target common.Address PerformGas uint32 CheckData []byte @@ -75,7 +75,7 @@ type KeeperRegistryBase21UpkeepInfo struct { } var IKeeperRegistryMasterMetaData = &bind.MetaData{ - ABI: "[{\"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\":[],\"name\":\"InsufficientFunds\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidDataLength\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidPayee\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidRecipient\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidReport\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidSigner\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTransmitter\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTrigger\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTriggerType\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MaxCheckDataSizeCanOnlyIncrease\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MaxPerformDataSizeCanOnlyIncrease\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MigrationNotPermitted\",\"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\":\"OnlyPausedUpkeep\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlySimulatedBackend\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyUnpausedUpkeep\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ParameterLengthError\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PaymentGreaterThanAllLINK\",\"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\":\"UpkeepAlreadyExists\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UpkeepCancelled\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UpkeepNotCanceled\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UpkeepNotNeeded\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ValueNotChanged\",\"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\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"trigger\",\"type\":\"bytes\"}],\"name\":\"CancelledUpkeepReport\",\"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\":\"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\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"OwnerFundsWithdrawn\",\"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\":\"nonpayable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"transmitter\",\"type\":\"address\"}],\"name\":\"acceptPayeeship\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"acceptUpkeepAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"addFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"cancelUpkeep\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bytes[]\",\"name\":\"values\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"checkCallback\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"upkeepNeeded\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"performData\",\"type\":\"bytes\"},{\"internalType\":\"uint8\",\"name\":\"upkeepFailureReason\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"gasUsed\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"triggerData\",\"type\":\"bytes\"}],\"name\":\"checkUpkeep\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"upkeepNeeded\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"performData\",\"type\":\"bytes\"},{\"internalType\":\"uint8\",\"name\":\"upkeepFailureReason\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"gasUsed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fastGasWei\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"linkNative\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"checkUpkeep\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"upkeepNeeded\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"performData\",\"type\":\"bytes\"},{\"internalType\":\"uint8\",\"name\":\"upkeepFailureReason\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"gasUsed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fastGasWei\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"linkNative\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"}],\"name\":\"executeCallback\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"upkeepNeeded\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"performData\",\"type\":\"bytes\"},{\"internalType\":\"uint8\",\"name\":\"upkeepFailureReason\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"gasUsed\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"fallbackTo\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"startIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxCount\",\"type\":\"uint256\"}],\"name\":\"getActiveUpkeepIDs\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"}],\"name\":\"getAdminPrivilegeConfig\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAutomationForwarderLogic\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"getBalance\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"balance\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCancellationDelay\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getConditionalGasOverhead\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getFastGasFeedAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepID\",\"type\":\"uint256\"}],\"name\":\"getForwarder\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLinkAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLinkNativeFeedAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLogGasOverhead\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"triggerType\",\"type\":\"uint8\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"}],\"name\":\"getMaxPaymentForGas\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"maxPayment\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"getMinBalance\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"getMinBalanceForUpkeep\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"minBalance\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getMode\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"peer\",\"type\":\"address\"}],\"name\":\"getPeerRegistryMigrationPermission\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPerPerformByteGasOverhead\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPerSignerGasOverhead\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"query\",\"type\":\"address\"}],\"name\":\"getSignerInfo\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"active\",\"type\":\"bool\"},{\"internalType\":\"uint8\",\"name\":\"index\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getState\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"nonce\",\"type\":\"uint32\"},{\"internalType\":\"uint96\",\"name\":\"ownerLinkBalance\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"expectedLinkBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint96\",\"name\":\"totalPremium\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"numUpkeeps\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"configCount\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"latestConfigBlockNumber\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"latestConfigDigest\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"latestEpoch\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"}],\"internalType\":\"structKeeperRegistryBase2_1.State\",\"name\":\"state\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint32\",\"name\":\"paymentPremiumPPB\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"flatFeeMicroLink\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"checkGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint24\",\"name\":\"stalenessSeconds\",\"type\":\"uint24\"},{\"internalType\":\"uint16\",\"name\":\"gasCeilingMultiplier\",\"type\":\"uint16\"},{\"internalType\":\"uint96\",\"name\":\"minUpkeepSpend\",\"type\":\"uint96\"},{\"internalType\":\"uint32\",\"name\":\"maxPerformGas\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxCheckDataSize\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxPerformDataSize\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxRevertDataSize\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"fallbackGasPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fallbackLinkPrice\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"transcoder\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"registrars\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"upkeepPrivilegeManager\",\"type\":\"address\"}],\"internalType\":\"structKeeperRegistryBase2_1.OnchainConfig\",\"name\":\"config\",\"type\":\"tuple\"},{\"internalType\":\"address[]\",\"name\":\"signers\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"transmitters\",\"type\":\"address[]\"},{\"internalType\":\"uint8\",\"name\":\"f\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"query\",\"type\":\"address\"}],\"name\":\"getTransmitterInfo\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"active\",\"type\":\"bool\"},{\"internalType\":\"uint8\",\"name\":\"index\",\"type\":\"uint8\"},{\"internalType\":\"uint96\",\"name\":\"balance\",\"type\":\"uint96\"},{\"internalType\":\"uint96\",\"name\":\"lastCollected\",\"type\":\"uint96\"},{\"internalType\":\"address\",\"name\":\"payee\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"getTriggerType\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"getUpkeep\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"performGas\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"checkData\",\"type\":\"bytes\"},{\"internalType\":\"uint96\",\"name\":\"balance\",\"type\":\"uint96\"},{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"maxValidBlocknumber\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"lastPerformedBlockNumber\",\"type\":\"uint32\"},{\"internalType\":\"uint96\",\"name\":\"amountSpent\",\"type\":\"uint96\"},{\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"offchainConfig\",\"type\":\"bytes\"}],\"internalType\":\"structKeeperRegistryBase2_1.UpkeepInfo\",\"name\":\"upkeepInfo\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"getUpkeepPrivilegeConfig\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"getUpkeepTriggerConfig\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"dedupKey\",\"type\":\"bytes32\"}],\"name\":\"hasDedupKey\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"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\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\"},{\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"}],\"name\":\"migrateUpkeeps\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"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\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"pauseUpkeep\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"encodedUpkeeps\",\"type\":\"bytes\"}],\"name\":\"receiveUpkeeps\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"recoverFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"triggerType\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"checkData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"triggerConfig\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"offchainConfig\",\"type\":\"bytes\"}],\"name\":\"registerUpkeep\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"checkData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"offchainConfig\",\"type\":\"bytes\"}],\"name\":\"registerUpkeep\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"newPrivilegeConfig\",\"type\":\"bytes\"}],\"name\":\"setAdminPrivilegeConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"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\":\"paymentPremiumPPB\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"flatFeeMicroLink\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"checkGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint24\",\"name\":\"stalenessSeconds\",\"type\":\"uint24\"},{\"internalType\":\"uint16\",\"name\":\"gasCeilingMultiplier\",\"type\":\"uint16\"},{\"internalType\":\"uint96\",\"name\":\"minUpkeepSpend\",\"type\":\"uint96\"},{\"internalType\":\"uint32\",\"name\":\"maxPerformGas\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxCheckDataSize\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxPerformDataSize\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxRevertDataSize\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"fallbackGasPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fallbackLinkPrice\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"transcoder\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"registrars\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"upkeepPrivilegeManager\",\"type\":\"address\"}],\"internalType\":\"structKeeperRegistryBase2_1.OnchainConfig\",\"name\":\"onchainConfig\",\"type\":\"tuple\"},{\"internalType\":\"uint64\",\"name\":\"offchainConfigVersion\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"offchainConfig\",\"type\":\"bytes\"}],\"name\":\"setConfigTypeSafe\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"payees\",\"type\":\"address[]\"}],\"name\":\"setPayees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"peer\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"permission\",\"type\":\"uint8\"}],\"name\":\"setPeerRegistryMigrationPermission\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"newCheckData\",\"type\":\"bytes\"}],\"name\":\"setUpkeepCheckData\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"}],\"name\":\"setUpkeepGasLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"}],\"name\":\"setUpkeepOffchainConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"newPrivilegeConfig\",\"type\":\"bytes\"}],\"name\":\"setUpkeepPrivilegeConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"triggerConfig\",\"type\":\"bytes\"}],\"name\":\"setUpkeepTriggerConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"performData\",\"type\":\"bytes\"}],\"name\":\"simulatePerformUpkeep\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"gasUsed\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"transmitter\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"proposed\",\"type\":\"address\"}],\"name\":\"transferPayeeship\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"proposed\",\"type\":\"address\"}],\"name\":\"transferUpkeepAdmin\",\"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\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"unpauseUpkeep\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"upkeepTranscoderVersion\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"upkeepVersion\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"withdrawFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"withdrawOwnerFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"withdrawPayment\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + ABI: "[{\"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\":[],\"name\":\"InsufficientFunds\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidDataLength\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidPayee\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidRecipient\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidReport\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidSigner\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTransmitter\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTrigger\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTriggerType\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MaxCheckDataSizeCanOnlyIncrease\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MaxPerformDataSizeCanOnlyIncrease\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MigrationNotPermitted\",\"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\":\"OnlyPausedUpkeep\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlySimulatedBackend\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyUnpausedUpkeep\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ParameterLengthError\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PaymentGreaterThanAllLINK\",\"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\":\"UpkeepAlreadyExists\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UpkeepCancelled\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UpkeepNotCanceled\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UpkeepNotNeeded\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ValueNotChanged\",\"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\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"trigger\",\"type\":\"bytes\"}],\"name\":\"CancelledUpkeepReport\",\"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\":\"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\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"OwnerFundsWithdrawn\",\"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\":\"nonpayable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"transmitter\",\"type\":\"address\"}],\"name\":\"acceptPayeeship\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"acceptUpkeepAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"addFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"cancelUpkeep\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bytes[]\",\"name\":\"values\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"checkCallback\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"upkeepNeeded\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"performData\",\"type\":\"bytes\"},{\"internalType\":\"uint8\",\"name\":\"upkeepFailureReason\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"gasUsed\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"triggerData\",\"type\":\"bytes\"}],\"name\":\"checkUpkeep\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"upkeepNeeded\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"performData\",\"type\":\"bytes\"},{\"internalType\":\"uint8\",\"name\":\"upkeepFailureReason\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"gasUsed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fastGasWei\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"linkNative\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"checkUpkeep\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"upkeepNeeded\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"performData\",\"type\":\"bytes\"},{\"internalType\":\"uint8\",\"name\":\"upkeepFailureReason\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"gasUsed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fastGasWei\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"linkNative\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"}],\"name\":\"executeCallback\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"upkeepNeeded\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"performData\",\"type\":\"bytes\"},{\"internalType\":\"uint8\",\"name\":\"upkeepFailureReason\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"gasUsed\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"fallbackTo\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"startIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxCount\",\"type\":\"uint256\"}],\"name\":\"getActiveUpkeepIDs\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"}],\"name\":\"getAdminPrivilegeConfig\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAutomationForwarderLogic\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"getBalance\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"balance\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCancellationDelay\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getConditionalGasOverhead\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getFastGasFeedAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepID\",\"type\":\"uint256\"}],\"name\":\"getForwarder\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLinkAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLinkNativeFeedAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLogGasOverhead\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"triggerType\",\"type\":\"uint8\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"}],\"name\":\"getMaxPaymentForGas\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"maxPayment\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"getMinBalance\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"getMinBalanceForUpkeep\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"minBalance\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getMode\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"peer\",\"type\":\"address\"}],\"name\":\"getPeerRegistryMigrationPermission\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPerPerformByteGasOverhead\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPerSignerGasOverhead\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"query\",\"type\":\"address\"}],\"name\":\"getSignerInfo\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"active\",\"type\":\"bool\"},{\"internalType\":\"uint8\",\"name\":\"index\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getState\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"nonce\",\"type\":\"uint32\"},{\"internalType\":\"uint96\",\"name\":\"ownerLinkBalance\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"expectedLinkBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint96\",\"name\":\"totalPremium\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"numUpkeeps\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"configCount\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"latestConfigBlockNumber\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"latestConfigDigest\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"latestEpoch\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"}],\"internalType\":\"structIAutomationV21PlusCommon.StateLegacy\",\"name\":\"state\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint32\",\"name\":\"paymentPremiumPPB\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"flatFeeMicroLink\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"checkGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint24\",\"name\":\"stalenessSeconds\",\"type\":\"uint24\"},{\"internalType\":\"uint16\",\"name\":\"gasCeilingMultiplier\",\"type\":\"uint16\"},{\"internalType\":\"uint96\",\"name\":\"minUpkeepSpend\",\"type\":\"uint96\"},{\"internalType\":\"uint32\",\"name\":\"maxPerformGas\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxCheckDataSize\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxPerformDataSize\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxRevertDataSize\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"fallbackGasPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fallbackLinkPrice\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"transcoder\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"registrars\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"upkeepPrivilegeManager\",\"type\":\"address\"}],\"internalType\":\"structIAutomationV21PlusCommon.OnchainConfigLegacy\",\"name\":\"config\",\"type\":\"tuple\"},{\"internalType\":\"address[]\",\"name\":\"signers\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"transmitters\",\"type\":\"address[]\"},{\"internalType\":\"uint8\",\"name\":\"f\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"query\",\"type\":\"address\"}],\"name\":\"getTransmitterInfo\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"active\",\"type\":\"bool\"},{\"internalType\":\"uint8\",\"name\":\"index\",\"type\":\"uint8\"},{\"internalType\":\"uint96\",\"name\":\"balance\",\"type\":\"uint96\"},{\"internalType\":\"uint96\",\"name\":\"lastCollected\",\"type\":\"uint96\"},{\"internalType\":\"address\",\"name\":\"payee\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"getTriggerType\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"getUpkeep\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"performGas\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"checkData\",\"type\":\"bytes\"},{\"internalType\":\"uint96\",\"name\":\"balance\",\"type\":\"uint96\"},{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"maxValidBlocknumber\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"lastPerformedBlockNumber\",\"type\":\"uint32\"},{\"internalType\":\"uint96\",\"name\":\"amountSpent\",\"type\":\"uint96\"},{\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"offchainConfig\",\"type\":\"bytes\"}],\"internalType\":\"structIAutomationV21PlusCommon.UpkeepInfoLegacy\",\"name\":\"upkeepInfo\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"getUpkeepPrivilegeConfig\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"getUpkeepTriggerConfig\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"dedupKey\",\"type\":\"bytes32\"}],\"name\":\"hasDedupKey\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"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\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\"},{\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"}],\"name\":\"migrateUpkeeps\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"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\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"pauseUpkeep\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"encodedUpkeeps\",\"type\":\"bytes\"}],\"name\":\"receiveUpkeeps\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"recoverFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"triggerType\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"checkData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"triggerConfig\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"offchainConfig\",\"type\":\"bytes\"}],\"name\":\"registerUpkeep\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"checkData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"offchainConfig\",\"type\":\"bytes\"}],\"name\":\"registerUpkeep\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"newPrivilegeConfig\",\"type\":\"bytes\"}],\"name\":\"setAdminPrivilegeConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"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\":\"paymentPremiumPPB\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"flatFeeMicroLink\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"checkGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint24\",\"name\":\"stalenessSeconds\",\"type\":\"uint24\"},{\"internalType\":\"uint16\",\"name\":\"gasCeilingMultiplier\",\"type\":\"uint16\"},{\"internalType\":\"uint96\",\"name\":\"minUpkeepSpend\",\"type\":\"uint96\"},{\"internalType\":\"uint32\",\"name\":\"maxPerformGas\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxCheckDataSize\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxPerformDataSize\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxRevertDataSize\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"fallbackGasPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fallbackLinkPrice\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"transcoder\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"registrars\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"upkeepPrivilegeManager\",\"type\":\"address\"}],\"internalType\":\"structIAutomationV21PlusCommon.OnchainConfigLegacy\",\"name\":\"onchainConfig\",\"type\":\"tuple\"},{\"internalType\":\"uint64\",\"name\":\"offchainConfigVersion\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"offchainConfig\",\"type\":\"bytes\"}],\"name\":\"setConfigTypeSafe\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"payees\",\"type\":\"address[]\"}],\"name\":\"setPayees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"peer\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"permission\",\"type\":\"uint8\"}],\"name\":\"setPeerRegistryMigrationPermission\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"newCheckData\",\"type\":\"bytes\"}],\"name\":\"setUpkeepCheckData\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"}],\"name\":\"setUpkeepGasLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"}],\"name\":\"setUpkeepOffchainConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"newPrivilegeConfig\",\"type\":\"bytes\"}],\"name\":\"setUpkeepPrivilegeConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"triggerConfig\",\"type\":\"bytes\"}],\"name\":\"setUpkeepTriggerConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"performData\",\"type\":\"bytes\"}],\"name\":\"simulatePerformUpkeep\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"gasUsed\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"transmitter\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"proposed\",\"type\":\"address\"}],\"name\":\"transferPayeeship\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"proposed\",\"type\":\"address\"}],\"name\":\"transferUpkeepAdmin\",\"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\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"unpauseUpkeep\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"upkeepTranscoderVersion\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"upkeepVersion\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"withdrawFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"withdrawOwnerFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"withdrawPayment\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", } var IKeeperRegistryMasterABI = IKeeperRegistryMasterMetaData.ABI @@ -757,8 +757,8 @@ func (_IKeeperRegistryMaster *IKeeperRegistryMasterCaller) GetState(opts *bind.C return *outstruct, err } - outstruct.State = *abi.ConvertType(out[0], new(KeeperRegistryBase21State)).(*KeeperRegistryBase21State) - outstruct.Config = *abi.ConvertType(out[1], new(KeeperRegistryBase21OnchainConfig)).(*KeeperRegistryBase21OnchainConfig) + outstruct.State = *abi.ConvertType(out[0], new(IAutomationV21PlusCommonStateLegacy)).(*IAutomationV21PlusCommonStateLegacy) + outstruct.Config = *abi.ConvertType(out[1], new(IAutomationV21PlusCommonOnchainConfigLegacy)).(*IAutomationV21PlusCommonOnchainConfigLegacy) outstruct.Signers = *abi.ConvertType(out[2], new([]common.Address)).(*[]common.Address) outstruct.Transmitters = *abi.ConvertType(out[3], new([]common.Address)).(*[]common.Address) outstruct.F = *abi.ConvertType(out[4], new(uint8)).(*uint8) @@ -834,25 +834,25 @@ func (_IKeeperRegistryMaster *IKeeperRegistryMasterCallerSession) GetTriggerType return _IKeeperRegistryMaster.Contract.GetTriggerType(&_IKeeperRegistryMaster.CallOpts, upkeepId) } -func (_IKeeperRegistryMaster *IKeeperRegistryMasterCaller) GetUpkeep(opts *bind.CallOpts, id *big.Int) (KeeperRegistryBase21UpkeepInfo, error) { +func (_IKeeperRegistryMaster *IKeeperRegistryMasterCaller) GetUpkeep(opts *bind.CallOpts, id *big.Int) (IAutomationV21PlusCommonUpkeepInfoLegacy, error) { var out []interface{} err := _IKeeperRegistryMaster.contract.Call(opts, &out, "getUpkeep", id) if err != nil { - return *new(KeeperRegistryBase21UpkeepInfo), err + return *new(IAutomationV21PlusCommonUpkeepInfoLegacy), err } - out0 := *abi.ConvertType(out[0], new(KeeperRegistryBase21UpkeepInfo)).(*KeeperRegistryBase21UpkeepInfo) + out0 := *abi.ConvertType(out[0], new(IAutomationV21PlusCommonUpkeepInfoLegacy)).(*IAutomationV21PlusCommonUpkeepInfoLegacy) return out0, err } -func (_IKeeperRegistryMaster *IKeeperRegistryMasterSession) GetUpkeep(id *big.Int) (KeeperRegistryBase21UpkeepInfo, error) { +func (_IKeeperRegistryMaster *IKeeperRegistryMasterSession) GetUpkeep(id *big.Int) (IAutomationV21PlusCommonUpkeepInfoLegacy, error) { return _IKeeperRegistryMaster.Contract.GetUpkeep(&_IKeeperRegistryMaster.CallOpts, id) } -func (_IKeeperRegistryMaster *IKeeperRegistryMasterCallerSession) GetUpkeep(id *big.Int) (KeeperRegistryBase21UpkeepInfo, error) { +func (_IKeeperRegistryMaster *IKeeperRegistryMasterCallerSession) GetUpkeep(id *big.Int) (IAutomationV21PlusCommonUpkeepInfoLegacy, error) { return _IKeeperRegistryMaster.Contract.GetUpkeep(&_IKeeperRegistryMaster.CallOpts, id) } @@ -1294,15 +1294,15 @@ func (_IKeeperRegistryMaster *IKeeperRegistryMasterTransactorSession) SetConfig( return _IKeeperRegistryMaster.Contract.SetConfig(&_IKeeperRegistryMaster.TransactOpts, signers, transmitters, f, onchainConfigBytes, offchainConfigVersion, offchainConfig) } -func (_IKeeperRegistryMaster *IKeeperRegistryMasterTransactor) SetConfigTypeSafe(opts *bind.TransactOpts, signers []common.Address, transmitters []common.Address, f uint8, onchainConfig KeeperRegistryBase21OnchainConfig, offchainConfigVersion uint64, offchainConfig []byte) (*types.Transaction, error) { +func (_IKeeperRegistryMaster *IKeeperRegistryMasterTransactor) SetConfigTypeSafe(opts *bind.TransactOpts, signers []common.Address, transmitters []common.Address, f uint8, onchainConfig IAutomationV21PlusCommonOnchainConfigLegacy, offchainConfigVersion uint64, offchainConfig []byte) (*types.Transaction, error) { return _IKeeperRegistryMaster.contract.Transact(opts, "setConfigTypeSafe", signers, transmitters, f, onchainConfig, offchainConfigVersion, offchainConfig) } -func (_IKeeperRegistryMaster *IKeeperRegistryMasterSession) SetConfigTypeSafe(signers []common.Address, transmitters []common.Address, f uint8, onchainConfig KeeperRegistryBase21OnchainConfig, offchainConfigVersion uint64, offchainConfig []byte) (*types.Transaction, error) { +func (_IKeeperRegistryMaster *IKeeperRegistryMasterSession) SetConfigTypeSafe(signers []common.Address, transmitters []common.Address, f uint8, onchainConfig IAutomationV21PlusCommonOnchainConfigLegacy, offchainConfigVersion uint64, offchainConfig []byte) (*types.Transaction, error) { return _IKeeperRegistryMaster.Contract.SetConfigTypeSafe(&_IKeeperRegistryMaster.TransactOpts, signers, transmitters, f, onchainConfig, offchainConfigVersion, offchainConfig) } -func (_IKeeperRegistryMaster *IKeeperRegistryMasterTransactorSession) SetConfigTypeSafe(signers []common.Address, transmitters []common.Address, f uint8, onchainConfig KeeperRegistryBase21OnchainConfig, offchainConfigVersion uint64, offchainConfig []byte) (*types.Transaction, error) { +func (_IKeeperRegistryMaster *IKeeperRegistryMasterTransactorSession) SetConfigTypeSafe(signers []common.Address, transmitters []common.Address, f uint8, onchainConfig IAutomationV21PlusCommonOnchainConfigLegacy, offchainConfigVersion uint64, offchainConfig []byte) (*types.Transaction, error) { return _IKeeperRegistryMaster.Contract.SetConfigTypeSafe(&_IKeeperRegistryMaster.TransactOpts, signers, transmitters, f, onchainConfig, offchainConfigVersion, offchainConfig) } @@ -5839,8 +5839,8 @@ type GetSignerInfo struct { Index uint8 } type GetState struct { - State KeeperRegistryBase21State - Config KeeperRegistryBase21OnchainConfig + State IAutomationV21PlusCommonStateLegacy + Config IAutomationV21PlusCommonOnchainConfigLegacy Signers []common.Address Transmitters []common.Address F uint8 @@ -6142,7 +6142,7 @@ type IKeeperRegistryMasterInterface interface { GetTriggerType(opts *bind.CallOpts, upkeepId *big.Int) (uint8, error) - GetUpkeep(opts *bind.CallOpts, id *big.Int) (KeeperRegistryBase21UpkeepInfo, error) + GetUpkeep(opts *bind.CallOpts, id *big.Int) (IAutomationV21PlusCommonUpkeepInfoLegacy, error) GetUpkeepPrivilegeConfig(opts *bind.CallOpts, upkeepId *big.Int) ([]byte, error) @@ -6202,7 +6202,7 @@ type IKeeperRegistryMasterInterface interface { SetConfig(opts *bind.TransactOpts, signers []common.Address, transmitters []common.Address, f uint8, onchainConfigBytes []byte, offchainConfigVersion uint64, offchainConfig []byte) (*types.Transaction, error) - SetConfigTypeSafe(opts *bind.TransactOpts, signers []common.Address, transmitters []common.Address, f uint8, onchainConfig KeeperRegistryBase21OnchainConfig, offchainConfigVersion uint64, offchainConfig []byte) (*types.Transaction, error) + SetConfigTypeSafe(opts *bind.TransactOpts, signers []common.Address, transmitters []common.Address, f uint8, onchainConfig IAutomationV21PlusCommonOnchainConfigLegacy, offchainConfigVersion uint64, offchainConfig []byte) (*types.Transaction, error) SetPayees(opts *bind.TransactOpts, payees []common.Address) (*types.Transaction, error) diff --git a/core/gethwrappers/generated/keeper_consumer_wrapper/keeper_consumer_wrapper.go b/core/gethwrappers/generated/keeper_consumer_wrapper/keeper_consumer_wrapper.go index feb614aa83b..c283db26bbd 100644 --- a/core/gethwrappers/generated/keeper_consumer_wrapper/keeper_consumer_wrapper.go +++ b/core/gethwrappers/generated/keeper_consumer_wrapper/keeper_consumer_wrapper.go @@ -30,7 +30,7 @@ var ( var KeeperConsumerMetaData = &bind.MetaData{ ABI: "[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"updateInterval\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"OnlySimulatedBackend\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"checkData\",\"type\":\"bytes\"}],\"name\":\"checkUpkeep\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"upkeepNeeded\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"performData\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"counter\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"interval\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastTimeStamp\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"performData\",\"type\":\"bytes\"}],\"name\":\"performUpkeep\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x60a060405234801561001057600080fd5b5060405161033838038061033883398101604081905261002f9161003f565b6080524260015560008055610058565b60006020828403121561005157600080fd5b5051919050565b6080516102c6610072600039600060cc01526102c66000f3fe608060405234801561001057600080fd5b50600436106100675760003560e01c806361bc221a1161005057806361bc221a1461009d5780636e04ff0d146100a6578063947a36fb146100c757600080fd5b80633f3b3b271461006c5780634585e33b14610088575b600080fd5b61007560015481565b6040519081526020015b60405180910390f35b61009b610096366004610191565b6100ee565b005b61007560005481565b6100b96100b4366004610191565b610103565b60405161007f929190610203565b6100757f000000000000000000000000000000000000000000000000000000000000000081565b6000546100fc906001610279565b6000555050565b6000606061010f610157565b6001848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250959a92995091975050505050505050565b321561018f576040517fb60ac5db00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b600080602083850312156101a457600080fd5b823567ffffffffffffffff808211156101bc57600080fd5b818501915085601f8301126101d057600080fd5b8135818111156101df57600080fd5b8660208285010111156101f157600080fd5b60209290920196919550909350505050565b821515815260006020604081840152835180604085015260005b818110156102395785810183015185820160600152820161021d565b5060006060828601015260607fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f830116850101925050509392505050565b808201808211156102b3577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b9291505056fea164736f6c6343000810000a", + Bin: "0x60a060405234801561001057600080fd5b5060405161035a38038061035a83398101604081905261002f9161003f565b6080524260015560008055610058565b60006020828403121561005157600080fd5b5051919050565b6080516102e8610072600039600060cc01526102e86000f3fe608060405234801561001057600080fd5b50600436106100675760003560e01c806361bc221a1161005057806361bc221a1461009d5780636e04ff0d146100a6578063947a36fb146100c757600080fd5b80633f3b3b271461006c5780634585e33b14610088575b600080fd5b61007560015481565b6040519081526020015b60405180910390f35b61009b6100963660046101b3565b6100ee565b005b61007560005481565b6100b96100b43660046101b3565b610103565b60405161007f929190610225565b6100757f000000000000000000000000000000000000000000000000000000000000000081565b6000546100fc90600161029b565b6000555050565b6000606061010f610157565b6001848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250959a92995091975050505050505050565b321580159061017a57503273111111111111111111111111111111111111111114155b156101b1576040517fb60ac5db00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b600080602083850312156101c657600080fd5b823567ffffffffffffffff808211156101de57600080fd5b818501915085601f8301126101f257600080fd5b81358181111561020157600080fd5b86602082850101111561021357600080fd5b60209290920196919550909350505050565b821515815260006020604081840152835180604085015260005b8181101561025b5785810183015185820160600152820161023f565b5060006060828601015260607fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f830116850101925050509392505050565b808201808211156102d5577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b9291505056fea164736f6c6343000810000a", } var KeeperConsumerABI = KeeperConsumerMetaData.ABI diff --git a/core/gethwrappers/generated/keeper_registry_logic_b_wrapper_2_1/keeper_registry_logic_b_wrapper_2_1.go b/core/gethwrappers/generated/keeper_registry_logic_b_wrapper_2_1/keeper_registry_logic_b_wrapper_2_1.go index 984d9221eb1..b4bbc09a744 100644 --- a/core/gethwrappers/generated/keeper_registry_logic_b_wrapper_2_1/keeper_registry_logic_b_wrapper_2_1.go +++ b/core/gethwrappers/generated/keeper_registry_logic_b_wrapper_2_1/keeper_registry_logic_b_wrapper_2_1.go @@ -30,7 +30,7 @@ var ( _ = abi.ConvertType ) -type KeeperRegistryBase21OnchainConfig struct { +type IAutomationV21PlusCommonOnchainConfigLegacy struct { PaymentPremiumPPB uint32 FlatFeeMicroLink uint32 CheckGasLimit uint32 @@ -48,7 +48,7 @@ type KeeperRegistryBase21OnchainConfig struct { UpkeepPrivilegeManager common.Address } -type KeeperRegistryBase21State struct { +type IAutomationV21PlusCommonStateLegacy struct { Nonce uint32 OwnerLinkBalance *big.Int ExpectedLinkBalance *big.Int @@ -61,7 +61,7 @@ type KeeperRegistryBase21State struct { Paused bool } -type KeeperRegistryBase21UpkeepInfo struct { +type IAutomationV21PlusCommonUpkeepInfoLegacy struct { Target common.Address PerformGas uint32 CheckData []byte @@ -75,7 +75,7 @@ type KeeperRegistryBase21UpkeepInfo struct { } var KeeperRegistryLogicBMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"enumKeeperRegistryBase2_1.Mode\",\"name\":\"mode\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"link\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"linkNativeFeed\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"fastGasFeed\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"automationForwarderLogic\",\"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\":[],\"name\":\"InsufficientFunds\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidDataLength\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidPayee\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidRecipient\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidReport\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidSigner\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTransmitter\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTrigger\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTriggerType\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MaxCheckDataSizeCanOnlyIncrease\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MaxPerformDataSizeCanOnlyIncrease\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MigrationNotPermitted\",\"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\":\"OnlyPausedUpkeep\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlySimulatedBackend\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyUnpausedUpkeep\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ParameterLengthError\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PaymentGreaterThanAllLINK\",\"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\":\"UpkeepAlreadyExists\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UpkeepCancelled\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UpkeepNotCanceled\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UpkeepNotNeeded\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ValueNotChanged\",\"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\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"trigger\",\"type\":\"bytes\"}],\"name\":\"CancelledUpkeepReport\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"dedupKey\",\"type\":\"bytes32\"}],\"name\":\"DedupKeyAdded\",\"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\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"OwnerFundsWithdrawn\",\"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\":\"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\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"transmitter\",\"type\":\"address\"}],\"name\":\"acceptPayeeship\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"acceptUpkeepAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"startIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxCount\",\"type\":\"uint256\"}],\"name\":\"getActiveUpkeepIDs\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"}],\"name\":\"getAdminPrivilegeConfig\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAutomationForwarderLogic\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"getBalance\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"balance\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCancellationDelay\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getConditionalGasOverhead\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getFastGasFeedAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepID\",\"type\":\"uint256\"}],\"name\":\"getForwarder\",\"outputs\":[{\"internalType\":\"contractIAutomationForwarder\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLinkAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLinkNativeFeedAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLogGasOverhead\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enumKeeperRegistryBase2_1.Trigger\",\"name\":\"triggerType\",\"type\":\"uint8\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"}],\"name\":\"getMaxPaymentForGas\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"maxPayment\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"getMinBalance\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"getMinBalanceForUpkeep\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"minBalance\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getMode\",\"outputs\":[{\"internalType\":\"enumKeeperRegistryBase2_1.Mode\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"peer\",\"type\":\"address\"}],\"name\":\"getPeerRegistryMigrationPermission\",\"outputs\":[{\"internalType\":\"enumKeeperRegistryBase2_1.MigrationPermission\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPerPerformByteGasOverhead\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPerSignerGasOverhead\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"query\",\"type\":\"address\"}],\"name\":\"getSignerInfo\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"active\",\"type\":\"bool\"},{\"internalType\":\"uint8\",\"name\":\"index\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getState\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"nonce\",\"type\":\"uint32\"},{\"internalType\":\"uint96\",\"name\":\"ownerLinkBalance\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"expectedLinkBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint96\",\"name\":\"totalPremium\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"numUpkeeps\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"configCount\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"latestConfigBlockNumber\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"latestConfigDigest\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"latestEpoch\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"}],\"internalType\":\"structKeeperRegistryBase2_1.State\",\"name\":\"state\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint32\",\"name\":\"paymentPremiumPPB\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"flatFeeMicroLink\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"checkGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint24\",\"name\":\"stalenessSeconds\",\"type\":\"uint24\"},{\"internalType\":\"uint16\",\"name\":\"gasCeilingMultiplier\",\"type\":\"uint16\"},{\"internalType\":\"uint96\",\"name\":\"minUpkeepSpend\",\"type\":\"uint96\"},{\"internalType\":\"uint32\",\"name\":\"maxPerformGas\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxCheckDataSize\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxPerformDataSize\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxRevertDataSize\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"fallbackGasPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fallbackLinkPrice\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"transcoder\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"registrars\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"upkeepPrivilegeManager\",\"type\":\"address\"}],\"internalType\":\"structKeeperRegistryBase2_1.OnchainConfig\",\"name\":\"config\",\"type\":\"tuple\"},{\"internalType\":\"address[]\",\"name\":\"signers\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"transmitters\",\"type\":\"address[]\"},{\"internalType\":\"uint8\",\"name\":\"f\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"query\",\"type\":\"address\"}],\"name\":\"getTransmitterInfo\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"active\",\"type\":\"bool\"},{\"internalType\":\"uint8\",\"name\":\"index\",\"type\":\"uint8\"},{\"internalType\":\"uint96\",\"name\":\"balance\",\"type\":\"uint96\"},{\"internalType\":\"uint96\",\"name\":\"lastCollected\",\"type\":\"uint96\"},{\"internalType\":\"address\",\"name\":\"payee\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"getTriggerType\",\"outputs\":[{\"internalType\":\"enumKeeperRegistryBase2_1.Trigger\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"getUpkeep\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"performGas\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"checkData\",\"type\":\"bytes\"},{\"internalType\":\"uint96\",\"name\":\"balance\",\"type\":\"uint96\"},{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"maxValidBlocknumber\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"lastPerformedBlockNumber\",\"type\":\"uint32\"},{\"internalType\":\"uint96\",\"name\":\"amountSpent\",\"type\":\"uint96\"},{\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"offchainConfig\",\"type\":\"bytes\"}],\"internalType\":\"structKeeperRegistryBase2_1.UpkeepInfo\",\"name\":\"upkeepInfo\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"getUpkeepPrivilegeConfig\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"getUpkeepTriggerConfig\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"dedupKey\",\"type\":\"bytes32\"}],\"name\":\"hasDedupKey\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"pauseUpkeep\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"recoverFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"newPrivilegeConfig\",\"type\":\"bytes\"}],\"name\":\"setAdminPrivilegeConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"payees\",\"type\":\"address[]\"}],\"name\":\"setPayees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"peer\",\"type\":\"address\"},{\"internalType\":\"enumKeeperRegistryBase2_1.MigrationPermission\",\"name\":\"permission\",\"type\":\"uint8\"}],\"name\":\"setPeerRegistryMigrationPermission\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"newCheckData\",\"type\":\"bytes\"}],\"name\":\"setUpkeepCheckData\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"}],\"name\":\"setUpkeepGasLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"}],\"name\":\"setUpkeepOffchainConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"newPrivilegeConfig\",\"type\":\"bytes\"}],\"name\":\"setUpkeepPrivilegeConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"transmitter\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"proposed\",\"type\":\"address\"}],\"name\":\"transferPayeeship\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"proposed\",\"type\":\"address\"}],\"name\":\"transferUpkeepAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"unpauseUpkeep\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"upkeepTranscoderVersion\",\"outputs\":[{\"internalType\":\"enumUpkeepFormat\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"upkeepVersion\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"withdrawFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"withdrawOwnerFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"withdrawPayment\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + ABI: "[{\"inputs\":[{\"internalType\":\"enumKeeperRegistryBase2_1.Mode\",\"name\":\"mode\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"link\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"linkNativeFeed\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"fastGasFeed\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"automationForwarderLogic\",\"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\":[],\"name\":\"InsufficientFunds\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidDataLength\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidPayee\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidRecipient\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidReport\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidSigner\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTransmitter\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTrigger\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTriggerType\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MaxCheckDataSizeCanOnlyIncrease\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MaxPerformDataSizeCanOnlyIncrease\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MigrationNotPermitted\",\"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\":\"OnlyPausedUpkeep\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlySimulatedBackend\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyUnpausedUpkeep\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ParameterLengthError\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PaymentGreaterThanAllLINK\",\"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\":\"UpkeepAlreadyExists\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UpkeepCancelled\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UpkeepNotCanceled\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UpkeepNotNeeded\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ValueNotChanged\",\"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\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"trigger\",\"type\":\"bytes\"}],\"name\":\"CancelledUpkeepReport\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"dedupKey\",\"type\":\"bytes32\"}],\"name\":\"DedupKeyAdded\",\"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\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"OwnerFundsWithdrawn\",\"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\":\"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\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"transmitter\",\"type\":\"address\"}],\"name\":\"acceptPayeeship\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"acceptUpkeepAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"startIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxCount\",\"type\":\"uint256\"}],\"name\":\"getActiveUpkeepIDs\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"}],\"name\":\"getAdminPrivilegeConfig\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAutomationForwarderLogic\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"getBalance\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"balance\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCancellationDelay\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getConditionalGasOverhead\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getFastGasFeedAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepID\",\"type\":\"uint256\"}],\"name\":\"getForwarder\",\"outputs\":[{\"internalType\":\"contractIAutomationForwarder\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLinkAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLinkNativeFeedAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLogGasOverhead\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enumKeeperRegistryBase2_1.Trigger\",\"name\":\"triggerType\",\"type\":\"uint8\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"}],\"name\":\"getMaxPaymentForGas\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"maxPayment\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"getMinBalance\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"getMinBalanceForUpkeep\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"minBalance\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getMode\",\"outputs\":[{\"internalType\":\"enumKeeperRegistryBase2_1.Mode\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"peer\",\"type\":\"address\"}],\"name\":\"getPeerRegistryMigrationPermission\",\"outputs\":[{\"internalType\":\"enumKeeperRegistryBase2_1.MigrationPermission\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPerPerformByteGasOverhead\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPerSignerGasOverhead\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"query\",\"type\":\"address\"}],\"name\":\"getSignerInfo\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"active\",\"type\":\"bool\"},{\"internalType\":\"uint8\",\"name\":\"index\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getState\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"nonce\",\"type\":\"uint32\"},{\"internalType\":\"uint96\",\"name\":\"ownerLinkBalance\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"expectedLinkBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint96\",\"name\":\"totalPremium\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"numUpkeeps\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"configCount\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"latestConfigBlockNumber\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"latestConfigDigest\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"latestEpoch\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"}],\"internalType\":\"structIAutomationV21PlusCommon.StateLegacy\",\"name\":\"state\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint32\",\"name\":\"paymentPremiumPPB\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"flatFeeMicroLink\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"checkGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint24\",\"name\":\"stalenessSeconds\",\"type\":\"uint24\"},{\"internalType\":\"uint16\",\"name\":\"gasCeilingMultiplier\",\"type\":\"uint16\"},{\"internalType\":\"uint96\",\"name\":\"minUpkeepSpend\",\"type\":\"uint96\"},{\"internalType\":\"uint32\",\"name\":\"maxPerformGas\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxCheckDataSize\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxPerformDataSize\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxRevertDataSize\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"fallbackGasPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fallbackLinkPrice\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"transcoder\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"registrars\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"upkeepPrivilegeManager\",\"type\":\"address\"}],\"internalType\":\"structIAutomationV21PlusCommon.OnchainConfigLegacy\",\"name\":\"config\",\"type\":\"tuple\"},{\"internalType\":\"address[]\",\"name\":\"signers\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"transmitters\",\"type\":\"address[]\"},{\"internalType\":\"uint8\",\"name\":\"f\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"query\",\"type\":\"address\"}],\"name\":\"getTransmitterInfo\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"active\",\"type\":\"bool\"},{\"internalType\":\"uint8\",\"name\":\"index\",\"type\":\"uint8\"},{\"internalType\":\"uint96\",\"name\":\"balance\",\"type\":\"uint96\"},{\"internalType\":\"uint96\",\"name\":\"lastCollected\",\"type\":\"uint96\"},{\"internalType\":\"address\",\"name\":\"payee\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"getTriggerType\",\"outputs\":[{\"internalType\":\"enumKeeperRegistryBase2_1.Trigger\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"getUpkeep\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"performGas\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"checkData\",\"type\":\"bytes\"},{\"internalType\":\"uint96\",\"name\":\"balance\",\"type\":\"uint96\"},{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"maxValidBlocknumber\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"lastPerformedBlockNumber\",\"type\":\"uint32\"},{\"internalType\":\"uint96\",\"name\":\"amountSpent\",\"type\":\"uint96\"},{\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"offchainConfig\",\"type\":\"bytes\"}],\"internalType\":\"structIAutomationV21PlusCommon.UpkeepInfoLegacy\",\"name\":\"upkeepInfo\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"getUpkeepPrivilegeConfig\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"getUpkeepTriggerConfig\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"dedupKey\",\"type\":\"bytes32\"}],\"name\":\"hasDedupKey\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"pauseUpkeep\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"recoverFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"newPrivilegeConfig\",\"type\":\"bytes\"}],\"name\":\"setAdminPrivilegeConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"payees\",\"type\":\"address[]\"}],\"name\":\"setPayees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"peer\",\"type\":\"address\"},{\"internalType\":\"enumKeeperRegistryBase2_1.MigrationPermission\",\"name\":\"permission\",\"type\":\"uint8\"}],\"name\":\"setPeerRegistryMigrationPermission\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"newCheckData\",\"type\":\"bytes\"}],\"name\":\"setUpkeepCheckData\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"}],\"name\":\"setUpkeepGasLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"}],\"name\":\"setUpkeepOffchainConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"newPrivilegeConfig\",\"type\":\"bytes\"}],\"name\":\"setUpkeepPrivilegeConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"transmitter\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"proposed\",\"type\":\"address\"}],\"name\":\"transferPayeeship\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"proposed\",\"type\":\"address\"}],\"name\":\"transferUpkeepAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"unpauseUpkeep\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"upkeepTranscoderVersion\",\"outputs\":[{\"internalType\":\"enumUpkeepFormat\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"upkeepVersion\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"withdrawFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"withdrawOwnerFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"withdrawPayment\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", Bin: "0x6101206040523480156200001257600080fd5b5060405162004fbc38038062004fbc8339810160408190526200003591620001e9565b84848484843380600081620000915760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000c457620000c48162000121565b505050846002811115620000dc57620000dc6200025e565b60e0816002811115620000f357620000f36200025e565b9052506001600160a01b0393841660805291831660a052821660c05216610100525062000274945050505050565b336001600160a01b038216036200017b5760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000088565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b80516001600160a01b0381168114620001e457600080fd5b919050565b600080600080600060a086880312156200020257600080fd5b8551600381106200021257600080fd5b94506200022260208701620001cc565b93506200023260408701620001cc565b92506200024260608701620001cc565b91506200025260808701620001cc565b90509295509295909350565b634e487b7160e01b600052602160045260246000fd5b60805160a05160c05160e05161010051614cbd620002ff600039600061058701526000818161052501528181613352015281816138d50152613a680152600081816105f4015261314601526000818161071c01526132200152600081816107aa01528181611bab01528181611e81015281816122ee0152818161280101526128850152614cbd6000f3fe608060405234801561001057600080fd5b50600436106103365760003560e01c806379ba5097116101b2578063b121e147116100f9578063ca30e603116100a2578063eb5dcd6c1161007c578063eb5dcd6c146107f4578063ed56b3e114610807578063f2fde38b1461087a578063faa3e9961461088d57600080fd5b8063ca30e603146107a8578063cd7f71b5146107ce578063d7632648146107e157600080fd5b8063b657bc9c116100d3578063b657bc9c1461076d578063b79550be14610780578063c7c3a19a1461078857600080fd5b8063b121e14714610740578063b148ab6b14610753578063b6511a2a1461076657600080fd5b80638dcf0fe71161015b578063aab9edd611610135578063aab9edd614610703578063abc76ae014610712578063b10b673c1461071a57600080fd5b80638dcf0fe7146106ca578063a710b221146106dd578063a72aa27e146106f057600080fd5b80638456cb591161018c5780638456cb59146106915780638765ecbe146106995780638da5cb5b146106ac57600080fd5b806379ba50971461063e57806379ea9943146106465780637d9b97e01461068957600080fd5b8063421d183b116102815780635165f2f51161022a5780636209e1e9116102045780636209e1e9146105df5780636709d0e5146105f2578063671d36ed14610618578063744bfe611461062b57600080fd5b80635165f2f5146105725780635425d8ac146105855780635b6aa71c146105cc57600080fd5b80634b4fd03b1161025b5780634b4fd03b146105235780634ca16c52146105495780635147cd591461055257600080fd5b8063421d183b1461047a57806344cb70b8146104e057806348013d7b1461051357600080fd5b80631a2af011116102e3578063232c1cc5116102bd578063232c1cc5146104585780633b9cce591461045f5780633f4ba83a1461047257600080fd5b80631a2af011146103d45780631e010439146103e7578063207b65161461044557600080fd5b80631865c57d116103145780631865c57d14610388578063187256e8146103a157806319d97a94146103b457600080fd5b8063050ee65d1461033b57806306e3b632146103535780630b7d33e614610373575b600080fd5b6201adb05b6040519081526020015b60405180910390f35b610366610361366004613df3565b6108d3565b60405161034a9190613e15565b610386610381366004613ea2565b6109f0565b005b610390610aaa565b60405161034a9594939291906140a5565b6103866103af3660046141dc565b610ec3565b6103c76103c2366004614219565b610f34565b60405161034a91906142a0565b6103866103e23660046142b3565b610fd6565b6104286103f5366004614219565b6000908152600460205260409020600101546c0100000000000000000000000090046bffffffffffffffffffffffff1690565b6040516bffffffffffffffffffffffff909116815260200161034a565b6103c7610453366004614219565b6110dc565b6014610340565b61038661046d3660046142d8565b6110f9565b61038661134f565b61048d61048836600461434d565b6113b5565b60408051951515865260ff90941660208601526bffffffffffffffffffffffff9283169385019390935216606083015273ffffffffffffffffffffffffffffffffffffffff16608082015260a00161034a565b6105036104ee366004614219565b60009081526008602052604090205460ff1690565b604051901515815260200161034a565b60005b60405161034a91906143a9565b7f0000000000000000000000000000000000000000000000000000000000000000610516565b62015f90610340565b610565610560366004614219565b6114e8565b60405161034a91906143bc565b610386610580366004614219565b6114f3565b7f00000000000000000000000000000000000000000000000000000000000000005b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161034a565b6104286105da3660046143e9565b61166a565b6103c76105ed36600461434d565b61179c565b7f00000000000000000000000000000000000000000000000000000000000000006105a7565b610386610626366004614422565b6117d0565b6103866106393660046142b3565b6118aa565b610386611ca7565b6105a7610654366004614219565b6000908152600460205260409020546901000000000000000000900473ffffffffffffffffffffffffffffffffffffffff1690565b610386611da9565b610386611f04565b6103866106a7366004614219565b611f75565b60005473ffffffffffffffffffffffffffffffffffffffff166105a7565b6103866106d8366004613ea2565b6120ef565b6103866106eb36600461445e565b612144565b6103866106fe36600461448c565b6123c0565b6040516003815260200161034a565b611d4c610340565b7f00000000000000000000000000000000000000000000000000000000000000006105a7565b61038661074e36600461434d565b6124b5565b610386610761366004614219565b6125ad565b6032610340565b61042861077b366004614219565b61279b565b6103866127c8565b61079b610796366004614219565b612924565b60405161034a91906144af565b7f00000000000000000000000000000000000000000000000000000000000000006105a7565b6103866107dc366004613ea2565b612cf7565b6104286107ef366004614219565b612d8e565b61038661080236600461445e565b612d99565b61086161081536600461434d565b73ffffffffffffffffffffffffffffffffffffffff166000908152600c602090815260409182902082518084019093525460ff8082161515808552610100909204169290910182905291565b60408051921515835260ff90911660208301520161034a565b61038661088836600461434d565b612ef7565b6108c661089b36600461434d565b73ffffffffffffffffffffffffffffffffffffffff1660009081526019602052604090205460ff1690565b60405161034a91906145e6565b606060006108e16002612f0b565b905080841061091c576040517f1390f2a100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006109288486614629565b905081811180610936575083155b6109405780610942565b815b90506000610950868361463c565b67ffffffffffffffff8111156109685761096861464f565b604051908082528060200260200182016040528015610991578160200160208202803683370190505b50905060005b81518110156109e4576109b56109ad8883614629565b600290612f15565b8282815181106109c7576109c761467e565b6020908102919091010152806109dc816146ad565b915050610997565b50925050505b92915050565b6015546c01000000000000000000000000900473ffffffffffffffffffffffffffffffffffffffff163314610a51576040517f77c3599200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000838152601c60205260409020610a6a828483614787565b50827f2fd8d70753a007014349d4591843cc031c2dd7a260d7dd82eca8253686ae77698383604051610a9d9291906148a2565b60405180910390a2505050565b6040805161014081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e081018290526101008101829052610120810191909152604080516101e08101825260008082526020820181905291810182905260608082018390526080820183905260a0820183905260c0820183905260e08201839052610100820183905261012082018390526101408201839052610160820183905261018082018390526101a08201526101c0810191909152604080516101408101825260145463ffffffff7401000000000000000000000000000000000000000082041682526bffffffffffffffffffffffff908116602083015260185492820192909252601254700100000000000000000000000000000000900490911660608281019190915290819060009060808101610bf76002612f0b565b81526014547801000000000000000000000000000000000000000000000000810463ffffffff9081166020808501919091527c0100000000000000000000000000000000000000000000000000000000808404831660408087019190915260115460608088019190915260125492830485166080808901919091526e010000000000000000000000000000840460ff16151560a09889015282516101e081018452610100808604881682526501000000000086048816968201969096526c010000000000000000000000008089048816948201949094526901000000000000000000850462ffffff16928101929092529282900461ffff16928101929092526013546bffffffffffffffffffffffff811696830196909652700100000000000000000000000000000000909404831660c082015260155480841660e0830152640100000000810484169282019290925268010000000000000000909104909116610120820152601654610140820152601754610160820152910473ffffffffffffffffffffffffffffffffffffffff166101808201529095506101a08101610d9f6009612f28565b81526015546c01000000000000000000000000900473ffffffffffffffffffffffffffffffffffffffff16602091820152601254600d80546040805182860281018601909152818152949850899489949293600e9360ff909116928591830182828015610e4257602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311610e17575b5050505050925081805480602002602001604051908101604052809291908181526020018280548015610eab57602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311610e80575b50505050509150945094509450945094509091929394565b610ecb612f35565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260196020526040902080548291907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001836003811115610f2b57610f2b61436a565b02179055505050565b6000818152601c60205260409020805460609190610f51906146e5565b80601f0160208091040260200160405190810160405280929190818152602001828054610f7d906146e5565b8015610fca5780601f10610f9f57610100808354040283529160200191610fca565b820191906000526020600020905b815481529060010190602001808311610fad57829003601f168201915b50505050509050919050565b610fdf82612fb8565b3373ffffffffffffffffffffffffffffffffffffffff82160361102e576040517f8c8728c700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526006602052604090205473ffffffffffffffffffffffffffffffffffffffff8281169116146110d85760008281526006602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff851690811790915590519091339185917fb1cbb2c4b8480034c27e06da5f096b8233a8fd4497028593a41ff6df79726b3591a45b5050565b6000818152601a60205260409020805460609190610f51906146e5565b611101612f35565b600e54811461113c576040517fcf54c06a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b600e5481101561130e576000600e828154811061115e5761115e61467e565b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff908116808452600f909252604083205491935016908585858181106111a8576111a861467e565b90506020020160208101906111bd919061434d565b905073ffffffffffffffffffffffffffffffffffffffff81161580611250575073ffffffffffffffffffffffffffffffffffffffff82161580159061122e57508073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b8015611250575073ffffffffffffffffffffffffffffffffffffffff81811614155b15611287576040517fb387a23800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff818116146112f85773ffffffffffffffffffffffffffffffffffffffff8381166000908152600f6020526040902080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169183169190911790555b5050508080611306906146ad565b91505061113f565b507fa46de38886467c59be07a0675f14781206a5477d871628af46c2443822fcb725600e8383604051611343939291906148ef565b60405180910390a15050565b611357612f35565b601280547fffffffffffffffffffffffffffffffffff00ffffffffffffffffffffffffffff1690556040513381527f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa906020015b60405180910390a1565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600b602090815260408083208151608081018352905460ff80821615801584526101008304909116948301949094526bffffffffffffffffffffffff6201000082048116938301939093526e01000000000000000000000000000090049091166060820152829182918291829190829061148f57606082015160125460009161147b9170010000000000000000000000000000000090046bffffffffffffffffffffffff166149a1565b600e5490915061148b90826149f5565b9150505b8151602083015160408401516114a6908490614a20565b6060949094015173ffffffffffffffffffffffffffffffffffffffff9a8b166000908152600f6020526040902054929b919a9499509750921694509092505050565b60006109ea8261306c565b6114fc81612fb8565b600081815260046020908152604091829020825160e081018452815460ff8116151580835263ffffffff610100830481169584019590955265010000000000820485169583019590955273ffffffffffffffffffffffffffffffffffffffff69010000000000000000009091041660608201526001909101546bffffffffffffffffffffffff80821660808401526c0100000000000000000000000082041660a08301527801000000000000000000000000000000000000000000000000900490911660c0820152906115fb576040517f1b88a78400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082815260046020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905561163a600283613117565b5060405182907f7bada562044eb163f6b4003c4553e4e62825344c0418eea087bed5ee05a4745690600090a25050565b604080516101208101825260125460ff808216835263ffffffff6101008084048216602086015265010000000000840482169585019590955262ffffff6901000000000000000000840416606085015261ffff6c0100000000000000000000000084041660808501526e01000000000000000000000000000083048216151560a08501526f010000000000000000000000000000008304909116151560c08401526bffffffffffffffffffffffff70010000000000000000000000000000000083041660e08401527c01000000000000000000000000000000000000000000000000000000009091041691810191909152600090818061176983613123565b91509150611792838787601360020160049054906101000a900463ffffffff1686866000613301565b9695505050505050565b73ffffffffffffffffffffffffffffffffffffffff81166000908152601d60205260409020805460609190610f51906146e5565b6015546c01000000000000000000000000900473ffffffffffffffffffffffffffffffffffffffff163314611831576040517f77c3599200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff83166000908152601d60205260409020611861828483614787565b508273ffffffffffffffffffffffffffffffffffffffff167f7c44b4eb59ee7873514e7e43e7718c269d872965938b288aa143befca62f99d28383604051610a9d9291906148a2565b6012546f01000000000000000000000000000000900460ff16156118fa576040517f37ed32e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b601280547fffffffffffffffffffffffffffffffff00ffffffffffffffffffffffffffffff166f0100000000000000000000000000000017905573ffffffffffffffffffffffffffffffffffffffff8116611981576040517f9c8d2cd200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000828152600460209081526040808320815160e081018352815460ff81161515825263ffffffff610100820481168387015265010000000000820481168386015273ffffffffffffffffffffffffffffffffffffffff6901000000000000000000909204821660608401526001909301546bffffffffffffffffffffffff80821660808501526c0100000000000000000000000082041660a08401527801000000000000000000000000000000000000000000000000900490921660c082015286855260059093529220549091163314611a88576040517fa47c170600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611a9061334c565b816040015163ffffffff161115611ad3576040517fff84e5dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000838152600460205260409020600101546018546c010000000000000000000000009091046bffffffffffffffffffffffff1690611b1390829061463c565b60185560008481526004602081905260409182902060010180547fffffffffffffffff000000000000000000000000ffffffffffffffffffffffff16905590517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff858116928201929092526bffffffffffffffffffffffff831660248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016020604051808303816000875af1158015611bf6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c1a9190614a45565b50604080516bffffffffffffffffffffffff8316815273ffffffffffffffffffffffffffffffffffffffff8516602082015285917ff3b5906e5672f3e524854103bcafbbdba80dbdfeca2c35e116127b1060a68318910160405180910390a25050601280547fffffffffffffffffffffffffffffffff00ffffffffffffffffffffffffffffff1690555050565b60015473ffffffffffffffffffffffffffffffffffffffff163314611d2d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e65720000000000000000000060448201526064015b60405180910390fd5b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b611db1612f35565b6014546018546bffffffffffffffffffffffff90911690611dd390829061463c565b601855601480547fffffffffffffffffffffffffffffffffffffffff0000000000000000000000001690556040516bffffffffffffffffffffffff821681527f1d07d0b0be43d3e5fee41a80b579af370affee03fa595bf56d5d4c19328162f19060200160405180910390a16040517fa9059cbb0000000000000000000000000000000000000000000000000000000081523360048201526bffffffffffffffffffffffff821660248201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063a9059cbb906044015b6020604051808303816000875af1158015611ee0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110d89190614a45565b611f0c612f35565b601280547fffffffffffffffffffffffffffffffffff00ffffffffffffffffffffffffffff166e0100000000000000000000000000001790556040513381527f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258906020016113ab565b611f7e81612fb8565b600081815260046020908152604091829020825160e081018452815460ff8116158015835263ffffffff610100830481169584019590955265010000000000820485169583019590955273ffffffffffffffffffffffffffffffffffffffff69010000000000000000009091041660608201526001909101546bffffffffffffffffffffffff80821660808401526c0100000000000000000000000082041660a08301527801000000000000000000000000000000000000000000000000900490911660c08201529061207d576040517f514b6c2400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082815260046020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790556120bf600283613401565b5060405182907f8ab10247ce168c27748e656ecf852b951fcaac790c18106b19aa0ae57a8b741f90600090a25050565b6120f883612fb8565b6000838152601b60205260409020612111828483614787565b50827f3e8740446213c8a77d40e08f79136ce3f347d13ed270a6ebdf57159e0faf48508383604051610a9d9291906148a2565b73ffffffffffffffffffffffffffffffffffffffff8116612191576040517f9c8d2cd200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8281166000908152600f60205260409020541633146121f1576040517fcebf515b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b601254600e5460009161222891859170010000000000000000000000000000000090046bffffffffffffffffffffffff169061340d565b73ffffffffffffffffffffffffffffffffffffffff84166000908152600b6020526040902080547fffffffffffffffffffffffffffffffffffff000000000000000000000000ffff169055601854909150612292906bffffffffffffffffffffffff83169061463c565b6018556040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83811660048301526bffffffffffffffffffffffff831660248301527f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb906044016020604051808303816000875af1158015612337573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061235b9190614a45565b5060405133815273ffffffffffffffffffffffffffffffffffffffff808416916bffffffffffffffffffffffff8416918616907f9819093176a1851202c7bcfa46845809b4e47c261866550e94ed3775d2f406989060200160405180910390a4505050565b6108fc8163ffffffff1610806123f5575060145463ffffffff7001000000000000000000000000000000009091048116908216115b1561242c576040517f14c237fb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61243582612fb8565b60008281526004602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000ff1661010063ffffffff861690810291909117909155915191825283917fc24c07e655ce79fba8a589778987d3c015bc6af1632bb20cf9182e02a65d972c910160405180910390a25050565b73ffffffffffffffffffffffffffffffffffffffff818116600090815260106020526040902054163314612515576040517f6752e7aa00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8181166000818152600f602090815260408083208054337fffffffffffffffffffffffff000000000000000000000000000000000000000080831682179093556010909452828520805490921690915590519416939092849290917f78af32efdcad432315431e9b03d27e6cd98fb79c405fdc5af7c1714d9c0f75b39190a45050565b600081815260046020908152604091829020825160e081018452815460ff81161515825263ffffffff6101008204811694830194909452650100000000008104841694820185905273ffffffffffffffffffffffffffffffffffffffff69010000000000000000009091041660608201526001909101546bffffffffffffffffffffffff80821660808401526c0100000000000000000000000082041660a083015278010000000000000000000000000000000000000000000000009004821660c082015291146126aa576040517f9c0083a200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526006602052604090205473ffffffffffffffffffffffffffffffffffffffff163314612707576040517f6352a85300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526005602090815260408083208054337fffffffffffffffffffffffff0000000000000000000000000000000000000000808316821790935560069094528285208054909216909155905173ffffffffffffffffffffffffffffffffffffffff90911692839186917f5cff4db96bef051785e999f44bfcd21c18823e034fb92dd376e3db4ce0feeb2c91a4505050565b60006109ea6127a98361306c565b600084815260046020526040902054610100900463ffffffff1661166a565b6127d0612f35565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906370a0823190602401602060405180830381865afa15801561285d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128819190614a67565b90507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33601854846128ce919061463c565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815273ffffffffffffffffffffffffffffffffffffffff90921660048301526024820152604401611ec1565b604080516101408101825260008082526020820181905260609282018390528282018190526080820181905260a0820181905260c0820181905260e082018190526101008201526101208101919091526000828152600460209081526040808320815160e081018352815460ff811615158252610100810463ffffffff90811695830195909552650100000000008104851693820193909352690100000000000000000090920473ffffffffffffffffffffffffffffffffffffffff16606083018190526001909101546bffffffffffffffffffffffff80821660808501526c0100000000000000000000000082041660a08401527801000000000000000000000000000000000000000000000000900490921660c0820152919015612abc57816060015173ffffffffffffffffffffffffffffffffffffffff1663f00e6a2a6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612a93573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ab79190614a80565b612abf565b60005b90506040518061014001604052808273ffffffffffffffffffffffffffffffffffffffff168152602001836020015163ffffffff168152602001600760008781526020019081526020016000208054612b17906146e5565b80601f0160208091040260200160405190810160405280929190818152602001828054612b43906146e5565b8015612b905780601f10612b6557610100808354040283529160200191612b90565b820191906000526020600020905b815481529060010190602001808311612b7357829003601f168201915b505050505081526020018360a001516bffffffffffffffffffffffff1681526020016005600087815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001836040015163ffffffff1667ffffffffffffffff1681526020018360c0015163ffffffff16815260200183608001516bffffffffffffffffffffffff168152602001836000015115158152602001601b60008781526020019081526020016000208054612c6d906146e5565b80601f0160208091040260200160405190810160405280929190818152602001828054612c99906146e5565b8015612ce65780601f10612cbb57610100808354040283529160200191612ce6565b820191906000526020600020905b815481529060010190602001808311612cc957829003601f168201915b505050505081525092505050919050565b612d0083612fb8565b60155463ffffffff16811115612d42576040517fae7235df00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000838152600760205260409020612d5b828483614787565b50827fcba2d5723b2ee59e53a8e8a82a4a7caf4fdfe70e9f7c582950bf7e7a5c24e83d8383604051610a9d9291906148a2565b60006109ea8261279b565b73ffffffffffffffffffffffffffffffffffffffff8281166000908152600f6020526040902054163314612df9576040517fcebf515b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff821603612e48576040517f8c8728c700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8281166000908152601060205260409020548116908216146110d85773ffffffffffffffffffffffffffffffffffffffff82811660008181526010602052604080822080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169486169485179055513392917f84f7c7c80bb8ed2279b4aab5f61cd05e6374073d38f46d7f32de8c30e9e3836791a45050565b612eff612f35565b612f0881613615565b50565b60006109ea825490565b6000612f21838361370a565b9392505050565b60606000612f2183613734565b60005473ffffffffffffffffffffffffffffffffffffffff163314612fb6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e6572000000000000000000006044820152606401611d24565b565b60008181526005602052604090205473ffffffffffffffffffffffffffffffffffffffff163314613015576040517fa47c170600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008181526004602052604090205465010000000000900463ffffffff90811614612f08576040517f9c0083a200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000818160045b600f8110156130f9577fff0000000000000000000000000000000000000000000000000000000000000082168382602081106130b1576130b161467e565b1a60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916146130e757506000949350505050565b806130f1816146ad565b915050613073565b5081600f1a600181111561310f5761310f61436a565b949350505050565b6000612f21838361378f565b6000806000836060015162ffffff1690506000808263ffffffff161190506000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa1580156131af573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906131d39190614ab7565b50945090925050506000811315806131ea57508142105b8061320b575082801561320b5750613202824261463c565b8463ffffffff16105b1561321a57601654955061321e565b8095505b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015613289573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906132ad9190614ab7565b50945090925050506000811315806132c457508142105b806132e557508280156132e557506132dc824261463c565b8463ffffffff16105b156132f45760175494506132f8565b8094505b50505050915091565b60008061331388878b600001516137de565b905060008061332e8b8a63ffffffff16858a8a60018b6138a0565b909250905061333d8183614a20565b9b9a5050505050505050505050565b600060017f000000000000000000000000000000000000000000000000000000000000000060028111156133825761338261436a565b036133fc57606473ffffffffffffffffffffffffffffffffffffffff1663a3b1b31d6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156133d3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906133f79190614a67565b905090565b504390565b6000612f218383613cf9565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600b602090815260408083208151608081018352905460ff80821615801584526101008304909116948301949094526bffffffffffffffffffffffff6201000082048116938301939093526e01000000000000000000000000000090049091166060820152906136095760008160600151856134a591906149a1565b905060006134b385836149f5565b905080836040018181516134c79190614a20565b6bffffffffffffffffffffffff169052506134e28582614b07565b836060018181516134f39190614a20565b6bffffffffffffffffffffffff90811690915273ffffffffffffffffffffffffffffffffffffffff89166000908152600b602090815260409182902087518154928901519389015160608a015186166e010000000000000000000000000000027fffffffffffff000000000000000000000000ffffffffffffffffffffffffffff919096166201000002167fffffffffffff000000000000000000000000000000000000000000000000ffff60ff95909516610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff921515929092167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000909416939093171792909216179190911790555050505b60400151949350505050565b3373ffffffffffffffffffffffffffffffffffffffff821603613694576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401611d24565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b60008260000182815481106137215761372161467e565b9060005260206000200154905092915050565b606081600001805480602002602001604051908101604052809291908181526020018280548015610fca57602002820191906000526020600020905b8154815260200190600101908083116137705750505050509050919050565b60008181526001830160205260408120546137d6575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556109ea565b5060006109ea565b600080808560018111156137f4576137f461436a565b03613803575062015f90613858565b60018560018111156138175761381761436a565b0361382657506201adb0613858565b6040517ff2b2d41200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61386963ffffffff85166014614b3b565b613874846001614b78565b6138839060ff16611d4c614b3b565b61388d9083614629565b6138979190614629565b95945050505050565b6000806000896080015161ffff16876138b99190614b3b565b90508380156138c75750803a105b156138cf57503a5b600060027f000000000000000000000000000000000000000000000000000000000000000060028111156139055761390561436a565b03613a6457604080516000815260208101909152851561396357600036604051806080016040528060488152602001614c696048913960405160200161394d93929190614b91565b60405160208183030381529060405290506139cb565b60155461397f90640100000000900463ffffffff166004614bb8565b63ffffffff1667ffffffffffffffff81111561399d5761399d61464f565b6040519080825280601f01601f1916602001820160405280156139c7576020820181803683370190505b5090505b6040517f49948e0e00000000000000000000000000000000000000000000000000000000815273420000000000000000000000000000000000000f906349948e0e90613a1b9084906004016142a0565b602060405180830381865afa158015613a38573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613a5c9190614a67565b915050613bbe565b60017f00000000000000000000000000000000000000000000000000000000000000006002811115613a9857613a9861436a565b03613bbe578415613b1a57606c73ffffffffffffffffffffffffffffffffffffffff1663c6f7de0e6040518163ffffffff1660e01b8152600401602060405180830381865afa158015613aef573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613b139190614a67565b9050613bbe565b6000606c73ffffffffffffffffffffffffffffffffffffffff166341b247a86040518163ffffffff1660e01b815260040160c060405180830381865afa158015613b68573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613b8c9190614bdb565b5050601554929450613baf93505050640100000000900463ffffffff1682614b3b565b613bba906010614b3b565b9150505b84613bda57808b6080015161ffff16613bd79190614b3b565b90505b613be861ffff871682614c25565b905060008782613bf88c8e614629565b613c029086614b3b565b613c0c9190614629565b613c1e90670de0b6b3a7640000614b3b565b613c289190614c25565b905060008c6040015163ffffffff1664e8d4a51000613c479190614b3b565b898e6020015163ffffffff16858f88613c609190614b3b565b613c6a9190614629565b613c7890633b9aca00614b3b565b613c829190614b3b565b613c8c9190614c25565b613c969190614629565b90506b033b2e3c9fd0803ce8000000613caf8284614629565b1115613ce7576040517f2ad7547a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b909c909b509950505050505050505050565b60008181526001830160205260408120548015613de2576000613d1d60018361463c565b8554909150600090613d319060019061463c565b9050818114613d96576000866000018281548110613d5157613d5161467e565b9060005260206000200154905080876000018481548110613d7457613d7461467e565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080613da757613da7614c39565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506109ea565b60009150506109ea565b5092915050565b60008060408385031215613e0657600080fd5b50508035926020909101359150565b6020808252825182820181905260009190848201906040850190845b81811015613e4d57835183529284019291840191600101613e31565b50909695505050505050565b60008083601f840112613e6b57600080fd5b50813567ffffffffffffffff811115613e8357600080fd5b602083019150836020828501011115613e9b57600080fd5b9250929050565b600080600060408486031215613eb757600080fd5b83359250602084013567ffffffffffffffff811115613ed557600080fd5b613ee186828701613e59565b9497909650939450505050565b600081518084526020808501945080840160005b83811015613f3457815173ffffffffffffffffffffffffffffffffffffffff1687529582019590820190600101613f02565b509495945050505050565b805163ffffffff16825260006101e06020830151613f65602086018263ffffffff169052565b506040830151613f7d604086018263ffffffff169052565b506060830151613f94606086018262ffffff169052565b506080830151613faa608086018261ffff169052565b5060a0830151613fca60a08601826bffffffffffffffffffffffff169052565b5060c0830151613fe260c086018263ffffffff169052565b5060e0830151613ffa60e086018263ffffffff169052565b506101008381015163ffffffff908116918601919091526101208085015190911690850152610140808401519085015261016080840151908501526101808084015173ffffffffffffffffffffffffffffffffffffffff16908501526101a08084015181860183905261406f83870182613eee565b925050506101c08084015161409b8287018273ffffffffffffffffffffffffffffffffffffffff169052565b5090949350505050565b855163ffffffff16815260006101c060208801516140d360208501826bffffffffffffffffffffffff169052565b506040880151604084015260608801516140fd60608501826bffffffffffffffffffffffff169052565b506080880151608084015260a088015161411f60a085018263ffffffff169052565b5060c088015161413760c085018263ffffffff169052565b5060e088015160e08401526101008089015161415a8286018263ffffffff169052565b505061012088810151151590840152610140830181905261417d81840188613f3f565b90508281036101608401526141928187613eee565b90508281036101808401526141a78186613eee565b9150506117926101a083018460ff169052565b73ffffffffffffffffffffffffffffffffffffffff81168114612f0857600080fd5b600080604083850312156141ef57600080fd5b82356141fa816141ba565b915060208301356004811061420e57600080fd5b809150509250929050565b60006020828403121561422b57600080fd5b5035919050565b60005b8381101561424d578181015183820152602001614235565b50506000910152565b6000815180845261426e816020860160208601614232565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000612f216020830184614256565b600080604083850312156142c657600080fd5b82359150602083013561420e816141ba565b600080602083850312156142eb57600080fd5b823567ffffffffffffffff8082111561430357600080fd5b818501915085601f83011261431757600080fd5b81358181111561432657600080fd5b8660208260051b850101111561433b57600080fd5b60209290920196919550909350505050565b60006020828403121561435f57600080fd5b8135612f21816141ba565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60038110612f0857612f0861436a565b602081016143b683614399565b91905290565b60208101600283106143b6576143b661436a565b803563ffffffff811681146143e457600080fd5b919050565b600080604083850312156143fc57600080fd5b82356002811061440b57600080fd5b9150614419602084016143d0565b90509250929050565b60008060006040848603121561443757600080fd5b8335614442816141ba565b9250602084013567ffffffffffffffff811115613ed557600080fd5b6000806040838503121561447157600080fd5b823561447c816141ba565b9150602083013561420e816141ba565b6000806040838503121561449f57600080fd5b82359150614419602084016143d0565b602081526144d660208201835173ffffffffffffffffffffffffffffffffffffffff169052565b600060208301516144ef604084018263ffffffff169052565b50604083015161014080606085015261450c610160850183614256565b9150606085015161452d60808601826bffffffffffffffffffffffff169052565b50608085015173ffffffffffffffffffffffffffffffffffffffff811660a08601525060a085015167ffffffffffffffff811660c08601525060c085015163ffffffff811660e08601525060e0850151610100614599818701836bffffffffffffffffffffffff169052565b86015190506101206145ae8682018315159052565b8601518584037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0018387015290506117928382614256565b60208101600483106143b6576143b661436a565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b808201808211156109ea576109ea6145fa565b818103818111156109ea576109ea6145fa565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036146de576146de6145fa565b5060010190565b600181811c908216806146f957607f821691505b602082108103614732577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b601f82111561478257600081815260208120601f850160051c8101602086101561475f5750805b601f850160051c820191505b8181101561477e5782815560010161476b565b5050505b505050565b67ffffffffffffffff83111561479f5761479f61464f565b6147b3836147ad83546146e5565b83614738565b6000601f84116001811461480557600085156147cf5750838201355b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b1c1916600186901b17835561489b565b6000838152602090207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0861690835b828110156148545786850135825560209485019460019092019101614834565b508682101561488f577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b60208152816020820152818360408301376000818301604090810191909152601f9092017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0160101919050565b6000604082016040835280865480835260608501915087600052602092508260002060005b8281101561494657815473ffffffffffffffffffffffffffffffffffffffff1684529284019260019182019101614914565b505050838103828501528481528590820160005b8681101561499557823561496d816141ba565b73ffffffffffffffffffffffffffffffffffffffff168252918301919083019060010161495a565b50979650505050505050565b6bffffffffffffffffffffffff828116828216039080821115613dec57613dec6145fa565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60006bffffffffffffffffffffffff80841680614a1457614a146149c6565b92169190910492915050565b6bffffffffffffffffffffffff818116838216019080821115613dec57613dec6145fa565b600060208284031215614a5757600080fd5b81518015158114612f2157600080fd5b600060208284031215614a7957600080fd5b5051919050565b600060208284031215614a9257600080fd5b8151612f21816141ba565b805169ffffffffffffffffffff811681146143e457600080fd5b600080600080600060a08688031215614acf57600080fd5b614ad886614a9d565b9450602086015193506040860151925060608601519150614afb60808701614a9d565b90509295509295909350565b60006bffffffffffffffffffffffff80831681851681830481118215151615614b3257614b326145fa565b02949350505050565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615614b7357614b736145fa565b500290565b60ff81811683821601908111156109ea576109ea6145fa565b828482376000838201600081528351614bae818360208801614232565b0195945050505050565b600063ffffffff80831681851681830481118215151615614b3257614b326145fa565b60008060008060008060c08789031215614bf457600080fd5b865195506020870151945060408701519350606087015192506080870151915060a087015190509295509295509295565b600082614c3457614c346149c6565b500490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfe307866666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666a164736f6c6343000810000a", } @@ -652,8 +652,8 @@ func (_KeeperRegistryLogicB *KeeperRegistryLogicBCaller) GetState(opts *bind.Cal return *outstruct, err } - outstruct.State = *abi.ConvertType(out[0], new(KeeperRegistryBase21State)).(*KeeperRegistryBase21State) - outstruct.Config = *abi.ConvertType(out[1], new(KeeperRegistryBase21OnchainConfig)).(*KeeperRegistryBase21OnchainConfig) + outstruct.State = *abi.ConvertType(out[0], new(IAutomationV21PlusCommonStateLegacy)).(*IAutomationV21PlusCommonStateLegacy) + outstruct.Config = *abi.ConvertType(out[1], new(IAutomationV21PlusCommonOnchainConfigLegacy)).(*IAutomationV21PlusCommonOnchainConfigLegacy) outstruct.Signers = *abi.ConvertType(out[2], new([]common.Address)).(*[]common.Address) outstruct.Transmitters = *abi.ConvertType(out[3], new([]common.Address)).(*[]common.Address) outstruct.F = *abi.ConvertType(out[4], new(uint8)).(*uint8) @@ -729,25 +729,25 @@ func (_KeeperRegistryLogicB *KeeperRegistryLogicBCallerSession) GetTriggerType(u return _KeeperRegistryLogicB.Contract.GetTriggerType(&_KeeperRegistryLogicB.CallOpts, upkeepId) } -func (_KeeperRegistryLogicB *KeeperRegistryLogicBCaller) GetUpkeep(opts *bind.CallOpts, id *big.Int) (KeeperRegistryBase21UpkeepInfo, error) { +func (_KeeperRegistryLogicB *KeeperRegistryLogicBCaller) GetUpkeep(opts *bind.CallOpts, id *big.Int) (IAutomationV21PlusCommonUpkeepInfoLegacy, error) { var out []interface{} err := _KeeperRegistryLogicB.contract.Call(opts, &out, "getUpkeep", id) if err != nil { - return *new(KeeperRegistryBase21UpkeepInfo), err + return *new(IAutomationV21PlusCommonUpkeepInfoLegacy), err } - out0 := *abi.ConvertType(out[0], new(KeeperRegistryBase21UpkeepInfo)).(*KeeperRegistryBase21UpkeepInfo) + out0 := *abi.ConvertType(out[0], new(IAutomationV21PlusCommonUpkeepInfoLegacy)).(*IAutomationV21PlusCommonUpkeepInfoLegacy) return out0, err } -func (_KeeperRegistryLogicB *KeeperRegistryLogicBSession) GetUpkeep(id *big.Int) (KeeperRegistryBase21UpkeepInfo, error) { +func (_KeeperRegistryLogicB *KeeperRegistryLogicBSession) GetUpkeep(id *big.Int) (IAutomationV21PlusCommonUpkeepInfoLegacy, error) { return _KeeperRegistryLogicB.Contract.GetUpkeep(&_KeeperRegistryLogicB.CallOpts, id) } -func (_KeeperRegistryLogicB *KeeperRegistryLogicBCallerSession) GetUpkeep(id *big.Int) (KeeperRegistryBase21UpkeepInfo, error) { +func (_KeeperRegistryLogicB *KeeperRegistryLogicBCallerSession) GetUpkeep(id *big.Int) (IAutomationV21PlusCommonUpkeepInfoLegacy, error) { return _KeeperRegistryLogicB.Contract.GetUpkeep(&_KeeperRegistryLogicB.CallOpts, id) } @@ -5197,8 +5197,8 @@ type GetSignerInfo struct { Index uint8 } type GetState struct { - State KeeperRegistryBase21State - Config KeeperRegistryBase21OnchainConfig + State IAutomationV21PlusCommonStateLegacy + Config IAutomationV21PlusCommonOnchainConfigLegacy Signers []common.Address Transmitters []common.Address F uint8 @@ -5460,7 +5460,7 @@ type KeeperRegistryLogicBInterface interface { GetTriggerType(opts *bind.CallOpts, upkeepId *big.Int) (uint8, error) - GetUpkeep(opts *bind.CallOpts, id *big.Int) (KeeperRegistryBase21UpkeepInfo, error) + GetUpkeep(opts *bind.CallOpts, id *big.Int) (IAutomationV21PlusCommonUpkeepInfoLegacy, error) GetUpkeepPrivilegeConfig(opts *bind.CallOpts, upkeepId *big.Int) ([]byte, error) diff --git a/core/gethwrappers/generated/keeper_registry_wrapper1_2/keeper_registry_wrapper1_2.go b/core/gethwrappers/generated/keeper_registry_wrapper1_2/keeper_registry_wrapper1_2.go index 6fa0d55b78d..027bfc274e2 100644 --- a/core/gethwrappers/generated/keeper_registry_wrapper1_2/keeper_registry_wrapper1_2.go +++ b/core/gethwrappers/generated/keeper_registry_wrapper1_2/keeper_registry_wrapper1_2.go @@ -54,7 +54,7 @@ type State struct { var KeeperRegistryMetaData = &bind.MetaData{ ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"link\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"linkEthFeed\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"fastGasFeed\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint32\",\"name\":\"paymentPremiumPPB\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"flatFeeMicroLink\",\"type\":\"uint32\"},{\"internalType\":\"uint24\",\"name\":\"blockCountPerTurn\",\"type\":\"uint24\"},{\"internalType\":\"uint32\",\"name\":\"checkGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint24\",\"name\":\"stalenessSeconds\",\"type\":\"uint24\"},{\"internalType\":\"uint16\",\"name\":\"gasCeilingMultiplier\",\"type\":\"uint16\"},{\"internalType\":\"uint96\",\"name\":\"minUpkeepSpend\",\"type\":\"uint96\"},{\"internalType\":\"uint32\",\"name\":\"maxPerformGas\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"fallbackGasPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fallbackLinkPrice\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"transcoder\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"registrar\",\"type\":\"address\"}],\"internalType\":\"structConfig\",\"name\":\"config\",\"type\":\"tuple\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"ArrayHasNoEntries\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CannotCancel\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DuplicateEntry\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"GasLimitCanOnlyIncrease\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"GasLimitOutsideRange\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"IndexOutOfRange\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficientFunds\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidDataLength\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidPayee\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidRecipient\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"KeepersMustTakeTurns\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MigrationNotPermitted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotAContract\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyActiveKeepers\",\"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\":\"OnlyCallableByProposedPayee\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlySimulatedBackend\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ParameterLengthError\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PaymentGreaterThanAllLINK\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"reason\",\"type\":\"bytes\"}],\"name\":\"TargetCheckReverted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TranscoderNotSet\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UpkeepNotActive\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UpkeepNotCanceled\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UpkeepNotNeeded\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ValueNotChanged\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"paymentPremiumPPB\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"flatFeeMicroLink\",\"type\":\"uint32\"},{\"internalType\":\"uint24\",\"name\":\"blockCountPerTurn\",\"type\":\"uint24\"},{\"internalType\":\"uint32\",\"name\":\"checkGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint24\",\"name\":\"stalenessSeconds\",\"type\":\"uint24\"},{\"internalType\":\"uint16\",\"name\":\"gasCeilingMultiplier\",\"type\":\"uint16\"},{\"internalType\":\"uint96\",\"name\":\"minUpkeepSpend\",\"type\":\"uint96\"},{\"internalType\":\"uint32\",\"name\":\"maxPerformGas\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"fallbackGasPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fallbackLinkPrice\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"transcoder\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"registrar\",\"type\":\"address\"}],\"indexed\":false,\"internalType\":\"structConfig\",\"name\":\"config\",\"type\":\"tuple\"}],\"name\":\"ConfigSet\",\"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\":false,\"internalType\":\"address[]\",\"name\":\"keepers\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"payees\",\"type\":\"address[]\"}],\"name\":\"KeepersUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"OwnerFundsWithdrawn\",\"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\":true,\"internalType\":\"address\",\"name\":\"keeper\",\"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\":\"keeper\",\"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\":\"keeper\",\"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\":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\":\"uint64\",\"name\":\"atBlockHeight\",\"type\":\"uint64\"}],\"name\":\"UpkeepCanceled\",\"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\":true,\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"payment\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"performData\",\"type\":\"bytes\"}],\"name\":\"UpkeepPerformed\",\"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\":\"executeGas\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"}],\"name\":\"UpkeepRegistered\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"FAST_GAS_FEED\",\"outputs\":[{\"internalType\":\"contractAggregatorV3Interface\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"LINK\",\"outputs\":[{\"internalType\":\"contractLinkTokenInterface\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"LINK_ETH_FEED\",\"outputs\":[{\"internalType\":\"contractAggregatorV3Interface\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"keeper\",\"type\":\"address\"}],\"name\":\"acceptPayeeship\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"addFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"cancelUpkeep\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"}],\"name\":\"checkUpkeep\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"performData\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"maxLinkPayment\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"adjustedGasWei\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"linkEth\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"startIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxCount\",\"type\":\"uint256\"}],\"name\":\"getActiveUpkeepIDs\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"query\",\"type\":\"address\"}],\"name\":\"getKeeperInfo\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"payee\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"active\",\"type\":\"bool\"},{\"internalType\":\"uint96\",\"name\":\"balance\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"}],\"name\":\"getMaxPaymentForGas\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"maxPayment\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"getMinBalanceForUpkeep\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"minBalance\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"peer\",\"type\":\"address\"}],\"name\":\"getPeerRegistryMigrationPermission\",\"outputs\":[{\"internalType\":\"enumKeeperRegistry1_2.MigrationPermission\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getState\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"nonce\",\"type\":\"uint32\"},{\"internalType\":\"uint96\",\"name\":\"ownerLinkBalance\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"expectedLinkBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"numUpkeeps\",\"type\":\"uint256\"}],\"internalType\":\"structState\",\"name\":\"state\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint32\",\"name\":\"paymentPremiumPPB\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"flatFeeMicroLink\",\"type\":\"uint32\"},{\"internalType\":\"uint24\",\"name\":\"blockCountPerTurn\",\"type\":\"uint24\"},{\"internalType\":\"uint32\",\"name\":\"checkGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint24\",\"name\":\"stalenessSeconds\",\"type\":\"uint24\"},{\"internalType\":\"uint16\",\"name\":\"gasCeilingMultiplier\",\"type\":\"uint16\"},{\"internalType\":\"uint96\",\"name\":\"minUpkeepSpend\",\"type\":\"uint96\"},{\"internalType\":\"uint32\",\"name\":\"maxPerformGas\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"fallbackGasPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fallbackLinkPrice\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"transcoder\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"registrar\",\"type\":\"address\"}],\"internalType\":\"structConfig\",\"name\":\"config\",\"type\":\"tuple\"},{\"internalType\":\"address[]\",\"name\":\"keepers\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"getUpkeep\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"executeGas\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"checkData\",\"type\":\"bytes\"},{\"internalType\":\"uint96\",\"name\":\"balance\",\"type\":\"uint96\"},{\"internalType\":\"address\",\"name\":\"lastKeeper\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"maxValidBlocknumber\",\"type\":\"uint64\"},{\"internalType\":\"uint96\",\"name\":\"amountSpent\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\"},{\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"}],\"name\":\"migrateUpkeeps\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"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\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"performData\",\"type\":\"bytes\"}],\"name\":\"performUpkeep\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"encodedUpkeeps\",\"type\":\"bytes\"}],\"name\":\"receiveUpkeeps\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"recoverFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"checkData\",\"type\":\"bytes\"}],\"name\":\"registerUpkeep\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"paymentPremiumPPB\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"flatFeeMicroLink\",\"type\":\"uint32\"},{\"internalType\":\"uint24\",\"name\":\"blockCountPerTurn\",\"type\":\"uint24\"},{\"internalType\":\"uint32\",\"name\":\"checkGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint24\",\"name\":\"stalenessSeconds\",\"type\":\"uint24\"},{\"internalType\":\"uint16\",\"name\":\"gasCeilingMultiplier\",\"type\":\"uint16\"},{\"internalType\":\"uint96\",\"name\":\"minUpkeepSpend\",\"type\":\"uint96\"},{\"internalType\":\"uint32\",\"name\":\"maxPerformGas\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"fallbackGasPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fallbackLinkPrice\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"transcoder\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"registrar\",\"type\":\"address\"}],\"internalType\":\"structConfig\",\"name\":\"config\",\"type\":\"tuple\"}],\"name\":\"setConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"keepers\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"payees\",\"type\":\"address[]\"}],\"name\":\"setKeepers\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"peer\",\"type\":\"address\"},{\"internalType\":\"enumKeeperRegistry1_2.MigrationPermission\",\"name\":\"permission\",\"type\":\"uint8\"}],\"name\":\"setPeerRegistryMigrationPermission\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"}],\"name\":\"setUpkeepGasLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"keeper\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"proposed\",\"type\":\"address\"}],\"name\":\"transferPayeeship\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"typeAndVersion\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"upkeepTranscoderVersion\",\"outputs\":[{\"internalType\":\"enumUpkeepFormat\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"withdrawFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"withdrawOwnerFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"withdrawPayment\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x60e06040523480156200001157600080fd5b50604051620066f2380380620066f2833981016040819052620000349162000577565b33806000816200008b5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000be57620000be8162000107565b50506001600255506003805460ff191690556001600160601b0319606085811b821660805284811b821660a05283901b1660c052620000fd81620001b3565b50505050620007fa565b6001600160a01b038116331415620001625760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000082565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b620001bd620004a8565b600d5460e082015163ffffffff91821691161015620001ef57604051630e6af04160e21b815260040160405180910390fd5b604051806101200160405280826000015163ffffffff168152602001826020015163ffffffff168152602001826040015162ffffff168152602001826060015163ffffffff168152602001826080015162ffffff1681526020018260a0015161ffff1681526020018260c001516001600160601b031681526020018260e0015163ffffffff168152602001600c60010160049054906101000a900463ffffffff1663ffffffff16815250600c60008201518160000160006101000a81548163ffffffff021916908363ffffffff16021790555060208201518160000160046101000a81548163ffffffff021916908363ffffffff16021790555060408201518160000160086101000a81548162ffffff021916908362ffffff160217905550606082015181600001600b6101000a81548163ffffffff021916908363ffffffff160217905550608082015181600001600f6101000a81548162ffffff021916908362ffffff16021790555060a08201518160000160126101000a81548161ffff021916908361ffff16021790555060c08201518160000160146101000a8154816001600160601b0302191690836001600160601b0316021790555060e08201518160010160006101000a81548163ffffffff021916908363ffffffff1602179055506101008201518160010160046101000a81548163ffffffff021916908363ffffffff160217905550905050806101000151600e81905550806101200151600f81905550806101400151601260006101000a8154816001600160a01b0302191690836001600160a01b03160217905550806101600151601360006101000a8154816001600160a01b0302191690836001600160a01b031602179055507ffe125a41957477226ba20f85ef30a4024ea3bb8d066521ddc16df3f2944de325816040516200049d9190620006c3565b60405180910390a150565b6000546001600160a01b03163314620005045760405162461bcd60e51b815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e657200000000000000000000604482015260640162000082565b565b80516001600160a01b03811681146200051e57600080fd5b919050565b805161ffff811681146200051e57600080fd5b805162ffffff811681146200051e57600080fd5b805163ffffffff811681146200051e57600080fd5b80516001600160601b03811681146200051e57600080fd5b6000806000808486036101e08112156200059057600080fd5b6200059b8662000506565b9450620005ab6020870162000506565b9350620005bb6040870162000506565b925061018080605f1983011215620005d257600080fd5b620005dc620007c2565b9150620005ec606088016200054a565b8252620005fc608088016200054a565b60208301526200060f60a0880162000536565b60408301526200062260c088016200054a565b60608301526200063560e0880162000536565b60808301526101006200064a81890162000523565b60a08401526101206200065f818a016200055f565b60c085015261014062000674818b016200054a565b60e0860152610160808b015184870152848b0151838701526200069b6101a08c0162000506565b82870152620006ae6101c08c0162000506565b90860152509699959850939650909450505050565b815163ffffffff16815261018081016020830151620006ea602084018263ffffffff169052565b50604083015162000702604084018262ffffff169052565b5060608301516200071b606084018263ffffffff169052565b50608083015162000733608084018262ffffff169052565b5060a08301516200074a60a084018261ffff169052565b5060c08301516200076660c08401826001600160601b03169052565b5060e08301516200077f60e084018263ffffffff169052565b5061010083810151908301526101208084015190830152610140808401516001600160a01b03908116918401919091526101609384015116929091019190915290565b60405161018081016001600160401b0381118282101715620007f457634e487b7160e01b600052604160045260246000fd5b60405290565b60805160601c60a05160601c60c05160601c615e7962000879600039600081816104240152614126015260008181610575015261420701526000818161030401528181610e10015281816110d10152818161192201528181611cad01528181611da1015281816121990152818161251701526125aa0152615e796000f3fe608060405234801561001057600080fd5b506004361061025c5760003560e01c806393f0c1fc11610145578063b7fdb436116100bd578063da5c67411161008c578063ef47a0ce11610071578063ef47a0ce1461066a578063f2fde38b1461067d578063faa3e9961461069057600080fd5b8063da5c674114610636578063eb5dcd6c1461065757600080fd5b8063b7fdb436146105c5578063c41b813a146105d8578063c7c3a19a146105fc578063c80480221461062357600080fd5b8063a72aa27e11610114578063b121e147116100f9578063b121e14714610597578063b657bc9c146105aa578063b79550be146105bd57600080fd5b8063a72aa27e1461055d578063ad1783611461057057600080fd5b806393f0c1fc146104f4578063948108f714610524578063a4c0ed3614610537578063a710b2211461054a57600080fd5b80635c975abb116101d85780637d9b97e0116101a757806385c1b0ba1161018c57806385c1b0ba146104b05780638da5cb5b146104c35780638e86139b146104e157600080fd5b80637d9b97e0146104a05780638456cb59146104a857600080fd5b80635c975abb1461045b578063744bfe611461047257806379ba5097146104855780637bbaf1ea1461048d57600080fd5b80631b6b6d231161022f5780633f4ba83a116102145780633f4ba83a146104175780634584a4191461041f57806348013d7b1461044657600080fd5b80631b6b6d23146102ff5780631e12b8a51461034b57600080fd5b806306e3b63214610261578063181f5a771461028a5780631865c57d146102d3578063187256e8146102ea575b600080fd5b61027461026f3660046152fd565b6106d6565b60405161028191906157fb565b60405180910390f35b6102c66040518060400160405280601481526020017f4b6565706572526567697374727920312e322e3000000000000000000000000081525081565b604051610281919061583f565b6102db6107d2565b604051610281939291906159cc565b6102fd6102f8366004614dda565b610a8a565b005b6103267f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610281565b6103d7610359366004614d8c565b73ffffffffffffffffffffffffffffffffffffffff90811660009081526008602090815260409182902082516060810184528154948516808252740100000000000000000000000000000000000000009095046bffffffffffffffffffffffff1692810183905260019091015460ff16151592018290529192909190565b6040805173ffffffffffffffffffffffffffffffffffffffff909416845291151560208401526bffffffffffffffffffffffff1690820152606001610281565b6102fd610afb565b6103267f000000000000000000000000000000000000000000000000000000000000000081565b61044e600081565b6040516102819190615982565b60035460ff165b6040519015158152602001610281565b6102fd61048036600461528e565b610b0d565b6102fd610e99565b61046261049b3660046152b1565b610f9b565b6102fd610ff9565b6102fd611167565b6102fd6104be366004614f45565b611177565b60005473ffffffffffffffffffffffffffffffffffffffff16610326565b6102fd6104ef3660046150e6565b611953565b61050761050236600461525c565b611b53565b6040516bffffffffffffffffffffffff9091168152602001610281565b6102fd610532366004615342565b611b87565b6102fd610545366004614e15565b611d89565b6102fd610558366004614da7565b611f84565b6102fd61056b36600461531f565b61221e565b6103267f000000000000000000000000000000000000000000000000000000000000000081565b6102fd6105a5366004614d8c565b6123c5565b6105076105b836600461525c565b6124bd565b6102fd6124de565b6102fd6105d3366004614ee5565b612649565b6105eb6105e636600461528e565b6129aa565b604051610281959493929190615852565b61060f61060a36600461525c565b612c5f565b6040516102819897969594939291906155f1565b6102fd61063136600461525c565b612dea565b610649610644366004614e6f565b612fe0565b604051908152602001610281565b6102fd610665366004614da7565b6131d7565b6102fd61067836600461517e565b613336565b6102fd61068b366004614d8c565b613682565b6106c961069e366004614d8c565b73ffffffffffffffffffffffffffffffffffffffff166000908152600b602052604090205460ff1690565b6040516102819190615968565b606060006106e46005613696565b905080841061071f576040517f1390f2a100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b826107315761072e8482615c60565b92505b60008367ffffffffffffffff81111561074c5761074c615e3d565b604051908082528060200260200182016040528015610775578160200160208202803683370190505b50905060005b848110156107c7576107986107908288615ba0565b6005906136a0565b8282815181106107aa576107aa615e0e565b6020908102919091010152806107bf81615d24565b91505061077b565b509150505b92915050565b6040805160808101825260008082526020820181905291810182905260608101919091526040805161018081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e081018290526101008101829052610120810182905261014081018290526101608101919091526040805161012081018252600c5463ffffffff8082168352640100000000808304821660208086019190915262ffffff6801000000000000000085048116868801526b010000000000000000000000850484166060878101919091526f010000000000000000000000000000008604909116608087015261ffff720100000000000000000000000000000000000086041660a08701526bffffffffffffffffffffffff74010000000000000000000000000000000000000000909504851660c0870152600d5480851660e0880152929092049092166101008501819052875260105490921690860152601154928501929092526109546005613696565b606080860191909152815163ffffffff908116855260208084015182168187015260408085015162ffffff90811682890152858501518416948801949094526080808601519094169387019390935260a08085015161ffff169087015260c0808501516bffffffffffffffffffffffff169087015260e08085015190921691860191909152600e54610100860152600f5461012086015260125473ffffffffffffffffffffffffffffffffffffffff90811661014087015260135416610160860152600480548351818402810184019094528084528793879390918391830182828015610a7757602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311610a4c575b5050505050905093509350935050909192565b610a926136b3565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600b6020526040902080548291907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001836003811115610af257610af2615db0565b02179055505050565b610b036136b3565b610b0b613734565b565b8073ffffffffffffffffffffffffffffffffffffffff8116610b5b576040517f9c8d2cd200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008381526007602052604090206002015483906c01000000000000000000000000900473ffffffffffffffffffffffffffffffffffffffff163314610bcd576040517fa47c170600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000848152600760205260409020600101544364010000000090910467ffffffffffffffff161115610c2b576040517fff84e5dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600c54600085815260076020526040812080546002909101546bffffffffffffffffffffffff740100000000000000000000000000000000000000009094048416939182169291169083821015610caf57610c868285615c77565b9050826bffffffffffffffffffffffff16816bffffffffffffffffffffffff161115610caf5750815b6000610cbb8285615c77565b60008a815260076020526040902080547fffffffffffffffffffffffffffffffffffffffff000000000000000000000000169055601054909150610d0e9083906bffffffffffffffffffffffff16615bb8565b601080547fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166bffffffffffffffffffffffff928316179055601154610d5691831690615c60565b601155604080516bffffffffffffffffffffffff8316815273ffffffffffffffffffffffffffffffffffffffff8a1660208201528a917ff3b5906e5672f3e524854103bcafbbdba80dbdfeca2c35e116127b1060a68318910160405180910390a26040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff89811660048301526bffffffffffffffffffffffff831660248301527f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb906044015b602060405180830381600087803b158015610e5557600080fd5b505af1158015610e69573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e8d919061507d565b50505050505050505050565b60015473ffffffffffffffffffffffffffffffffffffffff163314610f1f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e65720000000000000000000060448201526064015b60405180910390fd5b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b6000610fa56137b1565b610ff1610fec338686868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506001925061381e915050565b613918565b949350505050565b6110016136b3565b6010546011546bffffffffffffffffffffffff90911690611023908290615c60565b601155601080547fffffffffffffffffffffffffffffffffffffffff0000000000000000000000001690556040516bffffffffffffffffffffffff821681527f1d07d0b0be43d3e5fee41a80b579af370affee03fa595bf56d5d4c19328162f19060200160405180910390a16040517fa9059cbb0000000000000000000000000000000000000000000000000000000081523360048201526bffffffffffffffffffffffff821660248201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063a9059cbb906044015b602060405180830381600087803b15801561112b57600080fd5b505af115801561113f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611163919061507d565b5050565b61116f6136b3565b610b0b613d39565b600173ffffffffffffffffffffffffffffffffffffffff82166000908152600b602052604090205460ff1660038111156111b3576111b3615db0565b141580156111fb5750600373ffffffffffffffffffffffffffffffffffffffff82166000908152600b602052604090205460ff1660038111156111f8576111f8615db0565b14155b15611232576040517f0ebeec3c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60125473ffffffffffffffffffffffffffffffffffffffff16611281576040517fd12d7d8d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b816112b8576040517f2c2fc94100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805160e081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c081018290526000808567ffffffffffffffff81111561130c5761130c615e3d565b60405190808252806020026020018201604052801561133f57816020015b606081526020019060019003908161132a5790505b50905060008667ffffffffffffffff81111561135d5761135d615e3d565b6040519080825280602002602001820160405280156113e257816020015b6040805160e08101825260008082526020808301829052928201819052606082018190526080820181905260a0820181905260c082015282527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90920191018161137b5790505b50905060005b878110156116e25788888281811061140257611402615e0e565b60209081029290920135600081815260078452604090819020815160e08101835281546bffffffffffffffffffffffff808216835273ffffffffffffffffffffffffffffffffffffffff6c0100000000000000000000000092839004811698840198909852600184015463ffffffff81169584019590955267ffffffffffffffff6401000000008604166060840152938190048716608083015260029092015492831660a0820152910490931660c084018190529098509196505033146114f5576040517fa47c170600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606085015167ffffffffffffffff9081161461153d576040517fd096219c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8482828151811061155057611550615e0e565b6020026020010181905250600a6000878152602001908152602001600020805461157990615cd0565b80601f01602080910402602001604051908101604052809291908181526020018280546115a590615cd0565b80156115f25780601f106115c7576101008083540402835291602001916115f2565b820191906000526020600020905b8154815290600101906020018083116115d557829003601f168201915b505050505083828151811061160957611609615e0e565b6020908102919091010152845161162e906bffffffffffffffffffffffff1685615ba0565b600087815260076020908152604080832083815560018101849055600201839055600a909152812091955061166391906148f8565b61166e600587613d94565b508451604080516bffffffffffffffffffffffff909216825273ffffffffffffffffffffffffffffffffffffffff8916602083015287917fb38647142fbb1ea4c000fc4569b37a4e9a9f6313317b84ee3e5326c1a6cd06ff910160405180910390a2806116da81615d24565b9150506113e8565b50826011546116f19190615c60565b60115560405160009061170e908a908a90859087906020016156ad565b60405160208183030381529060405290508673ffffffffffffffffffffffffffffffffffffffff16638e86139b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c71249ab60008b73ffffffffffffffffffffffffffffffffffffffff166348013d7b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156117c157600080fd5b505afa1580156117d5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117f9919061515d565b866040518463ffffffff1660e01b815260040161181893929190615990565b60006040518083038186803b15801561183057600080fd5b505afa158015611844573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820160405261188a9190810190615128565b6040518263ffffffff1660e01b81526004016118a6919061583f565b600060405180830381600087803b1580156118c057600080fd5b505af11580156118d4573d6000803e3d6000fd5b50506040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8a81166004830152602482018890527f000000000000000000000000000000000000000000000000000000000000000016925063a9059cbb9150604401610e3b565b6002336000908152600b602052604090205460ff16600381111561197957611979615db0565b141580156119ab57506003336000908152600b602052604090205460ff1660038111156119a8576119a8615db0565b14155b156119e2576040517f0ebeec3c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080806119f284860186614f99565b92509250925060005b8351811015611b4b57611ab8848281518110611a1957611a19615e0e565b6020026020010151848381518110611a3357611a33615e0e565b602002602001015160800151858481518110611a5157611a51615e0e565b602002602001015160400151868581518110611a6f57611a6f615e0e565b602002602001015160c00151878681518110611a8d57611a8d615e0e565b602002602001015160000151878781518110611aab57611aab615e0e565b6020026020010151613da0565b838181518110611aca57611aca615e0e565b60200260200101517f74931a144e43a50694897f241d973aecb5024c0e910f9bb80a163ea3c1cf5a71848381518110611b0557611b05615e0e565b60209081029190910181015151604080516bffffffffffffffffffffffff909216825233928201929092520160405180910390a280611b4381615d24565b9150506119fb565b505050505050565b6000806000611b606140f3565b915091506000611b718360006142ee565b9050611b7e858284614333565b95945050505050565b6000828152600760205260409020600101548290640100000000900467ffffffffffffffff90811614611be6576040517fd096219c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600083815260076020526040902054611c0e9083906bffffffffffffffffffffffff16615bb8565b600084815260076020526040902080547fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166bffffffffffffffffffffffff928316179055601154611c6291841690615ba0565b6011556040517f23b872dd0000000000000000000000000000000000000000000000000000000081523360048201523060248201526bffffffffffffffffffffffff831660448201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906323b872dd90606401602060405180830381600087803b158015611d0657600080fd5b505af1158015611d1a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d3e919061507d565b506040516bffffffffffffffffffffffff83168152339084907fafd24114486da8ebfc32f3626dada8863652e187461aa74d4bfa7348915062039060200160405180910390a3505050565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614611df8576040517fc8bad78d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60208114611e32576040517fdfe9309000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000611e408284018461525c565b600081815260076020526040902060010154909150640100000000900467ffffffffffffffff90811614611ea0576040517fd096219c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600081815260076020526040902054611ec89085906bffffffffffffffffffffffff16615bb8565b600082815260076020526040902080547fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166bffffffffffffffffffffffff92909216919091179055601154611f1f908590615ba0565b6011556040516bffffffffffffffffffffffff8516815273ffffffffffffffffffffffffffffffffffffffff86169082907fafd24114486da8ebfc32f3626dada8863652e187461aa74d4bfa7348915062039060200160405180910390a35050505050565b8073ffffffffffffffffffffffffffffffffffffffff8116611fd2576040517f9c8d2cd200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff83811660009081526008602090815260409182902082516060810184528154948516808252740100000000000000000000000000000000000000009095046bffffffffffffffffffffffff16928101929092526001015460ff16151591810191909152903314612083576040517fcebf515b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff808516600090815260086020908152604090912080549092169091558101516011546120d2916bffffffffffffffffffffffff1690615c60565b60115560208082015160405133815273ffffffffffffffffffffffffffffffffffffffff808716936bffffffffffffffffffffffff90931692908816917f9819093176a1851202c7bcfa46845809b4e47c261866550e94ed3775d2f40698910160405180910390a460208101516040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85811660048301526bffffffffffffffffffffffff90921660248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb90604401602060405180830381600087803b1580156121df57600080fd5b505af11580156121f3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612217919061507d565b5050505050565b6000828152600760205260409020600101548290640100000000900467ffffffffffffffff9081161461227d576040517fd096219c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008381526007602052604090206002015483906c01000000000000000000000000900473ffffffffffffffffffffffffffffffffffffffff1633146122ef576040517fa47c170600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6108fc8363ffffffff1610806123105750600d5463ffffffff908116908416115b15612347576040517f14c237fb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008481526007602090815260409182902060010180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001663ffffffff8716908117909155915191825285917fc24c07e655ce79fba8a589778987d3c015bc6af1632bb20cf9182e02a65d972c910160405180910390a250505050565b73ffffffffffffffffffffffffffffffffffffffff818116600090815260096020526040902054163314612425576040517f6752e7aa00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff81811660008181526008602090815260408083208054337fffffffffffffffffffffffff000000000000000000000000000000000000000080831682179093556009909452828520805490921690915590519416939092849290917f78af32efdcad432315431e9b03d27e6cd98fb79c405fdc5af7c1714d9c0f75b39190a45050565b6000818152600760205260408120600101546107cc9063ffffffff16611b53565b6124e66136b3565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906370a082319060240160206040518083038186803b15801561256e57600080fd5b505afa158015612582573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125a69190615275565b90507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33601154846125f39190615c60565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815273ffffffffffffffffffffffffffffffffffffffff90921660048301526024820152604401611111565b6126516136b3565b82811415806126605750600283105b15612697576040517fcf54c06a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b600454811015612723576000600482815481106126b9576126b9615e0e565b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff168252600890526040902060010180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055508061271b81615d24565b91505061269a565b5060005b8381101561295957600085858381811061274357612743615e0e565b90506020020160208101906127589190614d8c565b73ffffffffffffffffffffffffffffffffffffffff80821660009081526008602052604081208054939450929091169086868681811061279a5761279a615e0e565b90506020020160208101906127af9190614d8c565b905073ffffffffffffffffffffffffffffffffffffffff81161580612842575073ffffffffffffffffffffffffffffffffffffffff82161580159061282057508073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b8015612842575073ffffffffffffffffffffffffffffffffffffffff81811614155b15612879576040517fb387a23800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600183015460ff16156128b8576040517f357d0cc400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600183810180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016909117905573ffffffffffffffffffffffffffffffffffffffff818116146129425782547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff82161783555b50505050808061295190615d24565b915050612727565b5061296660048585614932565b507f056264c94f28bb06c99d13f0446eb96c67c215d8d707bce2655a98ddf1c0b71f8484848460405161299c949392919061567b565b60405180910390a150505050565b60606000806000806129ba614410565b6000878152600760209081526040808320815160e08101835281546bffffffffffffffffffffffff808216835273ffffffffffffffffffffffffffffffffffffffff6c0100000000000000000000000092839004811684880152600185015463ffffffff81168588015267ffffffffffffffff64010000000082041660608601528390048116608085015260029094015490811660a08401520490911660c08201528a8452600a90925280832090519192917f6e04ff0d0000000000000000000000000000000000000000000000000000000091612a9a91602401615889565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050600080836080015173ffffffffffffffffffffffffffffffffffffffff16600c600001600b9054906101000a900463ffffffff1663ffffffff1684604051612b4191906155d5565b60006040518083038160008787f1925050503d8060008114612b7f576040519150601f19603f3d011682016040523d82523d6000602084013e612b84565b606091505b509150915081612bc257806040517f96c36235000000000000000000000000000000000000000000000000000000008152600401610f16919061583f565b80806020019051810190612bd69190615098565b9950915081612c11576040517f865676e300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000612c208b8d8c600061381e565b9050612c358582600001518360600151614448565b6060810151608082015160a083015160c0909301519b9e919d509b50909998509650505050505050565b6000818152600760209081526040808320815160e08101835281546bffffffffffffffffffffffff808216835273ffffffffffffffffffffffffffffffffffffffff6c01000000000000000000000000928390048116848801908152600186015463ffffffff811686890181905267ffffffffffffffff64010000000083041660608881019182529287900485166080890181905260029099015495861660a089019081529690950490931660c087019081528b8b52600a9099529689208551915198519351945181548b9a8b998a998a998a998a9992989397929692959394939092908690612d4e90615cd0565b80601f0160208091040260200160405190810160405280929190818152602001828054612d7a90615cd0565b8015612dc75780601f10612d9c57610100808354040283529160200191612dc7565b820191906000526020600020905b815481529060010190602001808311612daa57829003601f168201915b505050505095509850985098509850985098509850985050919395975091939597565b60008181526007602052604081206001015467ffffffffffffffff6401000000009091048116919082141590612e3560005473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16149050818015612e855750808015612e835750438367ffffffffffffffff16115b155b15612ebc576040517ffbc0357800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80158015612f0157506000848152600760205260409020600201546c01000000000000000000000000900473ffffffffffffffffffffffffffffffffffffffff163314155b15612f38576040517ffbdb8e5600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b4381612f4c57612f49603282615ba0565b90505b600085815260076020526040902060010180547fffffffffffffffffffffffffffffffffffffffff0000000000000000ffffffff1664010000000067ffffffffffffffff841602179055612fa1600586613d94565b5060405167ffffffffffffffff82169086907f91cb3bb75cfbd718bbfccc56b7f53d92d7048ef4ca39a3b7b7c6d4af1f79118190600090a35050505050565b6000805473ffffffffffffffffffffffffffffffffffffffff163314801590613021575060135473ffffffffffffffffffffffffffffffffffffffff163314155b15613058576040517fd48b678b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b613063600143615c60565b600d5460408051924060208401523060601b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000001690830152640100000000900460e01b7fffffffff000000000000000000000000000000000000000000000000000000001660548201526058016040516020818303038152906040528051906020012060001c905061313081878787600088888080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250613da092505050565b600d8054640100000000900463ffffffff1690600461314e83615d5d565b91906101000a81548163ffffffff021916908363ffffffff16021790555050807fbae366358c023f887e791d7a62f2e4316f1026bd77f6fb49501a917b3bc5d01286866040516131c692919063ffffffff92909216825273ffffffffffffffffffffffffffffffffffffffff16602082015260400190565b60405180910390a295945050505050565b73ffffffffffffffffffffffffffffffffffffffff828116600090815260086020526040902054163314613237576040517fcebf515b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8116331415613287576040517f8c8728c700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8281166000908152600960205260409020548116908216146111635773ffffffffffffffffffffffffffffffffffffffff82811660008181526009602052604080822080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169486169485179055513392917f84f7c7c80bb8ed2279b4aab5f61cd05e6374073d38f46d7f32de8c30e9e3836791a45050565b61333e6136b3565b600d5460e082015163ffffffff91821691161015613388576040517f39abc10400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b604051806101200160405280826000015163ffffffff168152602001826020015163ffffffff168152602001826040015162ffffff168152602001826060015163ffffffff168152602001826080015162ffffff1681526020018260a0015161ffff1681526020018260c001516bffffffffffffffffffffffff1681526020018260e0015163ffffffff168152602001600c60010160049054906101000a900463ffffffff1663ffffffff16815250600c60008201518160000160006101000a81548163ffffffff021916908363ffffffff16021790555060208201518160000160046101000a81548163ffffffff021916908363ffffffff16021790555060408201518160000160086101000a81548162ffffff021916908362ffffff160217905550606082015181600001600b6101000a81548163ffffffff021916908363ffffffff160217905550608082015181600001600f6101000a81548162ffffff021916908362ffffff16021790555060a08201518160000160126101000a81548161ffff021916908361ffff16021790555060c08201518160000160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff16021790555060e08201518160010160006101000a81548163ffffffff021916908363ffffffff1602179055506101008201518160010160046101000a81548163ffffffff021916908363ffffffff160217905550905050806101000151600e81905550806101200151600f81905550806101400151601260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550806101600151601360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507ffe125a41957477226ba20f85ef30a4024ea3bb8d066521ddc16df3f2944de3258160405161367791906159bd565b60405180910390a150565b61368a6136b3565b61369381614562565b50565b60006107cc825490565b60006136ac8383614658565b9392505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610b0b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e6572000000000000000000006044820152606401610f16565b61373c614682565b600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390a1565b60035460ff1615610b0b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610f16565b6138746040518060e00160405280600073ffffffffffffffffffffffffffffffffffffffff1681526020016000815260200160608152602001600081526020016000815260200160008152602001600081525090565b60008481526007602052604081206001015463ffffffff1690806138966140f3565b9150915060006138a683876142ee565b905060006138b5858385614333565b6040805160e08101825273ffffffffffffffffffffffffffffffffffffffff8d168152602081018c90529081018a90526bffffffffffffffffffffffff909116606082015260808101959095525060a084015260c0830152509050949350505050565b60006139226146ee565b602082810151600081815260079092526040909120600101544364010000000090910467ffffffffffffffff1611613986576040517fd096219c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b602080840151600090815260078252604090819020815160e08101835281546bffffffffffffffffffffffff808216835273ffffffffffffffffffffffffffffffffffffffff6c0100000000000000000000000092839004811696840196909652600184015463ffffffff81169584019590955267ffffffffffffffff640100000000860416606080850191909152948290048616608084015260029093015492831660a083015290910490921660c0830152845190850151613a4a918391614448565b60005a90506000634585e33b60e01b8660400151604051602401613a6e919061583f565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050613ae08660800151846080015183614760565b94505a613aed9083615c60565b91506000613b04838860a001518960c00151614333565b602080890151600090815260079091526040902054909150613b359082906bffffffffffffffffffffffff16615c77565b6020888101805160009081526007909252604080832080547fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166bffffffffffffffffffffffff95861617905590518252902060020154613b9891839116615bb8565b60208881018051600090815260078352604080822060020180547fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166bffffffffffffffffffffffff9687161790558b5192518252808220805486166c0100000000000000000000000073ffffffffffffffffffffffffffffffffffffffff958616021790558b5190921681526008909252902054613c5191839174010000000000000000000000000000000000000000900416615bb8565b60086000896000015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550866000015173ffffffffffffffffffffffffffffffffffffffff1686151588602001517fcaacad83e47cc45c280d487ec84184eee2fa3b54ebaa393bda7549f13da228f6848b60400151604051613d1d929190615a73565b60405180910390a45050505050613d346001600255565b919050565b613d416137b1565b600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586137873390565b60006136ac83836147ac565b613da86137b1565b73ffffffffffffffffffffffffffffffffffffffff85163b613df6576040517f09ee12d500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6108fc8463ffffffff161080613e175750600d5463ffffffff908116908516115b15613e4e576040517f14c237fb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040518060e00160405280836bffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff1681526020018563ffffffff16815260200167ffffffffffffffff801681526020018673ffffffffffffffffffffffffffffffffffffffff16815260200160006bffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff168152506007600088815260200190815260200160002060008201518160000160006101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550602082015181600001600c6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060408201518160010160006101000a81548163ffffffff021916908363ffffffff16021790555060608201518160010160046101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550608082015181600101600c6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060a08201518160020160006101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff16021790555060c082015181600201600c6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550905050816bffffffffffffffffffffffff166011546140bc9190615ba0565b6011556000868152600a6020908152604090912082516140de928401906149ba565b506140ea60058761489f565b50505050505050565b6000806000600c600001600f9054906101000a900462ffffff1662ffffff1690506000808263ffffffff161190506000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663feaf968c6040518163ffffffff1660e01b815260040160a06040518083038186803b15801561418a57600080fd5b505afa15801561419e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906141c29190615365565b5094509092508491505080156141e657506141dd8242615c60565b8463ffffffff16105b806141f2575060008113155b1561420157600e549550614205565b8095505b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663feaf968c6040518163ffffffff1660e01b815260040160a06040518083038186803b15801561426b57600080fd5b505afa15801561427f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906142a39190615365565b5094509092508491505080156142c757506142be8242615c60565b8463ffffffff16105b806142d3575060008113155b156142e257600f5494506142e6565b8094505b505050509091565b600c54600090614318907201000000000000000000000000000000000000900461ffff1684615c23565b90508180156143265750803a105b156107cc57503a92915050565b6000806143436201388086615ba0565b61434d9085615c23565b600c5490915060009061436a9063ffffffff16633b9aca00615ba0565b600c5490915060009061439090640100000000900463ffffffff1664e8d4a51000615c23565b85836143a086633b9aca00615c23565b6143aa9190615c23565b6143b49190615be8565b6143be9190615ba0565b90506b033b2e3c9fd0803ce8000000811115614406576040517f2ad7547a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b9695505050505050565b3215610b0b576040517fb60ac5db00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff821660009081526008602052604090206001015460ff166144aa576040517fcfbacfd800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b82516bffffffffffffffffffffffff168111156144f3576040517f356680b700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff16836020015173ffffffffffffffffffffffffffffffffffffffff16141561455d576040517f06bc104000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050565b73ffffffffffffffffffffffffffffffffffffffff81163314156145e2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401610f16565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b600082600001828154811061466f5761466f615e0e565b9060005260206000200154905092915050565b60035460ff16610b0b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610f16565b60028054141561475a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610f16565b60028055565b60005a61138881101561477257600080fd5b61138881039050846040820482031161478a57600080fd5b50823b61479657600080fd5b60008083516020850160008789f1949350505050565b600081815260018301602052604081205480156148955760006147d0600183615c60565b85549091506000906147e490600190615c60565b905081811461484957600086600001828154811061480457614804615e0e565b906000526020600020015490508087600001848154811061482757614827615e0e565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061485a5761485a615ddf565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506107cc565b60009150506107cc565b60008181526001830160205260408120546136ac908490849084906148f0575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556107cc565b5060006107cc565b50805461490490615cd0565b6000825580601f10614914575050565b601f0160209004906000526020600020908101906136939190614a2e565b8280548282559060005260206000209081019282156149aa579160200282015b828111156149aa5781547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff843516178255602090920191600190910190614952565b506149b6929150614a2e565b5090565b8280546149c690615cd0565b90600052602060002090601f0160209004810192826149e857600085556149aa565b82601f10614a0157805160ff19168380011785556149aa565b828001600101855582156149aa579182015b828111156149aa578251825591602001919060010190614a13565b5b808211156149b65760008155600101614a2f565b803573ffffffffffffffffffffffffffffffffffffffff81168114613d3457600080fd5b60008083601f840112614a7957600080fd5b50813567ffffffffffffffff811115614a9157600080fd5b6020830191508360208260051b8501011115614aac57600080fd5b9250929050565b600082601f830112614ac457600080fd5b81356020614ad9614ad483615b36565b615ae7565b80838252828201915082860187848660051b8901011115614af957600080fd5b60005b85811015614b7957813567ffffffffffffffff811115614b1b57600080fd5b8801603f81018a13614b2c57600080fd5b858101356040614b3e614ad483615b5a565b8281528c82848601011115614b5257600080fd5b828285018a8301376000928101890192909252508552509284019290840190600101614afc565b5090979650505050505050565b600082601f830112614b9757600080fd5b81356020614ba7614ad483615b36565b8281528181019085830160e080860288018501891015614bc657600080fd5b60005b86811015614c785781838b031215614be057600080fd5b614be8615a9a565b614bf184614d70565b8152614bfe878501614a43565b878201526040614c0f818601614d42565b9082015260608481013567ffffffffffffffff81168114614c2f57600080fd5b908201526080614c40858201614a43565b9082015260a0614c51858201614d70565b9082015260c0614c62858201614a43565b9082015285529385019391810191600101614bc9565b509198975050505050505050565b80518015158114613d3457600080fd5b60008083601f840112614ca857600080fd5b50813567ffffffffffffffff811115614cc057600080fd5b602083019150836020828501011115614aac57600080fd5b600082601f830112614ce957600080fd5b8151614cf7614ad482615b5a565b818152846020838601011115614d0c57600080fd5b610ff1826020830160208701615ca4565b803561ffff81168114613d3457600080fd5b803562ffffff81168114613d3457600080fd5b803563ffffffff81168114613d3457600080fd5b805169ffffffffffffffffffff81168114613d3457600080fd5b80356bffffffffffffffffffffffff81168114613d3457600080fd5b600060208284031215614d9e57600080fd5b6136ac82614a43565b60008060408385031215614dba57600080fd5b614dc383614a43565b9150614dd160208401614a43565b90509250929050565b60008060408385031215614ded57600080fd5b614df683614a43565b9150602083013560048110614e0a57600080fd5b809150509250929050565b60008060008060608587031215614e2b57600080fd5b614e3485614a43565b935060208501359250604085013567ffffffffffffffff811115614e5757600080fd5b614e6387828801614c96565b95989497509550505050565b600080600080600060808688031215614e8757600080fd5b614e9086614a43565b9450614e9e60208701614d42565b9350614eac60408701614a43565b9250606086013567ffffffffffffffff811115614ec857600080fd5b614ed488828901614c96565b969995985093965092949392505050565b60008060008060408587031215614efb57600080fd5b843567ffffffffffffffff80821115614f1357600080fd5b614f1f88838901614a67565b90965094506020870135915080821115614f3857600080fd5b50614e6387828801614a67565b600080600060408486031215614f5a57600080fd5b833567ffffffffffffffff811115614f7157600080fd5b614f7d86828701614a67565b9094509250614f90905060208501614a43565b90509250925092565b600080600060608486031215614fae57600080fd5b833567ffffffffffffffff80821115614fc657600080fd5b818601915086601f830112614fda57600080fd5b81356020614fea614ad483615b36565b8083825282820191508286018b848660051b890101111561500a57600080fd5b600096505b8487101561502d57803583526001969096019591830191830161500f565b509750508701359250508082111561504457600080fd5b61505087838801614b86565b9350604086013591508082111561506657600080fd5b5061507386828701614ab3565b9150509250925092565b60006020828403121561508f57600080fd5b6136ac82614c86565b600080604083850312156150ab57600080fd5b6150b483614c86565b9150602083015167ffffffffffffffff8111156150d057600080fd5b6150dc85828601614cd8565b9150509250929050565b600080602083850312156150f957600080fd5b823567ffffffffffffffff81111561511057600080fd5b61511c85828601614c96565b90969095509350505050565b60006020828403121561513a57600080fd5b815167ffffffffffffffff81111561515157600080fd5b610ff184828501614cd8565b60006020828403121561516f57600080fd5b8151600381106136ac57600080fd5b6000610180828403121561519157600080fd5b615199615ac3565b6151a283614d42565b81526151b060208401614d42565b60208201526151c160408401614d2f565b60408201526151d260608401614d42565b60608201526151e360808401614d2f565b60808201526151f460a08401614d1d565b60a082015261520560c08401614d70565b60c082015261521660e08401614d42565b60e08201526101008381013590820152610120808401359082015261014061523f818501614a43565b90820152610160615251848201614a43565b908201529392505050565b60006020828403121561526e57600080fd5b5035919050565b60006020828403121561528757600080fd5b5051919050565b600080604083850312156152a157600080fd5b82359150614dd160208401614a43565b6000806000604084860312156152c657600080fd5b83359250602084013567ffffffffffffffff8111156152e457600080fd5b6152f086828701614c96565b9497909650939450505050565b6000806040838503121561531057600080fd5b50508035926020909101359150565b6000806040838503121561533257600080fd5b82359150614dd160208401614d42565b6000806040838503121561535557600080fd5b82359150614dd160208401614d70565b600080600080600060a0868803121561537d57600080fd5b61538686614d56565b94506020860151935060408601519250606086015191506153a960808701614d56565b90509295509295909350565b8183526000602080850194508260005b858110156153fe5773ffffffffffffffffffffffffffffffffffffffff6153eb83614a43565b16875295820195908201906001016153c5565b509495945050505050565b600081518084526020808501808196508360051b8101915082860160005b8581101561545157828403895261543f84835161545e565b98850198935090840190600101615427565b5091979650505050505050565b60008151808452615476816020860160208601615ca4565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b600381106154b8576154b8615db0565b9052565b805163ffffffff16825260208101516154dd602084018263ffffffff169052565b5060408101516154f4604084018262ffffff169052565b50606081015161550c606084018263ffffffff169052565b506080810151615523608084018262ffffff169052565b5060a081015161553960a084018261ffff169052565b5060c081015161555960c08401826bffffffffffffffffffffffff169052565b5060e081015161557160e084018263ffffffff169052565b50610100818101519083015261012080820151908301526101408082015173ffffffffffffffffffffffffffffffffffffffff81168285015250506101608181015173ffffffffffffffffffffffffffffffffffffffff8116848301525b50505050565b600082516155e7818460208701615ca4565b9190910192915050565b600061010073ffffffffffffffffffffffffffffffffffffffff808c16845263ffffffff8b16602085015281604085015261562e8285018b61545e565b6bffffffffffffffffffffffff998a16606086015297811660808501529590951660a08301525067ffffffffffffffff9290921660c083015290931660e090930192909252949350505050565b60408152600061568f6040830186886153b5565b82810360208401526156a28185876153b5565b979650505050505050565b60006060808352858184015260807f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8711156156e857600080fd5b8660051b808983870137808501905081810160008152602083878403018188015281895180845260a093508385019150828b01945060005b818110156157d757855180516bffffffffffffffffffffffff1684528481015173ffffffffffffffffffffffffffffffffffffffff9081168686015260408083015163ffffffff16908601528982015167ffffffffffffffff168a860152888201511688850152858101516157a4878601826bffffffffffffffffffffffff169052565b5060c09081015173ffffffffffffffffffffffffffffffffffffffff16908401529483019460e090920191600101615720565b505087810360408901526157eb818a615409565b9c9b505050505050505050505050565b6020808252825182820181905260009190848201906040850190845b8181101561583357835183529284019291840191600101615817565b50909695505050505050565b6020815260006136ac602083018461545e565b60a08152600061586560a083018861545e565b90508560208301528460408301528360608301528260808301529695505050505050565b600060208083526000845481600182811c9150808316806158ab57607f831692505b8583108114156158e2577f4e487b710000000000000000000000000000000000000000000000000000000085526022600452602485fd5b8786018381526020018180156158ff576001811461592e57615959565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00861682528782019650615959565b60008b81526020902060005b868110156159535781548482015290850190890161593a565b83019750505b50949998505050505050505050565b602081016004831061597c5761597c615db0565b91905290565b602081016107cc82846154a8565b61599a81856154a8565b6159a760208201846154a8565b606060408201526000611b7e606083018461545e565b61018081016107cc82846154bc565b600061022080830163ffffffff875116845260206bffffffffffffffffffffffff8189015116818601526040880151604086015260608801516060860152615a1760808601886154bc565b6102008501929092528451908190526102408401918086019160005b81811015615a6557835173ffffffffffffffffffffffffffffffffffffffff1685529382019392820192600101615a33565b509298975050505050505050565b6bffffffffffffffffffffffff83168152604060208201526000610ff1604083018461545e565b60405160e0810167ffffffffffffffff81118282101715615abd57615abd615e3d565b60405290565b604051610180810167ffffffffffffffff81118282101715615abd57615abd615e3d565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715615b2e57615b2e615e3d565b604052919050565b600067ffffffffffffffff821115615b5057615b50615e3d565b5060051b60200190565b600067ffffffffffffffff821115615b7457615b74615e3d565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b60008219821115615bb357615bb3615d81565b500190565b60006bffffffffffffffffffffffff808316818516808303821115615bdf57615bdf615d81565b01949350505050565b600082615c1e577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615615c5b57615c5b615d81565b500290565b600082821015615c7257615c72615d81565b500390565b60006bffffffffffffffffffffffff83811690831681811015615c9c57615c9c615d81565b039392505050565b60005b83811015615cbf578181015183820152602001615ca7565b838111156155cf5750506000910152565b600181811c90821680615ce457607f821691505b60208210811415615d1e577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415615d5657615d56615d81565b5060010190565b600063ffffffff80831681811415615d7757615d77615d81565b6001019392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea164736f6c6343000806000a", + Bin: "0x60e06040523480156200001157600080fd5b506040516200671438038062006714833981016040819052620000349162000577565b33806000816200008b5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000be57620000be8162000107565b50506001600255506003805460ff191690556001600160601b0319606085811b821660805284811b821660a05283901b1660c052620000fd81620001b3565b50505050620007fa565b6001600160a01b038116331415620001625760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000082565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b620001bd620004a8565b600d5460e082015163ffffffff91821691161015620001ef57604051630e6af04160e21b815260040160405180910390fd5b604051806101200160405280826000015163ffffffff168152602001826020015163ffffffff168152602001826040015162ffffff168152602001826060015163ffffffff168152602001826080015162ffffff1681526020018260a0015161ffff1681526020018260c001516001600160601b031681526020018260e0015163ffffffff168152602001600c60010160049054906101000a900463ffffffff1663ffffffff16815250600c60008201518160000160006101000a81548163ffffffff021916908363ffffffff16021790555060208201518160000160046101000a81548163ffffffff021916908363ffffffff16021790555060408201518160000160086101000a81548162ffffff021916908362ffffff160217905550606082015181600001600b6101000a81548163ffffffff021916908363ffffffff160217905550608082015181600001600f6101000a81548162ffffff021916908362ffffff16021790555060a08201518160000160126101000a81548161ffff021916908361ffff16021790555060c08201518160000160146101000a8154816001600160601b0302191690836001600160601b0316021790555060e08201518160010160006101000a81548163ffffffff021916908363ffffffff1602179055506101008201518160010160046101000a81548163ffffffff021916908363ffffffff160217905550905050806101000151600e81905550806101200151600f81905550806101400151601260006101000a8154816001600160a01b0302191690836001600160a01b03160217905550806101600151601360006101000a8154816001600160a01b0302191690836001600160a01b031602179055507ffe125a41957477226ba20f85ef30a4024ea3bb8d066521ddc16df3f2944de325816040516200049d9190620006c3565b60405180910390a150565b6000546001600160a01b03163314620005045760405162461bcd60e51b815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e657200000000000000000000604482015260640162000082565b565b80516001600160a01b03811681146200051e57600080fd5b919050565b805161ffff811681146200051e57600080fd5b805162ffffff811681146200051e57600080fd5b805163ffffffff811681146200051e57600080fd5b80516001600160601b03811681146200051e57600080fd5b6000806000808486036101e08112156200059057600080fd5b6200059b8662000506565b9450620005ab6020870162000506565b9350620005bb6040870162000506565b925061018080605f1983011215620005d257600080fd5b620005dc620007c2565b9150620005ec606088016200054a565b8252620005fc608088016200054a565b60208301526200060f60a0880162000536565b60408301526200062260c088016200054a565b60608301526200063560e0880162000536565b60808301526101006200064a81890162000523565b60a08401526101206200065f818a016200055f565b60c085015261014062000674818b016200054a565b60e0860152610160808b015184870152848b0151838701526200069b6101a08c0162000506565b82870152620006ae6101c08c0162000506565b90860152509699959850939650909450505050565b815163ffffffff16815261018081016020830151620006ea602084018263ffffffff169052565b50604083015162000702604084018262ffffff169052565b5060608301516200071b606084018263ffffffff169052565b50608083015162000733608084018262ffffff169052565b5060a08301516200074a60a084018261ffff169052565b5060c08301516200076660c08401826001600160601b03169052565b5060e08301516200077f60e084018263ffffffff169052565b5061010083810151908301526101208084015190830152610140808401516001600160a01b03908116918401919091526101609384015116929091019190915290565b60405161018081016001600160401b0381118282101715620007f457634e487b7160e01b600052604160045260246000fd5b60405290565b60805160601c60a05160601c60c05160601c615e9b62000879600039600081816104240152614126015260008181610575015261420701526000818161030401528181610e10015281816110d10152818161192201528181611cad01528181611da1015281816121990152818161251701526125aa0152615e9b6000f3fe608060405234801561001057600080fd5b506004361061025c5760003560e01c806393f0c1fc11610145578063b7fdb436116100bd578063da5c67411161008c578063ef47a0ce11610071578063ef47a0ce1461066a578063f2fde38b1461067d578063faa3e9961461069057600080fd5b8063da5c674114610636578063eb5dcd6c1461065757600080fd5b8063b7fdb436146105c5578063c41b813a146105d8578063c7c3a19a146105fc578063c80480221461062357600080fd5b8063a72aa27e11610114578063b121e147116100f9578063b121e14714610597578063b657bc9c146105aa578063b79550be146105bd57600080fd5b8063a72aa27e1461055d578063ad1783611461057057600080fd5b806393f0c1fc146104f4578063948108f714610524578063a4c0ed3614610537578063a710b2211461054a57600080fd5b80635c975abb116101d85780637d9b97e0116101a757806385c1b0ba1161018c57806385c1b0ba146104b05780638da5cb5b146104c35780638e86139b146104e157600080fd5b80637d9b97e0146104a05780638456cb59146104a857600080fd5b80635c975abb1461045b578063744bfe611461047257806379ba5097146104855780637bbaf1ea1461048d57600080fd5b80631b6b6d231161022f5780633f4ba83a116102145780633f4ba83a146104175780634584a4191461041f57806348013d7b1461044657600080fd5b80631b6b6d23146102ff5780631e12b8a51461034b57600080fd5b806306e3b63214610261578063181f5a771461028a5780631865c57d146102d3578063187256e8146102ea575b600080fd5b61027461026f36600461531f565b6106d6565b604051610281919061581d565b60405180910390f35b6102c66040518060400160405280601481526020017f4b6565706572526567697374727920312e322e3000000000000000000000000081525081565b6040516102819190615861565b6102db6107d2565b604051610281939291906159ee565b6102fd6102f8366004614dfc565b610a8a565b005b6103267f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610281565b6103d7610359366004614dae565b73ffffffffffffffffffffffffffffffffffffffff90811660009081526008602090815260409182902082516060810184528154948516808252740100000000000000000000000000000000000000009095046bffffffffffffffffffffffff1692810183905260019091015460ff16151592018290529192909190565b6040805173ffffffffffffffffffffffffffffffffffffffff909416845291151560208401526bffffffffffffffffffffffff1690820152606001610281565b6102fd610afb565b6103267f000000000000000000000000000000000000000000000000000000000000000081565b61044e600081565b60405161028191906159a4565b60035460ff165b6040519015158152602001610281565b6102fd6104803660046152b0565b610b0d565b6102fd610e99565b61046261049b3660046152d3565b610f9b565b6102fd610ff9565b6102fd611167565b6102fd6104be366004614f67565b611177565b60005473ffffffffffffffffffffffffffffffffffffffff16610326565b6102fd6104ef366004615108565b611953565b61050761050236600461527e565b611b53565b6040516bffffffffffffffffffffffff9091168152602001610281565b6102fd610532366004615364565b611b87565b6102fd610545366004614e37565b611d89565b6102fd610558366004614dc9565b611f84565b6102fd61056b366004615341565b61221e565b6103267f000000000000000000000000000000000000000000000000000000000000000081565b6102fd6105a5366004614dae565b6123c5565b6105076105b836600461527e565b6124bd565b6102fd6124de565b6102fd6105d3366004614f07565b612649565b6105eb6105e63660046152b0565b6129aa565b604051610281959493929190615874565b61060f61060a36600461527e565b612c5f565b604051610281989796959493929190615613565b6102fd61063136600461527e565b612dea565b610649610644366004614e91565b612fe0565b604051908152602001610281565b6102fd610665366004614dc9565b6131d7565b6102fd6106783660046151a0565b613336565b6102fd61068b366004614dae565b613682565b6106c961069e366004614dae565b73ffffffffffffffffffffffffffffffffffffffff166000908152600b602052604090205460ff1690565b604051610281919061598a565b606060006106e46005613696565b905080841061071f576040517f1390f2a100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b826107315761072e8482615c82565b92505b60008367ffffffffffffffff81111561074c5761074c615e5f565b604051908082528060200260200182016040528015610775578160200160208202803683370190505b50905060005b848110156107c7576107986107908288615bc2565b6005906136a0565b8282815181106107aa576107aa615e30565b6020908102919091010152806107bf81615d46565b91505061077b565b509150505b92915050565b6040805160808101825260008082526020820181905291810182905260608101919091526040805161018081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e081018290526101008101829052610120810182905261014081018290526101608101919091526040805161012081018252600c5463ffffffff8082168352640100000000808304821660208086019190915262ffffff6801000000000000000085048116868801526b010000000000000000000000850484166060878101919091526f010000000000000000000000000000008604909116608087015261ffff720100000000000000000000000000000000000086041660a08701526bffffffffffffffffffffffff74010000000000000000000000000000000000000000909504851660c0870152600d5480851660e0880152929092049092166101008501819052875260105490921690860152601154928501929092526109546005613696565b606080860191909152815163ffffffff908116855260208084015182168187015260408085015162ffffff90811682890152858501518416948801949094526080808601519094169387019390935260a08085015161ffff169087015260c0808501516bffffffffffffffffffffffff169087015260e08085015190921691860191909152600e54610100860152600f5461012086015260125473ffffffffffffffffffffffffffffffffffffffff90811661014087015260135416610160860152600480548351818402810184019094528084528793879390918391830182828015610a7757602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311610a4c575b5050505050905093509350935050909192565b610a926136b3565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600b6020526040902080548291907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001836003811115610af257610af2615dd2565b02179055505050565b610b036136b3565b610b0b613734565b565b8073ffffffffffffffffffffffffffffffffffffffff8116610b5b576040517f9c8d2cd200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008381526007602052604090206002015483906c01000000000000000000000000900473ffffffffffffffffffffffffffffffffffffffff163314610bcd576040517fa47c170600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000848152600760205260409020600101544364010000000090910467ffffffffffffffff161115610c2b576040517fff84e5dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600c54600085815260076020526040812080546002909101546bffffffffffffffffffffffff740100000000000000000000000000000000000000009094048416939182169291169083821015610caf57610c868285615c99565b9050826bffffffffffffffffffffffff16816bffffffffffffffffffffffff161115610caf5750815b6000610cbb8285615c99565b60008a815260076020526040902080547fffffffffffffffffffffffffffffffffffffffff000000000000000000000000169055601054909150610d0e9083906bffffffffffffffffffffffff16615bda565b601080547fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166bffffffffffffffffffffffff928316179055601154610d5691831690615c82565b601155604080516bffffffffffffffffffffffff8316815273ffffffffffffffffffffffffffffffffffffffff8a1660208201528a917ff3b5906e5672f3e524854103bcafbbdba80dbdfeca2c35e116127b1060a68318910160405180910390a26040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff89811660048301526bffffffffffffffffffffffff831660248301527f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb906044015b602060405180830381600087803b158015610e5557600080fd5b505af1158015610e69573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e8d919061509f565b50505050505050505050565b60015473ffffffffffffffffffffffffffffffffffffffff163314610f1f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e65720000000000000000000060448201526064015b60405180910390fd5b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b6000610fa56137b1565b610ff1610fec338686868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506001925061381e915050565b613918565b949350505050565b6110016136b3565b6010546011546bffffffffffffffffffffffff90911690611023908290615c82565b601155601080547fffffffffffffffffffffffffffffffffffffffff0000000000000000000000001690556040516bffffffffffffffffffffffff821681527f1d07d0b0be43d3e5fee41a80b579af370affee03fa595bf56d5d4c19328162f19060200160405180910390a16040517fa9059cbb0000000000000000000000000000000000000000000000000000000081523360048201526bffffffffffffffffffffffff821660248201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063a9059cbb906044015b602060405180830381600087803b15801561112b57600080fd5b505af115801561113f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611163919061509f565b5050565b61116f6136b3565b610b0b613d39565b600173ffffffffffffffffffffffffffffffffffffffff82166000908152600b602052604090205460ff1660038111156111b3576111b3615dd2565b141580156111fb5750600373ffffffffffffffffffffffffffffffffffffffff82166000908152600b602052604090205460ff1660038111156111f8576111f8615dd2565b14155b15611232576040517f0ebeec3c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60125473ffffffffffffffffffffffffffffffffffffffff16611281576040517fd12d7d8d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b816112b8576040517f2c2fc94100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805160e081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c081018290526000808567ffffffffffffffff81111561130c5761130c615e5f565b60405190808252806020026020018201604052801561133f57816020015b606081526020019060019003908161132a5790505b50905060008667ffffffffffffffff81111561135d5761135d615e5f565b6040519080825280602002602001820160405280156113e257816020015b6040805160e08101825260008082526020808301829052928201819052606082018190526080820181905260a0820181905260c082015282527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90920191018161137b5790505b50905060005b878110156116e25788888281811061140257611402615e30565b60209081029290920135600081815260078452604090819020815160e08101835281546bffffffffffffffffffffffff808216835273ffffffffffffffffffffffffffffffffffffffff6c0100000000000000000000000092839004811698840198909852600184015463ffffffff81169584019590955267ffffffffffffffff6401000000008604166060840152938190048716608083015260029092015492831660a0820152910490931660c084018190529098509196505033146114f5576040517fa47c170600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606085015167ffffffffffffffff9081161461153d576040517fd096219c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8482828151811061155057611550615e30565b6020026020010181905250600a6000878152602001908152602001600020805461157990615cf2565b80601f01602080910402602001604051908101604052809291908181526020018280546115a590615cf2565b80156115f25780601f106115c7576101008083540402835291602001916115f2565b820191906000526020600020905b8154815290600101906020018083116115d557829003601f168201915b505050505083828151811061160957611609615e30565b6020908102919091010152845161162e906bffffffffffffffffffffffff1685615bc2565b600087815260076020908152604080832083815560018101849055600201839055600a9091528120919550611663919061491a565b61166e600587613d94565b508451604080516bffffffffffffffffffffffff909216825273ffffffffffffffffffffffffffffffffffffffff8916602083015287917fb38647142fbb1ea4c000fc4569b37a4e9a9f6313317b84ee3e5326c1a6cd06ff910160405180910390a2806116da81615d46565b9150506113e8565b50826011546116f19190615c82565b60115560405160009061170e908a908a90859087906020016156cf565b60405160208183030381529060405290508673ffffffffffffffffffffffffffffffffffffffff16638e86139b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c71249ab60008b73ffffffffffffffffffffffffffffffffffffffff166348013d7b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156117c157600080fd5b505afa1580156117d5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117f9919061517f565b866040518463ffffffff1660e01b8152600401611818939291906159b2565b60006040518083038186803b15801561183057600080fd5b505afa158015611844573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820160405261188a919081019061514a565b6040518263ffffffff1660e01b81526004016118a69190615861565b600060405180830381600087803b1580156118c057600080fd5b505af11580156118d4573d6000803e3d6000fd5b50506040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8a81166004830152602482018890527f000000000000000000000000000000000000000000000000000000000000000016925063a9059cbb9150604401610e3b565b6002336000908152600b602052604090205460ff16600381111561197957611979615dd2565b141580156119ab57506003336000908152600b602052604090205460ff1660038111156119a8576119a8615dd2565b14155b156119e2576040517f0ebeec3c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080806119f284860186614fbb565b92509250925060005b8351811015611b4b57611ab8848281518110611a1957611a19615e30565b6020026020010151848381518110611a3357611a33615e30565b602002602001015160800151858481518110611a5157611a51615e30565b602002602001015160400151868581518110611a6f57611a6f615e30565b602002602001015160c00151878681518110611a8d57611a8d615e30565b602002602001015160000151878781518110611aab57611aab615e30565b6020026020010151613da0565b838181518110611aca57611aca615e30565b60200260200101517f74931a144e43a50694897f241d973aecb5024c0e910f9bb80a163ea3c1cf5a71848381518110611b0557611b05615e30565b60209081029190910181015151604080516bffffffffffffffffffffffff909216825233928201929092520160405180910390a280611b4381615d46565b9150506119fb565b505050505050565b6000806000611b606140f3565b915091506000611b718360006142ee565b9050611b7e858284614333565b95945050505050565b6000828152600760205260409020600101548290640100000000900467ffffffffffffffff90811614611be6576040517fd096219c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600083815260076020526040902054611c0e9083906bffffffffffffffffffffffff16615bda565b600084815260076020526040902080547fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166bffffffffffffffffffffffff928316179055601154611c6291841690615bc2565b6011556040517f23b872dd0000000000000000000000000000000000000000000000000000000081523360048201523060248201526bffffffffffffffffffffffff831660448201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906323b872dd90606401602060405180830381600087803b158015611d0657600080fd5b505af1158015611d1a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d3e919061509f565b506040516bffffffffffffffffffffffff83168152339084907fafd24114486da8ebfc32f3626dada8863652e187461aa74d4bfa7348915062039060200160405180910390a3505050565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614611df8576040517fc8bad78d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60208114611e32576040517fdfe9309000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000611e408284018461527e565b600081815260076020526040902060010154909150640100000000900467ffffffffffffffff90811614611ea0576040517fd096219c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600081815260076020526040902054611ec89085906bffffffffffffffffffffffff16615bda565b600082815260076020526040902080547fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166bffffffffffffffffffffffff92909216919091179055601154611f1f908590615bc2565b6011556040516bffffffffffffffffffffffff8516815273ffffffffffffffffffffffffffffffffffffffff86169082907fafd24114486da8ebfc32f3626dada8863652e187461aa74d4bfa7348915062039060200160405180910390a35050505050565b8073ffffffffffffffffffffffffffffffffffffffff8116611fd2576040517f9c8d2cd200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff83811660009081526008602090815260409182902082516060810184528154948516808252740100000000000000000000000000000000000000009095046bffffffffffffffffffffffff16928101929092526001015460ff16151591810191909152903314612083576040517fcebf515b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff808516600090815260086020908152604090912080549092169091558101516011546120d2916bffffffffffffffffffffffff1690615c82565b60115560208082015160405133815273ffffffffffffffffffffffffffffffffffffffff808716936bffffffffffffffffffffffff90931692908816917f9819093176a1851202c7bcfa46845809b4e47c261866550e94ed3775d2f40698910160405180910390a460208101516040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85811660048301526bffffffffffffffffffffffff90921660248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb90604401602060405180830381600087803b1580156121df57600080fd5b505af11580156121f3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612217919061509f565b5050505050565b6000828152600760205260409020600101548290640100000000900467ffffffffffffffff9081161461227d576040517fd096219c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008381526007602052604090206002015483906c01000000000000000000000000900473ffffffffffffffffffffffffffffffffffffffff1633146122ef576040517fa47c170600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6108fc8363ffffffff1610806123105750600d5463ffffffff908116908416115b15612347576040517f14c237fb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008481526007602090815260409182902060010180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001663ffffffff8716908117909155915191825285917fc24c07e655ce79fba8a589778987d3c015bc6af1632bb20cf9182e02a65d972c910160405180910390a250505050565b73ffffffffffffffffffffffffffffffffffffffff818116600090815260096020526040902054163314612425576040517f6752e7aa00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff81811660008181526008602090815260408083208054337fffffffffffffffffffffffff000000000000000000000000000000000000000080831682179093556009909452828520805490921690915590519416939092849290917f78af32efdcad432315431e9b03d27e6cd98fb79c405fdc5af7c1714d9c0f75b39190a45050565b6000818152600760205260408120600101546107cc9063ffffffff16611b53565b6124e66136b3565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906370a082319060240160206040518083038186803b15801561256e57600080fd5b505afa158015612582573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125a69190615297565b90507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33601154846125f39190615c82565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815273ffffffffffffffffffffffffffffffffffffffff90921660048301526024820152604401611111565b6126516136b3565b82811415806126605750600283105b15612697576040517fcf54c06a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b600454811015612723576000600482815481106126b9576126b9615e30565b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff168252600890526040902060010180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055508061271b81615d46565b91505061269a565b5060005b8381101561295957600085858381811061274357612743615e30565b90506020020160208101906127589190614dae565b73ffffffffffffffffffffffffffffffffffffffff80821660009081526008602052604081208054939450929091169086868681811061279a5761279a615e30565b90506020020160208101906127af9190614dae565b905073ffffffffffffffffffffffffffffffffffffffff81161580612842575073ffffffffffffffffffffffffffffffffffffffff82161580159061282057508073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b8015612842575073ffffffffffffffffffffffffffffffffffffffff81811614155b15612879576040517fb387a23800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600183015460ff16156128b8576040517f357d0cc400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600183810180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016909117905573ffffffffffffffffffffffffffffffffffffffff818116146129425782547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff82161783555b50505050808061295190615d46565b915050612727565b5061296660048585614954565b507f056264c94f28bb06c99d13f0446eb96c67c215d8d707bce2655a98ddf1c0b71f8484848460405161299c949392919061569d565b60405180910390a150505050565b60606000806000806129ba614410565b6000878152600760209081526040808320815160e08101835281546bffffffffffffffffffffffff808216835273ffffffffffffffffffffffffffffffffffffffff6c0100000000000000000000000092839004811684880152600185015463ffffffff81168588015267ffffffffffffffff64010000000082041660608601528390048116608085015260029094015490811660a08401520490911660c08201528a8452600a90925280832090519192917f6e04ff0d0000000000000000000000000000000000000000000000000000000091612a9a916024016158ab565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050600080836080015173ffffffffffffffffffffffffffffffffffffffff16600c600001600b9054906101000a900463ffffffff1663ffffffff1684604051612b4191906155f7565b60006040518083038160008787f1925050503d8060008114612b7f576040519150601f19603f3d011682016040523d82523d6000602084013e612b84565b606091505b509150915081612bc257806040517f96c36235000000000000000000000000000000000000000000000000000000008152600401610f169190615861565b80806020019051810190612bd691906150ba565b9950915081612c11576040517f865676e300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000612c208b8d8c600061381e565b9050612c35858260000151836060015161446a565b6060810151608082015160a083015160c0909301519b9e919d509b50909998509650505050505050565b6000818152600760209081526040808320815160e08101835281546bffffffffffffffffffffffff808216835273ffffffffffffffffffffffffffffffffffffffff6c01000000000000000000000000928390048116848801908152600186015463ffffffff811686890181905267ffffffffffffffff64010000000083041660608881019182529287900485166080890181905260029099015495861660a089019081529690950490931660c087019081528b8b52600a9099529689208551915198519351945181548b9a8b998a998a998a998a9992989397929692959394939092908690612d4e90615cf2565b80601f0160208091040260200160405190810160405280929190818152602001828054612d7a90615cf2565b8015612dc75780601f10612d9c57610100808354040283529160200191612dc7565b820191906000526020600020905b815481529060010190602001808311612daa57829003601f168201915b505050505095509850985098509850985098509850985050919395975091939597565b60008181526007602052604081206001015467ffffffffffffffff6401000000009091048116919082141590612e3560005473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16149050818015612e855750808015612e835750438367ffffffffffffffff16115b155b15612ebc576040517ffbc0357800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80158015612f0157506000848152600760205260409020600201546c01000000000000000000000000900473ffffffffffffffffffffffffffffffffffffffff163314155b15612f38576040517ffbdb8e5600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b4381612f4c57612f49603282615bc2565b90505b600085815260076020526040902060010180547fffffffffffffffffffffffffffffffffffffffff0000000000000000ffffffff1664010000000067ffffffffffffffff841602179055612fa1600586613d94565b5060405167ffffffffffffffff82169086907f91cb3bb75cfbd718bbfccc56b7f53d92d7048ef4ca39a3b7b7c6d4af1f79118190600090a35050505050565b6000805473ffffffffffffffffffffffffffffffffffffffff163314801590613021575060135473ffffffffffffffffffffffffffffffffffffffff163314155b15613058576040517fd48b678b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b613063600143615c82565b600d5460408051924060208401523060601b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000001690830152640100000000900460e01b7fffffffff000000000000000000000000000000000000000000000000000000001660548201526058016040516020818303038152906040528051906020012060001c905061313081878787600088888080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250613da092505050565b600d8054640100000000900463ffffffff1690600461314e83615d7f565b91906101000a81548163ffffffff021916908363ffffffff16021790555050807fbae366358c023f887e791d7a62f2e4316f1026bd77f6fb49501a917b3bc5d01286866040516131c692919063ffffffff92909216825273ffffffffffffffffffffffffffffffffffffffff16602082015260400190565b60405180910390a295945050505050565b73ffffffffffffffffffffffffffffffffffffffff828116600090815260086020526040902054163314613237576040517fcebf515b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8116331415613287576040517f8c8728c700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8281166000908152600960205260409020548116908216146111635773ffffffffffffffffffffffffffffffffffffffff82811660008181526009602052604080822080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169486169485179055513392917f84f7c7c80bb8ed2279b4aab5f61cd05e6374073d38f46d7f32de8c30e9e3836791a45050565b61333e6136b3565b600d5460e082015163ffffffff91821691161015613388576040517f39abc10400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b604051806101200160405280826000015163ffffffff168152602001826020015163ffffffff168152602001826040015162ffffff168152602001826060015163ffffffff168152602001826080015162ffffff1681526020018260a0015161ffff1681526020018260c001516bffffffffffffffffffffffff1681526020018260e0015163ffffffff168152602001600c60010160049054906101000a900463ffffffff1663ffffffff16815250600c60008201518160000160006101000a81548163ffffffff021916908363ffffffff16021790555060208201518160000160046101000a81548163ffffffff021916908363ffffffff16021790555060408201518160000160086101000a81548162ffffff021916908362ffffff160217905550606082015181600001600b6101000a81548163ffffffff021916908363ffffffff160217905550608082015181600001600f6101000a81548162ffffff021916908362ffffff16021790555060a08201518160000160126101000a81548161ffff021916908361ffff16021790555060c08201518160000160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff16021790555060e08201518160010160006101000a81548163ffffffff021916908363ffffffff1602179055506101008201518160010160046101000a81548163ffffffff021916908363ffffffff160217905550905050806101000151600e81905550806101200151600f81905550806101400151601260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550806101600151601360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507ffe125a41957477226ba20f85ef30a4024ea3bb8d066521ddc16df3f2944de3258160405161367791906159df565b60405180910390a150565b61368a6136b3565b61369381614584565b50565b60006107cc825490565b60006136ac838361467a565b9392505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610b0b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e6572000000000000000000006044820152606401610f16565b61373c6146a4565b600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390a1565b60035460ff1615610b0b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610f16565b6138746040518060e00160405280600073ffffffffffffffffffffffffffffffffffffffff1681526020016000815260200160608152602001600081526020016000815260200160008152602001600081525090565b60008481526007602052604081206001015463ffffffff1690806138966140f3565b9150915060006138a683876142ee565b905060006138b5858385614333565b6040805160e08101825273ffffffffffffffffffffffffffffffffffffffff8d168152602081018c90529081018a90526bffffffffffffffffffffffff909116606082015260808101959095525060a084015260c0830152509050949350505050565b6000613922614710565b602082810151600081815260079092526040909120600101544364010000000090910467ffffffffffffffff1611613986576040517fd096219c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b602080840151600090815260078252604090819020815160e08101835281546bffffffffffffffffffffffff808216835273ffffffffffffffffffffffffffffffffffffffff6c0100000000000000000000000092839004811696840196909652600184015463ffffffff81169584019590955267ffffffffffffffff640100000000860416606080850191909152948290048616608084015260029093015492831660a083015290910490921660c0830152845190850151613a4a91839161446a565b60005a90506000634585e33b60e01b8660400151604051602401613a6e9190615861565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050613ae08660800151846080015183614782565b94505a613aed9083615c82565b91506000613b04838860a001518960c00151614333565b602080890151600090815260079091526040902054909150613b359082906bffffffffffffffffffffffff16615c99565b6020888101805160009081526007909252604080832080547fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166bffffffffffffffffffffffff95861617905590518252902060020154613b9891839116615bda565b60208881018051600090815260078352604080822060020180547fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166bffffffffffffffffffffffff9687161790558b5192518252808220805486166c0100000000000000000000000073ffffffffffffffffffffffffffffffffffffffff958616021790558b5190921681526008909252902054613c5191839174010000000000000000000000000000000000000000900416615bda565b60086000896000015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550866000015173ffffffffffffffffffffffffffffffffffffffff1686151588602001517fcaacad83e47cc45c280d487ec84184eee2fa3b54ebaa393bda7549f13da228f6848b60400151604051613d1d929190615a95565b60405180910390a45050505050613d346001600255565b919050565b613d416137b1565b600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586137873390565b60006136ac83836147ce565b613da86137b1565b73ffffffffffffffffffffffffffffffffffffffff85163b613df6576040517f09ee12d500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6108fc8463ffffffff161080613e175750600d5463ffffffff908116908516115b15613e4e576040517f14c237fb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040518060e00160405280836bffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff1681526020018563ffffffff16815260200167ffffffffffffffff801681526020018673ffffffffffffffffffffffffffffffffffffffff16815260200160006bffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff168152506007600088815260200190815260200160002060008201518160000160006101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550602082015181600001600c6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060408201518160010160006101000a81548163ffffffff021916908363ffffffff16021790555060608201518160010160046101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550608082015181600101600c6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060a08201518160020160006101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff16021790555060c082015181600201600c6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550905050816bffffffffffffffffffffffff166011546140bc9190615bc2565b6011556000868152600a6020908152604090912082516140de928401906149dc565b506140ea6005876148c1565b50505050505050565b6000806000600c600001600f9054906101000a900462ffffff1662ffffff1690506000808263ffffffff161190506000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663feaf968c6040518163ffffffff1660e01b815260040160a06040518083038186803b15801561418a57600080fd5b505afa15801561419e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906141c29190615387565b5094509092508491505080156141e657506141dd8242615c82565b8463ffffffff16105b806141f2575060008113155b1561420157600e549550614205565b8095505b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663feaf968c6040518163ffffffff1660e01b815260040160a06040518083038186803b15801561426b57600080fd5b505afa15801561427f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906142a39190615387565b5094509092508491505080156142c757506142be8242615c82565b8463ffffffff16105b806142d3575060008113155b156142e257600f5494506142e6565b8094505b505050509091565b600c54600090614318907201000000000000000000000000000000000000900461ffff1684615c45565b90508180156143265750803a105b156107cc57503a92915050565b6000806143436201388086615bc2565b61434d9085615c45565b600c5490915060009061436a9063ffffffff16633b9aca00615bc2565b600c5490915060009061439090640100000000900463ffffffff1664e8d4a51000615c45565b85836143a086633b9aca00615c45565b6143aa9190615c45565b6143b49190615c0a565b6143be9190615bc2565b90506b033b2e3c9fd0803ce8000000811115614406576040517f2ad7547a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b9695505050505050565b321580159061443357503273111111111111111111111111111111111111111114155b15610b0b576040517fb60ac5db00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff821660009081526008602052604090206001015460ff166144cc576040517fcfbacfd800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b82516bffffffffffffffffffffffff16811115614515576040517f356680b700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff16836020015173ffffffffffffffffffffffffffffffffffffffff16141561457f576040517f06bc104000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050565b73ffffffffffffffffffffffffffffffffffffffff8116331415614604576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401610f16565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b600082600001828154811061469157614691615e30565b9060005260206000200154905092915050565b60035460ff16610b0b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610f16565b60028054141561477c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610f16565b60028055565b60005a61138881101561479457600080fd5b6113888103905084604082048203116147ac57600080fd5b50823b6147b857600080fd5b60008083516020850160008789f1949350505050565b600081815260018301602052604081205480156148b75760006147f2600183615c82565b855490915060009061480690600190615c82565b905081811461486b57600086600001828154811061482657614826615e30565b906000526020600020015490508087600001848154811061484957614849615e30565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061487c5761487c615e01565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506107cc565b60009150506107cc565b60008181526001830160205260408120546136ac90849084908490614912575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556107cc565b5060006107cc565b50805461492690615cf2565b6000825580601f10614936575050565b601f0160209004906000526020600020908101906136939190614a50565b8280548282559060005260206000209081019282156149cc579160200282015b828111156149cc5781547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff843516178255602090920191600190910190614974565b506149d8929150614a50565b5090565b8280546149e890615cf2565b90600052602060002090601f016020900481019282614a0a57600085556149cc565b82601f10614a2357805160ff19168380011785556149cc565b828001600101855582156149cc579182015b828111156149cc578251825591602001919060010190614a35565b5b808211156149d85760008155600101614a51565b803573ffffffffffffffffffffffffffffffffffffffff81168114613d3457600080fd5b60008083601f840112614a9b57600080fd5b50813567ffffffffffffffff811115614ab357600080fd5b6020830191508360208260051b8501011115614ace57600080fd5b9250929050565b600082601f830112614ae657600080fd5b81356020614afb614af683615b58565b615b09565b80838252828201915082860187848660051b8901011115614b1b57600080fd5b60005b85811015614b9b57813567ffffffffffffffff811115614b3d57600080fd5b8801603f81018a13614b4e57600080fd5b858101356040614b60614af683615b7c565b8281528c82848601011115614b7457600080fd5b828285018a8301376000928101890192909252508552509284019290840190600101614b1e565b5090979650505050505050565b600082601f830112614bb957600080fd5b81356020614bc9614af683615b58565b8281528181019085830160e080860288018501891015614be857600080fd5b60005b86811015614c9a5781838b031215614c0257600080fd5b614c0a615abc565b614c1384614d92565b8152614c20878501614a65565b878201526040614c31818601614d64565b9082015260608481013567ffffffffffffffff81168114614c5157600080fd5b908201526080614c62858201614a65565b9082015260a0614c73858201614d92565b9082015260c0614c84858201614a65565b9082015285529385019391810191600101614beb565b509198975050505050505050565b80518015158114613d3457600080fd5b60008083601f840112614cca57600080fd5b50813567ffffffffffffffff811115614ce257600080fd5b602083019150836020828501011115614ace57600080fd5b600082601f830112614d0b57600080fd5b8151614d19614af682615b7c565b818152846020838601011115614d2e57600080fd5b610ff1826020830160208701615cc6565b803561ffff81168114613d3457600080fd5b803562ffffff81168114613d3457600080fd5b803563ffffffff81168114613d3457600080fd5b805169ffffffffffffffffffff81168114613d3457600080fd5b80356bffffffffffffffffffffffff81168114613d3457600080fd5b600060208284031215614dc057600080fd5b6136ac82614a65565b60008060408385031215614ddc57600080fd5b614de583614a65565b9150614df360208401614a65565b90509250929050565b60008060408385031215614e0f57600080fd5b614e1883614a65565b9150602083013560048110614e2c57600080fd5b809150509250929050565b60008060008060608587031215614e4d57600080fd5b614e5685614a65565b935060208501359250604085013567ffffffffffffffff811115614e7957600080fd5b614e8587828801614cb8565b95989497509550505050565b600080600080600060808688031215614ea957600080fd5b614eb286614a65565b9450614ec060208701614d64565b9350614ece60408701614a65565b9250606086013567ffffffffffffffff811115614eea57600080fd5b614ef688828901614cb8565b969995985093965092949392505050565b60008060008060408587031215614f1d57600080fd5b843567ffffffffffffffff80821115614f3557600080fd5b614f4188838901614a89565b90965094506020870135915080821115614f5a57600080fd5b50614e8587828801614a89565b600080600060408486031215614f7c57600080fd5b833567ffffffffffffffff811115614f9357600080fd5b614f9f86828701614a89565b9094509250614fb2905060208501614a65565b90509250925092565b600080600060608486031215614fd057600080fd5b833567ffffffffffffffff80821115614fe857600080fd5b818601915086601f830112614ffc57600080fd5b8135602061500c614af683615b58565b8083825282820191508286018b848660051b890101111561502c57600080fd5b600096505b8487101561504f578035835260019690960195918301918301615031565b509750508701359250508082111561506657600080fd5b61507287838801614ba8565b9350604086013591508082111561508857600080fd5b5061509586828701614ad5565b9150509250925092565b6000602082840312156150b157600080fd5b6136ac82614ca8565b600080604083850312156150cd57600080fd5b6150d683614ca8565b9150602083015167ffffffffffffffff8111156150f257600080fd5b6150fe85828601614cfa565b9150509250929050565b6000806020838503121561511b57600080fd5b823567ffffffffffffffff81111561513257600080fd5b61513e85828601614cb8565b90969095509350505050565b60006020828403121561515c57600080fd5b815167ffffffffffffffff81111561517357600080fd5b610ff184828501614cfa565b60006020828403121561519157600080fd5b8151600381106136ac57600080fd5b600061018082840312156151b357600080fd5b6151bb615ae5565b6151c483614d64565b81526151d260208401614d64565b60208201526151e360408401614d51565b60408201526151f460608401614d64565b606082015261520560808401614d51565b608082015261521660a08401614d3f565b60a082015261522760c08401614d92565b60c082015261523860e08401614d64565b60e082015261010083810135908201526101208084013590820152610140615261818501614a65565b90820152610160615273848201614a65565b908201529392505050565b60006020828403121561529057600080fd5b5035919050565b6000602082840312156152a957600080fd5b5051919050565b600080604083850312156152c357600080fd5b82359150614df360208401614a65565b6000806000604084860312156152e857600080fd5b83359250602084013567ffffffffffffffff81111561530657600080fd5b61531286828701614cb8565b9497909650939450505050565b6000806040838503121561533257600080fd5b50508035926020909101359150565b6000806040838503121561535457600080fd5b82359150614df360208401614d64565b6000806040838503121561537757600080fd5b82359150614df360208401614d92565b600080600080600060a0868803121561539f57600080fd5b6153a886614d78565b94506020860151935060408601519250606086015191506153cb60808701614d78565b90509295509295909350565b8183526000602080850194508260005b858110156154205773ffffffffffffffffffffffffffffffffffffffff61540d83614a65565b16875295820195908201906001016153e7565b509495945050505050565b600081518084526020808501808196508360051b8101915082860160005b85811015615473578284038952615461848351615480565b98850198935090840190600101615449565b5091979650505050505050565b60008151808452615498816020860160208601615cc6565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b600381106154da576154da615dd2565b9052565b805163ffffffff16825260208101516154ff602084018263ffffffff169052565b506040810151615516604084018262ffffff169052565b50606081015161552e606084018263ffffffff169052565b506080810151615545608084018262ffffff169052565b5060a081015161555b60a084018261ffff169052565b5060c081015161557b60c08401826bffffffffffffffffffffffff169052565b5060e081015161559360e084018263ffffffff169052565b50610100818101519083015261012080820151908301526101408082015173ffffffffffffffffffffffffffffffffffffffff81168285015250506101608181015173ffffffffffffffffffffffffffffffffffffffff8116848301525b50505050565b60008251615609818460208701615cc6565b9190910192915050565b600061010073ffffffffffffffffffffffffffffffffffffffff808c16845263ffffffff8b1660208501528160408501526156508285018b615480565b6bffffffffffffffffffffffff998a16606086015297811660808501529590951660a08301525067ffffffffffffffff9290921660c083015290931660e090930192909252949350505050565b6040815260006156b16040830186886153d7565b82810360208401526156c48185876153d7565b979650505050505050565b60006060808352858184015260807f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff87111561570a57600080fd5b8660051b808983870137808501905081810160008152602083878403018188015281895180845260a093508385019150828b01945060005b818110156157f957855180516bffffffffffffffffffffffff1684528481015173ffffffffffffffffffffffffffffffffffffffff9081168686015260408083015163ffffffff16908601528982015167ffffffffffffffff168a860152888201511688850152858101516157c6878601826bffffffffffffffffffffffff169052565b5060c09081015173ffffffffffffffffffffffffffffffffffffffff16908401529483019460e090920191600101615742565b5050878103604089015261580d818a61542b565b9c9b505050505050505050505050565b6020808252825182820181905260009190848201906040850190845b8181101561585557835183529284019291840191600101615839565b50909695505050505050565b6020815260006136ac6020830184615480565b60a08152600061588760a0830188615480565b90508560208301528460408301528360608301528260808301529695505050505050565b600060208083526000845481600182811c9150808316806158cd57607f831692505b858310811415615904577f4e487b710000000000000000000000000000000000000000000000000000000085526022600452602485fd5b87860183815260200181801561592157600181146159505761597b565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0086168252878201965061597b565b60008b81526020902060005b868110156159755781548482015290850190890161595c565b83019750505b50949998505050505050505050565b602081016004831061599e5761599e615dd2565b91905290565b602081016107cc82846154ca565b6159bc81856154ca565b6159c960208201846154ca565b606060408201526000611b7e6060830184615480565b61018081016107cc82846154de565b600061022080830163ffffffff875116845260206bffffffffffffffffffffffff8189015116818601526040880151604086015260608801516060860152615a3960808601886154de565b6102008501929092528451908190526102408401918086019160005b81811015615a8757835173ffffffffffffffffffffffffffffffffffffffff1685529382019392820192600101615a55565b509298975050505050505050565b6bffffffffffffffffffffffff83168152604060208201526000610ff16040830184615480565b60405160e0810167ffffffffffffffff81118282101715615adf57615adf615e5f565b60405290565b604051610180810167ffffffffffffffff81118282101715615adf57615adf615e5f565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715615b5057615b50615e5f565b604052919050565b600067ffffffffffffffff821115615b7257615b72615e5f565b5060051b60200190565b600067ffffffffffffffff821115615b9657615b96615e5f565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b60008219821115615bd557615bd5615da3565b500190565b60006bffffffffffffffffffffffff808316818516808303821115615c0157615c01615da3565b01949350505050565b600082615c40577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615615c7d57615c7d615da3565b500290565b600082821015615c9457615c94615da3565b500390565b60006bffffffffffffffffffffffff83811690831681811015615cbe57615cbe615da3565b039392505050565b60005b83811015615ce1578181015183820152602001615cc9565b838111156155f15750506000910152565b600181811c90821680615d0657607f821691505b60208210811415615d40577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415615d7857615d78615da3565b5060010190565b600063ffffffff80831681811415615d9957615d99615da3565b6001019392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea164736f6c6343000806000a", } var KeeperRegistryABI = KeeperRegistryMetaData.ABI diff --git a/core/gethwrappers/generated/keeper_registry_wrapper_2_1/keeper_registry_wrapper_2_1.go b/core/gethwrappers/generated/keeper_registry_wrapper_2_1/keeper_registry_wrapper_2_1.go index fc9d120c5e3..54f69961fec 100644 --- a/core/gethwrappers/generated/keeper_registry_wrapper_2_1/keeper_registry_wrapper_2_1.go +++ b/core/gethwrappers/generated/keeper_registry_wrapper_2_1/keeper_registry_wrapper_2_1.go @@ -30,7 +30,7 @@ var ( _ = abi.ConvertType ) -type KeeperRegistryBase21OnchainConfig struct { +type IAutomationV21PlusCommonOnchainConfigLegacy struct { PaymentPremiumPPB uint32 FlatFeeMicroLink uint32 CheckGasLimit uint32 @@ -49,7 +49,7 @@ type KeeperRegistryBase21OnchainConfig struct { } var KeeperRegistryMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"contractKeeperRegistryLogicB2_1\",\"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\":[],\"name\":\"InsufficientFunds\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidDataLength\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidPayee\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidRecipient\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidReport\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidSigner\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTransmitter\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTrigger\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTriggerType\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MaxCheckDataSizeCanOnlyIncrease\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MaxPerformDataSizeCanOnlyIncrease\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MigrationNotPermitted\",\"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\":\"OnlyPausedUpkeep\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlySimulatedBackend\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyUnpausedUpkeep\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ParameterLengthError\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PaymentGreaterThanAllLINK\",\"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\":\"UpkeepAlreadyExists\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UpkeepCancelled\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UpkeepNotCanceled\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UpkeepNotNeeded\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ValueNotChanged\",\"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\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"trigger\",\"type\":\"bytes\"}],\"name\":\"CancelledUpkeepReport\",\"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\":\"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\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"OwnerFundsWithdrawn\",\"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\":\"nonpayable\",\"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\":\"paymentPremiumPPB\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"flatFeeMicroLink\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"checkGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint24\",\"name\":\"stalenessSeconds\",\"type\":\"uint24\"},{\"internalType\":\"uint16\",\"name\":\"gasCeilingMultiplier\",\"type\":\"uint16\"},{\"internalType\":\"uint96\",\"name\":\"minUpkeepSpend\",\"type\":\"uint96\"},{\"internalType\":\"uint32\",\"name\":\"maxPerformGas\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxCheckDataSize\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxPerformDataSize\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxRevertDataSize\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"fallbackGasPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fallbackLinkPrice\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"transcoder\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"registrars\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"upkeepPrivilegeManager\",\"type\":\"address\"}],\"internalType\":\"structKeeperRegistryBase2_1.OnchainConfig\",\"name\":\"onchainConfig\",\"type\":\"tuple\"},{\"internalType\":\"uint64\",\"name\":\"offchainConfigVersion\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"offchainConfig\",\"type\":\"bytes\"}],\"name\":\"setConfigTypeSafe\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"performData\",\"type\":\"bytes\"}],\"name\":\"simulatePerformUpkeep\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"gasUsed\",\"type\":\"uint256\"}],\"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\"}]", + ABI: "[{\"inputs\":[{\"internalType\":\"contractKeeperRegistryLogicB2_1\",\"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\":[],\"name\":\"InsufficientFunds\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidDataLength\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidPayee\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidRecipient\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidReport\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidSigner\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTransmitter\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTrigger\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTriggerType\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MaxCheckDataSizeCanOnlyIncrease\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MaxPerformDataSizeCanOnlyIncrease\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MigrationNotPermitted\",\"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\":\"OnlyPausedUpkeep\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlySimulatedBackend\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyUnpausedUpkeep\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ParameterLengthError\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PaymentGreaterThanAllLINK\",\"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\":\"UpkeepAlreadyExists\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UpkeepCancelled\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UpkeepNotCanceled\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UpkeepNotNeeded\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ValueNotChanged\",\"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\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"trigger\",\"type\":\"bytes\"}],\"name\":\"CancelledUpkeepReport\",\"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\":\"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\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"OwnerFundsWithdrawn\",\"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\":\"nonpayable\",\"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\":\"paymentPremiumPPB\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"flatFeeMicroLink\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"checkGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint24\",\"name\":\"stalenessSeconds\",\"type\":\"uint24\"},{\"internalType\":\"uint16\",\"name\":\"gasCeilingMultiplier\",\"type\":\"uint16\"},{\"internalType\":\"uint96\",\"name\":\"minUpkeepSpend\",\"type\":\"uint96\"},{\"internalType\":\"uint32\",\"name\":\"maxPerformGas\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxCheckDataSize\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxPerformDataSize\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxRevertDataSize\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"fallbackGasPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fallbackLinkPrice\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"transcoder\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"registrars\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"upkeepPrivilegeManager\",\"type\":\"address\"}],\"internalType\":\"structIAutomationV21PlusCommon.OnchainConfigLegacy\",\"name\":\"onchainConfig\",\"type\":\"tuple\"},{\"internalType\":\"uint64\",\"name\":\"offchainConfigVersion\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"offchainConfig\",\"type\":\"bytes\"}],\"name\":\"setConfigTypeSafe\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"performData\",\"type\":\"bytes\"}],\"name\":\"simulatePerformUpkeep\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"gasUsed\",\"type\":\"uint256\"}],\"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: "0x6101406040523480156200001257600080fd5b50604051620054d0380380620054d08339810160408190526200003591620003df565b80816001600160a01b0316634b4fd03b6040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000075573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200009b919062000406565b826001600160a01b031663ca30e6036040518163ffffffff1660e01b8152600401602060405180830381865afa158015620000da573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001009190620003df565b836001600160a01b031663b10b673c6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156200013f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001659190620003df565b846001600160a01b0316636709d0e56040518163ffffffff1660e01b8152600401602060405180830381865afa158015620001a4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001ca9190620003df565b856001600160a01b0316635425d8ac6040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000209573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200022f9190620003df565b3380600081620002865760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620002b957620002b9816200031b565b505050846002811115620002d157620002d162000429565b60e0816002811115620002e857620002e862000429565b9052506001600160a01b0393841660805291831660a052821660c0528116610100529190911661012052506200043f9050565b336001600160a01b03821603620003755760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c6600000000000000000060448201526064016200027d565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6001600160a01b0381168114620003dc57600080fd5b50565b600060208284031215620003f257600080fd5b8151620003ff81620003c6565b9392505050565b6000602082840312156200041957600080fd5b815160038110620003ff57600080fd5b634e487b7160e01b600052602160045260246000fd5b60805160a05160c05160e051610100516101205161502f620004a16000396000818160d6015261016f01526000505060008181612eb701528181613220015281816133b30152613a4901526000505060005050600061043b015261502f6000f3fe608060405234801561001057600080fd5b50600436106100d45760003560e01c8063aed2e92911610081578063e29b753c1161005b578063e29b753c146102e8578063e3d0e712146102fb578063f2fde38b1461030e576100d4565b8063aed2e92914610262578063afcb95d71461028c578063b1dc65a4146102d5576100d4565b806381ff7048116100b257806381ff7048146101bc5780638da5cb5b14610231578063a4c0ed361461024f576100d4565b8063181f5a771461011b578063349e8cca1461016d57806379ba5097146101b4575b7f00000000000000000000000000000000000000000000000000000000000000003660008037600080366000845af43d6000803e808015610114573d6000f35b3d6000fd5b005b6101576040518060400160405280601481526020017f4b6565706572526567697374727920322e312e3000000000000000000000000081525081565b6040516101649190613cc8565b60405180910390f35b7f00000000000000000000000000000000000000000000000000000000000000005b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610164565b610119610321565b61020e60145460115463ffffffff780100000000000000000000000000000000000000000000000083048116937c01000000000000000000000000000000000000000000000000000000009093041691565b6040805163ffffffff948516815293909216602084015290820152606001610164565b60005473ffffffffffffffffffffffffffffffffffffffff1661018f565b61011961025d366004613d51565b610423565b610275610270366004613dad565b61063f565b604080519215158352602083019190915201610164565b601154601254604080516000815260208101939093527c010000000000000000000000000000000000000000000000000000000090910463ffffffff1690820152606001610164565b6101196102e3366004613e3e565b6107a7565b6101196102f63660046142b9565b6112ea565b610119610309366004614386565b6121e6565b61011961031c366004614415565b61220f565b60015473ffffffffffffffffffffffffffffffffffffffff1633146103a7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e65720000000000000000000060448201526064015b60405180910390fd5b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610492576040517fc8bad78d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b602081146104cc576040517fdfe9309000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006104da82840184614432565b60008181526004602052604090205490915065010000000000900463ffffffff90811614610534576040517f9c0083a200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008181526004602052604090206001015461056f9085906c0100000000000000000000000090046bffffffffffffffffffffffff1661447a565b600082815260046020526040902060010180546bffffffffffffffffffffffff929092166c01000000000000000000000000027fffffffffffffffff000000000000000000000000ffffffffffffffffffffffff9092169190911790556018546105da90859061449f565b6018556040516bffffffffffffffffffffffff8516815273ffffffffffffffffffffffffffffffffffffffff86169082907fafd24114486da8ebfc32f3626dada8863652e187461aa74d4bfa7348915062039060200160405180910390a35050505050565b60008061064a612223565b6012546e010000000000000000000000000000900460ff1615610699576040517f24522f3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600085815260046020908152604091829020825160e081018452815460ff811615158252610100810463ffffffff908116838601819052650100000000008304821684880152690100000000000000000090920473ffffffffffffffffffffffffffffffffffffffff16606084018190526001909401546bffffffffffffffffffffffff80821660808601526c0100000000000000000000000082041660a0850152780100000000000000000000000000000000000000000000000090041660c08301528451601f8901859004850281018501909552878552909361079893899089908190840183828082843760009201919091525061225d92505050565b9093509150505b935093915050565b60005a604080516101208101825260125460ff808216835261010080830463ffffffff90811660208601526501000000000084048116958501959095526901000000000000000000830462ffffff1660608501526c01000000000000000000000000830461ffff1660808501526e0100000000000000000000000000008304821615801560a08601526f010000000000000000000000000000008404909216151560c085015270010000000000000000000000000000000083046bffffffffffffffffffffffff1660e08501527c0100000000000000000000000000000000000000000000000000000000909204909316908201529192506108d5576040517f24522f3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336000908152600b602052604090205460ff1661091e576040517f1099ed7500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6011548a351461095a576040517fdfdcf8e700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80516109679060016144e1565b60ff16861415806109785750858414155b156109af576040517f0244f71a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6109bf8a8a8a8a8a8a8a8a612468565b60006109cb8a8a6126d1565b9050600081604001515167ffffffffffffffff8111156109ed576109ed613ef5565b604051908082528060200260200182016040528015610ab157816020015b604080516101e0810182526000610100820181815261012083018290526101408301829052610160830182905261018083018290526101a083018290526101c0830182905282526020808301829052928201819052606082018190526080820181905260a0820181905260c0820181905260e082015282527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff909201910181610a0b5790505b5090506000805b836040015151811015610efa576004600085604001518381518110610adf57610adf6144b2565b6020908102919091018101518252818101929092526040908101600020815160e081018352815460ff811615158252610100810463ffffffff90811695830195909552650100000000008104851693820193909352690100000000000000000090920473ffffffffffffffffffffffffffffffffffffffff166060830152600101546bffffffffffffffffffffffff80821660808401526c0100000000000000000000000082041660a08301527801000000000000000000000000000000000000000000000000900490911660c08201528351849083908110610bc457610bc46144b2565b602002602001015160000181905250610bf984604001518281518110610bec57610bec6144b2565b602002602001015161278c565b838281518110610c0b57610c0b6144b2565b6020026020010151608001906001811115610c2857610c286144fa565b90816001811115610c3b57610c3b6144fa565b81525050610caf85848381518110610c5557610c556144b2565b60200260200101516080015186606001518481518110610c7757610c776144b2565b60200260200101518760a001518581518110610c9557610c956144b2565b602002602001015151886000015189602001516001612837565b838281518110610cc157610cc16144b2565b6020026020010151604001906bffffffffffffffffffffffff1690816bffffffffffffffffffffffff1681525050610d4d84604001518281518110610d0857610d086144b2565b602002602001015185608001518381518110610d2657610d266144b2565b6020026020010151858481518110610d4057610d406144b2565b6020026020010151612882565b848381518110610d5f57610d5f6144b2565b6020026020010151602001858481518110610d7c57610d7c6144b2565b602002602001015160e0018281525082151515158152505050828181518110610da757610da76144b2565b60200260200101516020015115610dca57610dc3600183614529565b9150610dcf565b610ee8565b610e35838281518110610de457610de46144b2565b6020026020010151600001516060015185606001518381518110610e0a57610e0a6144b2565b60200260200101518660a001518481518110610e2857610e286144b2565b602002602001015161225d565b848381518110610e4757610e476144b2565b6020026020010151606001858481518110610e6457610e646144b2565b602002602001015160a0018281525082151515158152505050828181518110610e8f57610e8f6144b2565b602002602001015160a0015186610ea69190614544565b9550610ee884604001518281518110610ec157610ec16144b2565b6020026020010151848381518110610edb57610edb6144b2565b6020026020010151612a01565b80610ef281614557565b915050610ab8565b508061ffff16600003610f115750505050506112e0565b8351610f1e9060016144e1565b610f2d9060ff1661044c61458f565b616b6c610f3b8d601061458f565b5a610f469089614544565b610f50919061449f565b610f5a919061449f565b610f64919061449f565b9450611b58610f7761ffff8316876145fb565b610f81919061449f565b945060008060008060005b87604001515181101561118257868181518110610fab57610fab6144b2565b60200260200101516020015115611170576110078a888381518110610fd257610fd26144b2565b6020026020010151608001518a60a001518481518110610ff457610ff46144b2565b6020026020010151518c60000151612b13565b878281518110611019576110196144b2565b602002602001015160c00181815250506110758989604001518381518110611043576110436144b2565b602002602001015189848151811061105d5761105d6144b2565b60200260200101518b600001518c602001518b612b33565b9093509150611084828561447a565b9350611090838661447a565b94508681815181106110a4576110a46144b2565b6020026020010151606001511515886040015182815181106110c8576110c86144b2565b60200260200101517fad8cc9579b21dfe2c2f6ea35ba15b656e46b4f5b0cb424f52739b8ce5cac9c5b84866110fd919061447a565b8a858151811061110f5761110f6144b2565b602002602001015160a001518b868151811061112d5761112d6144b2565b602002602001015160c001518d60800151878151811061114f5761114f6144b2565b6020026020010151604051611167949392919061460f565b60405180910390a35b8061117a81614557565b915050610f8c565b5050336000908152600b6020526040902080548492506002906111ba9084906201000090046bffffffffffffffffffffffff1661447a565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff16021790555080601260000160108282829054906101000a90046bffffffffffffffffffffffff16611214919061447a565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff16021790555060008f600160038110611257576112576144b2565b602002013560001c9050600060088264ffffffffff16901c905087610100015163ffffffff168163ffffffff1611156112d657601280547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167c010000000000000000000000000000000000000000000000000000000063ffffffff8416021790555b5050505050505050505b5050505050505050565b6112f2612c26565b601f8651111561132e576040517f25d0209c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8360ff1660000361136b576040517fe77dba5600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8451865114158061138a575061138284600361464c565b60ff16865111155b156113c1576040517f1d2d1c5800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b601254600e547001000000000000000000000000000000009091046bffffffffffffffffffffffff169060005b816bffffffffffffffffffffffff1681101561145657611443600e828154811061141a5761141a6144b2565b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff168484612ca7565b508061144e81614557565b9150506113ee565b5060008060005b836bffffffffffffffffffffffff1681101561155f57600d8181548110611486576114866144b2565b600091825260209091200154600e805473ffffffffffffffffffffffffffffffffffffffff909216945090829081106114c1576114c16144b2565b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff8681168452600c8352604080852080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00001690559116808452600b90925290912080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905591508061155781614557565b91505061145d565b5061156c600d6000613b9d565b611578600e6000613b9d565b604080516080810182526000808252602082018190529181018290526060810182905290805b8c518110156119e157600c60008e83815181106115bd576115bd6144b2565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff1682528101919091526040016000205460ff1615611628576040517f77cea0fa00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168d8281518110611652576116526144b2565b602002602001015173ffffffffffffffffffffffffffffffffffffffff16036116a7576040517f815e1d6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60405180604001604052806001151581526020018260ff16815250600c60008f84815181106116d8576116d86144b2565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff1682528181019290925260400160002082518154939092015160ff16610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff921515929092167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000909316929092171790558b518c9082908110611780576117806144b2565b60200260200101519150600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036117f0576040517f58a70a0a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff82166000908152600b60209081526040918290208251608081018452905460ff80821615801584526101008304909116938301939093526bffffffffffffffffffffffff6201000082048116948301949094526e010000000000000000000000000000900490921660608301529093506118ab576040517f6a7281ad00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001835260ff80821660208086019182526bffffffffffffffffffffffff808b166060880190815273ffffffffffffffffffffffffffffffffffffffff87166000908152600b909352604092839020885181549551948a0151925184166e010000000000000000000000000000027fffffffffffff000000000000000000000000ffffffffffffffffffffffffffff939094166201000002929092167fffffffffffff000000000000000000000000000000000000000000000000ffff94909616610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff921515929092167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000090951694909417179190911692909217919091179055806119d981614557565b91505061159e565b50508a516119f79150600d9060208d0190613bbb565b508851611a0b90600e9060208c0190613bbb565b506040518061012001604052808960ff168152602001886000015163ffffffff168152602001886020015163ffffffff168152602001886060015162ffffff168152602001886080015161ffff1681526020016012600001600e9054906101000a900460ff16151581526020016012600001600f9054906101000a900460ff1615158152602001856bffffffffffffffffffffffff168152602001600063ffffffff16815250601260008201518160000160006101000a81548160ff021916908360ff16021790555060208201518160000160016101000a81548163ffffffff021916908363ffffffff16021790555060408201518160000160056101000a81548163ffffffff021916908363ffffffff16021790555060608201518160000160096101000a81548162ffffff021916908362ffffff160217905550608082015181600001600c6101000a81548161ffff021916908361ffff16021790555060a082015181600001600e6101000a81548160ff02191690831515021790555060c082015181600001600f6101000a81548160ff02191690831515021790555060e08201518160000160106101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff16021790555061010082015181600001601c6101000a81548163ffffffff021916908363ffffffff1602179055509050506040518061018001604052808860a001516bffffffffffffffffffffffff16815260200188610180015173ffffffffffffffffffffffffffffffffffffffff168152602001601360010160009054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff168152602001886040015163ffffffff1681526020018860c0015163ffffffff168152602001601360010160149054906101000a900463ffffffff1663ffffffff168152602001601360010160189054906101000a900463ffffffff1663ffffffff1681526020016013600101601c9054906101000a900463ffffffff1663ffffffff1681526020018860e0015163ffffffff16815260200188610100015163ffffffff16815260200188610120015163ffffffff168152602001886101c0015173ffffffffffffffffffffffffffffffffffffffff16815250601360008201518160000160006101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550602082015181600001600c6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060408201518160010160006101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550606082015181600101600c6101000a81548163ffffffff021916908363ffffffff16021790555060808201518160010160106101000a81548163ffffffff021916908363ffffffff16021790555060a08201518160010160146101000a81548163ffffffff021916908363ffffffff16021790555060c08201518160010160186101000a81548163ffffffff021916908363ffffffff16021790555060e082015181600101601c6101000a81548163ffffffff021916908363ffffffff1602179055506101008201518160020160006101000a81548163ffffffff021916908363ffffffff1602179055506101208201518160020160046101000a81548163ffffffff021916908363ffffffff1602179055506101408201518160020160086101000a81548163ffffffff021916908363ffffffff16021790555061016082015181600201600c6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555090505086610140015160168190555086610160015160178190555060006013600101601c9054906101000a900463ffffffff169050611fcd612eb1565b601480547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167c010000000000000000000000000000000000000000000000000000000063ffffffff93841602178082556001926018916120489185917801000000000000000000000000000000000000000000000000900416614675565b92506101000a81548163ffffffff021916908363ffffffff16021790555060008860405160200161207991906146e3565b604080518083037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe00181529190526014549091506120e290469030907801000000000000000000000000000000000000000000000000900463ffffffff168f8f8f878f8f612f66565b60115560005b6120f26009613010565b8110156121225761210f61210760098361301a565b600990613026565b508061211a81614557565b9150506120e8565b5060005b896101a0015151811015612179576121668a6101a00151828151811061214e5761214e6144b2565b6020026020010151600961304890919063ffffffff16565b508061217181614557565b915050612126565b507f1591690b8638f5fb2dbec82ac741805ac5da8b45dc5263f4875b0496fdce4e0582601154601360010160189054906101000a900463ffffffff168f8f8f878f8f6040516121d099989796959493929190614847565b60405180910390a1505050505050505050505050565b612207868686868060200190518101906122009190614978565b86866112ea565b505050505050565b612217612c26565b6122208161306a565b50565b321561225b576040517fb60ac5db00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b60125460009081906f01000000000000000000000000000000900460ff16156122b2576040517f37ed32e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b601280547fffffffffffffffffffffffffffffffff00ffffffffffffffffffffffffffffff166f010000000000000000000000000000001790556040517f4585e33b000000000000000000000000000000000000000000000000000000009061231f908590602401613cc8565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009094169390931790925290517f79188d1600000000000000000000000000000000000000000000000000000000815290935073ffffffffffffffffffffffffffffffffffffffff8616906379188d16906123f29087908790600401614ad2565b60408051808303816000875af1158015612410573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124349190614aeb565b601280547fffffffffffffffffffffffffffffffff00ffffffffffffffffffffffffffffff16905590969095509350505050565b6000878760405161247a929190614b1e565b604051908190038120612491918b90602001614b2e565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815282825280516020918201208383019092526000808452908301819052909250906000805b88811015612668576001858783602081106124fd576124fd6144b2565b61250a91901a601b6144e1565b8c8c8581811061251c5761251c6144b2565b905060200201358b8b86818110612535576125356144b2565b9050602002013560405160008152602001604052604051612572949392919093845260ff9290921660208401526040830152606082015260800190565b6020604051602081039080840390855afa158015612594573d6000803e3d6000fd5b5050604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081015173ffffffffffffffffffffffffffffffffffffffff81166000908152600c602090815290849020838501909452925460ff8082161515808552610100909204169383019390935290955093509050612642576040517f0f4c073700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b826020015160080260ff166001901b84019350808061266090614557565b9150506124e0565b50827e010101010101010101010101010101010101010101010101010101010101018416146126c3576040517fc103be2e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050505050505050505050565b61270a6040518060c001604052806000815260200160008152602001606081526020016060815260200160608152602001606081525090565b600061271883850185614c1f565b604081015151606082015151919250908114158061273b57508082608001515114155b8061274b5750808260a001515114155b15612782576040517fb55ac75400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5090505b92915050565b6000818160045b600f811015612819577fff0000000000000000000000000000000000000000000000000000000000000082168382602081106127d1576127d16144b2565b1a60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161461280757506000949350505050565b8061281181614557565b915050612793565b5081600f1a600181111561282f5761282f6144fa565b949350505050565b60008061284988878b6000015161315f565b90506000806128648b8a63ffffffff16858a8a60018b6131eb565b9092509050612873818361447a565b9b9a5050505050505050505050565b60008080808460800151600181111561289d5761289d6144fa565b036128c1576128ad868686613644565b6128bc5760009250905061079f565b612938565b6001846080015160018111156128d9576128d96144fa565b036129065760006128eb878787613738565b9250905080612900575060009250905061079f565b50612938565b6040517ff2b2d41200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b612940612eb1565b84516040015163ffffffff161161299457857fc3237c8807c467c1b39b8d0395eff077313e691bf0a7388106792564ebfd5636866040516129819190613cc8565b60405180910390a260009250905061079f565b83604001516bffffffffffffffffffffffff16846000015160a001516bffffffffffffffffffffffff1610156129f457857f377c8b0c126ae5248d27aca1c76fac4608aff85673ee3caf09747e1044549e02866040516129819190613cc8565b6001969095509350505050565b600081608001516001811115612a1957612a196144fa565b03612a8b57612a26612eb1565b6000838152600460205260409020600101805463ffffffff929092167801000000000000000000000000000000000000000000000000027fffffffff00000000ffffffffffffffffffffffffffffffffffffffffffffffff9092169190911790555050565b600181608001516001811115612aa357612aa36144fa565b03612b0f5760e08101805160009081526008602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055915191517fa4a4e334c0e330143f9437484fe516c13bc560b86b5b0daf58e7084aaac228f29190a25b5050565b6000612b2084848461315f565b90508085101561282f5750929392505050565b600080612b4e888760a001518860c0015188888860016131eb565b90925090506000612b5f828461447a565b600089815260046020526040902060010180549192508291600c90612ba39084906c0100000000000000000000000090046bffffffffffffffffffffffff16614d0c565b82546101009290920a6bffffffffffffffffffffffff81810219909316918316021790915560008a815260046020526040812060010180548594509092612bec9185911661447a565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff16021790555050965096945050505050565b60005473ffffffffffffffffffffffffffffffffffffffff16331461225b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e657200000000000000000000604482015260640161039e565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600b602090815260408083208151608081018352905460ff80821615801584526101008304909116948301949094526bffffffffffffffffffffffff6201000082048116938301939093526e0100000000000000000000000000009004909116606082015290612ea3576000816060015185612d3f9190614d0c565b90506000612d4d8583614d31565b90508083604001818151612d61919061447a565b6bffffffffffffffffffffffff16905250612d7c8582614d5c565b83606001818151612d8d919061447a565b6bffffffffffffffffffffffff90811690915273ffffffffffffffffffffffffffffffffffffffff89166000908152600b602090815260409182902087518154928901519389015160608a015186166e010000000000000000000000000000027fffffffffffff000000000000000000000000ffffffffffffffffffffffffffff919096166201000002167fffffffffffff000000000000000000000000000000000000000000000000ffff60ff95909516610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff921515929092167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000909416939093171792909216179190911790555050505b6040015190505b9392505050565b600060017f00000000000000000000000000000000000000000000000000000000000000006002811115612ee757612ee76144fa565b03612f6157606473ffffffffffffffffffffffffffffffffffffffff1663a3b1b31d6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612f38573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f5c9190614d90565b905090565b504390565b6000808a8a8a8a8a8a8a8a8a604051602001612f8a99989796959493929190614da9565b604080518083037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe001815291905280516020909101207dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167e01000000000000000000000000000000000000000000000000000000000000179b9a5050505050505050505050565b6000612786825490565b6000612eaa83836138d0565b6000612eaa8373ffffffffffffffffffffffffffffffffffffffff84166138fa565b6000612eaa8373ffffffffffffffffffffffffffffffffffffffff84166139f4565b3373ffffffffffffffffffffffffffffffffffffffff8216036130e9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640161039e565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b60008080856001811115613175576131756144fa565b03613184575062015f906131a3565b6001856001811115613198576131986144fa565b0361290657506201adb05b6131b463ffffffff8516601461458f565b6131bf8460016144e1565b6131ce9060ff16611d4c61458f565b6131d8908361449f565b6131e2919061449f565b95945050505050565b6000806000896080015161ffff1687613204919061458f565b90508380156132125750803a105b1561321a57503a5b600060027f00000000000000000000000000000000000000000000000000000000000000006002811115613250576132506144fa565b036133af5760408051600081526020810190915285156132ae57600036604051806080016040528060488152602001614fdb6048913960405160200161329893929190614e3e565b6040516020818303038152906040529050613316565b6015546132ca90640100000000900463ffffffff166004614e65565b63ffffffff1667ffffffffffffffff8111156132e8576132e8613ef5565b6040519080825280601f01601f191660200182016040528015613312576020820181803683370190505b5090505b6040517f49948e0e00000000000000000000000000000000000000000000000000000000815273420000000000000000000000000000000000000f906349948e0e90613366908490600401613cc8565b602060405180830381865afa158015613383573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906133a79190614d90565b915050613509565b60017f000000000000000000000000000000000000000000000000000000000000000060028111156133e3576133e36144fa565b0361350957841561346557606c73ffffffffffffffffffffffffffffffffffffffff1663c6f7de0e6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561343a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061345e9190614d90565b9050613509565b6000606c73ffffffffffffffffffffffffffffffffffffffff166341b247a86040518163ffffffff1660e01b815260040160c060405180830381865afa1580156134b3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906134d79190614e88565b50506015549294506134fa93505050640100000000900463ffffffff168261458f565b61350590601061458f565b9150505b8461352557808b6080015161ffff16613522919061458f565b90505b61353361ffff8716826145fb565b9050600087826135438c8e61449f565b61354d908661458f565b613557919061449f565b61356990670de0b6b3a764000061458f565b61357391906145fb565b905060008c6040015163ffffffff1664e8d4a51000613592919061458f565b898e6020015163ffffffff16858f886135ab919061458f565b6135b5919061449f565b6135c390633b9aca0061458f565b6135cd919061458f565b6135d791906145fb565b6135e1919061449f565b90506b033b2e3c9fd0803ce80000006135fa828461449f565b1115613632576040517f2ad7547a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b909c909b509950505050505050505050565b6000808380602001905181019061365b9190614ed2565b835160c00151815191925063ffffffff908116911610156136b857847f405288ea7be309e16cfdf481367f90a413e1d4634fcdaf8966546db9b93012e8856040516136a69190613cc8565b60405180910390a26000915050612eaa565b6020810151158015906136df5750602081015181516136dc9063ffffffff16613a43565b14155b806136f857506136ed612eb1565b815163ffffffff1610155b1561372d57847f6aa7f60c176da7af894b384daea2249497448137f5943c1237ada8bc92bdc301856040516136a69190613cc8565b506001949350505050565b6000806000848060200190518101906137519190614f2a565b90506000868260000151836020015184604001516040516020016137b394939291909384526020840192909252604083015260e01b7fffffffff0000000000000000000000000000000000000000000000000000000016606082015260640190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152919052805160209091012060808301519091501580159061381557508160800151613812836060015163ffffffff16613a43565b14155b806138315750613823612eb1565b826060015163ffffffff1610155b1561387b57867f6aa7f60c176da7af894b384daea2249497448137f5943c1237ada8bc92bdc301876040516138669190613cc8565b60405180910390a260009350915061079f9050565b60008181526008602052604090205460ff16156138c257867f405288ea7be309e16cfdf481367f90a413e1d4634fcdaf8966546db9b93012e8876040516138669190613cc8565b600197909650945050505050565b60008260000182815481106138e7576138e76144b2565b9060005260206000200154905092915050565b600081815260018301602052604081205480156139e357600061391e600183614544565b855490915060009061393290600190614544565b9050818114613997576000866000018281548110613952576139526144b2565b9060005260206000200154905080876000018481548110613975576139756144b2565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806139a8576139a8614fab565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050612786565b6000915050612786565b5092915050565b6000818152600183016020526040812054613a3b57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155612786565b506000612786565b600060017f00000000000000000000000000000000000000000000000000000000000000006002811115613a7957613a796144fa565b03613b93576000606473ffffffffffffffffffffffffffffffffffffffff1663a3b1b31d6040518163ffffffff1660e01b8152600401602060405180830381865afa158015613acc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613af09190614d90565b90508083101580613b0b5750610100613b098483614544565b115b15613b195750600092915050565b6040517f2b407a8200000000000000000000000000000000000000000000000000000000815260048101849052606490632b407a8290602401602060405180830381865afa158015613b6f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612eaa9190614d90565b504090565b919050565b50805460008255906000526020600020908101906122209190613c45565b828054828255906000526020600020908101928215613c35579160200282015b82811115613c3557825182547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909116178255602090920191600190910190613bdb565b50613c41929150613c45565b5090565b5b80821115613c415760008155600101613c46565b60005b83811015613c75578181015183820152602001613c5d565b50506000910152565b60008151808452613c96816020860160208601613c5a565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000612eaa6020830184613c7e565b73ffffffffffffffffffffffffffffffffffffffff8116811461222057600080fd5b8035613b9881613cdb565b60008083601f840112613d1a57600080fd5b50813567ffffffffffffffff811115613d3257600080fd5b602083019150836020828501011115613d4a57600080fd5b9250929050565b60008060008060608587031215613d6757600080fd5b8435613d7281613cdb565b935060208501359250604085013567ffffffffffffffff811115613d9557600080fd5b613da187828801613d08565b95989497509550505050565b600080600060408486031215613dc257600080fd5b83359250602084013567ffffffffffffffff811115613de057600080fd5b613dec86828701613d08565b9497909650939450505050565b60008083601f840112613e0b57600080fd5b50813567ffffffffffffffff811115613e2357600080fd5b6020830191508360208260051b8501011115613d4a57600080fd5b60008060008060008060008060e0898b031215613e5a57600080fd5b606089018a811115613e6b57600080fd5b8998503567ffffffffffffffff80821115613e8557600080fd5b613e918c838d01613d08565b909950975060808b0135915080821115613eaa57600080fd5b613eb68c838d01613df9565b909750955060a08b0135915080821115613ecf57600080fd5b50613edc8b828c01613df9565b999c989b50969995989497949560c00135949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040516101e0810167ffffffffffffffff81118282101715613f4857613f48613ef5565b60405290565b60405160c0810167ffffffffffffffff81118282101715613f4857613f48613ef5565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715613fb857613fb8613ef5565b604052919050565b600067ffffffffffffffff821115613fda57613fda613ef5565b5060051b60200190565b600082601f830112613ff557600080fd5b8135602061400a61400583613fc0565b613f71565b82815260059290921b8401810191818101908684111561402957600080fd5b8286015b8481101561404d57803561404081613cdb565b835291830191830161402d565b509695505050505050565b803560ff81168114613b9857600080fd5b63ffffffff8116811461222057600080fd5b8035613b9881614069565b62ffffff8116811461222057600080fd5b8035613b9881614086565b61ffff8116811461222057600080fd5b8035613b98816140a2565b6bffffffffffffffffffffffff8116811461222057600080fd5b8035613b98816140bd565b60006101e082840312156140f557600080fd5b6140fd613f24565b90506141088261407b565b81526141166020830161407b565b60208201526141276040830161407b565b604082015261413860608301614097565b6060820152614149608083016140b2565b608082015261415a60a083016140d7565b60a082015261416b60c0830161407b565b60c082015261417c60e0830161407b565b60e082015261010061418f81840161407b565b908201526101206141a183820161407b565b90820152610140828101359082015261016080830135908201526101806141c9818401613cfd565b908201526101a08281013567ffffffffffffffff8111156141e957600080fd5b6141f585828601613fe4565b8284015250506101c0614209818401613cfd565b9082015292915050565b803567ffffffffffffffff81168114613b9857600080fd5b600082601f83011261423c57600080fd5b813567ffffffffffffffff81111561425657614256613ef5565b61428760207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601613f71565b81815284602083860101111561429c57600080fd5b816020850160208301376000918101602001919091529392505050565b60008060008060008060c087890312156142d257600080fd5b863567ffffffffffffffff808211156142ea57600080fd5b6142f68a838b01613fe4565b9750602089013591508082111561430c57600080fd5b6143188a838b01613fe4565b965061432660408a01614058565b9550606089013591508082111561433c57600080fd5b6143488a838b016140e2565b945061435660808a01614213565b935060a089013591508082111561436c57600080fd5b5061437989828a0161422b565b9150509295509295509295565b60008060008060008060c0878903121561439f57600080fd5b863567ffffffffffffffff808211156143b757600080fd5b6143c38a838b01613fe4565b975060208901359150808211156143d957600080fd5b6143e58a838b01613fe4565b96506143f360408a01614058565b9550606089013591508082111561440957600080fd5b6143488a838b0161422b565b60006020828403121561442757600080fd5b8135612eaa81613cdb565b60006020828403121561444457600080fd5b5035919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6bffffffffffffffffffffffff8181168382160190808211156139ed576139ed61444b565b808201808211156127865761278661444b565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60ff81811683821601908111156127865761278661444b565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b61ffff8181168382160190808211156139ed576139ed61444b565b818103818111156127865761278661444b565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036145885761458861444b565b5060010190565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156145c7576145c761444b565b500290565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60008261460a5761460a6145cc565b500490565b6bffffffffffffffffffffffff851681528360208201528260408201526080606082015260006146426080830184613c7e565b9695505050505050565b600060ff821660ff84168160ff048111821515161561466d5761466d61444b565b029392505050565b63ffffffff8181168382160190808211156139ed576139ed61444b565b600081518084526020808501945080840160005b838110156146d857815173ffffffffffffffffffffffffffffffffffffffff16875295820195908201906001016146a6565b509495945050505050565b602081526146fa60208201835163ffffffff169052565b60006020830151614713604084018263ffffffff169052565b50604083015163ffffffff8116606084015250606083015162ffffff8116608084015250608083015161ffff811660a08401525060a08301516bffffffffffffffffffffffff811660c08401525060c083015163ffffffff811660e08401525060e083015161010061478c8185018363ffffffff169052565b84015190506101206147a58482018363ffffffff169052565b84015190506101406147be8482018363ffffffff169052565b840151610160848101919091528401516101808085019190915284015190506101a06148018185018373ffffffffffffffffffffffffffffffffffffffff169052565b808501519150506101e06101c08181860152614821610200860184614692565b95015173ffffffffffffffffffffffffffffffffffffffff169301929092525090919050565b600061012063ffffffff808d1684528b6020850152808b166040850152508060608401526148778184018a614692565b9050828103608084015261488b8189614692565b905060ff871660a084015282810360c08401526148a88187613c7e565b905067ffffffffffffffff851660e08401528281036101008401526148cd8185613c7e565b9c9b505050505050505050505050565b8051613b9881614069565b8051613b9881614086565b8051613b98816140a2565b8051613b98816140bd565b8051613b9881613cdb565b600082601f83011261492557600080fd5b8151602061493561400583613fc0565b82815260059290921b8401810191818101908684111561495457600080fd5b8286015b8481101561404d57805161496b81613cdb565b8352918301918301614958565b60006020828403121561498a57600080fd5b815167ffffffffffffffff808211156149a257600080fd5b908301906101e082860312156149b757600080fd5b6149bf613f24565b6149c8836148dd565b81526149d6602084016148dd565b60208201526149e7604084016148dd565b60408201526149f8606084016148e8565b6060820152614a09608084016148f3565b6080820152614a1a60a084016148fe565b60a0820152614a2b60c084016148dd565b60c0820152614a3c60e084016148dd565b60e0820152610100614a4f8185016148dd565b90820152610120614a618482016148dd565b9082015261014083810151908201526101608084015190820152610180614a89818501614909565b908201526101a08381015183811115614aa157600080fd5b614aad88828701614914565b8284015250506101c09150614ac3828401614909565b91810191909152949350505050565b82815260406020820152600061282f6040830184613c7e565b60008060408385031215614afe57600080fd5b82518015158114614b0e57600080fd5b6020939093015192949293505050565b8183823760009101908152919050565b8281526080810160608360208401379392505050565b600082601f830112614b5557600080fd5b81356020614b6561400583613fc0565b82815260059290921b84018101918181019086841115614b8457600080fd5b8286015b8481101561404d5780358352918301918301614b88565b600082601f830112614bb057600080fd5b81356020614bc061400583613fc0565b82815260059290921b84018101918181019086841115614bdf57600080fd5b8286015b8481101561404d57803567ffffffffffffffff811115614c035760008081fd5b614c118986838b010161422b565b845250918301918301614be3565b600060208284031215614c3157600080fd5b813567ffffffffffffffff80821115614c4957600080fd5b9083019060c08286031215614c5d57600080fd5b614c65613f4e565b8235815260208301356020820152604083013582811115614c8557600080fd5b614c9187828601614b44565b604083015250606083013582811115614ca957600080fd5b614cb587828601614b44565b606083015250608083013582811115614ccd57600080fd5b614cd987828601614b9f565b60808301525060a083013582811115614cf157600080fd5b614cfd87828601614b9f565b60a08301525095945050505050565b6bffffffffffffffffffffffff8281168282160390808211156139ed576139ed61444b565b60006bffffffffffffffffffffffff80841680614d5057614d506145cc565b92169190910492915050565b60006bffffffffffffffffffffffff80831681851681830481118215151615614d8757614d8761444b565b02949350505050565b600060208284031215614da257600080fd5b5051919050565b60006101208b835273ffffffffffffffffffffffffffffffffffffffff8b16602084015267ffffffffffffffff808b166040850152816060850152614df08285018b614692565b91508382036080850152614e04828a614692565b915060ff881660a085015283820360c0850152614e218288613c7e565b90861660e085015283810361010085015290506148cd8185613c7e565b828482376000838201600081528351614e5b818360208801613c5a565b0195945050505050565b600063ffffffff80831681851681830481118215151615614d8757614d8761444b565b60008060008060008060c08789031215614ea157600080fd5b865195506020870151945060408701519350606087015192506080870151915060a087015190509295509295509295565b600060408284031215614ee457600080fd5b6040516040810181811067ffffffffffffffff82111715614f0757614f07613ef5565b6040528251614f1581614069565b81526020928301519281019290925250919050565b600060a08284031215614f3c57600080fd5b60405160a0810181811067ffffffffffffffff82111715614f5f57614f5f613ef5565b806040525082518152602083015160208201526040830151614f8081614069565b60408201526060830151614f9381614069565b60608201526080928301519281019290925250919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfe307866666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666a164736f6c6343000810000a", } @@ -353,15 +353,15 @@ func (_KeeperRegistry *KeeperRegistryTransactorSession) SetConfig(signers []comm return _KeeperRegistry.Contract.SetConfig(&_KeeperRegistry.TransactOpts, signers, transmitters, f, onchainConfigBytes, offchainConfigVersion, offchainConfig) } -func (_KeeperRegistry *KeeperRegistryTransactor) SetConfigTypeSafe(opts *bind.TransactOpts, signers []common.Address, transmitters []common.Address, f uint8, onchainConfig KeeperRegistryBase21OnchainConfig, offchainConfigVersion uint64, offchainConfig []byte) (*types.Transaction, error) { +func (_KeeperRegistry *KeeperRegistryTransactor) SetConfigTypeSafe(opts *bind.TransactOpts, signers []common.Address, transmitters []common.Address, f uint8, onchainConfig IAutomationV21PlusCommonOnchainConfigLegacy, offchainConfigVersion uint64, offchainConfig []byte) (*types.Transaction, error) { return _KeeperRegistry.contract.Transact(opts, "setConfigTypeSafe", signers, transmitters, f, onchainConfig, offchainConfigVersion, offchainConfig) } -func (_KeeperRegistry *KeeperRegistrySession) SetConfigTypeSafe(signers []common.Address, transmitters []common.Address, f uint8, onchainConfig KeeperRegistryBase21OnchainConfig, offchainConfigVersion uint64, offchainConfig []byte) (*types.Transaction, error) { +func (_KeeperRegistry *KeeperRegistrySession) SetConfigTypeSafe(signers []common.Address, transmitters []common.Address, f uint8, onchainConfig IAutomationV21PlusCommonOnchainConfigLegacy, offchainConfigVersion uint64, offchainConfig []byte) (*types.Transaction, error) { return _KeeperRegistry.Contract.SetConfigTypeSafe(&_KeeperRegistry.TransactOpts, signers, transmitters, f, onchainConfig, offchainConfigVersion, offchainConfig) } -func (_KeeperRegistry *KeeperRegistryTransactorSession) SetConfigTypeSafe(signers []common.Address, transmitters []common.Address, f uint8, onchainConfig KeeperRegistryBase21OnchainConfig, offchainConfigVersion uint64, offchainConfig []byte) (*types.Transaction, error) { +func (_KeeperRegistry *KeeperRegistryTransactorSession) SetConfigTypeSafe(signers []common.Address, transmitters []common.Address, f uint8, onchainConfig IAutomationV21PlusCommonOnchainConfigLegacy, offchainConfigVersion uint64, offchainConfig []byte) (*types.Transaction, error) { return _KeeperRegistry.Contract.SetConfigTypeSafe(&_KeeperRegistry.TransactOpts, signers, transmitters, f, onchainConfig, offchainConfigVersion, offchainConfig) } @@ -4955,7 +4955,7 @@ type KeeperRegistryInterface interface { SetConfig(opts *bind.TransactOpts, signers []common.Address, transmitters []common.Address, f uint8, onchainConfigBytes []byte, offchainConfigVersion uint64, offchainConfig []byte) (*types.Transaction, error) - SetConfigTypeSafe(opts *bind.TransactOpts, signers []common.Address, transmitters []common.Address, f uint8, onchainConfig KeeperRegistryBase21OnchainConfig, offchainConfigVersion uint64, offchainConfig []byte) (*types.Transaction, error) + SetConfigTypeSafe(opts *bind.TransactOpts, signers []common.Address, transmitters []common.Address, f uint8, onchainConfig IAutomationV21PlusCommonOnchainConfigLegacy, offchainConfigVersion uint64, offchainConfig []byte) (*types.Transaction, error) SimulatePerformUpkeep(opts *bind.TransactOpts, id *big.Int, performData []byte) (*types.Transaction, error) diff --git a/core/gethwrappers/generated/upkeep_counter_wrapper/upkeep_counter_wrapper.go b/core/gethwrappers/generated/upkeep_counter_wrapper/upkeep_counter_wrapper.go index 13db591730e..5363e4e57de 100644 --- a/core/gethwrappers/generated/upkeep_counter_wrapper/upkeep_counter_wrapper.go +++ b/core/gethwrappers/generated/upkeep_counter_wrapper/upkeep_counter_wrapper.go @@ -31,8 +31,8 @@ var ( ) var UpkeepCounterMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_testRange\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_interval\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"initialBlock\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"lastBlock\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousBlock\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"counter\",\"type\":\"uint256\"}],\"name\":\"PerformingUpkeep\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"checkUpkeep\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"counter\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"eligible\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"interval\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"performData\",\"type\":\"bytes\"}],\"name\":\"performUpkeep\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"previousPerformBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_testRange\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_interval\",\"type\":\"uint256\"}],\"name\":\"setSpread\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"testRange\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", - Bin: "0x608060405234801561001057600080fd5b5060405161048338038061048383398101604081905261002f9161004d565b60009182556001556003819055436002556004819055600555610071565b6000806040838503121561006057600080fd5b505080516020909101519092909150565b610403806100806000396000f3fe608060405234801561001057600080fd5b50600436106100be5760003560e01c80637f407edf11610076578063917d895f1161005b578063917d895f14610150578063947a36fb14610159578063d832d92f1461016257600080fd5b80637f407edf14610127578063806b984f1461014757600080fd5b806361bc221a116100a757806361bc221a146100f45780636250a13a146100fd5780636e04ff0d1461010657600080fd5b80632cb15864146100c35780634585e33b146100df575b600080fd5b6100cc60045481565b6040519081526020015b60405180910390f35b6100f26100ed366004610291565b61017a565b005b6100cc60055481565b6100cc60005481565b610119610114366004610291565b6101fd565b6040516100d6929190610303565b6100f2610135366004610379565b60009182556001556004819055600555565b6100cc60025481565b6100cc60035481565b6100cc60015481565b61016a61024f565b60405190151581526020016100d6565b60045460000361018957436004555b4360025560055461019b9060016103ca565b600581905560045460025460035460408051938452602084019290925290820152606081019190915232907f8e8112f20a2134e18e591d2cdd68cd86a95d06e6328ede501fc6314f4a5075fa9060800160405180910390a25050600254600355565b6000606061020961024f565b848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250959a92995091975050505050505050565b60006004546000036102615750600190565b60005460045461027190436103e3565b10801561028c575060015460025461028990436103e3565b10155b905090565b600080602083850312156102a457600080fd5b823567ffffffffffffffff808211156102bc57600080fd5b818501915085601f8301126102d057600080fd5b8135818111156102df57600080fd5b8660208285010111156102f157600080fd5b60209290920196919550909350505050565b821515815260006020604081840152835180604085015260005b818110156103395785810183015185820160600152820161031d565b5060006060828601015260607fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f830116850101925050509392505050565b6000806040838503121561038c57600080fd5b50508035926020909101359150565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b808201808211156103dd576103dd61039b565b92915050565b818103818111156103dd576103dd61039b56fea164736f6c6343000810000a", + ABI: "[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_testRange\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_interval\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"initialTimestamp\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"lastTimestamp\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousBlock\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"counter\",\"type\":\"uint256\"}],\"name\":\"PerformingUpkeep\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"checkUpkeep\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"counter\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"eligible\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialTimestamp\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"interval\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastTimestamp\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"performData\",\"type\":\"bytes\"}],\"name\":\"performUpkeep\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"previousPerformBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_testRange\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_interval\",\"type\":\"uint256\"}],\"name\":\"setSpread\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"testRange\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", + Bin: "0x608060405234801561001057600080fd5b5060405161048338038061048383398101604081905261002f9161004d565b60009182556001556003819055426002556004819055600555610071565b6000806040838503121561006057600080fd5b505080516020909101519092909150565b610403806100806000396000f3fe608060405234801561001057600080fd5b50600436106100be5760003560e01c80637f407edf11610076578063947a36fb1161005b578063947a36fb14610150578063d6d1417114610159578063d832d92f1461016257600080fd5b80637f407edf14610127578063917d895f1461014757600080fd5b806361bc221a116100a757806361bc221a146100f45780636250a13a146100fd5780636e04ff0d1461010657600080fd5b806319d8ac61146100c35780634585e33b146100df575b600080fd5b6100cc60025481565b6040519081526020015b60405180910390f35b6100f26100ed366004610291565b61017a565b005b6100cc60055481565b6100cc60005481565b610119610114366004610291565b6101fd565b6040516100d6929190610303565b6100f2610135366004610379565b60009182556001556004819055600555565b6100cc60035481565b6100cc60015481565b6100cc60045481565b61016a61024f565b60405190151581526020016100d6565b60045460000361018957426004555b4260025560055461019b9060016103ca565b600581905560045460025460035460408051938452602084019290925290820152606081019190915232907f8e8112f20a2134e18e591d2cdd68cd86a95d06e6328ede501fc6314f4a5075fa9060800160405180910390a25050600254600355565b6000606061020961024f565b848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250959a92995091975050505050505050565b60006004546000036102615750600190565b60005460045461027190426103e3565b10801561028c575060015460025461028990426103e3565b10155b905090565b600080602083850312156102a457600080fd5b823567ffffffffffffffff808211156102bc57600080fd5b818501915085601f8301126102d057600080fd5b8135818111156102df57600080fd5b8660208285010111156102f157600080fd5b60209290920196919550909350505050565b821515815260006020604081840152835180604085015260005b818110156103395785810183015185820160600152820161031d565b5060006060828601015260607fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f830116850101925050509392505050565b6000806040838503121561038c57600080fd5b50508035926020909101359150565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b808201808211156103dd576103dd61039b565b92915050565b818103818111156103dd576103dd61039b56fea164736f6c6343000810000a", } var UpkeepCounterABI = UpkeepCounterMetaData.ABI @@ -238,9 +238,9 @@ func (_UpkeepCounter *UpkeepCounterCallerSession) Eligible() (bool, error) { return _UpkeepCounter.Contract.Eligible(&_UpkeepCounter.CallOpts) } -func (_UpkeepCounter *UpkeepCounterCaller) InitialBlock(opts *bind.CallOpts) (*big.Int, error) { +func (_UpkeepCounter *UpkeepCounterCaller) InitialTimestamp(opts *bind.CallOpts) (*big.Int, error) { var out []interface{} - err := _UpkeepCounter.contract.Call(opts, &out, "initialBlock") + err := _UpkeepCounter.contract.Call(opts, &out, "initialTimestamp") if err != nil { return *new(*big.Int), err @@ -252,12 +252,12 @@ func (_UpkeepCounter *UpkeepCounterCaller) InitialBlock(opts *bind.CallOpts) (*b } -func (_UpkeepCounter *UpkeepCounterSession) InitialBlock() (*big.Int, error) { - return _UpkeepCounter.Contract.InitialBlock(&_UpkeepCounter.CallOpts) +func (_UpkeepCounter *UpkeepCounterSession) InitialTimestamp() (*big.Int, error) { + return _UpkeepCounter.Contract.InitialTimestamp(&_UpkeepCounter.CallOpts) } -func (_UpkeepCounter *UpkeepCounterCallerSession) InitialBlock() (*big.Int, error) { - return _UpkeepCounter.Contract.InitialBlock(&_UpkeepCounter.CallOpts) +func (_UpkeepCounter *UpkeepCounterCallerSession) InitialTimestamp() (*big.Int, error) { + return _UpkeepCounter.Contract.InitialTimestamp(&_UpkeepCounter.CallOpts) } func (_UpkeepCounter *UpkeepCounterCaller) Interval(opts *bind.CallOpts) (*big.Int, error) { @@ -282,9 +282,9 @@ func (_UpkeepCounter *UpkeepCounterCallerSession) Interval() (*big.Int, error) { return _UpkeepCounter.Contract.Interval(&_UpkeepCounter.CallOpts) } -func (_UpkeepCounter *UpkeepCounterCaller) LastBlock(opts *bind.CallOpts) (*big.Int, error) { +func (_UpkeepCounter *UpkeepCounterCaller) LastTimestamp(opts *bind.CallOpts) (*big.Int, error) { var out []interface{} - err := _UpkeepCounter.contract.Call(opts, &out, "lastBlock") + err := _UpkeepCounter.contract.Call(opts, &out, "lastTimestamp") if err != nil { return *new(*big.Int), err @@ -296,12 +296,12 @@ func (_UpkeepCounter *UpkeepCounterCaller) LastBlock(opts *bind.CallOpts) (*big. } -func (_UpkeepCounter *UpkeepCounterSession) LastBlock() (*big.Int, error) { - return _UpkeepCounter.Contract.LastBlock(&_UpkeepCounter.CallOpts) +func (_UpkeepCounter *UpkeepCounterSession) LastTimestamp() (*big.Int, error) { + return _UpkeepCounter.Contract.LastTimestamp(&_UpkeepCounter.CallOpts) } -func (_UpkeepCounter *UpkeepCounterCallerSession) LastBlock() (*big.Int, error) { - return _UpkeepCounter.Contract.LastBlock(&_UpkeepCounter.CallOpts) +func (_UpkeepCounter *UpkeepCounterCallerSession) LastTimestamp() (*big.Int, error) { + return _UpkeepCounter.Contract.LastTimestamp(&_UpkeepCounter.CallOpts) } func (_UpkeepCounter *UpkeepCounterCaller) PreviousPerformBlock(opts *bind.CallOpts) (*big.Int, error) { @@ -433,12 +433,12 @@ func (it *UpkeepCounterPerformingUpkeepIterator) Close() error { } type UpkeepCounterPerformingUpkeep struct { - From common.Address - InitialBlock *big.Int - LastBlock *big.Int - PreviousBlock *big.Int - Counter *big.Int - Raw types.Log + From common.Address + InitialTimestamp *big.Int + LastTimestamp *big.Int + PreviousBlock *big.Int + Counter *big.Int + Raw types.Log } func (_UpkeepCounter *UpkeepCounterFilterer) FilterPerformingUpkeep(opts *bind.FilterOpts, from []common.Address) (*UpkeepCounterPerformingUpkeepIterator, error) { @@ -528,11 +528,11 @@ type UpkeepCounterInterface interface { Eligible(opts *bind.CallOpts) (bool, error) - InitialBlock(opts *bind.CallOpts) (*big.Int, error) + InitialTimestamp(opts *bind.CallOpts) (*big.Int, error) Interval(opts *bind.CallOpts) (*big.Int, error) - LastBlock(opts *bind.CallOpts) (*big.Int, error) + LastTimestamp(opts *bind.CallOpts) (*big.Int, error) PreviousPerformBlock(opts *bind.CallOpts) (*big.Int, error) diff --git a/core/gethwrappers/generated/verifiable_load_log_trigger_upkeep_wrapper/verifiable_load_log_trigger_upkeep_wrapper.go b/core/gethwrappers/generated/verifiable_load_log_trigger_upkeep_wrapper/verifiable_load_log_trigger_upkeep_wrapper.go index db821ffe330..f300359b26e 100644 --- a/core/gethwrappers/generated/verifiable_load_log_trigger_upkeep_wrapper/verifiable_load_log_trigger_upkeep_wrapper.go +++ b/core/gethwrappers/generated/verifiable_load_log_trigger_upkeep_wrapper/verifiable_load_log_trigger_upkeep_wrapper.go @@ -30,7 +30,7 @@ var ( _ = abi.ConvertType ) -type KeeperRegistryBase21UpkeepInfo struct { +type IAutomationV21PlusCommonUpkeepInfoLegacy struct { Target common.Address PerformGas uint32 CheckData []byte @@ -55,7 +55,7 @@ type Log struct { } var VerifiableLoadLogTriggerUpkeepMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"contractAutomationRegistrar2_1\",\"name\":\"_registrar\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_useArb\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"_useMercury\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"IndexOutOfRange\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"feedParamKey\",\"type\":\"string\"},{\"internalType\":\"string[]\",\"name\":\"feeds\",\"type\":\"string[]\"},{\"internalType\":\"string\",\"name\":\"timeParamKey\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"time\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"StreamsLookup\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"blockNum\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"LogEmitted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"blockNum\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"LogEmittedAgain\",\"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\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"blockNum\",\"type\":\"uint256\"}],\"name\":\"UpkeepTopUp\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BUCKET_SIZE\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"addFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"addLinkAmount\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"upkeepIds\",\"type\":\"uint256[]\"}],\"name\":\"batchCancelUpkeeps\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"upkeepIds\",\"type\":\"uint256[]\"},{\"internalType\":\"uint8\",\"name\":\"selector\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"topic0\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"topic1\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"topic2\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"topic3\",\"type\":\"bytes32\"}],\"name\":\"batchPreparingUpkeeps\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"upkeepIds\",\"type\":\"uint256[]\"},{\"internalType\":\"uint8\",\"name\":\"log\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"selector\",\"type\":\"uint8\"}],\"name\":\"batchPreparingUpkeepsSimple\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"number\",\"type\":\"uint8\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint8\",\"name\":\"triggerType\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"triggerConfig\",\"type\":\"bytes\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"checkGasToBurn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"performGasToBurn\",\"type\":\"uint256\"}],\"name\":\"batchRegisterUpkeeps\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"log\",\"type\":\"uint8\"}],\"name\":\"batchSendLogs\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"upkeepIds\",\"type\":\"uint256[]\"},{\"internalType\":\"uint32\",\"name\":\"interval\",\"type\":\"uint32\"}],\"name\":\"batchSetIntervals\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"upkeepIds\",\"type\":\"uint256[]\"}],\"name\":\"batchUpdatePipelineData\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"upkeepIds\",\"type\":\"uint256[]\"}],\"name\":\"batchWithdrawLinks\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"bucketedDelays\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"buckets\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"startGas\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"blockNum\",\"type\":\"uint256\"}],\"name\":\"burnPerformGas\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes[]\",\"name\":\"values\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"checkCallback\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"errCode\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"checkErrorHandler\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"upkeepNeeded\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"performData\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"checkGasToBurns\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"txHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"source\",\"type\":\"address\"},{\"internalType\":\"bytes32[]\",\"name\":\"topics\",\"type\":\"bytes32[]\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"internalType\":\"structLog\",\"name\":\"log\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"checkData\",\"type\":\"bytes\"}],\"name\":\"checkLog\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"counters\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"delays\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"dummyMap\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"eligible\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"emittedAgainSig\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"emittedSig\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"feedParamKey\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"feedsHex\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"firstPerformBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"gasLimits\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"startIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxCount\",\"type\":\"uint256\"}],\"name\":\"getActiveUpkeepIDsDeployedByThisContract\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"startIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxCount\",\"type\":\"uint256\"}],\"name\":\"getAllActiveUpkeepIDsOnRegistry\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"getBalance\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"balance\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"uint16\",\"name\":\"bucket\",\"type\":\"uint16\"}],\"name\":\"getBucketedDelays\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"getBucketedDelaysLength\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"getDelays\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"getDelaysLength\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepID\",\"type\":\"uint256\"}],\"name\":\"getForwarder\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"selector\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"topic0\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"topic1\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"topic2\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"topic3\",\"type\":\"bytes32\"}],\"name\":\"getLogTriggerConfig\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"logTrigger\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"getMinBalanceForUpkeep\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"p\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"n\",\"type\":\"uint256\"}],\"name\":\"getPxDelayLastNPerforms\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"uint16\",\"name\":\"bucket\",\"type\":\"uint16\"}],\"name\":\"getSumDelayInBucket\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"n\",\"type\":\"uint256\"}],\"name\":\"getSumDelayLastNPerforms\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"getTriggerType\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"getUpkeepInfo\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"performGas\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"checkData\",\"type\":\"bytes\"},{\"internalType\":\"uint96\",\"name\":\"balance\",\"type\":\"uint96\"},{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"maxValidBlocknumber\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"lastPerformedBlockNumber\",\"type\":\"uint32\"},{\"internalType\":\"uint96\",\"name\":\"amountSpent\",\"type\":\"uint96\"},{\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"offchainConfig\",\"type\":\"bytes\"}],\"internalType\":\"structKeeperRegistryBase2_1.UpkeepInfo\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"getUpkeepPrivilegeConfig\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"getUpkeepTriggerConfig\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"intervals\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"lastTopUpBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"linkToken\",\"outputs\":[{\"internalType\":\"contractLinkTokenInterface\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"logNum\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minBalanceThresholdMultiplier\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"performDataSizes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"performGasToBurns\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"performData\",\"type\":\"bytes\"}],\"name\":\"performUpkeep\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"previousPerformBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"registrar\",\"outputs\":[{\"internalType\":\"contractAutomationRegistrar2_1\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"registry\",\"outputs\":[{\"internalType\":\"contractIKeeperRegistryMaster\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"log\",\"type\":\"uint8\"}],\"name\":\"sendLog\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractAutomationRegistrar2_1\",\"name\":\"newRegistrar\",\"type\":\"address\"}],\"name\":\"setConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string[]\",\"name\":\"_feeds\",\"type\":\"string[]\"}],\"name\":\"setFeeds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_interval\",\"type\":\"uint256\"}],\"name\":\"setInterval\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"_log\",\"type\":\"uint8\"}],\"name\":\"setLog\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_feedParamKey\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_timeParamKey\",\"type\":\"string\"}],\"name\":\"setParamKeys\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"setPerformDataSize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"}],\"name\":\"setUpkeepGasLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"cfg\",\"type\":\"bytes\"}],\"name\":\"setUpkeepPrivilegeConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeParamKey\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"blockNum\",\"type\":\"uint256\"}],\"name\":\"topUpFund\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"selector\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"topic0\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"topic1\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"topic2\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"topic3\",\"type\":\"bytes32\"}],\"name\":\"updateLogTriggerConfig1\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"cfg\",\"type\":\"bytes\"}],\"name\":\"updateLogTriggerConfig2\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"pipelineData\",\"type\":\"bytes\"}],\"name\":\"updateUpkeepPipelineData\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"upkeepTopUpCheckInterval\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"useArbitrumBlockNum\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"useMercury\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"withdrawLinks\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"withdrawLinks\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", + ABI: "[{\"inputs\":[{\"internalType\":\"contractAutomationRegistrar2_1\",\"name\":\"_registrar\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_useArb\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"_useMercury\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"IndexOutOfRange\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"feedParamKey\",\"type\":\"string\"},{\"internalType\":\"string[]\",\"name\":\"feeds\",\"type\":\"string[]\"},{\"internalType\":\"string\",\"name\":\"timeParamKey\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"time\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"StreamsLookup\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"blockNum\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"LogEmitted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"blockNum\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"LogEmittedAgain\",\"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\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"blockNum\",\"type\":\"uint256\"}],\"name\":\"UpkeepTopUp\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BUCKET_SIZE\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"addFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"addLinkAmount\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"upkeepIds\",\"type\":\"uint256[]\"}],\"name\":\"batchCancelUpkeeps\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"upkeepIds\",\"type\":\"uint256[]\"},{\"internalType\":\"uint8\",\"name\":\"selector\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"topic0\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"topic1\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"topic2\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"topic3\",\"type\":\"bytes32\"}],\"name\":\"batchPreparingUpkeeps\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"upkeepIds\",\"type\":\"uint256[]\"},{\"internalType\":\"uint8\",\"name\":\"log\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"selector\",\"type\":\"uint8\"}],\"name\":\"batchPreparingUpkeepsSimple\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"number\",\"type\":\"uint8\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint8\",\"name\":\"triggerType\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"triggerConfig\",\"type\":\"bytes\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"checkGasToBurn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"performGasToBurn\",\"type\":\"uint256\"}],\"name\":\"batchRegisterUpkeeps\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"log\",\"type\":\"uint8\"}],\"name\":\"batchSendLogs\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"upkeepIds\",\"type\":\"uint256[]\"},{\"internalType\":\"uint32\",\"name\":\"interval\",\"type\":\"uint32\"}],\"name\":\"batchSetIntervals\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"upkeepIds\",\"type\":\"uint256[]\"}],\"name\":\"batchUpdatePipelineData\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"upkeepIds\",\"type\":\"uint256[]\"}],\"name\":\"batchWithdrawLinks\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"bucketedDelays\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"buckets\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"startGas\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"blockNum\",\"type\":\"uint256\"}],\"name\":\"burnPerformGas\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes[]\",\"name\":\"values\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"checkCallback\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"errCode\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"checkErrorHandler\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"upkeepNeeded\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"performData\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"checkGasToBurns\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"txHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"source\",\"type\":\"address\"},{\"internalType\":\"bytes32[]\",\"name\":\"topics\",\"type\":\"bytes32[]\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"internalType\":\"structLog\",\"name\":\"log\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"checkData\",\"type\":\"bytes\"}],\"name\":\"checkLog\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"counters\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"delays\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"dummyMap\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"eligible\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"emittedAgainSig\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"emittedSig\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"feedParamKey\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"feedsHex\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"firstPerformBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"gasLimits\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"startIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxCount\",\"type\":\"uint256\"}],\"name\":\"getActiveUpkeepIDsDeployedByThisContract\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"startIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxCount\",\"type\":\"uint256\"}],\"name\":\"getAllActiveUpkeepIDsOnRegistry\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"getBalance\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"balance\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"uint16\",\"name\":\"bucket\",\"type\":\"uint16\"}],\"name\":\"getBucketedDelays\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"getBucketedDelaysLength\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"getDelays\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"getDelaysLength\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepID\",\"type\":\"uint256\"}],\"name\":\"getForwarder\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"selector\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"topic0\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"topic1\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"topic2\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"topic3\",\"type\":\"bytes32\"}],\"name\":\"getLogTriggerConfig\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"logTrigger\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"getMinBalanceForUpkeep\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"p\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"n\",\"type\":\"uint256\"}],\"name\":\"getPxDelayLastNPerforms\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"uint16\",\"name\":\"bucket\",\"type\":\"uint16\"}],\"name\":\"getSumDelayInBucket\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"n\",\"type\":\"uint256\"}],\"name\":\"getSumDelayLastNPerforms\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"getTriggerType\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"getUpkeepInfo\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"performGas\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"checkData\",\"type\":\"bytes\"},{\"internalType\":\"uint96\",\"name\":\"balance\",\"type\":\"uint96\"},{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"maxValidBlocknumber\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"lastPerformedBlockNumber\",\"type\":\"uint32\"},{\"internalType\":\"uint96\",\"name\":\"amountSpent\",\"type\":\"uint96\"},{\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"offchainConfig\",\"type\":\"bytes\"}],\"internalType\":\"structIAutomationV21PlusCommon.UpkeepInfoLegacy\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"getUpkeepPrivilegeConfig\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"getUpkeepTriggerConfig\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"intervals\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"lastTopUpBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"linkToken\",\"outputs\":[{\"internalType\":\"contractLinkTokenInterface\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"logNum\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minBalanceThresholdMultiplier\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"performDataSizes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"performGasToBurns\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"performData\",\"type\":\"bytes\"}],\"name\":\"performUpkeep\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"previousPerformBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"registrar\",\"outputs\":[{\"internalType\":\"contractAutomationRegistrar2_1\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"registry\",\"outputs\":[{\"internalType\":\"contractIKeeperRegistryMaster\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"log\",\"type\":\"uint8\"}],\"name\":\"sendLog\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractAutomationRegistrar2_1\",\"name\":\"newRegistrar\",\"type\":\"address\"}],\"name\":\"setConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string[]\",\"name\":\"_feeds\",\"type\":\"string[]\"}],\"name\":\"setFeeds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_interval\",\"type\":\"uint256\"}],\"name\":\"setInterval\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"_log\",\"type\":\"uint8\"}],\"name\":\"setLog\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_feedParamKey\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_timeParamKey\",\"type\":\"string\"}],\"name\":\"setParamKeys\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"setPerformDataSize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"}],\"name\":\"setUpkeepGasLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"cfg\",\"type\":\"bytes\"}],\"name\":\"setUpkeepPrivilegeConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeParamKey\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"blockNum\",\"type\":\"uint256\"}],\"name\":\"topUpFund\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"selector\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"topic0\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"topic1\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"topic2\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"topic3\",\"type\":\"bytes32\"}],\"name\":\"updateLogTriggerConfig1\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"cfg\",\"type\":\"bytes\"}],\"name\":\"updateLogTriggerConfig2\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"pipelineData\",\"type\":\"bytes\"}],\"name\":\"updateUpkeepPipelineData\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"upkeepTopUpCheckInterval\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"useArbitrumBlockNum\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"useMercury\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"withdrawLinks\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"withdrawLinks\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", Bin: "0x7f97009585a4d2440f981ab6f6eec514343e1e6b2aa9b991a26998e6806f41bf086080527fc76416badc8398ce17c93eab7b4f60f263241694cf503e4df24f233a8cc1c50d60a0526005601455601580546001600160681b0319166c140000000002c68af0bb140000179055606460e0526101c06040526042610140818152610100918291906200673e61016039815260200160405180608001604052806042815260200162006780604291399052620000be906016906002620003de565b506040805180820190915260098152680cccacac892c890caf60bb1b6020820152601790620000ee90826200055a565b5060408051808201909152600b81526a313637b1b5a73ab6b132b960a91b60208201526018906200012090826200055a565b503480156200012e57600080fd5b50604051620067c2380380620067c2833981016040819052620001519162000652565b82823380600081620001aa5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620001dd57620001dd8162000333565b5050601180546001600160a01b0319166001600160a01b038516908117909155604080516330fe427560e21b815281516000945063c3f909d4926004808401939192918290030181865afa1580156200023a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200026091906200069e565b50601380546001600160a01b0319166001600160a01b038381169190911790915560115460408051631b6b6d2360e01b81529051939450911691631b6b6d23916004808201926020929091908290030181865afa158015620002c6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620002ec9190620006cf565b601280546001600160a01b0319166001600160a01b039290921691909117905550151560c052506019805461ffff191691151561ff00191691909117905550620006f69050565b336001600160a01b038216036200038d5760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401620001a1565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b82805482825590600052602060002090810192821562000429579160200282015b828111156200042957825182906200041890826200055a565b5091602001919060010190620003ff565b50620004379291506200043b565b5090565b80821115620004375760006200045282826200045c565b506001016200043b565b5080546200046a90620004cb565b6000825580601f106200047b575050565b601f0160209004906000526020600020908101906200049b91906200049e565b50565b5b808211156200043757600081556001016200049f565b634e487b7160e01b600052604160045260246000fd5b600181811c90821680620004e057607f821691505b6020821081036200050157634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200055557600081815260208120601f850160051c81016020861015620005305750805b601f850160051c820191505b8181101562000551578281556001016200053c565b5050505b505050565b81516001600160401b03811115620005765762000576620004b5565b6200058e81620005878454620004cb565b8462000507565b602080601f831160018114620005c65760008415620005ad5750858301515b600019600386901b1c1916600185901b17855562000551565b600085815260208120601f198616915b82811015620005f757888601518255948401946001909101908401620005d6565b5085821015620006165787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6001600160a01b03811681146200049b57600080fd5b805180151581146200064d57600080fd5b919050565b6000806000606084860312156200066857600080fd5b8351620006758162000626565b925062000685602085016200063c565b915062000695604085016200063c565b90509250925092565b60008060408385031215620006b257600080fd5b8251620006bf8162000626565b6020939093015192949293505050565b600060208284031215620006e257600080fd5b8151620006ef8162000626565b9392505050565b60805160a05160c05160e051615fe46200075a6000396000818161060201526125a3015260008181610a6801526140e40152600081816108e101528181611ffa0152613b32015260008181610e0501528181611fca0152613b070152615fe46000f3fe6080604052600436106105415760003560e01c80637b103999116102af578063af953a4a11610179578063daee1aeb116100d6578063e83ce5581161008a578063fa333dfb1161006f578063fa333dfb146110a1578063fba7ffa314611154578063fcdc1f631461118157600080fd5b8063e83ce55814611062578063f2fde38b1461108157600080fd5b8063de818253116100bb578063de81825314610fcb578063e0114adb1461101f578063e45530831461104c57600080fd5b8063daee1aeb14610f8b578063dbef701e14610fab57600080fd5b8063c41c815b1161012d578063d4c2490011610112578063d4c2490014610f2b578063d6051a7214610f4b578063da6cba4714610f6b57600080fd5b8063c41c815b14610efc578063c98f10b014610f1657600080fd5b8063b657bc9c1161015e578063b657bc9c14610e9c578063becde0e114610ebc578063c041982214610edc57600080fd5b8063af953a4a14610e67578063afb28d1f14610e8757600080fd5b8063948108f7116102275780639d385eaa116101db578063a6548248116101c0578063a654824814610df3578063a6b5947514610e27578063a72aa27e14610e4757600080fd5b80639d385eaa14610db35780639d6f1cc714610dd357600080fd5b80639ac542eb1161020c5780639ac542eb14610d2b5780639b42935414610d555780639b51fb0d14610d8257600080fd5b8063948108f714610ceb57806396cebc7c14610d0b57600080fd5b806386e330af1161027e5780638da5cb5b116102635780638da5cb5b14610c735780638fcb3fba14610c9e578063924ca57814610ccb57600080fd5b806386e330af14610c33578063873c758614610c5357600080fd5b80637b10399914610ba65780637e7a46dc14610bd35780638243444a14610bf35780638340507c14610c1357600080fd5b80634585e33b1161040b57806360457ff51161036857806373644cce1161031c578063776898c811610301578063776898c814610b5157806379ba509714610b7157806379ea994314610b8657600080fd5b806373644cce14610af75780637672130314610b2457600080fd5b8063642f6cef1161034d578063642f6cef14610a5657806369cdbadb14610a9a5780637145f11b14610ac757600080fd5b806360457ff514610a04578063636092e814610a3157600080fd5b80635147cd59116103bf57806357970e93116103a457806357970e93146109a25780635d4ee7f3146109cf5780635f17e616146109e457600080fd5b80635147cd591461095057806351c98be31461098257600080fd5b806346982093116103f057806346982093146108cf57806346e7a63e146109035780634b56a42e1461093057600080fd5b80634585e33b1461088257806345d2ec17146108a257600080fd5b8063207b6516116104b95780632a9032d31161046d578063328ffd1111610452578063328ffd11146108155780633ebe8d6c1461084257806340691db41461086257600080fd5b80632a9032d3146107a35780632b20e397146107c357600080fd5b80632636aecf1161049e5780632636aecf1461073657806328c4b57b1461075657806329e0a8411461077657600080fd5b8063207b6516146106f657806320e3dbd41461071657600080fd5b806312c55027116105105780631cdde251116104f55780631cdde251146106645780631e01043914610684578063206c32e8146106c157600080fd5b806312c55027146105f057806319d97a941461063757600080fd5b806306c1cc001461054d578063077ac6211461056f5780630b7d33e6146105a25780630fb172fb146105c257600080fd5b3661054857005b600080fd5b34801561055957600080fd5b5061056d610568366004614866565b6111ae565b005b34801561057b57600080fd5b5061058f61058a366004614919565b6113fd565b6040519081526020015b60405180910390f35b3480156105ae57600080fd5b5061056d6105bd36600461494e565b61143b565b3480156105ce57600080fd5b506105e26105dd36600461494e565b6114c9565b604051610599929190614a03565b3480156105fc57600080fd5b506106247f000000000000000000000000000000000000000000000000000000000000000081565b60405161ffff9091168152602001610599565b34801561064357600080fd5b50610657610652366004614a1e565b6114e1565b6040516105999190614a37565b34801561067057600080fd5b5061056d61067f366004614a6c565b61159e565b34801561069057600080fd5b506106a461069f366004614a1e565b6116db565b6040516bffffffffffffffffffffffff9091168152602001610599565b3480156106cd57600080fd5b506106e16106dc366004614ad1565b611770565b60408051928352602083019190915201610599565b34801561070257600080fd5b50610657610711366004614a1e565b6117f2565b34801561072257600080fd5b5061056d610731366004614afd565b61184a565b34801561074257600080fd5b5061056d610751366004614b5f565b611a14565b34801561076257600080fd5b5061058f610771366004614bd9565b611cdd565b34801561078257600080fd5b50610796610791366004614a1e565b611d48565b6040516105999190614c05565b3480156107af57600080fd5b5061056d6107be366004614d46565b611e4d565b3480156107cf57600080fd5b506011546107f09073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610599565b34801561082157600080fd5b5061058f610830366004614a1e565b60036020526000908152604090205481565b34801561084e57600080fd5b5061058f61085d366004614a1e565b611f2e565b34801561086e57600080fd5b506105e261087d366004614d88565b611f97565b34801561088e57600080fd5b5061056d61089d366004614e2d565b61249d565b3480156108ae57600080fd5b506108c26108bd366004614ad1565b6126ec565b6040516105999190614e63565b3480156108db57600080fd5b5061058f7f000000000000000000000000000000000000000000000000000000000000000081565b34801561090f57600080fd5b5061058f61091e366004614a1e565b600a6020526000908152604090205481565b34801561093c57600080fd5b506105e261094b366004614ecb565b61275b565b34801561095c57600080fd5b5061097061096b366004614a1e565b6127af565b60405160ff9091168152602001610599565b34801561098e57600080fd5b5061056d61099d366004614f88565b612843565b3480156109ae57600080fd5b506012546107f09073ffffffffffffffffffffffffffffffffffffffff1681565b3480156109db57600080fd5b5061056d6128e7565b3480156109f057600080fd5b5061056d6109ff366004614fdf565b612a22565b348015610a1057600080fd5b5061058f610a1f366004614a1e565b60076020526000908152604090205481565b348015610a3d57600080fd5b506015546106a4906bffffffffffffffffffffffff1681565b348015610a6257600080fd5b50610a8a7f000000000000000000000000000000000000000000000000000000000000000081565b6040519015158152602001610599565b348015610aa657600080fd5b5061058f610ab5366004614a1e565b60086020526000908152604090205481565b348015610ad357600080fd5b50610a8a610ae2366004614a1e565b600b6020526000908152604090205460ff1681565b348015610b0357600080fd5b5061058f610b12366004614a1e565b6000908152600c602052604090205490565b348015610b3057600080fd5b5061058f610b3f366004614a1e565b60046020526000908152604090205481565b348015610b5d57600080fd5b50610a8a610b6c366004614a1e565b612aef565b348015610b7d57600080fd5b5061056d612b41565b348015610b9257600080fd5b506107f0610ba1366004614a1e565b612c3e565b348015610bb257600080fd5b506013546107f09073ffffffffffffffffffffffffffffffffffffffff1681565b348015610bdf57600080fd5b5061056d610bee366004615001565b612cd2565b348015610bff57600080fd5b5061056d610c0e366004615001565b612d63565b348015610c1f57600080fd5b5061056d610c2e36600461504d565b612dbd565b348015610c3f57600080fd5b5061056d610c4e36600461509a565b612ddb565b348015610c5f57600080fd5b506108c2610c6e366004614fdf565b612dee565b348015610c7f57600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff166107f0565b348015610caa57600080fd5b5061058f610cb9366004614a1e565b60056020526000908152604090205481565b348015610cd757600080fd5b5061056d610ce6366004614fdf565b612eab565b348015610cf757600080fd5b5061056d610d0636600461514b565b6130f0565b348015610d1757600080fd5b5061056d610d2636600461517b565b613208565b348015610d3757600080fd5b50601554610970906c01000000000000000000000000900460ff1681565b348015610d6157600080fd5b5061056d610d70366004614fdf565b60009182526009602052604090912055565b348015610d8e57600080fd5b50610624610d9d366004614a1e565b600e6020526000908152604090205461ffff1681565b348015610dbf57600080fd5b506108c2610dce366004614a1e565b613412565b348015610ddf57600080fd5b50610657610dee366004614a1e565b613474565b348015610dff57600080fd5b5061058f7f000000000000000000000000000000000000000000000000000000000000000081565b348015610e3357600080fd5b5061056d610e42366004614bd9565b613520565b348015610e5357600080fd5b5061056d610e62366004615198565b613589565b348015610e7357600080fd5b5061056d610e82366004614a1e565b613634565b348015610e9357600080fd5b506106576136ba565b348015610ea857600080fd5b506106a4610eb7366004614a1e565b6136c7565b348015610ec857600080fd5b5061056d610ed7366004614d46565b61371f565b348015610ee857600080fd5b506108c2610ef7366004614fdf565b6137b9565b348015610f0857600080fd5b50601954610a8a9060ff1681565b348015610f2257600080fd5b506106576138b6565b348015610f3757600080fd5b5061056d610f463660046151bd565b6138c3565b348015610f5757600080fd5b506106e1610f66366004614fdf565b613942565b348015610f7757600080fd5b5061056d610f863660046151e2565b6139ab565b348015610f9757600080fd5b5061056d610fa6366004614d46565b613d12565b348015610fb757600080fd5b5061058f610fc6366004614fdf565b613ddd565b348015610fd757600080fd5b5061056d610fe636600461517b565b6019805460ff909216610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909216919091179055565b34801561102b57600080fd5b5061058f61103a366004614a1e565b60096020526000908152604090205481565b34801561105857600080fd5b5061058f60145481565b34801561106e57600080fd5b5060195461097090610100900460ff1681565b34801561108d57600080fd5b5061056d61109c366004614afd565b613e0e565b3480156110ad57600080fd5b506106576110bc36600461524a565b6040805160c0808201835273ffffffffffffffffffffffffffffffffffffffff9890981680825260ff97881660208084019182528385019889526060808501988952608080860198895260a095860197885286519283019490945291519099168985015296519688019690965293519486019490945290519184019190915251828401528051808303909301835260e0909101905290565b34801561116057600080fd5b5061058f61116f366004614a1e565b60066020526000908152604090205481565b34801561118d57600080fd5b5061058f61119c366004614a1e565b60026020526000908152604090205481565b6040805161018081018252600461014082019081527f746573740000000000000000000000000000000000000000000000000000000061016083015281528151602081810184526000808352818401929092523083850181905263ffffffff8b166060850152608084015260ff808a1660a08501528451808301865283815260c085015260e0840189905284519182019094529081526101008201526bffffffffffffffffffffffff8516610120820152601254601154919273ffffffffffffffffffffffffffffffffffffffff9182169263095ea7b3921690611294908c16886152d2565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815273ffffffffffffffffffffffffffffffffffffffff90921660048301526bffffffffffffffffffffffff1660248201526044016020604051808303816000875af1158015611312573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113369190615316565b5060008860ff1667ffffffffffffffff81111561135557611355614708565b60405190808252806020026020018201604052801561137e578160200160208202803683370190505b50905060005b8960ff168160ff1610156113f157600061139d84613e22565b905080838360ff16815181106113b5576113b5615331565b602090810291909101810191909152600091825260088152604080832088905560079091529020849055806113e981615360565b915050611384565b50505050505050505050565b600d602052826000526040600020602052816000526040600020818154811061142557600080fd5b9060005260206000200160009250925050505481565b6013546040517f0b7d33e600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911690630b7d33e690611493908590859060040161537f565b600060405180830381600087803b1580156114ad57600080fd5b505af11580156114c1573d6000803e3d6000fd5b505050505050565b604080516000808252602082019092525b9250929050565b6013546040517f19d97a940000000000000000000000000000000000000000000000000000000081526004810183905260609173ffffffffffffffffffffffffffffffffffffffff16906319d97a94906024015b600060405180830381865afa158015611552573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820160405261159891908101906153e5565b92915050565b6013546040517ffa333dfb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff888116600483015260ff8816602483015260448201879052606482018690526084820185905260a4820184905290911690634ee88d35908990309063fa333dfb9060c401600060405180830381865afa15801561163d573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820160405261168391908101906153e5565b6040518363ffffffff1660e01b81526004016116a092919061537f565b600060405180830381600087803b1580156116ba57600080fd5b505af11580156116ce573d6000803e3d6000fd5b5050505050505050505050565b6013546040517f1e0104390000000000000000000000000000000000000000000000000000000081526004810183905260009173ffffffffffffffffffffffffffffffffffffffff1690631e010439906024015b602060405180830381865afa15801561174c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115989190615425565b6000828152600d6020908152604080832061ffff8516845282528083208054825181850281018501909352808352849384939291908301828280156117d457602002820191906000526020600020905b8154815260200190600101908083116117c0575b505050505090506117e6818251613ef0565b92509250509250929050565b6013546040517f207b65160000000000000000000000000000000000000000000000000000000081526004810183905260609173ffffffffffffffffffffffffffffffffffffffff169063207b651690602401611535565b601180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8316908117909155604080517fc3f909d400000000000000000000000000000000000000000000000000000000815281516000939263c3f909d492600480820193918290030181865afa1580156118e0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611904919061544d565b50601380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691909117909155601154604080517f1b6b6d230000000000000000000000000000000000000000000000000000000081529051939450911691631b6b6d23916004808201926020929091908290030181865afa1580156119a7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119cb919061547b565b601280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff929092169190911790555050565b8560005b81811015611cd2576000898983818110611a3457611a34615331565b9050602002013590503073ffffffffffffffffffffffffffffffffffffffff16637e7a46dc8283604051602001611a6d91815260200190565b6040516020818303038152906040526040518363ffffffff1660e01b8152600401611a9992919061537f565b600060405180830381600087803b158015611ab357600080fd5b505af1158015611ac7573d6000803e3d6000fd5b50506013546040517f5147cd59000000000000000000000000000000000000000000000000000000008152600481018590526000935073ffffffffffffffffffffffffffffffffffffffff9091169150635147cd5990602401602060405180830381865afa158015611b3d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b619190615498565b90508060ff16600103611cbd576040517ffa333dfb000000000000000000000000000000000000000000000000000000008152306004820181905260ff8b166024830152604482018a9052606482018890526084820188905260a4820187905260009163fa333dfb9060c401600060405180830381865afa158015611bea573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201604052611c3091908101906153e5565b6013546040517f4ee88d3500000000000000000000000000000000000000000000000000000000815291925073ffffffffffffffffffffffffffffffffffffffff1690634ee88d3590611c89908690859060040161537f565b600060405180830381600087803b158015611ca357600080fd5b505af1158015611cb7573d6000803e3d6000fd5b50505050505b50508080611cca906154b5565b915050611a18565b505050505050505050565b6000838152600c602090815260408083208054825181850281018501909352808352611d3e93830182828015611d3257602002820191906000526020600020905b815481526020019060010190808311611d1e575b50505050508484613f75565b90505b9392505050565b604080516101408101825260008082526020820181905260609282018390528282018190526080820181905260a0820181905260c0820181905260e082018190526101008201526101208101919091526013546040517fc7c3a19a0000000000000000000000000000000000000000000000000000000081526004810184905273ffffffffffffffffffffffffffffffffffffffff9091169063c7c3a19a90602401600060405180830381865afa158015611e07573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526115989190810190615510565b8060005b818160ff161015611f285760135473ffffffffffffffffffffffffffffffffffffffff1663c8048022858560ff8516818110611e8f57611e8f615331565b905060200201356040518263ffffffff1660e01b8152600401611eb491815260200190565b600060405180830381600087803b158015611ece57600080fd5b505af1158015611ee2573d6000803e3d6000fd5b50505050611f1584848360ff16818110611efe57611efe615331565b90506020020135600f6140d490919063ffffffff16565b5080611f2081615360565b915050611e51565b50505050565b6000818152600e602052604081205461ffff1681805b8261ffff168161ffff1611611f8f576000858152600d6020908152604080832061ffff85168452909152902054611f7b908361562f565b915080611f8781615642565b915050611f44565b509392505050565b6000606060005a90506000611faa6140e0565b9050600085806020019051810190611fc29190615663565b6019549091507f000000000000000000000000000000000000000000000000000000000000000090610100900460ff161561201a57507f00000000000000000000000000000000000000000000000000000000000000005b8061202860c08a018a61567c565b600081811061203957612039615331565b905060200201350361243b57600061205460c08a018a61567c565b600181811061206557612065615331565b9050602002013560405160200161207e91815260200190565b60405160208183030381529060405290506000818060200190518101906120a59190615663565b9050838114612115576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f75706b6565702069647320646f6e2774206d617463680000000000000000000060448201526064015b60405180910390fd5b600061212460c08c018c61567c565b600281811061213557612135615331565b9050602002013560405160200161214e91815260200190565b60405160208183030381529060405290506000818060200190518101906121759190615663565b9050600061218660c08e018e61567c565b600381811061219757612197615331565b905060200201356040516020016121b091815260200190565b60405160208183030381529060405290506000818060200190518101906121d7919061547b565b6000868152600860205260409020549091505b805a6121f6908d6156e4565b61220290613a9861562f565b10156122435783406000908152600b6020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690556121ea565b6040517f6665656449644865780000000000000000000000000000000000000000000000602082015260009060290160405160208183030381529060405280519060200120601760405160200161229a919061574a565b60405160208183030381529060405280519060200120036122bc5750836122bf565b50425b60195460ff161561236757604080516020810189905290810186905273ffffffffffffffffffffffffffffffffffffffff841660608201526017906016906018908490608001604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152908290527ff055e4a200000000000000000000000000000000000000000000000000000000825261210c9594939291600401615879565b60165460009067ffffffffffffffff81111561238557612385614708565b6040519080825280602002602001820160405280156123b857816020015b60608152602001906001900390816123a35790505b5060408051602081018b905290810188905273ffffffffffffffffffffffffffffffffffffffff8616606082015290915060009060800160405160208183030381529060405290506001828260405160200161241592919061593c565b6040516020818303038152906040529f509f5050505050505050505050505050506114da565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f756e6578706563746564206576656e7420736967000000000000000000000000604482015260640161210c565b60005a90506000806124b184860186614ecb565b915091506000806000838060200190518101906124ce91906159d0565b60008381526005602090815260408083205460049092528220549497509295509093509091906124fc6140e0565b90508260000361251c576000868152600560205260409020819055612660565b600061252886836156e4565b6000888152600e6020908152604080832054600d835281842061ffff90911680855290835281842080548351818602810186019094528084529596509094919290919083018282801561259a57602002820191906000526020600020905b815481526020019060010190808311612586575b505050505090507f000000000000000000000000000000000000000000000000000000000000000061ffff1681510361261557816125d781615642565b60008b8152600e6020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00001661ffff83161790559250505b506000888152600d6020908152604080832061ffff9094168352928152828220805460018181018355918452828420018590558a8352600c8252928220805493840181558252902001555b60008681526006602052604081205461267a90600161562f565b60008881526006602090815260408083208490556004909152902083905590506126a48783612eab565b6040513090839089907f97009585a4d2440f981ab6f6eec514343e1e6b2aa9b991a26998e6806f41bf0890600090a46126de878b84613520565b505050505050505050505050565b6000828152600d6020908152604080832061ffff8516845282529182902080548351818402810184019094528084526060939283018282801561274e57602002820191906000526020600020905b81548152602001906001019080831161273a575b5050505050905092915050565b600060606000848460405160200161277492919061593c565b604080518083037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe00181529190526001969095509350505050565b6013546040517f5147cd590000000000000000000000000000000000000000000000000000000081526004810183905260009173ffffffffffffffffffffffffffffffffffffffff1690635147cd5990602401602060405180830381865afa15801561281f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115989190615498565b8160005b818110156128e05730635f17e61686868481811061286757612867615331565b90506020020135856040518363ffffffff1660e01b815260040161289b92919091825263ffffffff16602082015260400190565b600060405180830381600087803b1580156128b557600080fd5b505af11580156128c9573d6000803e3d6000fd5b5050505080806128d8906154b5565b915050612847565b5050505050565b6128ef614182565b6012546040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009173ffffffffffffffffffffffffffffffffffffffff16906370a0823190602401602060405180830381865afa15801561295e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129829190615663565b6012546040517fa9059cbb0000000000000000000000000000000000000000000000000000000081523360048201526024810183905291925073ffffffffffffffffffffffffffffffffffffffff169063a9059cbb906044016020604051808303816000875af11580156129fa573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a1e9190615316565b5050565b60008281526003602090815260408083208490556005825280832083905560068252808320839055600c9091528120612a5a91614607565b6000828152600e602052604081205461ffff16905b8161ffff168161ffff1611612ab6576000848152600d6020908152604080832061ffff851684529091528120612aa491614607565b80612aae81615642565b915050612a6f565b5050506000908152600e6020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000169055565b6000818152600560205260408120548103612b0c57506001919050565b600082815260036020908152604080832054600490925290912054612b2f6140e0565b612b3991906156e4565b101592915050565b60015473ffffffffffffffffffffffffffffffffffffffff163314612bc2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e657200000000000000000000604482015260640161210c565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b6013546040517f79ea99430000000000000000000000000000000000000000000000000000000081526004810183905260009173ffffffffffffffffffffffffffffffffffffffff16906379ea994390602401602060405180830381865afa158015612cae573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611598919061547b565b6013546040517fcd7f71b500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091169063cd7f71b590612d2c908690869086906004016159fe565b600060405180830381600087803b158015612d4657600080fd5b505af1158015612d5a573d6000803e3d6000fd5b50505050505050565b6013546040517f4ee88d3500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911690634ee88d3590612d2c908690869086906004016159fe565b6017612dc98382615a98565b506018612dd68282615a98565b505050565b8051612a1e906016906020840190614625565b6013546040517f06e3b632000000000000000000000000000000000000000000000000000000008152600481018490526024810183905260609173ffffffffffffffffffffffffffffffffffffffff16906306e3b63290604401600060405180830381865afa158015612e65573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201604052611d419190810190615bb2565b601454600083815260026020526040902054612ec790836156e4565b1115612a1e576013546040517fc7c3a19a0000000000000000000000000000000000000000000000000000000081526004810184905260009173ffffffffffffffffffffffffffffffffffffffff169063c7c3a19a90602401600060405180830381865afa158015612f3d573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201604052612f839190810190615510565b6013546040517fb657bc9c0000000000000000000000000000000000000000000000000000000081526004810186905291925060009173ffffffffffffffffffffffffffffffffffffffff9091169063b657bc9c90602401602060405180830381865afa158015612ff8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061301c9190615425565b6015549091506130409082906c01000000000000000000000000900460ff166152d2565b6bffffffffffffffffffffffff1682606001516bffffffffffffffffffffffff161015611f28576015546130839085906bffffffffffffffffffffffff166130f0565b60008481526002602090815260409182902085905560155482518781526bffffffffffffffffffffffff909116918101919091529081018490527f49d4100ab0124eb4a9a65dc4ea08d6412a43f6f05c49194983f5b322bcc0a5c09060600160405180910390a150505050565b6012546013546040517f095ea7b300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff91821660048201526bffffffffffffffffffffffff8416602482015291169063095ea7b3906044016020604051808303816000875af1158015613178573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061319c9190615316565b506013546040517f948108f7000000000000000000000000000000000000000000000000000000008152600481018490526bffffffffffffffffffffffff8316602482015273ffffffffffffffffffffffffffffffffffffffff9091169063948108f790604401611493565b6040517fc04198220000000000000000000000000000000000000000000000000000000081526000600482018190526024820181905290309063c041982290604401600060405180830381865afa158015613267573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526132ad9190810190615bb2565b805190915060006132bc6140e0565b905060005b828110156128e05760008482815181106132dd576132dd615331565b60209081029190910101516013546040517f5147cd590000000000000000000000000000000000000000000000000000000081526004810183905291925060009173ffffffffffffffffffffffffffffffffffffffff90911690635147cd5990602401602060405180830381865afa15801561335d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906133819190615498565b90508060ff166001036133fd578660ff166000036133cd576040513090859084907f97009585a4d2440f981ab6f6eec514343e1e6b2aa9b991a26998e6806f41bf0890600090a46133fd565b6040513090859084907fc76416badc8398ce17c93eab7b4f60f263241694cf503e4df24f233a8cc1c50d90600090a45b5050808061340a906154b5565b9150506132c1565b6000818152600c602090815260409182902080548351818402810184019094528084526060939283018282801561346857602002820191906000526020600020905b815481526020019060010190808311613454575b50505050509050919050565b6016818154811061348457600080fd5b90600052602060002001600091509050805461349f906156f7565b80601f01602080910402602001604051908101604052809291908181526020018280546134cb906156f7565b80156135185780601f106134ed57610100808354040283529160200191613518565b820191906000526020600020905b8154815290600101906020018083116134fb57829003601f168201915b505050505081565b6000838152600760205260409020545b805a61353c90856156e4565b6135489061271061562f565b1015611f285781406000908152600b6020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055613530565b6013546040517fa72aa27e0000000000000000000000000000000000000000000000000000000081526004810184905263ffffffff8316602482015273ffffffffffffffffffffffffffffffffffffffff9091169063a72aa27e90604401600060405180830381600087803b15801561360157600080fd5b505af1158015613615573d6000803e3d6000fd5b505050600092835250600a602052604090912063ffffffff9091169055565b6013546040517f744bfe610000000000000000000000000000000000000000000000000000000081526004810183905230602482015273ffffffffffffffffffffffffffffffffffffffff9091169063744bfe6190604401600060405180830381600087803b1580156136a657600080fd5b505af11580156128e0573d6000803e3d6000fd5b6017805461349f906156f7565b6013546040517fb657bc9c0000000000000000000000000000000000000000000000000000000081526004810183905260009173ffffffffffffffffffffffffffffffffffffffff169063b657bc9c9060240161172f565b8060005b818163ffffffff161015611f28573063af953a4a858563ffffffff851681811061374f5761374f615331565b905060200201356040518263ffffffff1660e01b815260040161377491815260200190565b600060405180830381600087803b15801561378e57600080fd5b505af11580156137a2573d6000803e3d6000fd5b5050505080806137b190615c43565b915050613723565b606060006137c7600f614205565b9050808410613802576040517f1390f2a100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b826000036138175761381484826156e4565b92505b60008367ffffffffffffffff81111561383257613832614708565b60405190808252806020026020018201604052801561385b578160200160208202803683370190505b50905060005b848110156138ad5761387e613876828861562f565b600f9061420f565b82828151811061389057613890615331565b6020908102919091010152806138a5816154b5565b915050613861565b50949350505050565b6018805461349f906156f7565b60006138cd6140e0565b90508160ff1660000361390e576040513090829085907f97009585a4d2440f981ab6f6eec514343e1e6b2aa9b991a26998e6806f41bf0890600090a4505050565b6040513090829085907fc76416badc8398ce17c93eab7b4f60f263241694cf503e4df24f233a8cc1c50d90600090a4505050565b6000828152600c6020908152604080832080548251818502810185019093528083528493849392919083018282801561399a57602002820191906000526020600020905b815481526020019060010190808311613986575b505050505090506117e68185613ef0565b8260005b818110156114c15760008686838181106139cb576139cb615331565b9050602002013590503073ffffffffffffffffffffffffffffffffffffffff16637e7a46dc8283604051602001613a0491815260200190565b6040516020818303038152906040526040518363ffffffff1660e01b8152600401613a3092919061537f565b600060405180830381600087803b158015613a4a57600080fd5b505af1158015613a5e573d6000803e3d6000fd5b50506013546040517f5147cd59000000000000000000000000000000000000000000000000000000008152600481018590526000935073ffffffffffffffffffffffffffffffffffffffff9091169150635147cd5990602401602060405180830381865afa158015613ad4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613af89190615498565b90508060ff16600103613cfd577f000000000000000000000000000000000000000000000000000000000000000060ff871615613b5257507f00000000000000000000000000000000000000000000000000000000000000005b60003073ffffffffffffffffffffffffffffffffffffffff1663fa333dfb30898588604051602001613b8691815260200190565b604051602081830303815290604052613b9e90615c5c565b60405160e086901b7fffffffff0000000000000000000000000000000000000000000000000000000016815273ffffffffffffffffffffffffffffffffffffffff909416600485015260ff90921660248401526044830152606482015260006084820181905260a482015260c401600060405180830381865afa158015613c29573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201604052613c6f91908101906153e5565b6013546040517f4ee88d3500000000000000000000000000000000000000000000000000000000815291925073ffffffffffffffffffffffffffffffffffffffff1690634ee88d3590613cc8908790859060040161537f565b600060405180830381600087803b158015613ce257600080fd5b505af1158015613cf6573d6000803e3d6000fd5b5050505050505b50508080613d0a906154b5565b9150506139af565b8060005b81811015611f28576000848483818110613d3257613d32615331565b9050602002013590503073ffffffffffffffffffffffffffffffffffffffff16637e7a46dc8283604051602001613d6b91815260200190565b6040516020818303038152906040526040518363ffffffff1660e01b8152600401613d9792919061537f565b600060405180830381600087803b158015613db157600080fd5b505af1158015613dc5573d6000803e3d6000fd5b50505050508080613dd5906154b5565b915050613d16565b600c6020528160005260406000208181548110613df957600080fd5b90600052602060002001600091509150505481565b613e16614182565b613e1f8161421b565b50565b6011546040517f3f678e11000000000000000000000000000000000000000000000000000000008152600091829173ffffffffffffffffffffffffffffffffffffffff90911690633f678e1190613e7d908690600401615c9e565b6020604051808303816000875af1158015613e9c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613ec09190615663565b9050613ecd600f82614310565b506060909201516000838152600a6020526040902063ffffffff90911690555090565b815160009081908190841580613f065750808510155b15613f0f578094505b60008092505b85831015613f6b57866001613f2a85856156e4565b613f3491906156e4565b81518110613f4457613f44615331565b602002602001015181613f57919061562f565b905082613f63816154b5565b935050613f15565b9694955050505050565b82516000908190831580613f895750808410155b15613f92578093505b60008467ffffffffffffffff811115613fad57613fad614708565b604051908082528060200260200182016040528015613fd6578160200160208202803683370190505b509050600092505b8483101561404457866001613ff385856156e4565b613ffd91906156e4565b8151811061400d5761400d615331565b602002602001015181848151811061402757614027615331565b60209081029190910101528261403c816154b5565b935050613fde565b61405d8160006001845161405891906156e4565b61431c565b8560640361409657806001825161407491906156e4565b8151811061408457614084615331565b60200260200101519350505050611d41565b8060648251886140a69190615df0565b6140b09190615e5c565b815181106140c0576140c0615331565b602002602001015193505050509392505050565b6000611d418383614494565b60007f00000000000000000000000000000000000000000000000000000000000000001561417d57606473ffffffffffffffffffffffffffffffffffffffff1663a3b1b31d6040518163ffffffff1660e01b8152600401602060405180830381865afa158015614154573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906141789190615663565b905090565b504390565b60005473ffffffffffffffffffffffffffffffffffffffff163314614203576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e657200000000000000000000604482015260640161210c565b565b6000611598825490565b6000611d41838361458e565b3373ffffffffffffffffffffffffffffffffffffffff82160361429a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640161210c565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6000611d4183836145b8565b818180820361432c575050505050565b600085600261433b8787615e70565b6143459190615e90565b61434f9087615ef8565b8151811061435f5761435f615331565b602002602001015190505b81831361446e575b8086848151811061438557614385615331565b602002602001015110156143a5578261439d81615f20565b935050614372565b8582815181106143b7576143b7615331565b60200260200101518110156143d857816143d081615f51565b9250506143a5565b818313614469578582815181106143f1576143f1615331565b602002602001015186848151811061440b5761440b615331565b602002602001015187858151811061442557614425615331565b6020026020010188858151811061443e5761443e615331565b6020908102919091010191909152528261445781615f20565b935050818061446590615f51565b9250505b61436a565b818512156144815761448186868461431c565b838312156114c1576114c186848661431c565b6000818152600183016020526040812054801561457d5760006144b86001836156e4565b85549091506000906144cc906001906156e4565b90508181146145315760008660000182815481106144ec576144ec615331565b906000526020600020015490508087600001848154811061450f5761450f615331565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061454257614542615fa8565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050611598565b6000915050611598565b5092915050565b60008260000182815481106145a5576145a5615331565b9060005260206000200154905092915050565b60008181526001830160205260408120546145ff57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155611598565b506000611598565b5080546000825590600052602060002090810190613e1f919061467b565b82805482825590600052602060002090810192821561466b579160200282015b8281111561466b578251829061465b9082615a98565b5091602001919060010190614645565b50614677929150614690565b5090565b5b80821115614677576000815560010161467c565b808211156146775760006146a482826146ad565b50600101614690565b5080546146b9906156f7565b6000825580601f106146c9575050565b601f016020900490600052602060002090810190613e1f919061467b565b60ff81168114613e1f57600080fd5b63ffffffff81168114613e1f57600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051610140810167ffffffffffffffff8111828210171561475b5761475b614708565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156147a8576147a8614708565b604052919050565b600067ffffffffffffffff8211156147ca576147ca614708565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b600082601f83011261480757600080fd5b813561481a614815826147b0565b614761565b81815284602083860101111561482f57600080fd5b816020850160208301376000918101602001919091529392505050565b6bffffffffffffffffffffffff81168114613e1f57600080fd5b600080600080600080600060e0888a03121561488157600080fd5b873561488c816146e7565b9650602088013561489c816146f6565b955060408801356148ac816146e7565b9450606088013567ffffffffffffffff8111156148c857600080fd5b6148d48a828b016147f6565b94505060808801356148e58161484c565b9699959850939692959460a0840135945060c09093013592915050565b803561ffff8116811461491457600080fd5b919050565b60008060006060848603121561492e57600080fd5b8335925061493e60208501614902565b9150604084013590509250925092565b6000806040838503121561496157600080fd5b82359150602083013567ffffffffffffffff81111561497f57600080fd5b61498b858286016147f6565b9150509250929050565b60005b838110156149b0578181015183820152602001614998565b50506000910152565b600081518084526149d1816020860160208601614995565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b8215158152604060208201526000611d3e60408301846149b9565b600060208284031215614a3057600080fd5b5035919050565b602081526000611d4160208301846149b9565b73ffffffffffffffffffffffffffffffffffffffff81168114613e1f57600080fd5b600080600080600080600060e0888a031215614a8757600080fd5b873596506020880135614a9981614a4a565b95506040880135614aa9816146e7565b969995985095966060810135965060808101359560a0820135955060c0909101359350915050565b60008060408385031215614ae457600080fd5b82359150614af460208401614902565b90509250929050565b600060208284031215614b0f57600080fd5b8135611d4181614a4a565b60008083601f840112614b2c57600080fd5b50813567ffffffffffffffff811115614b4457600080fd5b6020830191508360208260051b85010111156114da57600080fd5b600080600080600080600060c0888a031215614b7a57600080fd5b873567ffffffffffffffff811115614b9157600080fd5b614b9d8a828b01614b1a565b9098509650506020880135614bb1816146e7565b96999598509596604081013596506060810135956080820135955060a0909101359350915050565b600080600060608486031215614bee57600080fd5b505081359360208301359350604090920135919050565b60208152614c2c60208201835173ffffffffffffffffffffffffffffffffffffffff169052565b60006020830151614c45604084018263ffffffff169052565b506040830151610140806060850152614c626101608501836149b9565b91506060850151614c8360808601826bffffffffffffffffffffffff169052565b50608085015173ffffffffffffffffffffffffffffffffffffffff811660a08601525060a085015167ffffffffffffffff811660c08601525060c085015163ffffffff811660e08601525060e0850151610100614cef818701836bffffffffffffffffffffffff169052565b8601519050610120614d048682018315159052565b8601518584037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe001838701529050614d3c83826149b9565b9695505050505050565b60008060208385031215614d5957600080fd5b823567ffffffffffffffff811115614d7057600080fd5b614d7c85828601614b1a565b90969095509350505050565b60008060408385031215614d9b57600080fd5b823567ffffffffffffffff80821115614db357600080fd5b908401906101008287031215614dc857600080fd5b90925060208401359080821115614dde57600080fd5b5061498b858286016147f6565b60008083601f840112614dfd57600080fd5b50813567ffffffffffffffff811115614e1557600080fd5b6020830191508360208285010111156114da57600080fd5b60008060208385031215614e4057600080fd5b823567ffffffffffffffff811115614e5757600080fd5b614d7c85828601614deb565b6020808252825182820181905260009190848201906040850190845b81811015614e9b57835183529284019291840191600101614e7f565b50909695505050505050565b600067ffffffffffffffff821115614ec157614ec1614708565b5060051b60200190565b60008060408385031215614ede57600080fd5b823567ffffffffffffffff80821115614ef657600080fd5b818501915085601f830112614f0a57600080fd5b81356020614f1a61481583614ea7565b82815260059290921b84018101918181019089841115614f3957600080fd5b8286015b84811015614f7157803586811115614f555760008081fd5b614f638c86838b01016147f6565b845250918301918301614f3d565b5096505086013592505080821115614dde57600080fd5b600080600060408486031215614f9d57600080fd5b833567ffffffffffffffff811115614fb457600080fd5b614fc086828701614b1a565b9094509250506020840135614fd4816146f6565b809150509250925092565b60008060408385031215614ff257600080fd5b50508035926020909101359150565b60008060006040848603121561501657600080fd5b83359250602084013567ffffffffffffffff81111561503457600080fd5b61504086828701614deb565b9497909650939450505050565b6000806040838503121561506057600080fd5b823567ffffffffffffffff8082111561507857600080fd5b615084868387016147f6565b93506020850135915080821115614dde57600080fd5b600060208083850312156150ad57600080fd5b823567ffffffffffffffff808211156150c557600080fd5b818501915085601f8301126150d957600080fd5b81356150e761481582614ea7565b81815260059190911b8301840190848101908883111561510657600080fd5b8585015b8381101561513e578035858111156151225760008081fd5b6151308b89838a01016147f6565b84525091860191860161510a565b5098975050505050505050565b6000806040838503121561515e57600080fd5b8235915060208301356151708161484c565b809150509250929050565b60006020828403121561518d57600080fd5b8135611d41816146e7565b600080604083850312156151ab57600080fd5b823591506020830135615170816146f6565b600080604083850312156151d057600080fd5b823591506020830135615170816146e7565b600080600080606085870312156151f857600080fd5b843567ffffffffffffffff81111561520f57600080fd5b61521b87828801614b1a565b909550935050602085013561522f816146e7565b9150604085013561523f816146e7565b939692955090935050565b60008060008060008060c0878903121561526357600080fd5b863561526e81614a4a565b9550602087013561527e816146e7565b95989597505050506040840135936060810135936080820135935060a0909101359150565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006bffffffffffffffffffffffff808316818516818304811182151516156152fd576152fd6152a3565b02949350505050565b8051801515811461491457600080fd5b60006020828403121561532857600080fd5b611d4182615306565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600060ff821660ff8103615376576153766152a3565b60010192915050565b828152604060208201526000611d3e60408301846149b9565b600082601f8301126153a957600080fd5b81516153b7614815826147b0565b8181528460208386010111156153cc57600080fd5b6153dd826020830160208701614995565b949350505050565b6000602082840312156153f757600080fd5b815167ffffffffffffffff81111561540e57600080fd5b6153dd84828501615398565b80516149148161484c565b60006020828403121561543757600080fd5b8151611d418161484c565b805161491481614a4a565b6000806040838503121561546057600080fd5b825161546b81614a4a565b6020939093015192949293505050565b60006020828403121561548d57600080fd5b8151611d4181614a4a565b6000602082840312156154aa57600080fd5b8151611d41816146e7565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036154e6576154e66152a3565b5060010190565b8051614914816146f6565b805167ffffffffffffffff8116811461491457600080fd5b60006020828403121561552257600080fd5b815167ffffffffffffffff8082111561553a57600080fd5b90830190610140828603121561554f57600080fd5b615557614737565b61556083615442565b815261556e602084016154ed565b602082015260408301518281111561558557600080fd5b61559187828601615398565b6040830152506155a36060840161541a565b60608201526155b460808401615442565b60808201526155c560a084016154f8565b60a08201526155d660c084016154ed565b60c08201526155e760e0840161541a565b60e08201526101006155fa818501615306565b90820152610120838101518381111561561257600080fd5b61561e88828701615398565b918301919091525095945050505050565b80820180821115611598576115986152a3565b600061ffff808316818103615659576156596152a3565b6001019392505050565b60006020828403121561567557600080fd5b5051919050565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18436030181126156b157600080fd5b83018035915067ffffffffffffffff8211156156cc57600080fd5b6020019150600581901b36038213156114da57600080fd5b81810381811115611598576115986152a3565b600181811c9082168061570b57607f821691505b602082108103615744577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b6000808354615758816156f7565b6001828116801561577057600181146157a3576157d2565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00841687528215158302870194506157d2565b8760005260208060002060005b858110156157c95781548a8201529084019082016157b0565b50505082870194505b50929695505050505050565b600081546157eb816156f7565b80855260206001838116801561580857600181146158405761586e565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008516838901528284151560051b890101955061586e565b866000528260002060005b858110156158665781548a820186015290830190840161584b565b890184019650505b505050505092915050565b60a08152600061588c60a08301886157de565b6020838203818501528188548084528284019150828160051b8501018a6000528360002060005b838110156158fe577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08784030185526158ec83836157de565b948601949250600191820191016158b3565b50508681036040880152615912818b6157de565b945050505050846060840152828103608084015261593081856149b9565b98975050505050505050565b6000604082016040835280855180835260608501915060608160051b8601019250602080880160005b838110156159b1577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa088870301855261599f8683516149b9565b95509382019390820190600101615965565b5050858403818701525050506159c781856149b9565b95945050505050565b6000806000606084860312156159e557600080fd5b83519250602084015191506040840151614fd481614a4a565b83815260406020820152816040820152818360608301376000818301606090810191909152601f9092017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016010192915050565b601f821115612dd657600081815260208120601f850160051c81016020861015615a795750805b601f850160051c820191505b818110156114c157828155600101615a85565b815167ffffffffffffffff811115615ab257615ab2614708565b615ac681615ac084546156f7565b84615a52565b602080601f831160018114615b195760008415615ae35750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b1785556114c1565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b82811015615b6657888601518255948401946001909101908401615b47565b5085821015615ba257878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b60006020808385031215615bc557600080fd5b825167ffffffffffffffff811115615bdc57600080fd5b8301601f81018513615bed57600080fd5b8051615bfb61481582614ea7565b81815260059190911b82018301908381019087831115615c1a57600080fd5b928401925b82841015615c3857835182529284019290840190615c1f565b979650505050505050565b600063ffffffff808316818103615659576156596152a3565b80516020808301519190811015615744577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60209190910360031b1b16919050565b6020815260008251610140806020850152615cbd6101608501836149b9565b915060208501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe080868503016040870152615cf984836149b9565b935060408701519150615d24606087018373ffffffffffffffffffffffffffffffffffffffff169052565b606087015163ffffffff811660808801529150608087015173ffffffffffffffffffffffffffffffffffffffff811660a0880152915060a087015160ff811660c0880152915060c08701519150808685030160e0870152615d8584836149b9565b935060e08701519150610100818786030181880152615da485846149b9565b945080880151925050610120818786030181880152615dc385846149b9565b94508088015192505050615de6828601826bffffffffffffffffffffffff169052565b5090949350505050565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615615e2857615e286152a3565b500290565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600082615e6b57615e6b615e2d565b500490565b8181036000831280158383131683831282161715614587576145876152a3565b600082615e9f57615e9f615e2d565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83147f800000000000000000000000000000000000000000000000000000000000000083141615615ef357615ef36152a3565b500590565b8082018281126000831280158216821582161715615f1857615f186152a3565b505092915050565b60007f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036154e6576154e66152a3565b60007f80000000000000000000000000000000000000000000000000000000000000008203615f8257615f826152a3565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfea164736f6c6343000810000a307834353534343832643535353334343264343135323432343935343532353534643264353434353533353434653435353430303030303030303030303030303030307834323534343332643535353334343264343135323432343935343532353534643264353434353533353434653435353430303030303030303030303030303030", } @@ -888,25 +888,25 @@ func (_VerifiableLoadLogTriggerUpkeep *VerifiableLoadLogTriggerUpkeepCallerSessi return _VerifiableLoadLogTriggerUpkeep.Contract.GetTriggerType(&_VerifiableLoadLogTriggerUpkeep.CallOpts, upkeepId) } -func (_VerifiableLoadLogTriggerUpkeep *VerifiableLoadLogTriggerUpkeepCaller) GetUpkeepInfo(opts *bind.CallOpts, upkeepId *big.Int) (KeeperRegistryBase21UpkeepInfo, error) { +func (_VerifiableLoadLogTriggerUpkeep *VerifiableLoadLogTriggerUpkeepCaller) GetUpkeepInfo(opts *bind.CallOpts, upkeepId *big.Int) (IAutomationV21PlusCommonUpkeepInfoLegacy, error) { var out []interface{} err := _VerifiableLoadLogTriggerUpkeep.contract.Call(opts, &out, "getUpkeepInfo", upkeepId) if err != nil { - return *new(KeeperRegistryBase21UpkeepInfo), err + return *new(IAutomationV21PlusCommonUpkeepInfoLegacy), err } - out0 := *abi.ConvertType(out[0], new(KeeperRegistryBase21UpkeepInfo)).(*KeeperRegistryBase21UpkeepInfo) + out0 := *abi.ConvertType(out[0], new(IAutomationV21PlusCommonUpkeepInfoLegacy)).(*IAutomationV21PlusCommonUpkeepInfoLegacy) return out0, err } -func (_VerifiableLoadLogTriggerUpkeep *VerifiableLoadLogTriggerUpkeepSession) GetUpkeepInfo(upkeepId *big.Int) (KeeperRegistryBase21UpkeepInfo, error) { +func (_VerifiableLoadLogTriggerUpkeep *VerifiableLoadLogTriggerUpkeepSession) GetUpkeepInfo(upkeepId *big.Int) (IAutomationV21PlusCommonUpkeepInfoLegacy, error) { return _VerifiableLoadLogTriggerUpkeep.Contract.GetUpkeepInfo(&_VerifiableLoadLogTriggerUpkeep.CallOpts, upkeepId) } -func (_VerifiableLoadLogTriggerUpkeep *VerifiableLoadLogTriggerUpkeepCallerSession) GetUpkeepInfo(upkeepId *big.Int) (KeeperRegistryBase21UpkeepInfo, error) { +func (_VerifiableLoadLogTriggerUpkeep *VerifiableLoadLogTriggerUpkeepCallerSession) GetUpkeepInfo(upkeepId *big.Int) (IAutomationV21PlusCommonUpkeepInfoLegacy, error) { return _VerifiableLoadLogTriggerUpkeep.Contract.GetUpkeepInfo(&_VerifiableLoadLogTriggerUpkeep.CallOpts, upkeepId) } @@ -2437,7 +2437,7 @@ type VerifiableLoadLogTriggerUpkeepInterface interface { GetTriggerType(opts *bind.CallOpts, upkeepId *big.Int) (uint8, error) - GetUpkeepInfo(opts *bind.CallOpts, upkeepId *big.Int) (KeeperRegistryBase21UpkeepInfo, error) + GetUpkeepInfo(opts *bind.CallOpts, upkeepId *big.Int) (IAutomationV21PlusCommonUpkeepInfoLegacy, error) GetUpkeepPrivilegeConfig(opts *bind.CallOpts, upkeepId *big.Int) ([]byte, error) diff --git a/core/gethwrappers/generated/verifiable_load_streams_lookup_upkeep_wrapper/verifiable_load_streams_lookup_upkeep_wrapper.go b/core/gethwrappers/generated/verifiable_load_streams_lookup_upkeep_wrapper/verifiable_load_streams_lookup_upkeep_wrapper.go index 62e3d23bda4..b321df52910 100644 --- a/core/gethwrappers/generated/verifiable_load_streams_lookup_upkeep_wrapper/verifiable_load_streams_lookup_upkeep_wrapper.go +++ b/core/gethwrappers/generated/verifiable_load_streams_lookup_upkeep_wrapper/verifiable_load_streams_lookup_upkeep_wrapper.go @@ -30,7 +30,7 @@ var ( _ = abi.ConvertType ) -type KeeperRegistryBase21UpkeepInfo struct { +type IAutomationV21PlusCommonUpkeepInfoLegacy struct { Target common.Address PerformGas uint32 CheckData []byte @@ -44,7 +44,7 @@ type KeeperRegistryBase21UpkeepInfo struct { } var VerifiableLoadStreamsLookupUpkeepMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"contractAutomationRegistrar2_1\",\"name\":\"_registrar\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_useArb\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"IndexOutOfRange\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"feedParamKey\",\"type\":\"string\"},{\"internalType\":\"string[]\",\"name\":\"feeds\",\"type\":\"string[]\"},{\"internalType\":\"string\",\"name\":\"timeParamKey\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"time\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"StreamsLookup\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"blockNum\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"LogEmitted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"blockNum\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"LogEmittedAgain\",\"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\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"blockNum\",\"type\":\"uint256\"}],\"name\":\"UpkeepTopUp\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BUCKET_SIZE\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"addFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"addLinkAmount\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"upkeepIds\",\"type\":\"uint256[]\"}],\"name\":\"batchCancelUpkeeps\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"upkeepIds\",\"type\":\"uint256[]\"},{\"internalType\":\"uint8\",\"name\":\"selector\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"topic0\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"topic1\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"topic2\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"topic3\",\"type\":\"bytes32\"}],\"name\":\"batchPreparingUpkeeps\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"upkeepIds\",\"type\":\"uint256[]\"},{\"internalType\":\"uint8\",\"name\":\"log\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"selector\",\"type\":\"uint8\"}],\"name\":\"batchPreparingUpkeepsSimple\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"number\",\"type\":\"uint8\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint8\",\"name\":\"triggerType\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"triggerConfig\",\"type\":\"bytes\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"checkGasToBurn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"performGasToBurn\",\"type\":\"uint256\"}],\"name\":\"batchRegisterUpkeeps\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"log\",\"type\":\"uint8\"}],\"name\":\"batchSendLogs\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"upkeepIds\",\"type\":\"uint256[]\"},{\"internalType\":\"uint32\",\"name\":\"interval\",\"type\":\"uint32\"}],\"name\":\"batchSetIntervals\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"upkeepIds\",\"type\":\"uint256[]\"}],\"name\":\"batchUpdatePipelineData\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"upkeepIds\",\"type\":\"uint256[]\"}],\"name\":\"batchWithdrawLinks\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"bucketedDelays\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"buckets\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"startGas\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"blockNum\",\"type\":\"uint256\"}],\"name\":\"burnPerformGas\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes[]\",\"name\":\"values\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"checkCallback\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"errCode\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"checkErrorHandler\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"upkeepNeeded\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"performData\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"checkGasToBurns\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"checkData\",\"type\":\"bytes\"}],\"name\":\"checkUpkeep\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"counters\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"delays\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"dummyMap\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"eligible\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"emittedAgainSig\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"emittedSig\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"feedParamKey\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"feedsHex\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"firstPerformBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"gasLimits\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"startIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxCount\",\"type\":\"uint256\"}],\"name\":\"getActiveUpkeepIDsDeployedByThisContract\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"startIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxCount\",\"type\":\"uint256\"}],\"name\":\"getAllActiveUpkeepIDsOnRegistry\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"getBalance\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"balance\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"uint16\",\"name\":\"bucket\",\"type\":\"uint16\"}],\"name\":\"getBucketedDelays\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"getBucketedDelaysLength\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"getDelays\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"getDelaysLength\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepID\",\"type\":\"uint256\"}],\"name\":\"getForwarder\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"selector\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"topic0\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"topic1\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"topic2\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"topic3\",\"type\":\"bytes32\"}],\"name\":\"getLogTriggerConfig\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"logTrigger\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"getMinBalanceForUpkeep\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"p\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"n\",\"type\":\"uint256\"}],\"name\":\"getPxDelayLastNPerforms\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"uint16\",\"name\":\"bucket\",\"type\":\"uint16\"}],\"name\":\"getSumDelayInBucket\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"n\",\"type\":\"uint256\"}],\"name\":\"getSumDelayLastNPerforms\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"getTriggerType\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"getUpkeepInfo\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"performGas\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"checkData\",\"type\":\"bytes\"},{\"internalType\":\"uint96\",\"name\":\"balance\",\"type\":\"uint96\"},{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"maxValidBlocknumber\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"lastPerformedBlockNumber\",\"type\":\"uint32\"},{\"internalType\":\"uint96\",\"name\":\"amountSpent\",\"type\":\"uint96\"},{\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"offchainConfig\",\"type\":\"bytes\"}],\"internalType\":\"structKeeperRegistryBase2_1.UpkeepInfo\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"getUpkeepPrivilegeConfig\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"getUpkeepTriggerConfig\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"intervals\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"lastTopUpBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"linkToken\",\"outputs\":[{\"internalType\":\"contractLinkTokenInterface\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minBalanceThresholdMultiplier\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"performDataSizes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"performGasToBurns\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"performData\",\"type\":\"bytes\"}],\"name\":\"performUpkeep\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"previousPerformBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"registrar\",\"outputs\":[{\"internalType\":\"contractAutomationRegistrar2_1\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"registry\",\"outputs\":[{\"internalType\":\"contractIKeeperRegistryMaster\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"log\",\"type\":\"uint8\"}],\"name\":\"sendLog\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractAutomationRegistrar2_1\",\"name\":\"newRegistrar\",\"type\":\"address\"}],\"name\":\"setConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string[]\",\"name\":\"_feeds\",\"type\":\"string[]\"}],\"name\":\"setFeeds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_interval\",\"type\":\"uint256\"}],\"name\":\"setInterval\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_feedParamKey\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_timeParamKey\",\"type\":\"string\"}],\"name\":\"setParamKeys\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"setPerformDataSize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"}],\"name\":\"setUpkeepGasLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"cfg\",\"type\":\"bytes\"}],\"name\":\"setUpkeepPrivilegeConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeParamKey\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"blockNum\",\"type\":\"uint256\"}],\"name\":\"topUpFund\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"selector\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"topic0\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"topic1\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"topic2\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"topic3\",\"type\":\"bytes32\"}],\"name\":\"updateLogTriggerConfig1\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"cfg\",\"type\":\"bytes\"}],\"name\":\"updateLogTriggerConfig2\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"pipelineData\",\"type\":\"bytes\"}],\"name\":\"updateUpkeepPipelineData\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"upkeepTopUpCheckInterval\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"useArbitrumBlockNum\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"withdrawLinks\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"withdrawLinks\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", + ABI: "[{\"inputs\":[{\"internalType\":\"contractAutomationRegistrar2_1\",\"name\":\"_registrar\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_useArb\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"IndexOutOfRange\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"feedParamKey\",\"type\":\"string\"},{\"internalType\":\"string[]\",\"name\":\"feeds\",\"type\":\"string[]\"},{\"internalType\":\"string\",\"name\":\"timeParamKey\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"time\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"StreamsLookup\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"blockNum\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"LogEmitted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"blockNum\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"LogEmittedAgain\",\"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\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"blockNum\",\"type\":\"uint256\"}],\"name\":\"UpkeepTopUp\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BUCKET_SIZE\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"addFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"addLinkAmount\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"upkeepIds\",\"type\":\"uint256[]\"}],\"name\":\"batchCancelUpkeeps\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"upkeepIds\",\"type\":\"uint256[]\"},{\"internalType\":\"uint8\",\"name\":\"selector\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"topic0\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"topic1\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"topic2\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"topic3\",\"type\":\"bytes32\"}],\"name\":\"batchPreparingUpkeeps\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"upkeepIds\",\"type\":\"uint256[]\"},{\"internalType\":\"uint8\",\"name\":\"log\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"selector\",\"type\":\"uint8\"}],\"name\":\"batchPreparingUpkeepsSimple\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"number\",\"type\":\"uint8\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint8\",\"name\":\"triggerType\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"triggerConfig\",\"type\":\"bytes\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"checkGasToBurn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"performGasToBurn\",\"type\":\"uint256\"}],\"name\":\"batchRegisterUpkeeps\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"log\",\"type\":\"uint8\"}],\"name\":\"batchSendLogs\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"upkeepIds\",\"type\":\"uint256[]\"},{\"internalType\":\"uint32\",\"name\":\"interval\",\"type\":\"uint32\"}],\"name\":\"batchSetIntervals\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"upkeepIds\",\"type\":\"uint256[]\"}],\"name\":\"batchUpdatePipelineData\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"upkeepIds\",\"type\":\"uint256[]\"}],\"name\":\"batchWithdrawLinks\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"bucketedDelays\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"buckets\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"startGas\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"blockNum\",\"type\":\"uint256\"}],\"name\":\"burnPerformGas\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes[]\",\"name\":\"values\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"checkCallback\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"errCode\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"checkErrorHandler\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"upkeepNeeded\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"performData\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"checkGasToBurns\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"checkData\",\"type\":\"bytes\"}],\"name\":\"checkUpkeep\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"counters\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"delays\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"dummyMap\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"eligible\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"emittedAgainSig\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"emittedSig\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"feedParamKey\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"feedsHex\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"firstPerformBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"gasLimits\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"startIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxCount\",\"type\":\"uint256\"}],\"name\":\"getActiveUpkeepIDsDeployedByThisContract\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"startIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxCount\",\"type\":\"uint256\"}],\"name\":\"getAllActiveUpkeepIDsOnRegistry\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"getBalance\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"balance\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"uint16\",\"name\":\"bucket\",\"type\":\"uint16\"}],\"name\":\"getBucketedDelays\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"getBucketedDelaysLength\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"getDelays\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"getDelaysLength\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepID\",\"type\":\"uint256\"}],\"name\":\"getForwarder\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"selector\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"topic0\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"topic1\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"topic2\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"topic3\",\"type\":\"bytes32\"}],\"name\":\"getLogTriggerConfig\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"logTrigger\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"getMinBalanceForUpkeep\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"p\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"n\",\"type\":\"uint256\"}],\"name\":\"getPxDelayLastNPerforms\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"uint16\",\"name\":\"bucket\",\"type\":\"uint16\"}],\"name\":\"getSumDelayInBucket\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"n\",\"type\":\"uint256\"}],\"name\":\"getSumDelayLastNPerforms\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"getTriggerType\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"getUpkeepInfo\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"performGas\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"checkData\",\"type\":\"bytes\"},{\"internalType\":\"uint96\",\"name\":\"balance\",\"type\":\"uint96\"},{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"maxValidBlocknumber\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"lastPerformedBlockNumber\",\"type\":\"uint32\"},{\"internalType\":\"uint96\",\"name\":\"amountSpent\",\"type\":\"uint96\"},{\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"offchainConfig\",\"type\":\"bytes\"}],\"internalType\":\"structIAutomationV21PlusCommon.UpkeepInfoLegacy\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"getUpkeepPrivilegeConfig\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"getUpkeepTriggerConfig\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"intervals\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"lastTopUpBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"linkToken\",\"outputs\":[{\"internalType\":\"contractLinkTokenInterface\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minBalanceThresholdMultiplier\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"performDataSizes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"performGasToBurns\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"performData\",\"type\":\"bytes\"}],\"name\":\"performUpkeep\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"previousPerformBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"registrar\",\"outputs\":[{\"internalType\":\"contractAutomationRegistrar2_1\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"registry\",\"outputs\":[{\"internalType\":\"contractIKeeperRegistryMaster\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"log\",\"type\":\"uint8\"}],\"name\":\"sendLog\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractAutomationRegistrar2_1\",\"name\":\"newRegistrar\",\"type\":\"address\"}],\"name\":\"setConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string[]\",\"name\":\"_feeds\",\"type\":\"string[]\"}],\"name\":\"setFeeds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_interval\",\"type\":\"uint256\"}],\"name\":\"setInterval\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_feedParamKey\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_timeParamKey\",\"type\":\"string\"}],\"name\":\"setParamKeys\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"setPerformDataSize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"}],\"name\":\"setUpkeepGasLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"cfg\",\"type\":\"bytes\"}],\"name\":\"setUpkeepPrivilegeConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeParamKey\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"blockNum\",\"type\":\"uint256\"}],\"name\":\"topUpFund\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"selector\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"topic0\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"topic1\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"topic2\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"topic3\",\"type\":\"bytes32\"}],\"name\":\"updateLogTriggerConfig1\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"cfg\",\"type\":\"bytes\"}],\"name\":\"updateLogTriggerConfig2\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"pipelineData\",\"type\":\"bytes\"}],\"name\":\"updateUpkeepPipelineData\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"upkeepTopUpCheckInterval\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"useArbitrumBlockNum\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"withdrawLinks\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"withdrawLinks\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", Bin: "0x7f97009585a4d2440f981ab6f6eec514343e1e6b2aa9b991a26998e6806f41bf086080527fc76416badc8398ce17c93eab7b4f60f263241694cf503e4df24f233a8cc1c50d60a0526005601455601580546001600160681b0319166c140000000002c68af0bb140000179055606460e0526101c06040526042610140818152610100918291906200622361016039815260200160405180608001604052806042815260200162006265604291399052620000be906016906002620003c7565b506040805180820190915260098152680cccacac892c890caf60bb1b6020820152601790620000ee908262000543565b5060408051808201909152600b81526a313637b1b5a73ab6b132b960a91b602082015260189062000120908262000543565b503480156200012e57600080fd5b50604051620062a7380380620062a7833981016040819052620001519162000625565b81813380600081620001aa5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620001dd57620001dd816200031c565b5050601180546001600160a01b0319166001600160a01b038516908117909155604080516330fe427560e21b815281516000945063c3f909d4926004808401939192918290030181865afa1580156200023a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000260919062000668565b50601380546001600160a01b0319166001600160a01b038381169190911790915560115460408051631b6b6d2360e01b81529051939450911691631b6b6d23916004808201926020929091908290030181865afa158015620002c6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620002ec919062000699565b601280546001600160a01b0319166001600160a01b039290921691909117905550151560c05250620006c0915050565b336001600160a01b03821603620003765760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401620001a1565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b82805482825590600052602060002090810192821562000412579160200282015b8281111562000412578251829062000401908262000543565b5091602001919060010190620003e8565b506200042092915062000424565b5090565b80821115620004205760006200043b828262000445565b5060010162000424565b5080546200045390620004b4565b6000825580601f1062000464575050565b601f01602090049060005260206000209081019062000484919062000487565b50565b5b8082111562000420576000815560010162000488565b634e487b7160e01b600052604160045260246000fd5b600181811c90821680620004c957607f821691505b602082108103620004ea57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200053e57600081815260208120601f850160051c81016020861015620005195750805b601f850160051c820191505b818110156200053a5782815560010162000525565b5050505b505050565b81516001600160401b038111156200055f576200055f6200049e565b6200057781620005708454620004b4565b84620004f0565b602080601f831160018114620005af5760008415620005965750858301515b600019600386901b1c1916600185901b1785556200053a565b600085815260208120601f198616915b82811015620005e057888601518255948401946001909101908401620005bf565b5085821015620005ff5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6001600160a01b03811681146200048457600080fd5b600080604083850312156200063957600080fd5b825162000646816200060f565b602084015190925080151581146200065d57600080fd5b809150509250929050565b600080604083850312156200067c57600080fd5b825162000689816200060f565b6020939093015192949293505050565b600060208284031215620006ac57600080fd5b8151620006b9816200060f565b9392505050565b60805160a05160c05160e051615b0d62000716600039600081816105b10152611fcc0152600081816109f70152613cf90152600081816108700152613747015260008181610db4015261371c0152615b0d6000f3fe6080604052600436106104f05760003560e01c806379ba509711610294578063a6b594751161015e578063d6051a72116100d6578063e45530831161008a578063fa333dfb1161006f578063fa333dfb14610fc3578063fba7ffa314611076578063fcdc1f63146110a357600080fd5b8063e455308314610f8d578063f2fde38b14610fa357600080fd5b8063daee1aeb116100bb578063daee1aeb14610f20578063dbef701e14610f40578063e0114adb14610f6057600080fd5b8063d6051a7214610ee0578063da6cba4714610f0057600080fd5b8063b657bc9c1161012d578063c041982211610112578063c041982214610e8b578063c98f10b014610eab578063d4c2490014610ec057600080fd5b8063b657bc9c14610e4b578063becde0e114610e6b57600080fd5b8063a6b5947514610dd6578063a72aa27e14610df6578063af953a4a14610e16578063afb28d1f14610e3657600080fd5b80638fcb3fba1161020c5780639b429354116101c05780639d385eaa116101a55780639d385eaa14610d625780639d6f1cc714610d82578063a654824814610da257600080fd5b80639b42935414610d045780639b51fb0d14610d3157600080fd5b8063948108f7116101f1578063948108f714610c9a57806396cebc7c14610cba5780639ac542eb14610cda57600080fd5b80638fcb3fba14610c4d578063924ca57814610c7a57600080fd5b80638243444a1161026357806386e330af1161024857806386e330af14610be2578063873c758614610c025780638da5cb5b14610c2257600080fd5b80638243444a14610ba25780638340507c14610bc257600080fd5b806379ba509714610b2057806379ea994314610b355780637b10399914610b555780637e7a46dc14610b8257600080fd5b80634585e33b116103d55780635f17e6161161034d5780636e04ff0d1161030157806373644cce116102e657806373644cce14610aa65780637672130314610ad3578063776898c814610b0057600080fd5b80636e04ff0d14610a565780637145f11b14610a7657600080fd5b8063636092e811610332578063636092e8146109c0578063642f6cef146109e557806369cdbadb14610a2957600080fd5b80635f17e6161461097357806360457ff51461099357600080fd5b80634b56a42e116103a457806351c98be31161038957806351c98be31461091157806357970e93146109315780635d4ee7f31461095e57600080fd5b80634b56a42e146108bf5780635147cd59146108df57600080fd5b80634585e33b1461081157806345d2ec1714610831578063469820931461085e57806346e7a63e1461089257600080fd5b8063207b65161161046857806329e0a841116104375780632b20e3971161041c5780632b20e39714610772578063328ffd11146107c45780633ebe8d6c146107f157600080fd5b806329e0a841146107255780632a9032d31461075257600080fd5b8063207b6516146106a557806320e3dbd4146106c55780632636aecf146106e557806328c4b57b1461070557600080fd5b806312c55027116104bf5780631cdde251116104a45780631cdde251146106135780631e01043914610633578063206c32e81461067057600080fd5b806312c550271461059f57806319d97a94146105e657600080fd5b806306c1cc00146104fc578063077ac6211461051e5780630b7d33e6146105515780630fb172fb1461057157600080fd5b366104f757005b600080fd5b34801561050857600080fd5b5061051c61051736600461447b565b6110d0565b005b34801561052a57600080fd5b5061053e61053936600461452e565b61131f565b6040519081526020015b60405180910390f35b34801561055d57600080fd5b5061051c61056c366004614563565b61135d565b34801561057d57600080fd5b5061059161058c366004614563565b6113eb565b604051610548929190614618565b3480156105ab57600080fd5b506105d37f000000000000000000000000000000000000000000000000000000000000000081565b60405161ffff9091168152602001610548565b3480156105f257600080fd5b50610606610601366004614633565b611403565b604051610548919061464c565b34801561061f57600080fd5b5061051c61062e366004614681565b6114c0565b34801561063f57600080fd5b5061065361064e366004614633565b6115fd565b6040516bffffffffffffffffffffffff9091168152602001610548565b34801561067c57600080fd5b5061069061068b3660046146e6565b611692565b60408051928352602083019190915201610548565b3480156106b157600080fd5b506106066106c0366004614633565b611714565b3480156106d157600080fd5b5061051c6106e0366004614712565b61176c565b3480156106f157600080fd5b5061051c610700366004614774565b611936565b34801561071157600080fd5b5061053e6107203660046147ee565b611bff565b34801561073157600080fd5b50610745610740366004614633565b611c6a565b604051610548919061481a565b34801561075e57600080fd5b5061051c61076d36600461495b565b611d6f565b34801561077e57600080fd5b5060115461079f9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610548565b3480156107d057600080fd5b5061053e6107df366004614633565b60036020526000908152604090205481565b3480156107fd57600080fd5b5061053e61080c366004614633565b611e50565b34801561081d57600080fd5b5061051c61082c3660046149df565b611eb9565b34801561083d57600080fd5b5061085161084c3660046146e6565b6120d8565b6040516105489190614a15565b34801561086a57600080fd5b5061053e7f000000000000000000000000000000000000000000000000000000000000000081565b34801561089e57600080fd5b5061053e6108ad366004614633565b600a6020526000908152604090205481565b3480156108cb57600080fd5b506105916108da366004614a7d565b612147565b3480156108eb57600080fd5b506108ff6108fa366004614633565b61219b565b60405160ff9091168152602001610548565b34801561091d57600080fd5b5061051c61092c366004614b47565b61222f565b34801561093d57600080fd5b5060125461079f9073ffffffffffffffffffffffffffffffffffffffff1681565b34801561096a57600080fd5b5061051c6122d3565b34801561097f57600080fd5b5061051c61098e366004614b9e565b61240e565b34801561099f57600080fd5b5061053e6109ae366004614633565b60076020526000908152604090205481565b3480156109cc57600080fd5b50601554610653906bffffffffffffffffffffffff1681565b3480156109f157600080fd5b50610a197f000000000000000000000000000000000000000000000000000000000000000081565b6040519015158152602001610548565b348015610a3557600080fd5b5061053e610a44366004614633565b60086020526000908152604090205481565b348015610a6257600080fd5b50610591610a713660046149df565b6124db565b348015610a8257600080fd5b50610a19610a91366004614633565b600b6020526000908152604090205460ff1681565b348015610ab257600080fd5b5061053e610ac1366004614633565b6000908152600c602052604090205490565b348015610adf57600080fd5b5061053e610aee366004614633565b60046020526000908152604090205481565b348015610b0c57600080fd5b50610a19610b1b366004614633565b612704565b348015610b2c57600080fd5b5061051c612756565b348015610b4157600080fd5b5061079f610b50366004614633565b612853565b348015610b6157600080fd5b5060135461079f9073ffffffffffffffffffffffffffffffffffffffff1681565b348015610b8e57600080fd5b5061051c610b9d366004614bc0565b6128e7565b348015610bae57600080fd5b5061051c610bbd366004614bc0565b612978565b348015610bce57600080fd5b5061051c610bdd366004614c0c565b6129d2565b348015610bee57600080fd5b5061051c610bfd366004614c59565b6129f0565b348015610c0e57600080fd5b50610851610c1d366004614b9e565b612a03565b348015610c2e57600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff1661079f565b348015610c5957600080fd5b5061053e610c68366004614633565b60056020526000908152604090205481565b348015610c8657600080fd5b5061051c610c95366004614b9e565b612ac0565b348015610ca657600080fd5b5061051c610cb5366004614d0a565b612d05565b348015610cc657600080fd5b5061051c610cd5366004614d3a565b612e1d565b348015610ce657600080fd5b506015546108ff906c01000000000000000000000000900460ff1681565b348015610d1057600080fd5b5061051c610d1f366004614b9e565b60009182526009602052604090912055565b348015610d3d57600080fd5b506105d3610d4c366004614633565b600e6020526000908152604090205461ffff1681565b348015610d6e57600080fd5b50610851610d7d366004614633565b613027565b348015610d8e57600080fd5b50610606610d9d366004614633565b613089565b348015610dae57600080fd5b5061053e7f000000000000000000000000000000000000000000000000000000000000000081565b348015610de257600080fd5b5061051c610df13660046147ee565b613135565b348015610e0257600080fd5b5061051c610e11366004614d57565b61319e565b348015610e2257600080fd5b5061051c610e31366004614633565b613249565b348015610e4257600080fd5b506106066132cf565b348015610e5757600080fd5b50610653610e66366004614633565b6132dc565b348015610e7757600080fd5b5061051c610e8636600461495b565b613334565b348015610e9757600080fd5b50610851610ea6366004614b9e565b6133ce565b348015610eb757600080fd5b506106066134cb565b348015610ecc57600080fd5b5061051c610edb366004614d7c565b6134d8565b348015610eec57600080fd5b50610690610efb366004614b9e565b613557565b348015610f0c57600080fd5b5061051c610f1b366004614da1565b6135c0565b348015610f2c57600080fd5b5061051c610f3b36600461495b565b613927565b348015610f4c57600080fd5b5061053e610f5b366004614b9e565b6139f2565b348015610f6c57600080fd5b5061053e610f7b366004614633565b60096020526000908152604090205481565b348015610f9957600080fd5b5061053e60145481565b348015610faf57600080fd5b5061051c610fbe366004614712565b613a23565b348015610fcf57600080fd5b50610606610fde366004614e09565b6040805160c0808201835273ffffffffffffffffffffffffffffffffffffffff9890981680825260ff97881660208084019182528385019889526060808501988952608080860198895260a095860197885286519283019490945291519099168985015296519688019690965293519486019490945290519184019190915251828401528051808303909301835260e0909101905290565b34801561108257600080fd5b5061053e611091366004614633565b60066020526000908152604090205481565b3480156110af57600080fd5b5061053e6110be366004614633565b60026020526000908152604090205481565b6040805161018081018252600461014082019081527f746573740000000000000000000000000000000000000000000000000000000061016083015281528151602081810184526000808352818401929092523083850181905263ffffffff8b166060850152608084015260ff808a1660a08501528451808301865283815260c085015260e0840189905284519182019094529081526101008201526bffffffffffffffffffffffff8516610120820152601254601154919273ffffffffffffffffffffffffffffffffffffffff9182169263095ea7b39216906111b6908c1688614e91565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815273ffffffffffffffffffffffffffffffffffffffff90921660048301526bffffffffffffffffffffffff1660248201526044016020604051808303816000875af1158015611234573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112589190614ed5565b5060008860ff1667ffffffffffffffff8111156112775761127761431d565b6040519080825280602002602001820160405280156112a0578160200160208202803683370190505b50905060005b8960ff168160ff1610156113135760006112bf84613a37565b905080838360ff16815181106112d7576112d7614ef0565b6020908102919091018101919091526000918252600881526040808320889055600790915290208490558061130b81614f1f565b9150506112a6565b50505050505050505050565b600d602052826000526040600020602052816000526040600020818154811061134757600080fd5b9060005260206000200160009250925050505481565b6013546040517f0b7d33e600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911690630b7d33e6906113b59085908590600401614f3e565b600060405180830381600087803b1580156113cf57600080fd5b505af11580156113e3573d6000803e3d6000fd5b505050505050565b604080516000808252602082019092525b9250929050565b6013546040517f19d97a940000000000000000000000000000000000000000000000000000000081526004810183905260609173ffffffffffffffffffffffffffffffffffffffff16906319d97a94906024015b600060405180830381865afa158015611474573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526114ba9190810190614fa4565b92915050565b6013546040517ffa333dfb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff888116600483015260ff8816602483015260448201879052606482018690526084820185905260a4820184905290911690634ee88d35908990309063fa333dfb9060c401600060405180830381865afa15801561155f573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526115a59190810190614fa4565b6040518363ffffffff1660e01b81526004016115c2929190614f3e565b600060405180830381600087803b1580156115dc57600080fd5b505af11580156115f0573d6000803e3d6000fd5b5050505050505050505050565b6013546040517f1e0104390000000000000000000000000000000000000000000000000000000081526004810183905260009173ffffffffffffffffffffffffffffffffffffffff1690631e010439906024015b602060405180830381865afa15801561166e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114ba9190614fe4565b6000828152600d6020908152604080832061ffff8516845282528083208054825181850281018501909352808352849384939291908301828280156116f657602002820191906000526020600020905b8154815260200190600101908083116116e2575b50505050509050611708818251613b05565b92509250509250929050565b6013546040517f207b65160000000000000000000000000000000000000000000000000000000081526004810183905260609173ffffffffffffffffffffffffffffffffffffffff169063207b651690602401611457565b601180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8316908117909155604080517fc3f909d400000000000000000000000000000000000000000000000000000000815281516000939263c3f909d492600480820193918290030181865afa158015611802573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611826919061500c565b50601380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691909117909155601154604080517f1b6b6d230000000000000000000000000000000000000000000000000000000081529051939450911691631b6b6d23916004808201926020929091908290030181865afa1580156118c9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118ed919061503a565b601280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff929092169190911790555050565b8560005b81811015611bf457600089898381811061195657611956614ef0565b9050602002013590503073ffffffffffffffffffffffffffffffffffffffff16637e7a46dc828360405160200161198f91815260200190565b6040516020818303038152906040526040518363ffffffff1660e01b81526004016119bb929190614f3e565b600060405180830381600087803b1580156119d557600080fd5b505af11580156119e9573d6000803e3d6000fd5b50506013546040517f5147cd59000000000000000000000000000000000000000000000000000000008152600481018590526000935073ffffffffffffffffffffffffffffffffffffffff9091169150635147cd5990602401602060405180830381865afa158015611a5f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a839190615057565b90508060ff16600103611bdf576040517ffa333dfb000000000000000000000000000000000000000000000000000000008152306004820181905260ff8b166024830152604482018a9052606482018890526084820188905260a4820187905260009163fa333dfb9060c401600060405180830381865afa158015611b0c573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201604052611b529190810190614fa4565b6013546040517f4ee88d3500000000000000000000000000000000000000000000000000000000815291925073ffffffffffffffffffffffffffffffffffffffff1690634ee88d3590611bab9086908590600401614f3e565b600060405180830381600087803b158015611bc557600080fd5b505af1158015611bd9573d6000803e3d6000fd5b50505050505b50508080611bec90615074565b91505061193a565b505050505050505050565b6000838152600c602090815260408083208054825181850281018501909352808352611c6093830182828015611c5457602002820191906000526020600020905b815481526020019060010190808311611c40575b50505050508484613b8a565b90505b9392505050565b604080516101408101825260008082526020820181905260609282018390528282018190526080820181905260a0820181905260c0820181905260e082018190526101008201526101208101919091526013546040517fc7c3a19a0000000000000000000000000000000000000000000000000000000081526004810184905273ffffffffffffffffffffffffffffffffffffffff9091169063c7c3a19a90602401600060405180830381865afa158015611d29573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526114ba91908101906150cf565b8060005b818160ff161015611e4a5760135473ffffffffffffffffffffffffffffffffffffffff1663c8048022858560ff8516818110611db157611db1614ef0565b905060200201356040518263ffffffff1660e01b8152600401611dd691815260200190565b600060405180830381600087803b158015611df057600080fd5b505af1158015611e04573d6000803e3d6000fd5b50505050611e3784848360ff16818110611e2057611e20614ef0565b90506020020135600f613ce990919063ffffffff16565b5080611e4281614f1f565b915050611d73565b50505050565b6000818152600e602052604081205461ffff1681805b8261ffff168161ffff1611611eb1576000858152600d6020908152604080832061ffff85168452909152902054611e9d90836151ee565b915080611ea981615201565b915050611e66565b509392505050565b60005a9050600080611ecd84860186614a7d565b91509150600081806020019051810190611ee79190615222565b60008181526005602090815260408083205460049092528220549293509190611f0e613cf5565b905082600003611f2e576000848152600560205260409020819055612089565b600084815260036020526040812054611f47848461523b565b611f51919061523b565b6000868152600e6020908152604080832054600d835281842061ffff909116808552908352818420805483518186028101860190945280845295965090949192909190830182828015611fc357602002820191906000526020600020905b815481526020019060010190808311611faf575b505050505090507f000000000000000000000000000000000000000000000000000000000000000061ffff1681510361203e578161200081615201565b6000898152600e6020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00001661ffff83161790559250505b506000868152600d6020908152604080832061ffff909416835292815282822080546001818101835591845282842001859055888352600c8252928220805493840181558252902001555b6000848152600660205260408120546120a39060016151ee565b60008681526006602090815260408083208490556004909152902083905590506120cd8583612ac0565b611313858984613135565b6000828152600d6020908152604080832061ffff8516845282529182902080548351818402810184019094528084526060939283018282801561213a57602002820191906000526020600020905b815481526020019060010190808311612126575b5050505050905092915050565b600060606000848460405160200161216092919061524e565b604080518083037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe00181529190526001969095509350505050565b6013546040517f5147cd590000000000000000000000000000000000000000000000000000000081526004810183905260009173ffffffffffffffffffffffffffffffffffffffff1690635147cd5990602401602060405180830381865afa15801561220b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114ba9190615057565b8160005b818110156122cc5730635f17e61686868481811061225357612253614ef0565b90506020020135856040518363ffffffff1660e01b815260040161228792919091825263ffffffff16602082015260400190565b600060405180830381600087803b1580156122a157600080fd5b505af11580156122b5573d6000803e3d6000fd5b5050505080806122c490615074565b915050612233565b5050505050565b6122db613d97565b6012546040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009173ffffffffffffffffffffffffffffffffffffffff16906370a0823190602401602060405180830381865afa15801561234a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061236e9190615222565b6012546040517fa9059cbb0000000000000000000000000000000000000000000000000000000081523360048201526024810183905291925073ffffffffffffffffffffffffffffffffffffffff169063a9059cbb906044016020604051808303816000875af11580156123e6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061240a9190614ed5565b5050565b60008281526003602090815260408083208490556005825280832083905560068252808320839055600c90915281206124469161421c565b6000828152600e602052604081205461ffff16905b8161ffff168161ffff16116124a2576000848152600d6020908152604080832061ffff8516845290915281206124909161421c565b8061249a81615201565b91505061245b565b5050506000908152600e6020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000169055565b6000606060005a905060006124f285870187614633565b60008181526009602090815260408083205460089092528220549293509190838367ffffffffffffffff81111561252b5761252b61431d565b6040519080825280601f01601f191660200182016040528015612555576020820181803683370190505b50604051602001612567929190614f3e565b60405160208183030381529060405290506000612582613cf5565b9050600061258f86612704565b90505b835a61259e908961523b565b6125aa906127106151ee565b10156125eb5781406000908152600b6020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055612592565b806126035760008398509850505050505050506113fc565b6040517f6665656449644865780000000000000000000000000000000000000000000000602082015260009060290160405160208183030381529060405280519060200120601760405160200161265a9190615335565b604051602081830303815290604052805190602001200361267c57508161267f565b50425b601760166018838a60405160200161269991815260200190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152908290527ff055e4a20000000000000000000000000000000000000000000000000000000082526126fb9594939291600401615464565b60405180910390fd5b600081815260056020526040812054810361272157506001919050565b600082815260036020908152604080832054600490925290912054612744613cf5565b61274e919061523b565b101592915050565b60015473ffffffffffffffffffffffffffffffffffffffff1633146127d7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e65720000000000000000000060448201526064016126fb565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b6013546040517f79ea99430000000000000000000000000000000000000000000000000000000081526004810183905260009173ffffffffffffffffffffffffffffffffffffffff16906379ea994390602401602060405180830381865afa1580156128c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114ba919061503a565b6013546040517fcd7f71b500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091169063cd7f71b59061294190869086908690600401615527565b600060405180830381600087803b15801561295b57600080fd5b505af115801561296f573d6000803e3d6000fd5b50505050505050565b6013546040517f4ee88d3500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911690634ee88d359061294190869086908690600401615527565b60176129de83826155c1565b5060186129eb82826155c1565b505050565b805161240a90601690602084019061423a565b6013546040517f06e3b632000000000000000000000000000000000000000000000000000000008152600481018490526024810183905260609173ffffffffffffffffffffffffffffffffffffffff16906306e3b63290604401600060405180830381865afa158015612a7a573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201604052611c6391908101906156db565b601454600083815260026020526040902054612adc908361523b565b111561240a576013546040517fc7c3a19a0000000000000000000000000000000000000000000000000000000081526004810184905260009173ffffffffffffffffffffffffffffffffffffffff169063c7c3a19a90602401600060405180830381865afa158015612b52573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201604052612b9891908101906150cf565b6013546040517fb657bc9c0000000000000000000000000000000000000000000000000000000081526004810186905291925060009173ffffffffffffffffffffffffffffffffffffffff9091169063b657bc9c90602401602060405180830381865afa158015612c0d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c319190614fe4565b601554909150612c559082906c01000000000000000000000000900460ff16614e91565b6bffffffffffffffffffffffff1682606001516bffffffffffffffffffffffff161015611e4a57601554612c989085906bffffffffffffffffffffffff16612d05565b60008481526002602090815260409182902085905560155482518781526bffffffffffffffffffffffff909116918101919091529081018490527f49d4100ab0124eb4a9a65dc4ea08d6412a43f6f05c49194983f5b322bcc0a5c09060600160405180910390a150505050565b6012546013546040517f095ea7b300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff91821660048201526bffffffffffffffffffffffff8416602482015291169063095ea7b3906044016020604051808303816000875af1158015612d8d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612db19190614ed5565b506013546040517f948108f7000000000000000000000000000000000000000000000000000000008152600481018490526bffffffffffffffffffffffff8316602482015273ffffffffffffffffffffffffffffffffffffffff9091169063948108f7906044016113b5565b6040517fc04198220000000000000000000000000000000000000000000000000000000081526000600482018190526024820181905290309063c041982290604401600060405180830381865afa158015612e7c573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201604052612ec291908101906156db565b80519091506000612ed1613cf5565b905060005b828110156122cc576000848281518110612ef257612ef2614ef0565b60209081029190910101516013546040517f5147cd590000000000000000000000000000000000000000000000000000000081526004810183905291925060009173ffffffffffffffffffffffffffffffffffffffff90911690635147cd5990602401602060405180830381865afa158015612f72573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f969190615057565b90508060ff16600103613012578660ff16600003612fe2576040513090859084907f97009585a4d2440f981ab6f6eec514343e1e6b2aa9b991a26998e6806f41bf0890600090a4613012565b6040513090859084907fc76416badc8398ce17c93eab7b4f60f263241694cf503e4df24f233a8cc1c50d90600090a45b5050808061301f90615074565b915050612ed6565b6000818152600c602090815260409182902080548351818402810184019094528084526060939283018282801561307d57602002820191906000526020600020905b815481526020019060010190808311613069575b50505050509050919050565b6016818154811061309957600080fd5b9060005260206000200160009150905080546130b4906152e2565b80601f01602080910402602001604051908101604052809291908181526020018280546130e0906152e2565b801561312d5780601f106131025761010080835404028352916020019161312d565b820191906000526020600020905b81548152906001019060200180831161311057829003601f168201915b505050505081565b6000838152600760205260409020545b805a613151908561523b565b61315d906127106151ee565b1015611e4a5781406000908152600b6020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055613145565b6013546040517fa72aa27e0000000000000000000000000000000000000000000000000000000081526004810184905263ffffffff8316602482015273ffffffffffffffffffffffffffffffffffffffff9091169063a72aa27e90604401600060405180830381600087803b15801561321657600080fd5b505af115801561322a573d6000803e3d6000fd5b505050600092835250600a602052604090912063ffffffff9091169055565b6013546040517f744bfe610000000000000000000000000000000000000000000000000000000081526004810183905230602482015273ffffffffffffffffffffffffffffffffffffffff9091169063744bfe6190604401600060405180830381600087803b1580156132bb57600080fd5b505af11580156122cc573d6000803e3d6000fd5b601780546130b4906152e2565b6013546040517fb657bc9c0000000000000000000000000000000000000000000000000000000081526004810183905260009173ffffffffffffffffffffffffffffffffffffffff169063b657bc9c90602401611651565b8060005b818163ffffffff161015611e4a573063af953a4a858563ffffffff851681811061336457613364614ef0565b905060200201356040518263ffffffff1660e01b815260040161338991815260200190565b600060405180830381600087803b1580156133a357600080fd5b505af11580156133b7573d6000803e3d6000fd5b5050505080806133c69061576c565b915050613338565b606060006133dc600f613e1a565b9050808410613417576040517f1390f2a100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8260000361342c57613429848261523b565b92505b60008367ffffffffffffffff8111156134475761344761431d565b604051908082528060200260200182016040528015613470578160200160208202803683370190505b50905060005b848110156134c25761349361348b82886151ee565b600f90613e24565b8282815181106134a5576134a5614ef0565b6020908102919091010152806134ba81615074565b915050613476565b50949350505050565b601880546130b4906152e2565b60006134e2613cf5565b90508160ff16600003613523576040513090829085907f97009585a4d2440f981ab6f6eec514343e1e6b2aa9b991a26998e6806f41bf0890600090a4505050565b6040513090829085907fc76416badc8398ce17c93eab7b4f60f263241694cf503e4df24f233a8cc1c50d90600090a4505050565b6000828152600c602090815260408083208054825181850281018501909352808352849384939291908301828280156135af57602002820191906000526020600020905b81548152602001906001019080831161359b575b505050505090506117088185613b05565b8260005b818110156113e35760008686838181106135e0576135e0614ef0565b9050602002013590503073ffffffffffffffffffffffffffffffffffffffff16637e7a46dc828360405160200161361991815260200190565b6040516020818303038152906040526040518363ffffffff1660e01b8152600401613645929190614f3e565b600060405180830381600087803b15801561365f57600080fd5b505af1158015613673573d6000803e3d6000fd5b50506013546040517f5147cd59000000000000000000000000000000000000000000000000000000008152600481018590526000935073ffffffffffffffffffffffffffffffffffffffff9091169150635147cd5990602401602060405180830381865afa1580156136e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061370d9190615057565b90508060ff16600103613912577f000000000000000000000000000000000000000000000000000000000000000060ff87161561376757507f00000000000000000000000000000000000000000000000000000000000000005b60003073ffffffffffffffffffffffffffffffffffffffff1663fa333dfb3089858860405160200161379b91815260200190565b6040516020818303038152906040526137b390615785565b60405160e086901b7fffffffff0000000000000000000000000000000000000000000000000000000016815273ffffffffffffffffffffffffffffffffffffffff909416600485015260ff90921660248401526044830152606482015260006084820181905260a482015260c401600060405180830381865afa15801561383e573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526138849190810190614fa4565b6013546040517f4ee88d3500000000000000000000000000000000000000000000000000000000815291925073ffffffffffffffffffffffffffffffffffffffff1690634ee88d35906138dd9087908590600401614f3e565b600060405180830381600087803b1580156138f757600080fd5b505af115801561390b573d6000803e3d6000fd5b5050505050505b5050808061391f90615074565b9150506135c4565b8060005b81811015611e4a57600084848381811061394757613947614ef0565b9050602002013590503073ffffffffffffffffffffffffffffffffffffffff16637e7a46dc828360405160200161398091815260200190565b6040516020818303038152906040526040518363ffffffff1660e01b81526004016139ac929190614f3e565b600060405180830381600087803b1580156139c657600080fd5b505af11580156139da573d6000803e3d6000fd5b505050505080806139ea90615074565b91505061392b565b600c6020528160005260406000208181548110613a0e57600080fd5b90600052602060002001600091509150505481565b613a2b613d97565b613a3481613e30565b50565b6011546040517f3f678e11000000000000000000000000000000000000000000000000000000008152600091829173ffffffffffffffffffffffffffffffffffffffff90911690633f678e1190613a929086906004016157c7565b6020604051808303816000875af1158015613ab1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613ad59190615222565b9050613ae2600f82613f25565b506060909201516000838152600a6020526040902063ffffffff90911690555090565b815160009081908190841580613b1b5750808510155b15613b24578094505b60008092505b85831015613b8057866001613b3f858561523b565b613b49919061523b565b81518110613b5957613b59614ef0565b602002602001015181613b6c91906151ee565b905082613b7881615074565b935050613b2a565b9694955050505050565b82516000908190831580613b9e5750808410155b15613ba7578093505b60008467ffffffffffffffff811115613bc257613bc261431d565b604051908082528060200260200182016040528015613beb578160200160208202803683370190505b509050600092505b84831015613c5957866001613c08858561523b565b613c12919061523b565b81518110613c2257613c22614ef0565b6020026020010151818481518110613c3c57613c3c614ef0565b602090810291909101015282613c5181615074565b935050613bf3565b613c7281600060018451613c6d919061523b565b613f31565b85606403613cab578060018251613c89919061523b565b81518110613c9957613c99614ef0565b60200260200101519350505050611c63565b806064825188613cbb9190615919565b613cc59190615985565b81518110613cd557613cd5614ef0565b602002602001015193505050509392505050565b6000611c6383836140a9565b60007f000000000000000000000000000000000000000000000000000000000000000015613d9257606473ffffffffffffffffffffffffffffffffffffffff1663a3b1b31d6040518163ffffffff1660e01b8152600401602060405180830381865afa158015613d69573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613d8d9190615222565b905090565b504390565b60005473ffffffffffffffffffffffffffffffffffffffff163314613e18576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e65720000000000000000000060448201526064016126fb565b565b60006114ba825490565b6000611c6383836141a3565b3373ffffffffffffffffffffffffffffffffffffffff821603613eaf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c6600000000000000000060448201526064016126fb565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6000611c6383836141cd565b8181808203613f41575050505050565b6000856002613f508787615999565b613f5a91906159b9565b613f649087615a21565b81518110613f7457613f74614ef0565b602002602001015190505b818313614083575b80868481518110613f9a57613f9a614ef0565b60200260200101511015613fba5782613fb281615a49565b935050613f87565b858281518110613fcc57613fcc614ef0565b6020026020010151811015613fed5781613fe581615a7a565b925050613fba565b81831361407e5785828151811061400657614006614ef0565b602002602001015186848151811061402057614020614ef0565b602002602001015187858151811061403a5761403a614ef0565b6020026020010188858151811061405357614053614ef0565b6020908102919091010191909152528261406c81615a49565b935050818061407a90615a7a565b9250505b613f7f565b8185121561409657614096868684613f31565b838312156113e3576113e3868486613f31565b600081815260018301602052604081205480156141925760006140cd60018361523b565b85549091506000906140e19060019061523b565b905081811461414657600086600001828154811061410157614101614ef0565b906000526020600020015490508087600001848154811061412457614124614ef0565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061415757614157615ad1565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506114ba565b60009150506114ba565b5092915050565b60008260000182815481106141ba576141ba614ef0565b9060005260206000200154905092915050565b6000818152600183016020526040812054614214575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556114ba565b5060006114ba565b5080546000825590600052602060002090810190613a349190614290565b828054828255906000526020600020908101928215614280579160200282015b82811115614280578251829061427090826155c1565b509160200191906001019061425a565b5061428c9291506142a5565b5090565b5b8082111561428c5760008155600101614291565b8082111561428c5760006142b982826142c2565b506001016142a5565b5080546142ce906152e2565b6000825580601f106142de575050565b601f016020900490600052602060002090810190613a349190614290565b60ff81168114613a3457600080fd5b63ffffffff81168114613a3457600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051610140810167ffffffffffffffff811182821017156143705761437061431d565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156143bd576143bd61431d565b604052919050565b600067ffffffffffffffff8211156143df576143df61431d565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b600082601f83011261441c57600080fd5b813561442f61442a826143c5565b614376565b81815284602083860101111561444457600080fd5b816020850160208301376000918101602001919091529392505050565b6bffffffffffffffffffffffff81168114613a3457600080fd5b600080600080600080600060e0888a03121561449657600080fd5b87356144a1816142fc565b965060208801356144b18161430b565b955060408801356144c1816142fc565b9450606088013567ffffffffffffffff8111156144dd57600080fd5b6144e98a828b0161440b565b94505060808801356144fa81614461565b9699959850939692959460a0840135945060c09093013592915050565b803561ffff8116811461452957600080fd5b919050565b60008060006060848603121561454357600080fd5b8335925061455360208501614517565b9150604084013590509250925092565b6000806040838503121561457657600080fd5b82359150602083013567ffffffffffffffff81111561459457600080fd5b6145a08582860161440b565b9150509250929050565b60005b838110156145c55781810151838201526020016145ad565b50506000910152565b600081518084526145e68160208601602086016145aa565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b8215158152604060208201526000611c6060408301846145ce565b60006020828403121561464557600080fd5b5035919050565b602081526000611c6360208301846145ce565b73ffffffffffffffffffffffffffffffffffffffff81168114613a3457600080fd5b600080600080600080600060e0888a03121561469c57600080fd5b8735965060208801356146ae8161465f565b955060408801356146be816142fc565b969995985095966060810135965060808101359560a0820135955060c0909101359350915050565b600080604083850312156146f957600080fd5b8235915061470960208401614517565b90509250929050565b60006020828403121561472457600080fd5b8135611c638161465f565b60008083601f84011261474157600080fd5b50813567ffffffffffffffff81111561475957600080fd5b6020830191508360208260051b85010111156113fc57600080fd5b600080600080600080600060c0888a03121561478f57600080fd5b873567ffffffffffffffff8111156147a657600080fd5b6147b28a828b0161472f565b90985096505060208801356147c6816142fc565b96999598509596604081013596506060810135956080820135955060a0909101359350915050565b60008060006060848603121561480357600080fd5b505081359360208301359350604090920135919050565b6020815261484160208201835173ffffffffffffffffffffffffffffffffffffffff169052565b6000602083015161485a604084018263ffffffff169052565b5060408301516101408060608501526148776101608501836145ce565b9150606085015161489860808601826bffffffffffffffffffffffff169052565b50608085015173ffffffffffffffffffffffffffffffffffffffff811660a08601525060a085015167ffffffffffffffff811660c08601525060c085015163ffffffff811660e08601525060e0850151610100614904818701836bffffffffffffffffffffffff169052565b86015190506101206149198682018315159052565b8601518584037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe00183870152905061495183826145ce565b9695505050505050565b6000806020838503121561496e57600080fd5b823567ffffffffffffffff81111561498557600080fd5b6149918582860161472f565b90969095509350505050565b60008083601f8401126149af57600080fd5b50813567ffffffffffffffff8111156149c757600080fd5b6020830191508360208285010111156113fc57600080fd5b600080602083850312156149f257600080fd5b823567ffffffffffffffff811115614a0957600080fd5b6149918582860161499d565b6020808252825182820181905260009190848201906040850190845b81811015614a4d57835183529284019291840191600101614a31565b50909695505050505050565b600067ffffffffffffffff821115614a7357614a7361431d565b5060051b60200190565b60008060408385031215614a9057600080fd5b823567ffffffffffffffff80821115614aa857600080fd5b818501915085601f830112614abc57600080fd5b81356020614acc61442a83614a59565b82815260059290921b84018101918181019089841115614aeb57600080fd5b8286015b84811015614b2357803586811115614b075760008081fd5b614b158c86838b010161440b565b845250918301918301614aef565b5096505086013592505080821115614b3a57600080fd5b506145a08582860161440b565b600080600060408486031215614b5c57600080fd5b833567ffffffffffffffff811115614b7357600080fd5b614b7f8682870161472f565b9094509250506020840135614b938161430b565b809150509250925092565b60008060408385031215614bb157600080fd5b50508035926020909101359150565b600080600060408486031215614bd557600080fd5b83359250602084013567ffffffffffffffff811115614bf357600080fd5b614bff8682870161499d565b9497909650939450505050565b60008060408385031215614c1f57600080fd5b823567ffffffffffffffff80821115614c3757600080fd5b614c438683870161440b565b93506020850135915080821115614b3a57600080fd5b60006020808385031215614c6c57600080fd5b823567ffffffffffffffff80821115614c8457600080fd5b818501915085601f830112614c9857600080fd5b8135614ca661442a82614a59565b81815260059190911b83018401908481019088831115614cc557600080fd5b8585015b83811015614cfd57803585811115614ce15760008081fd5b614cef8b89838a010161440b565b845250918601918601614cc9565b5098975050505050505050565b60008060408385031215614d1d57600080fd5b823591506020830135614d2f81614461565b809150509250929050565b600060208284031215614d4c57600080fd5b8135611c63816142fc565b60008060408385031215614d6a57600080fd5b823591506020830135614d2f8161430b565b60008060408385031215614d8f57600080fd5b823591506020830135614d2f816142fc565b60008060008060608587031215614db757600080fd5b843567ffffffffffffffff811115614dce57600080fd5b614dda8782880161472f565b9095509350506020850135614dee816142fc565b91506040850135614dfe816142fc565b939692955090935050565b60008060008060008060c08789031215614e2257600080fd5b8635614e2d8161465f565b95506020870135614e3d816142fc565b95989597505050506040840135936060810135936080820135935060a0909101359150565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006bffffffffffffffffffffffff80831681851681830481118215151615614ebc57614ebc614e62565b02949350505050565b8051801515811461452957600080fd5b600060208284031215614ee757600080fd5b611c6382614ec5565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600060ff821660ff8103614f3557614f35614e62565b60010192915050565b828152604060208201526000611c6060408301846145ce565b600082601f830112614f6857600080fd5b8151614f7661442a826143c5565b818152846020838601011115614f8b57600080fd5b614f9c8260208301602087016145aa565b949350505050565b600060208284031215614fb657600080fd5b815167ffffffffffffffff811115614fcd57600080fd5b614f9c84828501614f57565b805161452981614461565b600060208284031215614ff657600080fd5b8151611c6381614461565b80516145298161465f565b6000806040838503121561501f57600080fd5b825161502a8161465f565b6020939093015192949293505050565b60006020828403121561504c57600080fd5b8151611c638161465f565b60006020828403121561506957600080fd5b8151611c63816142fc565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036150a5576150a5614e62565b5060010190565b80516145298161430b565b805167ffffffffffffffff8116811461452957600080fd5b6000602082840312156150e157600080fd5b815167ffffffffffffffff808211156150f957600080fd5b90830190610140828603121561510e57600080fd5b61511661434c565b61511f83615001565b815261512d602084016150ac565b602082015260408301518281111561514457600080fd5b61515087828601614f57565b60408301525061516260608401614fd9565b606082015261517360808401615001565b608082015261518460a084016150b7565b60a082015261519560c084016150ac565b60c08201526151a660e08401614fd9565b60e08201526101006151b9818501614ec5565b9082015261012083810151838111156151d157600080fd5b6151dd88828701614f57565b918301919091525095945050505050565b808201808211156114ba576114ba614e62565b600061ffff80831681810361521857615218614e62565b6001019392505050565b60006020828403121561523457600080fd5b5051919050565b818103818111156114ba576114ba614e62565b6000604082016040835280855180835260608501915060608160051b8601019250602080880160005b838110156152c3577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa08887030185526152b18683516145ce565b95509382019390820190600101615277565b5050858403818701525050506152d981856145ce565b95945050505050565b600181811c908216806152f657607f821691505b60208210810361532f577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b6000808354615343816152e2565b6001828116801561535b576001811461538e576153bd565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00841687528215158302870194506153bd565b8760005260208060002060005b858110156153b45781548a82015290840190820161539b565b50505082870194505b50929695505050505050565b600081546153d6816152e2565b8085526020600183811680156153f3576001811461542b57615459565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008516838901528284151560051b8901019550615459565b866000528260002060005b858110156154515781548a8201860152908301908401615436565b890184019650505b505050505092915050565b60a08152600061547760a08301886153c9565b6020838203818501528188548084528284019150828160051b8501018a6000528360002060005b838110156154e9577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08784030185526154d783836153c9565b9486019492506001918201910161549e565b505086810360408801526154fd818b6153c9565b945050505050846060840152828103608084015261551b81856145ce565b98975050505050505050565b83815260406020820152816040820152818360608301376000818301606090810191909152601f9092017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016010192915050565b601f8211156129eb57600081815260208120601f850160051c810160208610156155a25750805b601f850160051c820191505b818110156113e3578281556001016155ae565b815167ffffffffffffffff8111156155db576155db61431d565b6155ef816155e984546152e2565b8461557b565b602080601f831160018114615642576000841561560c5750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b1785556113e3565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b8281101561568f57888601518255948401946001909101908401615670565b50858210156156cb57878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b600060208083850312156156ee57600080fd5b825167ffffffffffffffff81111561570557600080fd5b8301601f8101851361571657600080fd5b805161572461442a82614a59565b81815260059190911b8201830190838101908783111561574357600080fd5b928401925b8284101561576157835182529284019290840190615748565b979650505050505050565b600063ffffffff80831681810361521857615218614e62565b8051602080830151919081101561532f577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60209190910360031b1b16919050565b60208152600082516101408060208501526157e66101608501836145ce565b915060208501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08086850301604087015261582284836145ce565b93506040870151915061584d606087018373ffffffffffffffffffffffffffffffffffffffff169052565b606087015163ffffffff811660808801529150608087015173ffffffffffffffffffffffffffffffffffffffff811660a0880152915060a087015160ff811660c0880152915060c08701519150808685030160e08701526158ae84836145ce565b935060e087015191506101008187860301818801526158cd85846145ce565b9450808801519250506101208187860301818801526158ec85846145ce565b9450808801519250505061590f828601826bffffffffffffffffffffffff169052565b5090949350505050565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561595157615951614e62565b500290565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60008261599457615994615956565b500490565b818103600083128015838313168383128216171561419c5761419c614e62565b6000826159c8576159c8615956565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83147f800000000000000000000000000000000000000000000000000000000000000083141615615a1c57615a1c614e62565b500590565b8082018281126000831280158216821582161715615a4157615a41614e62565b505092915050565b60007f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036150a5576150a5614e62565b60007f80000000000000000000000000000000000000000000000000000000000000008203615aab57615aab614e62565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfea164736f6c6343000810000a307834353534343832643535353334343264343135323432343935343532353534643264353434353533353434653435353430303030303030303030303030303030307834323534343332643535353334343264343135323432343935343532353534643264353434353533353434653435353430303030303030303030303030303030", } @@ -877,25 +877,25 @@ func (_VerifiableLoadStreamsLookupUpkeep *VerifiableLoadStreamsLookupUpkeepCalle return _VerifiableLoadStreamsLookupUpkeep.Contract.GetTriggerType(&_VerifiableLoadStreamsLookupUpkeep.CallOpts, upkeepId) } -func (_VerifiableLoadStreamsLookupUpkeep *VerifiableLoadStreamsLookupUpkeepCaller) GetUpkeepInfo(opts *bind.CallOpts, upkeepId *big.Int) (KeeperRegistryBase21UpkeepInfo, error) { +func (_VerifiableLoadStreamsLookupUpkeep *VerifiableLoadStreamsLookupUpkeepCaller) GetUpkeepInfo(opts *bind.CallOpts, upkeepId *big.Int) (IAutomationV21PlusCommonUpkeepInfoLegacy, error) { var out []interface{} err := _VerifiableLoadStreamsLookupUpkeep.contract.Call(opts, &out, "getUpkeepInfo", upkeepId) if err != nil { - return *new(KeeperRegistryBase21UpkeepInfo), err + return *new(IAutomationV21PlusCommonUpkeepInfoLegacy), err } - out0 := *abi.ConvertType(out[0], new(KeeperRegistryBase21UpkeepInfo)).(*KeeperRegistryBase21UpkeepInfo) + out0 := *abi.ConvertType(out[0], new(IAutomationV21PlusCommonUpkeepInfoLegacy)).(*IAutomationV21PlusCommonUpkeepInfoLegacy) return out0, err } -func (_VerifiableLoadStreamsLookupUpkeep *VerifiableLoadStreamsLookupUpkeepSession) GetUpkeepInfo(upkeepId *big.Int) (KeeperRegistryBase21UpkeepInfo, error) { +func (_VerifiableLoadStreamsLookupUpkeep *VerifiableLoadStreamsLookupUpkeepSession) GetUpkeepInfo(upkeepId *big.Int) (IAutomationV21PlusCommonUpkeepInfoLegacy, error) { return _VerifiableLoadStreamsLookupUpkeep.Contract.GetUpkeepInfo(&_VerifiableLoadStreamsLookupUpkeep.CallOpts, upkeepId) } -func (_VerifiableLoadStreamsLookupUpkeep *VerifiableLoadStreamsLookupUpkeepCallerSession) GetUpkeepInfo(upkeepId *big.Int) (KeeperRegistryBase21UpkeepInfo, error) { +func (_VerifiableLoadStreamsLookupUpkeep *VerifiableLoadStreamsLookupUpkeepCallerSession) GetUpkeepInfo(upkeepId *big.Int) (IAutomationV21PlusCommonUpkeepInfoLegacy, error) { return _VerifiableLoadStreamsLookupUpkeep.Contract.GetUpkeepInfo(&_VerifiableLoadStreamsLookupUpkeep.CallOpts, upkeepId) } @@ -2370,7 +2370,7 @@ type VerifiableLoadStreamsLookupUpkeepInterface interface { GetTriggerType(opts *bind.CallOpts, upkeepId *big.Int) (uint8, error) - GetUpkeepInfo(opts *bind.CallOpts, upkeepId *big.Int) (KeeperRegistryBase21UpkeepInfo, error) + GetUpkeepInfo(opts *bind.CallOpts, upkeepId *big.Int) (IAutomationV21PlusCommonUpkeepInfoLegacy, error) GetUpkeepPrivilegeConfig(opts *bind.CallOpts, upkeepId *big.Int) ([]byte, error) diff --git a/core/gethwrappers/generated/verifiable_load_upkeep_wrapper/verifiable_load_upkeep_wrapper.go b/core/gethwrappers/generated/verifiable_load_upkeep_wrapper/verifiable_load_upkeep_wrapper.go index b95f311f1cc..47b609e623a 100644 --- a/core/gethwrappers/generated/verifiable_load_upkeep_wrapper/verifiable_load_upkeep_wrapper.go +++ b/core/gethwrappers/generated/verifiable_load_upkeep_wrapper/verifiable_load_upkeep_wrapper.go @@ -30,7 +30,7 @@ var ( _ = abi.ConvertType ) -type KeeperRegistryBase21UpkeepInfo struct { +type IAutomationV21PlusCommonUpkeepInfoLegacy struct { Target common.Address PerformGas uint32 CheckData []byte @@ -44,7 +44,7 @@ type KeeperRegistryBase21UpkeepInfo struct { } var VerifiableLoadUpkeepMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"contractAutomationRegistrar2_1\",\"name\":\"_registrar\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_useArb\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"IndexOutOfRange\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"blockNum\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"LogEmitted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"blockNum\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"LogEmittedAgain\",\"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\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"blockNum\",\"type\":\"uint256\"}],\"name\":\"UpkeepTopUp\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BUCKET_SIZE\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"addFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"addLinkAmount\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"upkeepIds\",\"type\":\"uint256[]\"}],\"name\":\"batchCancelUpkeeps\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"upkeepIds\",\"type\":\"uint256[]\"},{\"internalType\":\"uint8\",\"name\":\"selector\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"topic0\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"topic1\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"topic2\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"topic3\",\"type\":\"bytes32\"}],\"name\":\"batchPreparingUpkeeps\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"upkeepIds\",\"type\":\"uint256[]\"},{\"internalType\":\"uint8\",\"name\":\"log\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"selector\",\"type\":\"uint8\"}],\"name\":\"batchPreparingUpkeepsSimple\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"number\",\"type\":\"uint8\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint8\",\"name\":\"triggerType\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"triggerConfig\",\"type\":\"bytes\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"checkGasToBurn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"performGasToBurn\",\"type\":\"uint256\"}],\"name\":\"batchRegisterUpkeeps\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"log\",\"type\":\"uint8\"}],\"name\":\"batchSendLogs\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"upkeepIds\",\"type\":\"uint256[]\"},{\"internalType\":\"uint32\",\"name\":\"interval\",\"type\":\"uint32\"}],\"name\":\"batchSetIntervals\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"upkeepIds\",\"type\":\"uint256[]\"}],\"name\":\"batchUpdatePipelineData\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"upkeepIds\",\"type\":\"uint256[]\"}],\"name\":\"batchWithdrawLinks\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"bucketedDelays\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"buckets\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"startGas\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"blockNum\",\"type\":\"uint256\"}],\"name\":\"burnPerformGas\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"checkGasToBurns\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"checkData\",\"type\":\"bytes\"}],\"name\":\"checkUpkeep\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"counters\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"delays\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"dummyMap\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"eligible\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"emittedAgainSig\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"emittedSig\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"feedParamKey\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"feedsHex\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"firstPerformBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"gasLimits\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"startIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxCount\",\"type\":\"uint256\"}],\"name\":\"getActiveUpkeepIDsDeployedByThisContract\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"startIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxCount\",\"type\":\"uint256\"}],\"name\":\"getAllActiveUpkeepIDsOnRegistry\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"getBalance\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"balance\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"uint16\",\"name\":\"bucket\",\"type\":\"uint16\"}],\"name\":\"getBucketedDelays\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"getBucketedDelaysLength\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"getDelays\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"getDelaysLength\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepID\",\"type\":\"uint256\"}],\"name\":\"getForwarder\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"selector\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"topic0\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"topic1\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"topic2\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"topic3\",\"type\":\"bytes32\"}],\"name\":\"getLogTriggerConfig\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"logTrigger\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"getMinBalanceForUpkeep\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"p\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"n\",\"type\":\"uint256\"}],\"name\":\"getPxDelayLastNPerforms\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"uint16\",\"name\":\"bucket\",\"type\":\"uint16\"}],\"name\":\"getSumDelayInBucket\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"n\",\"type\":\"uint256\"}],\"name\":\"getSumDelayLastNPerforms\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"getTriggerType\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"getUpkeepInfo\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"performGas\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"checkData\",\"type\":\"bytes\"},{\"internalType\":\"uint96\",\"name\":\"balance\",\"type\":\"uint96\"},{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"maxValidBlocknumber\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"lastPerformedBlockNumber\",\"type\":\"uint32\"},{\"internalType\":\"uint96\",\"name\":\"amountSpent\",\"type\":\"uint96\"},{\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"offchainConfig\",\"type\":\"bytes\"}],\"internalType\":\"structKeeperRegistryBase2_1.UpkeepInfo\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"getUpkeepPrivilegeConfig\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"getUpkeepTriggerConfig\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"intervals\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"lastTopUpBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"linkToken\",\"outputs\":[{\"internalType\":\"contractLinkTokenInterface\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minBalanceThresholdMultiplier\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"performDataSizes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"performGasToBurns\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"performData\",\"type\":\"bytes\"}],\"name\":\"performUpkeep\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"previousPerformBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"registrar\",\"outputs\":[{\"internalType\":\"contractAutomationRegistrar2_1\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"registry\",\"outputs\":[{\"internalType\":\"contractIKeeperRegistryMaster\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"log\",\"type\":\"uint8\"}],\"name\":\"sendLog\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractAutomationRegistrar2_1\",\"name\":\"newRegistrar\",\"type\":\"address\"}],\"name\":\"setConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string[]\",\"name\":\"_feeds\",\"type\":\"string[]\"}],\"name\":\"setFeeds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_interval\",\"type\":\"uint256\"}],\"name\":\"setInterval\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_feedParamKey\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_timeParamKey\",\"type\":\"string\"}],\"name\":\"setParamKeys\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"setPerformDataSize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"}],\"name\":\"setUpkeepGasLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"cfg\",\"type\":\"bytes\"}],\"name\":\"setUpkeepPrivilegeConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeParamKey\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"blockNum\",\"type\":\"uint256\"}],\"name\":\"topUpFund\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"selector\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"topic0\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"topic1\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"topic2\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"topic3\",\"type\":\"bytes32\"}],\"name\":\"updateLogTriggerConfig1\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"cfg\",\"type\":\"bytes\"}],\"name\":\"updateLogTriggerConfig2\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"pipelineData\",\"type\":\"bytes\"}],\"name\":\"updateUpkeepPipelineData\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"upkeepTopUpCheckInterval\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"useArbitrumBlockNum\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"withdrawLinks\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"withdrawLinks\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", + ABI: "[{\"inputs\":[{\"internalType\":\"contractAutomationRegistrar2_1\",\"name\":\"_registrar\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_useArb\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"IndexOutOfRange\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"blockNum\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"LogEmitted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"blockNum\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"LogEmittedAgain\",\"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\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"blockNum\",\"type\":\"uint256\"}],\"name\":\"UpkeepTopUp\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BUCKET_SIZE\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"addFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"addLinkAmount\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"upkeepIds\",\"type\":\"uint256[]\"}],\"name\":\"batchCancelUpkeeps\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"upkeepIds\",\"type\":\"uint256[]\"},{\"internalType\":\"uint8\",\"name\":\"selector\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"topic0\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"topic1\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"topic2\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"topic3\",\"type\":\"bytes32\"}],\"name\":\"batchPreparingUpkeeps\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"upkeepIds\",\"type\":\"uint256[]\"},{\"internalType\":\"uint8\",\"name\":\"log\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"selector\",\"type\":\"uint8\"}],\"name\":\"batchPreparingUpkeepsSimple\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"number\",\"type\":\"uint8\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint8\",\"name\":\"triggerType\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"triggerConfig\",\"type\":\"bytes\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"checkGasToBurn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"performGasToBurn\",\"type\":\"uint256\"}],\"name\":\"batchRegisterUpkeeps\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"log\",\"type\":\"uint8\"}],\"name\":\"batchSendLogs\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"upkeepIds\",\"type\":\"uint256[]\"},{\"internalType\":\"uint32\",\"name\":\"interval\",\"type\":\"uint32\"}],\"name\":\"batchSetIntervals\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"upkeepIds\",\"type\":\"uint256[]\"}],\"name\":\"batchUpdatePipelineData\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"upkeepIds\",\"type\":\"uint256[]\"}],\"name\":\"batchWithdrawLinks\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"bucketedDelays\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"buckets\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"startGas\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"blockNum\",\"type\":\"uint256\"}],\"name\":\"burnPerformGas\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"checkGasToBurns\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"checkData\",\"type\":\"bytes\"}],\"name\":\"checkUpkeep\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"counters\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"delays\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"dummyMap\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"eligible\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"emittedAgainSig\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"emittedSig\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"feedParamKey\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"feedsHex\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"firstPerformBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"gasLimits\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"startIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxCount\",\"type\":\"uint256\"}],\"name\":\"getActiveUpkeepIDsDeployedByThisContract\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"startIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxCount\",\"type\":\"uint256\"}],\"name\":\"getAllActiveUpkeepIDsOnRegistry\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"getBalance\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"balance\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"uint16\",\"name\":\"bucket\",\"type\":\"uint16\"}],\"name\":\"getBucketedDelays\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"getBucketedDelaysLength\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"getDelays\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"getDelaysLength\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepID\",\"type\":\"uint256\"}],\"name\":\"getForwarder\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"selector\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"topic0\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"topic1\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"topic2\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"topic3\",\"type\":\"bytes32\"}],\"name\":\"getLogTriggerConfig\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"logTrigger\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"getMinBalanceForUpkeep\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"p\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"n\",\"type\":\"uint256\"}],\"name\":\"getPxDelayLastNPerforms\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"uint16\",\"name\":\"bucket\",\"type\":\"uint16\"}],\"name\":\"getSumDelayInBucket\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"n\",\"type\":\"uint256\"}],\"name\":\"getSumDelayLastNPerforms\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"getTriggerType\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"getUpkeepInfo\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"performGas\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"checkData\",\"type\":\"bytes\"},{\"internalType\":\"uint96\",\"name\":\"balance\",\"type\":\"uint96\"},{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"maxValidBlocknumber\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"lastPerformedBlockNumber\",\"type\":\"uint32\"},{\"internalType\":\"uint96\",\"name\":\"amountSpent\",\"type\":\"uint96\"},{\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"offchainConfig\",\"type\":\"bytes\"}],\"internalType\":\"structIAutomationV21PlusCommon.UpkeepInfoLegacy\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"getUpkeepPrivilegeConfig\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"getUpkeepTriggerConfig\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"intervals\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"lastTopUpBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"linkToken\",\"outputs\":[{\"internalType\":\"contractLinkTokenInterface\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minBalanceThresholdMultiplier\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"performDataSizes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"performGasToBurns\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"performData\",\"type\":\"bytes\"}],\"name\":\"performUpkeep\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"previousPerformBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"registrar\",\"outputs\":[{\"internalType\":\"contractAutomationRegistrar2_1\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"registry\",\"outputs\":[{\"internalType\":\"contractIKeeperRegistryMaster\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"log\",\"type\":\"uint8\"}],\"name\":\"sendLog\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractAutomationRegistrar2_1\",\"name\":\"newRegistrar\",\"type\":\"address\"}],\"name\":\"setConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string[]\",\"name\":\"_feeds\",\"type\":\"string[]\"}],\"name\":\"setFeeds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_interval\",\"type\":\"uint256\"}],\"name\":\"setInterval\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_feedParamKey\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_timeParamKey\",\"type\":\"string\"}],\"name\":\"setParamKeys\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"setPerformDataSize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"}],\"name\":\"setUpkeepGasLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"cfg\",\"type\":\"bytes\"}],\"name\":\"setUpkeepPrivilegeConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeParamKey\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"blockNum\",\"type\":\"uint256\"}],\"name\":\"topUpFund\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"selector\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"topic0\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"topic1\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"topic2\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"topic3\",\"type\":\"bytes32\"}],\"name\":\"updateLogTriggerConfig1\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"cfg\",\"type\":\"bytes\"}],\"name\":\"updateLogTriggerConfig2\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"pipelineData\",\"type\":\"bytes\"}],\"name\":\"updateUpkeepPipelineData\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"upkeepTopUpCheckInterval\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"useArbitrumBlockNum\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"withdrawLinks\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"withdrawLinks\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", Bin: "0x7f97009585a4d2440f981ab6f6eec514343e1e6b2aa9b991a26998e6806f41bf086080527fc76416badc8398ce17c93eab7b4f60f263241694cf503e4df24f233a8cc1c50d60a0526005601455601580546001600160681b0319166c140000000002c68af0bb140000179055606460e0526101c060405260426101408181526101009182919062005d0761016039815260200160405180608001604052806042815260200162005d49604291399052620000be906016906002620003c7565b506040805180820190915260098152680cccacac892c890caf60bb1b6020820152601790620000ee908262000543565b5060408051808201909152600b81526a313637b1b5a73ab6b132b960a91b602082015260189062000120908262000543565b503480156200012e57600080fd5b5060405162005d8b38038062005d8b833981016040819052620001519162000625565b81813380600081620001aa5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620001dd57620001dd816200031c565b5050601180546001600160a01b0319166001600160a01b038516908117909155604080516330fe427560e21b815281516000945063c3f909d4926004808401939192918290030181865afa1580156200023a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000260919062000668565b50601380546001600160a01b0319166001600160a01b038381169190911790915560115460408051631b6b6d2360e01b81529051939450911691631b6b6d23916004808201926020929091908290030181865afa158015620002c6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620002ec919062000699565b601280546001600160a01b0319166001600160a01b039290921691909117905550151560c05250620006c0915050565b336001600160a01b03821603620003765760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401620001a1565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b82805482825590600052602060002090810192821562000412579160200282015b8281111562000412578251829062000401908262000543565b5091602001919060010190620003e8565b506200042092915062000424565b5090565b80821115620004205760006200043b828262000445565b5060010162000424565b5080546200045390620004b4565b6000825580601f1062000464575050565b601f01602090049060005260206000209081019062000484919062000487565b50565b5b8082111562000420576000815560010162000488565b634e487b7160e01b600052604160045260246000fd5b600181811c90821680620004c957607f821691505b602082108103620004ea57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200053e57600081815260208120601f850160051c81016020861015620005195750805b601f850160051c820191505b818110156200053a5782815560010162000525565b5050505b505050565b81516001600160401b038111156200055f576200055f6200049e565b6200057781620005708454620004b4565b84620004f0565b602080601f831160018114620005af5760008415620005965750858301515b600019600386901b1c1916600185901b1785556200053a565b600085815260208120601f198616915b82811015620005e057888601518255948401946001909101908401620005bf565b5085821015620005ff5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6001600160a01b03811681146200048457600080fd5b600080604083850312156200063957600080fd5b825162000646816200060f565b602084015190925080151581146200065d57600080fd5b809150509250929050565b600080604083850312156200067c57600080fd5b825162000689816200060f565b6020939093015192949293505050565b600060208284031215620006ac57600080fd5b8151620006b9816200060f565b9392505050565b60805160a05160c05160e0516155f1620007166000396000818161054d0152611f250152600081816109730152613b1101526000818161080c015261355f015260008181610d3e015261353401526155f16000f3fe6080604052600436106104ba5760003560e01c806379ea994311610279578063a6b594751161015e578063d6051a72116100d6578063e45530831161008a578063fa333dfb1161006f578063fa333dfb14610f4d578063fba7ffa314611000578063fcdc1f631461102d57600080fd5b8063e455308314610f17578063f2fde38b14610f2d57600080fd5b8063daee1aeb116100bb578063daee1aeb14610eaa578063dbef701e14610eca578063e0114adb14610eea57600080fd5b8063d6051a7214610e6a578063da6cba4714610e8a57600080fd5b8063b657bc9c1161012d578063c041982211610112578063c041982214610e15578063c98f10b014610e35578063d4c2490014610e4a57600080fd5b8063b657bc9c14610dd5578063becde0e114610df557600080fd5b8063a6b5947514610d60578063a72aa27e14610d80578063af953a4a14610da0578063afb28d1f14610dc057600080fd5b8063924ca578116101f15780639b429354116101c05780639d385eaa116101a55780639d385eaa14610cec5780639d6f1cc714610d0c578063a654824814610d2c57600080fd5b80639b42935414610c8e5780639b51fb0d14610cbb57600080fd5b8063924ca57814610c04578063948108f714610c2457806396cebc7c14610c445780639ac542eb14610c6457600080fd5b80638340507c11610248578063873c75861161022d578063873c758614610b8c5780638da5cb5b14610bac5780638fcb3fba14610bd757600080fd5b80638340507c14610b4c57806386e330af14610b6c57600080fd5b806379ea994314610abf5780637b10399914610adf5780637e7a46dc14610b0c5780638243444a14610b2c57600080fd5b806345d2ec171161039f578063636092e8116103175780637145f11b116102e657806376721303116102cb5780637672130314610a5d578063776898c814610a8a57806379ba509714610aaa57600080fd5b80637145f11b14610a0057806373644cce14610a3057600080fd5b8063636092e81461093c578063642f6cef1461096157806369cdbadb146109a55780636e04ff0d146109d257600080fd5b806351c98be31161036e5780635d4ee7f3116103535780635d4ee7f3146108da5780635f17e616146108ef57806360457ff51461090f57600080fd5b806351c98be31461088d57806357970e93146108ad57600080fd5b806345d2ec17146107cd57806346982093146107fa57806346e7a63e1461082e5780635147cd591461085b57600080fd5b806320e3dbd4116104325780632a9032d311610401578063328ffd11116103e6578063328ffd11146107605780633ebe8d6c1461078d5780634585e33b146107ad57600080fd5b80632a9032d3146106ee5780632b20e3971461070e57600080fd5b806320e3dbd4146106615780632636aecf1461068157806328c4b57b146106a157806329e0a841146106c157600080fd5b806319d97a94116104895780631e0104391161046e5780631e010439146105cf578063206c32e81461060c578063207b65161461064157600080fd5b806319d97a94146105825780631cdde251146105af57600080fd5b806306c1cc00146104c6578063077ac621146104e85780630b7d33e61461051b57806312c550271461053b57600080fd5b366104c157005b600080fd5b3480156104d257600080fd5b506104e66104e1366004614293565b61105a565b005b3480156104f457600080fd5b50610508610503366004614346565b6112a9565b6040519081526020015b60405180910390f35b34801561052757600080fd5b506104e661053636600461437b565b6112e7565b34801561054757600080fd5b5061056f7f000000000000000000000000000000000000000000000000000000000000000081565b60405161ffff9091168152602001610512565b34801561058e57600080fd5b506105a261059d3660046143c2565b611375565b6040516105129190614449565b3480156105bb57600080fd5b506104e66105ca36600461447e565b611432565b3480156105db57600080fd5b506105ef6105ea3660046143c2565b61156f565b6040516bffffffffffffffffffffffff9091168152602001610512565b34801561061857600080fd5b5061062c6106273660046144e3565b611604565b60408051928352602083019190915201610512565b34801561064d57600080fd5b506105a261065c3660046143c2565b611687565b34801561066d57600080fd5b506104e661067c36600461450f565b6116df565b34801561068d57600080fd5b506104e661069c366004614571565b6118a9565b3480156106ad57600080fd5b506105086106bc3660046145eb565b611b72565b3480156106cd57600080fd5b506106e16106dc3660046143c2565b611bdd565b6040516105129190614617565b3480156106fa57600080fd5b506104e6610709366004614758565b611ce2565b34801561071a57600080fd5b5060115461073b9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610512565b34801561076c57600080fd5b5061050861077b3660046143c2565b60036020526000908152604090205481565b34801561079957600080fd5b506105086107a83660046143c2565b611dc3565b3480156107b957600080fd5b506104e66107c83660046147dc565b611e2c565b3480156107d957600080fd5b506107ed6107e83660046144e3565b61203b565b6040516105129190614812565b34801561080657600080fd5b506105087f000000000000000000000000000000000000000000000000000000000000000081565b34801561083a57600080fd5b506105086108493660046143c2565b600a6020526000908152604090205481565b34801561086757600080fd5b5061087b6108763660046143c2565b6120aa565b60405160ff9091168152602001610512565b34801561089957600080fd5b506104e66108a8366004614856565b61213e565b3480156108b957600080fd5b5060125461073b9073ffffffffffffffffffffffffffffffffffffffff1681565b3480156108e657600080fd5b506104e66121e2565b3480156108fb57600080fd5b506104e661090a3660046148ad565b61231d565b34801561091b57600080fd5b5061050861092a3660046143c2565b60076020526000908152604090205481565b34801561094857600080fd5b506015546105ef906bffffffffffffffffffffffff1681565b34801561096d57600080fd5b506109957f000000000000000000000000000000000000000000000000000000000000000081565b6040519015158152602001610512565b3480156109b157600080fd5b506105086109c03660046143c2565b60086020526000908152604090205481565b3480156109de57600080fd5b506109f26109ed3660046147dc565b6123ea565b6040516105129291906148cf565b348015610a0c57600080fd5b50610995610a1b3660046143c2565b600b6020526000908152604090205460ff1681565b348015610a3c57600080fd5b50610508610a4b3660046143c2565b6000908152600c602052604090205490565b348015610a6957600080fd5b50610508610a783660046143c2565b60046020526000908152604090205481565b348015610a9657600080fd5b50610995610aa53660046143c2565b612517565b348015610ab657600080fd5b506104e6612569565b348015610acb57600080fd5b5061073b610ada3660046143c2565b61266b565b348015610aeb57600080fd5b5060135461073b9073ffffffffffffffffffffffffffffffffffffffff1681565b348015610b1857600080fd5b506104e6610b273660046148ea565b6126ff565b348015610b3857600080fd5b506104e6610b473660046148ea565b612790565b348015610b5857600080fd5b506104e6610b67366004614936565b6127ea565b348015610b7857600080fd5b506104e6610b873660046149b4565b612808565b348015610b9857600080fd5b506107ed610ba73660046148ad565b61281b565b348015610bb857600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff1661073b565b348015610be357600080fd5b50610508610bf23660046143c2565b60056020526000908152604090205481565b348015610c1057600080fd5b506104e6610c1f3660046148ad565b6128d8565b348015610c3057600080fd5b506104e6610c3f366004614a65565b612b1d565b348015610c5057600080fd5b506104e6610c5f366004614a95565b612c35565b348015610c7057600080fd5b5060155461087b906c01000000000000000000000000900460ff1681565b348015610c9a57600080fd5b506104e6610ca93660046148ad565b60009182526009602052604090912055565b348015610cc757600080fd5b5061056f610cd63660046143c2565b600e6020526000908152604090205461ffff1681565b348015610cf857600080fd5b506107ed610d073660046143c2565b612e3f565b348015610d1857600080fd5b506105a2610d273660046143c2565b612ea1565b348015610d3857600080fd5b506105087f000000000000000000000000000000000000000000000000000000000000000081565b348015610d6c57600080fd5b506104e6610d7b3660046145eb565b612f4d565b348015610d8c57600080fd5b506104e6610d9b366004614ab2565b612fb6565b348015610dac57600080fd5b506104e6610dbb3660046143c2565b613061565b348015610dcc57600080fd5b506105a26130e7565b348015610de157600080fd5b506105ef610df03660046143c2565b6130f4565b348015610e0157600080fd5b506104e6610e10366004614758565b61314c565b348015610e2157600080fd5b506107ed610e303660046148ad565b6131e6565b348015610e4157600080fd5b506105a26132e3565b348015610e5657600080fd5b506104e6610e65366004614ad7565b6132f0565b348015610e7657600080fd5b5061062c610e853660046148ad565b61336f565b348015610e9657600080fd5b506104e6610ea5366004614afc565b6133d8565b348015610eb657600080fd5b506104e6610ec5366004614758565b61373f565b348015610ed657600080fd5b50610508610ee53660046148ad565b61380a565b348015610ef657600080fd5b50610508610f053660046143c2565b60096020526000908152604090205481565b348015610f2357600080fd5b5061050860145481565b348015610f3957600080fd5b506104e6610f4836600461450f565b61383b565b348015610f5957600080fd5b506105a2610f68366004614b64565b6040805160c0808201835273ffffffffffffffffffffffffffffffffffffffff9890981680825260ff97881660208084019182528385019889526060808501988952608080860198895260a095860197885286519283019490945291519099168985015296519688019690965293519486019490945290519184019190915251828401528051808303909301835260e0909101905290565b34801561100c57600080fd5b5061050861101b3660046143c2565b60066020526000908152604090205481565b34801561103957600080fd5b506105086110483660046143c2565b60026020526000908152604090205481565b6040805161018081018252600461014082019081527f746573740000000000000000000000000000000000000000000000000000000061016083015281528151602081810184526000808352818401929092523083850181905263ffffffff8b166060850152608084015260ff808a1660a08501528451808301865283815260c085015260e0840189905284519182019094529081526101008201526bffffffffffffffffffffffff8516610120820152601254601154919273ffffffffffffffffffffffffffffffffffffffff9182169263095ea7b3921690611140908c1688614bec565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815273ffffffffffffffffffffffffffffffffffffffff90921660048301526bffffffffffffffffffffffff1660248201526044016020604051808303816000875af11580156111be573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111e29190614c30565b5060008860ff1667ffffffffffffffff81111561120157611201614135565b60405190808252806020026020018201604052801561122a578160200160208202803683370190505b50905060005b8960ff168160ff16101561129d5760006112498461384f565b905080838360ff168151811061126157611261614c4b565b6020908102919091018101919091526000918252600881526040808320889055600790915290208490558061129581614c7a565b915050611230565b50505050505050505050565b600d60205282600052604060002060205281600052604060002081815481106112d157600080fd5b9060005260206000200160009250925050505481565b6013546040517f0b7d33e600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911690630b7d33e69061133f9085908590600401614c99565b600060405180830381600087803b15801561135957600080fd5b505af115801561136d573d6000803e3d6000fd5b505050505050565b6013546040517f19d97a940000000000000000000000000000000000000000000000000000000081526004810183905260609173ffffffffffffffffffffffffffffffffffffffff16906319d97a94906024015b600060405180830381865afa1580156113e6573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820160405261142c9190810190614cff565b92915050565b6013546040517ffa333dfb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff888116600483015260ff8816602483015260448201879052606482018690526084820185905260a4820184905290911690634ee88d35908990309063fa333dfb9060c401600060405180830381865afa1580156114d1573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526115179190810190614cff565b6040518363ffffffff1660e01b8152600401611534929190614c99565b600060405180830381600087803b15801561154e57600080fd5b505af1158015611562573d6000803e3d6000fd5b5050505050505050505050565b6013546040517f1e0104390000000000000000000000000000000000000000000000000000000081526004810183905260009173ffffffffffffffffffffffffffffffffffffffff1690631e010439906024015b602060405180830381865afa1580156115e0573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061142c9190614d3f565b6000828152600d6020908152604080832061ffff85168452825280832080548251818502810185019093528083528493849392919083018282801561166857602002820191906000526020600020905b815481526020019060010190808311611654575b5050505050905061167a81825161391d565b92509250505b9250929050565b6013546040517f207b65160000000000000000000000000000000000000000000000000000000081526004810183905260609173ffffffffffffffffffffffffffffffffffffffff169063207b6516906024016113c9565b601180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8316908117909155604080517fc3f909d400000000000000000000000000000000000000000000000000000000815281516000939263c3f909d492600480820193918290030181865afa158015611775573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117999190614d67565b50601380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691909117909155601154604080517f1b6b6d230000000000000000000000000000000000000000000000000000000081529051939450911691631b6b6d23916004808201926020929091908290030181865afa15801561183c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118609190614d95565b601280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff929092169190911790555050565b8560005b81811015611b675760008989838181106118c9576118c9614c4b565b9050602002013590503073ffffffffffffffffffffffffffffffffffffffff16637e7a46dc828360405160200161190291815260200190565b6040516020818303038152906040526040518363ffffffff1660e01b815260040161192e929190614c99565b600060405180830381600087803b15801561194857600080fd5b505af115801561195c573d6000803e3d6000fd5b50506013546040517f5147cd59000000000000000000000000000000000000000000000000000000008152600481018590526000935073ffffffffffffffffffffffffffffffffffffffff9091169150635147cd5990602401602060405180830381865afa1580156119d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119f69190614db2565b90508060ff16600103611b52576040517ffa333dfb000000000000000000000000000000000000000000000000000000008152306004820181905260ff8b166024830152604482018a9052606482018890526084820188905260a4820187905260009163fa333dfb9060c401600060405180830381865afa158015611a7f573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201604052611ac59190810190614cff565b6013546040517f4ee88d3500000000000000000000000000000000000000000000000000000000815291925073ffffffffffffffffffffffffffffffffffffffff1690634ee88d3590611b1e9086908590600401614c99565b600060405180830381600087803b158015611b3857600080fd5b505af1158015611b4c573d6000803e3d6000fd5b50505050505b50508080611b5f90614dcf565b9150506118ad565b505050505050505050565b6000838152600c602090815260408083208054825181850281018501909352808352611bd393830182828015611bc757602002820191906000526020600020905b815481526020019060010190808311611bb3575b505050505084846139a2565b90505b9392505050565b604080516101408101825260008082526020820181905260609282018390528282018190526080820181905260a0820181905260c0820181905260e082018190526101008201526101208101919091526013546040517fc7c3a19a0000000000000000000000000000000000000000000000000000000081526004810184905273ffffffffffffffffffffffffffffffffffffffff9091169063c7c3a19a90602401600060405180830381865afa158015611c9c573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820160405261142c9190810190614e2a565b8060005b818160ff161015611dbd5760135473ffffffffffffffffffffffffffffffffffffffff1663c8048022858560ff8516818110611d2457611d24614c4b565b905060200201356040518263ffffffff1660e01b8152600401611d4991815260200190565b600060405180830381600087803b158015611d6357600080fd5b505af1158015611d77573d6000803e3d6000fd5b50505050611daa84848360ff16818110611d9357611d93614c4b565b90506020020135600f613b0190919063ffffffff16565b5080611db581614c7a565b915050611ce6565b50505050565b6000818152600e602052604081205461ffff1681805b8261ffff168161ffff1611611e24576000858152600d6020908152604080832061ffff85168452909152902054611e109083614f49565b915080611e1c81614f5c565b915050611dd9565b509392505050565b60005a90506000611e3f8385018561437b565b5060008181526005602090815260408083205460049092528220549293509190611e67613b0d565b905082600003611e87576000848152600560205260409020819055611fe2565b600084815260036020526040812054611ea08484614f7d565b611eaa9190614f7d565b6000868152600e6020908152604080832054600d835281842061ffff909116808552908352818420805483518186028101860190945280845295965090949192909190830182828015611f1c57602002820191906000526020600020905b815481526020019060010190808311611f08575b505050505090507f000000000000000000000000000000000000000000000000000000000000000061ffff16815103611f975781611f5981614f5c565b6000898152600e6020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00001661ffff83161790559250505b506000868152600d6020908152604080832061ffff909416835292815282822080546001818101835591845282842001859055888352600c8252928220805493840181558252902001555b600084815260066020526040812054611ffc906001614f49565b600086815260066020908152604080832084905560049091529020839055905061202685836128d8565b612031858784612f4d565b5050505050505050565b6000828152600d6020908152604080832061ffff8516845282529182902080548351818402810184019094528084526060939283018282801561209d57602002820191906000526020600020905b815481526020019060010190808311612089575b5050505050905092915050565b6013546040517f5147cd590000000000000000000000000000000000000000000000000000000081526004810183905260009173ffffffffffffffffffffffffffffffffffffffff1690635147cd5990602401602060405180830381865afa15801561211a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061142c9190614db2565b8160005b818110156121db5730635f17e61686868481811061216257612162614c4b565b90506020020135856040518363ffffffff1660e01b815260040161219692919091825263ffffffff16602082015260400190565b600060405180830381600087803b1580156121b057600080fd5b505af11580156121c4573d6000803e3d6000fd5b5050505080806121d390614dcf565b915050612142565b5050505050565b6121ea613baf565b6012546040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009173ffffffffffffffffffffffffffffffffffffffff16906370a0823190602401602060405180830381865afa158015612259573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061227d9190614f90565b6012546040517fa9059cbb0000000000000000000000000000000000000000000000000000000081523360048201526024810183905291925073ffffffffffffffffffffffffffffffffffffffff169063a9059cbb906044016020604051808303816000875af11580156122f5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123199190614c30565b5050565b60008281526003602090815260408083208490556005825280832083905560068252808320839055600c909152812061235591614034565b6000828152600e602052604081205461ffff16905b8161ffff168161ffff16116123b1576000848152600d6020908152604080832061ffff85168452909152812061239f91614034565b806123a981614f5c565b91505061236a565b5050506000908152600e6020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000169055565b6000606060005a90506000612401858701876143c2565b60008181526009602090815260408083205460089092528220549293509190838367ffffffffffffffff81111561243a5761243a614135565b6040519080825280601f01601f191660200182016040528015612464576020820181803683370190505b50604051602001612476929190614c99565b60405160208183030381529060405290506000612491613b0d565b9050600061249e86612517565b90505b835a6124ad9089614f7d565b6124b990612710614f49565b10156125075781406000908152600b6020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055816124ff81614fa9565b9250506124a1565b9a91995090975050505050505050565b600081815260056020526040812054810361253457506001919050565b600082815260036020908152604080832054600490925290912054612557613b0d565b6125619190614f7d565b101592915050565b60015473ffffffffffffffffffffffffffffffffffffffff1633146125ef576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e65720000000000000000000060448201526064015b60405180910390fd5b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b6013546040517f79ea99430000000000000000000000000000000000000000000000000000000081526004810183905260009173ffffffffffffffffffffffffffffffffffffffff16906379ea994390602401602060405180830381865afa1580156126db573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061142c9190614d95565b6013546040517fcd7f71b500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091169063cd7f71b59061275990869086908690600401614fde565b600060405180830381600087803b15801561277357600080fd5b505af1158015612787573d6000803e3d6000fd5b50505050505050565b6013546040517f4ee88d3500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911690634ee88d359061275990869086908690600401614fde565b60176127f683826150cb565b50601861280382826150cb565b505050565b8051612319906016906020840190614052565b6013546040517f06e3b632000000000000000000000000000000000000000000000000000000008152600481018490526024810183905260609173ffffffffffffffffffffffffffffffffffffffff16906306e3b63290604401600060405180830381865afa158015612892573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201604052611bd691908101906151e5565b6014546000838152600260205260409020546128f49083614f7d565b1115612319576013546040517fc7c3a19a0000000000000000000000000000000000000000000000000000000081526004810184905260009173ffffffffffffffffffffffffffffffffffffffff169063c7c3a19a90602401600060405180830381865afa15801561296a573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526129b09190810190614e2a565b6013546040517fb657bc9c0000000000000000000000000000000000000000000000000000000081526004810186905291925060009173ffffffffffffffffffffffffffffffffffffffff9091169063b657bc9c90602401602060405180830381865afa158015612a25573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a499190614d3f565b601554909150612a6d9082906c01000000000000000000000000900460ff16614bec565b6bffffffffffffffffffffffff1682606001516bffffffffffffffffffffffff161015611dbd57601554612ab09085906bffffffffffffffffffffffff16612b1d565b60008481526002602090815260409182902085905560155482518781526bffffffffffffffffffffffff909116918101919091529081018490527f49d4100ab0124eb4a9a65dc4ea08d6412a43f6f05c49194983f5b322bcc0a5c09060600160405180910390a150505050565b6012546013546040517f095ea7b300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff91821660048201526bffffffffffffffffffffffff8416602482015291169063095ea7b3906044016020604051808303816000875af1158015612ba5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612bc99190614c30565b506013546040517f948108f7000000000000000000000000000000000000000000000000000000008152600481018490526bffffffffffffffffffffffff8316602482015273ffffffffffffffffffffffffffffffffffffffff9091169063948108f79060440161133f565b6040517fc04198220000000000000000000000000000000000000000000000000000000081526000600482018190526024820181905290309063c041982290604401600060405180830381865afa158015612c94573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201604052612cda91908101906151e5565b80519091506000612ce9613b0d565b905060005b828110156121db576000848281518110612d0a57612d0a614c4b565b60209081029190910101516013546040517f5147cd590000000000000000000000000000000000000000000000000000000081526004810183905291925060009173ffffffffffffffffffffffffffffffffffffffff90911690635147cd5990602401602060405180830381865afa158015612d8a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612dae9190614db2565b90508060ff16600103612e2a578660ff16600003612dfa576040513090859084907f97009585a4d2440f981ab6f6eec514343e1e6b2aa9b991a26998e6806f41bf0890600090a4612e2a565b6040513090859084907fc76416badc8398ce17c93eab7b4f60f263241694cf503e4df24f233a8cc1c50d90600090a45b50508080612e3790614dcf565b915050612cee565b6000818152600c6020908152604091829020805483518184028101840190945280845260609392830182828015612e9557602002820191906000526020600020905b815481526020019060010190808311612e81575b50505050509050919050565b60168181548110612eb157600080fd5b906000526020600020016000915090508054612ecc90615032565b80601f0160208091040260200160405190810160405280929190818152602001828054612ef890615032565b8015612f455780601f10612f1a57610100808354040283529160200191612f45565b820191906000526020600020905b815481529060010190602001808311612f2857829003601f168201915b505050505081565b6000838152600760205260409020545b805a612f699085614f7d565b612f7590612710614f49565b1015611dbd5781406000908152600b6020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055612f5d565b6013546040517fa72aa27e0000000000000000000000000000000000000000000000000000000081526004810184905263ffffffff8316602482015273ffffffffffffffffffffffffffffffffffffffff9091169063a72aa27e90604401600060405180830381600087803b15801561302e57600080fd5b505af1158015613042573d6000803e3d6000fd5b505050600092835250600a602052604090912063ffffffff9091169055565b6013546040517f744bfe610000000000000000000000000000000000000000000000000000000081526004810183905230602482015273ffffffffffffffffffffffffffffffffffffffff9091169063744bfe6190604401600060405180830381600087803b1580156130d357600080fd5b505af11580156121db573d6000803e3d6000fd5b60178054612ecc90615032565b6013546040517fb657bc9c0000000000000000000000000000000000000000000000000000000081526004810183905260009173ffffffffffffffffffffffffffffffffffffffff169063b657bc9c906024016115c3565b8060005b818163ffffffff161015611dbd573063af953a4a858563ffffffff851681811061317c5761317c614c4b565b905060200201356040518263ffffffff1660e01b81526004016131a191815260200190565b600060405180830381600087803b1580156131bb57600080fd5b505af11580156131cf573d6000803e3d6000fd5b5050505080806131de90615276565b915050613150565b606060006131f4600f613c32565b905080841061322f576040517f1390f2a100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b82600003613244576132418482614f7d565b92505b60008367ffffffffffffffff81111561325f5761325f614135565b604051908082528060200260200182016040528015613288578160200160208202803683370190505b50905060005b848110156132da576132ab6132a38288614f49565b600f90613c3c565b8282815181106132bd576132bd614c4b565b6020908102919091010152806132d281614dcf565b91505061328e565b50949350505050565b60188054612ecc90615032565b60006132fa613b0d565b90508160ff1660000361333b576040513090829085907f97009585a4d2440f981ab6f6eec514343e1e6b2aa9b991a26998e6806f41bf0890600090a4505050565b6040513090829085907fc76416badc8398ce17c93eab7b4f60f263241694cf503e4df24f233a8cc1c50d90600090a4505050565b6000828152600c602090815260408083208054825181850281018501909352808352849384939291908301828280156133c757602002820191906000526020600020905b8154815260200190600101908083116133b3575b5050505050905061167a818561391d565b8260005b8181101561136d5760008686838181106133f8576133f8614c4b565b9050602002013590503073ffffffffffffffffffffffffffffffffffffffff16637e7a46dc828360405160200161343191815260200190565b6040516020818303038152906040526040518363ffffffff1660e01b815260040161345d929190614c99565b600060405180830381600087803b15801561347757600080fd5b505af115801561348b573d6000803e3d6000fd5b50506013546040517f5147cd59000000000000000000000000000000000000000000000000000000008152600481018590526000935073ffffffffffffffffffffffffffffffffffffffff9091169150635147cd5990602401602060405180830381865afa158015613501573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906135259190614db2565b90508060ff1660010361372a577f000000000000000000000000000000000000000000000000000000000000000060ff87161561357f57507f00000000000000000000000000000000000000000000000000000000000000005b60003073ffffffffffffffffffffffffffffffffffffffff1663fa333dfb308985886040516020016135b391815260200190565b6040516020818303038152906040526135cb9061528f565b60405160e086901b7fffffffff0000000000000000000000000000000000000000000000000000000016815273ffffffffffffffffffffffffffffffffffffffff909416600485015260ff90921660248401526044830152606482015260006084820181905260a482015260c401600060405180830381865afa158015613656573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820160405261369c9190810190614cff565b6013546040517f4ee88d3500000000000000000000000000000000000000000000000000000000815291925073ffffffffffffffffffffffffffffffffffffffff1690634ee88d35906136f59087908590600401614c99565b600060405180830381600087803b15801561370f57600080fd5b505af1158015613723573d6000803e3d6000fd5b5050505050505b5050808061373790614dcf565b9150506133dc565b8060005b81811015611dbd57600084848381811061375f5761375f614c4b565b9050602002013590503073ffffffffffffffffffffffffffffffffffffffff16637e7a46dc828360405160200161379891815260200190565b6040516020818303038152906040526040518363ffffffff1660e01b81526004016137c4929190614c99565b600060405180830381600087803b1580156137de57600080fd5b505af11580156137f2573d6000803e3d6000fd5b5050505050808061380290614dcf565b915050613743565b600c602052816000526040600020818154811061382657600080fd5b90600052602060002001600091509150505481565b613843613baf565b61384c81613c48565b50565b6011546040517f3f678e11000000000000000000000000000000000000000000000000000000008152600091829173ffffffffffffffffffffffffffffffffffffffff90911690633f678e11906138aa9086906004016152d1565b6020604051808303816000875af11580156138c9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906138ed9190614f90565b90506138fa600f82613d3d565b506060909201516000838152600a6020526040902063ffffffff90911690555090565b8151600090819081908415806139335750808510155b1561393c578094505b60008092505b85831015613998578660016139578585614f7d565b6139619190614f7d565b8151811061397157613971614c4b565b6020026020010151816139849190614f49565b90508261399081614dcf565b935050613942565b9694955050505050565b825160009081908315806139b65750808410155b156139bf578093505b60008467ffffffffffffffff8111156139da576139da614135565b604051908082528060200260200182016040528015613a03578160200160208202803683370190505b509050600092505b84831015613a7157866001613a208585614f7d565b613a2a9190614f7d565b81518110613a3a57613a3a614c4b565b6020026020010151818481518110613a5457613a54614c4b565b602090810291909101015282613a6981614dcf565b935050613a0b565b613a8a81600060018451613a859190614f7d565b613d49565b85606403613ac3578060018251613aa19190614f7d565b81518110613ab157613ab1614c4b565b60200260200101519350505050611bd6565b806064825188613ad39190615423565b613add919061548f565b81518110613aed57613aed614c4b565b602002602001015193505050509392505050565b6000611bd68383613ec1565b60007f000000000000000000000000000000000000000000000000000000000000000015613baa57606473ffffffffffffffffffffffffffffffffffffffff1663a3b1b31d6040518163ffffffff1660e01b8152600401602060405180830381865afa158015613b81573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613ba59190614f90565b905090565b504390565b60005473ffffffffffffffffffffffffffffffffffffffff163314613c30576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e65720000000000000000000060448201526064016125e6565b565b600061142c825490565b6000611bd68383613fbb565b3373ffffffffffffffffffffffffffffffffffffffff821603613cc7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c6600000000000000000060448201526064016125e6565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6000611bd68383613fe5565b8181808203613d59575050505050565b6000856002613d6887876154a3565b613d7291906154c3565b613d7c908761552b565b81518110613d8c57613d8c614c4b565b602002602001015190505b818313613e9b575b80868481518110613db257613db2614c4b565b60200260200101511015613dd25782613dca81615553565b935050613d9f565b858281518110613de457613de4614c4b565b6020026020010151811015613e055781613dfd81615584565b925050613dd2565b818313613e9657858281518110613e1e57613e1e614c4b565b6020026020010151868481518110613e3857613e38614c4b565b6020026020010151878581518110613e5257613e52614c4b565b60200260200101888581518110613e6b57613e6b614c4b565b60209081029190910101919091525282613e8481615553565b9350508180613e9290615584565b9250505b613d97565b81851215613eae57613eae868684613d49565b8383121561136d5761136d868486613d49565b60008181526001830160205260408120548015613faa576000613ee5600183614f7d565b8554909150600090613ef990600190614f7d565b9050818114613f5e576000866000018281548110613f1957613f19614c4b565b9060005260206000200154905080876000018481548110613f3c57613f3c614c4b565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080613f6f57613f6f6155b5565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061142c565b600091505061142c565b5092915050565b6000826000018281548110613fd257613fd2614c4b565b9060005260206000200154905092915050565b600081815260018301602052604081205461402c5750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561142c565b50600061142c565b508054600082559060005260206000209081019061384c91906140a8565b828054828255906000526020600020908101928215614098579160200282015b82811115614098578251829061408890826150cb565b5091602001919060010190614072565b506140a49291506140bd565b5090565b5b808211156140a457600081556001016140a9565b808211156140a45760006140d182826140da565b506001016140bd565b5080546140e690615032565b6000825580601f106140f6575050565b601f01602090049060005260206000209081019061384c91906140a8565b60ff8116811461384c57600080fd5b63ffffffff8116811461384c57600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051610140810167ffffffffffffffff8111828210171561418857614188614135565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156141d5576141d5614135565b604052919050565b600067ffffffffffffffff8211156141f7576141f7614135565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b600082601f83011261423457600080fd5b8135614247614242826141dd565b61418e565b81815284602083860101111561425c57600080fd5b816020850160208301376000918101602001919091529392505050565b6bffffffffffffffffffffffff8116811461384c57600080fd5b600080600080600080600060e0888a0312156142ae57600080fd5b87356142b981614114565b965060208801356142c981614123565b955060408801356142d981614114565b9450606088013567ffffffffffffffff8111156142f557600080fd5b6143018a828b01614223565b945050608088013561431281614279565b9699959850939692959460a0840135945060c09093013592915050565b803561ffff8116811461434157600080fd5b919050565b60008060006060848603121561435b57600080fd5b8335925061436b6020850161432f565b9150604084013590509250925092565b6000806040838503121561438e57600080fd5b82359150602083013567ffffffffffffffff8111156143ac57600080fd5b6143b885828601614223565b9150509250929050565b6000602082840312156143d457600080fd5b5035919050565b60005b838110156143f65781810151838201526020016143de565b50506000910152565b600081518084526144178160208601602086016143db565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000611bd660208301846143ff565b73ffffffffffffffffffffffffffffffffffffffff8116811461384c57600080fd5b600080600080600080600060e0888a03121561449957600080fd5b8735965060208801356144ab8161445c565b955060408801356144bb81614114565b969995985095966060810135965060808101359560a0820135955060c0909101359350915050565b600080604083850312156144f657600080fd5b823591506145066020840161432f565b90509250929050565b60006020828403121561452157600080fd5b8135611bd68161445c565b60008083601f84011261453e57600080fd5b50813567ffffffffffffffff81111561455657600080fd5b6020830191508360208260051b850101111561168057600080fd5b600080600080600080600060c0888a03121561458c57600080fd5b873567ffffffffffffffff8111156145a357600080fd5b6145af8a828b0161452c565b90985096505060208801356145c381614114565b96999598509596604081013596506060810135956080820135955060a0909101359350915050565b60008060006060848603121561460057600080fd5b505081359360208301359350604090920135919050565b6020815261463e60208201835173ffffffffffffffffffffffffffffffffffffffff169052565b60006020830151614657604084018263ffffffff169052565b5060408301516101408060608501526146746101608501836143ff565b9150606085015161469560808601826bffffffffffffffffffffffff169052565b50608085015173ffffffffffffffffffffffffffffffffffffffff811660a08601525060a085015167ffffffffffffffff811660c08601525060c085015163ffffffff811660e08601525060e0850151610100614701818701836bffffffffffffffffffffffff169052565b86015190506101206147168682018315159052565b8601518584037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe00183870152905061474e83826143ff565b9695505050505050565b6000806020838503121561476b57600080fd5b823567ffffffffffffffff81111561478257600080fd5b61478e8582860161452c565b90969095509350505050565b60008083601f8401126147ac57600080fd5b50813567ffffffffffffffff8111156147c457600080fd5b60208301915083602082850101111561168057600080fd5b600080602083850312156147ef57600080fd5b823567ffffffffffffffff81111561480657600080fd5b61478e8582860161479a565b6020808252825182820181905260009190848201906040850190845b8181101561484a5783518352928401929184019160010161482e565b50909695505050505050565b60008060006040848603121561486b57600080fd5b833567ffffffffffffffff81111561488257600080fd5b61488e8682870161452c565b90945092505060208401356148a281614123565b809150509250925092565b600080604083850312156148c057600080fd5b50508035926020909101359150565b8215158152604060208201526000611bd360408301846143ff565b6000806000604084860312156148ff57600080fd5b83359250602084013567ffffffffffffffff81111561491d57600080fd5b6149298682870161479a565b9497909650939450505050565b6000806040838503121561494957600080fd5b823567ffffffffffffffff8082111561496157600080fd5b61496d86838701614223565b9350602085013591508082111561498357600080fd5b506143b885828601614223565b600067ffffffffffffffff8211156149aa576149aa614135565b5060051b60200190565b600060208083850312156149c757600080fd5b823567ffffffffffffffff808211156149df57600080fd5b818501915085601f8301126149f357600080fd5b8135614a0161424282614990565b81815260059190911b83018401908481019088831115614a2057600080fd5b8585015b83811015614a5857803585811115614a3c5760008081fd5b614a4a8b89838a0101614223565b845250918601918601614a24565b5098975050505050505050565b60008060408385031215614a7857600080fd5b823591506020830135614a8a81614279565b809150509250929050565b600060208284031215614aa757600080fd5b8135611bd681614114565b60008060408385031215614ac557600080fd5b823591506020830135614a8a81614123565b60008060408385031215614aea57600080fd5b823591506020830135614a8a81614114565b60008060008060608587031215614b1257600080fd5b843567ffffffffffffffff811115614b2957600080fd5b614b358782880161452c565b9095509350506020850135614b4981614114565b91506040850135614b5981614114565b939692955090935050565b60008060008060008060c08789031215614b7d57600080fd5b8635614b888161445c565b95506020870135614b9881614114565b95989597505050506040840135936060810135936080820135935060a0909101359150565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006bffffffffffffffffffffffff80831681851681830481118215151615614c1757614c17614bbd565b02949350505050565b8051801515811461434157600080fd5b600060208284031215614c4257600080fd5b611bd682614c20565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600060ff821660ff8103614c9057614c90614bbd565b60010192915050565b828152604060208201526000611bd360408301846143ff565b600082601f830112614cc357600080fd5b8151614cd1614242826141dd565b818152846020838601011115614ce657600080fd5b614cf78260208301602087016143db565b949350505050565b600060208284031215614d1157600080fd5b815167ffffffffffffffff811115614d2857600080fd5b614cf784828501614cb2565b805161434181614279565b600060208284031215614d5157600080fd5b8151611bd681614279565b80516143418161445c565b60008060408385031215614d7a57600080fd5b8251614d858161445c565b6020939093015192949293505050565b600060208284031215614da757600080fd5b8151611bd68161445c565b600060208284031215614dc457600080fd5b8151611bd681614114565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203614e0057614e00614bbd565b5060010190565b805161434181614123565b805167ffffffffffffffff8116811461434157600080fd5b600060208284031215614e3c57600080fd5b815167ffffffffffffffff80821115614e5457600080fd5b908301906101408286031215614e6957600080fd5b614e71614164565b614e7a83614d5c565b8152614e8860208401614e07565b6020820152604083015182811115614e9f57600080fd5b614eab87828601614cb2565b604083015250614ebd60608401614d34565b6060820152614ece60808401614d5c565b6080820152614edf60a08401614e12565b60a0820152614ef060c08401614e07565b60c0820152614f0160e08401614d34565b60e0820152610100614f14818501614c20565b908201526101208381015183811115614f2c57600080fd5b614f3888828701614cb2565b918301919091525095945050505050565b8082018082111561142c5761142c614bbd565b600061ffff808316818103614f7357614f73614bbd565b6001019392505050565b8181038181111561142c5761142c614bbd565b600060208284031215614fa257600080fd5b5051919050565b600081614fb857614fb8614bbd565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b83815260406020820152816040820152818360608301376000818301606090810191909152601f9092017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016010192915050565b600181811c9082168061504657607f821691505b60208210810361507f577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b601f82111561280357600081815260208120601f850160051c810160208610156150ac5750805b601f850160051c820191505b8181101561136d578281556001016150b8565b815167ffffffffffffffff8111156150e5576150e5614135565b6150f9816150f38454615032565b84615085565b602080601f83116001811461514c57600084156151165750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b17855561136d565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b828110156151995788860151825594840194600190910190840161517a565b50858210156151d557878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b600060208083850312156151f857600080fd5b825167ffffffffffffffff81111561520f57600080fd5b8301601f8101851361522057600080fd5b805161522e61424282614990565b81815260059190911b8201830190838101908783111561524d57600080fd5b928401925b8284101561526b57835182529284019290840190615252565b979650505050505050565b600063ffffffff808316818103614f7357614f73614bbd565b8051602080830151919081101561507f577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60209190910360031b1b16919050565b60208152600082516101408060208501526152f06101608501836143ff565b915060208501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08086850301604087015261532c84836143ff565b935060408701519150615357606087018373ffffffffffffffffffffffffffffffffffffffff169052565b606087015163ffffffff811660808801529150608087015173ffffffffffffffffffffffffffffffffffffffff811660a0880152915060a087015160ff811660c0880152915060c08701519150808685030160e08701526153b884836143ff565b935060e087015191506101008187860301818801526153d785846143ff565b9450808801519250506101208187860301818801526153f685846143ff565b94508088015192505050615419828601826bffffffffffffffffffffffff169052565b5090949350505050565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561545b5761545b614bbd565b500290565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60008261549e5761549e615460565b500490565b8181036000831280158383131683831282161715613fb457613fb4614bbd565b6000826154d2576154d2615460565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83147f80000000000000000000000000000000000000000000000000000000000000008314161561552657615526614bbd565b500590565b808201828112600083128015821682158216171561554b5761554b614bbd565b505092915050565b60007f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203614e0057614e00614bbd565b60007f80000000000000000000000000000000000000000000000000000000000000008203614fb857614fb8614bbd565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfea164736f6c6343000810000a307834353534343832643535353334343264343135323432343935343532353534643264353434353533353434653435353430303030303030303030303030303030307834323534343332643535353334343264343135323432343935343532353534643264353434353533353434653435353430303030303030303030303030303030", } @@ -824,25 +824,25 @@ func (_VerifiableLoadUpkeep *VerifiableLoadUpkeepCallerSession) GetTriggerType(u return _VerifiableLoadUpkeep.Contract.GetTriggerType(&_VerifiableLoadUpkeep.CallOpts, upkeepId) } -func (_VerifiableLoadUpkeep *VerifiableLoadUpkeepCaller) GetUpkeepInfo(opts *bind.CallOpts, upkeepId *big.Int) (KeeperRegistryBase21UpkeepInfo, error) { +func (_VerifiableLoadUpkeep *VerifiableLoadUpkeepCaller) GetUpkeepInfo(opts *bind.CallOpts, upkeepId *big.Int) (IAutomationV21PlusCommonUpkeepInfoLegacy, error) { var out []interface{} err := _VerifiableLoadUpkeep.contract.Call(opts, &out, "getUpkeepInfo", upkeepId) if err != nil { - return *new(KeeperRegistryBase21UpkeepInfo), err + return *new(IAutomationV21PlusCommonUpkeepInfoLegacy), err } - out0 := *abi.ConvertType(out[0], new(KeeperRegistryBase21UpkeepInfo)).(*KeeperRegistryBase21UpkeepInfo) + out0 := *abi.ConvertType(out[0], new(IAutomationV21PlusCommonUpkeepInfoLegacy)).(*IAutomationV21PlusCommonUpkeepInfoLegacy) return out0, err } -func (_VerifiableLoadUpkeep *VerifiableLoadUpkeepSession) GetUpkeepInfo(upkeepId *big.Int) (KeeperRegistryBase21UpkeepInfo, error) { +func (_VerifiableLoadUpkeep *VerifiableLoadUpkeepSession) GetUpkeepInfo(upkeepId *big.Int) (IAutomationV21PlusCommonUpkeepInfoLegacy, error) { return _VerifiableLoadUpkeep.Contract.GetUpkeepInfo(&_VerifiableLoadUpkeep.CallOpts, upkeepId) } -func (_VerifiableLoadUpkeep *VerifiableLoadUpkeepCallerSession) GetUpkeepInfo(upkeepId *big.Int) (KeeperRegistryBase21UpkeepInfo, error) { +func (_VerifiableLoadUpkeep *VerifiableLoadUpkeepCallerSession) GetUpkeepInfo(upkeepId *big.Int) (IAutomationV21PlusCommonUpkeepInfoLegacy, error) { return _VerifiableLoadUpkeep.Contract.GetUpkeepInfo(&_VerifiableLoadUpkeep.CallOpts, upkeepId) } @@ -2306,7 +2306,7 @@ type VerifiableLoadUpkeepInterface interface { GetTriggerType(opts *bind.CallOpts, upkeepId *big.Int) (uint8, error) - GetUpkeepInfo(opts *bind.CallOpts, upkeepId *big.Int) (KeeperRegistryBase21UpkeepInfo, error) + GetUpkeepInfo(opts *bind.CallOpts, upkeepId *big.Int) (IAutomationV21PlusCommonUpkeepInfoLegacy, error) GetUpkeepPrivilegeConfig(opts *bind.CallOpts, upkeepId *big.Int) ([]byte, error) diff --git a/core/gethwrappers/generated/vrf_coordinator_v2_5/vrf_coordinator_v2_5.go b/core/gethwrappers/generated/vrf_coordinator_v2_5/vrf_coordinator_v2_5.go index 2d1c2f4cec7..561ac265aac 100644 --- a/core/gethwrappers/generated/vrf_coordinator_v2_5/vrf_coordinator_v2_5.go +++ b/core/gethwrappers/generated/vrf_coordinator_v2_5/vrf_coordinator_v2_5.go @@ -30,15 +30,6 @@ var ( _ = abi.ConvertType ) -type VRFCoordinatorV25RequestCommitment struct { - BlockNum uint64 - SubId *big.Int - CallbackGasLimit uint32 - NumWords uint32 - Sender common.Address - ExtraArgs []byte -} - type VRFProof struct { Pk [2]*big.Int Gamma [2]*big.Int @@ -51,6 +42,15 @@ type VRFProof struct { ZInv *big.Int } +type VRFTypesRequestCommitmentV2Plus struct { + BlockNum uint64 + SubId *big.Int + CallbackGasLimit uint32 + NumWords uint32 + Sender common.Address + ExtraArgs []byte +} + type VRFV2PlusClientRandomWordsRequest struct { KeyHash [32]byte SubId *big.Int @@ -61,8 +61,8 @@ type VRFV2PlusClientRandomWordsRequest struct { } var VRFCoordinatorV25MetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"blockhashStore\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"internalBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"externalBalance\",\"type\":\"uint256\"}],\"name\":\"BalanceInvariantViolated\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockNum\",\"type\":\"uint256\"}],\"name\":\"BlockhashNotInStore\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"coordinatorAddress\",\"type\":\"address\"}],\"name\":\"CoordinatorAlreadyRegistered\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"coordinatorAddress\",\"type\":\"address\"}],\"name\":\"CoordinatorNotRegistered\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FailedToSendNative\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FailedToTransferLink\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"have\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"want\",\"type\":\"uint32\"}],\"name\":\"GasLimitTooBig\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"gasPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxGas\",\"type\":\"uint256\"}],\"name\":\"GasPriceExceeded\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"IncorrectCommitment\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"IndexOutOfRange\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficientBalance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"have\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"want\",\"type\":\"uint256\"}],\"name\":\"InsufficientGasForConsumer\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidCalldata\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"consumer\",\"type\":\"address\"}],\"name\":\"InvalidConsumer\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidExtraArgsTag\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"int256\",\"name\":\"linkWei\",\"type\":\"int256\"}],\"name\":\"InvalidLinkWeiPrice\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"have\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"min\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"max\",\"type\":\"uint16\"}],\"name\":\"InvalidRequestConfirmations\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidSubscription\",\"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\":\"LinkNotSet\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"proposedOwner\",\"type\":\"address\"}],\"name\":\"MustBeRequestedOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"MustBeSubOwner\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NoCorrespondingRequest\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"keyHash\",\"type\":\"bytes32\"}],\"name\":\"NoSuchProvingKey\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"have\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"want\",\"type\":\"uint32\"}],\"name\":\"NumWordsTooBig\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableFromLink\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PaymentTooLarge\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PendingRequestExists\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"keyHash\",\"type\":\"bytes32\"}],\"name\":\"ProvingKeyAlreadyRegistered\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Reentrant\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TooManyConsumers\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"minimumRequestConfirmations\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"maxGasLimit\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"stalenessSeconds\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"gasAfterPaymentCalculation\",\"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\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"nativePremiumPercentage\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"linkPremiumPercentage\",\"type\":\"uint8\"}],\"name\":\"ConfigSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"coordinatorAddress\",\"type\":\"address\"}],\"name\":\"CoordinatorDeregistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"coordinatorAddress\",\"type\":\"address\"}],\"name\":\"CoordinatorRegistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"FundsRecovered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newCoordinator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"}],\"name\":\"MigrationCompleted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"NativeFundsRecovered\",\"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\":\"bytes32\",\"name\":\"keyHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"maxGas\",\"type\":\"uint64\"}],\"name\":\"ProvingKeyDeregistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"keyHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"maxGas\",\"type\":\"uint64\"}],\"name\":\"ProvingKeyRegistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"outputSeed\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"payment\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"nativePayment\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"onlyPremium\",\"type\":\"bool\"}],\"name\":\"RandomWordsFulfilled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"keyHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"preSeed\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"minimumRequestConfirmations\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"callbackGasLimit\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"numWords\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"extraArgs\",\"type\":\"bytes\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RandomWordsRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amountLink\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amountNative\",\"type\":\"uint256\"}],\"name\":\"SubscriptionCanceled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"consumer\",\"type\":\"address\"}],\"name\":\"SubscriptionConsumerAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"consumer\",\"type\":\"address\"}],\"name\":\"SubscriptionConsumerRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"SubscriptionCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldBalance\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newBalance\",\"type\":\"uint256\"}],\"name\":\"SubscriptionFunded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldNativeBalance\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newNativeBalance\",\"type\":\"uint256\"}],\"name\":\"SubscriptionFundedWithNative\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"SubscriptionOwnerTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"SubscriptionOwnerTransferred\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BLOCKHASH_STORE\",\"outputs\":[{\"internalType\":\"contractBlockhashStoreInterface\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"LINK\",\"outputs\":[{\"internalType\":\"contractLinkTokenInterface\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"LINK_NATIVE_FEED\",\"outputs\":[{\"internalType\":\"contractAggregatorV3Interface\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAX_CONSUMERS\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAX_NUM_WORDS\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAX_REQUEST_CONFIRMATIONS\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"}],\"name\":\"acceptSubscriptionOwnerTransfer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"consumer\",\"type\":\"address\"}],\"name\":\"addConsumer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"cancelSubscription\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"createSubscription\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"}],\"name\":\"deregisterMigratableCoordinator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[2]\",\"name\":\"publicProvingKey\",\"type\":\"uint256[2]\"}],\"name\":\"deregisterProvingKey\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256[2]\",\"name\":\"pk\",\"type\":\"uint256[2]\"},{\"internalType\":\"uint256[2]\",\"name\":\"gamma\",\"type\":\"uint256[2]\"},{\"internalType\":\"uint256\",\"name\":\"c\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"s\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"seed\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"uWitness\",\"type\":\"address\"},{\"internalType\":\"uint256[2]\",\"name\":\"cGammaWitness\",\"type\":\"uint256[2]\"},{\"internalType\":\"uint256[2]\",\"name\":\"sHashWitness\",\"type\":\"uint256[2]\"},{\"internalType\":\"uint256\",\"name\":\"zInv\",\"type\":\"uint256\"}],\"internalType\":\"structVRF.Proof\",\"name\":\"proof\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"blockNum\",\"type\":\"uint64\"},{\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"numWords\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"extraArgs\",\"type\":\"bytes\"}],\"internalType\":\"structVRFCoordinatorV2_5.RequestCommitment\",\"name\":\"rc\",\"type\":\"tuple\"},{\"internalType\":\"bool\",\"name\":\"onlyPremium\",\"type\":\"bool\"}],\"name\":\"fulfillRandomWords\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"payment\",\"type\":\"uint96\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"}],\"name\":\"fundSubscriptionWithNative\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"startIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxCount\",\"type\":\"uint256\"}],\"name\":\"getActiveSubscriptionIds\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"}],\"name\":\"getSubscription\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"balance\",\"type\":\"uint96\"},{\"internalType\":\"uint96\",\"name\":\"nativeBalance\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"reqCount\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"consumers\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[2]\",\"name\":\"publicKey\",\"type\":\"uint256[2]\"}],\"name\":\"hashOfKey\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"newCoordinator\",\"type\":\"address\"}],\"name\":\"migrate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"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\":\"subId\",\"type\":\"uint256\"}],\"name\":\"ownerCancelSubscription\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"}],\"name\":\"pendingRequestExists\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"recoverFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"addresspayable\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"recoverNativeFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"}],\"name\":\"registerMigratableCoordinator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[2]\",\"name\":\"publicProvingKey\",\"type\":\"uint256[2]\"},{\"internalType\":\"uint64\",\"name\":\"maxGas\",\"type\":\"uint64\"}],\"name\":\"registerProvingKey\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"consumer\",\"type\":\"address\"}],\"name\":\"removeConsumer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"keyHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"internalType\":\"uint16\",\"name\":\"requestConfirmations\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"numWords\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"extraArgs\",\"type\":\"bytes\"}],\"internalType\":\"structVRFV2PlusClient.RandomWordsRequest\",\"name\":\"req\",\"type\":\"tuple\"}],\"name\":\"requestRandomWords\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"requestSubscriptionOwnerTransfer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_config\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"minimumRequestConfirmations\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"maxGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"reentrancyLock\",\"type\":\"bool\"},{\"internalType\":\"uint32\",\"name\":\"stalenessSeconds\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"gasAfterPaymentCalculation\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"fulfillmentFlatFeeNativePPM\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"fulfillmentFlatFeeLinkDiscountPPM\",\"type\":\"uint32\"},{\"internalType\":\"uint8\",\"name\":\"nativePremiumPercentage\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"linkPremiumPercentage\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_currentSubNonce\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_fallbackWeiPerUnitLink\",\"outputs\":[{\"internalType\":\"int256\",\"name\":\"\",\"type\":\"int256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"s_provingKeyHashes\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"s_provingKeys\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"exists\",\"type\":\"bool\"},{\"internalType\":\"uint64\",\"name\":\"maxGas\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"s_requestCommitments\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_totalBalance\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_totalNativeBalance\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"minimumRequestConfirmations\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"maxGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"stalenessSeconds\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"gasAfterPaymentCalculation\",\"type\":\"uint32\"},{\"internalType\":\"int256\",\"name\":\"fallbackWeiPerUnitLink\",\"type\":\"int256\"},{\"internalType\":\"uint32\",\"name\":\"fulfillmentFlatFeeNativePPM\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"fulfillmentFlatFeeLinkDiscountPPM\",\"type\":\"uint32\"},{\"internalType\":\"uint8\",\"name\":\"nativePremiumPercentage\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"linkPremiumPercentage\",\"type\":\"uint8\"}],\"name\":\"setConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"link\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"linkNativeFeed\",\"type\":\"address\"}],\"name\":\"setLINKAndLINKNativeFeed\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"addresspayable\",\"name\":\"recipient\",\"type\":\"address\"}],\"name\":\"withdrawNative\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x60a06040523480156200001157600080fd5b5060405162005db538038062005db5833981016040819052620000349162000183565b33806000816200008b5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000be57620000be81620000d7565b50505060601b6001600160601b031916608052620001b5565b6001600160a01b038116331415620001325760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000082565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6000602082840312156200019657600080fd5b81516001600160a01b0381168114620001ae57600080fd5b9392505050565b60805160601c615bda620001db6000396000818161055001526131fb0152615bda6000f3fe60806040526004361061021c5760003560e01c80638402595e11610124578063b2a7cac5116100a6578063b2a7cac514610732578063bec4c08c14610752578063caf70c4a14610772578063cb63179714610792578063d98e620e146107b2578063da2f2610146107d2578063dac83d2914610831578063dc311dd314610851578063e72f6e3014610882578063ee9d2d38146108a2578063f2fde38b146108cf57600080fd5b80638402595e146105c757806386fe91c7146105e75780638da5cb5b1461060757806395b55cfc146106255780639b1c385e146106385780639d40a6fd14610658578063a21a23e414610690578063a4c0ed36146106a5578063a63e0bfb146106c5578063aa433aff146106e5578063aefb212f1461070557600080fd5b8063405b84fa116101ad578063405b84fa1461044e57806340d6bb821461046e57806341af6c871461049957806351cff8d9146104c95780635d06b4ab146104e957806364d51a2a14610509578063659827441461051e578063689c45171461053e57806372e9d5651461057257806379ba5097146105925780637a5a2aef146105a757600080fd5b806304104edb14610221578063043bd6ae14610243578063088070f51461026c57806308821d581461033a5780630ae095401461035a57806315c48b841461037a57806318e3dd27146103a25780631b6b6d23146103e15780632f622e6b1461040e578063301f42e91461042e575b600080fd5b34801561022d57600080fd5b5061024161023c366004614fa6565b6108ef565b005b34801561024f57600080fd5b5061025960105481565b6040519081526020015b60405180910390f35b34801561027857600080fd5b50600c546102dd9061ffff81169063ffffffff62010000820481169160ff600160301b8204811692600160381b8304811692600160581b8104821692600160781b8204831692600160981b83041691600160b81b8104821691600160c01b9091041689565b6040805161ffff909a168a5263ffffffff98891660208b01529615159689019690965293861660608801529185166080870152841660a08601529290921660c084015260ff91821660e08401521661010082015261012001610263565b34801561034657600080fd5b50610241610355366004615084565b610a5c565b34801561036657600080fd5b5061024161037536600461536e565b610c06565b34801561038657600080fd5b5061038f60c881565b60405161ffff9091168152602001610263565b3480156103ae57600080fd5b50600a546103c990600160601b90046001600160601b031681565b6040516001600160601b039091168152602001610263565b3480156103ed57600080fd5b50600254610401906001600160a01b031681565b604051610263919061559f565b34801561041a57600080fd5b50610241610429366004614fa6565b610c4e565b34801561043a57600080fd5b506103c961044936600461518a565b610d9a565b34801561045a57600080fd5b5061024161046936600461536e565b610fd4565b34801561047a57600080fd5b506104846101f481565b60405163ffffffff9091168152602001610263565b3480156104a557600080fd5b506104b96104b436600461510d565b611386565b6040519015158152602001610263565b3480156104d557600080fd5b506102416104e4366004614fa6565b611496565b3480156104f557600080fd5b50610241610504366004614fa6565b611624565b34801561051557600080fd5b5061038f606481565b34801561052a57600080fd5b50610241610539366004614fc3565b6116db565b34801561054a57600080fd5b506104017f000000000000000000000000000000000000000000000000000000000000000081565b34801561057e57600080fd5b50600354610401906001600160a01b031681565b34801561059e57600080fd5b5061024161173b565b3480156105b357600080fd5b506102416105c23660046150a0565b6117e5565b3480156105d357600080fd5b506102416105e2366004614fa6565b611915565b3480156105f357600080fd5b50600a546103c9906001600160601b031681565b34801561061357600080fd5b506000546001600160a01b0316610401565b61024161063336600461510d565b611a27565b34801561064457600080fd5b50610259610653366004615278565b611b4b565b34801561066457600080fd5b50600754610678906001600160401b031681565b6040516001600160401b039091168152602001610263565b34801561069c57600080fd5b50610259611e8c565b3480156106b157600080fd5b506102416106c0366004614ffc565b61205f565b3480156106d157600080fd5b506102416106e03660046152cd565b6121db565b3480156106f157600080fd5b5061024161070036600461510d565b612458565b34801561071157600080fd5b50610725610720366004615393565b6124a0565b6040516102639190615616565b34801561073e57600080fd5b5061024161074d36600461510d565b6125a2565b34801561075e57600080fd5b5061024161076d36600461536e565b612697565b34801561077e57600080fd5b5061025961078d3660046150d4565b6127a3565b34801561079e57600080fd5b506102416107ad36600461536e565b6127d3565b3480156107be57600080fd5b506102596107cd36600461510d565b612a42565b3480156107de57600080fd5b506108126107ed36600461510d565b600d6020526000908152604090205460ff81169061010090046001600160401b031682565b6040805192151583526001600160401b03909116602083015201610263565b34801561083d57600080fd5b5061024161084c36600461536e565b612a63565b34801561085d57600080fd5b5061087161086c36600461510d565b612afa565b6040516102639594939291906157eb565b34801561088e57600080fd5b5061024161089d366004614fa6565b612be8565b3480156108ae57600080fd5b506102596108bd36600461510d565b600f6020526000908152604090205481565b3480156108db57600080fd5b506102416108ea366004614fa6565b612dbb565b6108f7612dcc565b60115460005b81811015610a3457826001600160a01b03166011828154811061092257610922615b36565b6000918252602090912001546001600160a01b03161415610a2457601161094a6001846159e6565b8154811061095a5761095a615b36565b600091825260209091200154601180546001600160a01b03909216918390811061098657610986615b36565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060118054806109c5576109c5615b20565b600082815260209020810160001990810180546001600160a01b03191690550190556040517ff80a1a97fd42251f3c33cda98635e7399253033a6774fe37cd3f650b5282af3790610a1790859061559f565b60405180910390a1505050565b610a2d81615a9e565b90506108fd565b5081604051635428d44960e01b8152600401610a50919061559f565b60405180910390fd5b50565b610a64612dcc565b604080518082018252600091610a939190849060029083908390808284376000920191909152506127a3915050565b6000818152600d602090815260409182902082518084019093525460ff811615158084526101009091046001600160401b03169183019190915291925090610af157604051631dfd6e1360e21b815260048101839052602401610a50565b6000828152600d6020526040812080546001600160481b0319169055600e54905b81811015610bc25783600e8281548110610b2e57610b2e615b36565b90600052602060002001541415610bb257600e610b4c6001846159e6565b81548110610b5c57610b5c615b36565b9060005260206000200154600e8281548110610b7a57610b7a615b36565b600091825260209091200155600e805480610b9757610b97615b20565b60019003818190600052602060002001600090559055610bc2565b610bbb81615a9e565b9050610b12565b507f9b6868e0eb737bcd72205360baa6bfd0ba4e4819a33ade2db384e8a8025639a5838360200151604051610bf8929190615629565b60405180910390a150505050565b81610c1081612e21565b610c18612e82565b610c2183611386565b15610c3f57604051631685ecdd60e31b815260040160405180910390fd5b610c498383612ead565b505050565b610c56612e82565b610c5e612dcc565b600b54600160601b90046001600160601b0316610c8e57604051631e9acf1760e31b815260040160405180910390fd5b600b8054600160601b90046001600160601b0316908190600c610cb18380615a22565b92506101000a8154816001600160601b0302191690836001600160601b0316021790555080600a600c8282829054906101000a90046001600160601b0316610cf99190615a22565b92506101000a8154816001600160601b0302191690836001600160601b031602179055506000826001600160a01b0316826001600160601b031660405160006040518083038185875af1925050503d8060008114610d73576040519150601f19603f3d011682016040523d82523d6000602084013e610d78565b606091505b5050905080610c495760405163950b247960e01b815260040160405180910390fd5b6000610da4612e82565b60005a90506000610db58686613061565b90506000610dcb8583600001516020015161331d565b60408301516060888101519293509163ffffffff16806001600160401b03811115610df857610df8615b4c565b604051908082528060200260200182016040528015610e21578160200160208202803683370190505b50925060005b81811015610e895760408051602081018590529081018290526060016040516020818303038152906040528051906020012060001c848281518110610e6e57610e6e615b36565b6020908102919091010152610e8281615a9e565b9050610e27565b5050602080850180516000908152600f9092526040822082905551610eaf908a8561336b565b60208a8101516000908152600690915260409020805491925090601890610ee590600160c01b90046001600160401b0316615ab9565b91906101000a8154816001600160401b0302191690836001600160401b0316021790555060008960a0015160018b60a0015151610f2291906159e6565b81518110610f3257610f32615b36565b60209101015160f81c6001149050610f4c8786838c613406565b9750610f5d88828c60200151613436565b6020808b015187820151604080518781526001600160601b038d16948101949094528415159084015284151560608401528b1515608084015290917faeb4b4786571e184246d39587f659abf0e26f41f6a3358692250382c0cdb47b79060a00160405180910390a3505050505050505b9392505050565b610fdc612e82565b610fe581613589565b6110045780604051635428d44960e01b8152600401610a50919061559f565b60008060008061101386612afa565b945094505093509350336001600160a01b0316826001600160a01b0316146110765760405162461bcd60e51b81526020600482015260166024820152752737ba1039bab139b1b934b83a34b7b71037bbb732b960511b6044820152606401610a50565b61107f86611386565b156110c55760405162461bcd60e51b815260206004820152601660248201527550656e64696e6720726571756573742065786973747360501b6044820152606401610a50565b6040805160c0810182526001815260208082018990526001600160a01b03851682840152606082018490526001600160601b038088166080840152861660a08301529151909160009161111a91849101615653565b6040516020818303038152906040529050611134886135f5565b505060405163ce3f471960e01b81526001600160a01b0388169063ce3f4719906001600160601b0388169061116d908590600401615640565b6000604051808303818588803b15801561118657600080fd5b505af115801561119a573d6000803e3d6000fd5b50506002546001600160a01b0316158015935091506111c3905057506001600160601b03861615155b1561128d5760025460405163a9059cbb60e01b81526001600160a01b039091169063a9059cbb906111fa908a908a906004016155e6565b602060405180830381600087803b15801561121457600080fd5b505af1158015611228573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061124c91906150f0565b61128d5760405162461bcd60e51b8152602060048201526012602482015271696e73756666696369656e742066756e647360701b6044820152606401610a50565b600c805460ff60301b1916600160301b17905560005b8351811015611334578381815181106112be576112be615b36565b60200260200101516001600160a01b0316638ea98117896040518263ffffffff1660e01b81526004016112f1919061559f565b600060405180830381600087803b15801561130b57600080fd5b505af115801561131f573d6000803e3d6000fd5b505050508061132d90615a9e565b90506112a3565b50600c805460ff60301b191690556040517fd63ca8cb945956747ee69bfdc3ea754c24a4caf7418db70e46052f7850be4187906113749089908b906155b3565b60405180910390a15050505050505050565b60008181526005602052604081206002018054806113a8575060009392505050565b600e5460005b8281101561148a5760008482815481106113ca576113ca615b36565b60009182526020822001546001600160a01b031691505b8381101561147757600061143f600e838154811061140157611401615b36565b60009182526020808320909101546001600160a01b03871683526004825260408084208e855290925291205485908c906001600160401b031661379d565b506000818152600f6020526040902054909150156114665750600198975050505050505050565b5061147081615a9e565b90506113e1565b50508061148390615a9e565b90506113ae565b50600095945050505050565b61149e612e82565b6114a6612dcc565b6002546001600160a01b03166114cf5760405163c1f0c0a160e01b815260040160405180910390fd5b600b546001600160601b03166114f857604051631e9acf1760e31b815260040160405180910390fd5b600b80546001600160601b031690819060006115148380615a22565b92506101000a8154816001600160601b0302191690836001600160601b0316021790555080600a60008282829054906101000a90046001600160601b031661155c9190615a22565b82546001600160601b039182166101009390930a92830291909202199091161790555060025460405163a9059cbb60e01b81526001600160a01b039091169063a9059cbb906115b190859085906004016155e6565b602060405180830381600087803b1580156115cb57600080fd5b505af11580156115df573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061160391906150f0565b61162057604051631e9acf1760e31b815260040160405180910390fd5b5050565b61162c612dcc565b61163581613589565b15611655578060405163ac8a27ef60e01b8152600401610a50919061559f565b601180546001810182556000919091527f31ecc21a745e3968a04e9570e4425bc18fa8019c68028196b546d1669c200c680180546001600160a01b0319166001600160a01b0383161790556040517fb7cabbfc11e66731fc77de0444614282023bcbd41d16781c753a431d0af01625906116d090839061559f565b60405180910390a150565b6116e3612dcc565b6002546001600160a01b03161561170d57604051631688c53760e11b815260040160405180910390fd5b600280546001600160a01b039384166001600160a01b03199182161790915560038054929093169116179055565b6001546001600160a01b0316331461178e5760405162461bcd60e51b815260206004820152601660248201527526bab9ba10313290383937b837b9b2b21037bbb732b960511b6044820152606401610a50565b60008054336001600160a01b0319808316821784556001805490911690556040516001600160a01b0390921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b6117ed612dcc565b60408051808201825260009161181c9190859060029083908390808284376000920191909152506127a3915050565b6000818152600d602052604090205490915060ff161561185257604051634a0b8fa760e01b815260048101829052602401610a50565b60408051808201825260018082526001600160401b0385811660208085019182526000878152600d9091528581209451855492516001600160481b031990931690151568ffffffffffffffff00191617610100929093169190910291909117909255600e805491820181559091527fbb7b4a454dc3493923482f07822329ed19e8244eff582cc204f8554c3620c3fd01829055517f9b911b2c240bfbef3b6a8f7ed6ee321d1258bb2a3fe6becab52ac1cd3210afd390610a179083908590615629565b61191d612dcc565b600a544790600160601b90046001600160601b03168181111561195d576040516354ced18160e11b81526004810182905260248101839052604401610a50565b81811015610c4957600061197182846159e6565b90506000846001600160a01b03168260405160006040518083038185875af1925050503d80600081146119c0576040519150601f19603f3d011682016040523d82523d6000602084013e6119c5565b606091505b50509050806119e75760405163950b247960e01b815260040160405180910390fd5b7f4aed7c8eed0496c8c19ea2681fcca25741c1602342e38b045d9f1e8e905d2e9c8583604051611a189291906155b3565b60405180910390a15050505050565b611a2f612e82565b6000818152600560205260409020546001600160a01b0316611a6457604051630fb532db60e11b815260040160405180910390fd5b60008181526006602052604090208054600160601b90046001600160601b0316903490600c611a938385615991565b92506101000a8154816001600160601b0302191690836001600160601b0316021790555034600a600c8282829054906101000a90046001600160601b0316611adb9190615991565b92506101000a8154816001600160601b0302191690836001600160601b03160217905550817f7603b205d03651ee812f803fccde89f1012e545a9c99f0abfea9cedd0fd8e902823484611b2e9190615932565b604080519283526020830191909152015b60405180910390a25050565b6000611b55612e82565b602080830135600081815260059092526040909120546001600160a01b0316611b9157604051630fb532db60e11b815260040160405180910390fd5b33600090815260046020908152604080832084845291829052909120546001600160401b031680611bd95782336040516379bfd40160e01b8152600401610a509291906156c8565b600c5461ffff16611bf060608701604088016152b2565b61ffff161080611c13575060c8611c0d60608701604088016152b2565b61ffff16115b15611c5957611c2860608601604087016152b2565b600c5460405163539c34bb60e11b815261ffff92831660048201529116602482015260c86044820152606401610a50565b600c5462010000900463ffffffff16611c7860808701606088016153b5565b63ffffffff161115611cc857611c9460808601606087016153b5565b600c54604051637aebf00f60e11b815263ffffffff9283166004820152620100009091049091166024820152604401610a50565b6101f4611cdb60a08701608088016153b5565b63ffffffff161115611d2157611cf760a08601608087016153b5565b6040516311ce1afb60e21b815263ffffffff90911660048201526101f46024820152604401610a50565b611d2a81615ab9565b90506000611d3b863533868561379d565b90955090506000611d5f611d5a611d5560a08a018a615840565b613816565b613893565b905085611d6a613904565b86611d7b60808b0160608c016153b5565b611d8b60a08c0160808d016153b5565b3386604051602001611da3979695949392919061574b565b60405160208183030381529060405280519060200120600f600088815260200190815260200160002081905550336001600160a01b03168588600001357feb0e3652e0f44f417695e6e90f2f42c99b65cd7169074c5a654b16b9748c3a4e89868c6040016020810190611e1691906152b2565b8d6060016020810190611e2991906153b5565b8e6080016020810190611e3c91906153b5565b89604051611e4f9695949392919061570c565b60405180910390a450506000928352602091909152604090912080546001600160401b0319166001600160401b039092169190911790555b919050565b6000611e96612e82565b6007546001600160401b031633611eae6001436159e6565b6040516001600160601b0319606093841b81166020830152914060348201523090921b1660548201526001600160c01b031960c083901b16606882015260700160408051601f1981840301815291905280516020909101209150611f1381600161594a565b600780546001600160401b0319166001600160401b03928316179055604080516000808252608082018352602080830182815283850183815260608086018581528a86526006855287862093518454935191516001600160601b039182166001600160c01b031990951694909417600160601b9190921602176001600160c01b0316600160c01b9290981691909102969096179055835194850184523385528481018281528585018481528884526005835294909220855181546001600160a01b03199081166001600160a01b0392831617835593516001830180549095169116179092559251805192949391926120119260028501920190614cc0565b5061202191506008905084613994565b50827f1d3015d7ba850fa198dc7b1a3f5d42779313a681035f77c8c03764c61005518d33604051612052919061559f565b60405180910390a2505090565b612067612e82565b6002546001600160a01b03163314612092576040516344b0e3c360e01b815260040160405180910390fd5b602081146120b357604051638129bbcd60e01b815260040160405180910390fd5b60006120c18284018461510d565b6000818152600560205260409020549091506001600160a01b03166120f957604051630fb532db60e11b815260040160405180910390fd5b600081815260066020526040812080546001600160601b0316918691906121208385615991565b92506101000a8154816001600160601b0302191690836001600160601b0316021790555084600a60008282829054906101000a90046001600160601b03166121689190615991565b92506101000a8154816001600160601b0302191690836001600160601b03160217905550817f1ced9348ff549fceab2ac57cd3a9de38edaaab274b725ee82c23e8fc8c4eec7a8287846121bb9190615932565b6040805192835260208301919091520160405180910390a2505050505050565b6121e3612dcc565b60c861ffff8a16111561221d5760405163539c34bb60e11b815261ffff8a1660048201819052602482015260c86044820152606401610a50565b60008513612241576040516321ea67b360e11b815260048101869052602401610a50565b60008463ffffffff1611801561226357508363ffffffff168363ffffffff1610155b15612291576040516313c06e5960e11b815263ffffffff808516600483015285166024820152604401610a50565b604080516101208101825261ffff8b1680825263ffffffff808c16602084018190526000848601528b8216606085018190528b8316608086018190528a841660a08701819052938a1660c0870181905260ff808b1660e08901819052908a16610100909801889052600c8054600160c01b90990260ff60c01b19600160b81b9093029290921661ffff60b81b19600160981b90940263ffffffff60981b19600160781b9099029890981667ffffffffffffffff60781b19600160581b90960263ffffffff60581b19600160381b9098029790971668ffffffffffffffffff60301b196201000090990265ffffffffffff19909c16909a179a909a1796909616979097179390931791909116959095179290921793909316929092179190911790556010869055517f2c6b6b12413678366b05b145c5f00745bdd00e739131ab5de82484a50c9d78b690612445908b908b908b908b908b908b908b908b908b9061ffff99909916895263ffffffff97881660208a0152958716604089015293861660608801526080870192909252841660a086015290921660c084015260ff91821660e0840152166101008201526101200190565b60405180910390a1505050505050505050565b612460612dcc565b6000818152600560205260409020546001600160a01b03168061249657604051630fb532db60e11b815260040160405180910390fd5b6116208282612ead565b606060006124ae60086139a0565b90508084106124d057604051631390f2a160e01b815260040160405180910390fd5b60006124dc8486615932565b9050818111806124ea575083155b6124f457806124f6565b815b9050600061250486836159e6565b9050806001600160401b0381111561251e5761251e615b4c565b604051908082528060200260200182016040528015612547578160200160208202803683370190505b50935060005b818110156125975761256a6125628883615932565b6008906139aa565b85828151811061257c5761257c615b36565b602090810291909101015261259081615a9e565b905061254d565b505050505b92915050565b6125aa612e82565b6000818152600560205260409020546001600160a01b0316806125e057604051630fb532db60e11b815260040160405180910390fd5b6000828152600560205260409020600101546001600160a01b03163314612637576000828152600560205260409081902060010154905163d084e97560e01b8152610a50916001600160a01b03169060040161559f565b600082815260056020526040908190208054336001600160a01b031991821681178355600190920180549091169055905183917fd4114ab6e9af9f597c52041f32d62dc57c5c4e4c0d4427006069635e216c938691611b3f9185916155cc565b816126a181612e21565b6126a9612e82565b60008381526005602052604090206002018054606414156126dd576040516305a48e0f60e01b815260040160405180910390fd5b6001600160a01b038316600090815260046020908152604080832087845291829052909120546001600160401b031615612718575050505050565b600085815260208281526040808320805460016001600160401b0319909116811790915585549081018655858452919092200180546001600160a01b0319166001600160a01b0387161790555185907f1e980d04aa7648e205713e5e8ea3808672ac163d10936d36f91b2c88ac1575e19061279490879061559f565b60405180910390a25050505050565b6000816040516020016127b69190615608565b604051602081830303815290604052805190602001209050919050565b816127dd81612e21565b6127e5612e82565b6127ee83611386565b1561280c57604051631685ecdd60e31b815260040160405180910390fd5b6001600160a01b03821660009081526004602090815260408083208684529091529020546001600160401b031661285a5782826040516379bfd40160e01b8152600401610a509291906156c8565b6000838152600560209081526040808320600201805482518185028101850190935280835291929091908301828280156128bd57602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161289f575b505050505090506000600182516128d491906159e6565b905060005b82518110156129de57846001600160a01b03168382815181106128fe576128fe615b36565b60200260200101516001600160a01b031614156129ce57600083838151811061292957612929615b36565b602002602001015190508060056000898152602001908152602001600020600201838154811061295b5761295b615b36565b600091825260208083209190910180546001600160a01b0319166001600160a01b0394909416939093179092558881526005909152604090206002018054806129a6576129a6615b20565b600082815260209020810160001990810180546001600160a01b0319169055019055506129de565b6129d781615a9e565b90506128d9565b506001600160a01b03841660009081526004602090815260408083208884529091529081902080546001600160401b03191690555185907f32158c6058347c1601b2d12bc696ac6901d8a9a9aa3ba10c27ab0a983e8425a79061279490879061559f565b600e8181548110612a5257600080fd5b600091825260209091200154905081565b81612a6d81612e21565b612a75612e82565b600083815260056020526040902060018101546001600160a01b03848116911614612af4576001810180546001600160a01b0319166001600160a01b03851617905560405184907f21a4dad170a6bf476c31bbcf4a16628295b0e450672eec25d7c93308e05344a190612aeb90339087906155cc565b60405180910390a25b50505050565b600081815260056020526040812054819081906001600160a01b0316606081612b3657604051630fb532db60e11b815260040160405180910390fd5b600086815260066020908152604080832054600583529281902060020180548251818502810185019093528083526001600160601b0380861695600160601b810490911694600160c01b9091046001600160401b0316938893929091839190830182828015612bce57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311612bb0575b505050505090509450945094509450945091939590929450565b612bf0612dcc565b6002546001600160a01b0316612c195760405163c1f0c0a160e01b815260040160405180910390fd5b6002546040516370a0823160e01b81526000916001600160a01b0316906370a0823190612c4a90309060040161559f565b60206040518083038186803b158015612c6257600080fd5b505afa158015612c76573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c9a9190615126565b600a549091506001600160601b031681811115612cd4576040516354ced18160e11b81526004810182905260248101839052604401610a50565b81811015610c49576000612ce882846159e6565b60025460405163a9059cbb60e01b81529192506001600160a01b03169063a9059cbb90612d1b90879085906004016155b3565b602060405180830381600087803b158015612d3557600080fd5b505af1158015612d49573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d6d91906150f0565b612d8a57604051631f01ff1360e21b815260040160405180910390fd5b7f59bfc682b673f8cbf945f1e454df9334834abf7dfe7f92237ca29ecb9b4366008482604051610bf89291906155b3565b612dc3612dcc565b610a59816139b6565b6000546001600160a01b03163314612e1f5760405162461bcd60e51b815260206004820152601660248201527527b7363c9031b0b63630b1363290313c9037bbb732b960511b6044820152606401610a50565b565b6000818152600560205260409020546001600160a01b031680612e5757604051630fb532db60e11b815260040160405180910390fd5b336001600160a01b038216146116205780604051636c51fda960e11b8152600401610a50919061559f565b600c54600160301b900460ff1615612e1f5760405163769dd35360e11b815260040160405180910390fd5b600080612eb9846135f5565b60025491935091506001600160a01b031615801590612ee057506001600160601b03821615155b15612f8f5760025460405163a9059cbb60e01b81526001600160a01b039091169063a9059cbb90612f209086906001600160601b038716906004016155b3565b602060405180830381600087803b158015612f3a57600080fd5b505af1158015612f4e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f7291906150f0565b612f8f57604051631e9acf1760e31b815260040160405180910390fd5b6000836001600160a01b0316826001600160601b031660405160006040518083038185875af1925050503d8060008114612fe5576040519150601f19603f3d011682016040523d82523d6000602084013e612fea565b606091505b505090508061300c5760405163950b247960e01b815260040160405180910390fd5b604080516001600160a01b03861681526001600160601b03808616602083015284169181019190915285907f8c74ce8b8cf87f5eb001275c8be27eb34ea2b62bfab6814fcc62192bb63e81c490606001612794565b6040805160a0810182526000606082018181526080830182905282526020820181905291810191909152600061309a84600001516127a3565b6000818152600d602090815260409182902082518084019093525460ff811615158084526101009091046001600160401b031691830191909152919250906130f857604051631dfd6e1360e21b815260048101839052602401610a50565b600082866080015160405160200161311a929190918252602082015260400190565b60408051601f1981840301815291815281516020928301206000818152600f9093529120549091508061316057604051631b44092560e11b815260040160405180910390fd5b85516020808801516040808a015160608b015160808c015160a08d0151935161318f978a979096959101615797565b6040516020818303038152906040528051906020012081146131c45760405163354a450b60e21b815260040160405180910390fd5b60006131d38760000151613a5a565b9050806132ab578651604051631d2827a760e31b81526001600160401b0390911660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063e9413d389060240160206040518083038186803b15801561324557600080fd5b505afa158015613259573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061327d9190615126565b9050806132ab57865160405163175dadad60e01b81526001600160401b039091166004820152602401610a50565b60008860800151826040516020016132cd929190918252602082015260400190565b6040516020818303038152906040528051906020012060001c905060006132f48a83613b3c565b604080516060810182529788526020880196909652948601949094525092979650505050505050565b6000816001600160401b03163a111561336357821561334657506001600160401b03811661259c565b3a8260405163435e532d60e11b8152600401610a50929190615629565b503a92915050565b6000806000631fe543e360e01b868560405160240161338b9291906156f3565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b031990941693909317909252600c805460ff60301b1916600160301b1790559086015160808701519192506133ef9163ffffffff9091169083613ba7565b600c805460ff60301b191690559695505050505050565b6000821561342057613419858584613bf3565b905061342e565b61342b858584613d04565b90505b949350505050565b600081815260066020526040902082156134f55780546001600160601b03600160601b909104811690851681101561348157604051631e9acf1760e31b815260040160405180910390fd5b61348b8582615a22565b8254600160601b600160c01b031916600160601b6001600160601b039283168102919091178455600b805488939192600c926134cb928692900416615991565b92506101000a8154816001600160601b0302191690836001600160601b0316021790555050612af4565b80546001600160601b0390811690851681101561352557604051631e9acf1760e31b815260040160405180910390fd5b61352f8582615a22565b82546001600160601b0319166001600160601b03918216178355600b8054879260009161355e91859116615991565b92506101000a8154816001600160601b0302191690836001600160601b031602179055505050505050565b601154600090815b818110156135eb57836001600160a01b0316601182815481106135b6576135b6615b36565b6000918252602090912001546001600160a01b031614156135db575060019392505050565b6135e481615a9e565b9050613591565b5060009392505050565b60008181526005602090815260408083206006909252822054600290910180546001600160601b0380841694600160601b90940416925b81811015613697576004600084838154811061364a5761364a615b36565b60009182526020808320909101546001600160a01b031683528281019390935260409182018120898252909252902080546001600160401b031916905561369081615a9e565b905061362c565b50600085815260056020526040812080546001600160a01b031990811682556001820180549091169055906136cf6002830182614d25565b50506000858152600660205260408120556136eb600886613eed565b506001600160601b0384161561373e57600a80548591906000906137199084906001600160601b0316615a22565b92506101000a8154816001600160601b0302191690836001600160601b031602179055505b6001600160601b038316156137965782600a600c8282829054906101000a90046001600160601b03166137719190615a22565b92506101000a8154816001600160601b0302191690836001600160601b031602179055505b5050915091565b6040805160208082018790526001600160a01b03959095168183015260608101939093526001600160401b03919091166080808401919091528151808403909101815260a08301825280519084012060c083019490945260e0808301859052815180840390910181526101009092019052805191012091565b6040805160208101909152600081528161383f575060408051602081019091526000815261259c565b63125fa26760e31b6138518385615a42565b6001600160e01b0319161461387957604051632923fee760e11b815260040160405180910390fd5b6138868260048186615908565b810190610fcd919061513f565b60607f92fd13387c7fe7befbc38d303d6468778fb9731bc4583f17d92989c6fcfdeaaa826040516024016138cc91511515815260200190565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915292915050565b60004661391081613ef9565b1561398d5760646001600160a01b031663a3b1b31d6040518163ffffffff1660e01b815260040160206040518083038186803b15801561394f57600080fd5b505afa158015613963573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906139879190615126565b91505090565b4391505090565b6000610fcd8383613f1c565b600061259c825490565b6000610fcd8383613f6b565b6001600160a01b038116331415613a095760405162461bcd60e51b815260206004820152601760248201527621b0b73737ba103a3930b739b332b9103a379039b2b63360491b6044820152606401610a50565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b600046613a6681613ef9565b15613b2d57610100836001600160401b0316613a80613904565b613a8a91906159e6565b1180613aa65750613a99613904565b836001600160401b031610155b15613ab45750600092915050565b6040516315a03d4160e11b81526001600160401b0384166004820152606490632b407a82906024015b60206040518083038186803b158015613af557600080fd5b505afa158015613b09573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fcd9190615126565b50506001600160401b03164090565b6000613b708360000151846020015185604001518660600151868860a001518960c001518a60e001518b6101000151613f95565b60038360200151604051602001613b889291906156df565b60408051601f1981840301815291905280516020909101209392505050565b60005a611388811015613bb957600080fd5b611388810390508460408204820311613bd157600080fd5b50823b613bdd57600080fd5b60008083516020850160008789f1949350505050565b600080613c366000368080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506141b192505050565b905060005a600c54613c56908890600160581b900463ffffffff16615932565b613c6091906159e6565b613c6a90866159c7565b600c54909150600090613c8f90600160781b900463ffffffff1664e8d4a510006159c7565b90508415613cdb57600c548190606490600160b81b900460ff16613cb38587615932565b613cbd91906159c7565b613cc791906159b3565b613cd19190615932565b9350505050610fcd565b600c548190606490613cf790600160b81b900460ff168261596c565b60ff16613cb38587615932565b600080613d0f61427f565b905060008113613d35576040516321ea67b360e11b815260048101829052602401610a50565b6000613d776000368080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506141b192505050565b9050600082825a600c54613d99908b90600160581b900463ffffffff16615932565b613da391906159e6565b613dad90896159c7565b613db79190615932565b613dc990670de0b6b3a76400006159c7565b613dd391906159b3565b600c54909150600090613dfc9063ffffffff600160981b8204811691600160781b9004166159fd565b613e119063ffffffff1664e8d4a510006159c7565b9050600084613e2883670de0b6b3a76400006159c7565b613e3291906159b3565b905060008715613e7357600c548290606490613e5890600160c01b900460ff16876159c7565b613e6291906159b3565b613e6c9190615932565b9050613eb3565b600c548290606490613e8f90600160c01b900460ff168261596c565b613e9c9060ff16876159c7565b613ea691906159b3565b613eb09190615932565b90505b6b033b2e3c9fd0803ce8000000811115613ee05760405163e80fa38160e01b815260040160405180910390fd5b9998505050505050505050565b6000610fcd838361434e565b600061a4b1821480613f0d575062066eed82145b8061259c57505062066eee1490565b6000818152600183016020526040812054613f635750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561259c565b50600061259c565b6000826000018281548110613f8257613f82615b36565b9060005260206000200154905092915050565b613f9e89614441565b613fe75760405162461bcd60e51b815260206004820152601a6024820152797075626c6963206b6579206973206e6f74206f6e20637572766560301b6044820152606401610a50565b613ff088614441565b6140345760405162461bcd60e51b815260206004820152601560248201527467616d6d61206973206e6f74206f6e20637572766560581b6044820152606401610a50565b61403d83614441565b6140895760405162461bcd60e51b815260206004820152601d60248201527f6347616d6d615769746e657373206973206e6f74206f6e2063757276650000006044820152606401610a50565b61409282614441565b6140de5760405162461bcd60e51b815260206004820152601c60248201527f73486173685769746e657373206973206e6f74206f6e206375727665000000006044820152606401610a50565b6140ea878a8887614504565b6141325760405162461bcd60e51b81526020600482015260196024820152786164647228632a706b2b732a6729213d5f755769746e65737360381b6044820152606401610a50565b600061413e8a87614627565b90506000614151898b878b86898961468b565b90506000614162838d8d8a866147aa565b9050808a146141a35760405162461bcd60e51b815260206004820152600d60248201526c34b73b30b634b210383937b7b360991b6044820152606401610a50565b505050505050505050505050565b6000466141bd81613ef9565b156141fc57606c6001600160a01b031663c6f7de0e6040518163ffffffff1660e01b815260040160206040518083038186803b158015613af557600080fd5b614205816147ea565b1561427657600f602160991b016001600160a01b03166349948e0e84604051806080016040528060488152602001615b866048913960405160200161424b9291906154f5565b6040516020818303038152906040526040518263ffffffff1660e01b8152600401613add9190615640565b50600092915050565b600c5460035460408051633fabe5a360e21b81529051600093600160381b900463ffffffff169284926001600160a01b039091169163feaf968c9160048082019260a092909190829003018186803b1580156142da57600080fd5b505afa1580156142ee573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061431291906153d0565b50919550909250505063ffffffff82161580159061433e575061433581426159e6565b8263ffffffff16105b156143495760105492505b505090565b600081815260018301602052604081205480156144375760006143726001836159e6565b8554909150600090614386906001906159e6565b90508181146143eb5760008660000182815481106143a6576143a6615b36565b90600052602060002001549050808760000184815481106143c9576143c9615b36565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806143fc576143fc615b20565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061259c565b600091505061259c565b80516000906401000003d0191161448f5760405162461bcd60e51b8152602060048201526012602482015271696e76616c696420782d6f7264696e61746560701b6044820152606401610a50565b60208201516401000003d019116144dd5760405162461bcd60e51b8152602060048201526012602482015271696e76616c696420792d6f7264696e61746560701b6044820152606401610a50565b60208201516401000003d0199080096144fd8360005b6020020151614824565b1492915050565b60006001600160a01b03821661454a5760405162461bcd60e51b815260206004820152600b60248201526a626164207769746e65737360a81b6044820152606401610a50565b60208401516000906001161561456157601c614564565b601b5b9050600070014551231950b75fc4402da1732fc9bebe1985876000602002015109865170014551231950b75fc4402da1732fc9bebe19918203925060009190890987516040805160008082526020820180845287905260ff88169282019290925260608101929092526080820183905291925060019060a0016020604051602081039080840390855afa1580156145ff573d6000803e3d6000fd5b5050604051601f1901516001600160a01b039081169088161495505050505050949350505050565b61462f614d43565b61465c600184846040516020016146489392919061557e565b604051602081830303815290604052614848565b90505b61466881614441565b61259c5780516040805160208101929092526146849101614648565b905061465f565b614693614d43565b825186516401000003d01990819006910614156146f25760405162461bcd60e51b815260206004820152601e60248201527f706f696e747320696e2073756d206d7573742062652064697374696e637400006044820152606401610a50565b6146fd878988614896565b6147425760405162461bcd60e51b8152602060048201526016602482015275119a5c9cdd081b5d5b0818da1958dac819985a5b195960521b6044820152606401610a50565b61474d848685614896565b6147935760405162461bcd60e51b815260206004820152601760248201527614d958dbdb99081b5d5b0818da1958dac819985a5b1959604a1b6044820152606401610a50565b61479e8684846149be565b98975050505050505050565b6000600286868685876040516020016147c896959493929190615524565b60408051601f1981840301815291905280516020909101209695505050505050565b6000600a8214806147fc57506101a482145b80614809575062aa37dc82145b80614815575061210582145b8061259c57505062014a331490565b6000806401000003d01980848509840990506401000003d019600782089392505050565b614850614d43565b61485982614a81565b815261486e6148698260006144f3565b614abc565b602082018190526002900660011415611e87576020810180516401000003d019039052919050565b6000826148d35760405162461bcd60e51b815260206004820152600b60248201526a3d32b9379039b1b0b630b960a91b6044820152606401610a50565b835160208501516000906148e990600290615ae0565b156148f557601c6148f8565b601b5b9050600070014551231950b75fc4402da1732fc9bebe198387096040805160008082526020820180845281905260ff86169282019290925260608101869052608081018390529192509060019060a0016020604051602081039080840390855afa15801561496a573d6000803e3d6000fd5b50505060206040510351905060008660405160200161498991906154e3565b60408051601f1981840301815291905280516020909101206001600160a01b0392831692169190911498975050505050505050565b6149c6614d43565b8351602080860151855191860151600093849384936149e793909190614adc565b919450925090506401000003d019858209600114614a435760405162461bcd60e51b815260206004820152601960248201527834b73b2d1036bab9ba1031329034b73b32b939b29037b3103d60391b6044820152606401610a50565b60405180604001604052806401000003d01980614a6257614a62615b0a565b87860981526020016401000003d0198785099052979650505050505050565b805160208201205b6401000003d0198110611e8757604080516020808201939093528151808203840181529082019091528051910120614a89565b600061259c826002614ad56401000003d0196001615932565b901c614bbc565b60008080600180826401000003d019896401000003d019038808905060006401000003d0198b6401000003d019038a0890506000614b1c83838585614c53565b9098509050614b2d88828e88614c77565b9098509050614b3e88828c87614c77565b90985090506000614b518d878b85614c77565b9098509050614b6288828686614c53565b9098509050614b7388828e89614c77565b9098509050818114614ba8576401000003d019818a0998506401000003d01982890997506401000003d0198183099650614bac565b8196505b5050505050509450945094915050565b600080614bc7614d61565b6020808252818101819052604082015260608101859052608081018490526401000003d01960a0820152614bf9614d7f565b60208160c0846005600019fa925082614c495760405162461bcd60e51b81526020600482015260126024820152716269674d6f64457870206661696c7572652160701b6044820152606401610a50565b5195945050505050565b6000806401000003d0198487096401000003d0198487099097909650945050505050565b600080806401000003d019878509905060006401000003d01987876401000003d019030990506401000003d0198183086401000003d01986890990999098509650505050505050565b828054828255906000526020600020908101928215614d15579160200282015b82811115614d1557825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190614ce0565b50614d21929150614d9d565b5090565b5080546000825590600052602060002090810190610a599190614d9d565b60405180604001604052806002906020820280368337509192915050565b6040518060c001604052806006906020820280368337509192915050565b60405180602001604052806001906020820280368337509192915050565b5b80821115614d215760008155600101614d9e565b8035611e8781615b62565b806040810183101561259c57600080fd5b600082601f830112614ddf57600080fd5b604051604081018181106001600160401b0382111715614e0157614e01615b4c565b8060405250808385604086011115614e1857600080fd5b60005b6002811015614e3a578135835260209283019290910190600101614e1b565b509195945050505050565b8035611e8781615b77565b600060c08284031215614e6257600080fd5b614e6a61588d565b9050614e7582614f64565b815260208083013581830152614e8d60408401614f50565b6040830152614e9e60608401614f50565b60608301526080830135614eb181615b62565b608083015260a08301356001600160401b0380821115614ed057600080fd5b818501915085601f830112614ee457600080fd5b813581811115614ef657614ef6615b4c565b614f08601f8201601f191685016158d8565b91508082528684828501011115614f1e57600080fd5b80848401858401376000848284010152508060a085015250505092915050565b803561ffff81168114611e8757600080fd5b803563ffffffff81168114611e8757600080fd5b80356001600160401b0381168114611e8757600080fd5b803560ff81168114611e8757600080fd5b805169ffffffffffffffffffff81168114611e8757600080fd5b600060208284031215614fb857600080fd5b8135610fcd81615b62565b60008060408385031215614fd657600080fd5b8235614fe181615b62565b91506020830135614ff181615b62565b809150509250929050565b6000806000806060858703121561501257600080fd5b843561501d81615b62565b93506020850135925060408501356001600160401b038082111561504057600080fd5b818701915087601f83011261505457600080fd5b81358181111561506357600080fd5b88602082850101111561507557600080fd5b95989497505060200194505050565b60006040828403121561509657600080fd5b610fcd8383614dbd565b600080606083850312156150b357600080fd5b6150bd8484614dbd565b91506150cb60408401614f64565b90509250929050565b6000604082840312156150e657600080fd5b610fcd8383614dce565b60006020828403121561510257600080fd5b8151610fcd81615b77565b60006020828403121561511f57600080fd5b5035919050565b60006020828403121561513857600080fd5b5051919050565b60006020828403121561515157600080fd5b604051602081018181106001600160401b038211171561517357615173615b4c565b604052823561518181615b77565b81529392505050565b60008060008385036101e08112156151a157600080fd5b6101a0808212156151b157600080fd5b6151b96158b5565b91506151c58787614dce565b82526151d48760408801614dce565b60208301526080860135604083015260a0860135606083015260c0860135608083015261520360e08701614db2565b60a083015261010061521788828901614dce565b60c084015261522a886101408901614dce565b60e0840152610180870135908301529093508401356001600160401b0381111561525357600080fd5b61525f86828701614e50565b92505061526f6101c08501614e45565b90509250925092565b60006020828403121561528a57600080fd5b81356001600160401b038111156152a057600080fd5b820160c08185031215610fcd57600080fd5b6000602082840312156152c457600080fd5b610fcd82614f3e565b60008060008060008060008060006101208a8c0312156152ec57600080fd5b6152f58a614f3e565b985061530360208b01614f50565b975061531160408b01614f50565b965061531f60608b01614f50565b955060808a0135945061533460a08b01614f50565b935061534260c08b01614f50565b925061535060e08b01614f7b565b915061535f6101008b01614f7b565b90509295985092959850929598565b6000806040838503121561538157600080fd5b823591506020830135614ff181615b62565b600080604083850312156153a657600080fd5b50508035926020909101359150565b6000602082840312156153c757600080fd5b610fcd82614f50565b600080600080600060a086880312156153e857600080fd5b6153f186614f8c565b945060208601519350604086015192506060860151915061541460808701614f8c565b90509295509295909350565b600081518084526020808501945080840160005b838110156154595781516001600160a01b031687529582019590820190600101615434565b509495945050505050565b8060005b6002811015612af4578151845260209384019390910190600101615468565b600081518084526020808501945080840160005b838110156154595781518752958201959082019060010161549b565b600081518084526154cf816020860160208601615a72565b601f01601f19169290920160200192915050565b6154ed8183615464565b604001919050565b60008351615507818460208801615a72565b83519083019061551b818360208801615a72565b01949350505050565b8681526155346020820187615464565b6155416060820186615464565b61554e60a0820185615464565b61555b60e0820184615464565b60609190911b6001600160601b0319166101208201526101340195945050505050565b83815261558e6020820184615464565b606081019190915260800192915050565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b039290921682526001600160601b0316602082015260400190565b6040810161259c8284615464565b602081526000610fcd6020830184615487565b9182526001600160401b0316602082015260400190565b602081526000610fcd60208301846154b7565b6020815260ff82511660208201526020820151604082015260018060a01b0360408301511660608201526000606083015160c0608084015261569860e0840182615420565b60808501516001600160601b0390811660a0868101919091529095015190941660c0909301929092525090919050565b9182526001600160a01b0316602082015260400190565b82815260608101610fcd6020830184615464565b82815260406020820152600061342e6040830184615487565b86815285602082015261ffff85166040820152600063ffffffff808616606084015280851660808401525060c060a083015261479e60c08301846154b7565b878152602081018790526040810186905263ffffffff8581166060830152841660808201526001600160a01b03831660a082015260e060c08201819052600090613ee0908301846154b7565b8781526001600160401b03871660208201526040810186905263ffffffff8581166060830152841660808201526001600160a01b03831660a082015260e060c08201819052600090613ee0908301846154b7565b6001600160601b038681168252851660208201526001600160401b03841660408201526001600160a01b038316606082015260a06080820181905260009061583590830184615420565b979650505050505050565b6000808335601e1984360301811261585757600080fd5b8301803591506001600160401b0382111561587157600080fd5b60200191503681900382131561588657600080fd5b9250929050565b60405160c081016001600160401b03811182821017156158af576158af615b4c565b60405290565b60405161012081016001600160401b03811182821017156158af576158af615b4c565b604051601f8201601f191681016001600160401b038111828210171561590057615900615b4c565b604052919050565b6000808585111561591857600080fd5b8386111561592557600080fd5b5050820193919092039150565b6000821982111561594557615945615af4565b500190565b60006001600160401b0380831681851680830382111561551b5761551b615af4565b600060ff821660ff84168060ff0382111561598957615989615af4565b019392505050565b60006001600160601b0382811684821680830382111561551b5761551b615af4565b6000826159c2576159c2615b0a565b500490565b60008160001904831182151516156159e1576159e1615af4565b500290565b6000828210156159f8576159f8615af4565b500390565b600063ffffffff83811690831681811015615a1a57615a1a615af4565b039392505050565b60006001600160601b0383811690831681811015615a1a57615a1a615af4565b6001600160e01b03198135818116916004851015615a6a5780818660040360031b1b83161692505b505092915050565b60005b83811015615a8d578181015183820152602001615a75565b83811115612af45750506000910152565b6000600019821415615ab257615ab2615af4565b5060010190565b60006001600160401b0380831681811415615ad657615ad6615af4565b6001019392505050565b600082615aef57615aef615b0a565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114610a5957600080fd5b8015158114610a5957600080fdfe307866666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666a164736f6c6343000806000a", + ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"blockhashStore\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"internalBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"externalBalance\",\"type\":\"uint256\"}],\"name\":\"BalanceInvariantViolated\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockNum\",\"type\":\"uint256\"}],\"name\":\"BlockhashNotInStore\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"coordinatorAddress\",\"type\":\"address\"}],\"name\":\"CoordinatorAlreadyRegistered\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"coordinatorAddress\",\"type\":\"address\"}],\"name\":\"CoordinatorNotRegistered\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FailedToSendNative\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FailedToTransferLink\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"have\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"want\",\"type\":\"uint32\"}],\"name\":\"GasLimitTooBig\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"gasPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxGas\",\"type\":\"uint256\"}],\"name\":\"GasPriceExceeded\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"IncorrectCommitment\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"IndexOutOfRange\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficientBalance\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidCalldata\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"consumer\",\"type\":\"address\"}],\"name\":\"InvalidConsumer\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidExtraArgsTag\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"int256\",\"name\":\"linkWei\",\"type\":\"int256\"}],\"name\":\"InvalidLinkWeiPrice\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"premiumPercentage\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"max\",\"type\":\"uint8\"}],\"name\":\"InvalidPremiumPercentage\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"have\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"min\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"max\",\"type\":\"uint16\"}],\"name\":\"InvalidRequestConfirmations\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidSubscription\",\"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\":\"LinkNotSet\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"have\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"max\",\"type\":\"uint32\"}],\"name\":\"MsgDataTooBig\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"proposedOwner\",\"type\":\"address\"}],\"name\":\"MustBeRequestedOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"MustBeSubOwner\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NoCorrespondingRequest\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"keyHash\",\"type\":\"bytes32\"}],\"name\":\"NoSuchProvingKey\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"have\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"want\",\"type\":\"uint32\"}],\"name\":\"NumWordsTooBig\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableFromLink\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PaymentTooLarge\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PendingRequestExists\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"keyHash\",\"type\":\"bytes32\"}],\"name\":\"ProvingKeyAlreadyRegistered\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Reentrant\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TooManyConsumers\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"minimumRequestConfirmations\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"maxGasLimit\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"stalenessSeconds\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"gasAfterPaymentCalculation\",\"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\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"nativePremiumPercentage\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"linkPremiumPercentage\",\"type\":\"uint8\"}],\"name\":\"ConfigSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"coordinatorAddress\",\"type\":\"address\"}],\"name\":\"CoordinatorDeregistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"coordinatorAddress\",\"type\":\"address\"}],\"name\":\"CoordinatorRegistered\",\"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\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"FundsRecovered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newCoordinator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"}],\"name\":\"MigrationCompleted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"NativeFundsRecovered\",\"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\":\"bytes32\",\"name\":\"keyHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"maxGas\",\"type\":\"uint64\"}],\"name\":\"ProvingKeyDeregistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"keyHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"maxGas\",\"type\":\"uint64\"}],\"name\":\"ProvingKeyRegistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"outputSeed\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"payment\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"nativePayment\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"onlyPremium\",\"type\":\"bool\"}],\"name\":\"RandomWordsFulfilled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"keyHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"preSeed\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"minimumRequestConfirmations\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"callbackGasLimit\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"numWords\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"extraArgs\",\"type\":\"bytes\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RandomWordsRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amountLink\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amountNative\",\"type\":\"uint256\"}],\"name\":\"SubscriptionCanceled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"consumer\",\"type\":\"address\"}],\"name\":\"SubscriptionConsumerAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"consumer\",\"type\":\"address\"}],\"name\":\"SubscriptionConsumerRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"SubscriptionCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldBalance\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newBalance\",\"type\":\"uint256\"}],\"name\":\"SubscriptionFunded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldNativeBalance\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newNativeBalance\",\"type\":\"uint256\"}],\"name\":\"SubscriptionFundedWithNative\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"SubscriptionOwnerTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"SubscriptionOwnerTransferred\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BLOCKHASH_STORE\",\"outputs\":[{\"internalType\":\"contractBlockhashStoreInterface\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"LINK\",\"outputs\":[{\"internalType\":\"contractLinkTokenInterface\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"LINK_NATIVE_FEED\",\"outputs\":[{\"internalType\":\"contractAggregatorV3Interface\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAX_CONSUMERS\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAX_NUM_WORDS\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAX_REQUEST_CONFIRMATIONS\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"}],\"name\":\"acceptSubscriptionOwnerTransfer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"consumer\",\"type\":\"address\"}],\"name\":\"addConsumer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"cancelSubscription\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"createSubscription\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"}],\"name\":\"deregisterMigratableCoordinator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[2]\",\"name\":\"publicProvingKey\",\"type\":\"uint256[2]\"}],\"name\":\"deregisterProvingKey\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256[2]\",\"name\":\"pk\",\"type\":\"uint256[2]\"},{\"internalType\":\"uint256[2]\",\"name\":\"gamma\",\"type\":\"uint256[2]\"},{\"internalType\":\"uint256\",\"name\":\"c\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"s\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"seed\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"uWitness\",\"type\":\"address\"},{\"internalType\":\"uint256[2]\",\"name\":\"cGammaWitness\",\"type\":\"uint256[2]\"},{\"internalType\":\"uint256[2]\",\"name\":\"sHashWitness\",\"type\":\"uint256[2]\"},{\"internalType\":\"uint256\",\"name\":\"zInv\",\"type\":\"uint256\"}],\"internalType\":\"structVRF.Proof\",\"name\":\"proof\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"blockNum\",\"type\":\"uint64\"},{\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"numWords\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"extraArgs\",\"type\":\"bytes\"}],\"internalType\":\"structVRFTypes.RequestCommitmentV2Plus\",\"name\":\"rc\",\"type\":\"tuple\"},{\"internalType\":\"bool\",\"name\":\"onlyPremium\",\"type\":\"bool\"}],\"name\":\"fulfillRandomWords\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"payment\",\"type\":\"uint96\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"}],\"name\":\"fundSubscriptionWithNative\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"startIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxCount\",\"type\":\"uint256\"}],\"name\":\"getActiveSubscriptionIds\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"}],\"name\":\"getSubscription\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"balance\",\"type\":\"uint96\"},{\"internalType\":\"uint96\",\"name\":\"nativeBalance\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"reqCount\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"subOwner\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"consumers\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[2]\",\"name\":\"publicKey\",\"type\":\"uint256[2]\"}],\"name\":\"hashOfKey\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"newCoordinator\",\"type\":\"address\"}],\"name\":\"migrate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"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\":\"subId\",\"type\":\"uint256\"}],\"name\":\"ownerCancelSubscription\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"}],\"name\":\"pendingRequestExists\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"recoverFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"addresspayable\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"recoverNativeFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"}],\"name\":\"registerMigratableCoordinator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[2]\",\"name\":\"publicProvingKey\",\"type\":\"uint256[2]\"},{\"internalType\":\"uint64\",\"name\":\"maxGas\",\"type\":\"uint64\"}],\"name\":\"registerProvingKey\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"consumer\",\"type\":\"address\"}],\"name\":\"removeConsumer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"keyHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"internalType\":\"uint16\",\"name\":\"requestConfirmations\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"numWords\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"extraArgs\",\"type\":\"bytes\"}],\"internalType\":\"structVRFV2PlusClient.RandomWordsRequest\",\"name\":\"req\",\"type\":\"tuple\"}],\"name\":\"requestRandomWords\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"requestSubscriptionOwnerTransfer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_config\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"minimumRequestConfirmations\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"maxGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"reentrancyLock\",\"type\":\"bool\"},{\"internalType\":\"uint32\",\"name\":\"stalenessSeconds\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"gasAfterPaymentCalculation\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"fulfillmentFlatFeeNativePPM\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"fulfillmentFlatFeeLinkDiscountPPM\",\"type\":\"uint32\"},{\"internalType\":\"uint8\",\"name\":\"nativePremiumPercentage\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"linkPremiumPercentage\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_currentSubNonce\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_fallbackWeiPerUnitLink\",\"outputs\":[{\"internalType\":\"int256\",\"name\":\"\",\"type\":\"int256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"s_provingKeyHashes\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"s_provingKeys\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"exists\",\"type\":\"bool\"},{\"internalType\":\"uint64\",\"name\":\"maxGas\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"s_requestCommitments\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_totalBalance\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_totalNativeBalance\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"minimumRequestConfirmations\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"maxGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"stalenessSeconds\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"gasAfterPaymentCalculation\",\"type\":\"uint32\"},{\"internalType\":\"int256\",\"name\":\"fallbackWeiPerUnitLink\",\"type\":\"int256\"},{\"internalType\":\"uint32\",\"name\":\"fulfillmentFlatFeeNativePPM\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"fulfillmentFlatFeeLinkDiscountPPM\",\"type\":\"uint32\"},{\"internalType\":\"uint8\",\"name\":\"nativePremiumPercentage\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"linkPremiumPercentage\",\"type\":\"uint8\"}],\"name\":\"setConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"link\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"linkNativeFeed\",\"type\":\"address\"}],\"name\":\"setLINKAndLINKNativeFeed\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"addresspayable\",\"name\":\"recipient\",\"type\":\"address\"}],\"name\":\"withdrawNative\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Bin: "0x60a06040523480156200001157600080fd5b5060405162005f2c38038062005f2c833981016040819052620000349162000183565b33806000816200008b5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000be57620000be81620000d7565b50505060601b6001600160601b031916608052620001b5565b6001600160a01b038116331415620001325760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000082565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6000602082840312156200019657600080fd5b81516001600160a01b0381168114620001ae57600080fd5b9392505050565b60805160601c615d51620001db60003960008181610550015261339b0152615d516000f3fe60806040526004361061021c5760003560e01c80638402595e11610124578063b2a7cac5116100a6578063b2a7cac514610732578063bec4c08c14610752578063caf70c4a14610772578063cb63179714610792578063d98e620e146107b2578063da2f2610146107d2578063dac83d2914610831578063dc311dd314610851578063e72f6e3014610882578063ee9d2d38146108a2578063f2fde38b146108cf57600080fd5b80638402595e146105c757806386fe91c7146105e75780638da5cb5b1461060757806395b55cfc146106255780639b1c385e146106385780639d40a6fd14610658578063a21a23e414610690578063a4c0ed36146106a5578063a63e0bfb146106c5578063aa433aff146106e5578063aefb212f1461070557600080fd5b8063405b84fa116101ad578063405b84fa1461044e57806340d6bb821461046e57806341af6c871461049957806351cff8d9146104c95780635d06b4ab146104e957806364d51a2a14610509578063659827441461051e578063689c45171461053e57806372e9d5651461057257806379ba5097146105925780637a5a2aef146105a757600080fd5b806304104edb14610221578063043bd6ae14610243578063088070f51461026c57806308821d581461033a5780630ae095401461035a57806315c48b841461037a57806318e3dd27146103a25780631b6b6d23146103e15780632f622e6b1461040e578063301f42e91461042e575b600080fd5b34801561022d57600080fd5b5061024161023c3660046150e5565b6108ef565b005b34801561024f57600080fd5b5061025960105481565b6040519081526020015b60405180910390f35b34801561027857600080fd5b50600c546102dd9061ffff81169063ffffffff62010000820481169160ff600160301b8204811692600160381b8304811692600160581b8104821692600160781b8204831692600160981b83041691600160b81b8104821691600160c01b9091041689565b6040805161ffff909a168a5263ffffffff98891660208b01529615159689019690965293861660608801529185166080870152841660a08601529290921660c084015260ff91821660e08401521661010082015261012001610263565b34801561034657600080fd5b506102416103553660046151c3565b610a5c565b34801561036657600080fd5b506102416103753660046154ad565b610c06565b34801561038657600080fd5b5061038f60c881565b60405161ffff9091168152602001610263565b3480156103ae57600080fd5b50600a546103c990600160601b90046001600160601b031681565b6040516001600160601b039091168152602001610263565b3480156103ed57600080fd5b50600254610401906001600160a01b031681565b60405161026391906156de565b34801561041a57600080fd5b506102416104293660046150e5565b610c4e565b34801561043a57600080fd5b506103c96104493660046152c9565b610d9a565b34801561045a57600080fd5b506102416104693660046154ad565b6110b0565b34801561047a57600080fd5b506104846101f481565b60405163ffffffff9091168152602001610263565b3480156104a557600080fd5b506104b96104b436600461524c565b611462565b6040519015158152602001610263565b3480156104d557600080fd5b506102416104e43660046150e5565b611514565b3480156104f557600080fd5b506102416105043660046150e5565b6116a2565b34801561051557600080fd5b5061038f606481565b34801561052a57600080fd5b50610241610539366004615102565b611759565b34801561054a57600080fd5b506104017f000000000000000000000000000000000000000000000000000000000000000081565b34801561057e57600080fd5b50600354610401906001600160a01b031681565b34801561059e57600080fd5b506102416117b9565b3480156105b357600080fd5b506102416105c23660046151df565b611863565b3480156105d357600080fd5b506102416105e23660046150e5565b611993565b3480156105f357600080fd5b50600a546103c9906001600160601b031681565b34801561061357600080fd5b506000546001600160a01b0316610401565b61024161063336600461524c565b611aa5565b34801561064457600080fd5b506102596106533660046153b7565b611bc9565b34801561066457600080fd5b50600754610678906001600160401b031681565b6040516001600160401b039091168152602001610263565b34801561069c57600080fd5b50610259612002565b3480156106b157600080fd5b506102416106c036600461513b565b6121d6565b3480156106d157600080fd5b506102416106e036600461540c565b612352565b3480156106f157600080fd5b5061024161070036600461524c565b61261e565b34801561071157600080fd5b506107256107203660046154d2565b612666565b6040516102639190615755565b34801561073e57600080fd5b5061024161074d36600461524c565b612768565b34801561075e57600080fd5b5061024161076d3660046154ad565b61285d565b34801561077e57600080fd5b5061025961078d366004615213565b61294f565b34801561079e57600080fd5b506102416107ad3660046154ad565b61297f565b3480156107be57600080fd5b506102596107cd36600461524c565b612be2565b3480156107de57600080fd5b506108126107ed36600461524c565b600d6020526000908152604090205460ff81169061010090046001600160401b031682565b6040805192151583526001600160401b03909116602083015201610263565b34801561083d57600080fd5b5061024161084c3660046154ad565b612c03565b34801561085d57600080fd5b5061087161086c36600461524c565b612c9a565b60405161026395949392919061593f565b34801561088e57600080fd5b5061024161089d3660046150e5565b612d88565b3480156108ae57600080fd5b506102596108bd36600461524c565b600f6020526000908152604090205481565b3480156108db57600080fd5b506102416108ea3660046150e5565b612f5b565b6108f7612f6c565b60115460005b81811015610a3457826001600160a01b03166011828154811061092257610922615cad565b6000918252602090912001546001600160a01b03161415610a2457601161094a600184615b3a565b8154811061095a5761095a615cad565b600091825260209091200154601180546001600160a01b03909216918390811061098657610986615cad565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060118054806109c5576109c5615c97565b600082815260209020810160001990810180546001600160a01b03191690550190556040517ff80a1a97fd42251f3c33cda98635e7399253033a6774fe37cd3f650b5282af3790610a179085906156de565b60405180910390a1505050565b610a2d81615c15565b90506108fd565b5081604051635428d44960e01b8152600401610a5091906156de565b60405180910390fd5b50565b610a64612f6c565b604080518082018252600091610a9391908490600290839083908082843760009201919091525061294f915050565b6000818152600d602090815260409182902082518084019093525460ff811615158084526101009091046001600160401b03169183019190915291925090610af157604051631dfd6e1360e21b815260048101839052602401610a50565b6000828152600d6020526040812080546001600160481b0319169055600e54905b81811015610bc25783600e8281548110610b2e57610b2e615cad565b90600052602060002001541415610bb257600e610b4c600184615b3a565b81548110610b5c57610b5c615cad565b9060005260206000200154600e8281548110610b7a57610b7a615cad565b600091825260209091200155600e805480610b9757610b97615c97565b60019003818190600052602060002001600090559055610bc2565b610bbb81615c15565b9050610b12565b507f9b6868e0eb737bcd72205360baa6bfd0ba4e4819a33ade2db384e8a8025639a5838360200151604051610bf8929190615768565b60405180910390a150505050565b81610c1081612fc1565b610c18613022565b610c2183611462565b15610c3f57604051631685ecdd60e31b815260040160405180910390fd5b610c49838361304d565b505050565b610c56613022565b610c5e612f6c565b600b54600160601b90046001600160601b0316610c8e57604051631e9acf1760e31b815260040160405180910390fd5b600b8054600160601b90046001600160601b0316908190600c610cb18380615b76565b92506101000a8154816001600160601b0302191690836001600160601b0316021790555080600a600c8282829054906101000a90046001600160601b0316610cf99190615b76565b92506101000a8154816001600160601b0302191690836001600160601b031602179055506000826001600160a01b0316826001600160601b031660405160006040518083038185875af1925050503d8060008114610d73576040519150601f19603f3d011682016040523d82523d6000602084013e610d78565b606091505b5050905080610c495760405163950b247960e01b815260040160405180910390fd5b6000610da4613022565b60005a9050610324361115610dd657604051630f28961b60e01b81523660048201526103246024820152604401610a50565b6000610de28686613201565b90506000610df8858360000151602001516134bd565b60408301516060888101519293509163ffffffff16806001600160401b03811115610e2557610e25615cc3565b604051908082528060200260200182016040528015610e4e578160200160208202803683370190505b50925060005b81811015610eb65760408051602081018590529081018290526060016040516020818303038152906040528051906020012060001c848281518110610e9b57610e9b615cad565b6020908102919091010152610eaf81615c15565b9050610e54565b5050602080850180516000908152600f9092526040822082905551610edc908a8561350b565b60208a8101516000908152600690915260409020805491925090601890610f1290600160c01b90046001600160401b0316615c30565b82546101009290920a6001600160401b0381810219909316918316021790915560808a01516001600160a01b03166000908152600460209081526040808320828e01518452909152902080549091600991610f7591600160481b90910416615bf2565b91906101000a8154816001600160401b0302191690836001600160401b0316021790555060008960a0015160018b60a0015151610fb29190615b3a565b81518110610fc257610fc2615cad565b60209101015160f81c60011490506000610fde8887848d6135a6565b909950905080156110295760208088015160105460408051928352928201527f6ca648a381f22ead7e37773d934e64885dcf861fbfbb26c40354cbf0c4662d1a910160405180910390a15b5061103988828c602001516135de565b6020808b015187820151604080518781526001600160601b038d16948101949094528415159084015284151560608401528b1515608084015290917faeb4b4786571e184246d39587f659abf0e26f41f6a3358692250382c0cdb47b79060a00160405180910390a3505050505050505b9392505050565b6110b8613022565b6110c181613731565b6110e05780604051635428d44960e01b8152600401610a5091906156de565b6000806000806110ef86612c9a565b945094505093509350336001600160a01b0316826001600160a01b0316146111525760405162461bcd60e51b81526020600482015260166024820152752737ba1039bab139b1b934b83a34b7b71037bbb732b960511b6044820152606401610a50565b61115b86611462565b156111a15760405162461bcd60e51b815260206004820152601660248201527550656e64696e6720726571756573742065786973747360501b6044820152606401610a50565b6040805160c0810182526001815260208082018990526001600160a01b03851682840152606082018490526001600160601b038088166080840152861660a0830152915190916000916111f691849101615792565b60405160208183030381529060405290506112108861379d565b505060405163ce3f471960e01b81526001600160a01b0388169063ce3f4719906001600160601b0388169061124990859060040161577f565b6000604051808303818588803b15801561126257600080fd5b505af1158015611276573d6000803e3d6000fd5b50506002546001600160a01b03161580159350915061129f905057506001600160601b03861615155b156113695760025460405163a9059cbb60e01b81526001600160a01b039091169063a9059cbb906112d6908a908a90600401615725565b602060405180830381600087803b1580156112f057600080fd5b505af1158015611304573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611328919061522f565b6113695760405162461bcd60e51b8152602060048201526012602482015271696e73756666696369656e742066756e647360701b6044820152606401610a50565b600c805460ff60301b1916600160301b17905560005b83518110156114105783818151811061139a5761139a615cad565b60200260200101516001600160a01b0316638ea98117896040518263ffffffff1660e01b81526004016113cd91906156de565b600060405180830381600087803b1580156113e757600080fd5b505af11580156113fb573d6000803e3d6000fd5b505050508061140990615c15565b905061137f565b50600c805460ff60301b191690556040517fd63ca8cb945956747ee69bfdc3ea754c24a4caf7418db70e46052f7850be4187906114509089908b906156f2565b60405180910390a15050505050505050565b6000818152600560205260408120600201805480611484575060009392505050565b60005b81811015611509576000600460008584815481106114a7576114a7615cad565b60009182526020808320909101546001600160a01b0316835282810193909352604091820181208982529092529020546001600160401b03600160481b9091041611156114f957506001949350505050565b61150281615c15565b9050611487565b506000949350505050565b61151c613022565b611524612f6c565b6002546001600160a01b031661154d5760405163c1f0c0a160e01b815260040160405180910390fd5b600b546001600160601b031661157657604051631e9acf1760e31b815260040160405180910390fd5b600b80546001600160601b031690819060006115928380615b76565b92506101000a8154816001600160601b0302191690836001600160601b0316021790555080600a60008282829054906101000a90046001600160601b03166115da9190615b76565b82546001600160601b039182166101009390930a92830291909202199091161790555060025460405163a9059cbb60e01b81526001600160a01b039091169063a9059cbb9061162f9085908590600401615725565b602060405180830381600087803b15801561164957600080fd5b505af115801561165d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611681919061522f565b61169e57604051631e9acf1760e31b815260040160405180910390fd5b5050565b6116aa612f6c565b6116b381613731565b156116d3578060405163ac8a27ef60e01b8152600401610a5091906156de565b601180546001810182556000919091527f31ecc21a745e3968a04e9570e4425bc18fa8019c68028196b546d1669c200c680180546001600160a01b0319166001600160a01b0383161790556040517fb7cabbfc11e66731fc77de0444614282023bcbd41d16781c753a431d0af016259061174e9083906156de565b60405180910390a150565b611761612f6c565b6002546001600160a01b03161561178b57604051631688c53760e11b815260040160405180910390fd5b600280546001600160a01b039384166001600160a01b03199182161790915560038054929093169116179055565b6001546001600160a01b0316331461180c5760405162461bcd60e51b815260206004820152601660248201527526bab9ba10313290383937b837b9b2b21037bbb732b960511b6044820152606401610a50565b60008054336001600160a01b0319808316821784556001805490911690556040516001600160a01b0390921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b61186b612f6c565b60408051808201825260009161189a91908590600290839083908082843760009201919091525061294f915050565b6000818152600d602052604090205490915060ff16156118d057604051634a0b8fa760e01b815260048101829052602401610a50565b60408051808201825260018082526001600160401b0385811660208085019182526000878152600d9091528581209451855492516001600160481b031990931690151568ffffffffffffffff00191617610100929093169190910291909117909255600e805491820181559091527fbb7b4a454dc3493923482f07822329ed19e8244eff582cc204f8554c3620c3fd01829055517f9b911b2c240bfbef3b6a8f7ed6ee321d1258bb2a3fe6becab52ac1cd3210afd390610a179083908590615768565b61199b612f6c565b600a544790600160601b90046001600160601b0316818111156119db576040516354ced18160e11b81526004810182905260248101839052604401610a50565b81811015610c495760006119ef8284615b3a565b90506000846001600160a01b03168260405160006040518083038185875af1925050503d8060008114611a3e576040519150601f19603f3d011682016040523d82523d6000602084013e611a43565b606091505b5050905080611a655760405163950b247960e01b815260040160405180910390fd5b7f4aed7c8eed0496c8c19ea2681fcca25741c1602342e38b045d9f1e8e905d2e9c8583604051611a969291906156f2565b60405180910390a15050505050565b611aad613022565b6000818152600560205260409020546001600160a01b0316611ae257604051630fb532db60e11b815260040160405180910390fd5b60008181526006602052604090208054600160601b90046001600160601b0316903490600c611b118385615ae5565b92506101000a8154816001600160601b0302191690836001600160601b0316021790555034600a600c8282829054906101000a90046001600160601b0316611b599190615ae5565b92506101000a8154816001600160601b0302191690836001600160601b03160217905550817f7603b205d03651ee812f803fccde89f1012e545a9c99f0abfea9cedd0fd8e902823484611bac9190615a86565b604080519283526020830191909152015b60405180910390a25050565b6000611bd3613022565b602080830135600081815260059092526040909120546001600160a01b0316611c0f57604051630fb532db60e11b815260040160405180910390fd5b336000908152600460209081526040808320848452808352928190208151606081018352905460ff811615158083526001600160401b036101008304811695840195909552600160481b9091049093169181019190915290611c885782336040516379bfd40160e01b8152600401610a50929190615807565b600c5461ffff16611c9f60608701604088016153f1565b61ffff161080611cc2575060c8611cbc60608701604088016153f1565b61ffff16115b15611d0857611cd760608601604087016153f1565b600c5460405163539c34bb60e11b815261ffff92831660048201529116602482015260c86044820152606401610a50565b600c5462010000900463ffffffff16611d2760808701606088016154f4565b63ffffffff161115611d7757611d4360808601606087016154f4565b600c54604051637aebf00f60e11b815263ffffffff9283166004820152620100009091049091166024820152604401610a50565b6101f4611d8a60a08701608088016154f4565b63ffffffff161115611dd057611da660a08601608087016154f4565b6040516311ce1afb60e21b815263ffffffff90911660048201526101f46024820152604401610a50565b806020018051611ddf90615c30565b6001600160401b03169052604081018051611df990615c30565b6001600160401b03908116909152602082810151604080518935818501819052338284015260608201899052929094166080808601919091528151808603909101815260a08501825280519084012060c085019290925260e08085018390528151808603909101815261010090940190528251929091019190912060009190955090506000611e9b611e96611e9160a08a018a615994565b613945565b6139c2565b905085611ea6613a33565b86611eb760808b0160608c016154f4565b611ec760a08c0160808d016154f4565b3386604051602001611edf9796959493929190615892565b60405160208183030381529060405280519060200120600f600088815260200190815260200160002081905550336001600160a01b03168588600001357feb0e3652e0f44f417695e6e90f2f42c99b65cd7169074c5a654b16b9748c3a4e89868c6040016020810190611f5291906153f1565b8d6060016020810190611f6591906154f4565b8e6080016020810190611f7891906154f4565b89604051611f8b96959493929190615853565b60405180910390a4505060009283526020918252604092839020815181549383015192909401516001600160481b031990931693151568ffffffffffffffff001916939093176101006001600160401b03928316021767ffffffffffffffff60481b1916600160481b91909216021790555b919050565b600061200c613022565b6007546001600160401b031633612024600143615b3a565b6040516001600160601b0319606093841b81166020830152914060348201523090921b1660548201526001600160c01b031960c083901b16606882015260700160408051601f1981840301815291905280516020909101209150612089816001615a9e565b6007805467ffffffffffffffff19166001600160401b03928316179055604080516000808252608082018352602080830182815283850183815260608086018581528a86526006855287862093518454935191516001600160601b039182166001600160c01b031990951694909417600160601b9190921602176001600160c01b0316600160c01b9290981691909102969096179055835194850184523385528481018281528585018481528884526005835294909220855181546001600160a01b03199081166001600160a01b0392831617835593516001830180549095169116179092559251805192949391926121889260028501920190614dff565b5061219891506008905084613ac3565b50827f1d3015d7ba850fa198dc7b1a3f5d42779313a681035f77c8c03764c61005518d336040516121c991906156de565b60405180910390a2505090565b6121de613022565b6002546001600160a01b03163314612209576040516344b0e3c360e01b815260040160405180910390fd5b6020811461222a57604051638129bbcd60e01b815260040160405180910390fd5b60006122388284018461524c565b6000818152600560205260409020549091506001600160a01b031661227057604051630fb532db60e11b815260040160405180910390fd5b600081815260066020526040812080546001600160601b0316918691906122978385615ae5565b92506101000a8154816001600160601b0302191690836001600160601b0316021790555084600a60008282829054906101000a90046001600160601b03166122df9190615ae5565b92506101000a8154816001600160601b0302191690836001600160601b03160217905550817f1ced9348ff549fceab2ac57cd3a9de38edaaab274b725ee82c23e8fc8c4eec7a8287846123329190615a86565b6040805192835260208301919091520160405180910390a2505050505050565b61235a612f6c565b60c861ffff8a1611156123945760405163539c34bb60e11b815261ffff8a1660048201819052602482015260c86044820152606401610a50565b600085136123b8576040516321ea67b360e11b815260048101869052602401610a50565b8363ffffffff168363ffffffff1611156123f5576040516313c06e5960e11b815263ffffffff808516600483015285166024820152604401610a50565b609b60ff8316111561242657604051631d66288d60e11b815260ff83166004820152609b6024820152604401610a50565b609b60ff8216111561245757604051631d66288d60e11b815260ff82166004820152609b6024820152604401610a50565b604080516101208101825261ffff8b1680825263ffffffff808c16602084018190526000848601528b8216606085018190528b8316608086018190528a841660a08701819052938a1660c0870181905260ff808b1660e08901819052908a16610100909801889052600c8054600160c01b90990260ff60c01b19600160b81b9093029290921661ffff60b81b19600160981b90940263ffffffff60981b19600160781b9099029890981667ffffffffffffffff60781b19600160581b90960263ffffffff60581b19600160381b9098029790971668ffffffffffffffffff60301b196201000090990265ffffffffffff19909c16909a179a909a1796909616979097179390931791909116959095179290921793909316929092179190911790556010869055517f2c6b6b12413678366b05b145c5f00745bdd00e739131ab5de82484a50c9d78b69061260b908b908b908b908b908b908b908b908b908b9061ffff99909916895263ffffffff97881660208a0152958716604089015293861660608801526080870192909252841660a086015290921660c084015260ff91821660e0840152166101008201526101200190565b60405180910390a1505050505050505050565b612626612f6c565b6000818152600560205260409020546001600160a01b03168061265c57604051630fb532db60e11b815260040160405180910390fd5b61169e828261304d565b606060006126746008613acf565b905080841061269657604051631390f2a160e01b815260040160405180910390fd5b60006126a28486615a86565b9050818111806126b0575083155b6126ba57806126bc565b815b905060006126ca8683615b3a565b9050806001600160401b038111156126e4576126e4615cc3565b60405190808252806020026020018201604052801561270d578160200160208202803683370190505b50935060005b8181101561275d576127306127288883615a86565b600890613ad9565b85828151811061274257612742615cad565b602090810291909101015261275681615c15565b9050612713565b505050505b92915050565b612770613022565b6000818152600560205260409020546001600160a01b0316806127a657604051630fb532db60e11b815260040160405180910390fd5b6000828152600560205260409020600101546001600160a01b031633146127fd576000828152600560205260409081902060010154905163d084e97560e01b8152610a50916001600160a01b0316906004016156de565b600082815260056020526040908190208054336001600160a01b031991821681178355600190920180549091169055905183917fd4114ab6e9af9f597c52041f32d62dc57c5c4e4c0d4427006069635e216c938691611bbd91859161570b565b8161286781612fc1565b61286f613022565b6001600160a01b03821660009081526004602090815260408083208684529091529020805460ff16156128a25750505050565b60008481526005602052604090206002018054606414156128d6576040516305a48e0f60e01b815260040160405180910390fd5b8154600160ff1990911681178355815490810182556000828152602090200180546001600160a01b0319166001600160a01b03861617905560405185907f1e980d04aa7648e205713e5e8ea3808672ac163d10936d36f91b2c88ac1575e1906129409087906156de565b60405180910390a25050505050565b6000816040516020016129629190615747565b604051602081830303815290604052805190602001209050919050565b8161298981612fc1565b612991613022565b61299a83611462565b156129b857604051631685ecdd60e31b815260040160405180910390fd5b6001600160a01b038216600090815260046020908152604080832086845290915290205460ff16612a005782826040516379bfd40160e01b8152600401610a50929190615807565b600083815260056020908152604080832060020180548251818502810185019093528083529192909190830182828015612a6357602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311612a45575b50505050509050600060018251612a7a9190615b3a565b905060005b8251811015612b8457846001600160a01b0316838281518110612aa457612aa4615cad565b60200260200101516001600160a01b03161415612b74576000838381518110612acf57612acf615cad565b6020026020010151905080600560008981526020019081526020016000206002018381548110612b0157612b01615cad565b600091825260208083209190910180546001600160a01b0319166001600160a01b039490941693909317909255888152600590915260409020600201805480612b4c57612b4c615c97565b600082815260209020810160001990810180546001600160a01b031916905501905550612b84565b612b7d81615c15565b9050612a7f565b506001600160a01b038416600090815260046020908152604080832088845290915290819020805460ff191690555185907f32158c6058347c1601b2d12bc696ac6901d8a9a9aa3ba10c27ab0a983e8425a7906129409087906156de565b600e8181548110612bf257600080fd5b600091825260209091200154905081565b81612c0d81612fc1565b612c15613022565b600083815260056020526040902060018101546001600160a01b03848116911614612c94576001810180546001600160a01b0319166001600160a01b03851617905560405184907f21a4dad170a6bf476c31bbcf4a16628295b0e450672eec25d7c93308e05344a190612c8b903390879061570b565b60405180910390a25b50505050565b600081815260056020526040812054819081906001600160a01b0316606081612cd657604051630fb532db60e11b815260040160405180910390fd5b600086815260066020908152604080832054600583529281902060020180548251818502810185019093528083526001600160601b0380861695600160601b810490911694600160c01b9091046001600160401b0316938893929091839190830182828015612d6e57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311612d50575b505050505090509450945094509450945091939590929450565b612d90612f6c565b6002546001600160a01b0316612db95760405163c1f0c0a160e01b815260040160405180910390fd5b6002546040516370a0823160e01b81526000916001600160a01b0316906370a0823190612dea9030906004016156de565b60206040518083038186803b158015612e0257600080fd5b505afa158015612e16573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e3a9190615265565b600a549091506001600160601b031681811115612e74576040516354ced18160e11b81526004810182905260248101839052604401610a50565b81811015610c49576000612e888284615b3a565b60025460405163a9059cbb60e01b81529192506001600160a01b03169063a9059cbb90612ebb90879085906004016156f2565b602060405180830381600087803b158015612ed557600080fd5b505af1158015612ee9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f0d919061522f565b612f2a57604051631f01ff1360e21b815260040160405180910390fd5b7f59bfc682b673f8cbf945f1e454df9334834abf7dfe7f92237ca29ecb9b4366008482604051610bf89291906156f2565b612f63612f6c565b610a5981613ae5565b6000546001600160a01b03163314612fbf5760405162461bcd60e51b815260206004820152601660248201527527b7363c9031b0b63630b1363290313c9037bbb732b960511b6044820152606401610a50565b565b6000818152600560205260409020546001600160a01b031680612ff757604051630fb532db60e11b815260040160405180910390fd5b336001600160a01b0382161461169e5780604051636c51fda960e11b8152600401610a5091906156de565b600c54600160301b900460ff1615612fbf5760405163769dd35360e11b815260040160405180910390fd5b6000806130598461379d565b60025491935091506001600160a01b03161580159061308057506001600160601b03821615155b1561312f5760025460405163a9059cbb60e01b81526001600160a01b039091169063a9059cbb906130c09086906001600160601b038716906004016156f2565b602060405180830381600087803b1580156130da57600080fd5b505af11580156130ee573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613112919061522f565b61312f57604051631e9acf1760e31b815260040160405180910390fd5b6000836001600160a01b0316826001600160601b031660405160006040518083038185875af1925050503d8060008114613185576040519150601f19603f3d011682016040523d82523d6000602084013e61318a565b606091505b50509050806131ac5760405163950b247960e01b815260040160405180910390fd5b604080516001600160a01b03861681526001600160601b03808616602083015284169181019190915285907f8c74ce8b8cf87f5eb001275c8be27eb34ea2b62bfab6814fcc62192bb63e81c490606001612940565b6040805160a0810182526000606082018181526080830182905282526020820181905291810191909152600061323a846000015161294f565b6000818152600d602090815260409182902082518084019093525460ff811615158084526101009091046001600160401b0316918301919091529192509061329857604051631dfd6e1360e21b815260048101839052602401610a50565b60008286608001516040516020016132ba929190918252602082015260400190565b60408051601f1981840301815291815281516020928301206000818152600f9093529120549091508061330057604051631b44092560e11b815260040160405180910390fd5b85516020808801516040808a015160608b015160808c015160a08d0151935161332f978a9790969591016158eb565b6040516020818303038152906040528051906020012081146133645760405163354a450b60e21b815260040160405180910390fd5b60006133738760000151613b89565b90508061344b578651604051631d2827a760e31b81526001600160401b0390911660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063e9413d389060240160206040518083038186803b1580156133e557600080fd5b505afa1580156133f9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061341d9190615265565b90508061344b57865160405163175dadad60e01b81526001600160401b039091166004820152602401610a50565b600088608001518260405160200161346d929190918252602082015260400190565b6040516020818303038152906040528051906020012060001c905060006134948a83613c6b565b604080516060810182529788526020880196909652948601949094525092979650505050505050565b6000816001600160401b03163a11156135035782156134e657506001600160401b038116612762565b3a8260405163435e532d60e11b8152600401610a50929190615768565b503a92915050565b6000806000631fe543e360e01b868560405160240161352b929190615832565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b031990941693909317909252600c805460ff60301b1916600160301b17905590860151608087015191925061358f9163ffffffff9091169083613cd6565b600c805460ff60301b191690559695505050505050565b60008083156135c5576135ba868685613d22565b6000915091506135d5565b6135d0868685613e33565b915091505b94509492505050565b6000818152600660205260409020821561369d5780546001600160601b03600160601b909104811690851681101561362957604051631e9acf1760e31b815260040160405180910390fd5b6136338582615b76565b8254600160601b600160c01b031916600160601b6001600160601b039283168102919091178455600b805488939192600c92613673928692900416615ae5565b92506101000a8154816001600160601b0302191690836001600160601b0316021790555050612c94565b80546001600160601b039081169085168110156136cd57604051631e9acf1760e31b815260040160405180910390fd5b6136d78582615b76565b82546001600160601b0319166001600160601b03918216178355600b8054879260009161370691859116615ae5565b92506101000a8154816001600160601b0302191690836001600160601b031602179055505050505050565b601154600090815b8181101561379357836001600160a01b03166011828154811061375e5761375e615cad565b6000918252602090912001546001600160a01b03161415613783575060019392505050565b61378c81615c15565b9050613739565b5060009392505050565b60008181526005602090815260408083206006909252822054600290910180546001600160601b0380841694600160601b90940416925b8181101561383f57600460008483815481106137f2576137f2615cad565b60009182526020808320909101546001600160a01b031683528281019390935260409182018120898252909252902080546001600160881b031916905561383881615c15565b90506137d4565b50600085815260056020526040812080546001600160a01b031990811682556001820180549091169055906138776002830182614e64565b5050600085815260066020526040812055613893600886614025565b506001600160601b038416156138e657600a80548591906000906138c19084906001600160601b0316615b76565b92506101000a8154816001600160601b0302191690836001600160601b031602179055505b6001600160601b0383161561393e5782600a600c8282829054906101000a90046001600160601b03166139199190615b76565b92506101000a8154816001600160601b0302191690836001600160601b031602179055505b5050915091565b6040805160208101909152600081528161396e5750604080516020810190915260008152612762565b63125fa26760e31b6139808385615b96565b6001600160e01b031916146139a857604051632923fee760e11b815260040160405180910390fd5b6139b58260048186615a5c565b8101906110a9919061527e565b60607f92fd13387c7fe7befbc38d303d6468778fb9731bc4583f17d92989c6fcfdeaaa826040516024016139fb91511515815260200190565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915292915050565b600046613a3f81614031565b15613abc5760646001600160a01b031663a3b1b31d6040518163ffffffff1660e01b815260040160206040518083038186803b158015613a7e57600080fd5b505afa158015613a92573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613ab69190615265565b91505090565b4391505090565b60006110a98383614054565b6000612762825490565b60006110a983836140a3565b6001600160a01b038116331415613b385760405162461bcd60e51b815260206004820152601760248201527621b0b73737ba103a3930b739b332b9103a379039b2b63360491b6044820152606401610a50565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b600046613b9581614031565b15613c5c57610100836001600160401b0316613baf613a33565b613bb99190615b3a565b1180613bd55750613bc8613a33565b836001600160401b031610155b15613be35750600092915050565b6040516315a03d4160e11b81526001600160401b0384166004820152606490632b407a82906024015b60206040518083038186803b158015613c2457600080fd5b505afa158015613c38573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110a99190615265565b50506001600160401b03164090565b6000613c9f8360000151846020015185604001518660600151868860a001518960c001518a60e001518b61010001516140cd565b60038360200151604051602001613cb792919061581e565b60408051601f1981840301815291905280516020909101209392505050565b60005a611388811015613ce857600080fd5b611388810390508460408204820311613d0057600080fd5b50823b613d0c57600080fd5b60008083516020850160008789f1949350505050565b600080613d656000368080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506142e992505050565b905060005a600c54613d85908890600160581b900463ffffffff16615a86565b613d8f9190615b3a565b613d999086615b1b565b600c54909150600090613dbe90600160781b900463ffffffff1664e8d4a51000615b1b565b90508415613e0a57600c548190606490600160b81b900460ff16613de28587615a86565b613dec9190615b1b565b613df69190615b07565b613e009190615a86565b93505050506110a9565b600c548190606490613e2690600160b81b900460ff1682615ac0565b60ff16613de28587615a86565b600080600080613e416143b7565b9150915060008213613e69576040516321ea67b360e11b815260048101839052602401610a50565b6000613eab6000368080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506142e992505050565b9050600083825a600c54613ecd908d90600160581b900463ffffffff16615a86565b613ed79190615b3a565b613ee1908b615b1b565b613eeb9190615a86565b613efd90670de0b6b3a7640000615b1b565b613f079190615b07565b600c54909150600090613f309063ffffffff600160981b8204811691600160781b900416615b51565b613f459063ffffffff1664e8d4a51000615b1b565b9050600085613f5c83670de0b6b3a7640000615b1b565b613f669190615b07565b905060008915613fa757600c548290606490613f8c90600160c01b900460ff1687615b1b565b613f969190615b07565b613fa09190615a86565b9050613fe7565b600c548290606490613fc390600160c01b900460ff1682615ac0565b613fd09060ff1687615b1b565b613fda9190615b07565b613fe49190615a86565b90505b6b033b2e3c9fd0803ce80000008111156140145760405163e80fa38160e01b815260040160405180910390fd5b9b949a509398505050505050505050565b60006110a9838361448d565b600061a4b1821480614045575062066eed82145b8061276257505062066eee1490565b600081815260018301602052604081205461409b57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155612762565b506000612762565b60008260000182815481106140ba576140ba615cad565b9060005260206000200154905092915050565b6140d689614580565b61411f5760405162461bcd60e51b815260206004820152601a6024820152797075626c6963206b6579206973206e6f74206f6e20637572766560301b6044820152606401610a50565b61412888614580565b61416c5760405162461bcd60e51b815260206004820152601560248201527467616d6d61206973206e6f74206f6e20637572766560581b6044820152606401610a50565b61417583614580565b6141c15760405162461bcd60e51b815260206004820152601d60248201527f6347616d6d615769746e657373206973206e6f74206f6e2063757276650000006044820152606401610a50565b6141ca82614580565b6142165760405162461bcd60e51b815260206004820152601c60248201527f73486173685769746e657373206973206e6f74206f6e206375727665000000006044820152606401610a50565b614222878a8887614643565b61426a5760405162461bcd60e51b81526020600482015260196024820152786164647228632a706b2b732a6729213d5f755769746e65737360381b6044820152606401610a50565b60006142768a87614766565b90506000614289898b878b8689896147ca565b9050600061429a838d8d8a866148e9565b9050808a146142db5760405162461bcd60e51b815260206004820152600d60248201526c34b73b30b634b210383937b7b360991b6044820152606401610a50565b505050505050505050505050565b6000466142f581614031565b1561433457606c6001600160a01b031663c6f7de0e6040518163ffffffff1660e01b815260040160206040518083038186803b158015613c2457600080fd5b61433d81614929565b156143ae57600f602160991b016001600160a01b03166349948e0e84604051806080016040528060488152602001615cfd60489139604051602001614383929190615634565b6040516020818303038152906040526040518263ffffffff1660e01b8152600401613c0c919061577f565b50600092915050565b600c5460035460408051633fabe5a360e21b815290516000938493600160381b90910463ffffffff169284926001600160a01b039092169163feaf968c9160048082019260a092909190829003018186803b15801561441557600080fd5b505afa158015614429573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061444d919061550f565b50919650909250505063ffffffff82161580159061447957506144708142615b3a565b8263ffffffff16105b925082156144875760105493505b50509091565b600081815260018301602052604081205480156145765760006144b1600183615b3a565b85549091506000906144c590600190615b3a565b905081811461452a5760008660000182815481106144e5576144e5615cad565b906000526020600020015490508087600001848154811061450857614508615cad565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061453b5761453b615c97565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050612762565b6000915050612762565b80516000906401000003d019116145ce5760405162461bcd60e51b8152602060048201526012602482015271696e76616c696420782d6f7264696e61746560701b6044820152606401610a50565b60208201516401000003d0191161461c5760405162461bcd60e51b8152602060048201526012602482015271696e76616c696420792d6f7264696e61746560701b6044820152606401610a50565b60208201516401000003d01990800961463c8360005b6020020151614963565b1492915050565b60006001600160a01b0382166146895760405162461bcd60e51b815260206004820152600b60248201526a626164207769746e65737360a81b6044820152606401610a50565b6020840151600090600116156146a057601c6146a3565b601b5b9050600070014551231950b75fc4402da1732fc9bebe1985876000602002015109865170014551231950b75fc4402da1732fc9bebe19918203925060009190890987516040805160008082526020820180845287905260ff88169282019290925260608101929092526080820183905291925060019060a0016020604051602081039080840390855afa15801561473e573d6000803e3d6000fd5b5050604051601f1901516001600160a01b039081169088161495505050505050949350505050565b61476e614e82565b61479b60018484604051602001614787939291906156bd565b604051602081830303815290604052614987565b90505b6147a781614580565b6127625780516040805160208101929092526147c39101614787565b905061479e565b6147d2614e82565b825186516401000003d01990819006910614156148315760405162461bcd60e51b815260206004820152601e60248201527f706f696e747320696e2073756d206d7573742062652064697374696e637400006044820152606401610a50565b61483c8789886149d5565b6148815760405162461bcd60e51b8152602060048201526016602482015275119a5c9cdd081b5d5b0818da1958dac819985a5b195960521b6044820152606401610a50565b61488c8486856149d5565b6148d25760405162461bcd60e51b815260206004820152601760248201527614d958dbdb99081b5d5b0818da1958dac819985a5b1959604a1b6044820152606401610a50565b6148dd868484614afd565b98975050505050505050565b60006002868686858760405160200161490796959493929190615663565b60408051601f1981840301815291905280516020909101209695505050505050565b6000600a82148061493b57506101a482145b80614948575062aa37dc82145b80614954575061210582145b8061276257505062014a331490565b6000806401000003d01980848509840990506401000003d019600782089392505050565b61498f614e82565b61499882614bc0565b81526149ad6149a8826000614632565b614bfb565b602082018190526002900660011415611ffd576020810180516401000003d019039052919050565b600082614a125760405162461bcd60e51b815260206004820152600b60248201526a3d32b9379039b1b0b630b960a91b6044820152606401610a50565b83516020850151600090614a2890600290615c57565b15614a3457601c614a37565b601b5b9050600070014551231950b75fc4402da1732fc9bebe198387096040805160008082526020820180845281905260ff86169282019290925260608101869052608081018390529192509060019060a0016020604051602081039080840390855afa158015614aa9573d6000803e3d6000fd5b505050602060405103519050600086604051602001614ac89190615622565b60408051601f1981840301815291905280516020909101206001600160a01b0392831692169190911498975050505050505050565b614b05614e82565b835160208086015185519186015160009384938493614b2693909190614c1b565b919450925090506401000003d019858209600114614b825760405162461bcd60e51b815260206004820152601960248201527834b73b2d1036bab9ba1031329034b73b32b939b29037b3103d60391b6044820152606401610a50565b60405180604001604052806401000003d01980614ba157614ba1615c81565b87860981526020016401000003d0198785099052979650505050505050565b805160208201205b6401000003d0198110611ffd57604080516020808201939093528151808203840181529082019091528051910120614bc8565b6000612762826002614c146401000003d0196001615a86565b901c614cfb565b60008080600180826401000003d019896401000003d019038808905060006401000003d0198b6401000003d019038a0890506000614c5b83838585614d92565b9098509050614c6c88828e88614db6565b9098509050614c7d88828c87614db6565b90985090506000614c908d878b85614db6565b9098509050614ca188828686614d92565b9098509050614cb288828e89614db6565b9098509050818114614ce7576401000003d019818a0998506401000003d01982890997506401000003d0198183099650614ceb565b8196505b5050505050509450945094915050565b600080614d06614ea0565b6020808252818101819052604082015260608101859052608081018490526401000003d01960a0820152614d38614ebe565b60208160c0846005600019fa925082614d885760405162461bcd60e51b81526020600482015260126024820152716269674d6f64457870206661696c7572652160701b6044820152606401610a50565b5195945050505050565b6000806401000003d0198487096401000003d0198487099097909650945050505050565b600080806401000003d019878509905060006401000003d01987876401000003d019030990506401000003d0198183086401000003d01986890990999098509650505050505050565b828054828255906000526020600020908101928215614e54579160200282015b82811115614e5457825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190614e1f565b50614e60929150614edc565b5090565b5080546000825590600052602060002090810190610a599190614edc565b60405180604001604052806002906020820280368337509192915050565b6040518060c001604052806006906020820280368337509192915050565b60405180602001604052806001906020820280368337509192915050565b5b80821115614e605760008155600101614edd565b8035611ffd81615cd9565b806040810183101561276257600080fd5b600082601f830112614f1e57600080fd5b604051604081018181106001600160401b0382111715614f4057614f40615cc3565b8060405250808385604086011115614f5757600080fd5b60005b6002811015614f79578135835260209283019290910190600101614f5a565b509195945050505050565b8035611ffd81615cee565b600060c08284031215614fa157600080fd5b614fa96159e1565b9050614fb4826150a3565b815260208083013581830152614fcc6040840161508f565b6040830152614fdd6060840161508f565b60608301526080830135614ff081615cd9565b608083015260a08301356001600160401b038082111561500f57600080fd5b818501915085601f83011261502357600080fd5b81358181111561503557615035615cc3565b615047601f8201601f19168501615a2c565b9150808252868482850101111561505d57600080fd5b80848401858401376000848284010152508060a085015250505092915050565b803561ffff81168114611ffd57600080fd5b803563ffffffff81168114611ffd57600080fd5b80356001600160401b0381168114611ffd57600080fd5b803560ff81168114611ffd57600080fd5b805169ffffffffffffffffffff81168114611ffd57600080fd5b6000602082840312156150f757600080fd5b81356110a981615cd9565b6000806040838503121561511557600080fd5b823561512081615cd9565b9150602083013561513081615cd9565b809150509250929050565b6000806000806060858703121561515157600080fd5b843561515c81615cd9565b93506020850135925060408501356001600160401b038082111561517f57600080fd5b818701915087601f83011261519357600080fd5b8135818111156151a257600080fd5b8860208285010111156151b457600080fd5b95989497505060200194505050565b6000604082840312156151d557600080fd5b6110a98383614efc565b600080606083850312156151f257600080fd5b6151fc8484614efc565b915061520a604084016150a3565b90509250929050565b60006040828403121561522557600080fd5b6110a98383614f0d565b60006020828403121561524157600080fd5b81516110a981615cee565b60006020828403121561525e57600080fd5b5035919050565b60006020828403121561527757600080fd5b5051919050565b60006020828403121561529057600080fd5b604051602081018181106001600160401b03821117156152b2576152b2615cc3565b60405282356152c081615cee565b81529392505050565b60008060008385036101e08112156152e057600080fd5b6101a0808212156152f057600080fd5b6152f8615a09565b91506153048787614f0d565b82526153138760408801614f0d565b60208301526080860135604083015260a0860135606083015260c0860135608083015261534260e08701614ef1565b60a083015261010061535688828901614f0d565b60c0840152615369886101408901614f0d565b60e0840152610180870135908301529093508401356001600160401b0381111561539257600080fd5b61539e86828701614f8f565b9250506153ae6101c08501614f84565b90509250925092565b6000602082840312156153c957600080fd5b81356001600160401b038111156153df57600080fd5b820160c081850312156110a957600080fd5b60006020828403121561540357600080fd5b6110a98261507d565b60008060008060008060008060006101208a8c03121561542b57600080fd5b6154348a61507d565b985061544260208b0161508f565b975061545060408b0161508f565b965061545e60608b0161508f565b955060808a0135945061547360a08b0161508f565b935061548160c08b0161508f565b925061548f60e08b016150ba565b915061549e6101008b016150ba565b90509295985092959850929598565b600080604083850312156154c057600080fd5b82359150602083013561513081615cd9565b600080604083850312156154e557600080fd5b50508035926020909101359150565b60006020828403121561550657600080fd5b6110a98261508f565b600080600080600060a0868803121561552757600080fd5b615530866150cb565b9450602086015193506040860151925060608601519150615553608087016150cb565b90509295509295909350565b600081518084526020808501945080840160005b838110156155985781516001600160a01b031687529582019590820190600101615573565b509495945050505050565b8060005b6002811015612c945781518452602093840193909101906001016155a7565b600081518084526020808501945080840160005b83811015615598578151875295820195908201906001016155da565b6000815180845261560e816020860160208601615bc6565b601f01601f19169290920160200192915050565b61562c81836155a3565b604001919050565b60008351615646818460208801615bc6565b83519083019061565a818360208801615bc6565b01949350505050565b86815261567360208201876155a3565b61568060608201866155a3565b61568d60a08201856155a3565b61569a60e08201846155a3565b60609190911b6001600160601b0319166101208201526101340195945050505050565b8381526156cd60208201846155a3565b606081019190915260800192915050565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b039290921682526001600160601b0316602082015260400190565b6040810161276282846155a3565b6020815260006110a960208301846155c6565b9182526001600160401b0316602082015260400190565b6020815260006110a960208301846155f6565b6020815260ff82511660208201526020820151604082015260018060a01b0360408301511660608201526000606083015160c060808401526157d760e084018261555f565b60808501516001600160601b0390811660a0868101919091529095015190941660c0909301929092525090919050565b9182526001600160a01b0316602082015260400190565b828152606081016110a960208301846155a3565b82815260406020820152600061584b60408301846155c6565b949350505050565b86815285602082015261ffff85166040820152600063ffffffff808616606084015280851660808401525060c060a08301526148dd60c08301846155f6565b878152602081018790526040810186905263ffffffff8581166060830152841660808201526001600160a01b03831660a082015260e060c082018190526000906158de908301846155f6565b9998505050505050505050565b8781526001600160401b03871660208201526040810186905263ffffffff8581166060830152841660808201526001600160a01b03831660a082015260e060c082018190526000906158de908301846155f6565b6001600160601b038681168252851660208201526001600160401b03841660408201526001600160a01b038316606082015260a0608082018190526000906159899083018461555f565b979650505050505050565b6000808335601e198436030181126159ab57600080fd5b8301803591506001600160401b038211156159c557600080fd5b6020019150368190038213156159da57600080fd5b9250929050565b60405160c081016001600160401b0381118282101715615a0357615a03615cc3565b60405290565b60405161012081016001600160401b0381118282101715615a0357615a03615cc3565b604051601f8201601f191681016001600160401b0381118282101715615a5457615a54615cc3565b604052919050565b60008085851115615a6c57600080fd5b83861115615a7957600080fd5b5050820193919092039150565b60008219821115615a9957615a99615c6b565b500190565b60006001600160401b0380831681851680830382111561565a5761565a615c6b565b600060ff821660ff84168060ff03821115615add57615add615c6b565b019392505050565b60006001600160601b0382811684821680830382111561565a5761565a615c6b565b600082615b1657615b16615c81565b500490565b6000816000190483118215151615615b3557615b35615c6b565b500290565b600082821015615b4c57615b4c615c6b565b500390565b600063ffffffff83811690831681811015615b6e57615b6e615c6b565b039392505050565b60006001600160601b0383811690831681811015615b6e57615b6e615c6b565b6001600160e01b03198135818116916004851015615bbe5780818660040360031b1b83161692505b505092915050565b60005b83811015615be1578181015183820152602001615bc9565b83811115612c945750506000910152565b60006001600160401b03821680615c0b57615c0b615c6b565b6000190192915050565b6000600019821415615c2957615c29615c6b565b5060010190565b60006001600160401b0380831681811415615c4d57615c4d615c6b565b6001019392505050565b600082615c6657615c66615c81565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114610a5957600080fd5b8015158114610a5957600080fdfe307866666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666a164736f6c6343000806000a", } var VRFCoordinatorV25ABI = VRFCoordinatorV25MetaData.ABI @@ -369,7 +369,7 @@ func (_VRFCoordinatorV25 *VRFCoordinatorV25Caller) GetSubscription(opts *bind.Ca outstruct.Balance = *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) outstruct.NativeBalance = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) outstruct.ReqCount = *abi.ConvertType(out[2], new(uint64)).(*uint64) - outstruct.Owner = *abi.ConvertType(out[3], new(common.Address)).(*common.Address) + outstruct.SubOwner = *abi.ConvertType(out[3], new(common.Address)).(*common.Address) outstruct.Consumers = *abi.ConvertType(out[4], new([]common.Address)).(*[]common.Address) return *outstruct, err @@ -737,15 +737,15 @@ func (_VRFCoordinatorV25 *VRFCoordinatorV25TransactorSession) DeregisterProvingK return _VRFCoordinatorV25.Contract.DeregisterProvingKey(&_VRFCoordinatorV25.TransactOpts, publicProvingKey) } -func (_VRFCoordinatorV25 *VRFCoordinatorV25Transactor) FulfillRandomWords(opts *bind.TransactOpts, proof VRFProof, rc VRFCoordinatorV25RequestCommitment, onlyPremium bool) (*types.Transaction, error) { +func (_VRFCoordinatorV25 *VRFCoordinatorV25Transactor) FulfillRandomWords(opts *bind.TransactOpts, proof VRFProof, rc VRFTypesRequestCommitmentV2Plus, onlyPremium bool) (*types.Transaction, error) { return _VRFCoordinatorV25.contract.Transact(opts, "fulfillRandomWords", proof, rc, onlyPremium) } -func (_VRFCoordinatorV25 *VRFCoordinatorV25Session) FulfillRandomWords(proof VRFProof, rc VRFCoordinatorV25RequestCommitment, onlyPremium bool) (*types.Transaction, error) { +func (_VRFCoordinatorV25 *VRFCoordinatorV25Session) FulfillRandomWords(proof VRFProof, rc VRFTypesRequestCommitmentV2Plus, onlyPremium bool) (*types.Transaction, error) { return _VRFCoordinatorV25.Contract.FulfillRandomWords(&_VRFCoordinatorV25.TransactOpts, proof, rc, onlyPremium) } -func (_VRFCoordinatorV25 *VRFCoordinatorV25TransactorSession) FulfillRandomWords(proof VRFProof, rc VRFCoordinatorV25RequestCommitment, onlyPremium bool) (*types.Transaction, error) { +func (_VRFCoordinatorV25 *VRFCoordinatorV25TransactorSession) FulfillRandomWords(proof VRFProof, rc VRFTypesRequestCommitmentV2Plus, onlyPremium bool) (*types.Transaction, error) { return _VRFCoordinatorV25.Contract.FulfillRandomWords(&_VRFCoordinatorV25.TransactOpts, proof, rc, onlyPremium) } @@ -1300,6 +1300,124 @@ func (_VRFCoordinatorV25 *VRFCoordinatorV25Filterer) ParseCoordinatorRegistered( return event, nil } +type VRFCoordinatorV25FallbackWeiPerUnitLinkUsedIterator struct { + Event *VRFCoordinatorV25FallbackWeiPerUnitLinkUsed + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *VRFCoordinatorV25FallbackWeiPerUnitLinkUsedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(VRFCoordinatorV25FallbackWeiPerUnitLinkUsed) + 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(VRFCoordinatorV25FallbackWeiPerUnitLinkUsed) + 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 *VRFCoordinatorV25FallbackWeiPerUnitLinkUsedIterator) Error() error { + return it.fail +} + +func (it *VRFCoordinatorV25FallbackWeiPerUnitLinkUsedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type VRFCoordinatorV25FallbackWeiPerUnitLinkUsed struct { + RequestId *big.Int + FallbackWeiPerUnitLink *big.Int + Raw types.Log +} + +func (_VRFCoordinatorV25 *VRFCoordinatorV25Filterer) FilterFallbackWeiPerUnitLinkUsed(opts *bind.FilterOpts) (*VRFCoordinatorV25FallbackWeiPerUnitLinkUsedIterator, error) { + + logs, sub, err := _VRFCoordinatorV25.contract.FilterLogs(opts, "FallbackWeiPerUnitLinkUsed") + if err != nil { + return nil, err + } + return &VRFCoordinatorV25FallbackWeiPerUnitLinkUsedIterator{contract: _VRFCoordinatorV25.contract, event: "FallbackWeiPerUnitLinkUsed", logs: logs, sub: sub}, nil +} + +func (_VRFCoordinatorV25 *VRFCoordinatorV25Filterer) WatchFallbackWeiPerUnitLinkUsed(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25FallbackWeiPerUnitLinkUsed) (event.Subscription, error) { + + logs, sub, err := _VRFCoordinatorV25.contract.WatchLogs(opts, "FallbackWeiPerUnitLinkUsed") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(VRFCoordinatorV25FallbackWeiPerUnitLinkUsed) + if err := _VRFCoordinatorV25.contract.UnpackLog(event, "FallbackWeiPerUnitLinkUsed", 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 (_VRFCoordinatorV25 *VRFCoordinatorV25Filterer) ParseFallbackWeiPerUnitLinkUsed(log types.Log) (*VRFCoordinatorV25FallbackWeiPerUnitLinkUsed, error) { + event := new(VRFCoordinatorV25FallbackWeiPerUnitLinkUsed) + if err := _VRFCoordinatorV25.contract.UnpackLog(event, "FallbackWeiPerUnitLinkUsed", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + type VRFCoordinatorV25FundsRecoveredIterator struct { Event *VRFCoordinatorV25FundsRecovered @@ -3494,7 +3612,7 @@ type GetSubscription struct { Balance *big.Int NativeBalance *big.Int ReqCount uint64 - Owner common.Address + SubOwner common.Address Consumers []common.Address } type SConfig struct { @@ -3521,6 +3639,8 @@ func (_VRFCoordinatorV25 *VRFCoordinatorV25) ParseLog(log types.Log) (generated. return _VRFCoordinatorV25.ParseCoordinatorDeregistered(log) case _VRFCoordinatorV25.abi.Events["CoordinatorRegistered"].ID: return _VRFCoordinatorV25.ParseCoordinatorRegistered(log) + case _VRFCoordinatorV25.abi.Events["FallbackWeiPerUnitLinkUsed"].ID: + return _VRFCoordinatorV25.ParseFallbackWeiPerUnitLinkUsed(log) case _VRFCoordinatorV25.abi.Events["FundsRecovered"].ID: return _VRFCoordinatorV25.ParseFundsRecovered(log) case _VRFCoordinatorV25.abi.Events["MigrationCompleted"].ID: @@ -3573,6 +3693,10 @@ func (VRFCoordinatorV25CoordinatorRegistered) Topic() common.Hash { return common.HexToHash("0xb7cabbfc11e66731fc77de0444614282023bcbd41d16781c753a431d0af01625") } +func (VRFCoordinatorV25FallbackWeiPerUnitLinkUsed) Topic() common.Hash { + return common.HexToHash("0x6ca648a381f22ead7e37773d934e64885dcf861fbfbb26c40354cbf0c4662d1a") +} + func (VRFCoordinatorV25FundsRecovered) Topic() common.Hash { return common.HexToHash("0x59bfc682b673f8cbf945f1e454df9334834abf7dfe7f92237ca29ecb9b436600") } @@ -3704,7 +3828,7 @@ type VRFCoordinatorV25Interface interface { DeregisterProvingKey(opts *bind.TransactOpts, publicProvingKey [2]*big.Int) (*types.Transaction, error) - FulfillRandomWords(opts *bind.TransactOpts, proof VRFProof, rc VRFCoordinatorV25RequestCommitment, onlyPremium bool) (*types.Transaction, error) + FulfillRandomWords(opts *bind.TransactOpts, proof VRFProof, rc VRFTypesRequestCommitmentV2Plus, onlyPremium bool) (*types.Transaction, error) FundSubscriptionWithNative(opts *bind.TransactOpts, subId *big.Int) (*types.Transaction, error) @@ -3756,6 +3880,12 @@ type VRFCoordinatorV25Interface interface { ParseCoordinatorRegistered(log types.Log) (*VRFCoordinatorV25CoordinatorRegistered, error) + FilterFallbackWeiPerUnitLinkUsed(opts *bind.FilterOpts) (*VRFCoordinatorV25FallbackWeiPerUnitLinkUsedIterator, error) + + WatchFallbackWeiPerUnitLinkUsed(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25FallbackWeiPerUnitLinkUsed) (event.Subscription, error) + + ParseFallbackWeiPerUnitLinkUsed(log types.Log) (*VRFCoordinatorV25FallbackWeiPerUnitLinkUsed, error) + FilterFundsRecovered(opts *bind.FilterOpts) (*VRFCoordinatorV25FundsRecoveredIterator, error) WatchFundsRecovered(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25FundsRecovered) (event.Subscription, error) diff --git a/core/gethwrappers/generated/vrf_malicious_consumer_v2_plus/vrf_malicious_consumer_v2_plus.go b/core/gethwrappers/generated/vrf_malicious_consumer_v2_plus/vrf_malicious_consumer_v2_plus.go index df5a49a8de4..05e75da2e36 100644 --- a/core/gethwrappers/generated/vrf_malicious_consumer_v2_plus/vrf_malicious_consumer_v2_plus.go +++ b/core/gethwrappers/generated/vrf_malicious_consumer_v2_plus/vrf_malicious_consumer_v2_plus.go @@ -31,8 +31,8 @@ var ( ) var VRFMaliciousConsumerV2PlusMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"vrfCoordinator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"link\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"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\":\"ZeroAddress\",\"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\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"createSubscriptionAndFund\",\"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\":\"bytes32\",\"name\":\"keyHash\",\"type\":\"bytes32\"}],\"name\":\"requestRandomness\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_gasAvailable\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"s_randomWords\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_requestId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_vrfCoordinator\",\"outputs\":[{\"internalType\":\"contractIVRFCoordinatorV2Plus\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_vrfCoordinator\",\"type\":\"address\"}],\"name\":\"setCoordinator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"consumers\",\"type\":\"address[]\"}],\"name\":\"updateSubscription\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x60806040523480156200001157600080fd5b5060405162001239380380620012398339810160408190526200003491620001c2565b8133806000816200008c5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000bf57620000bf81620000f9565b5050600280546001600160a01b039384166001600160a01b0319918216179091556005805494909316931692909217905550620001fa9050565b6001600160a01b038116331415620001545760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000083565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b80516001600160a01b0381168114620001bd57600080fd5b919050565b60008060408385031215620001d657600080fd5b620001e183620001a5565b9150620001f160208401620001a5565b90509250929050565b61102f806200020a6000396000f3fe608060405234801561001057600080fd5b50600436106100d45760003560e01c80639eccacf611610081578063f08c5daa1161005b578063f08c5daa146101bd578063f2fde38b146101c6578063f6eaffc8146101d957600080fd5b80639eccacf614610181578063cf62c8ab146101a1578063e89e106a146101b457600080fd5b806379ba5097116100b257806379ba5097146101275780638da5cb5b1461012f5780638ea981171461016e57600080fd5b80631fe543e3146100d957806336bfffed146100ee5780635e3b709f14610101575b600080fd5b6100ec6100e7366004610d03565b6101ec565b005b6100ec6100fc366004610c0b565b610272565b61011461010f366004610cd1565b6103aa565b6040519081526020015b60405180910390f35b6100ec6104a0565b60005473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161011e565b6100ec61017c366004610bf0565b61059d565b6002546101499073ffffffffffffffffffffffffffffffffffffffff1681565b6100ec6101af366004610da7565b6106a8565b61011460045481565b61011460065481565b6100ec6101d4366004610bf0565b6108ae565b6101146101e7366004610cd1565b6108c2565b60025473ffffffffffffffffffffffffffffffffffffffff163314610264576002546040517f1cf993f400000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff90911660248201526044015b60405180910390fd5b61026e82826108e3565b5050565b6007546102db576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f7375624944206e6f742073657400000000000000000000000000000000000000604482015260640161025b565b60005b815181101561026e57600254600754835173ffffffffffffffffffffffffffffffffffffffff9092169163bec4c08c919085908590811061032157610321610fc4565b60200260200101516040518363ffffffff1660e01b815260040161036592919091825273ffffffffffffffffffffffffffffffffffffffff16602082015260400190565b600060405180830381600087803b15801561037f57600080fd5b505af1158015610393573d6000803e3d6000fd5b5050505080806103a290610f64565b9150506102de565b60088190556040805160c08101825282815260075460208083019190915260018284018190526207a1206060840152608083015282519081018352600080825260a083019190915260025492517f9b1c385e000000000000000000000000000000000000000000000000000000008152909273ffffffffffffffffffffffffffffffffffffffff1690639b1c385e90610447908490600401610e8c565b602060405180830381600087803b15801561046157600080fd5b505af1158015610475573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104999190610cea565b9392505050565b60015473ffffffffffffffffffffffffffffffffffffffff163314610521576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e657200000000000000000000604482015260640161025b565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b60005473ffffffffffffffffffffffffffffffffffffffff1633148015906105dd575060025473ffffffffffffffffffffffffffffffffffffffff163314155b15610661573361060260005473ffffffffffffffffffffffffffffffffffffffff1690565b6002546040517f061db9c100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9384166004820152918316602483015291909116604482015260640161025b565b600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b6007546107e057600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a21a23e46040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561071957600080fd5b505af115801561072d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107519190610cea565b60078190556002546040517fbec4c08c000000000000000000000000000000000000000000000000000000008152600481019290925230602483015273ffffffffffffffffffffffffffffffffffffffff169063bec4c08c90604401600060405180830381600087803b1580156107c757600080fd5b505af11580156107db573d6000803e3d6000fd5b505050505b6005546002546007546040805160208082019390935281518082039093018352808201918290527f4000aea00000000000000000000000000000000000000000000000000000000090915273ffffffffffffffffffffffffffffffffffffffff93841693634000aea09361085c93911691869190604401610e40565b602060405180830381600087803b15801561087657600080fd5b505af115801561088a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061026e9190610caf565b6108b66109ee565b6108bf81610a71565b50565b600381815481106108d257600080fd5b600091825260209091200154905081565b5a60065580516108fa906003906020840190610b67565b5060048281556040805160c0810182526008548152600754602080830191909152600182840181905262030d4060608401526080830152825190810183526000815260a082015260025491517f9b1c385e000000000000000000000000000000000000000000000000000000008152909273ffffffffffffffffffffffffffffffffffffffff90921691639b1c385e9161099691859101610e8c565b602060405180830381600087803b1580156109b057600080fd5b505af11580156109c4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109e89190610cea565b50505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610a6f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e657200000000000000000000604482015260640161025b565b565b73ffffffffffffffffffffffffffffffffffffffff8116331415610af1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640161025b565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b828054828255906000526020600020908101928215610ba2579160200282015b82811115610ba2578251825591602001919060010190610b87565b50610bae929150610bb2565b5090565b5b80821115610bae5760008155600101610bb3565b803573ffffffffffffffffffffffffffffffffffffffff81168114610beb57600080fd5b919050565b600060208284031215610c0257600080fd5b61049982610bc7565b60006020808385031215610c1e57600080fd5b823567ffffffffffffffff811115610c3557600080fd5b8301601f81018513610c4657600080fd5b8035610c59610c5482610f40565b610ef1565b80828252848201915084840188868560051b8701011115610c7957600080fd5b600094505b83851015610ca357610c8f81610bc7565b835260019490940193918501918501610c7e565b50979650505050505050565b600060208284031215610cc157600080fd5b8151801515811461049957600080fd5b600060208284031215610ce357600080fd5b5035919050565b600060208284031215610cfc57600080fd5b5051919050565b60008060408385031215610d1657600080fd5b8235915060208084013567ffffffffffffffff811115610d3557600080fd5b8401601f81018613610d4657600080fd5b8035610d54610c5482610f40565b80828252848201915084840189868560051b8701011115610d7457600080fd5b600094505b83851015610d97578035835260019490940193918501918501610d79565b5080955050505050509250929050565b600060208284031215610db957600080fd5b81356bffffffffffffffffffffffff8116811461049957600080fd5b6000815180845260005b81811015610dfb57602081850181015186830182015201610ddf565b81811115610e0d576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b73ffffffffffffffffffffffffffffffffffffffff841681526bffffffffffffffffffffffff83166020820152606060408201526000610e836060830184610dd5565b95945050505050565b60208152815160208201526020820151604082015261ffff60408301511660608201526000606083015163ffffffff80821660808501528060808601511660a0850152505060a083015160c080840152610ee960e0840182610dd5565b949350505050565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715610f3857610f38610ff3565b604052919050565b600067ffffffffffffffff821115610f5a57610f5a610ff3565b5060051b60200190565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415610fbd577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea164736f6c6343000806000a", + ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"vrfCoordinator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"link\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"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\":\"ZeroAddress\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"vrfCoordinator\",\"type\":\"address\"}],\"name\":\"CoordinatorSet\",\"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\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"createSubscriptionAndFund\",\"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\":\"bytes32\",\"name\":\"keyHash\",\"type\":\"bytes32\"}],\"name\":\"requestRandomness\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_gasAvailable\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"s_randomWords\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_requestId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_vrfCoordinator\",\"outputs\":[{\"internalType\":\"contractIVRFCoordinatorV2Plus\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_vrfCoordinator\",\"type\":\"address\"}],\"name\":\"setCoordinator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"consumers\",\"type\":\"address[]\"}],\"name\":\"updateSubscription\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Bin: "0x60806040523480156200001157600080fd5b50604051620012df380380620012df8339810160408190526200003491620001e9565b8133806000816200008c5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000bf57620000bf8162000120565b5050506001600160a01b038116620000ea5760405163d92e233d60e01b815260040160405180910390fd5b600280546001600160a01b039283166001600160a01b031991821617909155600580549390921692169190911790555062000221565b6001600160a01b0381163314156200017b5760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000083565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b80516001600160a01b0381168114620001e457600080fd5b919050565b60008060408385031215620001fd57600080fd5b6200020883620001cc565b91506200021860208401620001cc565b90509250929050565b6110ae80620002316000396000f3fe608060405234801561001057600080fd5b50600436106100d45760003560e01c80639eccacf611610081578063f08c5daa1161005b578063f08c5daa146101bd578063f2fde38b146101c6578063f6eaffc8146101d957600080fd5b80639eccacf614610181578063cf62c8ab146101a1578063e89e106a146101b457600080fd5b806379ba5097116100b257806379ba5097146101275780638da5cb5b1461012f5780638ea981171461016e57600080fd5b80631fe543e3146100d957806336bfffed146100ee5780635e3b709f14610101575b600080fd5b6100ec6100e7366004610d82565b6101ec565b005b6100ec6100fc366004610c8a565b610272565b61011461010f366004610d50565b6103aa565b6040519081526020015b60405180910390f35b6100ec6104a0565b60005473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161011e565b6100ec61017c366004610c6f565b61059d565b6002546101499073ffffffffffffffffffffffffffffffffffffffff1681565b6100ec6101af366004610e26565b610727565b61011460045481565b61011460065481565b6100ec6101d4366004610c6f565b61092d565b6101146101e7366004610d50565b610941565b60025473ffffffffffffffffffffffffffffffffffffffff163314610264576002546040517f1cf993f400000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff90911660248201526044015b60405180910390fd5b61026e8282610962565b5050565b6007546102db576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f7375624944206e6f742073657400000000000000000000000000000000000000604482015260640161025b565b60005b815181101561026e57600254600754835173ffffffffffffffffffffffffffffffffffffffff9092169163bec4c08c919085908590811061032157610321611043565b60200260200101516040518363ffffffff1660e01b815260040161036592919091825273ffffffffffffffffffffffffffffffffffffffff16602082015260400190565b600060405180830381600087803b15801561037f57600080fd5b505af1158015610393573d6000803e3d6000fd5b5050505080806103a290610fe3565b9150506102de565b60088190556040805160c08101825282815260075460208083019190915260018284018190526207a1206060840152608083015282519081018352600080825260a083019190915260025492517f9b1c385e000000000000000000000000000000000000000000000000000000008152909273ffffffffffffffffffffffffffffffffffffffff1690639b1c385e90610447908490600401610f0b565b602060405180830381600087803b15801561046157600080fd5b505af1158015610475573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104999190610d69565b9392505050565b60015473ffffffffffffffffffffffffffffffffffffffff163314610521576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e657200000000000000000000604482015260640161025b565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b60005473ffffffffffffffffffffffffffffffffffffffff1633148015906105dd575060025473ffffffffffffffffffffffffffffffffffffffff163314155b15610661573361060260005473ffffffffffffffffffffffffffffffffffffffff1690565b6002546040517f061db9c100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9384166004820152918316602483015291909116604482015260640161025b565b73ffffffffffffffffffffffffffffffffffffffff81166106ae576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527fd1a6a14209a385a964d036e404cb5cfb71f4000cdb03c9366292430787261be69060200160405180910390a150565b60075461085f57600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a21a23e46040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561079857600080fd5b505af11580156107ac573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107d09190610d69565b60078190556002546040517fbec4c08c000000000000000000000000000000000000000000000000000000008152600481019290925230602483015273ffffffffffffffffffffffffffffffffffffffff169063bec4c08c90604401600060405180830381600087803b15801561084657600080fd5b505af115801561085a573d6000803e3d6000fd5b505050505b6005546002546007546040805160208082019390935281518082039093018352808201918290527f4000aea00000000000000000000000000000000000000000000000000000000090915273ffffffffffffffffffffffffffffffffffffffff93841693634000aea0936108db93911691869190604401610ebf565b602060405180830381600087803b1580156108f557600080fd5b505af1158015610909573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061026e9190610d2e565b610935610a6d565b61093e81610af0565b50565b6003818154811061095157600080fd5b600091825260209091200154905081565b5a6006558051610979906003906020840190610be6565b5060048281556040805160c0810182526008548152600754602080830191909152600182840181905262030d4060608401526080830152825190810183526000815260a082015260025491517f9b1c385e000000000000000000000000000000000000000000000000000000008152909273ffffffffffffffffffffffffffffffffffffffff90921691639b1c385e91610a1591859101610f0b565b602060405180830381600087803b158015610a2f57600080fd5b505af1158015610a43573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a679190610d69565b50505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610aee576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e657200000000000000000000604482015260640161025b565b565b73ffffffffffffffffffffffffffffffffffffffff8116331415610b70576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640161025b565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b828054828255906000526020600020908101928215610c21579160200282015b82811115610c21578251825591602001919060010190610c06565b50610c2d929150610c31565b5090565b5b80821115610c2d5760008155600101610c32565b803573ffffffffffffffffffffffffffffffffffffffff81168114610c6a57600080fd5b919050565b600060208284031215610c8157600080fd5b61049982610c46565b60006020808385031215610c9d57600080fd5b823567ffffffffffffffff811115610cb457600080fd5b8301601f81018513610cc557600080fd5b8035610cd8610cd382610fbf565b610f70565b80828252848201915084840188868560051b8701011115610cf857600080fd5b600094505b83851015610d2257610d0e81610c46565b835260019490940193918501918501610cfd565b50979650505050505050565b600060208284031215610d4057600080fd5b8151801515811461049957600080fd5b600060208284031215610d6257600080fd5b5035919050565b600060208284031215610d7b57600080fd5b5051919050565b60008060408385031215610d9557600080fd5b8235915060208084013567ffffffffffffffff811115610db457600080fd5b8401601f81018613610dc557600080fd5b8035610dd3610cd382610fbf565b80828252848201915084840189868560051b8701011115610df357600080fd5b600094505b83851015610e16578035835260019490940193918501918501610df8565b5080955050505050509250929050565b600060208284031215610e3857600080fd5b81356bffffffffffffffffffffffff8116811461049957600080fd5b6000815180845260005b81811015610e7a57602081850181015186830182015201610e5e565b81811115610e8c576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b73ffffffffffffffffffffffffffffffffffffffff841681526bffffffffffffffffffffffff83166020820152606060408201526000610f026060830184610e54565b95945050505050565b60208152815160208201526020820151604082015261ffff60408301511660608201526000606083015163ffffffff80821660808501528060808601511660a0850152505060a083015160c080840152610f6860e0840182610e54565b949350505050565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715610fb757610fb7611072565b604052919050565b600067ffffffffffffffff821115610fd957610fd9611072565b5060051b60200190565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561103c577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea164736f6c6343000806000a", } var VRFMaliciousConsumerV2PlusABI = VRFMaliciousConsumerV2PlusMetaData.ABI @@ -365,6 +365,123 @@ func (_VRFMaliciousConsumerV2Plus *VRFMaliciousConsumerV2PlusTransactorSession) return _VRFMaliciousConsumerV2Plus.Contract.UpdateSubscription(&_VRFMaliciousConsumerV2Plus.TransactOpts, consumers) } +type VRFMaliciousConsumerV2PlusCoordinatorSetIterator struct { + Event *VRFMaliciousConsumerV2PlusCoordinatorSet + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *VRFMaliciousConsumerV2PlusCoordinatorSetIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(VRFMaliciousConsumerV2PlusCoordinatorSet) + 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(VRFMaliciousConsumerV2PlusCoordinatorSet) + 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 *VRFMaliciousConsumerV2PlusCoordinatorSetIterator) Error() error { + return it.fail +} + +func (it *VRFMaliciousConsumerV2PlusCoordinatorSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type VRFMaliciousConsumerV2PlusCoordinatorSet struct { + VrfCoordinator common.Address + Raw types.Log +} + +func (_VRFMaliciousConsumerV2Plus *VRFMaliciousConsumerV2PlusFilterer) FilterCoordinatorSet(opts *bind.FilterOpts) (*VRFMaliciousConsumerV2PlusCoordinatorSetIterator, error) { + + logs, sub, err := _VRFMaliciousConsumerV2Plus.contract.FilterLogs(opts, "CoordinatorSet") + if err != nil { + return nil, err + } + return &VRFMaliciousConsumerV2PlusCoordinatorSetIterator{contract: _VRFMaliciousConsumerV2Plus.contract, event: "CoordinatorSet", logs: logs, sub: sub}, nil +} + +func (_VRFMaliciousConsumerV2Plus *VRFMaliciousConsumerV2PlusFilterer) WatchCoordinatorSet(opts *bind.WatchOpts, sink chan<- *VRFMaliciousConsumerV2PlusCoordinatorSet) (event.Subscription, error) { + + logs, sub, err := _VRFMaliciousConsumerV2Plus.contract.WatchLogs(opts, "CoordinatorSet") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(VRFMaliciousConsumerV2PlusCoordinatorSet) + if err := _VRFMaliciousConsumerV2Plus.contract.UnpackLog(event, "CoordinatorSet", 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 (_VRFMaliciousConsumerV2Plus *VRFMaliciousConsumerV2PlusFilterer) ParseCoordinatorSet(log types.Log) (*VRFMaliciousConsumerV2PlusCoordinatorSet, error) { + event := new(VRFMaliciousConsumerV2PlusCoordinatorSet) + if err := _VRFMaliciousConsumerV2Plus.contract.UnpackLog(event, "CoordinatorSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + type VRFMaliciousConsumerV2PlusOwnershipTransferRequestedIterator struct { Event *VRFMaliciousConsumerV2PlusOwnershipTransferRequested @@ -639,6 +756,8 @@ func (_VRFMaliciousConsumerV2Plus *VRFMaliciousConsumerV2PlusFilterer) ParseOwne func (_VRFMaliciousConsumerV2Plus *VRFMaliciousConsumerV2Plus) ParseLog(log types.Log) (generated.AbigenLog, error) { switch log.Topics[0] { + case _VRFMaliciousConsumerV2Plus.abi.Events["CoordinatorSet"].ID: + return _VRFMaliciousConsumerV2Plus.ParseCoordinatorSet(log) case _VRFMaliciousConsumerV2Plus.abi.Events["OwnershipTransferRequested"].ID: return _VRFMaliciousConsumerV2Plus.ParseOwnershipTransferRequested(log) case _VRFMaliciousConsumerV2Plus.abi.Events["OwnershipTransferred"].ID: @@ -649,6 +768,10 @@ func (_VRFMaliciousConsumerV2Plus *VRFMaliciousConsumerV2Plus) ParseLog(log type } } +func (VRFMaliciousConsumerV2PlusCoordinatorSet) Topic() common.Hash { + return common.HexToHash("0xd1a6a14209a385a964d036e404cb5cfb71f4000cdb03c9366292430787261be6") +} + func (VRFMaliciousConsumerV2PlusOwnershipTransferRequested) Topic() common.Hash { return common.HexToHash("0xed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae1278") } @@ -686,6 +809,12 @@ type VRFMaliciousConsumerV2PlusInterface interface { UpdateSubscription(opts *bind.TransactOpts, consumers []common.Address) (*types.Transaction, error) + FilterCoordinatorSet(opts *bind.FilterOpts) (*VRFMaliciousConsumerV2PlusCoordinatorSetIterator, error) + + WatchCoordinatorSet(opts *bind.WatchOpts, sink chan<- *VRFMaliciousConsumerV2PlusCoordinatorSet) (event.Subscription, error) + + ParseCoordinatorSet(log types.Log) (*VRFMaliciousConsumerV2PlusCoordinatorSet, error) + FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*VRFMaliciousConsumerV2PlusOwnershipTransferRequestedIterator, error) WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *VRFMaliciousConsumerV2PlusOwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) diff --git a/core/gethwrappers/generated/vrf_v2plus_load_test_with_metrics/vrf_v2plus_load_test_with_metrics.go b/core/gethwrappers/generated/vrf_v2plus_load_test_with_metrics/vrf_v2plus_load_test_with_metrics.go index 8de1b8c35cd..df19a3a09e5 100644 --- a/core/gethwrappers/generated/vrf_v2plus_load_test_with_metrics/vrf_v2plus_load_test_with_metrics.go +++ b/core/gethwrappers/generated/vrf_v2plus_load_test_with_metrics/vrf_v2plus_load_test_with_metrics.go @@ -31,8 +31,8 @@ var ( ) var VRFV2PlusLoadTestWithMetricsMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_vrfCoordinator\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"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\":\"ZeroAddress\",\"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\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_requestId\",\"type\":\"uint256\"}],\"name\":\"getRequestStatus\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"fulfilled\",\"type\":\"bool\"},{\"internalType\":\"uint256[]\",\"name\":\"randomWords\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"requestTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fulfilmentTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"requestBlockNumber\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fulfilmentBlockNumber\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"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\":\"_subId\",\"type\":\"uint256\"},{\"internalType\":\"uint16\",\"name\":\"_requestConfirmations\",\"type\":\"uint16\"},{\"internalType\":\"bytes32\",\"name\":\"_keyHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"_callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"_nativePayment\",\"type\":\"bool\"},{\"internalType\":\"uint32\",\"name\":\"_numWords\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"_requestCount\",\"type\":\"uint16\"}],\"name\":\"requestRandomWords\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"reset\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_averageResponseTimeInBlocksMillions\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_averageResponseTimeInSecondsMillions\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_fastestResponseTimeInBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_fastestResponseTimeInSeconds\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_lastRequestId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_requestCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"s_requests\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"fulfilled\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"requestTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fulfilmentTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"requestBlockNumber\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fulfilmentBlockNumber\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_responseCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_slowestResponseTimeInBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_slowestResponseTimeInSeconds\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_vrfCoordinator\",\"outputs\":[{\"internalType\":\"contractIVRFCoordinatorV2Plus\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_vrfCoordinator\",\"type\":\"address\"}],\"name\":\"setCoordinator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x6080604052600060055560006006556103e760075560006008556103e76009556000600a5534801561003057600080fd5b506040516200144f3803806200144f833981016040819052610051916101ad565b8033806000816100a85760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b03848116919091179091558116156100d8576100d881610103565b5050600280546001600160a01b0319166001600160a01b039390931692909217909155506101dd9050565b6001600160a01b03811633141561015c5760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640161009f565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6000602082840312156101bf57600080fd5b81516001600160a01b03811681146101d657600080fd5b9392505050565b61126280620001ed6000396000f3fe608060405234801561001057600080fd5b50600436106101515760003560e01c80638ea98117116100cd578063b1e2174911610081578063d8a4676f11610066578063d8a4676f146102ec578063dc1670db14610311578063f2fde38b1461031a57600080fd5b8063b1e21749146102b5578063d826f88f146102be57600080fd5b8063a168fa89116100b2578063a168fa8914610238578063a4c52cf5146102a3578063ad00fe61146102ac57600080fd5b80638ea98117146102055780639eccacf61461021857600080fd5b8063557d2e921161012457806379ba50971161010957806379ba5097146101b557806381a4342c146101bd5780638da5cb5b146101c657600080fd5b8063557d2e92146101995780636846de20146101a257600080fd5b806301e5f828146101565780631742748e146101725780631fe543e31461017b57806339aea80a14610190575b600080fd5b61015f60065481565b6040519081526020015b60405180910390f35b61015f600a5481565b61018e610189366004610e5b565b61032d565b005b61015f60075481565b61015f60045481565b61018e6101b0366004610f4a565b6103b3565b61018e6105d3565b61015f60055481565b60005473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610169565b61018e610213366004610dec565b6106d0565b6002546101e09073ffffffffffffffffffffffffffffffffffffffff1681565b610279610246366004610e29565b600c602052600090815260409020805460028201546003830154600484015460059094015460ff90931693919290919085565b6040805195151586526020860194909452928401919091526060830152608082015260a001610169565b61015f60095481565b61015f60085481565b61015f600b5481565b61018e6000600581905560068190556103e76007819055600a82905560088290556009556004819055600355565b6102ff6102fa366004610e29565b6107db565b60405161016996959493929190610fc9565b61015f60035481565b61018e610328366004610dec565b6108c0565b60025473ffffffffffffffffffffffffffffffffffffffff1633146103a5576002546040517f1cf993f400000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff90911660248201526044015b60405180910390fd5b6103af82826108d4565b5050565b6103bb6109ed565b60005b8161ffff168161ffff1610156105c95760006040518060c001604052808881526020018a81526020018961ffff1681526020018763ffffffff1681526020018563ffffffff1681526020016104226040518060200160405280891515815250610a70565b90526002546040517f9b1c385e00000000000000000000000000000000000000000000000000000000815291925060009173ffffffffffffffffffffffffffffffffffffffff90911690639b1c385e90610480908590600401611035565b602060405180830381600087803b15801561049a57600080fd5b505af11580156104ae573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104d29190610e42565b600b819055905060006104e3610b2c565b6040805160c08101825260008082528251818152602080820185528084019182524284860152606084018390526080840186905260a08401839052878352600c815293909120825181547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169015151781559051805194955091939092610571926001850192910190610d61565b506040820151600282015560608201516003820155608082015160048083019190915560a09092015160059091015580549060006105ae836111be565b919050555050505080806105c19061119c565b9150506103be565b5050505050505050565b60015473ffffffffffffffffffffffffffffffffffffffff163314610654576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e657200000000000000000000604482015260640161039c565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b60005473ffffffffffffffffffffffffffffffffffffffff163314801590610710575060025473ffffffffffffffffffffffffffffffffffffffff163314155b15610794573361073560005473ffffffffffffffffffffffffffffffffffffffff1690565b6002546040517f061db9c100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9384166004820152918316602483015291909116604482015260640161039c565b600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b6000818152600c60209081526040808320815160c081018352815460ff161515815260018201805484518187028101870190955280855260609587958695869586958695919492938584019390929083018282801561085957602002820191906000526020600020905b815481526020019060010190808311610845575b505050505081526020016002820154815260200160038201548152602001600482015481526020016005820154815250509050806000015181602001518260400151836060015184608001518560a001519650965096509650965096505091939550919395565b6108c86109ed565b6108d181610bc9565b50565b6000828152600c6020908152604090912080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600190811782558351610923939290910191840190610d61565b506000828152600c6020526040902042600390910155610941610b2c565b6000838152600c60205260408120600581018390556004015490916109669190611185565b6000848152600c602052604081206002810154600390910154929350909161098e9190611185565b90506109a582600754600654600554600354610cbf565b600555600755600655600954600854600a546003546109c993859390929091610cbf565b600a55600955600855600380549060006109e2836111be565b919050555050505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610a6e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e657200000000000000000000604482015260640161039c565b565b60607f92fd13387c7fe7befbc38d303d6468778fb9731bc4583f17d92989c6fcfdeaaa82604051602401610aa991511515815260200190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915292915050565b600046610b3881610d3a565b15610bc257606473ffffffffffffffffffffffffffffffffffffffff1663a3b1b31d6040518163ffffffff1660e01b815260040160206040518083038186803b158015610b8457600080fd5b505afa158015610b98573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bbc9190610e42565b91505090565b4391505090565b73ffffffffffffffffffffffffffffffffffffffff8116331415610c49576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640161039c565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6000808080610cd189620f4240611148565b905086891115610cdf578896505b878910610cec5787610cee565b885b97506000808611610cff5781610d29565b610d0a8660016110f5565b82610d15888a611148565b610d1f91906110f5565b610d29919061110d565b979a98995096979650505050505050565b600061a4b1821480610d4e575062066eed82145b80610d5b575062066eee82145b92915050565b828054828255906000526020600020908101928215610d9c579160200282015b82811115610d9c578251825591602001919060010190610d81565b50610da8929150610dac565b5090565b5b80821115610da85760008155600101610dad565b803561ffff81168114610dd357600080fd5b919050565b803563ffffffff81168114610dd357600080fd5b600060208284031215610dfe57600080fd5b813573ffffffffffffffffffffffffffffffffffffffff81168114610e2257600080fd5b9392505050565b600060208284031215610e3b57600080fd5b5035919050565b600060208284031215610e5457600080fd5b5051919050565b60008060408385031215610e6e57600080fd5b8235915060208084013567ffffffffffffffff80821115610e8e57600080fd5b818601915086601f830112610ea257600080fd5b813581811115610eb457610eb4611226565b8060051b6040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f83011681018181108582111715610ef757610ef7611226565b604052828152858101935084860182860187018b1015610f1657600080fd5b600095505b83861015610f39578035855260019590950194938601938601610f1b565b508096505050505050509250929050565b600080600080600080600060e0888a031215610f6557600080fd5b87359650610f7560208901610dc1565b955060408801359450610f8a60608901610dd8565b935060808801358015158114610f9f57600080fd5b9250610fad60a08901610dd8565b9150610fbb60c08901610dc1565b905092959891949750929550565b600060c082018815158352602060c08185015281895180845260e086019150828b01935060005b8181101561100c57845183529383019391830191600101610ff0565b505060408501989098525050506060810193909352608083019190915260a09091015292915050565b6000602080835283518184015280840151604084015261ffff6040850151166060840152606084015163ffffffff80821660808601528060808701511660a0860152505060a084015160c08085015280518060e086015260005b818110156110ac578281018401518682016101000152830161108f565b818111156110bf57600061010083880101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169390930161010001949350505050565b60008219821115611108576111086111f7565b500190565b600082611143577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615611180576111806111f7565b500290565b600082821015611197576111976111f7565b500390565b600061ffff808316818114156111b4576111b46111f7565b6001019392505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156111f0576111f06111f7565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea164736f6c6343000806000a", + ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_vrfCoordinator\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"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\":\"ZeroAddress\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"vrfCoordinator\",\"type\":\"address\"}],\"name\":\"CoordinatorSet\",\"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\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"offset\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"name\":\"getRequestBlockTimes\",\"outputs\":[{\"internalType\":\"uint32[]\",\"name\":\"\",\"type\":\"uint32[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_requestId\",\"type\":\"uint256\"}],\"name\":\"getRequestStatus\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"fulfilled\",\"type\":\"bool\"},{\"internalType\":\"uint256[]\",\"name\":\"randomWords\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"requestTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fulfilmentTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"requestBlockNumber\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fulfilmentBlockNumber\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"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\":\"_subId\",\"type\":\"uint256\"},{\"internalType\":\"uint16\",\"name\":\"_requestConfirmations\",\"type\":\"uint16\"},{\"internalType\":\"bytes32\",\"name\":\"_keyHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"_callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"_nativePayment\",\"type\":\"bool\"},{\"internalType\":\"uint32\",\"name\":\"_numWords\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"_requestCount\",\"type\":\"uint16\"}],\"name\":\"requestRandomWords\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"reset\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_averageResponseTimeInBlocksMillions\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_averageResponseTimeInSecondsMillions\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_fastestResponseTimeInBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_fastestResponseTimeInSeconds\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_lastRequestId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"s_requestBlockTimes\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_requestCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"s_requests\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"fulfilled\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"requestTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fulfilmentTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"requestBlockNumber\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fulfilmentBlockNumber\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_responseCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_slowestResponseTimeInBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_slowestResponseTimeInSeconds\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_vrfCoordinator\",\"outputs\":[{\"internalType\":\"contractIVRFCoordinatorV2Plus\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_vrfCoordinator\",\"type\":\"address\"}],\"name\":\"setCoordinator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Bin: "0x6080604052600060055560006006556103e760075560006008556103e76009556000600a553480156200003157600080fd5b50604051620017cf380380620017cf8339810160408190526200005491620001dd565b803380600081620000ac5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000df57620000df8162000131565b5050506001600160a01b0381166200010a5760405163d92e233d60e01b815260040160405180910390fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055506200020f565b6001600160a01b0381163314156200018c5760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401620000a3565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b600060208284031215620001f057600080fd5b81516001600160a01b03811681146200020857600080fd5b9392505050565b6115b0806200021f6000396000f3fe608060405234801561001057600080fd5b50600436106101775760003560e01c80638ea98117116100d8578063ad00fe611161008c578063d8a4676f11610066578063d8a4676f14610334578063dc1670db14610359578063f2fde38b1461036257600080fd5b8063ad00fe611461031a578063b1e2174914610323578063d826f88f1461032c57600080fd5b80639eccacf6116100bd5780639eccacf614610286578063a168fa89146102a6578063a4c52cf51461031157600080fd5b80638ea981171461024b578063958cccb71461025e57600080fd5b8063557d2e921161012f57806379ba50971161011457806379ba5097146101fb57806381a4342c146102035780638da5cb5b1461020c57600080fd5b8063557d2e92146101df5780636846de20146101e857600080fd5b80631742748e116101605780631742748e146101b85780631fe543e3146101c157806339aea80a146101d657600080fd5b806301e5f8281461017c5780630b26348614610198575b600080fd5b61018560065481565b6040519081526020015b60405180910390f35b6101ab6101a636600461127c565b610375565b60405161018f919061129e565b610185600a5481565b6101d46101cf36600461110e565b610471565b005b61018560075481565b61018560045481565b6101d46101f63660046111fd565b6104f7565b6101d4610717565b61018560055481565b60005473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161018f565b6101d461025936600461109f565b610814565b61027161026c3660046110dc565b61099e565b60405163ffffffff909116815260200161018f565b6002546102269073ffffffffffffffffffffffffffffffffffffffff1681565b6102e76102b43660046110dc565b600d602052600090815260409020805460028201546003830154600484015460059094015460ff90931693919290919085565b6040805195151586526020860194909452928401919091526060830152608082015260a00161018f565b61018560095481565b61018560085481565b610185600b5481565b6101d46109d8565b6103476103423660046110dc565b610a11565b60405161018f969594939291906112e8565b61018560035481565b6101d461037036600461109f565b610af6565b606060006103838385611414565b600c549091508111156103955750600c545b60006103a185836114a4565b67ffffffffffffffff8111156103b9576103b9611574565b6040519080825280602002602001820160405280156103e2578160200160208202803683370190505b509050845b8281101561046857600c818154811061040257610402611545565b6000918252602090912060088204015460079091166004026101000a900463ffffffff168261043188846114a4565b8151811061044157610441611545565b63ffffffff9092166020928302919091019091015280610460816114dd565b9150506103e7565b50949350505050565b60025473ffffffffffffffffffffffffffffffffffffffff1633146104e9576002546040517f1cf993f400000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff90911660248201526044015b60405180910390fd5b6104f38282610b0a565b5050565b6104ff610c81565b60005b8161ffff168161ffff16101561070d5760006040518060c001604052808881526020018a81526020018961ffff1681526020018763ffffffff1681526020018563ffffffff1681526020016105666040518060200160405280891515815250610d02565b90526002546040517f9b1c385e00000000000000000000000000000000000000000000000000000000815291925060009173ffffffffffffffffffffffffffffffffffffffff90911690639b1c385e906105c4908590600401611354565b602060405180830381600087803b1580156105de57600080fd5b505af11580156105f2573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061061691906110f5565b600b81905590506000610627610dbe565b6040805160c08101825260008082528251818152602080820185528084019182524284860152606084018390526080840186905260a08401839052878352600d815293909120825181547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690151517815590518051949550919390926106b5926001850192910190610ff3565b506040820151600282015560608201516003820155608082015160048083019190915560a09092015160059091015580549060006106f2836114dd565b91905055505050508080610705906114bb565b915050610502565b5050505050505050565b60015473ffffffffffffffffffffffffffffffffffffffff163314610798576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e65720000000000000000000060448201526064016104e0565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b60005473ffffffffffffffffffffffffffffffffffffffff163314801590610854575060025473ffffffffffffffffffffffffffffffffffffffff163314155b156108d8573361087960005473ffffffffffffffffffffffffffffffffffffffff1690565b6002546040517f061db9c100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff938416600482015291831660248301529190911660448201526064016104e0565b73ffffffffffffffffffffffffffffffffffffffff8116610925576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527fd1a6a14209a385a964d036e404cb5cfb71f4000cdb03c9366292430787261be69060200160405180910390a150565b600c81815481106109ae57600080fd5b9060005260206000209060089182820401919006600402915054906101000a900463ffffffff1681565b6000600581905560068190556103e76007819055600a829055600882905560095560048190556003819055610a0f90600c9061103e565b565b6000818152600d60209081526040808320815160c081018352815460ff1615158152600182018054845181870281018701909552808552606095879586958695869586959194929385840193909290830182828015610a8f57602002820191906000526020600020905b815481526020019060010190808311610a7b575b505050505081526020016002820154815260200160038201548152602001600482015481526020016005820154815250509050806000015181602001518260400151836060015184608001518560a001519650965096509650965096505091939550919395565b610afe610c81565b610b0781610e5b565b50565b6000828152600d6020908152604090912080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600190811782558351610b59939290910191840190610ff3565b506000828152600d6020526040902042600390910155610b77610dbe565b6000838152600d6020526040812060058101839055600401549091610b9c91906114a4565b6000848152600d6020526040812060028101546003909101549293509091610bc491906114a4565b9050610bdb82600754600654600554600354610f51565b600555600755600655600954600854600a54600354610bff93859390929091610f51565b600a5560095560085560038054906000610c18836114dd565b9091555050600c80546001810182556000919091527fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c76008820401805460079092166004026101000a63ffffffff81810219909316949092169190910292909217909155505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610a0f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e65720000000000000000000060448201526064016104e0565b60607f92fd13387c7fe7befbc38d303d6468778fb9731bc4583f17d92989c6fcfdeaaa82604051602401610d3b91511515815260200190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915292915050565b600046610dca81610fcc565b15610e5457606473ffffffffffffffffffffffffffffffffffffffff1663a3b1b31d6040518163ffffffff1660e01b815260040160206040518083038186803b158015610e1657600080fd5b505afa158015610e2a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e4e91906110f5565b91505090565b4391505090565b73ffffffffffffffffffffffffffffffffffffffff8116331415610edb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c6600000000000000000060448201526064016104e0565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6000808080610f6389620f4240611467565b905086891115610f71578896505b878910610f7e5787610f80565b885b97506000808611610f915781610fbb565b610f9c866001611414565b82610fa7888a611467565b610fb19190611414565b610fbb919061142c565b979a98995096979650505050505050565b600061a4b1821480610fe0575062066eed82145b80610fed575062066eee82145b92915050565b82805482825590600052602060002090810192821561102e579160200282015b8281111561102e578251825591602001919060010190611013565b5061103a92915061105f565b5090565b508054600082556007016008900490600052602060002090810190610b0791905b5b8082111561103a5760008155600101611060565b803561ffff8116811461108657600080fd5b919050565b803563ffffffff8116811461108657600080fd5b6000602082840312156110b157600080fd5b813573ffffffffffffffffffffffffffffffffffffffff811681146110d557600080fd5b9392505050565b6000602082840312156110ee57600080fd5b5035919050565b60006020828403121561110757600080fd5b5051919050565b6000806040838503121561112157600080fd5b8235915060208084013567ffffffffffffffff8082111561114157600080fd5b818601915086601f83011261115557600080fd5b81358181111561116757611167611574565b8060051b6040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f830116810181811085821117156111aa576111aa611574565b604052828152858101935084860182860187018b10156111c957600080fd5b600095505b838610156111ec5780358552600195909501949386019386016111ce565b508096505050505050509250929050565b600080600080600080600060e0888a03121561121857600080fd5b8735965061122860208901611074565b95506040880135945061123d6060890161108b565b93506080880135801515811461125257600080fd5b925061126060a0890161108b565b915061126e60c08901611074565b905092959891949750929550565b6000806040838503121561128f57600080fd5b50508035926020909101359150565b6020808252825182820181905260009190848201906040850190845b818110156112dc57835163ffffffff16835292840192918401916001016112ba565b50909695505050505050565b600060c082018815158352602060c08185015281895180845260e086019150828b01935060005b8181101561132b5784518352938301939183019160010161130f565b505060408501989098525050506060810193909352608083019190915260a09091015292915050565b6000602080835283518184015280840151604084015261ffff6040850151166060840152606084015163ffffffff80821660808601528060808701511660a0860152505060a084015160c08085015280518060e086015260005b818110156113cb57828101840151868201610100015283016113ae565b818111156113de57600061010083880101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169390930161010001949350505050565b6000821982111561142757611427611516565b500190565b600082611462577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561149f5761149f611516565b500290565b6000828210156114b6576114b6611516565b500390565b600061ffff808316818114156114d3576114d3611516565b6001019392505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561150f5761150f611516565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea164736f6c6343000806000a", } var VRFV2PlusLoadTestWithMetricsABI = VRFV2PlusLoadTestWithMetricsMetaData.ABI @@ -171,6 +171,28 @@ func (_VRFV2PlusLoadTestWithMetrics *VRFV2PlusLoadTestWithMetricsTransactorRaw) return _VRFV2PlusLoadTestWithMetrics.Contract.contract.Transact(opts, method, params...) } +func (_VRFV2PlusLoadTestWithMetrics *VRFV2PlusLoadTestWithMetricsCaller) GetRequestBlockTimes(opts *bind.CallOpts, offset *big.Int, quantity *big.Int) ([]uint32, error) { + var out []interface{} + err := _VRFV2PlusLoadTestWithMetrics.contract.Call(opts, &out, "getRequestBlockTimes", offset, quantity) + + if err != nil { + return *new([]uint32), err + } + + out0 := *abi.ConvertType(out[0], new([]uint32)).(*[]uint32) + + return out0, err + +} + +func (_VRFV2PlusLoadTestWithMetrics *VRFV2PlusLoadTestWithMetricsSession) GetRequestBlockTimes(offset *big.Int, quantity *big.Int) ([]uint32, error) { + return _VRFV2PlusLoadTestWithMetrics.Contract.GetRequestBlockTimes(&_VRFV2PlusLoadTestWithMetrics.CallOpts, offset, quantity) +} + +func (_VRFV2PlusLoadTestWithMetrics *VRFV2PlusLoadTestWithMetricsCallerSession) GetRequestBlockTimes(offset *big.Int, quantity *big.Int) ([]uint32, error) { + return _VRFV2PlusLoadTestWithMetrics.Contract.GetRequestBlockTimes(&_VRFV2PlusLoadTestWithMetrics.CallOpts, offset, quantity) +} + func (_VRFV2PlusLoadTestWithMetrics *VRFV2PlusLoadTestWithMetricsCaller) GetRequestStatus(opts *bind.CallOpts, _requestId *big.Int) (GetRequestStatus, error) { @@ -337,6 +359,28 @@ func (_VRFV2PlusLoadTestWithMetrics *VRFV2PlusLoadTestWithMetricsCallerSession) return _VRFV2PlusLoadTestWithMetrics.Contract.SLastRequestId(&_VRFV2PlusLoadTestWithMetrics.CallOpts) } +func (_VRFV2PlusLoadTestWithMetrics *VRFV2PlusLoadTestWithMetricsCaller) SRequestBlockTimes(opts *bind.CallOpts, arg0 *big.Int) (uint32, error) { + var out []interface{} + err := _VRFV2PlusLoadTestWithMetrics.contract.Call(opts, &out, "s_requestBlockTimes", arg0) + + if err != nil { + return *new(uint32), err + } + + out0 := *abi.ConvertType(out[0], new(uint32)).(*uint32) + + return out0, err + +} + +func (_VRFV2PlusLoadTestWithMetrics *VRFV2PlusLoadTestWithMetricsSession) SRequestBlockTimes(arg0 *big.Int) (uint32, error) { + return _VRFV2PlusLoadTestWithMetrics.Contract.SRequestBlockTimes(&_VRFV2PlusLoadTestWithMetrics.CallOpts, arg0) +} + +func (_VRFV2PlusLoadTestWithMetrics *VRFV2PlusLoadTestWithMetricsCallerSession) SRequestBlockTimes(arg0 *big.Int) (uint32, error) { + return _VRFV2PlusLoadTestWithMetrics.Contract.SRequestBlockTimes(&_VRFV2PlusLoadTestWithMetrics.CallOpts, arg0) +} + func (_VRFV2PlusLoadTestWithMetrics *VRFV2PlusLoadTestWithMetricsCaller) SRequestCount(opts *bind.CallOpts) (*big.Int, error) { var out []interface{} err := _VRFV2PlusLoadTestWithMetrics.contract.Call(opts, &out, "s_requestCount") @@ -552,6 +596,123 @@ func (_VRFV2PlusLoadTestWithMetrics *VRFV2PlusLoadTestWithMetricsTransactorSessi return _VRFV2PlusLoadTestWithMetrics.Contract.TransferOwnership(&_VRFV2PlusLoadTestWithMetrics.TransactOpts, to) } +type VRFV2PlusLoadTestWithMetricsCoordinatorSetIterator struct { + Event *VRFV2PlusLoadTestWithMetricsCoordinatorSet + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *VRFV2PlusLoadTestWithMetricsCoordinatorSetIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(VRFV2PlusLoadTestWithMetricsCoordinatorSet) + 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(VRFV2PlusLoadTestWithMetricsCoordinatorSet) + 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 *VRFV2PlusLoadTestWithMetricsCoordinatorSetIterator) Error() error { + return it.fail +} + +func (it *VRFV2PlusLoadTestWithMetricsCoordinatorSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type VRFV2PlusLoadTestWithMetricsCoordinatorSet struct { + VrfCoordinator common.Address + Raw types.Log +} + +func (_VRFV2PlusLoadTestWithMetrics *VRFV2PlusLoadTestWithMetricsFilterer) FilterCoordinatorSet(opts *bind.FilterOpts) (*VRFV2PlusLoadTestWithMetricsCoordinatorSetIterator, error) { + + logs, sub, err := _VRFV2PlusLoadTestWithMetrics.contract.FilterLogs(opts, "CoordinatorSet") + if err != nil { + return nil, err + } + return &VRFV2PlusLoadTestWithMetricsCoordinatorSetIterator{contract: _VRFV2PlusLoadTestWithMetrics.contract, event: "CoordinatorSet", logs: logs, sub: sub}, nil +} + +func (_VRFV2PlusLoadTestWithMetrics *VRFV2PlusLoadTestWithMetricsFilterer) WatchCoordinatorSet(opts *bind.WatchOpts, sink chan<- *VRFV2PlusLoadTestWithMetricsCoordinatorSet) (event.Subscription, error) { + + logs, sub, err := _VRFV2PlusLoadTestWithMetrics.contract.WatchLogs(opts, "CoordinatorSet") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(VRFV2PlusLoadTestWithMetricsCoordinatorSet) + if err := _VRFV2PlusLoadTestWithMetrics.contract.UnpackLog(event, "CoordinatorSet", 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 (_VRFV2PlusLoadTestWithMetrics *VRFV2PlusLoadTestWithMetricsFilterer) ParseCoordinatorSet(log types.Log) (*VRFV2PlusLoadTestWithMetricsCoordinatorSet, error) { + event := new(VRFV2PlusLoadTestWithMetricsCoordinatorSet) + if err := _VRFV2PlusLoadTestWithMetrics.contract.UnpackLog(event, "CoordinatorSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + type VRFV2PlusLoadTestWithMetricsOwnershipTransferRequestedIterator struct { Event *VRFV2PlusLoadTestWithMetricsOwnershipTransferRequested @@ -842,6 +1003,8 @@ type SRequests struct { func (_VRFV2PlusLoadTestWithMetrics *VRFV2PlusLoadTestWithMetrics) ParseLog(log types.Log) (generated.AbigenLog, error) { switch log.Topics[0] { + case _VRFV2PlusLoadTestWithMetrics.abi.Events["CoordinatorSet"].ID: + return _VRFV2PlusLoadTestWithMetrics.ParseCoordinatorSet(log) case _VRFV2PlusLoadTestWithMetrics.abi.Events["OwnershipTransferRequested"].ID: return _VRFV2PlusLoadTestWithMetrics.ParseOwnershipTransferRequested(log) case _VRFV2PlusLoadTestWithMetrics.abi.Events["OwnershipTransferred"].ID: @@ -852,6 +1015,10 @@ func (_VRFV2PlusLoadTestWithMetrics *VRFV2PlusLoadTestWithMetrics) ParseLog(log } } +func (VRFV2PlusLoadTestWithMetricsCoordinatorSet) Topic() common.Hash { + return common.HexToHash("0xd1a6a14209a385a964d036e404cb5cfb71f4000cdb03c9366292430787261be6") +} + func (VRFV2PlusLoadTestWithMetricsOwnershipTransferRequested) Topic() common.Hash { return common.HexToHash("0xed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae1278") } @@ -865,6 +1032,8 @@ func (_VRFV2PlusLoadTestWithMetrics *VRFV2PlusLoadTestWithMetrics) Address() com } type VRFV2PlusLoadTestWithMetricsInterface interface { + GetRequestBlockTimes(opts *bind.CallOpts, offset *big.Int, quantity *big.Int) ([]uint32, error) + GetRequestStatus(opts *bind.CallOpts, _requestId *big.Int) (GetRequestStatus, error) @@ -881,6 +1050,8 @@ type VRFV2PlusLoadTestWithMetricsInterface interface { SLastRequestId(opts *bind.CallOpts) (*big.Int, error) + SRequestBlockTimes(opts *bind.CallOpts, arg0 *big.Int) (uint32, error) + SRequestCount(opts *bind.CallOpts) (*big.Int, error) SRequests(opts *bind.CallOpts, arg0 *big.Int) (SRequests, @@ -907,6 +1078,12 @@ type VRFV2PlusLoadTestWithMetricsInterface interface { TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) + FilterCoordinatorSet(opts *bind.FilterOpts) (*VRFV2PlusLoadTestWithMetricsCoordinatorSetIterator, error) + + WatchCoordinatorSet(opts *bind.WatchOpts, sink chan<- *VRFV2PlusLoadTestWithMetricsCoordinatorSet) (event.Subscription, error) + + ParseCoordinatorSet(log types.Log) (*VRFV2PlusLoadTestWithMetricsCoordinatorSet, error) + FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*VRFV2PlusLoadTestWithMetricsOwnershipTransferRequestedIterator, error) WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *VRFV2PlusLoadTestWithMetricsOwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) diff --git a/core/gethwrappers/generated/vrf_v2plus_single_consumer/vrf_v2plus_single_consumer.go b/core/gethwrappers/generated/vrf_v2plus_single_consumer/vrf_v2plus_single_consumer.go index b9de348b103..8ddb9c2c131 100644 --- a/core/gethwrappers/generated/vrf_v2plus_single_consumer/vrf_v2plus_single_consumer.go +++ b/core/gethwrappers/generated/vrf_v2plus_single_consumer/vrf_v2plus_single_consumer.go @@ -31,8 +31,8 @@ var ( ) var VRFV2PlusSingleConsumerExampleMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"vrfCoordinator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"link\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"requestConfirmations\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"numWords\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"keyHash\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"nativePayment\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"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\":\"ZeroAddress\",\"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\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"fundAndRequestRandomWords\",\"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\":[],\"name\":\"requestRandomWords\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"s_randomWords\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_requestConfig\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"requestConfirmations\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"numWords\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"keyHash\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"nativePayment\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_requestId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_vrfCoordinator\",\"outputs\":[{\"internalType\":\"contractIVRFCoordinatorV2Plus\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_vrfCoordinator\",\"type\":\"address\"}],\"name\":\"setCoordinator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"subscribe\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"topUpSubscription\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"unsubscribe\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x60806040523480156200001157600080fd5b506040516200185238038062001852833981016040819052620000349162000458565b8633806000816200008c5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000bf57620000bf81620001a8565b5050600280546001600160a01b03199081166001600160a01b0394851617909155600380548216938a169390931790925550600a80543392169190911790556040805160c081018252600080825263ffffffff8881166020840181905261ffff8916948401859052908716606084018190526080840187905285151560a09094018490526004929092556005805465ffffffffffff19169091176401000000009094029390931763ffffffff60301b191666010000000000009091021790915560068390556007805460ff191690911790556200019b62000254565b5050505050505062000524565b6001600160a01b038116331415620002035760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000083565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6200025e620003c8565b6040805160018082528183019092526000916020808301908036833701905050905030816000815181106200029757620002976200050e565b6001600160a01b039283166020918202929092018101919091526002546040805163288688f960e21b81529051919093169263a21a23e49260048083019391928290030181600087803b158015620002ee57600080fd5b505af115801562000303573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620003299190620004f4565b600481905560025482516001600160a01b039091169163bec4c08c9184906000906200035957620003596200050e565b60200260200101516040518363ffffffff1660e01b8152600401620003919291909182526001600160a01b0316602082015260400190565b600060405180830381600087803b158015620003ac57600080fd5b505af1158015620003c1573d6000803e3d6000fd5b5050505050565b6000546001600160a01b03163314620004245760405162461bcd60e51b815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e657200000000000000000000604482015260640162000083565b565b80516001600160a01b03811681146200043e57600080fd5b919050565b805163ffffffff811681146200043e57600080fd5b600080600080600080600060e0888a0312156200047457600080fd5b6200047f8862000426565b96506200048f6020890162000426565b95506200049f6040890162000443565b9450606088015161ffff81168114620004b757600080fd5b9350620004c76080890162000443565b925060a0880151915060c08801518015158114620004e457600080fd5b8091505092959891949750929550565b6000602082840312156200050757600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b61131e80620005346000396000f3fe608060405234801561001057600080fd5b50600436106100f45760003560e01c80638da5cb5b11610097578063e0c8628911610066578063e0c862891461025c578063e89e106a14610264578063f2fde38b1461027b578063f6eaffc81461028e57600080fd5b80638da5cb5b146101e25780638ea98117146102215780638f449a05146102345780639eccacf61461023c57600080fd5b80637262561c116100d35780637262561c1461013457806379ba5097146101475780637db9263f1461014f57806386850e93146101cf57600080fd5b8062f714ce146100f95780631fe543e31461010e5780636fd700bb14610121575b600080fd5b61010c61010736600461108a565b6102a1565b005b61010c61011c3660046110b6565b61035a565b61010c61012f366004611058565b6103e0565b61010c610142366004611014565b610616565b61010c6106b3565b60045460055460065460075461018b939263ffffffff8082169361ffff6401000000008404169366010000000000009093049091169160ff1686565b6040805196875263ffffffff958616602088015261ffff90941693860193909352921660608401526080830191909152151560a082015260c0015b60405180910390f35b61010c6101dd366004611058565b6107b0565b60005473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101c6565b61010c61022f366004611014565b610886565b61010c610991565b6002546101fc9073ffffffffffffffffffffffffffffffffffffffff1681565b61010c610b36565b61026d60095481565b6040519081526020016101c6565b61010c610289366004611014565b610ca3565b61026d61029c366004611058565b610cb7565b6102a9610cd8565b6003546040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8381166004830152602482018590529091169063a9059cbb90604401602060405180830381600087803b15801561031d57600080fd5b505af1158015610331573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103559190611036565b505050565b60025473ffffffffffffffffffffffffffffffffffffffff1633146103d2576002546040517f1cf993f400000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff90911660248201526044015b60405180910390fd5b6103dc8282610d5b565b5050565b6103e8610cd8565b6040805160c08101825260045480825260055463ffffffff808216602080860191909152640100000000830461ffff16858701526601000000000000909204166060840152600654608084015260075460ff16151560a0840152600354600254855192830193909352929373ffffffffffffffffffffffffffffffffffffffff93841693634000aea09316918691016040516020818303038152906040526040518463ffffffff1660e01b81526004016104a493929190611210565b602060405180830381600087803b1580156104be57600080fd5b505af11580156104d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104f69190611036565b5060006040518060c001604052808360800151815260200183600001518152602001836040015161ffff168152602001836020015163ffffffff168152602001836060015163ffffffff16815260200161056360405180602001604052808660a001511515815250610dd9565b90526002546040517f9b1c385e00000000000000000000000000000000000000000000000000000000815291925073ffffffffffffffffffffffffffffffffffffffff1690639b1c385e906105bc90849060040161124e565b602060405180830381600087803b1580156105d657600080fd5b505af11580156105ea573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061060e9190611071565b600955505050565b61061e610cd8565b600254600480546040517f0ae095400000000000000000000000000000000000000000000000000000000081529182015273ffffffffffffffffffffffffffffffffffffffff838116602483015290911690630ae0954090604401600060405180830381600087803b15801561069357600080fd5b505af11580156106a7573d6000803e3d6000fd5b50506000600455505050565b60015473ffffffffffffffffffffffffffffffffffffffff163314610734576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e65720000000000000000000060448201526064016103c9565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b6107b8610cd8565b6003546002546004546040805160208082019390935281518082039093018352808201918290527f4000aea00000000000000000000000000000000000000000000000000000000090915273ffffffffffffffffffffffffffffffffffffffff93841693634000aea09361083493911691869190604401611210565b602060405180830381600087803b15801561084e57600080fd5b505af1158015610862573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103dc9190611036565b60005473ffffffffffffffffffffffffffffffffffffffff1633148015906108c6575060025473ffffffffffffffffffffffffffffffffffffffff163314155b1561094a57336108eb60005473ffffffffffffffffffffffffffffffffffffffff1690565b6002546040517f061db9c100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff938416600482015291831660248301529190911660448201526064016103c9565b600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b610999610cd8565b6040805160018082528183019092526000916020808301908036833701905050905030816000815181106109cf576109cf6112b3565b73ffffffffffffffffffffffffffffffffffffffff928316602091820292909201810191909152600254604080517fa21a23e40000000000000000000000000000000000000000000000000000000081529051919093169263a21a23e49260048083019391928290030181600087803b158015610a4b57600080fd5b505af1158015610a5f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a839190611071565b6004819055600254825173ffffffffffffffffffffffffffffffffffffffff9091169163bec4c08c918490600090610abd57610abd6112b3565b60200260200101516040518363ffffffff1660e01b8152600401610b0192919091825273ffffffffffffffffffffffffffffffffffffffff16602082015260400190565b600060405180830381600087803b158015610b1b57600080fd5b505af1158015610b2f573d6000803e3d6000fd5b5050505050565b610b3e610cd8565b6040805160c08082018352600454825260055463ffffffff808216602080860191825261ffff640100000000850481168789019081526601000000000000909504841660608089019182526006546080808b0191825260075460ff16151560a0808d019182528d519b8c018e5292518b528b518b8801529851909416898c0152945186169088015251909316928501929092528551918201909552905115158152919260009290820190610bf190610dd9565b90526002546040517f9b1c385e00000000000000000000000000000000000000000000000000000000815291925073ffffffffffffffffffffffffffffffffffffffff1690639b1c385e90610c4a90849060040161124e565b602060405180830381600087803b158015610c6457600080fd5b505af1158015610c78573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c9c9190611071565b6009555050565b610cab610cd8565b610cb481610e95565b50565b60088181548110610cc757600080fd5b600091825260209091200154905081565b60005473ffffffffffffffffffffffffffffffffffffffff163314610d59576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e65720000000000000000000060448201526064016103c9565b565b6009548214610dc6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f7265717565737420494420697320696e636f727265637400000000000000000060448201526064016103c9565b8051610355906008906020840190610f8b565b60607f92fd13387c7fe7befbc38d303d6468778fb9731bc4583f17d92989c6fcfdeaaa82604051602401610e1291511515815260200190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915292915050565b73ffffffffffffffffffffffffffffffffffffffff8116331415610f15576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c6600000000000000000060448201526064016103c9565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b828054828255906000526020600020908101928215610fc6579160200282015b82811115610fc6578251825591602001919060010190610fab565b50610fd2929150610fd6565b5090565b5b80821115610fd25760008155600101610fd7565b803573ffffffffffffffffffffffffffffffffffffffff8116811461100f57600080fd5b919050565b60006020828403121561102657600080fd5b61102f82610feb565b9392505050565b60006020828403121561104857600080fd5b8151801515811461102f57600080fd5b60006020828403121561106a57600080fd5b5035919050565b60006020828403121561108357600080fd5b5051919050565b6000806040838503121561109d57600080fd5b823591506110ad60208401610feb565b90509250929050565b600080604083850312156110c957600080fd5b8235915060208084013567ffffffffffffffff808211156110e957600080fd5b818601915086601f8301126110fd57600080fd5b81358181111561110f5761110f6112e2565b8060051b6040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f83011681018181108582111715611152576111526112e2565b604052828152858101935084860182860187018b101561117157600080fd5b600095505b83861015611194578035855260019590950194938601938601611176565b508096505050505050509250929050565b6000815180845260005b818110156111cb576020818501810151868301820152016111af565b818111156111dd576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b73ffffffffffffffffffffffffffffffffffffffff8416815282602082015260606040820152600061124560608301846111a5565b95945050505050565b60208152815160208201526020820151604082015261ffff60408301511660608201526000606083015163ffffffff80821660808501528060808601511660a0850152505060a083015160c0808401526112ab60e08401826111a5565b949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea164736f6c6343000806000a", + ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"vrfCoordinator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"link\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"requestConfirmations\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"numWords\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"keyHash\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"nativePayment\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"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\":\"ZeroAddress\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"vrfCoordinator\",\"type\":\"address\"}],\"name\":\"CoordinatorSet\",\"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\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"fundAndRequestRandomWords\",\"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\":[],\"name\":\"requestRandomWords\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"s_randomWords\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_requestConfig\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"requestConfirmations\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"numWords\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"keyHash\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"nativePayment\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_requestId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_vrfCoordinator\",\"outputs\":[{\"internalType\":\"contractIVRFCoordinatorV2Plus\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_vrfCoordinator\",\"type\":\"address\"}],\"name\":\"setCoordinator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"subscribe\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"topUpSubscription\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"unsubscribe\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Bin: "0x60806040523480156200001157600080fd5b50604051620018f9380380620018f9833981016040819052620000349162000480565b8633806000816200008c5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000bf57620000bf81620001d0565b5050506001600160a01b038116620000ea5760405163d92e233d60e01b815260040160405180910390fd5b600280546001600160a01b03199081166001600160a01b039384161790915560038054821692891692909217909155600a80543392169190911790556040805160c081018252600080825263ffffffff8881166020840181905261ffff8916948401859052908716606084018190526080840187905285151560a09094018490526004929092556005805465ffffffffffff19169091176401000000009094029390931763ffffffff60301b191666010000000000009091021790915560068390556007805460ff19169091179055620001c36200027c565b505050505050506200054c565b6001600160a01b0381163314156200022b5760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000083565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b62000286620003f0565b604080516001808252818301909252600091602080830190803683370190505090503081600081518110620002bf57620002bf62000536565b6001600160a01b039283166020918202929092018101919091526002546040805163288688f960e21b81529051919093169263a21a23e49260048083019391928290030181600087803b1580156200031657600080fd5b505af11580156200032b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200035191906200051c565b600481905560025482516001600160a01b039091169163bec4c08c91849060009062000381576200038162000536565b60200260200101516040518363ffffffff1660e01b8152600401620003b99291909182526001600160a01b0316602082015260400190565b600060405180830381600087803b158015620003d457600080fd5b505af1158015620003e9573d6000803e3d6000fd5b5050505050565b6000546001600160a01b031633146200044c5760405162461bcd60e51b815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e657200000000000000000000604482015260640162000083565b565b80516001600160a01b03811681146200046657600080fd5b919050565b805163ffffffff811681146200046657600080fd5b600080600080600080600060e0888a0312156200049c57600080fd5b620004a7886200044e565b9650620004b7602089016200044e565b9550620004c7604089016200046b565b9450606088015161ffff81168114620004df57600080fd5b9350620004ef608089016200046b565b925060a0880151915060c088015180151581146200050c57600080fd5b8091505092959891949750929550565b6000602082840312156200052f57600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b61139d806200055c6000396000f3fe608060405234801561001057600080fd5b50600436106100f45760003560e01c80638da5cb5b11610097578063e0c8628911610066578063e0c862891461025c578063e89e106a14610264578063f2fde38b1461027b578063f6eaffc81461028e57600080fd5b80638da5cb5b146101e25780638ea98117146102215780638f449a05146102345780639eccacf61461023c57600080fd5b80637262561c116100d35780637262561c1461013457806379ba5097146101475780637db9263f1461014f57806386850e93146101cf57600080fd5b8062f714ce146100f95780631fe543e31461010e5780636fd700bb14610121575b600080fd5b61010c610107366004611109565b6102a1565b005b61010c61011c366004611135565b61035a565b61010c61012f3660046110d7565b6103e0565b61010c610142366004611093565b610616565b61010c6106b3565b60045460055460065460075461018b939263ffffffff8082169361ffff6401000000008404169366010000000000009093049091169160ff1686565b6040805196875263ffffffff958616602088015261ffff90941693860193909352921660608401526080830191909152151560a082015260c0015b60405180910390f35b61010c6101dd3660046110d7565b6107b0565b60005473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101c6565b61010c61022f366004611093565b610886565b61010c610a10565b6002546101fc9073ffffffffffffffffffffffffffffffffffffffff1681565b61010c610bb5565b61026d60095481565b6040519081526020016101c6565b61010c610289366004611093565b610d22565b61026d61029c3660046110d7565b610d36565b6102a9610d57565b6003546040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8381166004830152602482018590529091169063a9059cbb90604401602060405180830381600087803b15801561031d57600080fd5b505af1158015610331573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061035591906110b5565b505050565b60025473ffffffffffffffffffffffffffffffffffffffff1633146103d2576002546040517f1cf993f400000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff90911660248201526044015b60405180910390fd5b6103dc8282610dda565b5050565b6103e8610d57565b6040805160c08101825260045480825260055463ffffffff808216602080860191909152640100000000830461ffff16858701526601000000000000909204166060840152600654608084015260075460ff16151560a0840152600354600254855192830193909352929373ffffffffffffffffffffffffffffffffffffffff93841693634000aea09316918691016040516020818303038152906040526040518463ffffffff1660e01b81526004016104a49392919061128f565b602060405180830381600087803b1580156104be57600080fd5b505af11580156104d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104f691906110b5565b5060006040518060c001604052808360800151815260200183600001518152602001836040015161ffff168152602001836020015163ffffffff168152602001836060015163ffffffff16815260200161056360405180602001604052808660a001511515815250610e58565b90526002546040517f9b1c385e00000000000000000000000000000000000000000000000000000000815291925073ffffffffffffffffffffffffffffffffffffffff1690639b1c385e906105bc9084906004016112cd565b602060405180830381600087803b1580156105d657600080fd5b505af11580156105ea573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061060e91906110f0565b600955505050565b61061e610d57565b600254600480546040517f0ae095400000000000000000000000000000000000000000000000000000000081529182015273ffffffffffffffffffffffffffffffffffffffff838116602483015290911690630ae0954090604401600060405180830381600087803b15801561069357600080fd5b505af11580156106a7573d6000803e3d6000fd5b50506000600455505050565b60015473ffffffffffffffffffffffffffffffffffffffff163314610734576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e65720000000000000000000060448201526064016103c9565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b6107b8610d57565b6003546002546004546040805160208082019390935281518082039093018352808201918290527f4000aea00000000000000000000000000000000000000000000000000000000090915273ffffffffffffffffffffffffffffffffffffffff93841693634000aea0936108349391169186919060440161128f565b602060405180830381600087803b15801561084e57600080fd5b505af1158015610862573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103dc91906110b5565b60005473ffffffffffffffffffffffffffffffffffffffff1633148015906108c6575060025473ffffffffffffffffffffffffffffffffffffffff163314155b1561094a57336108eb60005473ffffffffffffffffffffffffffffffffffffffff1690565b6002546040517f061db9c100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff938416600482015291831660248301529190911660448201526064016103c9565b73ffffffffffffffffffffffffffffffffffffffff8116610997576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527fd1a6a14209a385a964d036e404cb5cfb71f4000cdb03c9366292430787261be69060200160405180910390a150565b610a18610d57565b604080516001808252818301909252600091602080830190803683370190505090503081600081518110610a4e57610a4e611332565b73ffffffffffffffffffffffffffffffffffffffff928316602091820292909201810191909152600254604080517fa21a23e40000000000000000000000000000000000000000000000000000000081529051919093169263a21a23e49260048083019391928290030181600087803b158015610aca57600080fd5b505af1158015610ade573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b0291906110f0565b6004819055600254825173ffffffffffffffffffffffffffffffffffffffff9091169163bec4c08c918490600090610b3c57610b3c611332565b60200260200101516040518363ffffffff1660e01b8152600401610b8092919091825273ffffffffffffffffffffffffffffffffffffffff16602082015260400190565b600060405180830381600087803b158015610b9a57600080fd5b505af1158015610bae573d6000803e3d6000fd5b5050505050565b610bbd610d57565b6040805160c08082018352600454825260055463ffffffff808216602080860191825261ffff640100000000850481168789019081526601000000000000909504841660608089019182526006546080808b0191825260075460ff16151560a0808d019182528d519b8c018e5292518b528b518b8801529851909416898c0152945186169088015251909316928501929092528551918201909552905115158152919260009290820190610c7090610e58565b90526002546040517f9b1c385e00000000000000000000000000000000000000000000000000000000815291925073ffffffffffffffffffffffffffffffffffffffff1690639b1c385e90610cc99084906004016112cd565b602060405180830381600087803b158015610ce357600080fd5b505af1158015610cf7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d1b91906110f0565b6009555050565b610d2a610d57565b610d3381610f14565b50565b60088181548110610d4657600080fd5b600091825260209091200154905081565b60005473ffffffffffffffffffffffffffffffffffffffff163314610dd8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e65720000000000000000000060448201526064016103c9565b565b6009548214610e45576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f7265717565737420494420697320696e636f727265637400000000000000000060448201526064016103c9565b805161035590600890602084019061100a565b60607f92fd13387c7fe7befbc38d303d6468778fb9731bc4583f17d92989c6fcfdeaaa82604051602401610e9191511515815260200190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915292915050565b73ffffffffffffffffffffffffffffffffffffffff8116331415610f94576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c6600000000000000000060448201526064016103c9565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b828054828255906000526020600020908101928215611045579160200282015b8281111561104557825182559160200191906001019061102a565b50611051929150611055565b5090565b5b808211156110515760008155600101611056565b803573ffffffffffffffffffffffffffffffffffffffff8116811461108e57600080fd5b919050565b6000602082840312156110a557600080fd5b6110ae8261106a565b9392505050565b6000602082840312156110c757600080fd5b815180151581146110ae57600080fd5b6000602082840312156110e957600080fd5b5035919050565b60006020828403121561110257600080fd5b5051919050565b6000806040838503121561111c57600080fd5b8235915061112c6020840161106a565b90509250929050565b6000806040838503121561114857600080fd5b8235915060208084013567ffffffffffffffff8082111561116857600080fd5b818601915086601f83011261117c57600080fd5b81358181111561118e5761118e611361565b8060051b6040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f830116810181811085821117156111d1576111d1611361565b604052828152858101935084860182860187018b10156111f057600080fd5b600095505b838610156112135780358552600195909501949386019386016111f5565b508096505050505050509250929050565b6000815180845260005b8181101561124a5760208185018101518683018201520161122e565b8181111561125c576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b73ffffffffffffffffffffffffffffffffffffffff841681528260208201526060604082015260006112c46060830184611224565b95945050505050565b60208152815160208201526020820151604082015261ffff60408301511660608201526000606083015163ffffffff80821660808501528060808601511660a0850152505060a083015160c08084015261132a60e0840182611224565b949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea164736f6c6343000806000a", } var VRFV2PlusSingleConsumerExampleABI = VRFV2PlusSingleConsumerExampleMetaData.ABI @@ -413,6 +413,123 @@ func (_VRFV2PlusSingleConsumerExample *VRFV2PlusSingleConsumerExampleTransactorS return _VRFV2PlusSingleConsumerExample.Contract.Withdraw(&_VRFV2PlusSingleConsumerExample.TransactOpts, amount, to) } +type VRFV2PlusSingleConsumerExampleCoordinatorSetIterator struct { + Event *VRFV2PlusSingleConsumerExampleCoordinatorSet + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *VRFV2PlusSingleConsumerExampleCoordinatorSetIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(VRFV2PlusSingleConsumerExampleCoordinatorSet) + 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(VRFV2PlusSingleConsumerExampleCoordinatorSet) + 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 *VRFV2PlusSingleConsumerExampleCoordinatorSetIterator) Error() error { + return it.fail +} + +func (it *VRFV2PlusSingleConsumerExampleCoordinatorSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type VRFV2PlusSingleConsumerExampleCoordinatorSet struct { + VrfCoordinator common.Address + Raw types.Log +} + +func (_VRFV2PlusSingleConsumerExample *VRFV2PlusSingleConsumerExampleFilterer) FilterCoordinatorSet(opts *bind.FilterOpts) (*VRFV2PlusSingleConsumerExampleCoordinatorSetIterator, error) { + + logs, sub, err := _VRFV2PlusSingleConsumerExample.contract.FilterLogs(opts, "CoordinatorSet") + if err != nil { + return nil, err + } + return &VRFV2PlusSingleConsumerExampleCoordinatorSetIterator{contract: _VRFV2PlusSingleConsumerExample.contract, event: "CoordinatorSet", logs: logs, sub: sub}, nil +} + +func (_VRFV2PlusSingleConsumerExample *VRFV2PlusSingleConsumerExampleFilterer) WatchCoordinatorSet(opts *bind.WatchOpts, sink chan<- *VRFV2PlusSingleConsumerExampleCoordinatorSet) (event.Subscription, error) { + + logs, sub, err := _VRFV2PlusSingleConsumerExample.contract.WatchLogs(opts, "CoordinatorSet") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(VRFV2PlusSingleConsumerExampleCoordinatorSet) + if err := _VRFV2PlusSingleConsumerExample.contract.UnpackLog(event, "CoordinatorSet", 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 (_VRFV2PlusSingleConsumerExample *VRFV2PlusSingleConsumerExampleFilterer) ParseCoordinatorSet(log types.Log) (*VRFV2PlusSingleConsumerExampleCoordinatorSet, error) { + event := new(VRFV2PlusSingleConsumerExampleCoordinatorSet) + if err := _VRFV2PlusSingleConsumerExample.contract.UnpackLog(event, "CoordinatorSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + type VRFV2PlusSingleConsumerExampleOwnershipTransferRequestedIterator struct { Event *VRFV2PlusSingleConsumerExampleOwnershipTransferRequested @@ -696,6 +813,8 @@ type SRequestConfig struct { func (_VRFV2PlusSingleConsumerExample *VRFV2PlusSingleConsumerExample) ParseLog(log types.Log) (generated.AbigenLog, error) { switch log.Topics[0] { + case _VRFV2PlusSingleConsumerExample.abi.Events["CoordinatorSet"].ID: + return _VRFV2PlusSingleConsumerExample.ParseCoordinatorSet(log) case _VRFV2PlusSingleConsumerExample.abi.Events["OwnershipTransferRequested"].ID: return _VRFV2PlusSingleConsumerExample.ParseOwnershipTransferRequested(log) case _VRFV2PlusSingleConsumerExample.abi.Events["OwnershipTransferred"].ID: @@ -706,6 +825,10 @@ func (_VRFV2PlusSingleConsumerExample *VRFV2PlusSingleConsumerExample) ParseLog( } } +func (VRFV2PlusSingleConsumerExampleCoordinatorSet) Topic() common.Hash { + return common.HexToHash("0xd1a6a14209a385a964d036e404cb5cfb71f4000cdb03c9366292430787261be6") +} + func (VRFV2PlusSingleConsumerExampleOwnershipTransferRequested) Topic() common.Hash { return common.HexToHash("0xed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae1278") } @@ -751,6 +874,12 @@ type VRFV2PlusSingleConsumerExampleInterface interface { Withdraw(opts *bind.TransactOpts, amount *big.Int, to common.Address) (*types.Transaction, error) + FilterCoordinatorSet(opts *bind.FilterOpts) (*VRFV2PlusSingleConsumerExampleCoordinatorSetIterator, error) + + WatchCoordinatorSet(opts *bind.WatchOpts, sink chan<- *VRFV2PlusSingleConsumerExampleCoordinatorSet) (event.Subscription, error) + + ParseCoordinatorSet(log types.Log) (*VRFV2PlusSingleConsumerExampleCoordinatorSet, error) + FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*VRFV2PlusSingleConsumerExampleOwnershipTransferRequestedIterator, error) WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *VRFV2PlusSingleConsumerExampleOwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) diff --git a/core/gethwrappers/generated/vrf_v2plus_sub_owner/vrf_v2plus_sub_owner.go b/core/gethwrappers/generated/vrf_v2plus_sub_owner/vrf_v2plus_sub_owner.go index 8cc57fce6c6..06b8f3d8693 100644 --- a/core/gethwrappers/generated/vrf_v2plus_sub_owner/vrf_v2plus_sub_owner.go +++ b/core/gethwrappers/generated/vrf_v2plus_sub_owner/vrf_v2plus_sub_owner.go @@ -31,8 +31,8 @@ var ( ) var VRFV2PlusExternalSubOwnerExampleMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"vrfCoordinator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"link\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"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\":\"ZeroAddress\",\"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\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"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\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"requestConfirmations\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"numWords\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"keyHash\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"nativePayment\",\"type\":\"bool\"}],\"name\":\"requestRandomWords\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"s_randomWords\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_requestId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_vrfCoordinator\",\"outputs\":[{\"internalType\":\"contractIVRFCoordinatorV2Plus\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_vrfCoordinator\",\"type\":\"address\"}],\"name\":\"setCoordinator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x608060405234801561001057600080fd5b50604051610d68380380610d6883398101604081905261002f916101c1565b8133806000816100865760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b03848116919091179091558116156100b6576100b6816100fb565b5050600280546001600160a01b039384166001600160a01b031991821617909155600380549490931693811693909317909155506006805490911633179055506101f4565b6001600160a01b0381163314156101545760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640161007d565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b80516001600160a01b03811681146101bc57600080fd5b919050565b600080604083850312156101d457600080fd5b6101dd836101a5565b91506101eb602084016101a5565b90509250929050565b610b65806102036000396000f3fe608060405234801561001057600080fd5b50600436106100a35760003560e01c80638ea9811711610076578063e89e106a1161005b578063e89e106a1461014f578063f2fde38b14610166578063f6eaffc81461017957600080fd5b80638ea981171461011c5780639eccacf61461012f57600080fd5b80631fe543e3146100a85780635b6c5de8146100bd57806379ba5097146100d05780638da5cb5b146100d8575b600080fd5b6100bb6100b6366004610902565b61018c565b005b6100bb6100cb3660046109f1565b610212565b6100bb610325565b60005473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b6100bb61012a366004610893565b610422565b6002546100f29073ffffffffffffffffffffffffffffffffffffffff1681565b61015860055481565b604051908152602001610113565b6100bb610174366004610893565b61052d565b6101586101873660046108d0565b610541565b60025473ffffffffffffffffffffffffffffffffffffffff163314610204576002546040517f1cf993f400000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff90911660248201526044015b60405180910390fd5b61020e8282610562565b5050565b61021a6105e5565b60006040518060c001604052808481526020018881526020018661ffff1681526020018763ffffffff1681526020018563ffffffff16815260200161026e6040518060200160405280861515815250610668565b90526002546040517f9b1c385e00000000000000000000000000000000000000000000000000000000815291925073ffffffffffffffffffffffffffffffffffffffff1690639b1c385e906102c7908490600401610a69565b602060405180830381600087803b1580156102e157600080fd5b505af11580156102f5573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061031991906108e9565b60055550505050505050565b60015473ffffffffffffffffffffffffffffffffffffffff1633146103a6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e65720000000000000000000060448201526064016101fb565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b60005473ffffffffffffffffffffffffffffffffffffffff163314801590610462575060025473ffffffffffffffffffffffffffffffffffffffff163314155b156104e6573361048760005473ffffffffffffffffffffffffffffffffffffffff1690565b6002546040517f061db9c100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff938416600482015291831660248301529190911660448201526064016101fb565b600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b6105356105e5565b61053e81610724565b50565b6004818154811061055157600080fd5b600091825260209091200154905081565b60055482146105cd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f7265717565737420494420697320696e636f727265637400000000000000000060448201526064016101fb565b80516105e090600490602084019061081a565b505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610666576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e65720000000000000000000060448201526064016101fb565b565b60607f92fd13387c7fe7befbc38d303d6468778fb9731bc4583f17d92989c6fcfdeaaa826040516024016106a191511515815260200190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915292915050565b73ffffffffffffffffffffffffffffffffffffffff81163314156107a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c6600000000000000000060448201526064016101fb565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b828054828255906000526020600020908101928215610855579160200282015b8281111561085557825182559160200191906001019061083a565b50610861929150610865565b5090565b5b808211156108615760008155600101610866565b803563ffffffff8116811461088e57600080fd5b919050565b6000602082840312156108a557600080fd5b813573ffffffffffffffffffffffffffffffffffffffff811681146108c957600080fd5b9392505050565b6000602082840312156108e257600080fd5b5035919050565b6000602082840312156108fb57600080fd5b5051919050565b6000806040838503121561091557600080fd5b8235915060208084013567ffffffffffffffff8082111561093557600080fd5b818601915086601f83011261094957600080fd5b81358181111561095b5761095b610b29565b8060051b6040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f8301168101818110858211171561099e5761099e610b29565b604052828152858101935084860182860187018b10156109bd57600080fd5b600095505b838610156109e05780358552600195909501949386019386016109c2565b508096505050505050509250929050565b60008060008060008060c08789031215610a0a57600080fd5b86359550610a1a6020880161087a565b9450604087013561ffff81168114610a3157600080fd5b9350610a3f6060880161087a565b92506080870135915060a08701358015158114610a5b57600080fd5b809150509295509295509295565b6000602080835283518184015280840151604084015261ffff6040850151166060840152606084015163ffffffff80821660808601528060808701511660a0860152505060a084015160c08085015280518060e086015260005b81811015610ae05782810184015186820161010001528301610ac3565b81811115610af357600061010083880101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169390930161010001949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea164736f6c6343000806000a", + ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"vrfCoordinator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"link\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"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\":\"ZeroAddress\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"vrfCoordinator\",\"type\":\"address\"}],\"name\":\"CoordinatorSet\",\"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\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"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\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"requestConfirmations\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"numWords\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"keyHash\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"nativePayment\",\"type\":\"bool\"}],\"name\":\"requestRandomWords\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"s_randomWords\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_requestId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_vrfCoordinator\",\"outputs\":[{\"internalType\":\"contractIVRFCoordinatorV2Plus\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_vrfCoordinator\",\"type\":\"address\"}],\"name\":\"setCoordinator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Bin: "0x608060405234801561001057600080fd5b50604051610e0d380380610e0d83398101604081905261002f916101e7565b8133806000816100865760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b03848116919091179091558116156100b6576100b681610121565b5050506001600160a01b0381166100e05760405163d92e233d60e01b815260040160405180910390fd5b600280546001600160a01b039283166001600160a01b031991821617909155600380549390921692811692909217905560068054909116331790555061021a565b6001600160a01b03811633141561017a5760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640161007d565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b80516001600160a01b03811681146101e257600080fd5b919050565b600080604083850312156101fa57600080fd5b610203836101cb565b9150610211602084016101cb565b90509250929050565b610be4806102296000396000f3fe608060405234801561001057600080fd5b50600436106100a35760003560e01c80638ea9811711610076578063e89e106a1161005b578063e89e106a1461014f578063f2fde38b14610166578063f6eaffc81461017957600080fd5b80638ea981171461011c5780639eccacf61461012f57600080fd5b80631fe543e3146100a85780635b6c5de8146100bd57806379ba5097146100d05780638da5cb5b146100d8575b600080fd5b6100bb6100b6366004610981565b61018c565b005b6100bb6100cb366004610a70565b610212565b6100bb610325565b60005473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b6100bb61012a366004610912565b610422565b6002546100f29073ffffffffffffffffffffffffffffffffffffffff1681565b61015860055481565b604051908152602001610113565b6100bb610174366004610912565b6105ac565b61015861018736600461094f565b6105c0565b60025473ffffffffffffffffffffffffffffffffffffffff163314610204576002546040517f1cf993f400000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff90911660248201526044015b60405180910390fd5b61020e82826105e1565b5050565b61021a610664565b60006040518060c001604052808481526020018881526020018661ffff1681526020018763ffffffff1681526020018563ffffffff16815260200161026e60405180602001604052808615158152506106e7565b90526002546040517f9b1c385e00000000000000000000000000000000000000000000000000000000815291925073ffffffffffffffffffffffffffffffffffffffff1690639b1c385e906102c7908490600401610ae8565b602060405180830381600087803b1580156102e157600080fd5b505af11580156102f5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103199190610968565b60055550505050505050565b60015473ffffffffffffffffffffffffffffffffffffffff1633146103a6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e65720000000000000000000060448201526064016101fb565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b60005473ffffffffffffffffffffffffffffffffffffffff163314801590610462575060025473ffffffffffffffffffffffffffffffffffffffff163314155b156104e6573361048760005473ffffffffffffffffffffffffffffffffffffffff1690565b6002546040517f061db9c100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff938416600482015291831660248301529190911660448201526064016101fb565b73ffffffffffffffffffffffffffffffffffffffff8116610533576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527fd1a6a14209a385a964d036e404cb5cfb71f4000cdb03c9366292430787261be69060200160405180910390a150565b6105b4610664565b6105bd816107a3565b50565b600481815481106105d057600080fd5b600091825260209091200154905081565b600554821461064c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f7265717565737420494420697320696e636f727265637400000000000000000060448201526064016101fb565b805161065f906004906020840190610899565b505050565b60005473ffffffffffffffffffffffffffffffffffffffff1633146106e5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e65720000000000000000000060448201526064016101fb565b565b60607f92fd13387c7fe7befbc38d303d6468778fb9731bc4583f17d92989c6fcfdeaaa8260405160240161072091511515815260200190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915292915050565b73ffffffffffffffffffffffffffffffffffffffff8116331415610823576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c6600000000000000000060448201526064016101fb565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b8280548282559060005260206000209081019282156108d4579160200282015b828111156108d45782518255916020019190600101906108b9565b506108e09291506108e4565b5090565b5b808211156108e057600081556001016108e5565b803563ffffffff8116811461090d57600080fd5b919050565b60006020828403121561092457600080fd5b813573ffffffffffffffffffffffffffffffffffffffff8116811461094857600080fd5b9392505050565b60006020828403121561096157600080fd5b5035919050565b60006020828403121561097a57600080fd5b5051919050565b6000806040838503121561099457600080fd5b8235915060208084013567ffffffffffffffff808211156109b457600080fd5b818601915086601f8301126109c857600080fd5b8135818111156109da576109da610ba8565b8060051b6040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f83011681018181108582111715610a1d57610a1d610ba8565b604052828152858101935084860182860187018b1015610a3c57600080fd5b600095505b83861015610a5f578035855260019590950194938601938601610a41565b508096505050505050509250929050565b60008060008060008060c08789031215610a8957600080fd5b86359550610a99602088016108f9565b9450604087013561ffff81168114610ab057600080fd5b9350610abe606088016108f9565b92506080870135915060a08701358015158114610ada57600080fd5b809150509295509295509295565b6000602080835283518184015280840151604084015261ffff6040850151166060840152606084015163ffffffff80821660808601528060808701511660a0860152505060a084015160c08085015280518060e086015260005b81811015610b5f5782810184015186820161010001528301610b42565b81811115610b7257600061010083880101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169390930161010001949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea164736f6c6343000806000a", } var VRFV2PlusExternalSubOwnerExampleABI = VRFV2PlusExternalSubOwnerExampleMetaData.ABI @@ -319,6 +319,123 @@ func (_VRFV2PlusExternalSubOwnerExample *VRFV2PlusExternalSubOwnerExampleTransac return _VRFV2PlusExternalSubOwnerExample.Contract.TransferOwnership(&_VRFV2PlusExternalSubOwnerExample.TransactOpts, to) } +type VRFV2PlusExternalSubOwnerExampleCoordinatorSetIterator struct { + Event *VRFV2PlusExternalSubOwnerExampleCoordinatorSet + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *VRFV2PlusExternalSubOwnerExampleCoordinatorSetIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(VRFV2PlusExternalSubOwnerExampleCoordinatorSet) + 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(VRFV2PlusExternalSubOwnerExampleCoordinatorSet) + 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 *VRFV2PlusExternalSubOwnerExampleCoordinatorSetIterator) Error() error { + return it.fail +} + +func (it *VRFV2PlusExternalSubOwnerExampleCoordinatorSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type VRFV2PlusExternalSubOwnerExampleCoordinatorSet struct { + VrfCoordinator common.Address + Raw types.Log +} + +func (_VRFV2PlusExternalSubOwnerExample *VRFV2PlusExternalSubOwnerExampleFilterer) FilterCoordinatorSet(opts *bind.FilterOpts) (*VRFV2PlusExternalSubOwnerExampleCoordinatorSetIterator, error) { + + logs, sub, err := _VRFV2PlusExternalSubOwnerExample.contract.FilterLogs(opts, "CoordinatorSet") + if err != nil { + return nil, err + } + return &VRFV2PlusExternalSubOwnerExampleCoordinatorSetIterator{contract: _VRFV2PlusExternalSubOwnerExample.contract, event: "CoordinatorSet", logs: logs, sub: sub}, nil +} + +func (_VRFV2PlusExternalSubOwnerExample *VRFV2PlusExternalSubOwnerExampleFilterer) WatchCoordinatorSet(opts *bind.WatchOpts, sink chan<- *VRFV2PlusExternalSubOwnerExampleCoordinatorSet) (event.Subscription, error) { + + logs, sub, err := _VRFV2PlusExternalSubOwnerExample.contract.WatchLogs(opts, "CoordinatorSet") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(VRFV2PlusExternalSubOwnerExampleCoordinatorSet) + if err := _VRFV2PlusExternalSubOwnerExample.contract.UnpackLog(event, "CoordinatorSet", 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 (_VRFV2PlusExternalSubOwnerExample *VRFV2PlusExternalSubOwnerExampleFilterer) ParseCoordinatorSet(log types.Log) (*VRFV2PlusExternalSubOwnerExampleCoordinatorSet, error) { + event := new(VRFV2PlusExternalSubOwnerExampleCoordinatorSet) + if err := _VRFV2PlusExternalSubOwnerExample.contract.UnpackLog(event, "CoordinatorSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + type VRFV2PlusExternalSubOwnerExampleOwnershipTransferRequestedIterator struct { Event *VRFV2PlusExternalSubOwnerExampleOwnershipTransferRequested @@ -593,6 +710,8 @@ func (_VRFV2PlusExternalSubOwnerExample *VRFV2PlusExternalSubOwnerExampleFiltere func (_VRFV2PlusExternalSubOwnerExample *VRFV2PlusExternalSubOwnerExample) ParseLog(log types.Log) (generated.AbigenLog, error) { switch log.Topics[0] { + case _VRFV2PlusExternalSubOwnerExample.abi.Events["CoordinatorSet"].ID: + return _VRFV2PlusExternalSubOwnerExample.ParseCoordinatorSet(log) case _VRFV2PlusExternalSubOwnerExample.abi.Events["OwnershipTransferRequested"].ID: return _VRFV2PlusExternalSubOwnerExample.ParseOwnershipTransferRequested(log) case _VRFV2PlusExternalSubOwnerExample.abi.Events["OwnershipTransferred"].ID: @@ -603,6 +722,10 @@ func (_VRFV2PlusExternalSubOwnerExample *VRFV2PlusExternalSubOwnerExample) Parse } } +func (VRFV2PlusExternalSubOwnerExampleCoordinatorSet) Topic() common.Hash { + return common.HexToHash("0xd1a6a14209a385a964d036e404cb5cfb71f4000cdb03c9366292430787261be6") +} + func (VRFV2PlusExternalSubOwnerExampleOwnershipTransferRequested) Topic() common.Hash { return common.HexToHash("0xed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae1278") } @@ -634,6 +757,12 @@ type VRFV2PlusExternalSubOwnerExampleInterface interface { TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) + FilterCoordinatorSet(opts *bind.FilterOpts) (*VRFV2PlusExternalSubOwnerExampleCoordinatorSetIterator, error) + + WatchCoordinatorSet(opts *bind.WatchOpts, sink chan<- *VRFV2PlusExternalSubOwnerExampleCoordinatorSet) (event.Subscription, error) + + ParseCoordinatorSet(log types.Log) (*VRFV2PlusExternalSubOwnerExampleCoordinatorSet, error) + FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*VRFV2PlusExternalSubOwnerExampleOwnershipTransferRequestedIterator, error) WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *VRFV2PlusExternalSubOwnerExampleOwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) diff --git a/core/gethwrappers/generated/vrf_v2plus_upgraded_version/vrf_v2plus_upgraded_version.go b/core/gethwrappers/generated/vrf_v2plus_upgraded_version/vrf_v2plus_upgraded_version.go index f81693ce06b..22fb75830c9 100644 --- a/core/gethwrappers/generated/vrf_v2plus_upgraded_version/vrf_v2plus_upgraded_version.go +++ b/core/gethwrappers/generated/vrf_v2plus_upgraded_version/vrf_v2plus_upgraded_version.go @@ -61,8 +61,8 @@ type VRFV2PlusClientRandomWordsRequest struct { } var VRFCoordinatorV2PlusUpgradedVersionMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"blockhashStore\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"internalBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"externalBalance\",\"type\":\"uint256\"}],\"name\":\"BalanceInvariantViolated\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockNum\",\"type\":\"uint256\"}],\"name\":\"BlockhashNotInStore\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"coordinatorAddress\",\"type\":\"address\"}],\"name\":\"CoordinatorAlreadyRegistered\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"coordinatorAddress\",\"type\":\"address\"}],\"name\":\"CoordinatorNotRegistered\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FailedToSendNative\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FailedToTransferLink\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"have\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"want\",\"type\":\"uint32\"}],\"name\":\"GasLimitTooBig\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"IncorrectCommitment\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"IndexOutOfRange\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficientBalance\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidCalldata\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"consumer\",\"type\":\"address\"}],\"name\":\"InvalidConsumer\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidExtraArgsTag\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"int256\",\"name\":\"linkWei\",\"type\":\"int256\"}],\"name\":\"InvalidLinkWeiPrice\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"transferredValue\",\"type\":\"uint256\"},{\"internalType\":\"uint96\",\"name\":\"expectedValue\",\"type\":\"uint96\"}],\"name\":\"InvalidNativeBalance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"have\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"min\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"max\",\"type\":\"uint16\"}],\"name\":\"InvalidRequestConfirmations\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidSubscription\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"requestVersion\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"expectedVersion\",\"type\":\"uint8\"}],\"name\":\"InvalidVersion\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"LinkAlreadySet\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"LinkNotSet\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"proposedOwner\",\"type\":\"address\"}],\"name\":\"MustBeRequestedOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"MustBeSubOwner\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NoCorrespondingRequest\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"keyHash\",\"type\":\"bytes32\"}],\"name\":\"NoSuchProvingKey\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"have\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"want\",\"type\":\"uint32\"}],\"name\":\"NumWordsTooBig\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableFromLink\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PaymentTooLarge\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PendingRequestExists\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"keyHash\",\"type\":\"bytes32\"}],\"name\":\"ProvingKeyAlreadyRegistered\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Reentrant\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SubscriptionIDCollisionFound\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TooManyConsumers\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"minimumRequestConfirmations\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"maxGasLimit\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"stalenessSeconds\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"gasAfterPaymentCalculation\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"fallbackWeiPerUnitLink\",\"type\":\"int256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"nativePremiumPercentage\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"linkPremiumPercentage\",\"type\":\"uint8\"}],\"name\":\"ConfigSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"coordinatorAddress\",\"type\":\"address\"}],\"name\":\"CoordinatorRegistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"FundsRecovered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newCoordinator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"}],\"name\":\"MigrationCompleted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"NativeFundsRecovered\",\"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\":\"bytes32\",\"name\":\"keyHash\",\"type\":\"bytes32\"}],\"name\":\"ProvingKeyRegistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"outputSeed\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"subID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"payment\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"name\":\"RandomWordsFulfilled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"keyHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"preSeed\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"minimumRequestConfirmations\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"callbackGasLimit\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"numWords\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"extraArgs\",\"type\":\"bytes\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RandomWordsRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amountLink\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amountNative\",\"type\":\"uint256\"}],\"name\":\"SubscriptionCanceled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"consumer\",\"type\":\"address\"}],\"name\":\"SubscriptionConsumerAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"consumer\",\"type\":\"address\"}],\"name\":\"SubscriptionConsumerRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"SubscriptionCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldBalance\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newBalance\",\"type\":\"uint256\"}],\"name\":\"SubscriptionFunded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldNativeBalance\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newNativeBalance\",\"type\":\"uint256\"}],\"name\":\"SubscriptionFundedWithNative\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"SubscriptionOwnerTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"SubscriptionOwnerTransferred\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BLOCKHASH_STORE\",\"outputs\":[{\"internalType\":\"contractBlockhashStoreInterface\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"LINK\",\"outputs\":[{\"internalType\":\"contractLinkTokenInterface\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"LINK_NATIVE_FEED\",\"outputs\":[{\"internalType\":\"contractAggregatorV3Interface\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAX_CONSUMERS\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAX_NUM_WORDS\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAX_REQUEST_CONFIRMATIONS\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"}],\"name\":\"acceptSubscriptionOwnerTransfer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"consumer\",\"type\":\"address\"}],\"name\":\"addConsumer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"cancelSubscription\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"createSubscription\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256[2]\",\"name\":\"pk\",\"type\":\"uint256[2]\"},{\"internalType\":\"uint256[2]\",\"name\":\"gamma\",\"type\":\"uint256[2]\"},{\"internalType\":\"uint256\",\"name\":\"c\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"s\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"seed\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"uWitness\",\"type\":\"address\"},{\"internalType\":\"uint256[2]\",\"name\":\"cGammaWitness\",\"type\":\"uint256[2]\"},{\"internalType\":\"uint256[2]\",\"name\":\"sHashWitness\",\"type\":\"uint256[2]\"},{\"internalType\":\"uint256\",\"name\":\"zInv\",\"type\":\"uint256\"}],\"internalType\":\"structVRF.Proof\",\"name\":\"proof\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"blockNum\",\"type\":\"uint64\"},{\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"numWords\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"extraArgs\",\"type\":\"bytes\"}],\"internalType\":\"structVRFCoordinatorV2PlusUpgradedVersion.RequestCommitment\",\"name\":\"rc\",\"type\":\"tuple\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"name\":\"fulfillRandomWords\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"}],\"name\":\"fundSubscriptionWithNative\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"startIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxCount\",\"type\":\"uint256\"}],\"name\":\"getActiveSubscriptionIds\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRequestConfig\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"},{\"internalType\":\"bytes32[]\",\"name\":\"\",\"type\":\"bytes32[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"}],\"name\":\"getSubscription\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"balance\",\"type\":\"uint96\"},{\"internalType\":\"uint96\",\"name\":\"nativeBalance\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"reqCount\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"consumers\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[2]\",\"name\":\"publicKey\",\"type\":\"uint256[2]\"}],\"name\":\"hashOfKey\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"newCoordinator\",\"type\":\"address\"}],\"name\":\"migrate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"migrationVersion\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"encodedData\",\"type\":\"bytes\"}],\"name\":\"onMigration\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"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\":\"subId\",\"type\":\"uint256\"}],\"name\":\"ownerCancelSubscription\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"}],\"name\":\"pendingRequestExists\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"recoverFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"addresspayable\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"recoverNativeFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"}],\"name\":\"registerMigratableCoordinator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[2]\",\"name\":\"publicProvingKey\",\"type\":\"uint256[2]\"}],\"name\":\"registerProvingKey\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"consumer\",\"type\":\"address\"}],\"name\":\"removeConsumer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"keyHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"internalType\":\"uint16\",\"name\":\"requestConfirmations\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"numWords\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"extraArgs\",\"type\":\"bytes\"}],\"internalType\":\"structVRFV2PlusClient.RandomWordsRequest\",\"name\":\"req\",\"type\":\"tuple\"}],\"name\":\"requestRandomWords\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"requestSubscriptionOwnerTransfer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_config\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"minimumRequestConfirmations\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"maxGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"reentrancyLock\",\"type\":\"bool\"},{\"internalType\":\"uint32\",\"name\":\"stalenessSeconds\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"gasAfterPaymentCalculation\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"fulfillmentFlatFeeNativePPM\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"fulfillmentFlatFeeLinkDiscountPPM\",\"type\":\"uint32\"},{\"internalType\":\"uint8\",\"name\":\"nativePremiumPercentage\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"linkPremiumPercentage\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_currentSubNonce\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"s_provingKeyHashes\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"s_requestCommitments\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_totalBalance\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_totalNativeBalance\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"minimumRequestConfirmations\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"maxGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"stalenessSeconds\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"gasAfterPaymentCalculation\",\"type\":\"uint32\"},{\"internalType\":\"int256\",\"name\":\"fallbackWeiPerUnitLink\",\"type\":\"int256\"},{\"internalType\":\"uint32\",\"name\":\"fulfillmentFlatFeeNativePPM\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"fulfillmentFlatFeeLinkDiscountPPM\",\"type\":\"uint32\"},{\"internalType\":\"uint8\",\"name\":\"nativePremiumPercentage\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"linkPremiumPercentage\",\"type\":\"uint8\"}],\"name\":\"setConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"link\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"linkNativeFeed\",\"type\":\"address\"}],\"name\":\"setLINKAndLINKNativeFeed\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"addresspayable\",\"name\":\"recipient\",\"type\":\"address\"}],\"name\":\"withdrawNative\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x60a06040523480156200001157600080fd5b5060405162005dec38038062005dec833981016040819052620000349162000183565b33806000816200008b5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000be57620000be81620000d7565b50505060601b6001600160601b031916608052620001b5565b6001600160a01b038116331415620001325760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000082565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6000602082840312156200019657600080fd5b81516001600160a01b0381168114620001ae57600080fd5b9392505050565b60805160601c615c11620001db600039600081816104f401526133f80152615c116000f3fe6080604052600436106101e05760003560e01c8062012291146101e5578063088070f5146102125780630ae09540146102e057806315c48b841461030257806318e3dd271461032a5780631b6b6d2314610369578063294daa49146103965780632f622e6b146103b2578063301f42e9146103d2578063405b84fa146103f257806340d6bb821461041257806341af6c871461043d57806351cff8d91461046d5780635d06b4ab1461048d57806364d51a2a146104ad57806365982744146104c2578063689c4517146104e257806372e9d5651461051657806379ba5097146105365780637bce14d11461054b5780638402595e1461056b57806386fe91c71461058b5780638da5cb5b146105ab57806395b55cfc146105c95780639b1c385e146105dc5780639d40a6fd1461060a578063a21a23e414610637578063a4c0ed361461064c578063a63e0bfb1461066c578063aa433aff1461068c578063aefb212f146106ac578063b2a7cac5146106d9578063bec4c08c146106f9578063caf70c4a14610719578063cb63179714610739578063ce3f471914610759578063d98e620e1461076c578063dac83d291461078c578063dc311dd3146107ac578063e72f6e30146107dd578063ee9d2d38146107fd578063f2fde38b1461082a575b600080fd5b3480156101f157600080fd5b506101fa61084a565b604051610209939291906156e5565b60405180910390f35b34801561021e57600080fd5b50600c546102839061ffff81169063ffffffff62010000820481169160ff600160301b8204811692600160381b8304811692600160581b8104821692600160781b8204831692600160981b83041691600160b81b8104821691600160c01b9091041689565b6040805161ffff909a168a5263ffffffff98891660208b01529615159689019690965293861660608801529185166080870152841660a08601529290921660c084015260ff91821660e08401521661010082015261012001610209565b3480156102ec57600080fd5b506103006102fb366004615358565b6108c6565b005b34801561030e57600080fd5b5061031760c881565b60405161ffff9091168152602001610209565b34801561033657600080fd5b50600a5461035190600160601b90046001600160601b031681565b6040516001600160601b039091168152602001610209565b34801561037557600080fd5b50600254610389906001600160a01b031681565b6040516102099190615589565b3480156103a257600080fd5b5060405160028152602001610209565b3480156103be57600080fd5b506103006103cd366004614e72565b61090e565b3480156103de57600080fd5b506103516103ed366004615029565b610a5a565b3480156103fe57600080fd5b5061030061040d366004615358565b610ef0565b34801561041e57600080fd5b506104286101f481565b60405163ffffffff9091168152602001610209565b34801561044957600080fd5b5061045d61045836600461533f565b6112c1565b6040519015158152602001610209565b34801561047957600080fd5b50610300610488366004614e72565b611462565b34801561049957600080fd5b506103006104a8366004614e72565b6115f0565b3480156104b957600080fd5b50610317606481565b3480156104ce57600080fd5b506103006104dd366004614e8f565b6116a7565b3480156104ee57600080fd5b506103897f000000000000000000000000000000000000000000000000000000000000000081565b34801561052257600080fd5b50600354610389906001600160a01b031681565b34801561054257600080fd5b50610300611707565b34801561055757600080fd5b50610300610566366004614f23565b6117b1565b34801561057757600080fd5b50610300610586366004614e72565b6118aa565b34801561059757600080fd5b50600a54610351906001600160601b031681565b3480156105b757600080fd5b506000546001600160a01b0316610389565b6103006105d736600461533f565b6119b6565b3480156105e857600080fd5b506105fc6105f7366004615117565b611ad7565b604051908152602001610209565b34801561061657600080fd5b5060075461062a906001600160401b031681565b604051610209919061587e565b34801561064357600080fd5b506105fc611e23565b34801561065857600080fd5b50610300610667366004614ec8565b611ff6565b34801561067857600080fd5b5061030061068736600461529e565b612170565b34801561069857600080fd5b506103006106a736600461533f565b612379565b3480156106b857600080fd5b506106cc6106c736600461537d565b6123c1565b6040516102099190615600565b3480156106e557600080fd5b506103006106f436600461533f565b6124c3565b34801561070557600080fd5b50610300610714366004615358565b6125b8565b34801561072557600080fd5b506105fc610734366004614f4b565b6126c4565b34801561074557600080fd5b50610300610754366004615358565b6126f4565b610300610767366004614f9d565b612965565b34801561077857600080fd5b506105fc61078736600461533f565b612c7c565b34801561079857600080fd5b506103006107a7366004615358565b612c9d565b3480156107b857600080fd5b506107cc6107c736600461533f565b612d33565b604051610209959493929190615892565b3480156107e957600080fd5b506103006107f8366004614e72565b612e21565b34801561080957600080fd5b506105fc61081836600461533f565b600f6020526000908152604090205481565b34801561083657600080fd5b50610300610845366004614e72565b612ffc565b600c54600e805460408051602080840282018101909252828152600094859460609461ffff8316946201000090930463ffffffff169391928391908301828280156108b457602002820191906000526020600020905b8154815260200190600101908083116108a0575b50505050509050925092509250909192565b816108d081613010565b6108d8613071565b6108e1836112c1565b156108ff57604051631685ecdd60e31b815260040160405180910390fd5b610909838361309e565b505050565b610916613071565b61091e613252565b600b54600160601b90046001600160601b031661094e57604051631e9acf1760e31b815260040160405180910390fd5b600b8054600160601b90046001600160601b0316908190600c6109718380615a78565b92506101000a8154816001600160601b0302191690836001600160601b0316021790555080600a600c8282829054906101000a90046001600160601b03166109b99190615a78565b92506101000a8154816001600160601b0302191690836001600160601b031602179055506000826001600160a01b0316826001600160601b031660405160006040518083038185875af1925050503d8060008114610a33576040519150601f19603f3d011682016040523d82523d6000602084013e610a38565b606091505b50509050806109095760405163950b247960e01b815260040160405180910390fd5b6000610a64613071565b60005a90506000610a7586866132a5565b90506000856060015163ffffffff166001600160401b03811115610a9b57610a9b615b83565b604051908082528060200260200182016040528015610ac4578160200160208202803683370190505b50905060005b866060015163ffffffff16811015610b3b57826040015181604051602001610af3929190615613565b6040516020818303038152906040528051906020012060001c828281518110610b1e57610b1e615b6d565b602090810291909101015280610b3381615afc565b915050610aca565b50602080830180516000908152600f9092526040808320839055905190518291631fe543e360e01b91610b739190869060240161576f565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b031990941693909317909252600c805460ff60301b1916600160301b1790559089015160808a0151919250600091610bd89163ffffffff169084613510565b600c805460ff60301b1916905560208a810151600090815260069091526040902054909150600160c01b90046001600160401b0316610c188160016159ea565b6020808c0151600090815260069091526040812080546001600160401b0393909316600160c01b026001600160c01b039093169290921790915560a08b01518051610c6590600190615a61565b81518110610c7557610c75615b6d565b602091010151600c5460f89190911c6001149150600090610ca6908a90600160581b900463ffffffff163a8561355c565b90508115610d9e576020808d01516000908152600690915260409020546001600160601b03808316600160601b909204161015610cf657604051631e9acf1760e31b815260040160405180910390fd5b60208c81015160009081526006909152604090208054829190600c90610d2d908490600160601b90046001600160601b0316615a78565b92506101000a8154816001600160601b0302191690836001600160601b0316021790555080600b600c8282829054906101000a90046001600160601b0316610d759190615a0c565b92506101000a8154816001600160601b0302191690836001600160601b03160217905550610e79565b6020808d01516000908152600690915260409020546001600160601b0380831691161015610ddf57604051631e9acf1760e31b815260040160405180910390fd5b6020808d015160009081526006909152604081208054839290610e0c9084906001600160601b0316615a78565b92506101000a8154816001600160601b0302191690836001600160601b0316021790555080600b60008282829054906101000a90046001600160601b0316610e549190615a0c565b92506101000a8154816001600160601b0302191690836001600160601b031602179055505b8b6020015188602001517f49580fdfd9497e1ed5c1b1cec0495087ae8e3f1267470ec2fb015db32e3d6aa78a604001518488604051610ed6939291909283526001600160601b039190911660208301521515604082015260600190565b60405180910390a3985050505050505050505b9392505050565b610ef8613071565b610f01816135ab565b610f295780604051635428d44960e01b8152600401610f209190615589565b60405180910390fd5b600080600080610f3886612d33565b945094505093509350336001600160a01b0316826001600160a01b031614610f9b5760405162461bcd60e51b81526020600482015260166024820152752737ba1039bab139b1b934b83a34b7b71037bbb732b960511b6044820152606401610f20565b610fa4866112c1565b15610fea5760405162461bcd60e51b815260206004820152601660248201527550656e64696e6720726571756573742065786973747360501b6044820152606401610f20565b60006040518060c00160405280610fff600290565b60ff168152602001888152602001846001600160a01b03168152602001838152602001866001600160601b03168152602001856001600160601b031681525090506000816040516020016110539190615652565b604051602081830303815290604052905061106d88613615565b505060405163ce3f471960e01b81526001600160a01b0388169063ce3f4719906001600160601b038816906110a690859060040161563f565b6000604051808303818588803b1580156110bf57600080fd5b505af11580156110d3573d6000803e3d6000fd5b50506002546001600160a01b0316158015935091506110fc905057506001600160601b03861615155b156111c65760025460405163a9059cbb60e01b81526001600160a01b039091169063a9059cbb90611133908a908a906004016155d0565b602060405180830381600087803b15801561114d57600080fd5b505af1158015611161573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111859190614f67565b6111c65760405162461bcd60e51b8152602060048201526012602482015271696e73756666696369656e742066756e647360701b6044820152606401610f20565b600c805460ff60301b1916600160301b17905560005b835181101561126f578381815181106111f7576111f7615b6d565b60200260200101516001600160a01b0316638ea98117896040518263ffffffff1660e01b815260040161122a9190615589565b600060405180830381600087803b15801561124457600080fd5b505af1158015611258573d6000803e3d6000fd5b50505050808061126790615afc565b9150506111dc565b50600c805460ff60301b191690556040517fd63ca8cb945956747ee69bfdc3ea754c24a4caf7418db70e46052f7850be4187906112af9089908b9061559d565b60405180910390a15050505050505050565b6000818152600560209081526040808320815160608101835281546001600160a01b039081168252600183015416818501526002820180548451818702810187018652818152879693958601939092919083018282801561134b57602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161132d575b505050505081525050905060005b8160400151518110156114585760005b600e5481101561144557600061140e600e838154811061138b5761138b615b6d565b9060005260206000200154856040015185815181106113ac576113ac615b6d565b60200260200101518860046000896040015189815181106113cf576113cf615b6d565b6020908102919091018101516001600160a01b0316825281810192909252604090810160009081208d82529092529020546001600160401b03166137bd565b506000818152600f6020526040902054909150156114325750600195945050505050565b508061143d81615afc565b915050611369565b508061145081615afc565b915050611359565b5060009392505050565b61146a613071565b611472613252565b6002546001600160a01b031661149b5760405163c1f0c0a160e01b815260040160405180910390fd5b600b546001600160601b03166114c457604051631e9acf1760e31b815260040160405180910390fd5b600b80546001600160601b031690819060006114e08380615a78565b92506101000a8154816001600160601b0302191690836001600160601b0316021790555080600a60008282829054906101000a90046001600160601b03166115289190615a78565b82546001600160601b039182166101009390930a92830291909202199091161790555060025460405163a9059cbb60e01b81526001600160a01b039091169063a9059cbb9061157d90859085906004016155d0565b602060405180830381600087803b15801561159757600080fd5b505af11580156115ab573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115cf9190614f67565b6115ec57604051631e9acf1760e31b815260040160405180910390fd5b5050565b6115f8613252565b611601816135ab565b15611621578060405163ac8a27ef60e01b8152600401610f209190615589565b601280546001810182556000919091527fbb8a6a4669ba250d26cd7a459eca9d215f8307e33aebe50379bc5a3617ec34440180546001600160a01b0319166001600160a01b0383161790556040517fb7cabbfc11e66731fc77de0444614282023bcbd41d16781c753a431d0af016259061169c908390615589565b60405180910390a150565b6116af613252565b6002546001600160a01b0316156116d957604051631688c53760e11b815260040160405180910390fd5b600280546001600160a01b039384166001600160a01b03199182161790915560038054929093169116179055565b6001546001600160a01b0316331461175a5760405162461bcd60e51b815260206004820152601660248201527526bab9ba10313290383937b837b9b2b21037bbb732b960511b6044820152606401610f20565b60008054336001600160a01b0319808316821784556001805490911690556040516001600160a01b0390921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b6117b9613252565b6040805180820182526000916117e89190849060029083908390808284376000920191909152506126c4915050565b6000818152600d602052604090205490915060ff161561181e57604051634a0b8fa760e01b815260048101829052602401610f20565b6000818152600d6020526040808220805460ff19166001908117909155600e805491820181559092527fbb7b4a454dc3493923482f07822329ed19e8244eff582cc204f8554c3620c3fd909101829055517fc9583fd3afa3d7f16eb0b88d0268e7d05c09bafa4b21e092cbd1320e1bc8089d9061189e9083815260200190565b60405180910390a15050565b6118b2613252565b600a544790600160601b90046001600160601b0316818111156118ec5780826040516354ced18160e11b8152600401610f20929190615613565b818110156109095760006119008284615a61565b90506000846001600160a01b03168260405160006040518083038185875af1925050503d806000811461194f576040519150601f19603f3d011682016040523d82523d6000602084013e611954565b606091505b50509050806119765760405163950b247960e01b815260040160405180910390fd5b7f4aed7c8eed0496c8c19ea2681fcca25741c1602342e38b045d9f1e8e905d2e9c85836040516119a792919061559d565b60405180910390a15050505050565b6119be613071565b6000818152600560205260409020546001600160a01b03166119f357604051630fb532db60e11b815260040160405180910390fd5b60008181526006602052604090208054600160601b90046001600160601b0316903490600c611a228385615a0c565b92506101000a8154816001600160601b0302191690836001600160601b0316021790555034600a600c8282829054906101000a90046001600160601b0316611a6a9190615a0c565b92506101000a8154816001600160601b0302191690836001600160601b03160217905550817f7603b205d03651ee812f803fccde89f1012e545a9c99f0abfea9cedd0fd8e902823484611abd91906159d2565b604051611acb929190615613565b60405180910390a25050565b6000611ae1613071565b6020808301356000908152600590915260409020546001600160a01b0316611b1c57604051630fb532db60e11b815260040160405180910390fd5b3360009081526004602090815260408083208583013584529091529020546001600160401b031680611b69578260200135336040516379bfd40160e01b8152600401610f20929190615744565b600c5461ffff16611b806060850160408601615283565b61ffff161080611ba3575060c8611b9d6060850160408601615283565b61ffff16115b15611bdd57611bb86060840160408501615283565b600c5460405163539c34bb60e11b8152610f20929161ffff169060c8906004016156c7565b600c5462010000900463ffffffff16611bfc608085016060860161539f565b63ffffffff161115611c4257611c18608084016060850161539f565b600c54604051637aebf00f60e11b8152610f20929162010000900463ffffffff1690600401615867565b6101f4611c5560a085016080860161539f565b63ffffffff161115611c8f57611c7160a084016080850161539f565b6101f46040516311ce1afb60e21b8152600401610f20929190615867565b6000611c9c8260016159ea565b9050600080611cb28635336020890135866137bd565b90925090506000611cce611cc960a08901896158e7565b613846565b90506000611cdb826138c3565b905083611ce6613934565b60208a0135611cfb60808c0160608d0161539f565b611d0b60a08d0160808e0161539f565b3386604051602001611d2397969594939291906157c7565b60405160208183030381529060405280519060200120600f600086815260200190815260200160002081905550336001600160a01b0316886020013589600001357feb0e3652e0f44f417695e6e90f2f42c99b65cd7169074c5a654b16b9748c3a4e87878d6040016020810190611d9a9190615283565b8e6060016020810190611dad919061539f565b8f6080016020810190611dc0919061539f565b89604051611dd396959493929190615788565b60405180910390a45050336000908152600460209081526040808320898301358452909152902080546001600160401b0319166001600160401b039490941693909317909255925050505b919050565b6000611e2d613071565b6007546001600160401b031633611e45600143615a61565b6040516001600160601b0319606093841b81166020830152914060348201523090921b1660548201526001600160c01b031960c083901b16606882015260700160408051601f1981840301815291905280516020909101209150611eaa8160016159ea565b600780546001600160401b0319166001600160401b03928316179055604080516000808252608082018352602080830182815283850183815260608086018581528a86526006855287862093518454935191516001600160601b039182166001600160c01b031990951694909417600160601b9190921602176001600160c01b0316600160c01b9290981691909102969096179055835194850184523385528481018281528585018481528884526005835294909220855181546001600160a01b03199081166001600160a01b039283161783559351600183018054909516911617909255925180519294939192611fa89260028501920190614b36565b50611fb8915060089050846139c4565b50827f1d3015d7ba850fa198dc7b1a3f5d42779313a681035f77c8c03764c61005518d33604051611fe99190615589565b60405180910390a2505090565b611ffe613071565b6002546001600160a01b03163314612029576040516344b0e3c360e01b815260040160405180910390fd5b6020811461204a57604051638129bbcd60e01b815260040160405180910390fd5b60006120588284018461533f565b6000818152600560205260409020549091506001600160a01b031661209057604051630fb532db60e11b815260040160405180910390fd5b600081815260066020526040812080546001600160601b0316918691906120b78385615a0c565b92506101000a8154816001600160601b0302191690836001600160601b0316021790555084600a60008282829054906101000a90046001600160601b03166120ff9190615a0c565b92506101000a8154816001600160601b0302191690836001600160601b03160217905550817f1ced9348ff549fceab2ac57cd3a9de38edaaab274b725ee82c23e8fc8c4eec7a82878461215291906159d2565b604051612160929190615613565b60405180910390a2505050505050565b612178613252565b60c861ffff8a1611156121a557888960c860405163539c34bb60e11b8152600401610f20939291906156c7565b600085136121c9576040516321ea67b360e11b815260048101869052602401610f20565b604080516101208101825261ffff8b1680825263ffffffff808c16602084018190526000848601528b8216606085018190528b8316608086018190528a841660a08701819052938a1660c0870181905260ff808b1660e08901819052908a16610100909801889052600c8054600160c01b90990260ff60c01b19600160b81b9093029290921661ffff60b81b19600160981b90940263ffffffff60981b19600160781b90990298909816600160781b600160b81b0319600160581b90960263ffffffff60581b19600160381b90980297909716600160301b600160781b03196201000090990265ffffffffffff19909c16909a179a909a1796909616979097179390931791909116959095179290921793909316929092179190911790556010869055517f95cb2ddab6d2297c29a4861691de69b3969c464aa4a9c44258b101ff02ff375a90612366908b908b908b908b908b908990899061ffff97909716875263ffffffff95861660208801529385166040870152919093166060850152608084019290925260ff91821660a08401521660c082015260e00190565b60405180910390a1505050505050505050565b612381613252565b6000818152600560205260409020546001600160a01b0316806123b757604051630fb532db60e11b815260040160405180910390fd5b6115ec828261309e565b606060006123cf60086139d0565b90508084106123f157604051631390f2a160e01b815260040160405180910390fd5b60006123fd84866159d2565b90508181118061240b575083155b6124155780612417565b815b905060006124258683615a61565b9050806001600160401b0381111561243f5761243f615b83565b604051908082528060200260200182016040528015612468578160200160208202803683370190505b50935060005b818110156124b85761248b61248388836159d2565b6008906139da565b85828151811061249d5761249d615b6d565b60209081029190910101526124b181615afc565b905061246e565b505050505b92915050565b6124cb613071565b6000818152600560205260409020546001600160a01b03168061250157604051630fb532db60e11b815260040160405180910390fd5b6000828152600560205260409020600101546001600160a01b03163314612558576000828152600560205260409081902060010154905163d084e97560e01b8152610f20916001600160a01b031690600401615589565b600082815260056020526040908190208054336001600160a01b031991821681178355600190920180549091169055905183917fd4114ab6e9af9f597c52041f32d62dc57c5c4e4c0d4427006069635e216c938691611acb9185916155b6565b816125c281613010565b6125ca613071565b60008381526005602052604090206002018054606414156125fe576040516305a48e0f60e01b815260040160405180910390fd5b6001600160a01b038316600090815260046020908152604080832087845291829052909120546001600160401b031615612639575050505050565b600085815260208281526040808320805460016001600160401b0319909116811790915585549081018655858452919092200180546001600160a01b0319166001600160a01b0387161790555185907f1e980d04aa7648e205713e5e8ea3808672ac163d10936d36f91b2c88ac1575e1906126b5908790615589565b60405180910390a25050505050565b6000816040516020016126d791906155f2565b604051602081830303815290604052805190602001209050919050565b816126fe81613010565b612706613071565b61270f836112c1565b1561272d57604051631685ecdd60e31b815260040160405180910390fd5b6001600160a01b03821660009081526004602090815260408083208684529091529020546001600160401b031661277b5782826040516379bfd40160e01b8152600401610f20929190615744565b6000838152600560209081526040808320600201805482518185028101850190935280835291929091908301828280156127de57602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116127c0575b505050505090506000600182516127f59190615a61565b905060005b825181101561290157846001600160a01b031683828151811061281f5761281f615b6d565b60200260200101516001600160a01b031614156128ef57600083838151811061284a5761284a615b6d565b602002602001015190508060056000898152602001908152602001600020600201838154811061287c5761287c615b6d565b600091825260208083209190910180546001600160a01b0319166001600160a01b0394909416939093179092558881526005909152604090206002018054806128c7576128c7615b57565b600082815260209020810160001990810180546001600160a01b031916905501905550612901565b806128f981615afc565b9150506127fa565b506001600160a01b03841660009081526004602090815260408083208884529091529081902080546001600160401b03191690555185907f32158c6058347c1601b2d12bc696ac6901d8a9a9aa3ba10c27ab0a983e8425a7906126b5908790615589565b600061297382840184615151565b9050806000015160ff166001146129ac57805160405163237d181f60e21b815260ff909116600482015260016024820152604401610f20565b8060a001516001600160601b031634146129f05760a08101516040516306acf13560e41b81523460048201526001600160601b039091166024820152604401610f20565b6020808201516000908152600590915260409020546001600160a01b031615612a2c576040516326afa43560e11b815260040160405180910390fd5b60005b816060015151811015612acc5760016004600084606001518481518110612a5857612a58615b6d565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060008460200151815260200190815260200160002060006101000a8154816001600160401b0302191690836001600160401b031602179055508080612ac490615afc565b915050612a2f565b50604080516060808201835260808401516001600160601b03908116835260a0850151811660208085019182526000858701818152828901805183526006845288832097518854955192516001600160401b0316600160c01b026001600160c01b03938816600160601b026001600160c01b0319909716919097161794909417169390931790945584518084018652868601516001600160a01b03908116825281860184815294880151828801908152925184526005865295909220825181549087166001600160a01b0319918216178255935160018201805491909716941693909317909455925180519192612bcb92600285019290910190614b36565b5050506080810151600a8054600090612bee9084906001600160601b0316615a0c565b92506101000a8154816001600160601b0302191690836001600160601b031602179055508060a00151600a600c8282829054906101000a90046001600160601b0316612c3a9190615a0c565b92506101000a8154816001600160601b0302191690836001600160601b03160217905550612c76816020015160086139c490919063ffffffff16565b50505050565b600e8181548110612c8c57600080fd5b600091825260209091200154905081565b81612ca781613010565b612caf613071565b600083815260056020526040902060018101546001600160a01b03848116911614612c76576001810180546001600160a01b0319166001600160a01b03851617905560405184907f21a4dad170a6bf476c31bbcf4a16628295b0e450672eec25d7c93308e05344a190612d2590339087906155b6565b60405180910390a250505050565b600081815260056020526040812054819081906001600160a01b0316606081612d6f57604051630fb532db60e11b815260040160405180910390fd5b600086815260066020908152604080832054600583529281902060020180548251818502810185019093528083526001600160601b0380861695600160601b810490911694600160c01b9091046001600160401b0316938893929091839190830182828015612e0757602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311612de9575b505050505090509450945094509450945091939590929450565b612e29613252565b6002546001600160a01b0316612e525760405163c1f0c0a160e01b815260040160405180910390fd5b6002546040516370a0823160e01b81526000916001600160a01b0316906370a0823190612e83903090600401615589565b60206040518083038186803b158015612e9b57600080fd5b505afa158015612eaf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ed39190614f84565b600a549091506001600160601b031681811115612f075780826040516354ced18160e11b8152600401610f20929190615613565b81811015610909576000612f1b8284615a61565b60025460405163a9059cbb60e01b81529192506001600160a01b03169063a9059cbb90612f4e908790859060040161559d565b602060405180830381600087803b158015612f6857600080fd5b505af1158015612f7c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612fa09190614f67565b612fbd57604051631f01ff1360e21b815260040160405180910390fd5b7f59bfc682b673f8cbf945f1e454df9334834abf7dfe7f92237ca29ecb9b4366008482604051612fee92919061559d565b60405180910390a150505050565b613004613252565b61300d816139e6565b50565b6000818152600560205260409020546001600160a01b03168061304657604051630fb532db60e11b815260040160405180910390fd5b336001600160a01b038216146115ec5780604051636c51fda960e11b8152600401610f209190615589565b600c54600160301b900460ff161561309c5760405163769dd35360e11b815260040160405180910390fd5b565b6000806130aa84613615565b60025491935091506001600160a01b0316158015906130d157506001600160601b03821615155b156131805760025460405163a9059cbb60e01b81526001600160a01b039091169063a9059cbb906131119086906001600160601b0387169060040161559d565b602060405180830381600087803b15801561312b57600080fd5b505af115801561313f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906131639190614f67565b61318057604051631e9acf1760e31b815260040160405180910390fd5b6000836001600160a01b0316826001600160601b031660405160006040518083038185875af1925050503d80600081146131d6576040519150601f19603f3d011682016040523d82523d6000602084013e6131db565b606091505b50509050806131fd5760405163950b247960e01b815260040160405180910390fd5b604080516001600160a01b03861681526001600160601b03808616602083015284169181019190915285907f8c74ce8b8cf87f5eb001275c8be27eb34ea2b62bfab6814fcc62192bb63e81c4906060016126b5565b6000546001600160a01b0316331461309c5760405162461bcd60e51b815260206004820152601660248201527527b7363c9031b0b63630b1363290313c9037bbb732b960511b6044820152606401610f20565b604080516060810182526000808252602082018190529181019190915260006132d184600001516126c4565b6000818152600d602052604090205490915060ff1661330657604051631dfd6e1360e21b815260048101829052602401610f20565b600081856080015160405160200161331f929190615613565b60408051601f1981840301815291815281516020928301206000818152600f9093529120549091508061336557604051631b44092560e11b815260040160405180910390fd5b845160208087015160408089015160608a015160808b015160a08c01519351613394978a979096959101615813565b6040516020818303038152906040528051906020012081146133c95760405163354a450b60e21b815260040160405180910390fd5b60006133d88660000151613a8a565b90508061349f578551604051631d2827a760e31b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163e9413d389161342c919060040161587e565b60206040518083038186803b15801561344457600080fd5b505afa158015613458573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061347c9190614f84565b90508061349f57855160405163175dadad60e01b8152610f20919060040161587e565b60008760800151826040516020016134c1929190918252602082015260400190565b6040516020818303038152906040528051906020012060001c905060006134e88983613b67565b6040805160608101825297885260208801969096529486019490945250929695505050505050565b60005a61138881101561352257600080fd5b61138881039050846040820482031161353a57600080fd5b50823b61354657600080fd5b60008083516020850160008789f1949350505050565b60008115613589576011546135829086908690600160201b900463ffffffff1686613bd2565b90506135a3565b6011546135a0908690869063ffffffff1686613c74565b90505b949350505050565b6000805b60125481101561360c57826001600160a01b0316601282815481106135d6576135d6615b6d565b6000918252602090912001546001600160a01b031614156135fa5750600192915050565b8061360481615afc565b9150506135af565b50600092915050565b60008181526005602090815260408083206006909252822054600290910180546001600160601b0380841694600160601b90940416925b818110156136b7576004600084838154811061366a5761366a615b6d565b60009182526020808320909101546001600160a01b031683528281019390935260409182018120898252909252902080546001600160401b03191690556136b081615afc565b905061364c565b50600085815260056020526040812080546001600160a01b031990811682556001820180549091169055906136ef6002830182614b9b565b505060008581526006602052604081205561370b600886613d99565b506001600160601b0384161561375e57600a80548591906000906137399084906001600160601b0316615a78565b92506101000a8154816001600160601b0302191690836001600160601b031602179055505b6001600160601b038316156137b65782600a600c8282829054906101000a90046001600160601b03166137919190615a78565b92506101000a8154816001600160601b0302191690836001600160601b031602179055505b5050915091565b60408051602081018690526001600160a01b03851691810191909152606081018390526001600160401b03821660808201526000908190819060a00160408051601f198184030181529082905280516020918201209250613822918991849101615613565b60408051808303601f19018152919052805160209091012097909650945050505050565b6040805160208101909152600081528161386f57506040805160208101909152600081526124bd565b63125fa26760e31b6138818385615aa0565b6001600160e01b031916146138a957604051632923fee760e11b815260040160405180910390fd5b6138b682600481866159a8565b810190610ee99190614fde565b60607f92fd13387c7fe7befbc38d303d6468778fb9731bc4583f17d92989c6fcfdeaaa826040516024016138fc91511515815260200190565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915292915050565b60004661394081613da5565b156139bd5760646001600160a01b031663a3b1b31d6040518163ffffffff1660e01b815260040160206040518083038186803b15801561397f57600080fd5b505afa158015613993573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906139b79190614f84565b91505090565b4391505090565b6000610ee98383613dc8565b60006124bd825490565b6000610ee98383613e17565b6001600160a01b038116331415613a395760405162461bcd60e51b815260206004820152601760248201527621b0b73737ba103a3930b739b332b9103a379039b2b63360491b6044820152606401610f20565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b600046613a9681613da5565b15613b5857610100836001600160401b0316613ab0613934565b613aba9190615a61565b1180613ad65750613ac9613934565b836001600160401b031610155b15613ae45750600092915050565b6040516315a03d4160e11b8152606490632b407a8290613b0890869060040161587e565b60206040518083038186803b158015613b2057600080fd5b505afa158015613b34573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ee99190614f84565b50506001600160401b03164090565b6000613b9b8360000151846020015185604001518660600151868860a001518960c001518a60e001518b6101000151613e41565b60038360200151604051602001613bb392919061575b565b60408051601f1981840301815291905280516020909101209392505050565b600080613c156000368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061405c92505050565b905060005a613c2488886159d2565b613c2e9190615a61565b613c389085615a42565b90506000613c5163ffffffff871664e8d4a51000615a42565b905082613c5e82846159d2565b613c6891906159d2565b98975050505050505050565b600080613c7f614121565b905060008113613ca5576040516321ea67b360e11b815260048101829052602401610f20565b6000613ce76000368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061405c92505050565b9050600082825a613cf88b8b6159d2565b613d029190615a61565b613d0c9088615a42565b613d1691906159d2565b613d2890670de0b6b3a7640000615a42565b613d329190615a2e565b90506000613d4b63ffffffff881664e8d4a51000615a42565b9050613d6281676765c793fa10079d601b1b615a61565b821115613d825760405163e80fa38160e01b815260040160405180910390fd5b613d8c81836159d2565b9998505050505050505050565b6000610ee983836141ec565b600061a4b1821480613db9575062066eed82145b806124bd57505062066eee1490565b6000818152600183016020526040812054613e0f575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556124bd565b5060006124bd565b6000826000018281548110613e2e57613e2e615b6d565b9060005260206000200154905092915050565b613e4a896142df565b613e935760405162461bcd60e51b815260206004820152601a6024820152797075626c6963206b6579206973206e6f74206f6e20637572766560301b6044820152606401610f20565b613e9c886142df565b613ee05760405162461bcd60e51b815260206004820152601560248201527467616d6d61206973206e6f74206f6e20637572766560581b6044820152606401610f20565b613ee9836142df565b613f355760405162461bcd60e51b815260206004820152601d60248201527f6347616d6d615769746e657373206973206e6f74206f6e2063757276650000006044820152606401610f20565b613f3e826142df565b613f895760405162461bcd60e51b815260206004820152601c60248201527b73486173685769746e657373206973206e6f74206f6e20637572766560201b6044820152606401610f20565b613f95878a88876143a2565b613fdd5760405162461bcd60e51b81526020600482015260196024820152786164647228632a706b2b732a6729213d5f755769746e65737360381b6044820152606401610f20565b6000613fe98a876144b6565b90506000613ffc898b878b86898961451a565b9050600061400d838d8d8a8661462d565b9050808a1461404e5760405162461bcd60e51b815260206004820152600d60248201526c34b73b30b634b210383937b7b360991b6044820152606401610f20565b505050505050505050505050565b60004661406881613da5565b156140a757606c6001600160a01b031663c6f7de0e6040518163ffffffff1660e01b815260040160206040518083038186803b158015613b2057600080fd5b6140b08161466d565b1561360c57600f602160991b016001600160a01b03166349948e0e84604051806080016040528060488152602001615bbd604891396040516020016140f69291906154df565b6040516020818303038152906040526040518263ffffffff1660e01b8152600401613b08919061563f565b600c5460035460408051633fabe5a360e21b81529051600093600160381b900463ffffffff169283151592859283926001600160a01b03169163feaf968c9160048083019260a0929190829003018186803b15801561417f57600080fd5b505afa158015614193573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906141b791906153ba565b5094509092508491505080156141db57506141d28242615a61565b8463ffffffff16105b156135a35750601054949350505050565b600081815260018301602052604081205480156142d5576000614210600183615a61565b855490915060009061422490600190615a61565b905081811461428957600086600001828154811061424457614244615b6d565b906000526020600020015490508087600001848154811061426757614267615b6d565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061429a5761429a615b57565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506124bd565b60009150506124bd565b80516000906401000003d0191161432d5760405162461bcd60e51b8152602060048201526012602482015271696e76616c696420782d6f7264696e61746560701b6044820152606401610f20565b60208201516401000003d0191161437b5760405162461bcd60e51b8152602060048201526012602482015271696e76616c696420792d6f7264696e61746560701b6044820152606401610f20565b60208201516401000003d01990800961439b8360005b60200201516146a7565b1492915050565b60006001600160a01b0382166143e85760405162461bcd60e51b815260206004820152600b60248201526a626164207769746e65737360a81b6044820152606401610f20565b6020840151600090600116156143ff57601c614402565b601b5b9050600070014551231950b75fc4402da1732fc9bebe1985876000602002015109865170014551231950b75fc4402da1732fc9bebe199182039250600091908909875160408051600080825260209091019182905292935060019161446c91869188918790615621565b6020604051602081039080840390855afa15801561448e573d6000803e3d6000fd5b5050604051601f1901516001600160a01b039081169088161495505050505050949350505050565b6144be614bb9565b6144eb600184846040516020016144d793929190615568565b6040516020818303038152906040526146cb565b90505b6144f7816142df565b6124bd57805160408051602081019290925261451391016144d7565b90506144ee565b614522614bb9565b825186516401000003d01990819006910614156145815760405162461bcd60e51b815260206004820152601e60248201527f706f696e747320696e2073756d206d7573742062652064697374696e637400006044820152606401610f20565b61458c878988614719565b6145d15760405162461bcd60e51b8152602060048201526016602482015275119a5c9cdd081b5d5b0818da1958dac819985a5b195960521b6044820152606401610f20565b6145dc848685614719565b6146225760405162461bcd60e51b815260206004820152601760248201527614d958dbdb99081b5d5b0818da1958dac819985a5b1959604a1b6044820152606401610f20565b613c68868484614834565b60006002868686858760405160200161464b9695949392919061550e565b60408051601f1981840301815291905280516020909101209695505050505050565b6000600a82148061467f57506101a482145b8061468c575062aa37dc82145b80614698575061210582145b806124bd57505062014a331490565b6000806401000003d01980848509840990506401000003d019600782089392505050565b6146d3614bb9565b6146dc826148f7565b81526146f16146ec826000614391565b614932565b602082018190526002900660011415611e1e576020810180516401000003d019039052919050565b6000826147565760405162461bcd60e51b815260206004820152600b60248201526a3d32b9379039b1b0b630b960a91b6044820152606401610f20565b8351602085015160009061476c90600290615b17565b1561477857601c61477b565b601b5b9050600070014551231950b75fc4402da1732fc9bebe198387096040805160008082526020909101918290529192506001906147be908390869088908790615621565b6020604051602081039080840390855afa1580156147e0573d6000803e3d6000fd5b5050506020604051035190506000866040516020016147ff91906154cd565b60408051601f1981840301815291905280516020909101206001600160a01b0392831692169190911498975050505050505050565b61483c614bb9565b83516020808601518551918601516000938493849361485d93909190614952565b919450925090506401000003d0198582096001146148b95760405162461bcd60e51b815260206004820152601960248201527834b73b2d1036bab9ba1031329034b73b32b939b29037b3103d60391b6044820152606401610f20565b60405180604001604052806401000003d019806148d8576148d8615b41565b87860981526020016401000003d0198785099052979650505050505050565b805160208201205b6401000003d0198110611e1e576040805160208082019390935281518082038401815290820190915280519101206148ff565b60006124bd82600261494b6401000003d01960016159d2565b901c614a32565b60008080600180826401000003d019896401000003d019038808905060006401000003d0198b6401000003d019038a089050600061499283838585614ac9565b90985090506149a388828e88614aed565b90985090506149b488828c87614aed565b909850905060006149c78d878b85614aed565b90985090506149d888828686614ac9565b90985090506149e988828e89614aed565b9098509050818114614a1e576401000003d019818a0998506401000003d01982890997506401000003d0198183099650614a22565b8196505b5050505050509450945094915050565b600080614a3d614bd7565b6020808252818101819052604082015260608101859052608081018490526401000003d01960a0820152614a6f614bf5565b60208160c0846005600019fa925082614abf5760405162461bcd60e51b81526020600482015260126024820152716269674d6f64457870206661696c7572652160701b6044820152606401610f20565b5195945050505050565b6000806401000003d0198487096401000003d0198487099097909650945050505050565b600080806401000003d019878509905060006401000003d01987876401000003d019030990506401000003d0198183086401000003d01986890990999098509650505050505050565b828054828255906000526020600020908101928215614b8b579160200282015b82811115614b8b57825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190614b56565b50614b97929150614c13565b5090565b508054600082559060005260206000209081019061300d9190614c13565b60405180604001604052806002906020820280368337509192915050565b6040518060c001604052806006906020820280368337509192915050565b60405180602001604052806001906020820280368337509192915050565b5b80821115614b975760008155600101614c14565b8035611e1e81615b99565b600082601f830112614c4457600080fd5b604080519081016001600160401b0381118282101715614c6657614c66615b83565b8060405250808385604086011115614c7d57600080fd5b60005b6002811015614c9f578135835260209283019290910190600101614c80565b509195945050505050565b8035611e1e81615bae565b60008083601f840112614cc757600080fd5b5081356001600160401b03811115614cde57600080fd5b602083019150836020828501011115614cf657600080fd5b9250929050565b600082601f830112614d0e57600080fd5b81356001600160401b03811115614d2757614d27615b83565b614d3a601f8201601f1916602001615978565b818152846020838601011115614d4f57600080fd5b816020850160208301376000918101602001919091529392505050565b600060c08284031215614d7e57600080fd5b614d8661592d565b905081356001600160401b038082168214614da057600080fd5b81835260208401356020840152614db960408501614e1f565b6040840152614dca60608501614e1f565b6060840152614ddb60808501614c28565b608084015260a0840135915080821115614df457600080fd5b50614e0184828501614cfd565b60a08301525092915050565b803561ffff81168114611e1e57600080fd5b803563ffffffff81168114611e1e57600080fd5b803560ff81168114611e1e57600080fd5b80516001600160501b0381168114611e1e57600080fd5b80356001600160601b0381168114611e1e57600080fd5b600060208284031215614e8457600080fd5b8135610ee981615b99565b60008060408385031215614ea257600080fd5b8235614ead81615b99565b91506020830135614ebd81615b99565b809150509250929050565b60008060008060608587031215614ede57600080fd5b8435614ee981615b99565b93506020850135925060408501356001600160401b03811115614f0b57600080fd5b614f1787828801614cb5565b95989497509550505050565b600060408284031215614f3557600080fd5b82604083011115614f4557600080fd5b50919050565b600060408284031215614f5d57600080fd5b610ee98383614c33565b600060208284031215614f7957600080fd5b8151610ee981615bae565b600060208284031215614f9657600080fd5b5051919050565b60008060208385031215614fb057600080fd5b82356001600160401b03811115614fc657600080fd5b614fd285828601614cb5565b90969095509350505050565b600060208284031215614ff057600080fd5b604051602081016001600160401b038111828210171561501257615012615b83565b604052823561502081615bae565b81529392505050565b60008060008385036101e081121561504057600080fd5b6101a08082121561505057600080fd5b615058615955565b91506150648787614c33565b82526150738760408801614c33565b60208301526080860135604083015260a0860135606083015260c086013560808301526150a260e08701614c28565b60a08301526101006150b688828901614c33565b60c08401526150c9886101408901614c33565b60e0840152610180870135908301529093508401356001600160401b038111156150f257600080fd5b6150fe86828701614d6c565b92505061510e6101c08501614caa565b90509250925092565b60006020828403121561512957600080fd5b81356001600160401b0381111561513f57600080fd5b820160c08185031215610ee957600080fd5b6000602080838503121561516457600080fd5b82356001600160401b038082111561517b57600080fd5b9084019060c0828703121561518f57600080fd5b61519761592d565b6151a083614e33565b8152838301358482015260408301356151b881615b99565b60408201526060830135828111156151cf57600080fd5b8301601f810188136151e057600080fd5b8035838111156151f2576151f2615b83565b8060051b9350615203868501615978565b8181528681019083880186850189018c101561521e57600080fd5b600096505b8387101561524d578035945061523885615b99565b84835260019690960195918801918801615223565b5060608501525061526391505060808401614e5b565b608082015261527460a08401614e5b565b60a08201529695505050505050565b60006020828403121561529557600080fd5b610ee982614e0d565b60008060008060008060008060006101208a8c0312156152bd57600080fd5b6152c68a614e0d565b98506152d460208b01614e1f565b97506152e260408b01614e1f565b96506152f060608b01614e1f565b955060808a0135945061530560a08b01614e1f565b935061531360c08b01614e1f565b925061532160e08b01614e33565b91506153306101008b01614e33565b90509295985092959850929598565b60006020828403121561535157600080fd5b5035919050565b6000806040838503121561536b57600080fd5b823591506020830135614ebd81615b99565b6000806040838503121561539057600080fd5b50508035926020909101359150565b6000602082840312156153b157600080fd5b610ee982614e1f565b600080600080600060a086880312156153d257600080fd5b6153db86614e44565b94506020860151935060408601519250606086015191506153fe60808701614e44565b90509295509295909350565b600081518084526020808501945080840160005b838110156154435781516001600160a01b03168752958201959082019060010161541e565b509495945050505050565b8060005b6002811015612c76578151845260209384019390910190600101615452565b600081518084526020808501945080840160005b8381101561544357815187529582019590820190600101615485565b600081518084526154b9816020860160208601615ad0565b601f01601f19169290920160200192915050565b6154d7818361544e565b604001919050565b600083516154f1818460208801615ad0565b835190830190615505818360208801615ad0565b01949350505050565b86815261551e602082018761544e565b61552b606082018661544e565b61553860a082018561544e565b61554560e082018461544e565b60609190911b6001600160601b0319166101208201526101340195945050505050565b838152615578602082018461544e565b606081019190915260800192915050565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b039290921682526001600160601b0316602082015260400190565b604081016124bd828461544e565b602081526000610ee96020830184615471565b918252602082015260400190565b93845260ff9290921660208401526040830152606082015260800190565b602081526000610ee960208301846154a1565b6020815260ff82511660208201526020820151604082015260018060a01b0360408301511660608201526000606083015160c0608084015261569760e084018261540a565b60808501516001600160601b0390811660a0868101919091529095015190941660c0909301929092525090919050565b61ffff93841681529183166020830152909116604082015260600190565b60006060820161ffff86168352602063ffffffff86168185015260606040850152818551808452608086019150828701935060005b818110156157365784518352938301939183019160010161571a565b509098975050505050505050565b9182526001600160a01b0316602082015260400190565b82815260608101610ee9602083018461544e565b8281526040602082015260006135a36040830184615471565b86815285602082015261ffff85166040820152600063ffffffff808616606084015280851660808401525060c060a0830152613c6860c08301846154a1565b878152602081018790526040810186905263ffffffff8581166060830152841660808201526001600160a01b03831660a082015260e060c08201819052600090613d8c908301846154a1565b8781526001600160401b03871660208201526040810186905263ffffffff8581166060830152841660808201526001600160a01b03831660a082015260e060c08201819052600090613d8c908301846154a1565b63ffffffff92831681529116602082015260400190565b6001600160401b0391909116815260200190565b6001600160601b038681168252851660208201526001600160401b03841660408201526001600160a01b038316606082015260a0608082018190526000906158dc9083018461540a565b979650505050505050565b6000808335601e198436030181126158fe57600080fd5b8301803591506001600160401b0382111561591857600080fd5b602001915036819003821315614cf657600080fd5b60405160c081016001600160401b038111828210171561594f5761594f615b83565b60405290565b60405161012081016001600160401b038111828210171561594f5761594f615b83565b604051601f8201601f191681016001600160401b03811182821017156159a0576159a0615b83565b604052919050565b600080858511156159b857600080fd5b838611156159c557600080fd5b5050820193919092039150565b600082198211156159e5576159e5615b2b565b500190565b60006001600160401b0382811684821680830382111561550557615505615b2b565b60006001600160601b0382811684821680830382111561550557615505615b2b565b600082615a3d57615a3d615b41565b500490565b6000816000190483118215151615615a5c57615a5c615b2b565b500290565b600082821015615a7357615a73615b2b565b500390565b60006001600160601b0383811690831681811015615a9857615a98615b2b565b039392505050565b6001600160e01b03198135818116916004851015615ac85780818660040360031b1b83161692505b505092915050565b60005b83811015615aeb578181015183820152602001615ad3565b83811115612c765750506000910152565b6000600019821415615b1057615b10615b2b565b5060010190565b600082615b2657615b26615b41565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461300d57600080fd5b801515811461300d57600080fdfe307866666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666a164736f6c6343000806000a", + ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"blockhashStore\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"internalBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"externalBalance\",\"type\":\"uint256\"}],\"name\":\"BalanceInvariantViolated\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockNum\",\"type\":\"uint256\"}],\"name\":\"BlockhashNotInStore\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"coordinatorAddress\",\"type\":\"address\"}],\"name\":\"CoordinatorAlreadyRegistered\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"coordinatorAddress\",\"type\":\"address\"}],\"name\":\"CoordinatorNotRegistered\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FailedToSendNative\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FailedToTransferLink\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"have\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"want\",\"type\":\"uint32\"}],\"name\":\"GasLimitTooBig\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"IncorrectCommitment\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"IndexOutOfRange\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficientBalance\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidCalldata\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"consumer\",\"type\":\"address\"}],\"name\":\"InvalidConsumer\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidExtraArgsTag\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"int256\",\"name\":\"linkWei\",\"type\":\"int256\"}],\"name\":\"InvalidLinkWeiPrice\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"transferredValue\",\"type\":\"uint256\"},{\"internalType\":\"uint96\",\"name\":\"expectedValue\",\"type\":\"uint96\"}],\"name\":\"InvalidNativeBalance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"have\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"min\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"max\",\"type\":\"uint16\"}],\"name\":\"InvalidRequestConfirmations\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidSubscription\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"requestVersion\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"expectedVersion\",\"type\":\"uint8\"}],\"name\":\"InvalidVersion\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"LinkAlreadySet\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"LinkNotSet\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"proposedOwner\",\"type\":\"address\"}],\"name\":\"MustBeRequestedOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"MustBeSubOwner\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NoCorrespondingRequest\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"keyHash\",\"type\":\"bytes32\"}],\"name\":\"NoSuchProvingKey\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"have\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"want\",\"type\":\"uint32\"}],\"name\":\"NumWordsTooBig\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableFromLink\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PaymentTooLarge\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PendingRequestExists\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"keyHash\",\"type\":\"bytes32\"}],\"name\":\"ProvingKeyAlreadyRegistered\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Reentrant\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SubscriptionIDCollisionFound\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TooManyConsumers\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"minimumRequestConfirmations\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"maxGasLimit\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"stalenessSeconds\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"gasAfterPaymentCalculation\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"fallbackWeiPerUnitLink\",\"type\":\"int256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"nativePremiumPercentage\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"linkPremiumPercentage\",\"type\":\"uint8\"}],\"name\":\"ConfigSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"coordinatorAddress\",\"type\":\"address\"}],\"name\":\"CoordinatorRegistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"FundsRecovered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newCoordinator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"}],\"name\":\"MigrationCompleted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"NativeFundsRecovered\",\"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\":\"bytes32\",\"name\":\"keyHash\",\"type\":\"bytes32\"}],\"name\":\"ProvingKeyRegistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"outputSeed\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"subID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"payment\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"name\":\"RandomWordsFulfilled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"keyHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"preSeed\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"minimumRequestConfirmations\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"callbackGasLimit\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"numWords\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"extraArgs\",\"type\":\"bytes\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RandomWordsRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amountLink\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amountNative\",\"type\":\"uint256\"}],\"name\":\"SubscriptionCanceled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"consumer\",\"type\":\"address\"}],\"name\":\"SubscriptionConsumerAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"consumer\",\"type\":\"address\"}],\"name\":\"SubscriptionConsumerRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"SubscriptionCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldBalance\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newBalance\",\"type\":\"uint256\"}],\"name\":\"SubscriptionFunded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldNativeBalance\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newNativeBalance\",\"type\":\"uint256\"}],\"name\":\"SubscriptionFundedWithNative\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"SubscriptionOwnerTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"SubscriptionOwnerTransferred\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BLOCKHASH_STORE\",\"outputs\":[{\"internalType\":\"contractBlockhashStoreInterface\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"LINK\",\"outputs\":[{\"internalType\":\"contractLinkTokenInterface\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"LINK_NATIVE_FEED\",\"outputs\":[{\"internalType\":\"contractAggregatorV3Interface\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAX_CONSUMERS\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAX_NUM_WORDS\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAX_REQUEST_CONFIRMATIONS\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"}],\"name\":\"acceptSubscriptionOwnerTransfer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"consumer\",\"type\":\"address\"}],\"name\":\"addConsumer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"cancelSubscription\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"createSubscription\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256[2]\",\"name\":\"pk\",\"type\":\"uint256[2]\"},{\"internalType\":\"uint256[2]\",\"name\":\"gamma\",\"type\":\"uint256[2]\"},{\"internalType\":\"uint256\",\"name\":\"c\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"s\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"seed\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"uWitness\",\"type\":\"address\"},{\"internalType\":\"uint256[2]\",\"name\":\"cGammaWitness\",\"type\":\"uint256[2]\"},{\"internalType\":\"uint256[2]\",\"name\":\"sHashWitness\",\"type\":\"uint256[2]\"},{\"internalType\":\"uint256\",\"name\":\"zInv\",\"type\":\"uint256\"}],\"internalType\":\"structVRF.Proof\",\"name\":\"proof\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"blockNum\",\"type\":\"uint64\"},{\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"numWords\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"extraArgs\",\"type\":\"bytes\"}],\"internalType\":\"structVRFCoordinatorV2PlusUpgradedVersion.RequestCommitment\",\"name\":\"rc\",\"type\":\"tuple\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"name\":\"fulfillRandomWords\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"}],\"name\":\"fundSubscriptionWithNative\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"startIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxCount\",\"type\":\"uint256\"}],\"name\":\"getActiveSubscriptionIds\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRequestConfig\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"},{\"internalType\":\"bytes32[]\",\"name\":\"\",\"type\":\"bytes32[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"}],\"name\":\"getSubscription\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"balance\",\"type\":\"uint96\"},{\"internalType\":\"uint96\",\"name\":\"nativeBalance\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"reqCount\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"subOwner\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"consumers\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[2]\",\"name\":\"publicKey\",\"type\":\"uint256[2]\"}],\"name\":\"hashOfKey\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"newCoordinator\",\"type\":\"address\"}],\"name\":\"migrate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"migrationVersion\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"encodedData\",\"type\":\"bytes\"}],\"name\":\"onMigration\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"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\":\"subId\",\"type\":\"uint256\"}],\"name\":\"ownerCancelSubscription\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"}],\"name\":\"pendingRequestExists\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"recoverFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"addresspayable\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"recoverNativeFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"}],\"name\":\"registerMigratableCoordinator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[2]\",\"name\":\"publicProvingKey\",\"type\":\"uint256[2]\"}],\"name\":\"registerProvingKey\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"consumer\",\"type\":\"address\"}],\"name\":\"removeConsumer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"keyHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"internalType\":\"uint16\",\"name\":\"requestConfirmations\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"numWords\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"extraArgs\",\"type\":\"bytes\"}],\"internalType\":\"structVRFV2PlusClient.RandomWordsRequest\",\"name\":\"req\",\"type\":\"tuple\"}],\"name\":\"requestRandomWords\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"requestSubscriptionOwnerTransfer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_config\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"minimumRequestConfirmations\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"maxGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"reentrancyLock\",\"type\":\"bool\"},{\"internalType\":\"uint32\",\"name\":\"stalenessSeconds\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"gasAfterPaymentCalculation\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"fulfillmentFlatFeeNativePPM\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"fulfillmentFlatFeeLinkDiscountPPM\",\"type\":\"uint32\"},{\"internalType\":\"uint8\",\"name\":\"nativePremiumPercentage\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"linkPremiumPercentage\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_currentSubNonce\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"s_provingKeyHashes\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"s_requestCommitments\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_totalBalance\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_totalNativeBalance\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"minimumRequestConfirmations\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"maxGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"stalenessSeconds\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"gasAfterPaymentCalculation\",\"type\":\"uint32\"},{\"internalType\":\"int256\",\"name\":\"fallbackWeiPerUnitLink\",\"type\":\"int256\"},{\"internalType\":\"uint32\",\"name\":\"fulfillmentFlatFeeNativePPM\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"fulfillmentFlatFeeLinkDiscountPPM\",\"type\":\"uint32\"},{\"internalType\":\"uint8\",\"name\":\"nativePremiumPercentage\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"linkPremiumPercentage\",\"type\":\"uint8\"}],\"name\":\"setConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"link\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"linkNativeFeed\",\"type\":\"address\"}],\"name\":\"setLINKAndLINKNativeFeed\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"addresspayable\",\"name\":\"recipient\",\"type\":\"address\"}],\"name\":\"withdrawNative\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Bin: "0x60a06040523480156200001157600080fd5b5060405162005ed638038062005ed6833981016040819052620000349162000183565b33806000816200008b5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000be57620000be81620000d7565b50505060601b6001600160601b031916608052620001b5565b6001600160a01b038116331415620001325760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000082565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6000602082840312156200019657600080fd5b81516001600160a01b0381168114620001ae57600080fd5b9392505050565b60805160601c615cfb620001db600039600081816104f401526134bb0152615cfb6000f3fe6080604052600436106101e05760003560e01c8062012291146101e5578063088070f5146102125780630ae09540146102e057806315c48b841461030257806318e3dd271461032a5780631b6b6d2314610369578063294daa49146103965780632f622e6b146103b2578063301f42e9146103d2578063405b84fa146103f257806340d6bb821461041257806341af6c871461043d57806351cff8d91461046d5780635d06b4ab1461048d57806364d51a2a146104ad57806365982744146104c2578063689c4517146104e257806372e9d5651461051657806379ba5097146105365780637bce14d11461054b5780638402595e1461056b57806386fe91c71461058b5780638da5cb5b146105ab57806395b55cfc146105c95780639b1c385e146105dc5780639d40a6fd1461060a578063a21a23e414610637578063a4c0ed361461064c578063a63e0bfb1461066c578063aa433aff1461068c578063aefb212f146106ac578063b2a7cac5146106d9578063bec4c08c146106f9578063caf70c4a14610719578063cb63179714610739578063ce3f471914610759578063d98e620e1461076c578063dac83d291461078c578063dc311dd3146107ac578063e72f6e30146107dd578063ee9d2d38146107fd578063f2fde38b1461082a575b600080fd5b3480156101f157600080fd5b506101fa61084a565b604051610209939291906157a8565b60405180910390f35b34801561021e57600080fd5b50600c546102839061ffff81169063ffffffff62010000820481169160ff600160301b8204811692600160381b8304811692600160581b8104821692600160781b8204831692600160981b83041691600160b81b8104821691600160c01b9091041689565b6040805161ffff909a168a5263ffffffff98891660208b01529615159689019690965293861660608801529185166080870152841660a08601529290921660c084015260ff91821660e08401521661010082015261012001610209565b3480156102ec57600080fd5b506103006102fb36600461541b565b6108c6565b005b34801561030e57600080fd5b5061031760c881565b60405161ffff9091168152602001610209565b34801561033657600080fd5b50600a5461035190600160601b90046001600160601b031681565b6040516001600160601b039091168152602001610209565b34801561037557600080fd5b50600254610389906001600160a01b031681565b604051610209919061564c565b3480156103a257600080fd5b5060405160028152602001610209565b3480156103be57600080fd5b506103006103cd366004614f35565b61090e565b3480156103de57600080fd5b506103516103ed3660046150ec565b610a5a565b3480156103fe57600080fd5b5061030061040d36600461541b565b610ef0565b34801561041e57600080fd5b506104286101f481565b60405163ffffffff9091168152602001610209565b34801561044957600080fd5b5061045d610458366004615402565b6112c1565b6040519015158152602001610209565b34801561047957600080fd5b50610300610488366004614f35565b611467565b34801561049957600080fd5b506103006104a8366004614f35565b6115f5565b3480156104b957600080fd5b50610317606481565b3480156104ce57600080fd5b506103006104dd366004614f52565b6116ac565b3480156104ee57600080fd5b506103897f000000000000000000000000000000000000000000000000000000000000000081565b34801561052257600080fd5b50600354610389906001600160a01b031681565b34801561054257600080fd5b5061030061170c565b34801561055757600080fd5b50610300610566366004614fe6565b6117b6565b34801561057757600080fd5b50610300610586366004614f35565b6118af565b34801561059757600080fd5b50600a54610351906001600160601b031681565b3480156105b757600080fd5b506000546001600160a01b0316610389565b6103006105d7366004615402565b6119bb565b3480156105e857600080fd5b506105fc6105f73660046151da565b611adc565b604051908152602001610209565b34801561061657600080fd5b5060075461062a906001600160401b031681565b6040516102099190615941565b34801561064357600080fd5b506105fc611ead565b34801561065857600080fd5b50610300610667366004614f8b565b612080565b34801561067857600080fd5b50610300610687366004615361565b6121fa565b34801561069857600080fd5b506103006106a7366004615402565b612403565b3480156106b857600080fd5b506106cc6106c7366004615440565b61244b565b60405161020991906156c3565b3480156106e557600080fd5b506103006106f4366004615402565b61254d565b34801561070557600080fd5b5061030061071436600461541b565b612642565b34801561072557600080fd5b506105fc61073436600461500e565b612734565b34801561074557600080fd5b5061030061075436600461541b565b612764565b610300610767366004615060565b6129cf565b34801561077857600080fd5b506105fc610787366004615402565b612d3f565b34801561079857600080fd5b506103006107a736600461541b565b612d60565b3480156107b857600080fd5b506107cc6107c7366004615402565b612df6565b604051610209959493929190615955565b3480156107e957600080fd5b506103006107f8366004614f35565b612ee4565b34801561080957600080fd5b506105fc610818366004615402565b600f6020526000908152604090205481565b34801561083657600080fd5b50610300610845366004614f35565b6130bf565b600c54600e805460408051602080840282018101909252828152600094859460609461ffff8316946201000090930463ffffffff169391928391908301828280156108b457602002820191906000526020600020905b8154815260200190600101908083116108a0575b50505050509050925092509250909192565b816108d0816130d3565b6108d8613134565b6108e1836112c1565b156108ff57604051631685ecdd60e31b815260040160405180910390fd5b6109098383613161565b505050565b610916613134565b61091e613315565b600b54600160601b90046001600160601b031661094e57604051631e9acf1760e31b815260040160405180910390fd5b600b8054600160601b90046001600160601b0316908190600c6109718380615b3b565b92506101000a8154816001600160601b0302191690836001600160601b0316021790555080600a600c8282829054906101000a90046001600160601b03166109b99190615b3b565b92506101000a8154816001600160601b0302191690836001600160601b031602179055506000826001600160a01b0316826001600160601b031660405160006040518083038185875af1925050503d8060008114610a33576040519150601f19603f3d011682016040523d82523d6000602084013e610a38565b606091505b50509050806109095760405163950b247960e01b815260040160405180910390fd5b6000610a64613134565b60005a90506000610a758686613368565b90506000856060015163ffffffff166001600160401b03811115610a9b57610a9b615c6d565b604051908082528060200260200182016040528015610ac4578160200160208202803683370190505b50905060005b866060015163ffffffff16811015610b3b57826040015181604051602001610af39291906156d6565b6040516020818303038152906040528051906020012060001c828281518110610b1e57610b1e615c57565b602090810291909101015280610b3381615bbf565b915050610aca565b50602080830180516000908152600f9092526040808320839055905190518291631fe543e360e01b91610b7391908690602401615832565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b031990941693909317909252600c805460ff60301b1916600160301b1790559089015160808a0151919250600091610bd89163ffffffff1690846135d3565b600c805460ff60301b1916905560208a810151600090815260069091526040902054909150600160c01b90046001600160401b0316610c18816001615aad565b6020808c0151600090815260069091526040812080546001600160401b0393909316600160c01b026001600160c01b039093169290921790915560a08b01518051610c6590600190615b24565b81518110610c7557610c75615c57565b602091010151600c5460f89190911c6001149150600090610ca6908a90600160581b900463ffffffff163a8561361f565b90508115610d9e576020808d01516000908152600690915260409020546001600160601b03808316600160601b909204161015610cf657604051631e9acf1760e31b815260040160405180910390fd5b60208c81015160009081526006909152604090208054829190600c90610d2d908490600160601b90046001600160601b0316615b3b565b92506101000a8154816001600160601b0302191690836001600160601b0316021790555080600b600c8282829054906101000a90046001600160601b0316610d759190615acf565b92506101000a8154816001600160601b0302191690836001600160601b03160217905550610e79565b6020808d01516000908152600690915260409020546001600160601b0380831691161015610ddf57604051631e9acf1760e31b815260040160405180910390fd5b6020808d015160009081526006909152604081208054839290610e0c9084906001600160601b0316615b3b565b92506101000a8154816001600160601b0302191690836001600160601b0316021790555080600b60008282829054906101000a90046001600160601b0316610e549190615acf565b92506101000a8154816001600160601b0302191690836001600160601b031602179055505b8b6020015188602001517f49580fdfd9497e1ed5c1b1cec0495087ae8e3f1267470ec2fb015db32e3d6aa78a604001518488604051610ed6939291909283526001600160601b039190911660208301521515604082015260600190565b60405180910390a3985050505050505050505b9392505050565b610ef8613134565b610f018161366e565b610f295780604051635428d44960e01b8152600401610f20919061564c565b60405180910390fd5b600080600080610f3886612df6565b945094505093509350336001600160a01b0316826001600160a01b031614610f9b5760405162461bcd60e51b81526020600482015260166024820152752737ba1039bab139b1b934b83a34b7b71037bbb732b960511b6044820152606401610f20565b610fa4866112c1565b15610fea5760405162461bcd60e51b815260206004820152601660248201527550656e64696e6720726571756573742065786973747360501b6044820152606401610f20565b60006040518060c00160405280610fff600290565b60ff168152602001888152602001846001600160a01b03168152602001838152602001866001600160601b03168152602001856001600160601b031681525090506000816040516020016110539190615715565b604051602081830303815290604052905061106d886136d8565b505060405163ce3f471960e01b81526001600160a01b0388169063ce3f4719906001600160601b038816906110a6908590600401615702565b6000604051808303818588803b1580156110bf57600080fd5b505af11580156110d3573d6000803e3d6000fd5b50506002546001600160a01b0316158015935091506110fc905057506001600160601b03861615155b156111c65760025460405163a9059cbb60e01b81526001600160a01b039091169063a9059cbb90611133908a908a90600401615693565b602060405180830381600087803b15801561114d57600080fd5b505af1158015611161573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611185919061502a565b6111c65760405162461bcd60e51b8152602060048201526012602482015271696e73756666696369656e742066756e647360701b6044820152606401610f20565b600c805460ff60301b1916600160301b17905560005b835181101561126f578381815181106111f7576111f7615c57565b60200260200101516001600160a01b0316638ea98117896040518263ffffffff1660e01b815260040161122a919061564c565b600060405180830381600087803b15801561124457600080fd5b505af1158015611258573d6000803e3d6000fd5b50505050808061126790615bbf565b9150506111dc565b50600c805460ff60301b191690556040517fd63ca8cb945956747ee69bfdc3ea754c24a4caf7418db70e46052f7850be4187906112af9089908b90615660565b60405180910390a15050505050505050565b6000818152600560209081526040808320815160608101835281546001600160a01b039081168252600183015416818501526002820180548451818702810187018652818152879693958601939092919083018282801561134b57602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161132d575b505050505081525050905060005b81604001515181101561145d5760005b600e5481101561144a576000611413600e838154811061138b5761138b615c57565b9060005260206000200154856040015185815181106113ac576113ac615c57565b60200260200101518860046000896040015189815181106113cf576113cf615c57565b6020908102919091018101516001600160a01b0316825281810192909252604090810160009081208d825290925290205461010090046001600160401b0316613880565b506000818152600f6020526040902054909150156114375750600195945050505050565b508061144281615bbf565b915050611369565b508061145581615bbf565b915050611359565b5060009392505050565b61146f613134565b611477613315565b6002546001600160a01b03166114a05760405163c1f0c0a160e01b815260040160405180910390fd5b600b546001600160601b03166114c957604051631e9acf1760e31b815260040160405180910390fd5b600b80546001600160601b031690819060006114e58380615b3b565b92506101000a8154816001600160601b0302191690836001600160601b0316021790555080600a60008282829054906101000a90046001600160601b031661152d9190615b3b565b82546001600160601b039182166101009390930a92830291909202199091161790555060025460405163a9059cbb60e01b81526001600160a01b039091169063a9059cbb906115829085908590600401615693565b602060405180830381600087803b15801561159c57600080fd5b505af11580156115b0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115d4919061502a565b6115f157604051631e9acf1760e31b815260040160405180910390fd5b5050565b6115fd613315565b6116068161366e565b15611626578060405163ac8a27ef60e01b8152600401610f20919061564c565b601280546001810182556000919091527fbb8a6a4669ba250d26cd7a459eca9d215f8307e33aebe50379bc5a3617ec34440180546001600160a01b0319166001600160a01b0383161790556040517fb7cabbfc11e66731fc77de0444614282023bcbd41d16781c753a431d0af01625906116a190839061564c565b60405180910390a150565b6116b4613315565b6002546001600160a01b0316156116de57604051631688c53760e11b815260040160405180910390fd5b600280546001600160a01b039384166001600160a01b03199182161790915560038054929093169116179055565b6001546001600160a01b0316331461175f5760405162461bcd60e51b815260206004820152601660248201527526bab9ba10313290383937b837b9b2b21037bbb732b960511b6044820152606401610f20565b60008054336001600160a01b0319808316821784556001805490911690556040516001600160a01b0390921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b6117be613315565b6040805180820182526000916117ed919084906002908390839080828437600092019190915250612734915050565b6000818152600d602052604090205490915060ff161561182357604051634a0b8fa760e01b815260048101829052602401610f20565b6000818152600d6020526040808220805460ff19166001908117909155600e805491820181559092527fbb7b4a454dc3493923482f07822329ed19e8244eff582cc204f8554c3620c3fd909101829055517fc9583fd3afa3d7f16eb0b88d0268e7d05c09bafa4b21e092cbd1320e1bc8089d906118a39083815260200190565b60405180910390a15050565b6118b7613315565b600a544790600160601b90046001600160601b0316818111156118f15780826040516354ced18160e11b8152600401610f209291906156d6565b818110156109095760006119058284615b24565b90506000846001600160a01b03168260405160006040518083038185875af1925050503d8060008114611954576040519150601f19603f3d011682016040523d82523d6000602084013e611959565b606091505b505090508061197b5760405163950b247960e01b815260040160405180910390fd5b7f4aed7c8eed0496c8c19ea2681fcca25741c1602342e38b045d9f1e8e905d2e9c85836040516119ac929190615660565b60405180910390a15050505050565b6119c3613134565b6000818152600560205260409020546001600160a01b03166119f857604051630fb532db60e11b815260040160405180910390fd5b60008181526006602052604090208054600160601b90046001600160601b0316903490600c611a278385615acf565b92506101000a8154816001600160601b0302191690836001600160601b0316021790555034600a600c8282829054906101000a90046001600160601b0316611a6f9190615acf565b92506101000a8154816001600160601b0302191690836001600160601b03160217905550817f7603b205d03651ee812f803fccde89f1012e545a9c99f0abfea9cedd0fd8e902823484611ac29190615a95565b604051611ad09291906156d6565b60405180910390a25050565b6000611ae6613134565b6020808301356000908152600590915260409020546001600160a01b0316611b2157604051630fb532db60e11b815260040160405180910390fd5b336000908152600460209081526040808320858301358452808352928190208151606081018352905460ff811615158083526001600160401b036101008304811695840195909552600160481b9091049093169181019190915290611ba1578360200135336040516379bfd40160e01b8152600401610f20929190615807565b600c5461ffff16611bb86060860160408701615346565b61ffff161080611bdb575060c8611bd56060860160408701615346565b61ffff16115b15611c1557611bf06060850160408601615346565b600c5460405163539c34bb60e11b8152610f20929161ffff169060c89060040161578a565b600c5462010000900463ffffffff16611c346080860160608701615462565b63ffffffff161115611c7a57611c506080850160608601615462565b600c54604051637aebf00f60e11b8152610f20929162010000900463ffffffff169060040161592a565b6101f4611c8d60a0860160808701615462565b63ffffffff161115611cc757611ca960a0850160808601615462565b6101f46040516311ce1afb60e21b8152600401610f2092919061592a565b806020018051611cd690615bda565b6001600160401b031690526020818101516000918291611cfe9188359133918a013590613880565b90925090506000611d1a611d1560a08901896159aa565b613909565b90506000611d2782613986565b905083611d326139f7565b60208a0135611d4760808c0160608d01615462565b611d5760a08d0160808e01615462565b3386604051602001611d6f979695949392919061588a565b60405160208183030381529060405280519060200120600f600086815260200190815260200160002081905550336001600160a01b0316886020013589600001357feb0e3652e0f44f417695e6e90f2f42c99b65cd7169074c5a654b16b9748c3a4e87878d6040016020810190611de69190615346565b8e6060016020810190611df99190615462565b8f6080016020810190611e0c9190615462565b89604051611e1f9695949392919061584b565b60405180910390a45050336000908152600460209081526040808320898301358452825291829020855181549287015193909601516001600160401b03908116600160481b02600160481b600160881b03199190941661010002610100600160481b0319971515979097166001600160481b031990931692909217959095171617909255925050505b919050565b6000611eb7613134565b6007546001600160401b031633611ecf600143615b24565b6040516001600160601b0319606093841b81166020830152914060348201523090921b1660548201526001600160c01b031960c083901b16606882015260700160408051601f1981840301815291905280516020909101209150611f34816001615aad565b600780546001600160401b0319166001600160401b03928316179055604080516000808252608082018352602080830182815283850183815260608086018581528a86526006855287862093518454935191516001600160601b039182166001600160c01b031990951694909417600160601b9190921602176001600160c01b0316600160c01b9290981691909102969096179055835194850184523385528481018281528585018481528884526005835294909220855181546001600160a01b03199081166001600160a01b0392831617835593516001830180549095169116179092559251805192949391926120329260028501920190614bf9565b5061204291506008905084613a87565b50827f1d3015d7ba850fa198dc7b1a3f5d42779313a681035f77c8c03764c61005518d33604051612073919061564c565b60405180910390a2505090565b612088613134565b6002546001600160a01b031633146120b3576040516344b0e3c360e01b815260040160405180910390fd5b602081146120d457604051638129bbcd60e01b815260040160405180910390fd5b60006120e282840184615402565b6000818152600560205260409020549091506001600160a01b031661211a57604051630fb532db60e11b815260040160405180910390fd5b600081815260066020526040812080546001600160601b0316918691906121418385615acf565b92506101000a8154816001600160601b0302191690836001600160601b0316021790555084600a60008282829054906101000a90046001600160601b03166121899190615acf565b92506101000a8154816001600160601b0302191690836001600160601b03160217905550817f1ced9348ff549fceab2ac57cd3a9de38edaaab274b725ee82c23e8fc8c4eec7a8287846121dc9190615a95565b6040516121ea9291906156d6565b60405180910390a2505050505050565b612202613315565b60c861ffff8a16111561222f57888960c860405163539c34bb60e11b8152600401610f209392919061578a565b60008513612253576040516321ea67b360e11b815260048101869052602401610f20565b604080516101208101825261ffff8b1680825263ffffffff808c16602084018190526000848601528b8216606085018190528b8316608086018190528a841660a08701819052938a1660c0870181905260ff808b1660e08901819052908a16610100909801889052600c8054600160c01b90990260ff60c01b19600160b81b9093029290921661ffff60b81b19600160981b90940263ffffffff60981b19600160781b90990298909816600160781b600160b81b0319600160581b90960263ffffffff60581b19600160381b90980297909716600160301b600160781b03196201000090990265ffffffffffff19909c16909a179a909a1796909616979097179390931791909116959095179290921793909316929092179190911790556010869055517f95cb2ddab6d2297c29a4861691de69b3969c464aa4a9c44258b101ff02ff375a906123f0908b908b908b908b908b908990899061ffff97909716875263ffffffff95861660208801529385166040870152919093166060850152608084019290925260ff91821660a08401521660c082015260e00190565b60405180910390a1505050505050505050565b61240b613315565b6000818152600560205260409020546001600160a01b03168061244157604051630fb532db60e11b815260040160405180910390fd5b6115f18282613161565b606060006124596008613a93565b905080841061247b57604051631390f2a160e01b815260040160405180910390fd5b60006124878486615a95565b905081811180612495575083155b61249f57806124a1565b815b905060006124af8683615b24565b9050806001600160401b038111156124c9576124c9615c6d565b6040519080825280602002602001820160405280156124f2578160200160208202803683370190505b50935060005b818110156125425761251561250d8883615a95565b600890613a9d565b85828151811061252757612527615c57565b602090810291909101015261253b81615bbf565b90506124f8565b505050505b92915050565b612555613134565b6000818152600560205260409020546001600160a01b03168061258b57604051630fb532db60e11b815260040160405180910390fd5b6000828152600560205260409020600101546001600160a01b031633146125e2576000828152600560205260409081902060010154905163d084e97560e01b8152610f20916001600160a01b03169060040161564c565b600082815260056020526040908190208054336001600160a01b031991821681178355600190920180549091169055905183917fd4114ab6e9af9f597c52041f32d62dc57c5c4e4c0d4427006069635e216c938691611ad0918591615679565b8161264c816130d3565b612654613134565b6001600160a01b03821660009081526004602090815260408083208684529091529020805460ff16156126875750505050565b60008481526005602052604090206002018054606414156126bb576040516305a48e0f60e01b815260040160405180910390fd5b8154600160ff1990911681178355815490810182556000828152602090200180546001600160a01b0319166001600160a01b03861617905560405185907f1e980d04aa7648e205713e5e8ea3808672ac163d10936d36f91b2c88ac1575e19061272590879061564c565b60405180910390a25050505050565b60008160405160200161274791906156b5565b604051602081830303815290604052805190602001209050919050565b8161276e816130d3565b612776613134565b61277f836112c1565b1561279d57604051631685ecdd60e31b815260040160405180910390fd5b6001600160a01b038216600090815260046020908152604080832086845290915290205460ff166127e55782826040516379bfd40160e01b8152600401610f20929190615807565b60008381526005602090815260408083206002018054825181850281018501909352808352919290919083018282801561284857602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161282a575b5050505050905060006001825161285f9190615b24565b905060005b825181101561296b57846001600160a01b031683828151811061288957612889615c57565b60200260200101516001600160a01b031614156129595760008383815181106128b4576128b4615c57565b60200260200101519050806005600089815260200190815260200160002060020183815481106128e6576128e6615c57565b600091825260208083209190910180546001600160a01b0319166001600160a01b03949094169390931790925588815260059091526040902060020180548061293157612931615c41565b600082815260209020810160001990810180546001600160a01b03191690550190555061296b565b8061296381615bbf565b915050612864565b506001600160a01b03841660009081526004602090815260408083208884529091529081902080546001600160881b03191690555185907f32158c6058347c1601b2d12bc696ac6901d8a9a9aa3ba10c27ab0a983e8425a79061272590879061564c565b60006129dd82840184615214565b9050806000015160ff16600114612a1657805160405163237d181f60e21b815260ff909116600482015260016024820152604401610f20565b8060a001516001600160601b03163414612a5a5760a08101516040516306acf13560e41b81523460048201526001600160601b039091166024820152604401610f20565b6020808201516000908152600590915260409020546001600160a01b031615612a96576040516326afa43560e11b815260040160405180910390fd5b60005b816060015151811015612b8f57604051806060016040528060011515815260200160006001600160401b0316815260200160006001600160401b03168152506004600084606001518481518110612af257612af2615c57565b6020908102919091018101516001600160a01b0316825281810192909252604090810160009081208684015182528352819020835181549385015194909201516001600160481b0319909316911515610100600160481b031916919091176101006001600160401b039485160217600160481b600160881b031916600160481b939092169290920217905580612b8781615bbf565b915050612a99565b50604080516060808201835260808401516001600160601b03908116835260a0850151811660208085019182526000858701818152828901805183526006845288832097518854955192516001600160401b0316600160c01b026001600160c01b03938816600160601b026001600160c01b0319909716919097161794909417169390931790945584518084018652868601516001600160a01b03908116825281860184815294880151828801908152925184526005865295909220825181549087166001600160a01b0319918216178255935160018201805491909716941693909317909455925180519192612c8e92600285019290910190614bf9565b5050506080810151600a8054600090612cb19084906001600160601b0316615acf565b92506101000a8154816001600160601b0302191690836001600160601b031602179055508060a00151600a600c8282829054906101000a90046001600160601b0316612cfd9190615acf565b92506101000a8154816001600160601b0302191690836001600160601b03160217905550612d3981602001516008613a8790919063ffffffff16565b50505050565b600e8181548110612d4f57600080fd5b600091825260209091200154905081565b81612d6a816130d3565b612d72613134565b600083815260056020526040902060018101546001600160a01b03848116911614612d39576001810180546001600160a01b0319166001600160a01b03851617905560405184907f21a4dad170a6bf476c31bbcf4a16628295b0e450672eec25d7c93308e05344a190612de89033908790615679565b60405180910390a250505050565b600081815260056020526040812054819081906001600160a01b0316606081612e3257604051630fb532db60e11b815260040160405180910390fd5b600086815260066020908152604080832054600583529281902060020180548251818502810185019093528083526001600160601b0380861695600160601b810490911694600160c01b9091046001600160401b0316938893929091839190830182828015612eca57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311612eac575b505050505090509450945094509450945091939590929450565b612eec613315565b6002546001600160a01b0316612f155760405163c1f0c0a160e01b815260040160405180910390fd5b6002546040516370a0823160e01b81526000916001600160a01b0316906370a0823190612f4690309060040161564c565b60206040518083038186803b158015612f5e57600080fd5b505afa158015612f72573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f969190615047565b600a549091506001600160601b031681811115612fca5780826040516354ced18160e11b8152600401610f209291906156d6565b81811015610909576000612fde8284615b24565b60025460405163a9059cbb60e01b81529192506001600160a01b03169063a9059cbb906130119087908590600401615660565b602060405180830381600087803b15801561302b57600080fd5b505af115801561303f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613063919061502a565b61308057604051631f01ff1360e21b815260040160405180910390fd5b7f59bfc682b673f8cbf945f1e454df9334834abf7dfe7f92237ca29ecb9b43660084826040516130b1929190615660565b60405180910390a150505050565b6130c7613315565b6130d081613aa9565b50565b6000818152600560205260409020546001600160a01b03168061310957604051630fb532db60e11b815260040160405180910390fd5b336001600160a01b038216146115f15780604051636c51fda960e11b8152600401610f20919061564c565b600c54600160301b900460ff161561315f5760405163769dd35360e11b815260040160405180910390fd5b565b60008061316d846136d8565b60025491935091506001600160a01b03161580159061319457506001600160601b03821615155b156132435760025460405163a9059cbb60e01b81526001600160a01b039091169063a9059cbb906131d49086906001600160601b03871690600401615660565b602060405180830381600087803b1580156131ee57600080fd5b505af1158015613202573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613226919061502a565b61324357604051631e9acf1760e31b815260040160405180910390fd5b6000836001600160a01b0316826001600160601b031660405160006040518083038185875af1925050503d8060008114613299576040519150601f19603f3d011682016040523d82523d6000602084013e61329e565b606091505b50509050806132c05760405163950b247960e01b815260040160405180910390fd5b604080516001600160a01b03861681526001600160601b03808616602083015284169181019190915285907f8c74ce8b8cf87f5eb001275c8be27eb34ea2b62bfab6814fcc62192bb63e81c490606001612725565b6000546001600160a01b0316331461315f5760405162461bcd60e51b815260206004820152601660248201527527b7363c9031b0b63630b1363290313c9037bbb732b960511b6044820152606401610f20565b604080516060810182526000808252602082018190529181019190915260006133948460000151612734565b6000818152600d602052604090205490915060ff166133c957604051631dfd6e1360e21b815260048101829052602401610f20565b60008185608001516040516020016133e29291906156d6565b60408051601f1981840301815291815281516020928301206000818152600f9093529120549091508061342857604051631b44092560e11b815260040160405180910390fd5b845160208087015160408089015160608a015160808b015160a08c01519351613457978a9790969591016158d6565b60405160208183030381529060405280519060200120811461348c5760405163354a450b60e21b815260040160405180910390fd5b600061349b8660000151613b4d565b905080613562578551604051631d2827a760e31b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163e9413d38916134ef9190600401615941565b60206040518083038186803b15801561350757600080fd5b505afa15801561351b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061353f9190615047565b90508061356257855160405163175dadad60e01b8152610f209190600401615941565b6000876080015182604051602001613584929190918252602082015260400190565b6040516020818303038152906040528051906020012060001c905060006135ab8983613c2a565b6040805160608101825297885260208801969096529486019490945250929695505050505050565b60005a6113888110156135e557600080fd5b6113888103905084604082048203116135fd57600080fd5b50823b61360957600080fd5b60008083516020850160008789f1949350505050565b6000811561364c576011546136459086908690600160201b900463ffffffff1686613c95565b9050613666565b601154613663908690869063ffffffff1686613d37565b90505b949350505050565b6000805b6012548110156136cf57826001600160a01b03166012828154811061369957613699615c57565b6000918252602090912001546001600160a01b031614156136bd5750600192915050565b806136c781615bbf565b915050613672565b50600092915050565b60008181526005602090815260408083206006909252822054600290910180546001600160601b0380841694600160601b90940416925b8181101561377a576004600084838154811061372d5761372d615c57565b60009182526020808320909101546001600160a01b031683528281019390935260409182018120898252909252902080546001600160881b031916905561377381615bbf565b905061370f565b50600085815260056020526040812080546001600160a01b031990811682556001820180549091169055906137b26002830182614c5e565b50506000858152600660205260408120556137ce600886613e5c565b506001600160601b0384161561382157600a80548591906000906137fc9084906001600160601b0316615b3b565b92506101000a8154816001600160601b0302191690836001600160601b031602179055505b6001600160601b038316156138795782600a600c8282829054906101000a90046001600160601b03166138549190615b3b565b92506101000a8154816001600160601b0302191690836001600160601b031602179055505b5050915091565b60408051602081018690526001600160a01b03851691810191909152606081018390526001600160401b03821660808201526000908190819060a00160408051601f1981840301815290829052805160209182012092506138e59189918491016156d6565b60408051808303601f19018152919052805160209091012097909650945050505050565b604080516020810190915260008152816139325750604080516020810190915260008152612547565b63125fa26760e31b6139448385615b63565b6001600160e01b0319161461396c57604051632923fee760e11b815260040160405180910390fd5b6139798260048186615a6b565b810190610ee991906150a1565b60607f92fd13387c7fe7befbc38d303d6468778fb9731bc4583f17d92989c6fcfdeaaa826040516024016139bf91511515815260200190565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915292915050565b600046613a0381613e68565b15613a805760646001600160a01b031663a3b1b31d6040518163ffffffff1660e01b815260040160206040518083038186803b158015613a4257600080fd5b505afa158015613a56573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613a7a9190615047565b91505090565b4391505090565b6000610ee98383613e8b565b6000612547825490565b6000610ee98383613eda565b6001600160a01b038116331415613afc5760405162461bcd60e51b815260206004820152601760248201527621b0b73737ba103a3930b739b332b9103a379039b2b63360491b6044820152606401610f20565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b600046613b5981613e68565b15613c1b57610100836001600160401b0316613b736139f7565b613b7d9190615b24565b1180613b995750613b8c6139f7565b836001600160401b031610155b15613ba75750600092915050565b6040516315a03d4160e11b8152606490632b407a8290613bcb908690600401615941565b60206040518083038186803b158015613be357600080fd5b505afa158015613bf7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ee99190615047565b50506001600160401b03164090565b6000613c5e8360000151846020015185604001518660600151868860a001518960c001518a60e001518b6101000151613f04565b60038360200151604051602001613c7692919061581e565b60408051601f1981840301815291905280516020909101209392505050565b600080613cd86000368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061411f92505050565b905060005a613ce78888615a95565b613cf19190615b24565b613cfb9085615b05565b90506000613d1463ffffffff871664e8d4a51000615b05565b905082613d218284615a95565b613d2b9190615a95565b98975050505050505050565b600080613d426141e4565b905060008113613d68576040516321ea67b360e11b815260048101829052602401610f20565b6000613daa6000368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061411f92505050565b9050600082825a613dbb8b8b615a95565b613dc59190615b24565b613dcf9088615b05565b613dd99190615a95565b613deb90670de0b6b3a7640000615b05565b613df59190615af1565b90506000613e0e63ffffffff881664e8d4a51000615b05565b9050613e2581676765c793fa10079d601b1b615b24565b821115613e455760405163e80fa38160e01b815260040160405180910390fd5b613e4f8183615a95565b9998505050505050505050565b6000610ee983836142af565b600061a4b1821480613e7c575062066eed82145b8061254757505062066eee1490565b6000818152600183016020526040812054613ed257508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155612547565b506000612547565b6000826000018281548110613ef157613ef1615c57565b9060005260206000200154905092915050565b613f0d896143a2565b613f565760405162461bcd60e51b815260206004820152601a6024820152797075626c6963206b6579206973206e6f74206f6e20637572766560301b6044820152606401610f20565b613f5f886143a2565b613fa35760405162461bcd60e51b815260206004820152601560248201527467616d6d61206973206e6f74206f6e20637572766560581b6044820152606401610f20565b613fac836143a2565b613ff85760405162461bcd60e51b815260206004820152601d60248201527f6347616d6d615769746e657373206973206e6f74206f6e2063757276650000006044820152606401610f20565b614001826143a2565b61404c5760405162461bcd60e51b815260206004820152601c60248201527b73486173685769746e657373206973206e6f74206f6e20637572766560201b6044820152606401610f20565b614058878a8887614465565b6140a05760405162461bcd60e51b81526020600482015260196024820152786164647228632a706b2b732a6729213d5f755769746e65737360381b6044820152606401610f20565b60006140ac8a87614579565b905060006140bf898b878b8689896145dd565b905060006140d0838d8d8a866146f0565b9050808a146141115760405162461bcd60e51b815260206004820152600d60248201526c34b73b30b634b210383937b7b360991b6044820152606401610f20565b505050505050505050505050565b60004661412b81613e68565b1561416a57606c6001600160a01b031663c6f7de0e6040518163ffffffff1660e01b815260040160206040518083038186803b158015613be357600080fd5b61417381614730565b156136cf57600f602160991b016001600160a01b03166349948e0e84604051806080016040528060488152602001615ca7604891396040516020016141b99291906155a2565b6040516020818303038152906040526040518263ffffffff1660e01b8152600401613bcb9190615702565b600c5460035460408051633fabe5a360e21b81529051600093600160381b900463ffffffff169283151592859283926001600160a01b03169163feaf968c9160048083019260a0929190829003018186803b15801561424257600080fd5b505afa158015614256573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061427a919061547d565b50945090925084915050801561429e57506142958242615b24565b8463ffffffff16105b156136665750601054949350505050565b600081815260018301602052604081205480156143985760006142d3600183615b24565b85549091506000906142e790600190615b24565b905081811461434c57600086600001828154811061430757614307615c57565b906000526020600020015490508087600001848154811061432a5761432a615c57565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061435d5761435d615c41565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050612547565b6000915050612547565b80516000906401000003d019116143f05760405162461bcd60e51b8152602060048201526012602482015271696e76616c696420782d6f7264696e61746560701b6044820152606401610f20565b60208201516401000003d0191161443e5760405162461bcd60e51b8152602060048201526012602482015271696e76616c696420792d6f7264696e61746560701b6044820152606401610f20565b60208201516401000003d01990800961445e8360005b602002015161476a565b1492915050565b60006001600160a01b0382166144ab5760405162461bcd60e51b815260206004820152600b60248201526a626164207769746e65737360a81b6044820152606401610f20565b6020840151600090600116156144c257601c6144c5565b601b5b9050600070014551231950b75fc4402da1732fc9bebe1985876000602002015109865170014551231950b75fc4402da1732fc9bebe199182039250600091908909875160408051600080825260209091019182905292935060019161452f918691889187906156e4565b6020604051602081039080840390855afa158015614551573d6000803e3d6000fd5b5050604051601f1901516001600160a01b039081169088161495505050505050949350505050565b614581614c7c565b6145ae6001848460405160200161459a9392919061562b565b60405160208183030381529060405261478e565b90505b6145ba816143a2565b6125475780516040805160208101929092526145d6910161459a565b90506145b1565b6145e5614c7c565b825186516401000003d01990819006910614156146445760405162461bcd60e51b815260206004820152601e60248201527f706f696e747320696e2073756d206d7573742062652064697374696e637400006044820152606401610f20565b61464f8789886147dc565b6146945760405162461bcd60e51b8152602060048201526016602482015275119a5c9cdd081b5d5b0818da1958dac819985a5b195960521b6044820152606401610f20565b61469f8486856147dc565b6146e55760405162461bcd60e51b815260206004820152601760248201527614d958dbdb99081b5d5b0818da1958dac819985a5b1959604a1b6044820152606401610f20565b613d2b8684846148f7565b60006002868686858760405160200161470e969594939291906155d1565b60408051601f1981840301815291905280516020909101209695505050505050565b6000600a82148061474257506101a482145b8061474f575062aa37dc82145b8061475b575061210582145b8061254757505062014a331490565b6000806401000003d01980848509840990506401000003d019600782089392505050565b614796614c7c565b61479f826149ba565b81526147b46147af826000614454565b6149f5565b602082018190526002900660011415611ea8576020810180516401000003d019039052919050565b6000826148195760405162461bcd60e51b815260206004820152600b60248201526a3d32b9379039b1b0b630b960a91b6044820152606401610f20565b8351602085015160009061482f90600290615c01565b1561483b57601c61483e565b601b5b9050600070014551231950b75fc4402da1732fc9bebe198387096040805160008082526020909101918290529192506001906148819083908690889087906156e4565b6020604051602081039080840390855afa1580156148a3573d6000803e3d6000fd5b5050506020604051035190506000866040516020016148c29190615590565b60408051601f1981840301815291905280516020909101206001600160a01b0392831692169190911498975050505050505050565b6148ff614c7c565b83516020808601518551918601516000938493849361492093909190614a15565b919450925090506401000003d01985820960011461497c5760405162461bcd60e51b815260206004820152601960248201527834b73b2d1036bab9ba1031329034b73b32b939b29037b3103d60391b6044820152606401610f20565b60405180604001604052806401000003d0198061499b5761499b615c2b565b87860981526020016401000003d0198785099052979650505050505050565b805160208201205b6401000003d0198110611ea8576040805160208082019390935281518082038401815290820190915280519101206149c2565b6000612547826002614a0e6401000003d0196001615a95565b901c614af5565b60008080600180826401000003d019896401000003d019038808905060006401000003d0198b6401000003d019038a0890506000614a5583838585614b8c565b9098509050614a6688828e88614bb0565b9098509050614a7788828c87614bb0565b90985090506000614a8a8d878b85614bb0565b9098509050614a9b88828686614b8c565b9098509050614aac88828e89614bb0565b9098509050818114614ae1576401000003d019818a0998506401000003d01982890997506401000003d0198183099650614ae5565b8196505b5050505050509450945094915050565b600080614b00614c9a565b6020808252818101819052604082015260608101859052608081018490526401000003d01960a0820152614b32614cb8565b60208160c0846005600019fa925082614b825760405162461bcd60e51b81526020600482015260126024820152716269674d6f64457870206661696c7572652160701b6044820152606401610f20565b5195945050505050565b6000806401000003d0198487096401000003d0198487099097909650945050505050565b600080806401000003d019878509905060006401000003d01987876401000003d019030990506401000003d0198183086401000003d01986890990999098509650505050505050565b828054828255906000526020600020908101928215614c4e579160200282015b82811115614c4e57825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190614c19565b50614c5a929150614cd6565b5090565b50805460008255906000526020600020908101906130d09190614cd6565b60405180604001604052806002906020820280368337509192915050565b6040518060c001604052806006906020820280368337509192915050565b60405180602001604052806001906020820280368337509192915050565b5b80821115614c5a5760008155600101614cd7565b8035611ea881615c83565b600082601f830112614d0757600080fd5b604080519081016001600160401b0381118282101715614d2957614d29615c6d565b8060405250808385604086011115614d4057600080fd5b60005b6002811015614d62578135835260209283019290910190600101614d43565b509195945050505050565b8035611ea881615c98565b60008083601f840112614d8a57600080fd5b5081356001600160401b03811115614da157600080fd5b602083019150836020828501011115614db957600080fd5b9250929050565b600082601f830112614dd157600080fd5b81356001600160401b03811115614dea57614dea615c6d565b614dfd601f8201601f1916602001615a3b565b818152846020838601011115614e1257600080fd5b816020850160208301376000918101602001919091529392505050565b600060c08284031215614e4157600080fd5b614e496159f0565b905081356001600160401b038082168214614e6357600080fd5b81835260208401356020840152614e7c60408501614ee2565b6040840152614e8d60608501614ee2565b6060840152614e9e60808501614ceb565b608084015260a0840135915080821115614eb757600080fd5b50614ec484828501614dc0565b60a08301525092915050565b803561ffff81168114611ea857600080fd5b803563ffffffff81168114611ea857600080fd5b803560ff81168114611ea857600080fd5b80516001600160501b0381168114611ea857600080fd5b80356001600160601b0381168114611ea857600080fd5b600060208284031215614f4757600080fd5b8135610ee981615c83565b60008060408385031215614f6557600080fd5b8235614f7081615c83565b91506020830135614f8081615c83565b809150509250929050565b60008060008060608587031215614fa157600080fd5b8435614fac81615c83565b93506020850135925060408501356001600160401b03811115614fce57600080fd5b614fda87828801614d78565b95989497509550505050565b600060408284031215614ff857600080fd5b8260408301111561500857600080fd5b50919050565b60006040828403121561502057600080fd5b610ee98383614cf6565b60006020828403121561503c57600080fd5b8151610ee981615c98565b60006020828403121561505957600080fd5b5051919050565b6000806020838503121561507357600080fd5b82356001600160401b0381111561508957600080fd5b61509585828601614d78565b90969095509350505050565b6000602082840312156150b357600080fd5b604051602081016001600160401b03811182821017156150d5576150d5615c6d565b60405282356150e381615c98565b81529392505050565b60008060008385036101e081121561510357600080fd5b6101a08082121561511357600080fd5b61511b615a18565b91506151278787614cf6565b82526151368760408801614cf6565b60208301526080860135604083015260a0860135606083015260c0860135608083015261516560e08701614ceb565b60a083015261010061517988828901614cf6565b60c084015261518c886101408901614cf6565b60e0840152610180870135908301529093508401356001600160401b038111156151b557600080fd5b6151c186828701614e2f565b9250506151d16101c08501614d6d565b90509250925092565b6000602082840312156151ec57600080fd5b81356001600160401b0381111561520257600080fd5b820160c08185031215610ee957600080fd5b6000602080838503121561522757600080fd5b82356001600160401b038082111561523e57600080fd5b9084019060c0828703121561525257600080fd5b61525a6159f0565b61526383614ef6565b81528383013584820152604083013561527b81615c83565b604082015260608301358281111561529257600080fd5b8301601f810188136152a357600080fd5b8035838111156152b5576152b5615c6d565b8060051b93506152c6868501615a3b565b8181528681019083880186850189018c10156152e157600080fd5b600096505b8387101561531057803594506152fb85615c83565b848352600196909601959188019188016152e6565b5060608501525061532691505060808401614f1e565b608082015261533760a08401614f1e565b60a08201529695505050505050565b60006020828403121561535857600080fd5b610ee982614ed0565b60008060008060008060008060006101208a8c03121561538057600080fd5b6153898a614ed0565b985061539760208b01614ee2565b97506153a560408b01614ee2565b96506153b360608b01614ee2565b955060808a013594506153c860a08b01614ee2565b93506153d660c08b01614ee2565b92506153e460e08b01614ef6565b91506153f36101008b01614ef6565b90509295985092959850929598565b60006020828403121561541457600080fd5b5035919050565b6000806040838503121561542e57600080fd5b823591506020830135614f8081615c83565b6000806040838503121561545357600080fd5b50508035926020909101359150565b60006020828403121561547457600080fd5b610ee982614ee2565b600080600080600060a0868803121561549557600080fd5b61549e86614f07565b94506020860151935060408601519250606086015191506154c160808701614f07565b90509295509295909350565b600081518084526020808501945080840160005b838110156155065781516001600160a01b0316875295820195908201906001016154e1565b509495945050505050565b8060005b6002811015612d39578151845260209384019390910190600101615515565b600081518084526020808501945080840160005b8381101561550657815187529582019590820190600101615548565b6000815180845261557c816020860160208601615b93565b601f01601f19169290920160200192915050565b61559a8183615511565b604001919050565b600083516155b4818460208801615b93565b8351908301906155c8818360208801615b93565b01949350505050565b8681526155e16020820187615511565b6155ee6060820186615511565b6155fb60a0820185615511565b61560860e0820184615511565b60609190911b6001600160601b0319166101208201526101340195945050505050565b83815261563b6020820184615511565b606081019190915260800192915050565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b039290921682526001600160601b0316602082015260400190565b604081016125478284615511565b602081526000610ee96020830184615534565b918252602082015260400190565b93845260ff9290921660208401526040830152606082015260800190565b602081526000610ee96020830184615564565b6020815260ff82511660208201526020820151604082015260018060a01b0360408301511660608201526000606083015160c0608084015261575a60e08401826154cd565b60808501516001600160601b0390811660a0868101919091529095015190941660c0909301929092525090919050565b61ffff93841681529183166020830152909116604082015260600190565b60006060820161ffff86168352602063ffffffff86168185015260606040850152818551808452608086019150828701935060005b818110156157f9578451835293830193918301916001016157dd565b509098975050505050505050565b9182526001600160a01b0316602082015260400190565b82815260608101610ee96020830184615511565b8281526040602082015260006136666040830184615534565b86815285602082015261ffff85166040820152600063ffffffff808616606084015280851660808401525060c060a0830152613d2b60c0830184615564565b878152602081018790526040810186905263ffffffff8581166060830152841660808201526001600160a01b03831660a082015260e060c08201819052600090613e4f90830184615564565b8781526001600160401b03871660208201526040810186905263ffffffff8581166060830152841660808201526001600160a01b03831660a082015260e060c08201819052600090613e4f90830184615564565b63ffffffff92831681529116602082015260400190565b6001600160401b0391909116815260200190565b6001600160601b038681168252851660208201526001600160401b03841660408201526001600160a01b038316606082015260a06080820181905260009061599f908301846154cd565b979650505050505050565b6000808335601e198436030181126159c157600080fd5b8301803591506001600160401b038211156159db57600080fd5b602001915036819003821315614db957600080fd5b60405160c081016001600160401b0381118282101715615a1257615a12615c6d565b60405290565b60405161012081016001600160401b0381118282101715615a1257615a12615c6d565b604051601f8201601f191681016001600160401b0381118282101715615a6357615a63615c6d565b604052919050565b60008085851115615a7b57600080fd5b83861115615a8857600080fd5b5050820193919092039150565b60008219821115615aa857615aa8615c15565b500190565b60006001600160401b038281168482168083038211156155c8576155c8615c15565b60006001600160601b038281168482168083038211156155c8576155c8615c15565b600082615b0057615b00615c2b565b500490565b6000816000190483118215151615615b1f57615b1f615c15565b500290565b600082821015615b3657615b36615c15565b500390565b60006001600160601b0383811690831681811015615b5b57615b5b615c15565b039392505050565b6001600160e01b03198135818116916004851015615b8b5780818660040360031b1b83161692505b505092915050565b60005b83811015615bae578181015183820152602001615b96565b83811115612d395750506000910152565b6000600019821415615bd357615bd3615c15565b5060010190565b60006001600160401b0382811680821415615bf757615bf7615c15565b6001019392505050565b600082615c1057615c10615c2b565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146130d057600080fd5b80151581146130d057600080fdfe307866666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666a164736f6c6343000806000a", } var VRFCoordinatorV2PlusUpgradedVersionABI = VRFCoordinatorV2PlusUpgradedVersionMetaData.ABI @@ -393,7 +393,7 @@ func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionC outstruct.Balance = *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) outstruct.NativeBalance = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) outstruct.ReqCount = *abi.ConvertType(out[2], new(uint64)).(*uint64) - outstruct.Owner = *abi.ConvertType(out[3], new(common.Address)).(*common.Address) + outstruct.SubOwner = *abi.ConvertType(out[3], new(common.Address)).(*common.Address) outstruct.Consumers = *abi.ConvertType(out[4], new([]common.Address)).(*[]common.Address) return *outstruct, err @@ -3236,7 +3236,7 @@ type GetSubscription struct { Balance *big.Int NativeBalance *big.Int ReqCount uint64 - Owner common.Address + SubOwner common.Address Consumers []common.Address } type SConfig struct { diff --git a/core/gethwrappers/generated/vrfv2plus_consumer_example/vrfv2plus_consumer_example.go b/core/gethwrappers/generated/vrfv2plus_consumer_example/vrfv2plus_consumer_example.go index 20f3d4422b1..90f7df890f0 100644 --- a/core/gethwrappers/generated/vrfv2plus_consumer_example/vrfv2plus_consumer_example.go +++ b/core/gethwrappers/generated/vrfv2plus_consumer_example/vrfv2plus_consumer_example.go @@ -31,8 +31,8 @@ var ( ) var VRFV2PlusConsumerExampleMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"vrfCoordinator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"link\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"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\":\"ZeroAddress\",\"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\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"createSubscriptionAndFund\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"createSubscriptionAndFundNative\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"idx\",\"type\":\"uint256\"}],\"name\":\"getRandomness\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"randomWord\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"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\":\"bytes32\",\"name\":\"keyHash\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"nativePayment\",\"type\":\"bool\"}],\"name\":\"requestRandomWords\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_linkToken\",\"outputs\":[{\"internalType\":\"contractLinkTokenInterface\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_recentRequestId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"s_requests\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"fulfilled\",\"type\":\"bool\"},{\"internalType\":\"address\",\"name\":\"requester\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_subId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_vrfCoordinator\",\"outputs\":[{\"internalType\":\"contractIVRFCoordinatorV2Plus\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_vrfCoordinatorApiV1\",\"outputs\":[{\"internalType\":\"contractIVRFCoordinatorV2Plus\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_vrfCoordinator\",\"type\":\"address\"}],\"name\":\"setCoordinator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"}],\"name\":\"setSubId\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"topUpSubscription\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"topUpSubscriptionNative\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"consumers\",\"type\":\"address[]\"}],\"name\":\"updateSubscription\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x60806040523480156200001157600080fd5b50604051620019c6380380620019c68339810160408190526200003491620001cc565b8133806000816200008c5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000bf57620000bf8162000103565b5050600280546001600160a01b03199081166001600160a01b0394851617909155600580548216958416959095179094555060038054909316911617905562000204565b6001600160a01b0381163314156200015e5760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000083565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b80516001600160a01b0381168114620001c757600080fd5b919050565b60008060408385031215620001e057600080fd5b620001eb83620001af565b9150620001fb60208401620001af565b90509250929050565b6117b280620002146000396000f3fe6080604052600436106101445760003560e01c806380980043116100c0578063b96dbba711610074578063de367c8e11610059578063de367c8e146103c0578063eff27017146103ed578063f2fde38b1461040d57600080fd5b8063b96dbba714610398578063cf62c8ab146103a057600080fd5b80638ea98117116100a55780638ea98117146102c45780639eccacf6146102e4578063a168fa891461031157600080fd5b806380980043146102795780638da5cb5b1461029957600080fd5b806336bfffed11610117578063706da1ca116100fc578063706da1ca146101fc5780637725135b1461021257806379ba50971461026457600080fd5b806336bfffed146101c65780635d7d53e3146101e657600080fd5b80631d2b2afd146101495780631fe543e31461015357806329e5d831146101735780632fa4e442146101a6575b600080fd5b61015161042d565b005b34801561015f57600080fd5b5061015161016e3660046113eb565b610528565b34801561017f57600080fd5b5061019361018e36600461148f565b6105a9565b6040519081526020015b60405180910390f35b3480156101b257600080fd5b506101516101c136600461151c565b6106e6565b3480156101d257600080fd5b506101516101e13660046112f8565b610808565b3480156101f257600080fd5b5061019360045481565b34801561020857600080fd5b5061019360065481565b34801561021e57600080fd5b5060035461023f9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161019d565b34801561027057600080fd5b50610151610940565b34801561028557600080fd5b506101516102943660046113b9565b600655565b3480156102a557600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff1661023f565b3480156102d057600080fd5b506101516102df3660046112d6565b610a3d565b3480156102f057600080fd5b5060025461023f9073ffffffffffffffffffffffffffffffffffffffff1681565b34801561031d57600080fd5b5061036661032c3660046113b9565b6007602052600090815260409020805460019091015460ff821691610100900473ffffffffffffffffffffffffffffffffffffffff169083565b60408051931515845273ffffffffffffffffffffffffffffffffffffffff90921660208401529082015260600161019d565b610151610b48565b3480156103ac57600080fd5b506101516103bb36600461151c565b610bae565b3480156103cc57600080fd5b5060055461023f9073ffffffffffffffffffffffffffffffffffffffff1681565b3480156103f957600080fd5b506101516104083660046114b1565b610bf5565b34801561041957600080fd5b506101516104283660046112d6565b610de0565b60065461049b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600b60248201527f737562206e6f742073657400000000000000000000000000000000000000000060448201526064015b60405180910390fd5b6005546006546040517f95b55cfc000000000000000000000000000000000000000000000000000000008152600481019190915273ffffffffffffffffffffffffffffffffffffffff909116906395b55cfc9034906024015b6000604051808303818588803b15801561050d57600080fd5b505af1158015610521573d6000803e3d6000fd5b5050505050565b60025473ffffffffffffffffffffffffffffffffffffffff16331461059b576002546040517f1cf993f400000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff9091166024820152604401610492565b6105a58282610df4565b5050565b60008281526007602090815260408083208151608081018352815460ff811615158252610100900473ffffffffffffffffffffffffffffffffffffffff16818501526001820154818401526002820180548451818702810187019095528085528695929460608601939092919083018282801561064557602002820191906000526020600020905b815481526020019060010190808311610631575b50505050508152505090508060400151600014156106bf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f7265717565737420494420697320696e636f72726563740000000000000000006044820152606401610492565b806060015183815181106106d5576106d5611739565b602002602001015191505092915050565b60065461074f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600b60248201527f737562206e6f74207365740000000000000000000000000000000000000000006044820152606401610492565b60035460025460065460408051602081019290925273ffffffffffffffffffffffffffffffffffffffff93841693634000aea09316918591015b6040516020818303038152906040526040518463ffffffff1660e01b81526004016107b6939291906115b5565b602060405180830381600087803b1580156107d057600080fd5b505af11580156107e4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105a5919061139c565b600654610871576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f7375624944206e6f7420736574000000000000000000000000000000000000006044820152606401610492565b60005b81518110156105a557600554600654835173ffffffffffffffffffffffffffffffffffffffff9092169163bec4c08c91908590859081106108b7576108b7611739565b60200260200101516040518363ffffffff1660e01b81526004016108fb92919091825273ffffffffffffffffffffffffffffffffffffffff16602082015260400190565b600060405180830381600087803b15801561091557600080fd5b505af1158015610929573d6000803e3d6000fd5b505050508080610938906116d9565b915050610874565b60015473ffffffffffffffffffffffffffffffffffffffff1633146109c1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e6572000000000000000000006044820152606401610492565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b60005473ffffffffffffffffffffffffffffffffffffffff163314801590610a7d575060025473ffffffffffffffffffffffffffffffffffffffff163314155b15610b015733610aa260005473ffffffffffffffffffffffffffffffffffffffff1690565b6002546040517f061db9c100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff93841660048201529183166024830152919091166044820152606401610492565b600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b610b50610ebf565b506005546006546040517f95b55cfc000000000000000000000000000000000000000000000000000000008152600481019190915273ffffffffffffffffffffffffffffffffffffffff909116906395b55cfc9034906024016104f4565b610bb6610ebf565b5060035460025460065460408051602081019290925273ffffffffffffffffffffffffffffffffffffffff93841693634000aea0931691859101610789565b60006040518060c0016040528084815260200160065481526020018661ffff1681526020018763ffffffff1681526020018563ffffffff168152602001610c4b6040518060200160405280861515815250611004565b90526002546040517f9b1c385e00000000000000000000000000000000000000000000000000000000815291925060009173ffffffffffffffffffffffffffffffffffffffff90911690639b1c385e90610ca9908590600401611601565b602060405180830381600087803b158015610cc357600080fd5b505af1158015610cd7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cfb91906113d2565b604080516080810182526000808252336020808401918252838501868152855184815280830187526060860190815287855260078352959093208451815493517fffffffffffffffffffffff0000000000000000000000000000000000000000009094169015157fffffffffffffffffffffff0000000000000000000000000000000000000000ff161761010073ffffffffffffffffffffffffffffffffffffffff9094169390930292909217825591516001820155925180519495509193849392610dce926002850192910190611239565b50505060049190915550505050505050565b610de86110c0565b610df181611143565b50565b6004548214610e5f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f7265717565737420494420697320696e636f72726563740000000000000000006044820152606401610492565b60008281526007602090815260409091208251610e8492600290920191840190611239565b5050600090815260076020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b600060065460001415610ffd57600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a21a23e46040518163ffffffff1660e01b8152600401602060405180830381600087803b158015610f3657600080fd5b505af1158015610f4a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f6e91906113d2565b60068190556005546040517fbec4c08c000000000000000000000000000000000000000000000000000000008152600481019290925230602483015273ffffffffffffffffffffffffffffffffffffffff169063bec4c08c90604401600060405180830381600087803b158015610fe457600080fd5b505af1158015610ff8573d6000803e3d6000fd5b505050505b5060065490565b60607f92fd13387c7fe7befbc38d303d6468778fb9731bc4583f17d92989c6fcfdeaaa8260405160240161103d91511515815260200190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915292915050565b60005473ffffffffffffffffffffffffffffffffffffffff163314611141576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e6572000000000000000000006044820152606401610492565b565b73ffffffffffffffffffffffffffffffffffffffff81163314156111c3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401610492565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b828054828255906000526020600020908101928215611274579160200282015b82811115611274578251825591602001919060010190611259565b50611280929150611284565b5090565b5b808211156112805760008155600101611285565b803573ffffffffffffffffffffffffffffffffffffffff811681146112bd57600080fd5b919050565b803563ffffffff811681146112bd57600080fd5b6000602082840312156112e857600080fd5b6112f182611299565b9392505050565b6000602080838503121561130b57600080fd5b823567ffffffffffffffff81111561132257600080fd5b8301601f8101851361133357600080fd5b8035611346611341826116b5565b611666565b80828252848201915084840188868560051b870101111561136657600080fd5b600094505b838510156113905761137c81611299565b83526001949094019391850191850161136b565b50979650505050505050565b6000602082840312156113ae57600080fd5b81516112f181611797565b6000602082840312156113cb57600080fd5b5035919050565b6000602082840312156113e457600080fd5b5051919050565b600080604083850312156113fe57600080fd5b8235915060208084013567ffffffffffffffff81111561141d57600080fd5b8401601f8101861361142e57600080fd5b803561143c611341826116b5565b80828252848201915084840189868560051b870101111561145c57600080fd5b600094505b8385101561147f578035835260019490940193918501918501611461565b5080955050505050509250929050565b600080604083850312156114a257600080fd5b50508035926020909101359150565b600080600080600060a086880312156114c957600080fd5b6114d2866112c2565b9450602086013561ffff811681146114e957600080fd5b93506114f7604087016112c2565b925060608601359150608086013561150e81611797565b809150509295509295909350565b60006020828403121561152e57600080fd5b81356bffffffffffffffffffffffff811681146112f157600080fd5b6000815180845260005b8181101561157057602081850181015186830182015201611554565b81811115611582576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b73ffffffffffffffffffffffffffffffffffffffff841681526bffffffffffffffffffffffff831660208201526060604082015260006115f8606083018461154a565b95945050505050565b60208152815160208201526020820151604082015261ffff60408301511660608201526000606083015163ffffffff80821660808501528060808601511660a0850152505060a083015160c08084015261165e60e084018261154a565b949350505050565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156116ad576116ad611768565b604052919050565b600067ffffffffffffffff8211156116cf576116cf611768565b5060051b60200190565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415611732577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b8015158114610df157600080fdfea164736f6c6343000806000a", + ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"vrfCoordinator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"link\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"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\":\"ZeroAddress\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"vrfCoordinator\",\"type\":\"address\"}],\"name\":\"CoordinatorSet\",\"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\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"createSubscriptionAndFund\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"createSubscriptionAndFundNative\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"idx\",\"type\":\"uint256\"}],\"name\":\"getRandomness\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"randomWord\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"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\":\"bytes32\",\"name\":\"keyHash\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"nativePayment\",\"type\":\"bool\"}],\"name\":\"requestRandomWords\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_linkToken\",\"outputs\":[{\"internalType\":\"contractLinkTokenInterface\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_recentRequestId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"s_requests\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"fulfilled\",\"type\":\"bool\"},{\"internalType\":\"address\",\"name\":\"requester\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_subId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_vrfCoordinator\",\"outputs\":[{\"internalType\":\"contractIVRFCoordinatorV2Plus\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_vrfCoordinatorApiV1\",\"outputs\":[{\"internalType\":\"contractIVRFCoordinatorV2Plus\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_vrfCoordinator\",\"type\":\"address\"}],\"name\":\"setCoordinator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"}],\"name\":\"setSubId\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"topUpSubscription\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"topUpSubscriptionNative\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"consumers\",\"type\":\"address[]\"}],\"name\":\"updateSubscription\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Bin: "0x60806040523480156200001157600080fd5b5060405162001a6d38038062001a6d8339810160408190526200003491620001f4565b8133806000816200008c5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000bf57620000bf816200012b565b5050506001600160a01b038116620000ea5760405163d92e233d60e01b815260040160405180910390fd5b600280546001600160a01b03199081166001600160a01b0393841617909155600580548216948316949094179093556003805490931691161790556200022c565b6001600160a01b038116331415620001865760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000083565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b80516001600160a01b0381168114620001ef57600080fd5b919050565b600080604083850312156200020857600080fd5b6200021383620001d7565b91506200022360208401620001d7565b90509250929050565b611831806200023c6000396000f3fe6080604052600436106101445760003560e01c806380980043116100c0578063b96dbba711610074578063de367c8e11610059578063de367c8e146103c0578063eff27017146103ed578063f2fde38b1461040d57600080fd5b8063b96dbba714610398578063cf62c8ab146103a057600080fd5b80638ea98117116100a55780638ea98117146102c45780639eccacf6146102e4578063a168fa891461031157600080fd5b806380980043146102795780638da5cb5b1461029957600080fd5b806336bfffed11610117578063706da1ca116100fc578063706da1ca146101fc5780637725135b1461021257806379ba50971461026457600080fd5b806336bfffed146101c65780635d7d53e3146101e657600080fd5b80631d2b2afd146101495780631fe543e31461015357806329e5d831146101735780632fa4e442146101a6575b600080fd5b61015161042d565b005b34801561015f57600080fd5b5061015161016e36600461146a565b610528565b34801561017f57600080fd5b5061019361018e36600461150e565b6105a9565b6040519081526020015b60405180910390f35b3480156101b257600080fd5b506101516101c136600461159b565b6106e6565b3480156101d257600080fd5b506101516101e1366004611377565b610808565b3480156101f257600080fd5b5061019360045481565b34801561020857600080fd5b5061019360065481565b34801561021e57600080fd5b5060035461023f9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161019d565b34801561027057600080fd5b50610151610940565b34801561028557600080fd5b50610151610294366004611438565b600655565b3480156102a557600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff1661023f565b3480156102d057600080fd5b506101516102df366004611355565b610a3d565b3480156102f057600080fd5b5060025461023f9073ffffffffffffffffffffffffffffffffffffffff1681565b34801561031d57600080fd5b5061036661032c366004611438565b6007602052600090815260409020805460019091015460ff821691610100900473ffffffffffffffffffffffffffffffffffffffff169083565b60408051931515845273ffffffffffffffffffffffffffffffffffffffff90921660208401529082015260600161019d565b610151610bc7565b3480156103ac57600080fd5b506101516103bb36600461159b565b610c2d565b3480156103cc57600080fd5b5060055461023f9073ffffffffffffffffffffffffffffffffffffffff1681565b3480156103f957600080fd5b50610151610408366004611530565b610c74565b34801561041957600080fd5b50610151610428366004611355565b610e5f565b60065461049b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600b60248201527f737562206e6f742073657400000000000000000000000000000000000000000060448201526064015b60405180910390fd5b6005546006546040517f95b55cfc000000000000000000000000000000000000000000000000000000008152600481019190915273ffffffffffffffffffffffffffffffffffffffff909116906395b55cfc9034906024015b6000604051808303818588803b15801561050d57600080fd5b505af1158015610521573d6000803e3d6000fd5b5050505050565b60025473ffffffffffffffffffffffffffffffffffffffff16331461059b576002546040517f1cf993f400000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff9091166024820152604401610492565b6105a58282610e73565b5050565b60008281526007602090815260408083208151608081018352815460ff811615158252610100900473ffffffffffffffffffffffffffffffffffffffff16818501526001820154818401526002820180548451818702810187019095528085528695929460608601939092919083018282801561064557602002820191906000526020600020905b815481526020019060010190808311610631575b50505050508152505090508060400151600014156106bf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f7265717565737420494420697320696e636f72726563740000000000000000006044820152606401610492565b806060015183815181106106d5576106d56117b8565b602002602001015191505092915050565b60065461074f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600b60248201527f737562206e6f74207365740000000000000000000000000000000000000000006044820152606401610492565b60035460025460065460408051602081019290925273ffffffffffffffffffffffffffffffffffffffff93841693634000aea09316918591015b6040516020818303038152906040526040518463ffffffff1660e01b81526004016107b693929190611634565b602060405180830381600087803b1580156107d057600080fd5b505af11580156107e4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105a5919061141b565b600654610871576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f7375624944206e6f7420736574000000000000000000000000000000000000006044820152606401610492565b60005b81518110156105a557600554600654835173ffffffffffffffffffffffffffffffffffffffff9092169163bec4c08c91908590859081106108b7576108b76117b8565b60200260200101516040518363ffffffff1660e01b81526004016108fb92919091825273ffffffffffffffffffffffffffffffffffffffff16602082015260400190565b600060405180830381600087803b15801561091557600080fd5b505af1158015610929573d6000803e3d6000fd5b50505050808061093890611758565b915050610874565b60015473ffffffffffffffffffffffffffffffffffffffff1633146109c1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e6572000000000000000000006044820152606401610492565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b60005473ffffffffffffffffffffffffffffffffffffffff163314801590610a7d575060025473ffffffffffffffffffffffffffffffffffffffff163314155b15610b015733610aa260005473ffffffffffffffffffffffffffffffffffffffff1690565b6002546040517f061db9c100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff93841660048201529183166024830152919091166044820152606401610492565b73ffffffffffffffffffffffffffffffffffffffff8116610b4e576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527fd1a6a14209a385a964d036e404cb5cfb71f4000cdb03c9366292430787261be69060200160405180910390a150565b610bcf610f3e565b506005546006546040517f95b55cfc000000000000000000000000000000000000000000000000000000008152600481019190915273ffffffffffffffffffffffffffffffffffffffff909116906395b55cfc9034906024016104f4565b610c35610f3e565b5060035460025460065460408051602081019290925273ffffffffffffffffffffffffffffffffffffffff93841693634000aea0931691859101610789565b60006040518060c0016040528084815260200160065481526020018661ffff1681526020018763ffffffff1681526020018563ffffffff168152602001610cca6040518060200160405280861515815250611083565b90526002546040517f9b1c385e00000000000000000000000000000000000000000000000000000000815291925060009173ffffffffffffffffffffffffffffffffffffffff90911690639b1c385e90610d28908590600401611680565b602060405180830381600087803b158015610d4257600080fd5b505af1158015610d56573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d7a9190611451565b604080516080810182526000808252336020808401918252838501868152855184815280830187526060860190815287855260078352959093208451815493517fffffffffffffffffffffff0000000000000000000000000000000000000000009094169015157fffffffffffffffffffffff0000000000000000000000000000000000000000ff161761010073ffffffffffffffffffffffffffffffffffffffff9094169390930292909217825591516001820155925180519495509193849392610e4d9260028501929101906112b8565b50505060049190915550505050505050565b610e6761113f565b610e70816111c2565b50565b6004548214610ede576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f7265717565737420494420697320696e636f72726563740000000000000000006044820152606401610492565b60008281526007602090815260409091208251610f03926002909201918401906112b8565b5050600090815260076020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b60006006546000141561107c57600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a21a23e46040518163ffffffff1660e01b8152600401602060405180830381600087803b158015610fb557600080fd5b505af1158015610fc9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fed9190611451565b60068190556005546040517fbec4c08c000000000000000000000000000000000000000000000000000000008152600481019290925230602483015273ffffffffffffffffffffffffffffffffffffffff169063bec4c08c90604401600060405180830381600087803b15801561106357600080fd5b505af1158015611077573d6000803e3d6000fd5b505050505b5060065490565b60607f92fd13387c7fe7befbc38d303d6468778fb9731bc4583f17d92989c6fcfdeaaa826040516024016110bc91511515815260200190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915292915050565b60005473ffffffffffffffffffffffffffffffffffffffff1633146111c0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e6572000000000000000000006044820152606401610492565b565b73ffffffffffffffffffffffffffffffffffffffff8116331415611242576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401610492565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b8280548282559060005260206000209081019282156112f3579160200282015b828111156112f35782518255916020019190600101906112d8565b506112ff929150611303565b5090565b5b808211156112ff5760008155600101611304565b803573ffffffffffffffffffffffffffffffffffffffff8116811461133c57600080fd5b919050565b803563ffffffff8116811461133c57600080fd5b60006020828403121561136757600080fd5b61137082611318565b9392505050565b6000602080838503121561138a57600080fd5b823567ffffffffffffffff8111156113a157600080fd5b8301601f810185136113b257600080fd5b80356113c56113c082611734565b6116e5565b80828252848201915084840188868560051b87010111156113e557600080fd5b600094505b8385101561140f576113fb81611318565b8352600194909401939185019185016113ea565b50979650505050505050565b60006020828403121561142d57600080fd5b815161137081611816565b60006020828403121561144a57600080fd5b5035919050565b60006020828403121561146357600080fd5b5051919050565b6000806040838503121561147d57600080fd5b8235915060208084013567ffffffffffffffff81111561149c57600080fd5b8401601f810186136114ad57600080fd5b80356114bb6113c082611734565b80828252848201915084840189868560051b87010111156114db57600080fd5b600094505b838510156114fe5780358352600194909401939185019185016114e0565b5080955050505050509250929050565b6000806040838503121561152157600080fd5b50508035926020909101359150565b600080600080600060a0868803121561154857600080fd5b61155186611341565b9450602086013561ffff8116811461156857600080fd5b935061157660408701611341565b925060608601359150608086013561158d81611816565b809150509295509295909350565b6000602082840312156115ad57600080fd5b81356bffffffffffffffffffffffff8116811461137057600080fd5b6000815180845260005b818110156115ef576020818501810151868301820152016115d3565b81811115611601576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b73ffffffffffffffffffffffffffffffffffffffff841681526bffffffffffffffffffffffff8316602082015260606040820152600061167760608301846115c9565b95945050505050565b60208152815160208201526020820151604082015261ffff60408301511660608201526000606083015163ffffffff80821660808501528060808601511660a0850152505060a083015160c0808401526116dd60e08401826115c9565b949350505050565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff8111828210171561172c5761172c6117e7565b604052919050565b600067ffffffffffffffff82111561174e5761174e6117e7565b5060051b60200190565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156117b1577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b8015158114610e7057600080fdfea164736f6c6343000806000a", } var VRFV2PlusConsumerExampleABI = VRFV2PlusConsumerExampleMetaData.ABI @@ -488,6 +488,123 @@ func (_VRFV2PlusConsumerExample *VRFV2PlusConsumerExampleTransactorSession) Upda return _VRFV2PlusConsumerExample.Contract.UpdateSubscription(&_VRFV2PlusConsumerExample.TransactOpts, consumers) } +type VRFV2PlusConsumerExampleCoordinatorSetIterator struct { + Event *VRFV2PlusConsumerExampleCoordinatorSet + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *VRFV2PlusConsumerExampleCoordinatorSetIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(VRFV2PlusConsumerExampleCoordinatorSet) + 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(VRFV2PlusConsumerExampleCoordinatorSet) + 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 *VRFV2PlusConsumerExampleCoordinatorSetIterator) Error() error { + return it.fail +} + +func (it *VRFV2PlusConsumerExampleCoordinatorSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type VRFV2PlusConsumerExampleCoordinatorSet struct { + VrfCoordinator common.Address + Raw types.Log +} + +func (_VRFV2PlusConsumerExample *VRFV2PlusConsumerExampleFilterer) FilterCoordinatorSet(opts *bind.FilterOpts) (*VRFV2PlusConsumerExampleCoordinatorSetIterator, error) { + + logs, sub, err := _VRFV2PlusConsumerExample.contract.FilterLogs(opts, "CoordinatorSet") + if err != nil { + return nil, err + } + return &VRFV2PlusConsumerExampleCoordinatorSetIterator{contract: _VRFV2PlusConsumerExample.contract, event: "CoordinatorSet", logs: logs, sub: sub}, nil +} + +func (_VRFV2PlusConsumerExample *VRFV2PlusConsumerExampleFilterer) WatchCoordinatorSet(opts *bind.WatchOpts, sink chan<- *VRFV2PlusConsumerExampleCoordinatorSet) (event.Subscription, error) { + + logs, sub, err := _VRFV2PlusConsumerExample.contract.WatchLogs(opts, "CoordinatorSet") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(VRFV2PlusConsumerExampleCoordinatorSet) + if err := _VRFV2PlusConsumerExample.contract.UnpackLog(event, "CoordinatorSet", 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 (_VRFV2PlusConsumerExample *VRFV2PlusConsumerExampleFilterer) ParseCoordinatorSet(log types.Log) (*VRFV2PlusConsumerExampleCoordinatorSet, error) { + event := new(VRFV2PlusConsumerExampleCoordinatorSet) + if err := _VRFV2PlusConsumerExample.contract.UnpackLog(event, "CoordinatorSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + type VRFV2PlusConsumerExampleOwnershipTransferRequestedIterator struct { Event *VRFV2PlusConsumerExampleOwnershipTransferRequested @@ -768,6 +885,8 @@ type SRequests struct { func (_VRFV2PlusConsumerExample *VRFV2PlusConsumerExample) ParseLog(log types.Log) (generated.AbigenLog, error) { switch log.Topics[0] { + case _VRFV2PlusConsumerExample.abi.Events["CoordinatorSet"].ID: + return _VRFV2PlusConsumerExample.ParseCoordinatorSet(log) case _VRFV2PlusConsumerExample.abi.Events["OwnershipTransferRequested"].ID: return _VRFV2PlusConsumerExample.ParseOwnershipTransferRequested(log) case _VRFV2PlusConsumerExample.abi.Events["OwnershipTransferred"].ID: @@ -778,6 +897,10 @@ func (_VRFV2PlusConsumerExample *VRFV2PlusConsumerExample) ParseLog(log types.Lo } } +func (VRFV2PlusConsumerExampleCoordinatorSet) Topic() common.Hash { + return common.HexToHash("0xd1a6a14209a385a964d036e404cb5cfb71f4000cdb03c9366292430787261be6") +} + func (VRFV2PlusConsumerExampleOwnershipTransferRequested) Topic() common.Hash { return common.HexToHash("0xed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae1278") } @@ -831,6 +954,12 @@ type VRFV2PlusConsumerExampleInterface interface { UpdateSubscription(opts *bind.TransactOpts, consumers []common.Address) (*types.Transaction, error) + FilterCoordinatorSet(opts *bind.FilterOpts) (*VRFV2PlusConsumerExampleCoordinatorSetIterator, error) + + WatchCoordinatorSet(opts *bind.WatchOpts, sink chan<- *VRFV2PlusConsumerExampleCoordinatorSet) (event.Subscription, error) + + ParseCoordinatorSet(log types.Log) (*VRFV2PlusConsumerExampleCoordinatorSet, error) + FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*VRFV2PlusConsumerExampleOwnershipTransferRequestedIterator, error) WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *VRFV2PlusConsumerExampleOwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) diff --git a/core/gethwrappers/generated/vrfv2plus_malicious_migrator/vrfv2plus_malicious_migrator.go b/core/gethwrappers/generated/vrfv2plus_malicious_migrator/vrfv2plus_malicious_migrator.go index 03c5ffd8ccc..d87facd2326 100644 --- a/core/gethwrappers/generated/vrfv2plus_malicious_migrator/vrfv2plus_malicious_migrator.go +++ b/core/gethwrappers/generated/vrfv2plus_malicious_migrator/vrfv2plus_malicious_migrator.go @@ -5,6 +5,7 @@ package vrfv2plus_malicious_migrator import ( "errors" + "fmt" "math/big" "strings" @@ -14,6 +15,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/event" + "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated" ) var ( @@ -29,7 +31,7 @@ var ( ) var VRFV2PlusMaliciousMigratorMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_vrfCoordinator\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"setCoordinator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_vrfCoordinator\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"vrfCoordinator\",\"type\":\"address\"}],\"name\":\"CoordinatorSet\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"setCoordinator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", Bin: "0x608060405234801561001057600080fd5b506040516102e03803806102e083398101604081905261002f91610054565b600080546001600160a01b0319166001600160a01b0392909216919091179055610084565b60006020828403121561006657600080fd5b81516001600160a01b038116811461007d57600080fd5b9392505050565b61024d806100936000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c80638ea9811714610030575b600080fd5b61004361003e36600461012a565b610045565b005b600080546040805160c081018252838152602080820185905281830185905260608201859052608082018590528251908101835293845260a0810193909352517f9b1c385e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911691639b1c385e916100d49190600401610180565b602060405180830381600087803b1580156100ee57600080fd5b505af1158015610102573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101269190610167565b5050565b60006020828403121561013c57600080fd5b813573ffffffffffffffffffffffffffffffffffffffff8116811461016057600080fd5b9392505050565b60006020828403121561017957600080fd5b5051919050565b6000602080835283518184015280840151604084015261ffff6040850151166060840152606084015163ffffffff80821660808601528060808701511660a0860152505060a084015160c08085015280518060e086015260005b818110156101f757828101840151868201610100015283016101da565b8181111561020a57600061010083880101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016939093016101000194935050505056fea164736f6c6343000806000a", } @@ -181,6 +183,137 @@ func (_VRFV2PlusMaliciousMigrator *VRFV2PlusMaliciousMigratorTransactorSession) return _VRFV2PlusMaliciousMigrator.Contract.SetCoordinator(&_VRFV2PlusMaliciousMigrator.TransactOpts, arg0) } +type VRFV2PlusMaliciousMigratorCoordinatorSetIterator struct { + Event *VRFV2PlusMaliciousMigratorCoordinatorSet + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *VRFV2PlusMaliciousMigratorCoordinatorSetIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(VRFV2PlusMaliciousMigratorCoordinatorSet) + 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(VRFV2PlusMaliciousMigratorCoordinatorSet) + 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 *VRFV2PlusMaliciousMigratorCoordinatorSetIterator) Error() error { + return it.fail +} + +func (it *VRFV2PlusMaliciousMigratorCoordinatorSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type VRFV2PlusMaliciousMigratorCoordinatorSet struct { + VrfCoordinator common.Address + Raw types.Log +} + +func (_VRFV2PlusMaliciousMigrator *VRFV2PlusMaliciousMigratorFilterer) FilterCoordinatorSet(opts *bind.FilterOpts) (*VRFV2PlusMaliciousMigratorCoordinatorSetIterator, error) { + + logs, sub, err := _VRFV2PlusMaliciousMigrator.contract.FilterLogs(opts, "CoordinatorSet") + if err != nil { + return nil, err + } + return &VRFV2PlusMaliciousMigratorCoordinatorSetIterator{contract: _VRFV2PlusMaliciousMigrator.contract, event: "CoordinatorSet", logs: logs, sub: sub}, nil +} + +func (_VRFV2PlusMaliciousMigrator *VRFV2PlusMaliciousMigratorFilterer) WatchCoordinatorSet(opts *bind.WatchOpts, sink chan<- *VRFV2PlusMaliciousMigratorCoordinatorSet) (event.Subscription, error) { + + logs, sub, err := _VRFV2PlusMaliciousMigrator.contract.WatchLogs(opts, "CoordinatorSet") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(VRFV2PlusMaliciousMigratorCoordinatorSet) + if err := _VRFV2PlusMaliciousMigrator.contract.UnpackLog(event, "CoordinatorSet", 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 (_VRFV2PlusMaliciousMigrator *VRFV2PlusMaliciousMigratorFilterer) ParseCoordinatorSet(log types.Log) (*VRFV2PlusMaliciousMigratorCoordinatorSet, error) { + event := new(VRFV2PlusMaliciousMigratorCoordinatorSet) + if err := _VRFV2PlusMaliciousMigrator.contract.UnpackLog(event, "CoordinatorSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +func (_VRFV2PlusMaliciousMigrator *VRFV2PlusMaliciousMigrator) ParseLog(log types.Log) (generated.AbigenLog, error) { + switch log.Topics[0] { + case _VRFV2PlusMaliciousMigrator.abi.Events["CoordinatorSet"].ID: + return _VRFV2PlusMaliciousMigrator.ParseCoordinatorSet(log) + + default: + return nil, fmt.Errorf("abigen wrapper received unknown log topic: %v", log.Topics[0]) + } +} + +func (VRFV2PlusMaliciousMigratorCoordinatorSet) Topic() common.Hash { + return common.HexToHash("0xd1a6a14209a385a964d036e404cb5cfb71f4000cdb03c9366292430787261be6") +} + func (_VRFV2PlusMaliciousMigrator *VRFV2PlusMaliciousMigrator) Address() common.Address { return _VRFV2PlusMaliciousMigrator.address } @@ -188,5 +321,13 @@ func (_VRFV2PlusMaliciousMigrator *VRFV2PlusMaliciousMigrator) Address() common. type VRFV2PlusMaliciousMigratorInterface interface { SetCoordinator(opts *bind.TransactOpts, arg0 common.Address) (*types.Transaction, error) + FilterCoordinatorSet(opts *bind.FilterOpts) (*VRFV2PlusMaliciousMigratorCoordinatorSetIterator, error) + + WatchCoordinatorSet(opts *bind.WatchOpts, sink chan<- *VRFV2PlusMaliciousMigratorCoordinatorSet) (event.Subscription, error) + + ParseCoordinatorSet(log types.Log) (*VRFV2PlusMaliciousMigratorCoordinatorSet, error) + + ParseLog(log types.Log) (generated.AbigenLog, error) + Address() common.Address } diff --git a/core/gethwrappers/generated/vrfv2plus_reverting_example/vrfv2plus_reverting_example.go b/core/gethwrappers/generated/vrfv2plus_reverting_example/vrfv2plus_reverting_example.go index 5e66eb2474d..4d5ce35cf68 100644 --- a/core/gethwrappers/generated/vrfv2plus_reverting_example/vrfv2plus_reverting_example.go +++ b/core/gethwrappers/generated/vrfv2plus_reverting_example/vrfv2plus_reverting_example.go @@ -31,8 +31,8 @@ var ( ) var VRFV2PlusRevertingExampleMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"vrfCoordinator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"link\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"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\":\"ZeroAddress\",\"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\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"createSubscriptionAndFund\",\"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\":\"bytes32\",\"name\":\"keyHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"internalType\":\"uint16\",\"name\":\"minReqConfs\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"numWords\",\"type\":\"uint32\"}],\"name\":\"requestRandomness\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_gasAvailable\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"s_randomWords\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_requestId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_subId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_vrfCoordinator\",\"outputs\":[{\"internalType\":\"contractIVRFCoordinatorV2Plus\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_vrfCoordinator\",\"type\":\"address\"}],\"name\":\"setCoordinator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"topUpSubscription\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"consumers\",\"type\":\"address[]\"}],\"name\":\"updateSubscription\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x60806040523480156200001157600080fd5b5060405162001215380380620012158339810160408190526200003491620001c2565b8133806000816200008c5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000bf57620000bf81620000f9565b5050600280546001600160a01b039384166001600160a01b0319918216179091556005805494909316931692909217905550620001fa9050565b6001600160a01b038116331415620001545760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000083565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b80516001600160a01b0381168114620001bd57600080fd5b919050565b60008060408385031215620001d657600080fd5b620001e183620001a5565b9150620001f160208401620001a5565b90509250929050565b61100b806200020a6000396000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c80638ea981171161008c578063e89e106a11610066578063e89e106a146101e6578063f08c5daa146101ef578063f2fde38b146101f8578063f6eaffc81461020b57600080fd5b80638ea98117146101a05780639eccacf6146101b3578063cf62c8ab146101d357600080fd5b806336bfffed116100c857806336bfffed1461013d578063706da1ca1461015057806379ba5097146101595780638da5cb5b1461016157600080fd5b80631fe543e3146100ef5780632e75964e146101045780632fa4e4421461012a575b600080fd5b6101026100fd366004610cdf565b61021e565b005b610117610112366004610c4d565b6102a4565b6040519081526020015b60405180910390f35b610102610138366004610d83565b6103a1565b61010261014b366004610b87565b6104c3565b61011760065481565b6101026105fb565b60005473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610121565b6101026101ae366004610b65565b6106f8565b60025461017b9073ffffffffffffffffffffffffffffffffffffffff1681565b6101026101e1366004610d83565b610803565b61011760045481565b61011760075481565b610102610206366004610b65565b61097a565b610117610219366004610cad565b61098e565b60025473ffffffffffffffffffffffffffffffffffffffff163314610296576002546040517f1cf993f400000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff90911660248201526044015b60405180910390fd5b6102a08282600080fd5b5050565b6040805160c081018252868152602080820187905261ffff86168284015263ffffffff80861660608401528416608083015282519081018352600080825260a083019190915260025492517f9b1c385e000000000000000000000000000000000000000000000000000000008152909273ffffffffffffffffffffffffffffffffffffffff1690639b1c385e9061033f908490600401610e68565b602060405180830381600087803b15801561035957600080fd5b505af115801561036d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103919190610cc6565b6004819055979650505050505050565b60065461040a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600b60248201527f737562206e6f7420736574000000000000000000000000000000000000000000604482015260640161028d565b60055460025460065460408051602081019290925273ffffffffffffffffffffffffffffffffffffffff93841693634000aea09316918591015b6040516020818303038152906040526040518463ffffffff1660e01b815260040161047193929190610e1c565b602060405180830381600087803b15801561048b57600080fd5b505af115801561049f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102a09190610c2b565b60065461052c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f7375624944206e6f742073657400000000000000000000000000000000000000604482015260640161028d565b60005b81518110156102a057600254600654835173ffffffffffffffffffffffffffffffffffffffff9092169163bec4c08c919085908590811061057257610572610fa0565b60200260200101516040518363ffffffff1660e01b81526004016105b692919091825273ffffffffffffffffffffffffffffffffffffffff16602082015260400190565b600060405180830381600087803b1580156105d057600080fd5b505af11580156105e4573d6000803e3d6000fd5b5050505080806105f390610f40565b91505061052f565b60015473ffffffffffffffffffffffffffffffffffffffff16331461067c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e657200000000000000000000604482015260640161028d565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b60005473ffffffffffffffffffffffffffffffffffffffff163314801590610738575060025473ffffffffffffffffffffffffffffffffffffffff163314155b156107bc573361075d60005473ffffffffffffffffffffffffffffffffffffffff1690565b6002546040517f061db9c100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9384166004820152918316602483015291909116604482015260640161028d565b600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60065461040a57600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a21a23e46040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561087457600080fd5b505af1158015610888573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108ac9190610cc6565b60068190556002546040517fbec4c08c000000000000000000000000000000000000000000000000000000008152600481019290925230602483015273ffffffffffffffffffffffffffffffffffffffff169063bec4c08c90604401600060405180830381600087803b15801561092257600080fd5b505af1158015610936573d6000803e3d6000fd5b5050505060055460025460065460405173ffffffffffffffffffffffffffffffffffffffff93841693634000aea09316918591610444919060200190815260200190565b6109826109af565b61098b81610a32565b50565b6003818154811061099e57600080fd5b600091825260209091200154905081565b60005473ffffffffffffffffffffffffffffffffffffffff163314610a30576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e657200000000000000000000604482015260640161028d565b565b73ffffffffffffffffffffffffffffffffffffffff8116331415610ab2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640161028d565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b803573ffffffffffffffffffffffffffffffffffffffff81168114610b4c57600080fd5b919050565b803563ffffffff81168114610b4c57600080fd5b600060208284031215610b7757600080fd5b610b8082610b28565b9392505050565b60006020808385031215610b9a57600080fd5b823567ffffffffffffffff811115610bb157600080fd5b8301601f81018513610bc257600080fd5b8035610bd5610bd082610f1c565b610ecd565b80828252848201915084840188868560051b8701011115610bf557600080fd5b600094505b83851015610c1f57610c0b81610b28565b835260019490940193918501918501610bfa565b50979650505050505050565b600060208284031215610c3d57600080fd5b81518015158114610b8057600080fd5b600080600080600060a08688031215610c6557600080fd5b8535945060208601359350604086013561ffff81168114610c8557600080fd5b9250610c9360608701610b51565b9150610ca160808701610b51565b90509295509295909350565b600060208284031215610cbf57600080fd5b5035919050565b600060208284031215610cd857600080fd5b5051919050565b60008060408385031215610cf257600080fd5b8235915060208084013567ffffffffffffffff811115610d1157600080fd5b8401601f81018613610d2257600080fd5b8035610d30610bd082610f1c565b80828252848201915084840189868560051b8701011115610d5057600080fd5b600094505b83851015610d73578035835260019490940193918501918501610d55565b5080955050505050509250929050565b600060208284031215610d9557600080fd5b81356bffffffffffffffffffffffff81168114610b8057600080fd5b6000815180845260005b81811015610dd757602081850181015186830182015201610dbb565b81811115610de9576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b73ffffffffffffffffffffffffffffffffffffffff841681526bffffffffffffffffffffffff83166020820152606060408201526000610e5f6060830184610db1565b95945050505050565b60208152815160208201526020820151604082015261ffff60408301511660608201526000606083015163ffffffff80821660808501528060808601511660a0850152505060a083015160c080840152610ec560e0840182610db1565b949350505050565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715610f1457610f14610fcf565b604052919050565b600067ffffffffffffffff821115610f3657610f36610fcf565b5060051b60200190565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415610f99577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea164736f6c6343000806000a", + ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"vrfCoordinator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"link\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"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\":\"ZeroAddress\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"vrfCoordinator\",\"type\":\"address\"}],\"name\":\"CoordinatorSet\",\"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\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"createSubscriptionAndFund\",\"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\":\"bytes32\",\"name\":\"keyHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"internalType\":\"uint16\",\"name\":\"minReqConfs\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"numWords\",\"type\":\"uint32\"}],\"name\":\"requestRandomness\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_gasAvailable\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"s_randomWords\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_requestId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_subId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_vrfCoordinator\",\"outputs\":[{\"internalType\":\"contractIVRFCoordinatorV2Plus\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_vrfCoordinator\",\"type\":\"address\"}],\"name\":\"setCoordinator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"topUpSubscription\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"consumers\",\"type\":\"address[]\"}],\"name\":\"updateSubscription\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Bin: "0x60806040523480156200001157600080fd5b50604051620012bb380380620012bb8339810160408190526200003491620001e9565b8133806000816200008c5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000bf57620000bf8162000120565b5050506001600160a01b038116620000ea5760405163d92e233d60e01b815260040160405180910390fd5b600280546001600160a01b039283166001600160a01b031991821617909155600580549390921692169190911790555062000221565b6001600160a01b0381163314156200017b5760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000083565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b80516001600160a01b0381168114620001e457600080fd5b919050565b60008060408385031215620001fd57600080fd5b6200020883620001cc565b91506200021860208401620001cc565b90509250929050565b61108a80620002316000396000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c80638ea981171161008c578063e89e106a11610066578063e89e106a146101e6578063f08c5daa146101ef578063f2fde38b146101f8578063f6eaffc81461020b57600080fd5b80638ea98117146101a05780639eccacf6146101b3578063cf62c8ab146101d357600080fd5b806336bfffed116100c857806336bfffed1461013d578063706da1ca1461015057806379ba5097146101595780638da5cb5b1461016157600080fd5b80631fe543e3146100ef5780632e75964e146101045780632fa4e4421461012a575b600080fd5b6101026100fd366004610d5e565b61021e565b005b610117610112366004610ccc565b6102a4565b6040519081526020015b60405180910390f35b610102610138366004610e02565b6103a1565b61010261014b366004610c06565b6104c3565b61011760065481565b6101026105fb565b60005473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610121565b6101026101ae366004610be4565b6106f8565b60025461017b9073ffffffffffffffffffffffffffffffffffffffff1681565b6101026101e1366004610e02565b610882565b61011760045481565b61011760075481565b610102610206366004610be4565b6109f9565b610117610219366004610d2c565b610a0d565b60025473ffffffffffffffffffffffffffffffffffffffff163314610296576002546040517f1cf993f400000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff90911660248201526044015b60405180910390fd5b6102a08282600080fd5b5050565b6040805160c081018252868152602080820187905261ffff86168284015263ffffffff80861660608401528416608083015282519081018352600080825260a083019190915260025492517f9b1c385e000000000000000000000000000000000000000000000000000000008152909273ffffffffffffffffffffffffffffffffffffffff1690639b1c385e9061033f908490600401610ee7565b602060405180830381600087803b15801561035957600080fd5b505af115801561036d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103919190610d45565b6004819055979650505050505050565b60065461040a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600b60248201527f737562206e6f7420736574000000000000000000000000000000000000000000604482015260640161028d565b60055460025460065460408051602081019290925273ffffffffffffffffffffffffffffffffffffffff93841693634000aea09316918591015b6040516020818303038152906040526040518463ffffffff1660e01b815260040161047193929190610e9b565b602060405180830381600087803b15801561048b57600080fd5b505af115801561049f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102a09190610caa565b60065461052c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f7375624944206e6f742073657400000000000000000000000000000000000000604482015260640161028d565b60005b81518110156102a057600254600654835173ffffffffffffffffffffffffffffffffffffffff9092169163bec4c08c91908590859081106105725761057261101f565b60200260200101516040518363ffffffff1660e01b81526004016105b692919091825273ffffffffffffffffffffffffffffffffffffffff16602082015260400190565b600060405180830381600087803b1580156105d057600080fd5b505af11580156105e4573d6000803e3d6000fd5b5050505080806105f390610fbf565b91505061052f565b60015473ffffffffffffffffffffffffffffffffffffffff16331461067c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e657200000000000000000000604482015260640161028d565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b60005473ffffffffffffffffffffffffffffffffffffffff163314801590610738575060025473ffffffffffffffffffffffffffffffffffffffff163314155b156107bc573361075d60005473ffffffffffffffffffffffffffffffffffffffff1690565b6002546040517f061db9c100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9384166004820152918316602483015291909116604482015260640161028d565b73ffffffffffffffffffffffffffffffffffffffff8116610809576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527fd1a6a14209a385a964d036e404cb5cfb71f4000cdb03c9366292430787261be69060200160405180910390a150565b60065461040a57600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a21a23e46040518163ffffffff1660e01b8152600401602060405180830381600087803b1580156108f357600080fd5b505af1158015610907573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061092b9190610d45565b60068190556002546040517fbec4c08c000000000000000000000000000000000000000000000000000000008152600481019290925230602483015273ffffffffffffffffffffffffffffffffffffffff169063bec4c08c90604401600060405180830381600087803b1580156109a157600080fd5b505af11580156109b5573d6000803e3d6000fd5b5050505060055460025460065460405173ffffffffffffffffffffffffffffffffffffffff93841693634000aea09316918591610444919060200190815260200190565b610a01610a2e565b610a0a81610ab1565b50565b60038181548110610a1d57600080fd5b600091825260209091200154905081565b60005473ffffffffffffffffffffffffffffffffffffffff163314610aaf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e657200000000000000000000604482015260640161028d565b565b73ffffffffffffffffffffffffffffffffffffffff8116331415610b31576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640161028d565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b803573ffffffffffffffffffffffffffffffffffffffff81168114610bcb57600080fd5b919050565b803563ffffffff81168114610bcb57600080fd5b600060208284031215610bf657600080fd5b610bff82610ba7565b9392505050565b60006020808385031215610c1957600080fd5b823567ffffffffffffffff811115610c3057600080fd5b8301601f81018513610c4157600080fd5b8035610c54610c4f82610f9b565b610f4c565b80828252848201915084840188868560051b8701011115610c7457600080fd5b600094505b83851015610c9e57610c8a81610ba7565b835260019490940193918501918501610c79565b50979650505050505050565b600060208284031215610cbc57600080fd5b81518015158114610bff57600080fd5b600080600080600060a08688031215610ce457600080fd5b8535945060208601359350604086013561ffff81168114610d0457600080fd5b9250610d1260608701610bd0565b9150610d2060808701610bd0565b90509295509295909350565b600060208284031215610d3e57600080fd5b5035919050565b600060208284031215610d5757600080fd5b5051919050565b60008060408385031215610d7157600080fd5b8235915060208084013567ffffffffffffffff811115610d9057600080fd5b8401601f81018613610da157600080fd5b8035610daf610c4f82610f9b565b80828252848201915084840189868560051b8701011115610dcf57600080fd5b600094505b83851015610df2578035835260019490940193918501918501610dd4565b5080955050505050509250929050565b600060208284031215610e1457600080fd5b81356bffffffffffffffffffffffff81168114610bff57600080fd5b6000815180845260005b81811015610e5657602081850181015186830182015201610e3a565b81811115610e68576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b73ffffffffffffffffffffffffffffffffffffffff841681526bffffffffffffffffffffffff83166020820152606060408201526000610ede6060830184610e30565b95945050505050565b60208152815160208201526020820151604082015261ffff60408301511660608201526000606083015163ffffffff80821660808501528060808601511660a0850152505060a083015160c080840152610f4460e0840182610e30565b949350505050565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715610f9357610f9361104e565b604052919050565b600067ffffffffffffffff821115610fb557610fb561104e565b5060051b60200190565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415611018577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea164736f6c6343000806000a", } var VRFV2PlusRevertingExampleABI = VRFV2PlusRevertingExampleMetaData.ABI @@ -399,6 +399,123 @@ func (_VRFV2PlusRevertingExample *VRFV2PlusRevertingExampleTransactorSession) Up return _VRFV2PlusRevertingExample.Contract.UpdateSubscription(&_VRFV2PlusRevertingExample.TransactOpts, consumers) } +type VRFV2PlusRevertingExampleCoordinatorSetIterator struct { + Event *VRFV2PlusRevertingExampleCoordinatorSet + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *VRFV2PlusRevertingExampleCoordinatorSetIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(VRFV2PlusRevertingExampleCoordinatorSet) + 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(VRFV2PlusRevertingExampleCoordinatorSet) + 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 *VRFV2PlusRevertingExampleCoordinatorSetIterator) Error() error { + return it.fail +} + +func (it *VRFV2PlusRevertingExampleCoordinatorSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type VRFV2PlusRevertingExampleCoordinatorSet struct { + VrfCoordinator common.Address + Raw types.Log +} + +func (_VRFV2PlusRevertingExample *VRFV2PlusRevertingExampleFilterer) FilterCoordinatorSet(opts *bind.FilterOpts) (*VRFV2PlusRevertingExampleCoordinatorSetIterator, error) { + + logs, sub, err := _VRFV2PlusRevertingExample.contract.FilterLogs(opts, "CoordinatorSet") + if err != nil { + return nil, err + } + return &VRFV2PlusRevertingExampleCoordinatorSetIterator{contract: _VRFV2PlusRevertingExample.contract, event: "CoordinatorSet", logs: logs, sub: sub}, nil +} + +func (_VRFV2PlusRevertingExample *VRFV2PlusRevertingExampleFilterer) WatchCoordinatorSet(opts *bind.WatchOpts, sink chan<- *VRFV2PlusRevertingExampleCoordinatorSet) (event.Subscription, error) { + + logs, sub, err := _VRFV2PlusRevertingExample.contract.WatchLogs(opts, "CoordinatorSet") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(VRFV2PlusRevertingExampleCoordinatorSet) + if err := _VRFV2PlusRevertingExample.contract.UnpackLog(event, "CoordinatorSet", 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 (_VRFV2PlusRevertingExample *VRFV2PlusRevertingExampleFilterer) ParseCoordinatorSet(log types.Log) (*VRFV2PlusRevertingExampleCoordinatorSet, error) { + event := new(VRFV2PlusRevertingExampleCoordinatorSet) + if err := _VRFV2PlusRevertingExample.contract.UnpackLog(event, "CoordinatorSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + type VRFV2PlusRevertingExampleOwnershipTransferRequestedIterator struct { Event *VRFV2PlusRevertingExampleOwnershipTransferRequested @@ -673,6 +790,8 @@ func (_VRFV2PlusRevertingExample *VRFV2PlusRevertingExampleFilterer) ParseOwners func (_VRFV2PlusRevertingExample *VRFV2PlusRevertingExample) ParseLog(log types.Log) (generated.AbigenLog, error) { switch log.Topics[0] { + case _VRFV2PlusRevertingExample.abi.Events["CoordinatorSet"].ID: + return _VRFV2PlusRevertingExample.ParseCoordinatorSet(log) case _VRFV2PlusRevertingExample.abi.Events["OwnershipTransferRequested"].ID: return _VRFV2PlusRevertingExample.ParseOwnershipTransferRequested(log) case _VRFV2PlusRevertingExample.abi.Events["OwnershipTransferred"].ID: @@ -683,6 +802,10 @@ func (_VRFV2PlusRevertingExample *VRFV2PlusRevertingExample) ParseLog(log types. } } +func (VRFV2PlusRevertingExampleCoordinatorSet) Topic() common.Hash { + return common.HexToHash("0xd1a6a14209a385a964d036e404cb5cfb71f4000cdb03c9366292430787261be6") +} + func (VRFV2PlusRevertingExampleOwnershipTransferRequested) Topic() common.Hash { return common.HexToHash("0xed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae1278") } @@ -724,6 +847,12 @@ type VRFV2PlusRevertingExampleInterface interface { UpdateSubscription(opts *bind.TransactOpts, consumers []common.Address) (*types.Transaction, error) + FilterCoordinatorSet(opts *bind.FilterOpts) (*VRFV2PlusRevertingExampleCoordinatorSetIterator, error) + + WatchCoordinatorSet(opts *bind.WatchOpts, sink chan<- *VRFV2PlusRevertingExampleCoordinatorSet) (event.Subscription, error) + + ParseCoordinatorSet(log types.Log) (*VRFV2PlusRevertingExampleCoordinatorSet, error) + FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*VRFV2PlusRevertingExampleOwnershipTransferRequestedIterator, error) WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *VRFV2PlusRevertingExampleOwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) diff --git a/core/gethwrappers/generated/vrfv2plus_wrapper/vrfv2plus_wrapper.go b/core/gethwrappers/generated/vrfv2plus_wrapper/vrfv2plus_wrapper.go index 5a5ccb34f1d..23b3afc60a8 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\"}],\"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\":[],\"name\":\"LINKPaymentInRequestRandomWordsInNative\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"LinkAlreadySet\",\"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\":\"ZeroAddress\",\"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\":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\"}],\"name\":\"calculateRequestPrice\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_callbackGasLimit\",\"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\":\"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\":\"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\":\"fulfillmentFlatFeeLinkPPM\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"fulfillmentFlatFeeNativePPM\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"wrapperGasOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"coordinatorGasOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint8\",\"name\":\"wrapperPremiumPercentage\",\"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\":[{\"internalType\":\"address\",\"name\":\"newCoordinator\",\"type\":\"address\"}],\"name\":\"migrate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"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_link\",\"outputs\":[{\"internalType\":\"contractLinkTokenInterface\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_linkNativeFeed\",\"outputs\":[{\"internalType\":\"contractAggregatorV3Interface\",\"name\":\"\",\"type\":\"address\"}],\"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\":\"uint8\",\"name\":\"_wrapperPremiumPercentage\",\"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\":\"_fulfillmentFlatFeeLinkPPM\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"_fulfillmentFlatFeeNativePPM\",\"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\":\"link\",\"type\":\"address\"}],\"name\":\"setLINK\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"linkNativeFeed\",\"type\":\"address\"}],\"name\":\"setLinkNativeFeed\",\"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\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"withdrawNative\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x60a06040526007805463ffffffff60201b1916650244000000001790553480156200002957600080fd5b506040516200366e3803806200366e8339810160408190526200004c9162000323565b803380600081620000a45760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000d757620000d7816200025a565b5050600280546001600160a01b0319166001600160a01b03938416179055508316156200012857600680546001600160601b03166c010000000000000000000000006001600160a01b038616021790555b6001600160a01b038216156200016257600780546001600160601b03166c010000000000000000000000006001600160a01b038516021790555b6002546040805163288688f960e21b815290516000926001600160a01b03169163a21a23e491600480830192602092919082900301818787803b158015620001a957600080fd5b505af1158015620001be573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001e491906200036d565b6080819052600254604051632fb1302360e21b8152600481018390523060248201529192506001600160a01b03169063bec4c08c90604401600060405180830381600087803b1580156200023757600080fd5b505af11580156200024c573d6000803e3d6000fd5b505050505050505062000387565b6001600160a01b038116331415620002b55760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c6600000000000000000060448201526064016200009b565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b80516001600160a01b03811681146200031e57600080fd5b919050565b6000806000606084860312156200033957600080fd5b620003448462000306565b9250620003546020850162000306565b9150620003646040850162000306565b90509250925092565b6000602082840312156200038057600080fd5b5051919050565b6080516132b6620003b8600039600081816101fa015281816112690152818161183a0152611c3201526132b66000f3fe6080604052600436106101e35760003560e01c80639cfc058e11610102578063c3f909d411610095578063f254bdc711610064578063f254bdc71461072c578063f2fde38b14610769578063f3fef3a314610789578063fc2a88c3146107a957600080fd5b8063c3f909d4146105fc578063cdd8d88514610695578063ce5494bb146106cf578063da4f5e6d146106ef57600080fd5b8063a4c0ed36116100d1578063a4c0ed361461057d578063a608a1e11461059d578063bed41a93146105bc578063bf17e559146105dc57600080fd5b80639cfc058e146105085780639eccacf61461051b578063a02e061614610548578063a3907d711461056857600080fd5b806348baa1c51161017a57806379ba50971161014957806379ba5097146104675780637fb5d19d1461047c5780638da5cb5b1461049c5780638ea98117146104e857600080fd5b806348baa1c5146103325780634b160935146103fd57806357a8070a1461041d578063650596541461044757600080fd5b80631fe543e3116101b65780631fe543e3146102bd5780632f2770db146102dd5780633255c456146102f25780634306d3541461031257600080fd5b8063030932bb146101e857806307b18bde1461022f578063181f5a771461025157806318b6f4c81461029d575b600080fd5b3480156101f457600080fd5b5061021c7f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020015b60405180910390f35b34801561023b57600080fd5b5061024f61024a366004612a22565b6107bf565b005b34801561025d57600080fd5b50604080518082018252601281527f56524656325772617070657220312e302e300000000000000000000000000000602082015290516102269190612ebb565b3480156102a957600080fd5b5061024f6102b8366004612ac3565b61089b565b3480156102c957600080fd5b5061024f6102d8366004612b47565b610a12565b3480156102e957600080fd5b5061024f610a8f565b3480156102fe57600080fd5b5061021c61030d366004612d4a565b610ac5565b34801561031e57600080fd5b5061021c61032d366004612c4a565b610bbf565b34801561033e57600080fd5b506103bc61034d366004612b15565b60096020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff81169074010000000000000000000000000000000000000000810463ffffffff16907801000000000000000000000000000000000000000000000000900467ffffffffffffffff1683565b6040805173ffffffffffffffffffffffffffffffffffffffff909416845263ffffffff909216602084015267ffffffffffffffff1690820152606001610226565b34801561040957600080fd5b5061021c610418366004612c4a565b610cc6565b34801561042957600080fd5b506008546104379060ff1681565b6040519015158152602001610226565b34801561045357600080fd5b5061024f610462366004612a07565b610db7565b34801561047357600080fd5b5061024f610e02565b34801561048857600080fd5b5061021c610497366004612d4a565b610eff565b3480156104a857600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610226565b3480156104f457600080fd5b5061024f610503366004612a07565b611005565b61021c610516366004612c65565b611110565b34801561052757600080fd5b506002546104c39073ffffffffffffffffffffffffffffffffffffffff1681565b34801561055457600080fd5b5061024f610563366004612a07565b6114a5565b34801561057457600080fd5b5061024f611550565b34801561058957600080fd5b5061024f610598366004612a4c565b611582565b3480156105a957600080fd5b5060085461043790610100900460ff1681565b3480156105c857600080fd5b5061024f6105d7366004612d66565b611a62565b3480156105e857600080fd5b5061024f6105f7366004612c4a565b611bb8565b34801561060857600080fd5b506005546006546007546008546003546040805195865263ffffffff8086166020880152640100000000860481169187019190915268010000000000000000948590048116606087015280841660808701529390920490921660a084015260ff620100008304811660c085015260e084019190915263010000009091041661010082015261012001610226565b3480156106a157600080fd5b506007546106ba90640100000000900463ffffffff1681565b60405163ffffffff9091168152602001610226565b3480156106db57600080fd5b5061024f6106ea366004612a07565b611bff565b3480156106fb57600080fd5b506006546104c3906c01000000000000000000000000900473ffffffffffffffffffffffffffffffffffffffff1681565b34801561073857600080fd5b506007546104c3906c01000000000000000000000000900473ffffffffffffffffffffffffffffffffffffffff1681565b34801561077557600080fd5b5061024f610784366004612a07565b611cb5565b34801561079557600080fd5b5061024f6107a4366004612a22565b611cc9565b3480156107b557600080fd5b5061021c60045481565b6107c7611dc4565b60008273ffffffffffffffffffffffffffffffffffffffff168260405160006040518083038185875af1925050503d8060008114610821576040519150601f19603f3d011682016040523d82523d6000602084013e610826565b606091505b5050905080610896576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f6661696c656420746f207769746864726177206e61746976650000000000000060448201526064015b60405180910390fd5b505050565b81516108dc57806108d8576040517f6b81746e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050565b81516024111561092d5781516040517f51200dce00000000000000000000000000000000000000000000000000000000815261088d9160249160040161ffff92831681529116602082015260400190565b6000826023815181106109425761094261323d565b6020910101517fff00000000000000000000000000000000000000000000000000000000000000167f01000000000000000000000000000000000000000000000000000000000000001490508080156109985750815b156109cf576040517f6048aa6800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b801580156109db575081155b15610896576040517f6b81746e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60025473ffffffffffffffffffffffffffffffffffffffff163314610a85576002546040517f1cf993f400000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff909116602482015260440161088d565b6108d88282611e47565b610a97611dc4565b600880547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16610100179055565b60085460009060ff16610b34576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f77726170706572206973206e6f7420636f6e6669677572656400000000000000604482015260640161088d565b600854610100900460ff1615610ba6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f777261707065722069732064697361626c656400000000000000000000000000604482015260640161088d565b610bb68363ffffffff168361202f565b90505b92915050565b60085460009060ff16610c2e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f77726170706572206973206e6f7420636f6e6669677572656400000000000000604482015260640161088d565b600854610100900460ff1615610ca0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f777261707065722069732064697361626c656400000000000000000000000000604482015260640161088d565b6000610caa612105565b9050610cbd8363ffffffff163a8361226c565b9150505b919050565b60085460009060ff16610d35576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f77726170706572206973206e6f7420636f6e6669677572656400000000000000604482015260640161088d565b600854610100900460ff1615610da7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f777261707065722069732064697361626c656400000000000000000000000000604482015260640161088d565b610bb98263ffffffff163a61202f565b610dbf611dc4565b6007805473ffffffffffffffffffffffffffffffffffffffff9092166c01000000000000000000000000026bffffffffffffffffffffffff909216919091179055565b60015473ffffffffffffffffffffffffffffffffffffffff163314610e83576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e657200000000000000000000604482015260640161088d565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b60085460009060ff16610f6e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f77726170706572206973206e6f7420636f6e6669677572656400000000000000604482015260640161088d565b600854610100900460ff1615610fe0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f777261707065722069732064697361626c656400000000000000000000000000604482015260640161088d565b6000610fea612105565b9050610ffd8463ffffffff16848361226c565b949350505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314801590611045575060025473ffffffffffffffffffffffffffffffffffffffff163314155b156110c9573361106a60005473ffffffffffffffffffffffffffffffffffffffff1690565b6002546040517f061db9c100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9384166004820152918316602483015291909116604482015260640161088d565b600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b600061115183838080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920182905250925061089b915050565b600061115c8761235e565b905060006111708863ffffffff163a61202f565b9050803410156111dc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600b60248201527f66656520746f6f206c6f77000000000000000000000000000000000000000000604482015260640161088d565b6008546301000000900460ff1663ffffffff87161115611258576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f6e756d576f72647320746f6f2068696768000000000000000000000000000000604482015260640161088d565b6040805160c08101825260035481527f0000000000000000000000000000000000000000000000000000000000000000602082015261ffff89169181019190915260075460009190606082019063ffffffff166112b5868d612fe0565b6112bf9190612fe0565b63ffffffff1681526020018863ffffffff16815260200187878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050509152506002546040517f9b1c385e00000000000000000000000000000000000000000000000000000000815291925073ffffffffffffffffffffffffffffffffffffffff1690639b1c385e90611365908490600401612ece565b602060405180830381600087803b15801561137f57600080fd5b505af1158015611393573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113b79190612b2e565b6040805160608101825233815263ffffffff808d16602080840191825267ffffffffffffffff3a81168587019081526000888152600990935295909120935184549251955190911678010000000000000000000000000000000000000000000000000277ffffffffffffffffffffffffffffffffffffffffffffffff9590931674010000000000000000000000000000000000000000027fffffffffffffffff00000000000000000000000000000000000000000000000090921673ffffffffffffffffffffffffffffffffffffffff91909116171792909216919091179055935050505095945050505050565b6114ad611dc4565b6006546c01000000000000000000000000900473ffffffffffffffffffffffffffffffffffffffff161561150d576040517f2d118a6e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6006805473ffffffffffffffffffffffffffffffffffffffff9092166c01000000000000000000000000026bffffffffffffffffffffffff909216919091179055565b611558611dc4565b600880547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055565b60085460ff166115ee576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f77726170706572206973206e6f7420636f6e6669677572656400000000000000604482015260640161088d565b600854610100900460ff1615611660576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f777261707065722069732064697361626c656400000000000000000000000000604482015260640161088d565b6006546c01000000000000000000000000900473ffffffffffffffffffffffffffffffffffffffff1633146116f1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f6f6e6c792063616c6c61626c652066726f6d204c494e4b000000000000000000604482015260640161088d565b600080808061170285870187612cdb565b935093509350935061171581600161089b565b60006117208561235e565b9050600061172c612105565b905060006117418763ffffffff163a8461226c565b9050808a10156117ad576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600b60248201527f66656520746f6f206c6f77000000000000000000000000000000000000000000604482015260640161088d565b6008546301000000900460ff1663ffffffff86161115611829576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f6e756d576f72647320746f6f2068696768000000000000000000000000000000604482015260640161088d565b6040805160c08101825260035481527f0000000000000000000000000000000000000000000000000000000000000000602082015261ffff88169181019190915260075460009190606082019063ffffffff16611886878c612fe0565b6118909190612fe0565b63ffffffff908116825288166020820152604090810187905260025490517f9b1c385e00000000000000000000000000000000000000000000000000000000815291925060009173ffffffffffffffffffffffffffffffffffffffff90911690639b1c385e90611904908590600401612ece565b602060405180830381600087803b15801561191e57600080fd5b505af1158015611932573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119569190612b2e565b905060405180606001604052808e73ffffffffffffffffffffffffffffffffffffffff1681526020018a63ffffffff1681526020013a67ffffffffffffffff168152506009600083815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160000160146101000a81548163ffffffff021916908363ffffffff16021790555060408201518160000160186101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055509050508060048190555050505050505050505050505050565b611a6a611dc4565b6007805463ffffffff9a8b167fffffffffffffffffffffffffffffffffffffffff00000000ffffffff000000009091161768010000000000000000998b168a02179055600880546003979097557fffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000ffff9096166201000060ff988916027fffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffff161763010000009590971694909402959095177fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117909355600680546005949094557fffffffffffffffffffffffffffffffffffffffff00000000ffffffffffffffff9187167fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000009094169390931764010000000094871694909402939093179290921691909316909102179055565b611bc0611dc4565b6007805463ffffffff909216640100000000027fffffffffffffffffffffffffffffffffffffffffffffffff00000000ffffffff909216919091179055565b611c07611dc4565b6002546040517f405b84fa0000000000000000000000000000000000000000000000000000000081527f0000000000000000000000000000000000000000000000000000000000000000600482015273ffffffffffffffffffffffffffffffffffffffff83811660248301529091169063405b84fa90604401600060405180830381600087803b158015611c9a57600080fd5b505af1158015611cae573d6000803e3d6000fd5b5050505050565b611cbd611dc4565b611cc681612376565b50565b611cd1611dc4565b6006546040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8481166004830152602482018490526c010000000000000000000000009092049091169063a9059cbb90604401602060405180830381600087803b158015611d5657600080fd5b505af1158015611d6a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d8e9190612aa6565b6108d8576040517f7c07fc4c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005473ffffffffffffffffffffffffffffffffffffffff163314611e45576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e657200000000000000000000604482015260640161088d565b565b60008281526009602081815260408084208151606081018352815473ffffffffffffffffffffffffffffffffffffffff808216835274010000000000000000000000000000000000000000820463ffffffff1683870152780100000000000000000000000000000000000000000000000090910467ffffffffffffffff1693820193909352878652939092529290558051909116611f41576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f72657175657374206e6f7420666f756e64000000000000000000000000000000604482015260640161088d565b600080631fe543e360e01b8585604051602401611f5f929190612f2b565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505090506000611fd9846020015163ffffffff1685600001518461246c565b90508061202757835160405173ffffffffffffffffffffffffffffffffffffffff9091169087907fc551b83c151f2d1c7eeb938ac59008e0409f1c1dc1e2f112449d4d79b458902290600090a35b505050505050565b600754600090819061204e90640100000000900463ffffffff166124b8565b60075463ffffffff680100000000000000008204811691612070911687612fc8565b61207a9190612fc8565b612084908561318b565b61208e9190612fc8565b60085490915081906000906064906120af9062010000900460ff1682613008565b6120bc9060ff168461318b565b6120c6919061302d565b6006549091506000906120f09068010000000000000000900463ffffffff1664e8d4a5100061318b565b6120fa9083612fc8565b979650505050505050565b600654600754604080517ffeaf968c000000000000000000000000000000000000000000000000000000008152905160009363ffffffff16151592849283926c0100000000000000000000000090920473ffffffffffffffffffffffffffffffffffffffff169163feaf968c9160048082019260a092909190829003018186803b15801561219257600080fd5b505afa1580156121a6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121ca9190612e00565b5094509092508491505080156121f057506121e582426131c8565b60065463ffffffff16105b156121fa57506005545b6000811215612265576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f496e76616c6964204c494e4b2077656920707269636500000000000000000000604482015260640161088d565b9392505050565b600754600090819061228b90640100000000900463ffffffff166124b8565b60075463ffffffff6801000000000000000082048116916122ad911688612fc8565b6122b79190612fc8565b6122c1908661318b565b6122cb9190612fc8565b90506000836122e283670de0b6b3a764000061318b565b6122ec919061302d565b60085490915060009060649061230b9062010000900460ff1682613008565b6123189060ff168461318b565b612322919061302d565b60065490915060009061234890640100000000900463ffffffff1664e8d4a5100061318b565b6123529083612fc8565b98975050505050505050565b600061236b603f83613041565b610bb9906001612fe0565b73ffffffffffffffffffffffffffffffffffffffff81163314156123f6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640161088d565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b60005a61138881101561247e57600080fd5b61138881039050846040820482031161249657600080fd5b50823b6124a257600080fd5b60008083516020850160008789f1949350505050565b6000466124c481612588565b15612568576000606c73ffffffffffffffffffffffffffffffffffffffff166341b247a86040518163ffffffff1660e01b815260040160c06040518083038186803b15801561251257600080fd5b505afa158015612526573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061254a9190612c00565b5050505091505083608c61255e9190612fc8565b610ffd908261318b565b612571816125ab565b1561257f57610cbd836125e5565b50600092915050565b600061a4b182148061259c575062066eed82145b80610bb957505062066eee1490565b6000600a8214806125bd57506101a482145b806125ca575062aa37dc82145b806125d6575061210582145b80610bb957505062014a331490565b60008073420000000000000000000000000000000000000f73ffffffffffffffffffffffffffffffffffffffff1663519b4bd36040518163ffffffff1660e01b815260040160206040518083038186803b15801561264257600080fd5b505afa158015612656573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061267a9190612b2e565b905060008061268981866131c8565b9050600061269882601061318b565b6126a384600461318b565b6126ad9190612fc8565b9050600073420000000000000000000000000000000000000f73ffffffffffffffffffffffffffffffffffffffff16630c18c1626040518163ffffffff1660e01b815260040160206040518083038186803b15801561270b57600080fd5b505afa15801561271f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127439190612b2e565b9050600073420000000000000000000000000000000000000f73ffffffffffffffffffffffffffffffffffffffff1663f45e65d86040518163ffffffff1660e01b815260040160206040518083038186803b1580156127a157600080fd5b505afa1580156127b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127d99190612b2e565b9050600073420000000000000000000000000000000000000f73ffffffffffffffffffffffffffffffffffffffff1663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b15801561283757600080fd5b505afa15801561284b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061286f9190612b2e565b9050600061287e82600a6130c5565b90506000818461288e8789612fc8565b612898908c61318b565b6128a2919061318b565b6128ac919061302d565b9b9a5050505050505050505050565b803573ffffffffffffffffffffffffffffffffffffffff81168114610cc157600080fd5b60008083601f8401126128f157600080fd5b50813567ffffffffffffffff81111561290957600080fd5b60208301915083602082850101111561292157600080fd5b9250929050565b600082601f83011261293957600080fd5b813567ffffffffffffffff8111156129535761295361326c565b61298460207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601612f79565b81815284602083860101111561299957600080fd5b816020850160208301376000918101602001919091529392505050565b803561ffff81168114610cc157600080fd5b803563ffffffff81168114610cc157600080fd5b803560ff81168114610cc157600080fd5b805169ffffffffffffffffffff81168114610cc157600080fd5b600060208284031215612a1957600080fd5b610bb6826128bb565b60008060408385031215612a3557600080fd5b612a3e836128bb565b946020939093013593505050565b60008060008060608587031215612a6257600080fd5b612a6b856128bb565b935060208501359250604085013567ffffffffffffffff811115612a8e57600080fd5b612a9a878288016128df565b95989497509550505050565b600060208284031215612ab857600080fd5b81516122658161329b565b60008060408385031215612ad657600080fd5b823567ffffffffffffffff811115612aed57600080fd5b612af985828601612928565b9250506020830135612b0a8161329b565b809150509250929050565b600060208284031215612b2757600080fd5b5035919050565b600060208284031215612b4057600080fd5b5051919050565b60008060408385031215612b5a57600080fd5b8235915060208084013567ffffffffffffffff80821115612b7a57600080fd5b818601915086601f830112612b8e57600080fd5b813581811115612ba057612ba061326c565b8060051b9150612bb1848301612f79565b8181528481019084860184860187018b1015612bcc57600080fd5b600095505b83861015612bef578035835260019590950194918601918601612bd1565b508096505050505050509250929050565b60008060008060008060c08789031215612c1957600080fd5b865195506020870151945060408701519350606087015192506080870151915060a087015190509295509295509295565b600060208284031215612c5c57600080fd5b610bb6826129c8565b600080600080600060808688031215612c7d57600080fd5b612c86866129c8565b9450612c94602087016129b6565b9350612ca2604087016129c8565b9250606086013567ffffffffffffffff811115612cbe57600080fd5b612cca888289016128df565b969995985093965092949392505050565b60008060008060808587031215612cf157600080fd5b612cfa856129c8565b9350612d08602086016129b6565b9250612d16604086016129c8565b9150606085013567ffffffffffffffff811115612d3257600080fd5b612d3e87828801612928565b91505092959194509250565b60008060408385031215612d5d57600080fd5b612a3e836129c8565b60008060008060008060008060006101208a8c031215612d8557600080fd5b612d8e8a6129c8565b9850612d9c60208b016129c8565b9750612daa60408b016129dc565b965060608a01359550612dbf60808b016129dc565b9450612dcd60a08b016129c8565b935060c08a01359250612de260e08b016129c8565b9150612df16101008b016129c8565b90509295985092959850929598565b600080600080600060a08688031215612e1857600080fd5b612e21866129ed565b9450602086015193506040860151925060608601519150612e44608087016129ed565b90509295509295909350565b6000815180845260005b81811015612e7657602081850181015186830182015201612e5a565b81811115612e88576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000610bb66020830184612e50565b60208152815160208201526020820151604082015261ffff60408301511660608201526000606083015163ffffffff80821660808501528060808601511660a0850152505060a083015160c080840152610ffd60e0840182612e50565b6000604082018483526020604081850152818551808452606086019150828701935060005b81811015612f6c57845183529383019391830191600101612f50565b5090979650505050505050565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715612fc057612fc061326c565b604052919050565b60008219821115612fdb57612fdb6131df565b500190565b600063ffffffff808316818516808303821115612fff57612fff6131df565b01949350505050565b600060ff821660ff84168060ff03821115613025576130256131df565b019392505050565b60008261303c5761303c61320e565b500490565b600063ffffffff808416806130585761305861320e565b92169190910492915050565b600181815b808511156130bd57817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048211156130a3576130a36131df565b808516156130b057918102915b93841c9390800290613069565b509250929050565b6000610bb683836000826130db57506001610bb9565b816130e857506000610bb9565b81600181146130fe576002811461310857613124565b6001915050610bb9565b60ff841115613119576131196131df565b50506001821b610bb9565b5060208310610133831016604e8410600b8410161715613147575081810a610bb9565b6131518383613064565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115613183576131836131df565b029392505050565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156131c3576131c36131df565b500290565b6000828210156131da576131da6131df565b500390565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b8015158114611cc657600080fdfea164736f6c6343000806000a", + ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_link\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_linkNativeFeed\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_coordinator\",\"type\":\"address\"}],\"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\":\"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\":\"uint8\",\"name\":\"wrapperNativePremiumPercentage\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"wrapperLinkPremiumPercentage\",\"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\":false,\"internalType\":\"address\",\"name\":\"linkNativeFeed\",\"type\":\"address\"}],\"name\":\"LinkNativeFeedSet\",\"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\"}],\"name\":\"calculateRequestPrice\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_callbackGasLimit\",\"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\":\"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\":\"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\":\"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\":[{\"internalType\":\"address\",\"name\":\"newCoordinator\",\"type\":\"address\"}],\"name\":\"migrate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"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_linkNativeFeed\",\"outputs\":[{\"internalType\":\"contractAggregatorV3Interface\",\"name\":\"\",\"type\":\"address\"}],\"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\":\"uint8\",\"name\":\"_wrapperNativePremiumPercentage\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"_wrapperLinkPremiumPercentage\",\"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\":\"linkNativeFeed\",\"type\":\"address\"}],\"name\":\"setLinkNativeFeed\",\"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: "0x60c06040526007805463ffffffff60201b1916650244000000001790553480156200002957600080fd5b5060405162003d8538038062003d858339810160408190526200004c9162000347565b803380600081620000a45760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000d757620000d7816200027e565b5050506001600160a01b038116620001025760405163d92e233d60e01b815260040160405180910390fd5b600280546001600160a01b0319166001600160a01b0392831617905583166200013e5760405163d92e233d60e01b815260040160405180910390fd5b6001600160601b0319606084901b1660a0526001600160a01b03821615620001865760068054600160201b600160c01b0319166401000000006001600160a01b038516021790555b6002546040805163288688f960e21b815290516000926001600160a01b03169163a21a23e491600480830192602092919082900301818787803b158015620001cd57600080fd5b505af1158015620001e2573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000208919062000391565b6080819052600254604051632fb1302360e21b8152600481018390523060248201529192506001600160a01b03169063bec4c08c90604401600060405180830381600087803b1580156200025b57600080fd5b505af115801562000270573d6000803e3d6000fd5b5050505050505050620003ab565b6001600160a01b038116331415620002d95760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c6600000000000000000060448201526064016200009b565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b80516001600160a01b03811681146200034257600080fd5b919050565b6000806000606084860312156200035d57600080fd5b62000368846200032a565b925062000378602085016200032a565b915062000388604085016200032a565b90509250925092565b600060208284031215620003a457600080fd5b5051919050565b60805160a05160601c613987620003fe600039600081816102a101528181610f510152818161102f0152611ba70152600081816101ef015281816117ee01528181611d8d01526120a201526139876000f3fe6080604052600436106101d85760003560e01c80637fb5d19d11610102578063bf17e55911610095578063f254bdc711610064578063f254bdc71461077a578063f2fde38b146107af578063fc2a88c3146107cf578063fc2dbebc146107e557600080fd5b8063bf17e55914610610578063c3f909d414610630578063cdd8d88514610720578063ce5494bb1461075a57600080fd5b80639eccacf6116100d15780639eccacf61461057b578063a3907d71146105a8578063a4c0ed36146105bd578063a608a1e1146105dd57600080fd5b80637fb5d19d146104fd5780638da5cb5b1461051d5780638ea98117146105485780639cfc058e1461056857600080fd5b80633255c4561161017a57806351cff8d91161014957806351cff8d91461046657806357a8070a1461048657806365059654146104c857806379ba5097146104e857600080fd5b80633255c4561461033b5780634306d3541461035b57806348baa1c51461037b5780634b1609351461044657600080fd5b80631c4695f4116101b65780631c4695f4146102925780631fe543e3146102e65780632f2770db146103065780632f622e6b1461031b57600080fd5b8063030932bb146101dd578063181f5a771461022457806318b6f4c814610270575b600080fd5b3480156101e957600080fd5b506102117f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020015b60405180910390f35b34801561023057600080fd5b50604080518082018252601281527f56524656325772617070657220312e302e3000000000000000000000000000006020820152905161021b9190613567565b34801561027c57600080fd5b5061029061028b36600461314f565b610805565b005b34801561029e57600080fd5b507f00000000000000000000000000000000000000000000000000000000000000005b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161021b565b3480156102f257600080fd5b506102906103013660046131d3565b61098a565b34801561031257600080fd5b50610290610a07565b34801561032757600080fd5b506102906103363660046130b6565b610a7a565b34801561034757600080fd5b506102116103563660046133d6565b610ba1565b34801561036757600080fd5b506102116103763660046132d6565b610cc7565b34801561038757600080fd5b506104056103963660046131a1565b60086020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff81169074010000000000000000000000000000000000000000810463ffffffff16907801000000000000000000000000000000000000000000000000900467ffffffffffffffff1683565b6040805173ffffffffffffffffffffffffffffffffffffffff909416845263ffffffff909216602084015267ffffffffffffffff169082015260600161021b565b34801561045257600080fd5b506102116104613660046132d6565b610dfb565b34801561047257600080fd5b506102906104813660046130b6565b610f18565b34801561049257600080fd5b506002546104b89074010000000000000000000000000000000000000000900460ff1681565b604051901515815260200161021b565b3480156104d457600080fd5b506102906104e33660046130b6565b611137565b3480156104f457600080fd5b506102906111c3565b34801561050957600080fd5b506102116105183660046133d6565b6112c0565b34801561052957600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff166102c1565b34801561055457600080fd5b506102906105633660046130b6565b6113f3565b6102116105763660046132f1565b611577565b34801561058757600080fd5b506002546102c19073ffffffffffffffffffffffffffffffffffffffff1681565b3480156105b457600080fd5b50610290611a2a565b3480156105c957600080fd5b506102906105d83660046130d1565b611a85565b3480156105e957600080fd5b506002546104b8907501000000000000000000000000000000000000000000900460ff1681565b34801561061c57600080fd5b5061029061062b3660046132d6565b611ffa565b34801561063c57600080fd5b506005546006546007546003546002546040805195865263ffffffff94851660208701526c010000000000000000000000008404851690860152700100000000000000000000000000000000830484166060860152838316608086015268010000000000000000830490931660a085015260ff740100000000000000000000000000000000000000008304811660c08601527501000000000000000000000000000000000000000000909204821660e0850152610100840152760100000000000000000000000000000000000000000000909104166101208201526101400161021b565b34801561072c57600080fd5b5060075461074590640100000000900463ffffffff1681565b60405163ffffffff909116815260200161021b565b34801561076657600080fd5b506102906107753660046130b6565b61206f565b34801561078657600080fd5b506006546102c190640100000000900473ffffffffffffffffffffffffffffffffffffffff1681565b3480156107bb57600080fd5b506102906107ca3660046130b6565b612125565b3480156107db57600080fd5b5061021160045481565b3480156107f157600080fd5b50610290610800366004613400565b612139565b81516108465780610842576040517f6b81746e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050565b8151602411156108a05781516040517f51200dce0000000000000000000000000000000000000000000000000000000081526108979160249160040161ffff92831681529116602082015260400190565b60405180910390fd5b6000826023815181106108b5576108b561390e565b6020910101517fff00000000000000000000000000000000000000000000000000000000000000167f010000000000000000000000000000000000000000000000000000000000000014905080801561090b5750815b15610942576040517f6048aa6800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8015801561094e575081155b15610985576040517f6b81746e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050565b60025473ffffffffffffffffffffffffffffffffffffffff1633146109fd576002546040517f1cf993f400000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff9091166024820152604401610897565b610842828261240a565b610a0f6125ed565b600280547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff1675010000000000000000000000000000000000000000001790556040517f75884cdadc4a89e8b545db800057f06ec7f5338a08183c7ba515f2bfdd9fe1e190600090a1565b610a826125ed565b604051479060009073ffffffffffffffffffffffffffffffffffffffff84169083908381818185875af1925050503d8060008114610adc576040519150601f19603f3d011682016040523d82523d6000602084013e610ae1565b606091505b5050905080610b4c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f6661696c656420746f207769746864726177206e6174697665000000000000006044820152606401610897565b8273ffffffffffffffffffffffffffffffffffffffff167fc303ca808382409472acbbf899c316cf439f409f6584aae22df86dfa3c9ed50483604051610b9491815260200190565b60405180910390a2505050565b60025460009074010000000000000000000000000000000000000000900460ff16610c28576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f77726170706572206973206e6f7420636f6e66696775726564000000000000006044820152606401610897565b6002547501000000000000000000000000000000000000000000900460ff1615610cae576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f777261707065722069732064697361626c6564000000000000000000000000006044820152606401610897565b610cbe8363ffffffff1683612670565b90505b92915050565b60025460009074010000000000000000000000000000000000000000900460ff16610d4e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f77726170706572206973206e6f7420636f6e66696775726564000000000000006044820152606401610897565b6002547501000000000000000000000000000000000000000000900460ff1615610dd4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f777261707065722069732064697361626c6564000000000000000000000000006044820152606401610897565b6000610dde61276b565b509050610df28363ffffffff163a836128cd565b9150505b919050565b60025460009074010000000000000000000000000000000000000000900460ff16610e82576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f77726170706572206973206e6f7420636f6e66696775726564000000000000006044820152606401610897565b6002547501000000000000000000000000000000000000000000900460ff1615610f08576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f777261707065722069732064697361626c6564000000000000000000000000006044820152606401610897565b610cc18263ffffffff163a612670565b610f206125ed565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906370a082319060240160206040518083038186803b158015610fa857600080fd5b505afa158015610fbc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fe091906131ba565b6040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8481166004830152602482018390529192507f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb90604401602060405180830381600087803b15801561107557600080fd5b505af1158015611089573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110ad919061312b565b6110e3576040517f7c07fc4c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff167f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d58260405161112b91815260200190565b60405180910390a25050565b61113f6125ed565b600680547fffffffffffffffff0000000000000000000000000000000000000000ffffffff1664010000000073ffffffffffffffffffffffffffffffffffffffff8416908102919091179091556040519081527fc252955f9bd8c6ea6e3cc712bbad31005d85cec90e73b147b4d6e8326242efdf906020015b60405180910390a150565b60015473ffffffffffffffffffffffffffffffffffffffff163314611244576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e6572000000000000000000006044820152606401610897565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b60025460009074010000000000000000000000000000000000000000900460ff16611347576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f77726170706572206973206e6f7420636f6e66696775726564000000000000006044820152606401610897565b6002547501000000000000000000000000000000000000000000900460ff16156113cd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f777261707065722069732064697361626c6564000000000000000000000000006044820152606401610897565b60006113d761276b565b5090506113eb8463ffffffff1684836128cd565b949350505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314801590611433575060025473ffffffffffffffffffffffffffffffffffffffff163314155b156114b7573361145860005473ffffffffffffffffffffffffffffffffffffffff1690565b6002546040517f061db9c100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff93841660048201529183166024830152919091166044820152606401610897565b73ffffffffffffffffffffffffffffffffffffffff8116611504576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527fd1a6a14209a385a964d036e404cb5cfb71f4000cdb03c9366292430787261be6906020016111b8565b60025460009074010000000000000000000000000000000000000000900460ff166115fe576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f77726170706572206973206e6f7420636f6e66696775726564000000000000006044820152606401610897565b6002547501000000000000000000000000000000000000000000900460ff1615611684576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f777261707065722069732064697361626c6564000000000000000000000000006044820152606401610897565b6116c383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201829052509250610805915050565b60006116ce87612a0d565b905060006116e28863ffffffff163a612670565b90508034101561174e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600b60248201527f66656520746f6f206c6f770000000000000000000000000000000000000000006044820152606401610897565b600254760100000000000000000000000000000000000000000000900460ff1663ffffffff871611156117dd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f6e756d576f72647320746f6f20686967680000000000000000000000000000006044820152606401610897565b6040805160c08101825260035481527f0000000000000000000000000000000000000000000000000000000000000000602082015261ffff89169181019190915260075460009190606082019063ffffffff1661183a868d61368c565b611844919061368c565b63ffffffff1681526020018863ffffffff16815260200187878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050509152506002546040517f9b1c385e00000000000000000000000000000000000000000000000000000000815291925073ffffffffffffffffffffffffffffffffffffffff1690639b1c385e906118ea90849060040161357a565b602060405180830381600087803b15801561190457600080fd5b505af1158015611918573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061193c91906131ba565b6040805160608101825233815263ffffffff808d16602080840191825267ffffffffffffffff3a81168587019081526000888152600890935295909120935184549251955190911678010000000000000000000000000000000000000000000000000277ffffffffffffffffffffffffffffffffffffffffffffffff9590931674010000000000000000000000000000000000000000027fffffffffffffffff00000000000000000000000000000000000000000000000090921673ffffffffffffffffffffffffffffffffffffffff91909116171792909216919091179055935050505095945050505050565b611a326125ed565b600280547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff1690556040517fc0f961051f97b04c496472d11cb6170d844e4b2c9dfd3b602a4fa0139712d48490600090a1565b60025474010000000000000000000000000000000000000000900460ff16611b09576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f77726170706572206973206e6f7420636f6e66696775726564000000000000006044820152606401610897565b6002547501000000000000000000000000000000000000000000900460ff1615611b8f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f777261707065722069732064697361626c6564000000000000000000000000006044820152606401610897565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614611c2e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f6f6e6c792063616c6c61626c652066726f6d204c494e4b0000000000000000006044820152606401610897565b6000808080611c3f85870187613367565b9350935093509350611c52816001610805565b6000611c5d85612a0d565b9050600080611c6a61276b565b915091506000611c818863ffffffff163a856128cd565b9050808b1015611ced576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600b60248201527f66656520746f6f206c6f770000000000000000000000000000000000000000006044820152606401610897565b600254760100000000000000000000000000000000000000000000900460ff1663ffffffff87161115611d7c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f6e756d576f72647320746f6f20686967680000000000000000000000000000006044820152606401610897565b6040805160c08101825260035481527f0000000000000000000000000000000000000000000000000000000000000000602082015261ffff89169181019190915260075460009190606082019063ffffffff16611dd9888d61368c565b611de3919061368c565b63ffffffff908116825289166020820152604090810188905260025490517f9b1c385e00000000000000000000000000000000000000000000000000000000815291925060009173ffffffffffffffffffffffffffffffffffffffff90911690639b1c385e90611e5790859060040161357a565b602060405180830381600087803b158015611e7157600080fd5b505af1158015611e85573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ea991906131ba565b905060405180606001604052808f73ffffffffffffffffffffffffffffffffffffffff1681526020018b63ffffffff1681526020013a67ffffffffffffffff168152506008600083815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160000160146101000a81548163ffffffff021916908363ffffffff16021790555060408201518160000160186101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550905050806004819055508315611fea576005546040805183815260208101929092527f6ca648a381f22ead7e37773d934e64885dcf861fbfbb26c40354cbf0c4662d1a910160405180910390a15b5050505050505050505050505050565b6120026125ed565b600780547fffffffffffffffffffffffffffffffffffffffffffffffff00000000ffffffff1664010000000063ffffffff8416908102919091179091556040519081527f697b48b8b76cebb09a54ec4ff810e8a181c96f65395d51c744db09c115d1d5d0906020016111b8565b6120776125ed565b6002546040517f405b84fa0000000000000000000000000000000000000000000000000000000081527f0000000000000000000000000000000000000000000000000000000000000000600482015273ffffffffffffffffffffffffffffffffffffffff83811660248301529091169063405b84fa90604401600060405180830381600087803b15801561210a57600080fd5b505af115801561211e573d6000803e3d6000fd5b5050505050565b61212d6125ed565b61213681612a25565b50565b6121416125ed565b8163ffffffff168163ffffffff161115612197576040517f2780dcb200000000000000000000000000000000000000000000000000000000815263ffffffff808316600483015283166024820152604401610897565b609b60ff891611156121e1576040517f3acc511a00000000000000000000000000000000000000000000000000000000815260ff89166004820152609b6024820152604401610897565b609b60ff8816111561222b576040517f3acc511a00000000000000000000000000000000000000000000000000000000815260ff88166004820152609b6024820152604401610897565b89600760006101000a81548163ffffffff021916908363ffffffff16021790555088600760086101000a81548163ffffffff021916908363ffffffff16021790555087600760146101000a81548160ff021916908360ff16021790555086600760156101000a81548160ff021916908360ff1602179055508560038190555084600260166101000a81548160ff021916908360ff1602179055506001600260146101000a81548160ff02191690831515021790555083600660006101000a81548163ffffffff021916908363ffffffff16021790555082600581905550816007600c6101000a81548163ffffffff021916908363ffffffff16021790555080600760106101000a81548163ffffffff021916908363ffffffff1602179055507fb18fd84519589131d50ae195b0aea1b042c3c0b25a53bb894d9d81c78980c20f8a8a8a8a8a8a8a8a8a600760109054906101000a900463ffffffff166040516123f69a9998979695949392919063ffffffff9a8b168152988a1660208a015260ff97881660408a0152958716606089015260808801949094529190941660a086015292851660c085015260e08401929092529083166101008301529091166101208201526101400190565b60405180910390a150505050505050505050565b60008281526008602081815260408084208151606081018352815473ffffffffffffffffffffffffffffffffffffffff808216835274010000000000000000000000000000000000000000820463ffffffff1683870152780100000000000000000000000000000000000000000000000090910467ffffffffffffffff169382019390935287865293909252929055805190918116612505576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f72657175657374206e6f7420666f756e640000000000000000000000000000006044820152606401610897565b600080631fe543e360e01b86866040516024016125239291906135d7565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505090506000612599856020015163ffffffff168584612b1b565b9050806125e45760405173ffffffffffffffffffffffffffffffffffffffff85169088907fc551b83c151f2d1c7eeb938ac59008e0409f1c1dc1e2f112449d4d79b458902290600090a35b50505050505050565b60005473ffffffffffffffffffffffffffffffffffffffff16331461266e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e6572000000000000000000006044820152606401610897565b565b60075460009081906126889063ffffffff1684613837565b6007549091506000906126a890640100000000900463ffffffff16612b67565b6007546126c79068010000000000000000900463ffffffff1687613674565b6126d19086613837565b6126db9190613674565b600754909150600090612709906c01000000000000000000000000900463ffffffff1664e8d4a51000613837565b6007546064906127349074010000000000000000000000000000000000000000900460ff16826136b4565b6127419060ff1685613837565b61274b91906136d9565b6127559190613674565b90506127618184613674565b9695505050505050565b600654604080517ffeaf968c0000000000000000000000000000000000000000000000000000000081529051600092839263ffffffff8216928492640100000000900473ffffffffffffffffffffffffffffffffffffffff169163feaf968c9160048083019260a0929190829003018186803b1580156127ea57600080fd5b505afa1580156127fe573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061282291906134ac565b50919650909250505063ffffffff82161580159061284e57506128458142613874565b8263ffffffff16105b9250821561285c5760055493505b60008412156128c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f496e76616c6964204c494e4b20776569207072696365000000000000000000006044820152606401610897565b50509091565b60075460009081906128e59063ffffffff1685613837565b60075490915060009061290590640100000000900463ffffffff16612b67565b6007546129249068010000000000000000900463ffffffff1688613674565b61292e9087613837565b6129389190613674565b6007549091506000906129779063ffffffff70010000000000000000000000000000000082048116916c0100000000000000000000000090041661388b565b61298c9063ffffffff1664e8d4a51000613837565b6007546064906129b8907501000000000000000000000000000000000000000000900460ff16826136b4565b6129c59060ff1685613837565b6129cf91906136d9565b6129d99190613674565b9050846129e68285613674565b6129f890670de0b6b3a7640000613837565b612a0291906136d9565b979650505050505050565b6000612a1a603f836136ed565b610cc190600161368c565b73ffffffffffffffffffffffffffffffffffffffff8116331415612aa5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401610897565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b60005a611388811015612b2d57600080fd5b611388810390508460408204820311612b4557600080fd5b50823b612b5157600080fd5b60008083516020850160008789f1949350505050565b600046612b7381612c37565b15612c17576000606c73ffffffffffffffffffffffffffffffffffffffff166341b247a86040518163ffffffff1660e01b815260040160c06040518083038186803b158015612bc157600080fd5b505afa158015612bd5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612bf9919061328c565b5050505091505083608c612c0d9190613674565b6113eb9082613837565b612c2081612c5a565b15612c2e57610df283612c94565b50600092915050565b600061a4b1821480612c4b575062066eed82145b80610cc157505062066eee1490565b6000600a821480612c6c57506101a482145b80612c79575062aa37dc82145b80612c85575061210582145b80610cc157505062014a331490565b60008073420000000000000000000000000000000000000f73ffffffffffffffffffffffffffffffffffffffff1663519b4bd36040518163ffffffff1660e01b815260040160206040518083038186803b158015612cf157600080fd5b505afa158015612d05573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d2991906131ba565b9050600080612d388186613874565b90506000612d47826010613837565b612d52846004613837565b612d5c9190613674565b9050600073420000000000000000000000000000000000000f73ffffffffffffffffffffffffffffffffffffffff16630c18c1626040518163ffffffff1660e01b815260040160206040518083038186803b158015612dba57600080fd5b505afa158015612dce573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612df291906131ba565b9050600073420000000000000000000000000000000000000f73ffffffffffffffffffffffffffffffffffffffff1663f45e65d86040518163ffffffff1660e01b815260040160206040518083038186803b158015612e5057600080fd5b505afa158015612e64573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e8891906131ba565b9050600073420000000000000000000000000000000000000f73ffffffffffffffffffffffffffffffffffffffff1663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b158015612ee657600080fd5b505afa158015612efa573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f1e91906131ba565b90506000612f2d82600a613771565b905060008184612f3d8789613674565b612f47908c613837565b612f519190613837565b612f5b91906136d9565b9b9a5050505050505050505050565b803573ffffffffffffffffffffffffffffffffffffffff81168114610df657600080fd5b60008083601f840112612fa057600080fd5b50813567ffffffffffffffff811115612fb857600080fd5b602083019150836020828501011115612fd057600080fd5b9250929050565b600082601f830112612fe857600080fd5b813567ffffffffffffffff8111156130025761300261393d565b61303360207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601613625565b81815284602083860101111561304857600080fd5b816020850160208301376000918101602001919091529392505050565b803561ffff81168114610df657600080fd5b803563ffffffff81168114610df657600080fd5b803560ff81168114610df657600080fd5b805169ffffffffffffffffffff81168114610df657600080fd5b6000602082840312156130c857600080fd5b610cbe82612f6a565b600080600080606085870312156130e757600080fd5b6130f085612f6a565b935060208501359250604085013567ffffffffffffffff81111561311357600080fd5b61311f87828801612f8e565b95989497509550505050565b60006020828403121561313d57600080fd5b81516131488161396c565b9392505050565b6000806040838503121561316257600080fd5b823567ffffffffffffffff81111561317957600080fd5b61318585828601612fd7565b92505060208301356131968161396c565b809150509250929050565b6000602082840312156131b357600080fd5b5035919050565b6000602082840312156131cc57600080fd5b5051919050565b600080604083850312156131e657600080fd5b8235915060208084013567ffffffffffffffff8082111561320657600080fd5b818601915086601f83011261321a57600080fd5b81358181111561322c5761322c61393d565b8060051b915061323d848301613625565b8181528481019084860184860187018b101561325857600080fd5b600095505b8386101561327b57803583526001959095019491860191860161325d565b508096505050505050509250929050565b60008060008060008060c087890312156132a557600080fd5b865195506020870151945060408701519350606087015192506080870151915060a087015190509295509295509295565b6000602082840312156132e857600080fd5b610cbe82613077565b60008060008060006080868803121561330957600080fd5b61331286613077565b945061332060208701613065565b935061332e60408701613077565b9250606086013567ffffffffffffffff81111561334a57600080fd5b61335688828901612f8e565b969995985093965092949392505050565b6000806000806080858703121561337d57600080fd5b61338685613077565b935061339460208601613065565b92506133a260408601613077565b9150606085013567ffffffffffffffff8111156133be57600080fd5b6133ca87828801612fd7565b91505092959194509250565b600080604083850312156133e957600080fd5b6133f283613077565b946020939093013593505050565b6000806000806000806000806000806101408b8d03121561342057600080fd5b6134298b613077565b995061343760208c01613077565b985061344560408c0161308b565b975061345360608c0161308b565b965060808b0135955061346860a08c0161308b565b945061347660c08c01613077565b935060e08b0135925061348c6101008c01613077565b915061349b6101208c01613077565b90509295989b9194979a5092959850565b600080600080600060a086880312156134c457600080fd5b6134cd8661309c565b94506020860151935060408601519250606086015191506134f06080870161309c565b90509295509295909350565b6000815180845260005b8181101561352257602081850181015186830182015201613506565b81811115613534576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000610cbe60208301846134fc565b60208152815160208201526020820151604082015261ffff60408301511660608201526000606083015163ffffffff80821660808501528060808601511660a0850152505060a083015160c0808401526113eb60e08401826134fc565b6000604082018483526020604081850152818551808452606086019150828701935060005b81811015613618578451835293830193918301916001016135fc565b5090979650505050505050565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff8111828210171561366c5761366c61393d565b604052919050565b60008219821115613687576136876138b0565b500190565b600063ffffffff8083168185168083038211156136ab576136ab6138b0565b01949350505050565b600060ff821660ff84168060ff038211156136d1576136d16138b0565b019392505050565b6000826136e8576136e86138df565b500490565b600063ffffffff80841680613704576137046138df565b92169190910492915050565b600181815b8085111561376957817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0482111561374f5761374f6138b0565b8085161561375c57918102915b93841c9390800290613715565b509250929050565b6000610cbe838360008261378757506001610cc1565b8161379457506000610cc1565b81600181146137aa57600281146137b4576137d0565b6001915050610cc1565b60ff8411156137c5576137c56138b0565b50506001821b610cc1565b5060208310610133831016604e8410600b84101617156137f3575081810a610cc1565b6137fd8383613710565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0482111561382f5761382f6138b0565b029392505050565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561386f5761386f6138b0565b500290565b600082821015613886576138866138b0565b500390565b600063ffffffff838116908316818110156138a8576138a86138b0565b039392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b801515811461213657600080fdfea164736f6c6343000806000a", } var VRFV2PlusWrapperABI = VRFV2PlusWrapperMetaData.ABI @@ -314,13 +314,14 @@ func (_VRFV2PlusWrapper *VRFV2PlusWrapperCaller) GetConfig(opts *bind.CallOpts) outstruct.FallbackWeiPerUnitLink = *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) outstruct.StalenessSeconds = *abi.ConvertType(out[1], new(uint32)).(*uint32) - outstruct.FulfillmentFlatFeeLinkPPM = *abi.ConvertType(out[2], new(uint32)).(*uint32) - outstruct.FulfillmentFlatFeeNativePPM = *abi.ConvertType(out[3], new(uint32)).(*uint32) + 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.WrapperPremiumPercentage = *abi.ConvertType(out[6], new(uint8)).(*uint8) - outstruct.KeyHash = *abi.ConvertType(out[7], new([32]byte)).(*[32]byte) - outstruct.MaxNumWords = *abi.ConvertType(out[8], new(uint8)).(*uint8) + outstruct.WrapperNativePremiumPercentage = *abi.ConvertType(out[6], new(uint8)).(*uint8) + outstruct.WrapperLinkPremiumPercentage = *abi.ConvertType(out[7], new(uint8)).(*uint8) + outstruct.KeyHash = *abi.ConvertType(out[8], new([32]byte)).(*[32]byte) + outstruct.MaxNumWords = *abi.ConvertType(out[9], new(uint8)).(*uint8) return *outstruct, err @@ -360,6 +361,28 @@ func (_VRFV2PlusWrapper *VRFV2PlusWrapperCallerSession) LastRequestId() (*big.In return _VRFV2PlusWrapper.Contract.LastRequestId(&_VRFV2PlusWrapper.CallOpts) } +func (_VRFV2PlusWrapper *VRFV2PlusWrapperCaller) Link(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _VRFV2PlusWrapper.contract.Call(opts, &out, "link") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +func (_VRFV2PlusWrapper *VRFV2PlusWrapperSession) Link() (common.Address, error) { + return _VRFV2PlusWrapper.Contract.Link(&_VRFV2PlusWrapper.CallOpts) +} + +func (_VRFV2PlusWrapper *VRFV2PlusWrapperCallerSession) Link() (common.Address, error) { + return _VRFV2PlusWrapper.Contract.Link(&_VRFV2PlusWrapper.CallOpts) +} + func (_VRFV2PlusWrapper *VRFV2PlusWrapperCaller) Owner(opts *bind.CallOpts) (common.Address, error) { var out []interface{} err := _VRFV2PlusWrapper.contract.Call(opts, &out, "owner") @@ -479,28 +502,6 @@ func (_VRFV2PlusWrapper *VRFV2PlusWrapperCallerSession) SFulfillmentTxSizeBytes( return _VRFV2PlusWrapper.Contract.SFulfillmentTxSizeBytes(&_VRFV2PlusWrapper.CallOpts) } -func (_VRFV2PlusWrapper *VRFV2PlusWrapperCaller) SLink(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _VRFV2PlusWrapper.contract.Call(opts, &out, "s_link") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -func (_VRFV2PlusWrapper *VRFV2PlusWrapperSession) SLink() (common.Address, error) { - return _VRFV2PlusWrapper.Contract.SLink(&_VRFV2PlusWrapper.CallOpts) -} - -func (_VRFV2PlusWrapper *VRFV2PlusWrapperCallerSession) SLink() (common.Address, error) { - return _VRFV2PlusWrapper.Contract.SLink(&_VRFV2PlusWrapper.CallOpts) -} - func (_VRFV2PlusWrapper *VRFV2PlusWrapperCaller) SLinkNativeFeed(opts *bind.CallOpts) (common.Address, error) { var out []interface{} err := _VRFV2PlusWrapper.contract.Call(opts, &out, "s_linkNativeFeed") @@ -651,16 +652,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, _wrapperPremiumPercentage uint8, _keyHash [32]byte, _maxNumWords uint8, _stalenessSeconds uint32, _fallbackWeiPerUnitLink *big.Int, _fulfillmentFlatFeeLinkPPM uint32, _fulfillmentFlatFeeNativePPM uint32) (*types.Transaction, error) { - return _VRFV2PlusWrapper.contract.Transact(opts, "setConfig", _wrapperGasOverhead, _coordinatorGasOverhead, _wrapperPremiumPercentage, _keyHash, _maxNumWords, _stalenessSeconds, _fallbackWeiPerUnitLink, _fulfillmentFlatFeeLinkPPM, _fulfillmentFlatFeeNativePPM) +func (_VRFV2PlusWrapper *VRFV2PlusWrapperTransactor) SetConfig(opts *bind.TransactOpts, _wrapperGasOverhead uint32, _coordinatorGasOverhead uint32, _wrapperNativePremiumPercentage uint8, _wrapperLinkPremiumPercentage 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, _wrapperNativePremiumPercentage, _wrapperLinkPremiumPercentage, _keyHash, _maxNumWords, _stalenessSeconds, _fallbackWeiPerUnitLink, _fulfillmentFlatFeeNativePPM, _fulfillmentFlatFeeLinkDiscountPPM) } -func (_VRFV2PlusWrapper *VRFV2PlusWrapperSession) SetConfig(_wrapperGasOverhead uint32, _coordinatorGasOverhead uint32, _wrapperPremiumPercentage uint8, _keyHash [32]byte, _maxNumWords uint8, _stalenessSeconds uint32, _fallbackWeiPerUnitLink *big.Int, _fulfillmentFlatFeeLinkPPM uint32, _fulfillmentFlatFeeNativePPM uint32) (*types.Transaction, error) { - return _VRFV2PlusWrapper.Contract.SetConfig(&_VRFV2PlusWrapper.TransactOpts, _wrapperGasOverhead, _coordinatorGasOverhead, _wrapperPremiumPercentage, _keyHash, _maxNumWords, _stalenessSeconds, _fallbackWeiPerUnitLink, _fulfillmentFlatFeeLinkPPM, _fulfillmentFlatFeeNativePPM) +func (_VRFV2PlusWrapper *VRFV2PlusWrapperSession) SetConfig(_wrapperGasOverhead uint32, _coordinatorGasOverhead uint32, _wrapperNativePremiumPercentage uint8, _wrapperLinkPremiumPercentage 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, _wrapperNativePremiumPercentage, _wrapperLinkPremiumPercentage, _keyHash, _maxNumWords, _stalenessSeconds, _fallbackWeiPerUnitLink, _fulfillmentFlatFeeNativePPM, _fulfillmentFlatFeeLinkDiscountPPM) } -func (_VRFV2PlusWrapper *VRFV2PlusWrapperTransactorSession) SetConfig(_wrapperGasOverhead uint32, _coordinatorGasOverhead uint32, _wrapperPremiumPercentage uint8, _keyHash [32]byte, _maxNumWords uint8, _stalenessSeconds uint32, _fallbackWeiPerUnitLink *big.Int, _fulfillmentFlatFeeLinkPPM uint32, _fulfillmentFlatFeeNativePPM uint32) (*types.Transaction, error) { - return _VRFV2PlusWrapper.Contract.SetConfig(&_VRFV2PlusWrapper.TransactOpts, _wrapperGasOverhead, _coordinatorGasOverhead, _wrapperPremiumPercentage, _keyHash, _maxNumWords, _stalenessSeconds, _fallbackWeiPerUnitLink, _fulfillmentFlatFeeLinkPPM, _fulfillmentFlatFeeNativePPM) +func (_VRFV2PlusWrapper *VRFV2PlusWrapperTransactorSession) SetConfig(_wrapperGasOverhead uint32, _coordinatorGasOverhead uint32, _wrapperNativePremiumPercentage uint8, _wrapperLinkPremiumPercentage 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, _wrapperNativePremiumPercentage, _wrapperLinkPremiumPercentage, _keyHash, _maxNumWords, _stalenessSeconds, _fallbackWeiPerUnitLink, _fulfillmentFlatFeeNativePPM, _fulfillmentFlatFeeLinkDiscountPPM) } func (_VRFV2PlusWrapper *VRFV2PlusWrapperTransactor) SetCoordinator(opts *bind.TransactOpts, _vrfCoordinator common.Address) (*types.Transaction, error) { @@ -687,18 +688,6 @@ func (_VRFV2PlusWrapper *VRFV2PlusWrapperTransactorSession) SetFulfillmentTxSize return _VRFV2PlusWrapper.Contract.SetFulfillmentTxSize(&_VRFV2PlusWrapper.TransactOpts, size) } -func (_VRFV2PlusWrapper *VRFV2PlusWrapperTransactor) SetLINK(opts *bind.TransactOpts, link common.Address) (*types.Transaction, error) { - return _VRFV2PlusWrapper.contract.Transact(opts, "setLINK", link) -} - -func (_VRFV2PlusWrapper *VRFV2PlusWrapperSession) SetLINK(link common.Address) (*types.Transaction, error) { - return _VRFV2PlusWrapper.Contract.SetLINK(&_VRFV2PlusWrapper.TransactOpts, link) -} - -func (_VRFV2PlusWrapper *VRFV2PlusWrapperTransactorSession) SetLINK(link common.Address) (*types.Transaction, error) { - return _VRFV2PlusWrapper.Contract.SetLINK(&_VRFV2PlusWrapper.TransactOpts, link) -} - func (_VRFV2PlusWrapper *VRFV2PlusWrapperTransactor) SetLinkNativeFeed(opts *bind.TransactOpts, linkNativeFeed common.Address) (*types.Transaction, error) { return _VRFV2PlusWrapper.contract.Transact(opts, "setLinkNativeFeed", linkNativeFeed) } @@ -723,32 +712,32 @@ func (_VRFV2PlusWrapper *VRFV2PlusWrapperTransactorSession) TransferOwnership(to return _VRFV2PlusWrapper.Contract.TransferOwnership(&_VRFV2PlusWrapper.TransactOpts, to) } -func (_VRFV2PlusWrapper *VRFV2PlusWrapperTransactor) Withdraw(opts *bind.TransactOpts, _recipient common.Address, _amount *big.Int) (*types.Transaction, error) { - return _VRFV2PlusWrapper.contract.Transact(opts, "withdraw", _recipient, _amount) +func (_VRFV2PlusWrapper *VRFV2PlusWrapperTransactor) Withdraw(opts *bind.TransactOpts, _recipient common.Address) (*types.Transaction, error) { + return _VRFV2PlusWrapper.contract.Transact(opts, "withdraw", _recipient) } -func (_VRFV2PlusWrapper *VRFV2PlusWrapperSession) Withdraw(_recipient common.Address, _amount *big.Int) (*types.Transaction, error) { - return _VRFV2PlusWrapper.Contract.Withdraw(&_VRFV2PlusWrapper.TransactOpts, _recipient, _amount) +func (_VRFV2PlusWrapper *VRFV2PlusWrapperSession) Withdraw(_recipient common.Address) (*types.Transaction, error) { + return _VRFV2PlusWrapper.Contract.Withdraw(&_VRFV2PlusWrapper.TransactOpts, _recipient) } -func (_VRFV2PlusWrapper *VRFV2PlusWrapperTransactorSession) Withdraw(_recipient common.Address, _amount *big.Int) (*types.Transaction, error) { - return _VRFV2PlusWrapper.Contract.Withdraw(&_VRFV2PlusWrapper.TransactOpts, _recipient, _amount) +func (_VRFV2PlusWrapper *VRFV2PlusWrapperTransactorSession) Withdraw(_recipient common.Address) (*types.Transaction, error) { + return _VRFV2PlusWrapper.Contract.Withdraw(&_VRFV2PlusWrapper.TransactOpts, _recipient) } -func (_VRFV2PlusWrapper *VRFV2PlusWrapperTransactor) WithdrawNative(opts *bind.TransactOpts, _recipient common.Address, _amount *big.Int) (*types.Transaction, error) { - return _VRFV2PlusWrapper.contract.Transact(opts, "withdrawNative", _recipient, _amount) +func (_VRFV2PlusWrapper *VRFV2PlusWrapperTransactor) WithdrawNative(opts *bind.TransactOpts, _recipient common.Address) (*types.Transaction, error) { + return _VRFV2PlusWrapper.contract.Transact(opts, "withdrawNative", _recipient) } -func (_VRFV2PlusWrapper *VRFV2PlusWrapperSession) WithdrawNative(_recipient common.Address, _amount *big.Int) (*types.Transaction, error) { - return _VRFV2PlusWrapper.Contract.WithdrawNative(&_VRFV2PlusWrapper.TransactOpts, _recipient, _amount) +func (_VRFV2PlusWrapper *VRFV2PlusWrapperSession) WithdrawNative(_recipient common.Address) (*types.Transaction, error) { + return _VRFV2PlusWrapper.Contract.WithdrawNative(&_VRFV2PlusWrapper.TransactOpts, _recipient) } -func (_VRFV2PlusWrapper *VRFV2PlusWrapperTransactorSession) WithdrawNative(_recipient common.Address, _amount *big.Int) (*types.Transaction, error) { - return _VRFV2PlusWrapper.Contract.WithdrawNative(&_VRFV2PlusWrapper.TransactOpts, _recipient, _amount) +func (_VRFV2PlusWrapper *VRFV2PlusWrapperTransactorSession) WithdrawNative(_recipient common.Address) (*types.Transaction, error) { + return _VRFV2PlusWrapper.Contract.WithdrawNative(&_VRFV2PlusWrapper.TransactOpts, _recipient) } -type VRFV2PlusWrapperOwnershipTransferRequestedIterator struct { - Event *VRFV2PlusWrapperOwnershipTransferRequested +type VRFV2PlusWrapperConfigSetIterator struct { + Event *VRFV2PlusWrapperConfigSet contract *bind.BoundContract event string @@ -759,7 +748,7 @@ type VRFV2PlusWrapperOwnershipTransferRequestedIterator struct { fail error } -func (it *VRFV2PlusWrapperOwnershipTransferRequestedIterator) Next() bool { +func (it *VRFV2PlusWrapperConfigSetIterator) Next() bool { if it.fail != nil { return false @@ -768,7 +757,7 @@ func (it *VRFV2PlusWrapperOwnershipTransferRequestedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(VRFV2PlusWrapperOwnershipTransferRequested) + it.Event = new(VRFV2PlusWrapperConfigSet) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -783,7 +772,7 @@ func (it *VRFV2PlusWrapperOwnershipTransferRequestedIterator) Next() bool { select { case log := <-it.logs: - it.Event = new(VRFV2PlusWrapperOwnershipTransferRequested) + it.Event = new(VRFV2PlusWrapperConfigSet) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -798,51 +787,41 @@ func (it *VRFV2PlusWrapperOwnershipTransferRequestedIterator) Next() bool { } } -func (it *VRFV2PlusWrapperOwnershipTransferRequestedIterator) Error() error { +func (it *VRFV2PlusWrapperConfigSetIterator) Error() error { return it.fail } -func (it *VRFV2PlusWrapperOwnershipTransferRequestedIterator) Close() error { +func (it *VRFV2PlusWrapperConfigSetIterator) Close() error { it.sub.Unsubscribe() return nil } -type VRFV2PlusWrapperOwnershipTransferRequested struct { - From common.Address - To common.Address - Raw types.Log +type VRFV2PlusWrapperConfigSet struct { + WrapperGasOverhead uint32 + CoordinatorGasOverhead uint32 + WrapperNativePremiumPercentage uint8 + WrapperLinkPremiumPercentage uint8 + KeyHash [32]byte + MaxNumWords uint8 + StalenessSeconds uint32 + FallbackWeiPerUnitLink *big.Int + FulfillmentFlatFeeNativePPM uint32 + FulfillmentFlatFeeLinkDiscountPPM uint32 + Raw types.Log } -func (_VRFV2PlusWrapper *VRFV2PlusWrapperFilterer) FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*VRFV2PlusWrapperOwnershipTransferRequestedIterator, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } +func (_VRFV2PlusWrapper *VRFV2PlusWrapperFilterer) FilterConfigSet(opts *bind.FilterOpts) (*VRFV2PlusWrapperConfigSetIterator, error) { - logs, sub, err := _VRFV2PlusWrapper.contract.FilterLogs(opts, "OwnershipTransferRequested", fromRule, toRule) + logs, sub, err := _VRFV2PlusWrapper.contract.FilterLogs(opts, "ConfigSet") if err != nil { return nil, err } - return &VRFV2PlusWrapperOwnershipTransferRequestedIterator{contract: _VRFV2PlusWrapper.contract, event: "OwnershipTransferRequested", logs: logs, sub: sub}, nil + return &VRFV2PlusWrapperConfigSetIterator{contract: _VRFV2PlusWrapper.contract, event: "ConfigSet", logs: logs, sub: sub}, nil } -func (_VRFV2PlusWrapper *VRFV2PlusWrapperFilterer) WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *VRFV2PlusWrapperOwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } +func (_VRFV2PlusWrapper *VRFV2PlusWrapperFilterer) WatchConfigSet(opts *bind.WatchOpts, sink chan<- *VRFV2PlusWrapperConfigSet) (event.Subscription, error) { - logs, sub, err := _VRFV2PlusWrapper.contract.WatchLogs(opts, "OwnershipTransferRequested", fromRule, toRule) + logs, sub, err := _VRFV2PlusWrapper.contract.WatchLogs(opts, "ConfigSet") if err != nil { return nil, err } @@ -852,8 +831,8 @@ func (_VRFV2PlusWrapper *VRFV2PlusWrapperFilterer) WatchOwnershipTransferRequest select { case log := <-logs: - event := new(VRFV2PlusWrapperOwnershipTransferRequested) - if err := _VRFV2PlusWrapper.contract.UnpackLog(event, "OwnershipTransferRequested", log); err != nil { + event := new(VRFV2PlusWrapperConfigSet) + if err := _VRFV2PlusWrapper.contract.UnpackLog(event, "ConfigSet", log); err != nil { return err } event.Raw = log @@ -874,17 +853,17 @@ func (_VRFV2PlusWrapper *VRFV2PlusWrapperFilterer) WatchOwnershipTransferRequest }), nil } -func (_VRFV2PlusWrapper *VRFV2PlusWrapperFilterer) ParseOwnershipTransferRequested(log types.Log) (*VRFV2PlusWrapperOwnershipTransferRequested, error) { - event := new(VRFV2PlusWrapperOwnershipTransferRequested) - if err := _VRFV2PlusWrapper.contract.UnpackLog(event, "OwnershipTransferRequested", log); err != nil { +func (_VRFV2PlusWrapper *VRFV2PlusWrapperFilterer) ParseConfigSet(log types.Log) (*VRFV2PlusWrapperConfigSet, error) { + event := new(VRFV2PlusWrapperConfigSet) + if err := _VRFV2PlusWrapper.contract.UnpackLog(event, "ConfigSet", log); err != nil { return nil, err } event.Raw = log return event, nil } -type VRFV2PlusWrapperOwnershipTransferredIterator struct { - Event *VRFV2PlusWrapperOwnershipTransferred +type VRFV2PlusWrapperCoordinatorSetIterator struct { + Event *VRFV2PlusWrapperCoordinatorSet contract *bind.BoundContract event string @@ -895,7 +874,7 @@ type VRFV2PlusWrapperOwnershipTransferredIterator struct { fail error } -func (it *VRFV2PlusWrapperOwnershipTransferredIterator) Next() bool { +func (it *VRFV2PlusWrapperCoordinatorSetIterator) Next() bool { if it.fail != nil { return false @@ -904,7 +883,7 @@ func (it *VRFV2PlusWrapperOwnershipTransferredIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(VRFV2PlusWrapperOwnershipTransferred) + it.Event = new(VRFV2PlusWrapperCoordinatorSet) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -919,7 +898,7 @@ func (it *VRFV2PlusWrapperOwnershipTransferredIterator) Next() bool { select { case log := <-it.logs: - it.Event = new(VRFV2PlusWrapperOwnershipTransferred) + it.Event = new(VRFV2PlusWrapperCoordinatorSet) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -934,51 +913,32 @@ func (it *VRFV2PlusWrapperOwnershipTransferredIterator) Next() bool { } } -func (it *VRFV2PlusWrapperOwnershipTransferredIterator) Error() error { +func (it *VRFV2PlusWrapperCoordinatorSetIterator) Error() error { return it.fail } -func (it *VRFV2PlusWrapperOwnershipTransferredIterator) Close() error { +func (it *VRFV2PlusWrapperCoordinatorSetIterator) Close() error { it.sub.Unsubscribe() return nil } -type VRFV2PlusWrapperOwnershipTransferred struct { - From common.Address - To common.Address - Raw types.Log +type VRFV2PlusWrapperCoordinatorSet struct { + VrfCoordinator common.Address + Raw types.Log } -func (_VRFV2PlusWrapper *VRFV2PlusWrapperFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*VRFV2PlusWrapperOwnershipTransferredIterator, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } +func (_VRFV2PlusWrapper *VRFV2PlusWrapperFilterer) FilterCoordinatorSet(opts *bind.FilterOpts) (*VRFV2PlusWrapperCoordinatorSetIterator, error) { - logs, sub, err := _VRFV2PlusWrapper.contract.FilterLogs(opts, "OwnershipTransferred", fromRule, toRule) + logs, sub, err := _VRFV2PlusWrapper.contract.FilterLogs(opts, "CoordinatorSet") if err != nil { return nil, err } - return &VRFV2PlusWrapperOwnershipTransferredIterator{contract: _VRFV2PlusWrapper.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil + return &VRFV2PlusWrapperCoordinatorSetIterator{contract: _VRFV2PlusWrapper.contract, event: "CoordinatorSet", logs: logs, sub: sub}, nil } -func (_VRFV2PlusWrapper *VRFV2PlusWrapperFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *VRFV2PlusWrapperOwnershipTransferred, from []common.Address, to []common.Address) (event.Subscription, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } +func (_VRFV2PlusWrapper *VRFV2PlusWrapperFilterer) WatchCoordinatorSet(opts *bind.WatchOpts, sink chan<- *VRFV2PlusWrapperCoordinatorSet) (event.Subscription, error) { - logs, sub, err := _VRFV2PlusWrapper.contract.WatchLogs(opts, "OwnershipTransferred", fromRule, toRule) + logs, sub, err := _VRFV2PlusWrapper.contract.WatchLogs(opts, "CoordinatorSet") if err != nil { return nil, err } @@ -988,8 +948,8 @@ func (_VRFV2PlusWrapper *VRFV2PlusWrapperFilterer) WatchOwnershipTransferred(opt select { case log := <-logs: - event := new(VRFV2PlusWrapperOwnershipTransferred) - if err := _VRFV2PlusWrapper.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + event := new(VRFV2PlusWrapperCoordinatorSet) + if err := _VRFV2PlusWrapper.contract.UnpackLog(event, "CoordinatorSet", log); err != nil { return err } event.Raw = log @@ -1010,17 +970,17 @@ func (_VRFV2PlusWrapper *VRFV2PlusWrapperFilterer) WatchOwnershipTransferred(opt }), nil } -func (_VRFV2PlusWrapper *VRFV2PlusWrapperFilterer) ParseOwnershipTransferred(log types.Log) (*VRFV2PlusWrapperOwnershipTransferred, error) { - event := new(VRFV2PlusWrapperOwnershipTransferred) - if err := _VRFV2PlusWrapper.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { +func (_VRFV2PlusWrapper *VRFV2PlusWrapperFilterer) ParseCoordinatorSet(log types.Log) (*VRFV2PlusWrapperCoordinatorSet, error) { + event := new(VRFV2PlusWrapperCoordinatorSet) + if err := _VRFV2PlusWrapper.contract.UnpackLog(event, "CoordinatorSet", log); err != nil { return nil, err } event.Raw = log return event, nil } -type VRFV2PlusWrapperWrapperFulfillmentFailedIterator struct { - Event *VRFV2PlusWrapperWrapperFulfillmentFailed +type VRFV2PlusWrapperDisabledIterator struct { + Event *VRFV2PlusWrapperDisabled contract *bind.BoundContract event string @@ -1031,7 +991,7 @@ type VRFV2PlusWrapperWrapperFulfillmentFailedIterator struct { fail error } -func (it *VRFV2PlusWrapperWrapperFulfillmentFailedIterator) Next() bool { +func (it *VRFV2PlusWrapperDisabledIterator) Next() bool { if it.fail != nil { return false @@ -1040,7 +1000,7 @@ func (it *VRFV2PlusWrapperWrapperFulfillmentFailedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(VRFV2PlusWrapperWrapperFulfillmentFailed) + it.Event = new(VRFV2PlusWrapperDisabled) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1055,7 +1015,7 @@ func (it *VRFV2PlusWrapperWrapperFulfillmentFailedIterator) Next() bool { select { case log := <-it.logs: - it.Event = new(VRFV2PlusWrapperWrapperFulfillmentFailed) + it.Event = new(VRFV2PlusWrapperDisabled) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1070,51 +1030,31 @@ func (it *VRFV2PlusWrapperWrapperFulfillmentFailedIterator) Next() bool { } } -func (it *VRFV2PlusWrapperWrapperFulfillmentFailedIterator) Error() error { +func (it *VRFV2PlusWrapperDisabledIterator) Error() error { return it.fail } -func (it *VRFV2PlusWrapperWrapperFulfillmentFailedIterator) Close() error { +func (it *VRFV2PlusWrapperDisabledIterator) Close() error { it.sub.Unsubscribe() return nil } -type VRFV2PlusWrapperWrapperFulfillmentFailed struct { - RequestId *big.Int - Consumer common.Address - Raw types.Log +type VRFV2PlusWrapperDisabled struct { + Raw types.Log } -func (_VRFV2PlusWrapper *VRFV2PlusWrapperFilterer) FilterWrapperFulfillmentFailed(opts *bind.FilterOpts, requestId []*big.Int, consumer []common.Address) (*VRFV2PlusWrapperWrapperFulfillmentFailedIterator, error) { - - var requestIdRule []interface{} - for _, requestIdItem := range requestId { - requestIdRule = append(requestIdRule, requestIdItem) - } - var consumerRule []interface{} - for _, consumerItem := range consumer { - consumerRule = append(consumerRule, consumerItem) - } +func (_VRFV2PlusWrapper *VRFV2PlusWrapperFilterer) FilterDisabled(opts *bind.FilterOpts) (*VRFV2PlusWrapperDisabledIterator, error) { - logs, sub, err := _VRFV2PlusWrapper.contract.FilterLogs(opts, "WrapperFulfillmentFailed", requestIdRule, consumerRule) + logs, sub, err := _VRFV2PlusWrapper.contract.FilterLogs(opts, "Disabled") if err != nil { return nil, err } - return &VRFV2PlusWrapperWrapperFulfillmentFailedIterator{contract: _VRFV2PlusWrapper.contract, event: "WrapperFulfillmentFailed", logs: logs, sub: sub}, nil + return &VRFV2PlusWrapperDisabledIterator{contract: _VRFV2PlusWrapper.contract, event: "Disabled", logs: logs, sub: sub}, nil } -func (_VRFV2PlusWrapper *VRFV2PlusWrapperFilterer) WatchWrapperFulfillmentFailed(opts *bind.WatchOpts, sink chan<- *VRFV2PlusWrapperWrapperFulfillmentFailed, requestId []*big.Int, consumer []common.Address) (event.Subscription, error) { - - var requestIdRule []interface{} - for _, requestIdItem := range requestId { - requestIdRule = append(requestIdRule, requestIdItem) - } - var consumerRule []interface{} - for _, consumerItem := range consumer { - consumerRule = append(consumerRule, consumerItem) - } +func (_VRFV2PlusWrapper *VRFV2PlusWrapperFilterer) WatchDisabled(opts *bind.WatchOpts, sink chan<- *VRFV2PlusWrapperDisabled) (event.Subscription, error) { - logs, sub, err := _VRFV2PlusWrapper.contract.WatchLogs(opts, "WrapperFulfillmentFailed", requestIdRule, consumerRule) + logs, sub, err := _VRFV2PlusWrapper.contract.WatchLogs(opts, "Disabled") if err != nil { return nil, err } @@ -1124,8 +1064,8 @@ func (_VRFV2PlusWrapper *VRFV2PlusWrapperFilterer) WatchWrapperFulfillmentFailed select { case log := <-logs: - event := new(VRFV2PlusWrapperWrapperFulfillmentFailed) - if err := _VRFV2PlusWrapper.contract.UnpackLog(event, "WrapperFulfillmentFailed", log); err != nil { + event := new(VRFV2PlusWrapperDisabled) + if err := _VRFV2PlusWrapper.contract.UnpackLog(event, "Disabled", log); err != nil { return err } event.Raw = log @@ -1146,86 +1086,1275 @@ func (_VRFV2PlusWrapper *VRFV2PlusWrapperFilterer) WatchWrapperFulfillmentFailed }), nil } -func (_VRFV2PlusWrapper *VRFV2PlusWrapperFilterer) ParseWrapperFulfillmentFailed(log types.Log) (*VRFV2PlusWrapperWrapperFulfillmentFailed, error) { - event := new(VRFV2PlusWrapperWrapperFulfillmentFailed) - if err := _VRFV2PlusWrapper.contract.UnpackLog(event, "WrapperFulfillmentFailed", log); err != nil { +func (_VRFV2PlusWrapper *VRFV2PlusWrapperFilterer) ParseDisabled(log types.Log) (*VRFV2PlusWrapperDisabled, error) { + event := new(VRFV2PlusWrapperDisabled) + if err := _VRFV2PlusWrapper.contract.UnpackLog(event, "Disabled", log); err != nil { return nil, err } event.Raw = log return event, nil } -type GetConfig struct { - FallbackWeiPerUnitLink *big.Int - StalenessSeconds uint32 - FulfillmentFlatFeeLinkPPM uint32 - FulfillmentFlatFeeNativePPM uint32 - WrapperGasOverhead uint32 - CoordinatorGasOverhead uint32 - WrapperPremiumPercentage uint8 - KeyHash [32]byte - MaxNumWords uint8 -} -type SCallbacks struct { - CallbackAddress common.Address - CallbackGasLimit uint32 - RequestGasPrice uint64 -} - -func (_VRFV2PlusWrapper *VRFV2PlusWrapper) ParseLog(log types.Log) (generated.AbigenLog, error) { - switch log.Topics[0] { - case _VRFV2PlusWrapper.abi.Events["OwnershipTransferRequested"].ID: - return _VRFV2PlusWrapper.ParseOwnershipTransferRequested(log) - case _VRFV2PlusWrapper.abi.Events["OwnershipTransferred"].ID: - return _VRFV2PlusWrapper.ParseOwnershipTransferred(log) - case _VRFV2PlusWrapper.abi.Events["WrapperFulfillmentFailed"].ID: - return _VRFV2PlusWrapper.ParseWrapperFulfillmentFailed(log) +type VRFV2PlusWrapperEnabledIterator struct { + Event *VRFV2PlusWrapperEnabled - default: - return nil, fmt.Errorf("abigen wrapper received unknown log topic: %v", log.Topics[0]) - } -} + contract *bind.BoundContract + event string -func (VRFV2PlusWrapperOwnershipTransferRequested) Topic() common.Hash { - return common.HexToHash("0xed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae1278") + logs chan types.Log + sub ethereum.Subscription + done bool + fail error } -func (VRFV2PlusWrapperOwnershipTransferred) Topic() common.Hash { - return common.HexToHash("0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0") -} +func (it *VRFV2PlusWrapperEnabledIterator) Next() bool { -func (VRFV2PlusWrapperWrapperFulfillmentFailed) Topic() common.Hash { - return common.HexToHash("0xc551b83c151f2d1c7eeb938ac59008e0409f1c1dc1e2f112449d4d79b4589022") -} + if it.fail != nil { + return false + } -func (_VRFV2PlusWrapper *VRFV2PlusWrapper) Address() common.Address { - return _VRFV2PlusWrapper.address -} + if it.done { + select { + case log := <-it.logs: + it.Event = new(VRFV2PlusWrapperEnabled) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true -type VRFV2PlusWrapperInterface interface { - SUBSCRIPTIONID(opts *bind.CallOpts) (*big.Int, error) + default: + return false + } + } - CalculateRequestPrice(opts *bind.CallOpts, _callbackGasLimit uint32) (*big.Int, error) + select { + case log := <-it.logs: + it.Event = new(VRFV2PlusWrapperEnabled) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true - CalculateRequestPriceNative(opts *bind.CallOpts, _callbackGasLimit uint32) (*big.Int, error) + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} - CheckPaymentMode(opts *bind.CallOpts, extraArgs []byte, isLinkMode bool) error +func (it *VRFV2PlusWrapperEnabledIterator) Error() error { + return it.fail +} - EstimateRequestPrice(opts *bind.CallOpts, _callbackGasLimit uint32, _requestGasPriceWei *big.Int) (*big.Int, error) +func (it *VRFV2PlusWrapperEnabledIterator) Close() error { + it.sub.Unsubscribe() + return nil +} - EstimateRequestPriceNative(opts *bind.CallOpts, _callbackGasLimit uint32, _requestGasPriceWei *big.Int) (*big.Int, error) +type VRFV2PlusWrapperEnabled struct { + Raw types.Log +} - GetConfig(opts *bind.CallOpts) (GetConfig, +func (_VRFV2PlusWrapper *VRFV2PlusWrapperFilterer) FilterEnabled(opts *bind.FilterOpts) (*VRFV2PlusWrapperEnabledIterator, error) { - error) + logs, sub, err := _VRFV2PlusWrapper.contract.FilterLogs(opts, "Enabled") + if err != nil { + return nil, err + } + return &VRFV2PlusWrapperEnabledIterator{contract: _VRFV2PlusWrapper.contract, event: "Enabled", logs: logs, sub: sub}, nil +} - LastRequestId(opts *bind.CallOpts) (*big.Int, error) +func (_VRFV2PlusWrapper *VRFV2PlusWrapperFilterer) WatchEnabled(opts *bind.WatchOpts, sink chan<- *VRFV2PlusWrapperEnabled) (event.Subscription, error) { - Owner(opts *bind.CallOpts) (common.Address, error) + logs, sub, err := _VRFV2PlusWrapper.contract.WatchLogs(opts, "Enabled") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: - SCallbacks(opts *bind.CallOpts, arg0 *big.Int) (SCallbacks, + event := new(VRFV2PlusWrapperEnabled) + if err := _VRFV2PlusWrapper.contract.UnpackLog(event, "Enabled", log); err != nil { + return err + } + event.Raw = log - error) + 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 (_VRFV2PlusWrapper *VRFV2PlusWrapperFilterer) ParseEnabled(log types.Log) (*VRFV2PlusWrapperEnabled, error) { + event := new(VRFV2PlusWrapperEnabled) + if err := _VRFV2PlusWrapper.contract.UnpackLog(event, "Enabled", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type VRFV2PlusWrapperFallbackWeiPerUnitLinkUsedIterator struct { + Event *VRFV2PlusWrapperFallbackWeiPerUnitLinkUsed + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *VRFV2PlusWrapperFallbackWeiPerUnitLinkUsedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(VRFV2PlusWrapperFallbackWeiPerUnitLinkUsed) + 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(VRFV2PlusWrapperFallbackWeiPerUnitLinkUsed) + 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 *VRFV2PlusWrapperFallbackWeiPerUnitLinkUsedIterator) Error() error { + return it.fail +} + +func (it *VRFV2PlusWrapperFallbackWeiPerUnitLinkUsedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type VRFV2PlusWrapperFallbackWeiPerUnitLinkUsed struct { + RequestId *big.Int + FallbackWeiPerUnitLink *big.Int + Raw types.Log +} + +func (_VRFV2PlusWrapper *VRFV2PlusWrapperFilterer) FilterFallbackWeiPerUnitLinkUsed(opts *bind.FilterOpts) (*VRFV2PlusWrapperFallbackWeiPerUnitLinkUsedIterator, error) { + + logs, sub, err := _VRFV2PlusWrapper.contract.FilterLogs(opts, "FallbackWeiPerUnitLinkUsed") + if err != nil { + return nil, err + } + return &VRFV2PlusWrapperFallbackWeiPerUnitLinkUsedIterator{contract: _VRFV2PlusWrapper.contract, event: "FallbackWeiPerUnitLinkUsed", logs: logs, sub: sub}, nil +} + +func (_VRFV2PlusWrapper *VRFV2PlusWrapperFilterer) WatchFallbackWeiPerUnitLinkUsed(opts *bind.WatchOpts, sink chan<- *VRFV2PlusWrapperFallbackWeiPerUnitLinkUsed) (event.Subscription, error) { + + logs, sub, err := _VRFV2PlusWrapper.contract.WatchLogs(opts, "FallbackWeiPerUnitLinkUsed") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(VRFV2PlusWrapperFallbackWeiPerUnitLinkUsed) + if err := _VRFV2PlusWrapper.contract.UnpackLog(event, "FallbackWeiPerUnitLinkUsed", 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 (_VRFV2PlusWrapper *VRFV2PlusWrapperFilterer) ParseFallbackWeiPerUnitLinkUsed(log types.Log) (*VRFV2PlusWrapperFallbackWeiPerUnitLinkUsed, error) { + event := new(VRFV2PlusWrapperFallbackWeiPerUnitLinkUsed) + if err := _VRFV2PlusWrapper.contract.UnpackLog(event, "FallbackWeiPerUnitLinkUsed", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type VRFV2PlusWrapperFulfillmentTxSizeSetIterator struct { + Event *VRFV2PlusWrapperFulfillmentTxSizeSet + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *VRFV2PlusWrapperFulfillmentTxSizeSetIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(VRFV2PlusWrapperFulfillmentTxSizeSet) + 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(VRFV2PlusWrapperFulfillmentTxSizeSet) + 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 *VRFV2PlusWrapperFulfillmentTxSizeSetIterator) Error() error { + return it.fail +} + +func (it *VRFV2PlusWrapperFulfillmentTxSizeSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type VRFV2PlusWrapperFulfillmentTxSizeSet struct { + Size uint32 + Raw types.Log +} + +func (_VRFV2PlusWrapper *VRFV2PlusWrapperFilterer) FilterFulfillmentTxSizeSet(opts *bind.FilterOpts) (*VRFV2PlusWrapperFulfillmentTxSizeSetIterator, error) { + + logs, sub, err := _VRFV2PlusWrapper.contract.FilterLogs(opts, "FulfillmentTxSizeSet") + if err != nil { + return nil, err + } + return &VRFV2PlusWrapperFulfillmentTxSizeSetIterator{contract: _VRFV2PlusWrapper.contract, event: "FulfillmentTxSizeSet", logs: logs, sub: sub}, nil +} + +func (_VRFV2PlusWrapper *VRFV2PlusWrapperFilterer) WatchFulfillmentTxSizeSet(opts *bind.WatchOpts, sink chan<- *VRFV2PlusWrapperFulfillmentTxSizeSet) (event.Subscription, error) { + + logs, sub, err := _VRFV2PlusWrapper.contract.WatchLogs(opts, "FulfillmentTxSizeSet") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(VRFV2PlusWrapperFulfillmentTxSizeSet) + if err := _VRFV2PlusWrapper.contract.UnpackLog(event, "FulfillmentTxSizeSet", 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 (_VRFV2PlusWrapper *VRFV2PlusWrapperFilterer) ParseFulfillmentTxSizeSet(log types.Log) (*VRFV2PlusWrapperFulfillmentTxSizeSet, error) { + event := new(VRFV2PlusWrapperFulfillmentTxSizeSet) + if err := _VRFV2PlusWrapper.contract.UnpackLog(event, "FulfillmentTxSizeSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type VRFV2PlusWrapperLinkNativeFeedSetIterator struct { + Event *VRFV2PlusWrapperLinkNativeFeedSet + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *VRFV2PlusWrapperLinkNativeFeedSetIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(VRFV2PlusWrapperLinkNativeFeedSet) + 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(VRFV2PlusWrapperLinkNativeFeedSet) + 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 *VRFV2PlusWrapperLinkNativeFeedSetIterator) Error() error { + return it.fail +} + +func (it *VRFV2PlusWrapperLinkNativeFeedSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type VRFV2PlusWrapperLinkNativeFeedSet struct { + LinkNativeFeed common.Address + Raw types.Log +} + +func (_VRFV2PlusWrapper *VRFV2PlusWrapperFilterer) FilterLinkNativeFeedSet(opts *bind.FilterOpts) (*VRFV2PlusWrapperLinkNativeFeedSetIterator, error) { + + logs, sub, err := _VRFV2PlusWrapper.contract.FilterLogs(opts, "LinkNativeFeedSet") + if err != nil { + return nil, err + } + return &VRFV2PlusWrapperLinkNativeFeedSetIterator{contract: _VRFV2PlusWrapper.contract, event: "LinkNativeFeedSet", logs: logs, sub: sub}, nil +} + +func (_VRFV2PlusWrapper *VRFV2PlusWrapperFilterer) WatchLinkNativeFeedSet(opts *bind.WatchOpts, sink chan<- *VRFV2PlusWrapperLinkNativeFeedSet) (event.Subscription, error) { + + logs, sub, err := _VRFV2PlusWrapper.contract.WatchLogs(opts, "LinkNativeFeedSet") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(VRFV2PlusWrapperLinkNativeFeedSet) + if err := _VRFV2PlusWrapper.contract.UnpackLog(event, "LinkNativeFeedSet", 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 (_VRFV2PlusWrapper *VRFV2PlusWrapperFilterer) ParseLinkNativeFeedSet(log types.Log) (*VRFV2PlusWrapperLinkNativeFeedSet, error) { + event := new(VRFV2PlusWrapperLinkNativeFeedSet) + if err := _VRFV2PlusWrapper.contract.UnpackLog(event, "LinkNativeFeedSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type VRFV2PlusWrapperNativeWithdrawnIterator struct { + Event *VRFV2PlusWrapperNativeWithdrawn + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *VRFV2PlusWrapperNativeWithdrawnIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(VRFV2PlusWrapperNativeWithdrawn) + 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(VRFV2PlusWrapperNativeWithdrawn) + 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 *VRFV2PlusWrapperNativeWithdrawnIterator) Error() error { + return it.fail +} + +func (it *VRFV2PlusWrapperNativeWithdrawnIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type VRFV2PlusWrapperNativeWithdrawn struct { + To common.Address + Amount *big.Int + Raw types.Log +} + +func (_VRFV2PlusWrapper *VRFV2PlusWrapperFilterer) FilterNativeWithdrawn(opts *bind.FilterOpts, to []common.Address) (*VRFV2PlusWrapperNativeWithdrawnIterator, error) { + + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _VRFV2PlusWrapper.contract.FilterLogs(opts, "NativeWithdrawn", toRule) + if err != nil { + return nil, err + } + return &VRFV2PlusWrapperNativeWithdrawnIterator{contract: _VRFV2PlusWrapper.contract, event: "NativeWithdrawn", logs: logs, sub: sub}, nil +} + +func (_VRFV2PlusWrapper *VRFV2PlusWrapperFilterer) WatchNativeWithdrawn(opts *bind.WatchOpts, sink chan<- *VRFV2PlusWrapperNativeWithdrawn, to []common.Address) (event.Subscription, error) { + + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _VRFV2PlusWrapper.contract.WatchLogs(opts, "NativeWithdrawn", toRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(VRFV2PlusWrapperNativeWithdrawn) + if err := _VRFV2PlusWrapper.contract.UnpackLog(event, "NativeWithdrawn", 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 (_VRFV2PlusWrapper *VRFV2PlusWrapperFilterer) ParseNativeWithdrawn(log types.Log) (*VRFV2PlusWrapperNativeWithdrawn, error) { + event := new(VRFV2PlusWrapperNativeWithdrawn) + if err := _VRFV2PlusWrapper.contract.UnpackLog(event, "NativeWithdrawn", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type VRFV2PlusWrapperOwnershipTransferRequestedIterator struct { + Event *VRFV2PlusWrapperOwnershipTransferRequested + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *VRFV2PlusWrapperOwnershipTransferRequestedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(VRFV2PlusWrapperOwnershipTransferRequested) + 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(VRFV2PlusWrapperOwnershipTransferRequested) + 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 *VRFV2PlusWrapperOwnershipTransferRequestedIterator) Error() error { + return it.fail +} + +func (it *VRFV2PlusWrapperOwnershipTransferRequestedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type VRFV2PlusWrapperOwnershipTransferRequested struct { + From common.Address + To common.Address + Raw types.Log +} + +func (_VRFV2PlusWrapper *VRFV2PlusWrapperFilterer) FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*VRFV2PlusWrapperOwnershipTransferRequestedIterator, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _VRFV2PlusWrapper.contract.FilterLogs(opts, "OwnershipTransferRequested", fromRule, toRule) + if err != nil { + return nil, err + } + return &VRFV2PlusWrapperOwnershipTransferRequestedIterator{contract: _VRFV2PlusWrapper.contract, event: "OwnershipTransferRequested", logs: logs, sub: sub}, nil +} + +func (_VRFV2PlusWrapper *VRFV2PlusWrapperFilterer) WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *VRFV2PlusWrapperOwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _VRFV2PlusWrapper.contract.WatchLogs(opts, "OwnershipTransferRequested", fromRule, toRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(VRFV2PlusWrapperOwnershipTransferRequested) + if err := _VRFV2PlusWrapper.contract.UnpackLog(event, "OwnershipTransferRequested", 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 (_VRFV2PlusWrapper *VRFV2PlusWrapperFilterer) ParseOwnershipTransferRequested(log types.Log) (*VRFV2PlusWrapperOwnershipTransferRequested, error) { + event := new(VRFV2PlusWrapperOwnershipTransferRequested) + if err := _VRFV2PlusWrapper.contract.UnpackLog(event, "OwnershipTransferRequested", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type VRFV2PlusWrapperOwnershipTransferredIterator struct { + Event *VRFV2PlusWrapperOwnershipTransferred + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *VRFV2PlusWrapperOwnershipTransferredIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(VRFV2PlusWrapperOwnershipTransferred) + 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(VRFV2PlusWrapperOwnershipTransferred) + 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 *VRFV2PlusWrapperOwnershipTransferredIterator) Error() error { + return it.fail +} + +func (it *VRFV2PlusWrapperOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type VRFV2PlusWrapperOwnershipTransferred struct { + From common.Address + To common.Address + Raw types.Log +} + +func (_VRFV2PlusWrapper *VRFV2PlusWrapperFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*VRFV2PlusWrapperOwnershipTransferredIterator, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _VRFV2PlusWrapper.contract.FilterLogs(opts, "OwnershipTransferred", fromRule, toRule) + if err != nil { + return nil, err + } + return &VRFV2PlusWrapperOwnershipTransferredIterator{contract: _VRFV2PlusWrapper.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil +} + +func (_VRFV2PlusWrapper *VRFV2PlusWrapperFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *VRFV2PlusWrapperOwnershipTransferred, from []common.Address, to []common.Address) (event.Subscription, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _VRFV2PlusWrapper.contract.WatchLogs(opts, "OwnershipTransferred", fromRule, toRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(VRFV2PlusWrapperOwnershipTransferred) + if err := _VRFV2PlusWrapper.contract.UnpackLog(event, "OwnershipTransferred", 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 (_VRFV2PlusWrapper *VRFV2PlusWrapperFilterer) ParseOwnershipTransferred(log types.Log) (*VRFV2PlusWrapperOwnershipTransferred, error) { + event := new(VRFV2PlusWrapperOwnershipTransferred) + if err := _VRFV2PlusWrapper.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type VRFV2PlusWrapperWithdrawnIterator struct { + Event *VRFV2PlusWrapperWithdrawn + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *VRFV2PlusWrapperWithdrawnIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(VRFV2PlusWrapperWithdrawn) + 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(VRFV2PlusWrapperWithdrawn) + 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 *VRFV2PlusWrapperWithdrawnIterator) Error() error { + return it.fail +} + +func (it *VRFV2PlusWrapperWithdrawnIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type VRFV2PlusWrapperWithdrawn struct { + To common.Address + Amount *big.Int + Raw types.Log +} + +func (_VRFV2PlusWrapper *VRFV2PlusWrapperFilterer) FilterWithdrawn(opts *bind.FilterOpts, to []common.Address) (*VRFV2PlusWrapperWithdrawnIterator, error) { + + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _VRFV2PlusWrapper.contract.FilterLogs(opts, "Withdrawn", toRule) + if err != nil { + return nil, err + } + return &VRFV2PlusWrapperWithdrawnIterator{contract: _VRFV2PlusWrapper.contract, event: "Withdrawn", logs: logs, sub: sub}, nil +} + +func (_VRFV2PlusWrapper *VRFV2PlusWrapperFilterer) WatchWithdrawn(opts *bind.WatchOpts, sink chan<- *VRFV2PlusWrapperWithdrawn, to []common.Address) (event.Subscription, error) { + + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _VRFV2PlusWrapper.contract.WatchLogs(opts, "Withdrawn", toRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(VRFV2PlusWrapperWithdrawn) + if err := _VRFV2PlusWrapper.contract.UnpackLog(event, "Withdrawn", 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 (_VRFV2PlusWrapper *VRFV2PlusWrapperFilterer) ParseWithdrawn(log types.Log) (*VRFV2PlusWrapperWithdrawn, error) { + event := new(VRFV2PlusWrapperWithdrawn) + if err := _VRFV2PlusWrapper.contract.UnpackLog(event, "Withdrawn", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type VRFV2PlusWrapperWrapperFulfillmentFailedIterator struct { + Event *VRFV2PlusWrapperWrapperFulfillmentFailed + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *VRFV2PlusWrapperWrapperFulfillmentFailedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(VRFV2PlusWrapperWrapperFulfillmentFailed) + 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(VRFV2PlusWrapperWrapperFulfillmentFailed) + 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 *VRFV2PlusWrapperWrapperFulfillmentFailedIterator) Error() error { + return it.fail +} + +func (it *VRFV2PlusWrapperWrapperFulfillmentFailedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type VRFV2PlusWrapperWrapperFulfillmentFailed struct { + RequestId *big.Int + Consumer common.Address + Raw types.Log +} + +func (_VRFV2PlusWrapper *VRFV2PlusWrapperFilterer) FilterWrapperFulfillmentFailed(opts *bind.FilterOpts, requestId []*big.Int, consumer []common.Address) (*VRFV2PlusWrapperWrapperFulfillmentFailedIterator, error) { + + var requestIdRule []interface{} + for _, requestIdItem := range requestId { + requestIdRule = append(requestIdRule, requestIdItem) + } + var consumerRule []interface{} + for _, consumerItem := range consumer { + consumerRule = append(consumerRule, consumerItem) + } + + logs, sub, err := _VRFV2PlusWrapper.contract.FilterLogs(opts, "WrapperFulfillmentFailed", requestIdRule, consumerRule) + if err != nil { + return nil, err + } + return &VRFV2PlusWrapperWrapperFulfillmentFailedIterator{contract: _VRFV2PlusWrapper.contract, event: "WrapperFulfillmentFailed", logs: logs, sub: sub}, nil +} + +func (_VRFV2PlusWrapper *VRFV2PlusWrapperFilterer) WatchWrapperFulfillmentFailed(opts *bind.WatchOpts, sink chan<- *VRFV2PlusWrapperWrapperFulfillmentFailed, requestId []*big.Int, consumer []common.Address) (event.Subscription, error) { + + var requestIdRule []interface{} + for _, requestIdItem := range requestId { + requestIdRule = append(requestIdRule, requestIdItem) + } + var consumerRule []interface{} + for _, consumerItem := range consumer { + consumerRule = append(consumerRule, consumerItem) + } + + logs, sub, err := _VRFV2PlusWrapper.contract.WatchLogs(opts, "WrapperFulfillmentFailed", requestIdRule, consumerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(VRFV2PlusWrapperWrapperFulfillmentFailed) + if err := _VRFV2PlusWrapper.contract.UnpackLog(event, "WrapperFulfillmentFailed", 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 (_VRFV2PlusWrapper *VRFV2PlusWrapperFilterer) ParseWrapperFulfillmentFailed(log types.Log) (*VRFV2PlusWrapperWrapperFulfillmentFailed, error) { + event := new(VRFV2PlusWrapperWrapperFulfillmentFailed) + if err := _VRFV2PlusWrapper.contract.UnpackLog(event, "WrapperFulfillmentFailed", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type GetConfig struct { + FallbackWeiPerUnitLink *big.Int + StalenessSeconds uint32 + FulfillmentFlatFeeNativePPM uint32 + FulfillmentFlatFeeLinkDiscountPPM uint32 + WrapperGasOverhead uint32 + CoordinatorGasOverhead uint32 + WrapperNativePremiumPercentage uint8 + WrapperLinkPremiumPercentage uint8 + KeyHash [32]byte + MaxNumWords uint8 +} +type SCallbacks struct { + CallbackAddress common.Address + CallbackGasLimit uint32 + RequestGasPrice uint64 +} + +func (_VRFV2PlusWrapper *VRFV2PlusWrapper) ParseLog(log types.Log) (generated.AbigenLog, error) { + switch log.Topics[0] { + case _VRFV2PlusWrapper.abi.Events["ConfigSet"].ID: + return _VRFV2PlusWrapper.ParseConfigSet(log) + case _VRFV2PlusWrapper.abi.Events["CoordinatorSet"].ID: + return _VRFV2PlusWrapper.ParseCoordinatorSet(log) + case _VRFV2PlusWrapper.abi.Events["Disabled"].ID: + return _VRFV2PlusWrapper.ParseDisabled(log) + case _VRFV2PlusWrapper.abi.Events["Enabled"].ID: + return _VRFV2PlusWrapper.ParseEnabled(log) + case _VRFV2PlusWrapper.abi.Events["FallbackWeiPerUnitLinkUsed"].ID: + return _VRFV2PlusWrapper.ParseFallbackWeiPerUnitLinkUsed(log) + case _VRFV2PlusWrapper.abi.Events["FulfillmentTxSizeSet"].ID: + return _VRFV2PlusWrapper.ParseFulfillmentTxSizeSet(log) + case _VRFV2PlusWrapper.abi.Events["LinkNativeFeedSet"].ID: + return _VRFV2PlusWrapper.ParseLinkNativeFeedSet(log) + case _VRFV2PlusWrapper.abi.Events["NativeWithdrawn"].ID: + return _VRFV2PlusWrapper.ParseNativeWithdrawn(log) + case _VRFV2PlusWrapper.abi.Events["OwnershipTransferRequested"].ID: + return _VRFV2PlusWrapper.ParseOwnershipTransferRequested(log) + case _VRFV2PlusWrapper.abi.Events["OwnershipTransferred"].ID: + return _VRFV2PlusWrapper.ParseOwnershipTransferred(log) + case _VRFV2PlusWrapper.abi.Events["Withdrawn"].ID: + return _VRFV2PlusWrapper.ParseWithdrawn(log) + case _VRFV2PlusWrapper.abi.Events["WrapperFulfillmentFailed"].ID: + return _VRFV2PlusWrapper.ParseWrapperFulfillmentFailed(log) + + default: + return nil, fmt.Errorf("abigen wrapper received unknown log topic: %v", log.Topics[0]) + } +} + +func (VRFV2PlusWrapperConfigSet) Topic() common.Hash { + return common.HexToHash("0xb18fd84519589131d50ae195b0aea1b042c3c0b25a53bb894d9d81c78980c20f") +} + +func (VRFV2PlusWrapperCoordinatorSet) Topic() common.Hash { + return common.HexToHash("0xd1a6a14209a385a964d036e404cb5cfb71f4000cdb03c9366292430787261be6") +} + +func (VRFV2PlusWrapperDisabled) Topic() common.Hash { + return common.HexToHash("0x75884cdadc4a89e8b545db800057f06ec7f5338a08183c7ba515f2bfdd9fe1e1") +} + +func (VRFV2PlusWrapperEnabled) Topic() common.Hash { + return common.HexToHash("0xc0f961051f97b04c496472d11cb6170d844e4b2c9dfd3b602a4fa0139712d484") +} + +func (VRFV2PlusWrapperFallbackWeiPerUnitLinkUsed) Topic() common.Hash { + return common.HexToHash("0x6ca648a381f22ead7e37773d934e64885dcf861fbfbb26c40354cbf0c4662d1a") +} + +func (VRFV2PlusWrapperFulfillmentTxSizeSet) Topic() common.Hash { + return common.HexToHash("0x697b48b8b76cebb09a54ec4ff810e8a181c96f65395d51c744db09c115d1d5d0") +} + +func (VRFV2PlusWrapperLinkNativeFeedSet) Topic() common.Hash { + return common.HexToHash("0xc252955f9bd8c6ea6e3cc712bbad31005d85cec90e73b147b4d6e8326242efdf") +} + +func (VRFV2PlusWrapperNativeWithdrawn) Topic() common.Hash { + return common.HexToHash("0xc303ca808382409472acbbf899c316cf439f409f6584aae22df86dfa3c9ed504") +} + +func (VRFV2PlusWrapperOwnershipTransferRequested) Topic() common.Hash { + return common.HexToHash("0xed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae1278") +} + +func (VRFV2PlusWrapperOwnershipTransferred) Topic() common.Hash { + return common.HexToHash("0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0") +} + +func (VRFV2PlusWrapperWithdrawn) Topic() common.Hash { + return common.HexToHash("0x7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5") +} + +func (VRFV2PlusWrapperWrapperFulfillmentFailed) Topic() common.Hash { + return common.HexToHash("0xc551b83c151f2d1c7eeb938ac59008e0409f1c1dc1e2f112449d4d79b4589022") +} + +func (_VRFV2PlusWrapper *VRFV2PlusWrapper) Address() common.Address { + return _VRFV2PlusWrapper.address +} + +type VRFV2PlusWrapperInterface interface { + SUBSCRIPTIONID(opts *bind.CallOpts) (*big.Int, error) + + CalculateRequestPrice(opts *bind.CallOpts, _callbackGasLimit uint32) (*big.Int, error) + + CalculateRequestPriceNative(opts *bind.CallOpts, _callbackGasLimit uint32) (*big.Int, error) + + CheckPaymentMode(opts *bind.CallOpts, extraArgs []byte, isLinkMode bool) error + + EstimateRequestPrice(opts *bind.CallOpts, _callbackGasLimit uint32, _requestGasPriceWei *big.Int) (*big.Int, error) + + EstimateRequestPriceNative(opts *bind.CallOpts, _callbackGasLimit uint32, _requestGasPriceWei *big.Int) (*big.Int, error) + + GetConfig(opts *bind.CallOpts) (GetConfig, + + error) + + LastRequestId(opts *bind.CallOpts) (*big.Int, error) + + Link(opts *bind.CallOpts) (common.Address, error) + + Owner(opts *bind.CallOpts) (common.Address, error) + + SCallbacks(opts *bind.CallOpts, arg0 *big.Int) (SCallbacks, + + error) SConfigured(opts *bind.CallOpts) (bool, error) @@ -1233,8 +2362,6 @@ type VRFV2PlusWrapperInterface interface { SFulfillmentTxSizeBytes(opts *bind.CallOpts) (uint32, error) - SLink(opts *bind.CallOpts) (common.Address, error) - SLinkNativeFeed(opts *bind.CallOpts) (common.Address, error) SVrfCoordinator(opts *bind.CallOpts) (common.Address, error) @@ -1255,21 +2382,67 @@ 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, _wrapperPremiumPercentage uint8, _keyHash [32]byte, _maxNumWords uint8, _stalenessSeconds uint32, _fallbackWeiPerUnitLink *big.Int, _fulfillmentFlatFeeLinkPPM uint32, _fulfillmentFlatFeeNativePPM uint32) (*types.Transaction, error) + SetConfig(opts *bind.TransactOpts, _wrapperGasOverhead uint32, _coordinatorGasOverhead uint32, _wrapperNativePremiumPercentage uint8, _wrapperLinkPremiumPercentage 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) SetFulfillmentTxSize(opts *bind.TransactOpts, size uint32) (*types.Transaction, error) - SetLINK(opts *bind.TransactOpts, link common.Address) (*types.Transaction, error) - SetLinkNativeFeed(opts *bind.TransactOpts, linkNativeFeed common.Address) (*types.Transaction, error) TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) - Withdraw(opts *bind.TransactOpts, _recipient common.Address, _amount *big.Int) (*types.Transaction, error) + Withdraw(opts *bind.TransactOpts, _recipient common.Address) (*types.Transaction, error) + + WithdrawNative(opts *bind.TransactOpts, _recipient common.Address) (*types.Transaction, error) + + FilterConfigSet(opts *bind.FilterOpts) (*VRFV2PlusWrapperConfigSetIterator, error) + + WatchConfigSet(opts *bind.WatchOpts, sink chan<- *VRFV2PlusWrapperConfigSet) (event.Subscription, error) + + ParseConfigSet(log types.Log) (*VRFV2PlusWrapperConfigSet, error) + + FilterCoordinatorSet(opts *bind.FilterOpts) (*VRFV2PlusWrapperCoordinatorSetIterator, error) + + WatchCoordinatorSet(opts *bind.WatchOpts, sink chan<- *VRFV2PlusWrapperCoordinatorSet) (event.Subscription, error) + + ParseCoordinatorSet(log types.Log) (*VRFV2PlusWrapperCoordinatorSet, error) + + FilterDisabled(opts *bind.FilterOpts) (*VRFV2PlusWrapperDisabledIterator, error) + + WatchDisabled(opts *bind.WatchOpts, sink chan<- *VRFV2PlusWrapperDisabled) (event.Subscription, error) + + ParseDisabled(log types.Log) (*VRFV2PlusWrapperDisabled, error) + + FilterEnabled(opts *bind.FilterOpts) (*VRFV2PlusWrapperEnabledIterator, error) - WithdrawNative(opts *bind.TransactOpts, _recipient common.Address, _amount *big.Int) (*types.Transaction, error) + WatchEnabled(opts *bind.WatchOpts, sink chan<- *VRFV2PlusWrapperEnabled) (event.Subscription, error) + + ParseEnabled(log types.Log) (*VRFV2PlusWrapperEnabled, error) + + FilterFallbackWeiPerUnitLinkUsed(opts *bind.FilterOpts) (*VRFV2PlusWrapperFallbackWeiPerUnitLinkUsedIterator, error) + + WatchFallbackWeiPerUnitLinkUsed(opts *bind.WatchOpts, sink chan<- *VRFV2PlusWrapperFallbackWeiPerUnitLinkUsed) (event.Subscription, error) + + ParseFallbackWeiPerUnitLinkUsed(log types.Log) (*VRFV2PlusWrapperFallbackWeiPerUnitLinkUsed, error) + + FilterFulfillmentTxSizeSet(opts *bind.FilterOpts) (*VRFV2PlusWrapperFulfillmentTxSizeSetIterator, error) + + WatchFulfillmentTxSizeSet(opts *bind.WatchOpts, sink chan<- *VRFV2PlusWrapperFulfillmentTxSizeSet) (event.Subscription, error) + + ParseFulfillmentTxSizeSet(log types.Log) (*VRFV2PlusWrapperFulfillmentTxSizeSet, error) + + FilterLinkNativeFeedSet(opts *bind.FilterOpts) (*VRFV2PlusWrapperLinkNativeFeedSetIterator, error) + + WatchLinkNativeFeedSet(opts *bind.WatchOpts, sink chan<- *VRFV2PlusWrapperLinkNativeFeedSet) (event.Subscription, error) + + ParseLinkNativeFeedSet(log types.Log) (*VRFV2PlusWrapperLinkNativeFeedSet, error) + + FilterNativeWithdrawn(opts *bind.FilterOpts, to []common.Address) (*VRFV2PlusWrapperNativeWithdrawnIterator, error) + + WatchNativeWithdrawn(opts *bind.WatchOpts, sink chan<- *VRFV2PlusWrapperNativeWithdrawn, to []common.Address) (event.Subscription, error) + + ParseNativeWithdrawn(log types.Log) (*VRFV2PlusWrapperNativeWithdrawn, error) FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*VRFV2PlusWrapperOwnershipTransferRequestedIterator, error) @@ -1283,6 +2456,12 @@ type VRFV2PlusWrapperInterface interface { ParseOwnershipTransferred(log types.Log) (*VRFV2PlusWrapperOwnershipTransferred, error) + FilterWithdrawn(opts *bind.FilterOpts, to []common.Address) (*VRFV2PlusWrapperWithdrawnIterator, error) + + WatchWithdrawn(opts *bind.WatchOpts, sink chan<- *VRFV2PlusWrapperWithdrawn, to []common.Address) (event.Subscription, error) + + ParseWithdrawn(log types.Log) (*VRFV2PlusWrapperWithdrawn, error) + FilterWrapperFulfillmentFailed(opts *bind.FilterOpts, requestId []*big.Int, consumer []common.Address) (*VRFV2PlusWrapperWrapperFulfillmentFailedIterator, error) WatchWrapperFulfillmentFailed(opts *bind.WatchOpts, sink chan<- *VRFV2PlusWrapperWrapperFulfillmentFailed, requestId []*big.Int, consumer []common.Address) (event.Subscription, 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 ee2f1e360b0..d047eedfb0e 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,15 +31,15 @@ var ( ) var VRFV2PlusWrapperConsumerExampleMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_link\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_vrfV2Wrapper\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"LINKAlreadySet\",\"type\":\"error\"},{\"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\":\"_link\",\"type\":\"address\"}],\"name\":\"setLinkToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"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: "0x60a06040523480156200001157600080fd5b5060405162001743380380620017438339810160408190526200003491620001db565b3380600084846001600160a01b038216156200006657600080546001600160a01b0319166001600160a01b0384161790555b60601b6001600160601b031916608052506001600160a01b038216620000d35760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600180546001600160a01b0319166001600160a01b03848116919091179091558116156200010657620001068162000111565b505050505062000213565b6001600160a01b0381163314156200016c5760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401620000ca565b600280546001600160a01b0319166001600160a01b03838116918217909255600154604051919216907fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae127890600090a350565b80516001600160a01b0381168114620001d657600080fd5b919050565b60008060408385031215620001ef57600080fd5b620001fa83620001be565b91506200020a60208401620001be565b90509250929050565b60805160601c6114e76200025c600039600081816101c80152818161049701528181610b7001528181610c1201528181610cca01528181610dbf0152610e3d01526114e76000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c80638da5cb5b1161008c578063a168fa8911610066578063a168fa89146101ea578063d8a4676f1461023c578063e76d51681461025e578063f2fde38b1461027c57600080fd5b80638da5cb5b146101715780639c24ea40146101b05780639ed0868d146101c357600080fd5b80631fe543e3116100c85780631fe543e31461012e57806379ba5097146101435780637a8042bd1461014b57806384276d811461015e57600080fd5b80630c09b832146100ef57806312065fe0146101155780631e1a34991461011b575b600080fd5b6101026100fd3660046112f4565b61028f565b6040519081526020015b60405180910390f35b47610102565b6101026101293660046112f4565b6103cc565b61014161013c366004611205565b610495565b005b610141610537565b6101416101593660046111d3565b610638565b61014161016c3660046111d3565b610726565b60015473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161010c565b6101416101be366004611174565b610816565b61018b7f000000000000000000000000000000000000000000000000000000000000000081565b61021f6101f83660046111d3565b600360208190526000918252604090912080546001820154919092015460ff918216911683565b60408051938452911515602084015215159082015260600161010c565b61024f61024a3660046111d3565b6108ad565b60405161010c9392919061144d565b60005473ffffffffffffffffffffffffffffffffffffffff1661018b565b61014161028a366004611174565b6109cf565b60006102996109e3565b60006102b5604051806020016040528060001515815250610a66565b905060006102c586868685610b22565b6040805160808101825282815260006020808301828152845183815280830186528486019081526060850184905287845260038352949092208351815591516001830180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001691151591909117905592518051959850939550909390926103549260028501929101906110fb565b5060609190910151600390910180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001691151591909117905560405181815283907f5f56b4c20db9f5b294cbf6f681368de4a992a27e2de2ee702dcf2cbbfa791ec49060200160405180910390a250509392505050565b60006103d66109e3565b60006103f2604051806020016040528060011515815250610a66565b9050600061040286868685610d71565b604080516080810182528281526000602080830182815284518381528083018652848601908152600160608601819052888552600384529590932084518155905194810180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001695151595909517909455905180519598509395509093919261035492600285019291909101906110fb565b7f00000000000000000000000000000000000000000000000000000000000000003373ffffffffffffffffffffffffffffffffffffffff821614610528576040517f8ba9316e00000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff821660248201526044015b60405180910390fd5b6105328383610eed565b505050565b60025473ffffffffffffffffffffffffffffffffffffffff1633146105b8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e657200000000000000000000604482015260640161051f565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000008082163390811790935560028054909116905560405173ffffffffffffffffffffffffffffffffffffffff909116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a350565b6106406109e3565b60005473ffffffffffffffffffffffffffffffffffffffff1663a9059cbb61067d60015473ffffffffffffffffffffffffffffffffffffffff1690565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815273ffffffffffffffffffffffffffffffffffffffff909116600482015260248101849052604401602060405180830381600087803b1580156106ea57600080fd5b505af11580156106fe573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061072291906111b1565b5050565b61072e6109e3565b600061074f60015473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff168260405160006040518083038185875af1925050503d80600081146107a6576040519150601f19603f3d011682016040523d82523d6000602084013e6107ab565b606091505b5050905080610722576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f77697468647261774e6174697665206661696c65640000000000000000000000604482015260640161051f565b60005473ffffffffffffffffffffffffffffffffffffffff1615610866576040517f64f778ae00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b6000818152600360205260408120548190606090610927576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f72657175657374206e6f7420666f756e64000000000000000000000000000000604482015260640161051f565b6000848152600360209081526040808320815160808101835281548152600182015460ff1615158185015260028201805484518187028101870186528181529295939486019383018282801561099c57602002820191906000526020600020905b815481526020019060010190808311610988575b50505091835250506003919091015460ff1615156020918201528151908201516040909201519097919650945092505050565b6109d76109e3565b6109e081611004565b50565b60015473ffffffffffffffffffffffffffffffffffffffff163314610a64576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e657200000000000000000000604482015260640161051f565b565b60607f92fd13387c7fe7befbc38d303d6468778fb9731bc4583f17d92989c6fcfdeaaa82604051602401610a9f91511515815260200190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915292915050565b6040517f4306d35400000000000000000000000000000000000000000000000000000000815263ffffffff85166004820152600090819073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690634306d3549060240160206040518083038186803b158015610bb257600080fd5b505afa158015610bc6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bea91906111ec565b60005460405191925073ffffffffffffffffffffffffffffffffffffffff1690634000aea0907f0000000000000000000000000000000000000000000000000000000000000000908490610c48908b908b908b908b9060200161146e565b6040516020818303038152906040526040518463ffffffff1660e01b8152600401610c75939291906113e6565b602060405180830381600087803b158015610c8f57600080fd5b505af1158015610ca3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cc791906111b1565b507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663fc2a88c36040518163ffffffff1660e01b815260040160206040518083038186803b158015610d2e57600080fd5b505afa158015610d42573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d6691906111ec565b915094509492505050565b6040517f4b16093500000000000000000000000000000000000000000000000000000000815263ffffffff85166004820152600090819073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690634b1609359060240160206040518083038186803b158015610e0157600080fd5b505afa158015610e15573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e3991906111ec565b90507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16639cfc058e82888888886040518663ffffffff1660e01b8152600401610e9b949392919061146e565b6020604051808303818588803b158015610eb457600080fd5b505af1158015610ec8573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610d6691906111ec565b600082815260036020526040902054610f62576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f72657175657374206e6f7420666f756e64000000000000000000000000000000604482015260640161051f565b6000828152600360209081526040909120600181810180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690911790558251610fb5926002909201918401906110fb565b50600082815260036020526040908190205490517f6c84e12b4c188e61f1b4727024a5cf05c025fa58467e5eedf763c0744c89da7b91610ff89185918591611424565b60405180910390a15050565b73ffffffffffffffffffffffffffffffffffffffff8116331415611084576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640161051f565b600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff838116918217909255600154604051919216907fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae127890600090a350565b828054828255906000526020600020908101928215611136579160200282015b8281111561113657825182559160200191906001019061111b565b50611142929150611146565b5090565b5b808211156111425760008155600101611147565b803563ffffffff8116811461116f57600080fd5b919050565b60006020828403121561118657600080fd5b813573ffffffffffffffffffffffffffffffffffffffff811681146111aa57600080fd5b9392505050565b6000602082840312156111c357600080fd5b815180151581146111aa57600080fd5b6000602082840312156111e557600080fd5b5035919050565b6000602082840312156111fe57600080fd5b5051919050565b6000806040838503121561121857600080fd5b8235915060208084013567ffffffffffffffff8082111561123857600080fd5b818601915086601f83011261124c57600080fd5b81358181111561125e5761125e6114ab565b8060051b6040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f830116810181811085821117156112a1576112a16114ab565b604052828152858101935084860182860187018b10156112c057600080fd5b600095505b838610156112e35780358552600195909501949386019386016112c5565b508096505050505050509250929050565b60008060006060848603121561130957600080fd5b6113128461115b565b9250602084013561ffff8116811461132957600080fd5b91506113376040850161115b565b90509250925092565b600081518084526020808501945080840160005b8381101561137057815187529582019590820190600101611354565b509495945050505050565b6000815180845260005b818110156113a157602081850181015186830182015201611385565b818111156113b3576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b73ffffffffffffffffffffffffffffffffffffffff8416815282602082015260606040820152600061141b606083018461137b565b95945050505050565b83815260606020820152600061143d6060830185611340565b9050826040830152949350505050565b838152821515602082015260606040820152600061141b6060830184611340565b600063ffffffff808716835261ffff86166020840152808516604084015250608060608301526114a1608083018461137b565b9695505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea164736f6c6343000806000a", + 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: "0x60c06040523480156200001157600080fd5b50604051620016ef380380620016ef833981016040819052620000349162000213565b33806000836000819050806001600160a01b0316631c4695f46040518163ffffffff1660e01b815260040160206040518083038186803b1580156200007857600080fd5b505afa1580156200008d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000b3919062000213565b6001600160601b0319606091821b811660805291901b1660a052506001600160a01b0382166200012a5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b03848116919091179091558116156200015d576200015d8162000167565b5050505062000245565b6001600160a01b038116331415620001c25760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000121565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6000602082840312156200022657600080fd5b81516001600160a01b03811681146200023e57600080fd5b9392505050565b60805160601c60a05160601c611446620002a9600039600081816101aa0152818161047b01528181610ab701528181610b7101528181610c2a01528181610d1f0152610d9d015260008181610242015281816106220152610b3501526114466000f3fe608060405234801561001057600080fd5b50600436106100df5760003560e01c806384276d811161008c578063a168fa8911610066578063a168fa89146101cc578063d8a4676f1461021e578063e76d516814610240578063f2fde38b1461026657600080fd5b806384276d81146101535780638da5cb5b146101665780639ed0868d146101a557600080fd5b80631fe543e3116100bd5780631fe543e31461012357806379ba5097146101385780637a8042bd1461014057600080fd5b80630c09b832146100e457806312065fe01461010a5780631e1a349914610110575b600080fd5b6100f76100f2366004611253565b610279565b6040519081526020015b60405180910390f35b476100f7565b6100f761011e366004611253565b6103b4565b610136610131366004611164565b610479565b005b61013661051b565b61013661014e366004611132565b610618565b610136610161366004611132565b610724565b60005473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610101565b6101807f000000000000000000000000000000000000000000000000000000000000000081565b6102016101da366004611132565b600260205260009081526040902080546001820154600390920154909160ff908116911683565b604080519384529115156020840152151590820152606001610101565b61023161022c366004611132565b6107f6565b604051610101939291906113ac565b7f0000000000000000000000000000000000000000000000000000000000000000610180565b6101366102743660046110d3565b610916565b600061028361092a565b600061029f6040518060200160405280600015158152506109ad565b905060006102af86868685610a69565b604080516080810182528281526000602080830182815284518381528083018652848601908152606085018490528784526002808452959093208451815590516001820180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055915180519699509496509194909361033c93850192019061105a565b5060609190910151600390910180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001691151591909117905560405181815283907f5f56b4c20db9f5b294cbf6f681368de4a992a27e2de2ee702dcf2cbbfa791ec49060200160405180910390a250509392505050565b60006103be61092a565b60006103da6040518060200160405280600115158152506109ad565b905060006103ea86868685610cd1565b60408051608081018252828152600060208083018281528451838152808301865284860190815260016060860181905288855260028085529690942085518155915193820180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001694151594909417909355915180519699509496509194909361033c93850192019061105a565b7f00000000000000000000000000000000000000000000000000000000000000003373ffffffffffffffffffffffffffffffffffffffff82161461050c576040517f8ba9316e00000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff821660248201526044015b60405180910390fd5b6105168383610e4d565b505050565b60015473ffffffffffffffffffffffffffffffffffffffff16331461059c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e6572000000000000000000006044820152606401610503565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b61062061092a565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb61067b60005473ffffffffffffffffffffffffffffffffffffffff1690565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815273ffffffffffffffffffffffffffffffffffffffff909116600482015260248101849052604401602060405180830381600087803b1580156106e857600080fd5b505af11580156106fc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107209190611110565b5050565b61072c61092a565b6000805460405173ffffffffffffffffffffffffffffffffffffffff9091169083908381818185875af1925050503d8060008114610786576040519150601f19603f3d011682016040523d82523d6000602084013e61078b565b606091505b5050905080610720576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f77697468647261774e6174697665206661696c656400000000000000000000006044820152606401610503565b6000818152600260205260408120548190606090610870576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f72657175657374206e6f7420666f756e640000000000000000000000000000006044820152606401610503565b6000848152600260208181526040808420815160808101835281548152600182015460ff16151581850152938101805483518186028101860185528181529294938601938301828280156108e357602002820191906000526020600020905b8154815260200190600101908083116108cf575b50505091835250506003919091015460ff1615156020918201528151908201516040909201519097919650945092505050565b61091e61092a565b61092781610f64565b50565b60005473ffffffffffffffffffffffffffffffffffffffff1633146109ab576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e6572000000000000000000006044820152606401610503565b565b60607f92fd13387c7fe7befbc38d303d6468778fb9731bc4583f17d92989c6fcfdeaaa826040516024016109e691511515815260200190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915292915050565b6040517f4306d35400000000000000000000000000000000000000000000000000000000815263ffffffff85166004820152600090819073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690634306d3549060240160206040518083038186803b158015610af957600080fd5b505afa158015610b0d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b31919061114b565b90507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16634000aea07f00000000000000000000000000000000000000000000000000000000000000008389898989604051602001610ba894939291906113cd565b6040516020818303038152906040526040518463ffffffff1660e01b8152600401610bd593929190611345565b602060405180830381600087803b158015610bef57600080fd5b505af1158015610c03573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c279190611110565b507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663fc2a88c36040518163ffffffff1660e01b815260040160206040518083038186803b158015610c8e57600080fd5b505afa158015610ca2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cc6919061114b565b915094509492505050565b6040517f4b16093500000000000000000000000000000000000000000000000000000000815263ffffffff85166004820152600090819073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690634b1609359060240160206040518083038186803b158015610d6157600080fd5b505afa158015610d75573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d99919061114b565b90507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16639cfc058e82888888886040518663ffffffff1660e01b8152600401610dfb94939291906113cd565b6020604051808303818588803b158015610e1457600080fd5b505af1158015610e28573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610cc6919061114b565b600082815260026020526040902054610ec2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f72657175657374206e6f7420666f756e640000000000000000000000000000006044820152606401610503565b6000828152600260208181526040909220600181810180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690911790558351610f159391909201919084019061105a565b50600082815260026020526040908190205490517f6c84e12b4c188e61f1b4727024a5cf05c025fa58467e5eedf763c0744c89da7b91610f589185918591611383565b60405180910390a15050565b73ffffffffffffffffffffffffffffffffffffffff8116331415610fe4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401610503565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b828054828255906000526020600020908101928215611095579160200282015b8281111561109557825182559160200191906001019061107a565b506110a19291506110a5565b5090565b5b808211156110a157600081556001016110a6565b803563ffffffff811681146110ce57600080fd5b919050565b6000602082840312156110e557600080fd5b813573ffffffffffffffffffffffffffffffffffffffff8116811461110957600080fd5b9392505050565b60006020828403121561112257600080fd5b8151801515811461110957600080fd5b60006020828403121561114457600080fd5b5035919050565b60006020828403121561115d57600080fd5b5051919050565b6000806040838503121561117757600080fd5b8235915060208084013567ffffffffffffffff8082111561119757600080fd5b818601915086601f8301126111ab57600080fd5b8135818111156111bd576111bd61140a565b8060051b6040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f830116810181811085821117156112005761120061140a565b604052828152858101935084860182860187018b101561121f57600080fd5b600095505b83861015611242578035855260019590950194938601938601611224565b508096505050505050509250929050565b60008060006060848603121561126857600080fd5b611271846110ba565b9250602084013561ffff8116811461128857600080fd5b9150611296604085016110ba565b90509250925092565b600081518084526020808501945080840160005b838110156112cf578151875295820195908201906001016112b3565b509495945050505050565b6000815180845260005b81811015611300576020818501810151868301820152016112e4565b81811115611312576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b73ffffffffffffffffffffffffffffffffffffffff8416815282602082015260606040820152600061137a60608301846112da565b95945050505050565b83815260606020820152600061139c606083018561129f565b9050826040830152949350505050565b838152821515602082015260606040820152600061137a606083018461129f565b600063ffffffff808716835261ffff861660208401528085166040840152506080606083015261140060808301846112da565b9695505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea164736f6c6343000806000a", } var VRFV2PlusWrapperConsumerExampleABI = VRFV2PlusWrapperConsumerExampleMetaData.ABI var VRFV2PlusWrapperConsumerExampleBin = VRFV2PlusWrapperConsumerExampleMetaData.Bin -func DeployVRFV2PlusWrapperConsumerExample(auth *bind.TransactOpts, backend bind.ContractBackend, _link common.Address, _vrfV2Wrapper common.Address) (common.Address, *types.Transaction, *VRFV2PlusWrapperConsumerExample, error) { +func DeployVRFV2PlusWrapperConsumerExample(auth *bind.TransactOpts, backend bind.ContractBackend, _vrfV2Wrapper common.Address) (common.Address, *types.Transaction, *VRFV2PlusWrapperConsumerExample, error) { parsed, err := VRFV2PlusWrapperConsumerExampleMetaData.GetAbi() if err != nil { return common.Address{}, nil, nil, err @@ -48,7 +48,7 @@ func DeployVRFV2PlusWrapperConsumerExample(auth *bind.TransactOpts, backend bind return common.Address{}, nil, nil, errors.New("GetABI returned nil") } - address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(VRFV2PlusWrapperConsumerExampleBin), backend, _link, _vrfV2Wrapper) + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(VRFV2PlusWrapperConsumerExampleBin), backend, _vrfV2Wrapper) if err != nil { return common.Address{}, nil, nil, err } @@ -369,18 +369,6 @@ func (_VRFV2PlusWrapperConsumerExample *VRFV2PlusWrapperConsumerExampleTransacto return _VRFV2PlusWrapperConsumerExample.Contract.RawFulfillRandomWords(&_VRFV2PlusWrapperConsumerExample.TransactOpts, _requestId, _randomWords) } -func (_VRFV2PlusWrapperConsumerExample *VRFV2PlusWrapperConsumerExampleTransactor) SetLinkToken(opts *bind.TransactOpts, _link common.Address) (*types.Transaction, error) { - return _VRFV2PlusWrapperConsumerExample.contract.Transact(opts, "setLinkToken", _link) -} - -func (_VRFV2PlusWrapperConsumerExample *VRFV2PlusWrapperConsumerExampleSession) SetLinkToken(_link common.Address) (*types.Transaction, error) { - return _VRFV2PlusWrapperConsumerExample.Contract.SetLinkToken(&_VRFV2PlusWrapperConsumerExample.TransactOpts, _link) -} - -func (_VRFV2PlusWrapperConsumerExample *VRFV2PlusWrapperConsumerExampleTransactorSession) SetLinkToken(_link common.Address) (*types.Transaction, error) { - return _VRFV2PlusWrapperConsumerExample.Contract.SetLinkToken(&_VRFV2PlusWrapperConsumerExample.TransactOpts, _link) -} - func (_VRFV2PlusWrapperConsumerExample *VRFV2PlusWrapperConsumerExampleTransactor) TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) { return _VRFV2PlusWrapperConsumerExample.contract.Transact(opts, "transferOwnership", to) } @@ -1008,8 +996,6 @@ type VRFV2PlusWrapperConsumerExampleInterface interface { RawFulfillRandomWords(opts *bind.TransactOpts, _requestId *big.Int, _randomWords []*big.Int) (*types.Transaction, error) - SetLinkToken(opts *bind.TransactOpts, _link common.Address) (*types.Transaction, error) - TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) WithdrawLink(opts *bind.TransactOpts, amount *big.Int) (*types.Transaction, error) diff --git a/core/gethwrappers/generated/vrfv2plus_wrapper_load_test_consumer/vrfv2plus_wrapper_load_test_consumer.go b/core/gethwrappers/generated/vrfv2plus_wrapper_load_test_consumer/vrfv2plus_wrapper_load_test_consumer.go index 8da1419620b..ab2546bfbc6 100644 --- a/core/gethwrappers/generated/vrfv2plus_wrapper_load_test_consumer/vrfv2plus_wrapper_load_test_consumer.go +++ b/core/gethwrappers/generated/vrfv2plus_wrapper_load_test_consumer/vrfv2plus_wrapper_load_test_consumer.go @@ -31,15 +31,15 @@ var ( ) var VRFV2PlusWrapperLoadTestConsumerMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_link\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_vrfV2PlusWrapper\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"LINKAlreadySet\",\"type\":\"error\"},{\"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[]\"},{\"internalType\":\"uint256\",\"name\":\"requestTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fulfilmentTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"requestBlockNumber\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fulfilmentBlockNumber\",\"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\"},{\"internalType\":\"uint16\",\"name\":\"_requestCount\",\"type\":\"uint16\"}],\"name\":\"makeRequests\",\"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\":\"uint16\",\"name\":\"_requestCount\",\"type\":\"uint16\"}],\"name\":\"makeRequestsNative\",\"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\":[],\"name\":\"reset\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_averageFulfillmentInMillions\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_fastestFulfillment\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_lastRequestId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_requestCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"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\":\"uint256\",\"name\":\"requestTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fulfilmentTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"requestBlockNumber\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fulfilmentBlockNumber\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"native\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_responseCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_slowestFulfillment\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_link\",\"type\":\"address\"}],\"name\":\"setLinkToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"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: "0x60a0604052600060055560006006556103e76007553480156200002157600080fd5b5060405162001e9838038062001e988339810160408190526200004491620001eb565b3380600084846001600160a01b038216156200007657600080546001600160a01b0319166001600160a01b0384161790555b60601b6001600160601b031916608052506001600160a01b038216620000e35760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600180546001600160a01b0319166001600160a01b03848116919091179091558116156200011657620001168162000121565b505050505062000223565b6001600160a01b0381163314156200017c5760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401620000da565b600280546001600160a01b0319166001600160a01b03838116918217909255600154604051919216907fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae127890600090a350565b80516001600160a01b0381168114620001e657600080fd5b919050565b60008060408385031215620001ff57600080fd5b6200020a83620001ce565b91506200021a60208401620001ce565b90509250929050565b60805160601c611c2c6200026c600039600081816102e9015281816104b80152818161119701528181611239015281816112f10152818161148301526115010152611c2c6000f3fe60806040526004361061016e5760003560e01c80639c24ea40116100cb578063d826f88f1161007f578063e76d516811610059578063e76d51681461044b578063f176596214610476578063f2fde38b1461049657600080fd5b8063d826f88f146103d6578063d8a4676f14610402578063dc1670db1461043557600080fd5b8063a168fa89116100b0578063a168fa891461030b578063afacbf9c146103a0578063b1e21749146103c057600080fd5b80639c24ea40146102b75780639ed0868d146102d757600080fd5b806374dba124116101225780637a8042bd116101075780637a8042bd1461022b57806384276d811461024b5780638da5cb5b1461026b57600080fd5b806374dba1241461020057806379ba50971461021657600080fd5b80631fe543e3116101535780631fe543e3146101b2578063557d2e92146101d4578063737144bc146101ea57600080fd5b806312065fe01461017a5780631757f11c1461019c57600080fd5b3661017557005b600080fd5b34801561018657600080fd5b50475b6040519081526020015b60405180910390f35b3480156101a857600080fd5b5061018960065481565b3480156101be57600080fd5b506101d26101cd3660046117eb565b6104b6565b005b3480156101e057600080fd5b5061018960045481565b3480156101f657600080fd5b5061018960055481565b34801561020c57600080fd5b5061018960075481565b34801561022257600080fd5b506101d2610558565b34801561023757600080fd5b506101d26102463660046117b9565b610659565b34801561025757600080fd5b506101d26102663660046117b9565b610747565b34801561027757600080fd5b5060015473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610193565b3480156102c357600080fd5b506101d26102d236600461175a565b610837565b3480156102e357600080fd5b506102927f000000000000000000000000000000000000000000000000000000000000000081565b34801561031757600080fd5b506103696103263660046117b9565b600a602052600090815260409020805460018201546003830154600484015460058501546006860154600790960154949560ff9485169593949293919290911687565b604080519788529515156020880152948601939093526060850191909152608084015260a0830152151560c082015260e001610193565b3480156103ac57600080fd5b506101d26103bb3660046118da565b6108ce565b3480156103cc57600080fd5b5061018960085481565b3480156103e257600080fd5b506101d26000600581905560068190556103e76007556004819055600355565b34801561040e57600080fd5b5061042261041d3660046117b9565b610ab5565b6040516101939796959493929190611a3b565b34801561044157600080fd5b5061018960035481565b34801561045757600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff16610292565b34801561048257600080fd5b506101d26104913660046118da565b610c38565b3480156104a257600080fd5b506101d26104b136600461175a565b610e17565b7f00000000000000000000000000000000000000000000000000000000000000003373ffffffffffffffffffffffffffffffffffffffff821614610549576040517f8ba9316e00000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff821660248201526044015b60405180910390fd5b6105538383610e2b565b505050565b60025473ffffffffffffffffffffffffffffffffffffffff1633146105d9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e6572000000000000000000006044820152606401610540565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000008082163390811790935560028054909116905560405173ffffffffffffffffffffffffffffffffffffffff909116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a350565b61066161100a565b60005473ffffffffffffffffffffffffffffffffffffffff1663a9059cbb61069e60015473ffffffffffffffffffffffffffffffffffffffff1690565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815273ffffffffffffffffffffffffffffffffffffffff909116600482015260248101849052604401602060405180830381600087803b15801561070b57600080fd5b505af115801561071f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107439190611797565b5050565b61074f61100a565b600061077060015473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff168260405160006040518083038185875af1925050503d80600081146107c7576040519150601f19603f3d011682016040523d82523d6000602084013e6107cc565b606091505b5050905080610743576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f77697468647261774e6174697665206661696c656400000000000000000000006044820152606401610540565b60005473ffffffffffffffffffffffffffffffffffffffff1615610887576040517f64f778ae00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b6108d661100a565b60005b8161ffff168161ffff161015610aae57600061090560405180602001604052806000151581525061108d565b905060008061091688888886611149565b60088290559092509050600061092a611398565b604080516101008101825284815260006020808301828152845183815280830186528486019081524260608601526080850184905260a0850187905260c0850184905260e08501849052898452600a8352949092208351815591516001830180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001691151591909117905592518051949550919390926109d29260028501929101906116cf565b5060608201516003820155608082015160048083019190915560a0830151600583015560c0830151600683015560e090920151600790910180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169115159190911790558054906000610a4583611b88565b9091555050600083815260096020526040908190208290555183907f5f56b4c20db9f5b294cbf6f681368de4a992a27e2de2ee702dcf2cbbfa791ec490610a8f9085815260200190565b60405180910390a2505050508080610aa690611b66565b9150506108d9565b5050505050565b6000818152600a602052604081205481906060908290819081908190610b37576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f72657175657374206e6f7420666f756e640000000000000000000000000000006044820152606401610540565b6000888152600a6020908152604080832081516101008101835281548152600182015460ff16151581850152600282018054845181870281018701865281815292959394860193830182828015610bad57602002820191906000526020600020905b815481526020019060010190808311610b99575b50505050508152602001600382015481526020016004820154815260200160058201548152602001600682015481526020016007820160009054906101000a900460ff1615151515815250509050806000015181602001518260400151836060015184608001518560a001518660c00151975097509750975097509750975050919395979092949650565b610c4061100a565b60005b8161ffff168161ffff161015610aae576000610c6f60405180602001604052806001151581525061108d565b9050600080610c8088888886611435565b600882905590925090506000610c94611398565b604080516101008101825284815260006020808301828152845183815280830186528486019081524260608601526080850184905260a0850187905260c08501849052600160e086018190528a8552600a84529590932084518155905194810180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001695151595909517909455905180519495509193610d3b92600285019201906116cf565b5060608201516003820155608082015160048083019190915560a0830151600583015560c0830151600683015560e090920151600790910180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169115159190911790558054906000610dae83611b88565b9091555050600083815260096020526040908190208290555183907f5f56b4c20db9f5b294cbf6f681368de4a992a27e2de2ee702dcf2cbbfa791ec490610df89085815260200190565b60405180910390a2505050508080610e0f90611b66565b915050610c43565b610e1f61100a565b610e28816115b1565b50565b6000828152600a6020526040902054610ea0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f72657175657374206e6f7420666f756e640000000000000000000000000000006044820152606401610540565b6000610eaa611398565b60008481526009602052604081205491925090610ec79083611b4f565b90506000610ed882620f4240611b12565b9050600654821115610eea5760068290555b6007548210610efb57600754610efd565b815b600755600354610f0d5780610f40565b600354610f1b906001611abf565b81600354600554610f2c9190611b12565b610f369190611abf565b610f409190611ad7565b60055560038054906000610f5383611b88565b90915550506000858152600a60209081526040909120600181810180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690911790558551610fab926002909201918701906116cf565b506000858152600a602052604090819020426004820155600681018590555490517f6c84e12b4c188e61f1b4727024a5cf05c025fa58467e5eedf763c0744c89da7b91610ffb9188918891611a12565b60405180910390a15050505050565b60015473ffffffffffffffffffffffffffffffffffffffff16331461108b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e6572000000000000000000006044820152606401610540565b565b60607f92fd13387c7fe7befbc38d303d6468778fb9731bc4583f17d92989c6fcfdeaaa826040516024016110c691511515815260200190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915292915050565b6040517f4306d35400000000000000000000000000000000000000000000000000000000815263ffffffff85166004820152600090819073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690634306d3549060240160206040518083038186803b1580156111d957600080fd5b505afa1580156111ed573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061121191906117d2565b60005460405191925073ffffffffffffffffffffffffffffffffffffffff1690634000aea0907f000000000000000000000000000000000000000000000000000000000000000090849061126f908b908b908b908b90602001611a82565b6040516020818303038152906040526040518463ffffffff1660e01b815260040161129c939291906119d4565b602060405180830381600087803b1580156112b657600080fd5b505af11580156112ca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112ee9190611797565b507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663fc2a88c36040518163ffffffff1660e01b815260040160206040518083038186803b15801561135557600080fd5b505afa158015611369573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061138d91906117d2565b915094509492505050565b6000466113a4816116a8565b1561142e57606473ffffffffffffffffffffffffffffffffffffffff1663a3b1b31d6040518163ffffffff1660e01b815260040160206040518083038186803b1580156113f057600080fd5b505afa158015611404573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061142891906117d2565b91505090565b4391505090565b6040517f4b16093500000000000000000000000000000000000000000000000000000000815263ffffffff85166004820152600090819073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690634b1609359060240160206040518083038186803b1580156114c557600080fd5b505afa1580156114d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114fd91906117d2565b90507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16639cfc058e82888888886040518663ffffffff1660e01b815260040161155f9493929190611a82565b6020604051808303818588803b15801561157857600080fd5b505af115801561158c573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061138d91906117d2565b73ffffffffffffffffffffffffffffffffffffffff8116331415611631576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401610540565b600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff838116918217909255600154604051919216907fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae127890600090a350565b600061a4b18214806116bc575062066eed82145b806116c9575062066eee82145b92915050565b82805482825590600052602060002090810192821561170a579160200282015b8281111561170a5782518255916020019190600101906116ef565b5061171692915061171a565b5090565b5b80821115611716576000815560010161171b565b803561ffff8116811461174157600080fd5b919050565b803563ffffffff8116811461174157600080fd5b60006020828403121561176c57600080fd5b813573ffffffffffffffffffffffffffffffffffffffff8116811461179057600080fd5b9392505050565b6000602082840312156117a957600080fd5b8151801515811461179057600080fd5b6000602082840312156117cb57600080fd5b5035919050565b6000602082840312156117e457600080fd5b5051919050565b600080604083850312156117fe57600080fd5b8235915060208084013567ffffffffffffffff8082111561181e57600080fd5b818601915086601f83011261183257600080fd5b81358181111561184457611844611bf0565b8060051b6040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f8301168101818110858211171561188757611887611bf0565b604052828152858101935084860182860187018b10156118a657600080fd5b600095505b838610156118c95780358552600195909501949386019386016118ab565b508096505050505050509250929050565b600080600080608085870312156118f057600080fd5b6118f985611746565b93506119076020860161172f565b925061191560408601611746565b91506119236060860161172f565b905092959194509250565b600081518084526020808501945080840160005b8381101561195e57815187529582019590820190600101611942565b509495945050505050565b6000815180845260005b8181101561198f57602081850181015186830182015201611973565b818111156119a1576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b73ffffffffffffffffffffffffffffffffffffffff84168152826020820152606060408201526000611a096060830184611969565b95945050505050565b838152606060208201526000611a2b606083018561192e565b9050826040830152949350505050565b878152861515602082015260e060408201526000611a5c60e083018861192e565b90508560608301528460808301528360a08301528260c083015298975050505050505050565b600063ffffffff808716835261ffff8616602084015280851660408401525060806060830152611ab56080830184611969565b9695505050505050565b60008219821115611ad257611ad2611bc1565b500190565b600082611b0d577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615611b4a57611b4a611bc1565b500290565b600082821015611b6157611b61611bc1565b500390565b600061ffff80831681811415611b7e57611b7e611bc1565b6001019392505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415611bba57611bba611bc1565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea164736f6c6343000806000a", + ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_vrfV2PlusWrapper\",\"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\":\"offset\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"name\":\"getRequestBlockTimes\",\"outputs\":[{\"internalType\":\"uint32[]\",\"name\":\"\",\"type\":\"uint32[]\"}],\"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[]\"},{\"internalType\":\"uint256\",\"name\":\"requestTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fulfilmentTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"requestBlockNumber\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fulfilmentBlockNumber\",\"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\"},{\"internalType\":\"uint16\",\"name\":\"_requestCount\",\"type\":\"uint16\"}],\"name\":\"makeRequests\",\"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\":\"uint16\",\"name\":\"_requestCount\",\"type\":\"uint16\"}],\"name\":\"makeRequestsNative\",\"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\":[],\"name\":\"reset\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_averageFulfillmentInMillions\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_fastestFulfillment\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_lastRequestId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"s_requestBlockTimes\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_requestCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"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\":\"uint256\",\"name\":\"requestTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fulfilmentTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"requestBlockNumber\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fulfilmentBlockNumber\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"native\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_responseCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_slowestFulfillment\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"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: "0x60c0604052600060045560006005556103e76006553480156200002157600080fd5b506040516200211538038062002115833981016040819052620000449162000223565b33806000836000819050806001600160a01b0316631c4695f46040518163ffffffff1660e01b815260040160206040518083038186803b1580156200008857600080fd5b505afa1580156200009d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000c3919062000223565b6001600160601b0319606091821b811660805291901b1660a052506001600160a01b0382166200013a5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b03848116919091179091558116156200016d576200016d8162000177565b5050505062000255565b6001600160a01b038116331415620001d25760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000131565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6000602082840312156200023657600080fd5b81516001600160a01b03811681146200024e57600080fd5b9392505050565b60805160601c60a05160601c611e5c620002b96000396000818161033a015281816105f6015281816112f3015281816113ad01528181611466015281816115f801526116760152600081816104940152818161079d01526113710152611e5c6000f3fe6080604052600436106101795760003560e01c8063958cccb7116100cb578063d826f88f1161007f578063e76d516811610059578063e76d516814610485578063f1765962146104b8578063f2fde38b146104d857600080fd5b8063d826f88f14610427578063d8a4676f1461043c578063dc1670db1461046f57600080fd5b8063a168fa89116100b0578063a168fa891461035c578063afacbf9c146103f1578063b1e217491461041157600080fd5b8063958cccb7146102f35780639ed0868d1461032857600080fd5b8063737144bc1161012d5780637a8042bd116101075780637a8042bd1461026757806384276d81146102875780638da5cb5b146102a757600080fd5b8063737144bc1461022657806374dba1241461023c57806379ba50971461025257600080fd5b80631757f11c1161015e5780631757f11c146101d85780631fe543e3146101ee578063557d2e921461021057600080fd5b80630b2634861461018557806312065fe0146101bb57600080fd5b3661018057005b600080fd5b34801561019157600080fd5b506101a56101a0366004611a6f565b6104f8565b6040516101b29190611bc9565b60405180910390f35b3480156101c757600080fd5b50475b6040519081526020016101b2565b3480156101e457600080fd5b506101ca60055481565b3480156101fa57600080fd5b5061020e610209366004611980565b6105f4565b005b34801561021c57600080fd5b506101ca60035481565b34801561023257600080fd5b506101ca60045481565b34801561024857600080fd5b506101ca60065481565b34801561025e57600080fd5b5061020e610696565b34801561027357600080fd5b5061020e61028236600461194e565b610793565b34801561029357600080fd5b5061020e6102a236600461194e565b61089f565b3480156102b357600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101b2565b3480156102ff57600080fd5b5061031361030e36600461194e565b610971565b60405163ffffffff90911681526020016101b2565b34801561033457600080fd5b506102ce7f000000000000000000000000000000000000000000000000000000000000000081565b34801561036857600080fd5b506103ba61037736600461194e565b600a602052600090815260409020805460018201546003830154600484015460058501546006860154600790960154949560ff9485169593949293919290911687565b604080519788529515156020880152948601939093526060850191909152608084015260a0830152151560c082015260e0016101b2565b3480156103fd57600080fd5b5061020e61040c366004611a91565b6109ab565b34801561041d57600080fd5b506101ca60075481565b34801561043357600080fd5b5061020e610b92565b34801561044857600080fd5b5061045c61045736600461194e565b610bbc565b6040516101b29796959493929190611c3c565b34801561047b57600080fd5b506101ca60025481565b34801561049157600080fd5b507f00000000000000000000000000000000000000000000000000000000000000006102ce565b3480156104c457600080fd5b5061020e6104d3366004611a91565b610d3f565b3480156104e457600080fd5b5061020e6104f33660046118ef565b610f1e565b606060006105068385611cc0565b60085490915081111561051857506008545b60006105248583611d50565b67ffffffffffffffff81111561053c5761053c611e20565b604051908082528060200260200182016040528015610565578160200160208202803683370190505b509050845b828110156105eb576008818154811061058557610585611df1565b6000918252602090912060088204015460079091166004026101000a900463ffffffff16826105b48884611d50565b815181106105c4576105c4611df1565b63ffffffff90921660209283029190910190910152806105e381611d89565b91505061056a565b50949350505050565b7f00000000000000000000000000000000000000000000000000000000000000003373ffffffffffffffffffffffffffffffffffffffff821614610687576040517f8ba9316e00000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff821660248201526044015b60405180910390fd5b6106918383610f32565b505050565b60015473ffffffffffffffffffffffffffffffffffffffff163314610717576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e657200000000000000000000604482015260640161067e565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b61079b611168565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb6107f660005473ffffffffffffffffffffffffffffffffffffffff1690565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815273ffffffffffffffffffffffffffffffffffffffff909116600482015260248101849052604401602060405180830381600087803b15801561086357600080fd5b505af1158015610877573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061089b919061192c565b5050565b6108a7611168565b6000805460405173ffffffffffffffffffffffffffffffffffffffff9091169083908381818185875af1925050503d8060008114610901576040519150601f19603f3d011682016040523d82523d6000602084013e610906565b606091505b505090508061089b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f77697468647261774e6174697665206661696c65640000000000000000000000604482015260640161067e565b6008818154811061098157600080fd5b9060005260206000209060089182820401919006600402915054906101000a900463ffffffff1681565b6109b3611168565b60005b8161ffff168161ffff161015610b8b5760006109e26040518060200160405280600015158152506111e9565b90506000806109f3888888866112a5565b600782905590925090506000610a0761150d565b604080516101008101825284815260006020808301828152845183815280830186528486019081524260608601526080850184905260a0850187905260c0850184905260e08501849052898452600a8352949092208351815591516001830180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169115159190911790559251805194955091939092610aaf926002850192910190611843565b5060608201516003828101919091556080830151600483015560a0830151600583015560c0830151600683015560e090920151600790910180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169115159190911790558054906000610b2283611d89565b9091555050600083815260096020526040908190208290555183907f5f56b4c20db9f5b294cbf6f681368de4a992a27e2de2ee702dcf2cbbfa791ec490610b6c9085815260200190565b60405180910390a2505050508080610b8390611d67565b9150506109b6565b5050505050565b6000600481905560058190556103e760065560038190556002819055610bba9060089061188e565b565b6000818152600a602052604081205481906060908290819081908190610c3e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f72657175657374206e6f7420666f756e64000000000000000000000000000000604482015260640161067e565b6000888152600a6020908152604080832081516101008101835281548152600182015460ff16151581850152600282018054845181870281018701865281815292959394860193830182828015610cb457602002820191906000526020600020905b815481526020019060010190808311610ca0575b50505050508152602001600382015481526020016004820154815260200160058201548152602001600682015481526020016007820160009054906101000a900460ff1615151515815250509050806000015181602001518260400151836060015184608001518560a001518660c00151975097509750975097509750975050919395979092949650565b610d47611168565b60005b8161ffff168161ffff161015610b8b576000610d766040518060200160405280600115158152506111e9565b9050600080610d87888888866115aa565b600782905590925090506000610d9b61150d565b604080516101008101825284815260006020808301828152845183815280830186528486019081524260608601526080850184905260a0850187905260c08501849052600160e086018190528a8552600a84529590932084518155905194810180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001695151595909517909455905180519495509193610e429260028501920190611843565b5060608201516003828101919091556080830151600483015560a0830151600583015560c0830151600683015560e090920151600790910180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169115159190911790558054906000610eb583611d89565b9091555050600083815260096020526040908190208290555183907f5f56b4c20db9f5b294cbf6f681368de4a992a27e2de2ee702dcf2cbbfa791ec490610eff9085815260200190565b60405180910390a2505050508080610f1690611d67565b915050610d4a565b610f26611168565b610f2f81611726565b50565b6000828152600a6020526040902054610fa7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f72657175657374206e6f7420666f756e64000000000000000000000000000000604482015260640161067e565b6000610fb161150d565b60008481526009602052604081205491925090610fce9083611d50565b90506000610fdf82620f4240611d13565b9050600554821115610ff15760058290555b600654821061100257600654611004565b815b6006556002546110145780611047565b600254611022906001611cc0565b816002546004546110339190611d13565b61103d9190611cc0565b6110479190611cd8565b6004556002805490600061105a83611d89565b90915550506000858152600a60209081526040909120600181810180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016909117905585516110b292600290920191870190611843565b506000858152600a6020526040908190204260048083019190915560068201869055600880546001810182557ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee391810491909101805460079092169092026101000a63ffffffff81810219909216918716021790555490517f6c84e12b4c188e61f1b4727024a5cf05c025fa58467e5eedf763c0744c89da7b916111599188918891611c13565b60405180910390a15050505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610bba576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e657200000000000000000000604482015260640161067e565b60607f92fd13387c7fe7befbc38d303d6468778fb9731bc4583f17d92989c6fcfdeaaa8260405160240161122291511515815260200190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915292915050565b6040517f4306d35400000000000000000000000000000000000000000000000000000000815263ffffffff85166004820152600090819073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690634306d3549060240160206040518083038186803b15801561133557600080fd5b505afa158015611349573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061136d9190611967565b90507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16634000aea07f000000000000000000000000000000000000000000000000000000000000000083898989896040516020016113e49493929190611c83565b6040516020818303038152906040526040518463ffffffff1660e01b815260040161141193929190611b8b565b602060405180830381600087803b15801561142b57600080fd5b505af115801561143f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611463919061192c565b507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663fc2a88c36040518163ffffffff1660e01b815260040160206040518083038186803b1580156114ca57600080fd5b505afa1580156114de573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115029190611967565b915094509492505050565b6000466115198161181c565b156115a357606473ffffffffffffffffffffffffffffffffffffffff1663a3b1b31d6040518163ffffffff1660e01b815260040160206040518083038186803b15801561156557600080fd5b505afa158015611579573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061159d9190611967565b91505090565b4391505090565b6040517f4b16093500000000000000000000000000000000000000000000000000000000815263ffffffff85166004820152600090819073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690634b1609359060240160206040518083038186803b15801561163a57600080fd5b505afa15801561164e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116729190611967565b90507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16639cfc058e82888888886040518663ffffffff1660e01b81526004016116d49493929190611c83565b6020604051808303818588803b1580156116ed57600080fd5b505af1158015611701573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906115029190611967565b73ffffffffffffffffffffffffffffffffffffffff81163314156117a6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640161067e565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b600061a4b1821480611830575062066eed82145b8061183d575062066eee82145b92915050565b82805482825590600052602060002090810192821561187e579160200282015b8281111561187e578251825591602001919060010190611863565b5061188a9291506118af565b5090565b508054600082556007016008900490600052602060002090810190610f2f91905b5b8082111561188a57600081556001016118b0565b803561ffff811681146118d657600080fd5b919050565b803563ffffffff811681146118d657600080fd5b60006020828403121561190157600080fd5b813573ffffffffffffffffffffffffffffffffffffffff8116811461192557600080fd5b9392505050565b60006020828403121561193e57600080fd5b8151801515811461192557600080fd5b60006020828403121561196057600080fd5b5035919050565b60006020828403121561197957600080fd5b5051919050565b6000806040838503121561199357600080fd5b8235915060208084013567ffffffffffffffff808211156119b357600080fd5b818601915086601f8301126119c757600080fd5b8135818111156119d9576119d9611e20565b8060051b6040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f83011681018181108582111715611a1c57611a1c611e20565b604052828152858101935084860182860187018b1015611a3b57600080fd5b600095505b83861015611a5e578035855260019590950194938601938601611a40565b508096505050505050509250929050565b60008060408385031215611a8257600080fd5b50508035926020909101359150565b60008060008060808587031215611aa757600080fd5b611ab0856118db565b9350611abe602086016118c4565b9250611acc604086016118db565b9150611ada606086016118c4565b905092959194509250565b600081518084526020808501945080840160005b83811015611b1557815187529582019590820190600101611af9565b509495945050505050565b6000815180845260005b81811015611b4657602081850181015186830182015201611b2a565b81811115611b58576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b73ffffffffffffffffffffffffffffffffffffffff84168152826020820152606060408201526000611bc06060830184611b20565b95945050505050565b6020808252825182820181905260009190848201906040850190845b81811015611c0757835163ffffffff1683529284019291840191600101611be5565b50909695505050505050565b838152606060208201526000611c2c6060830185611ae5565b9050826040830152949350505050565b878152861515602082015260e060408201526000611c5d60e0830188611ae5565b90508560608301528460808301528360a08301528260c083015298975050505050505050565b600063ffffffff808716835261ffff8616602084015280851660408401525060806060830152611cb66080830184611b20565b9695505050505050565b60008219821115611cd357611cd3611dc2565b500190565b600082611d0e577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615611d4b57611d4b611dc2565b500290565b600082821015611d6257611d62611dc2565b500390565b600061ffff80831681811415611d7f57611d7f611dc2565b6001019392505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415611dbb57611dbb611dc2565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea164736f6c6343000806000a", } var VRFV2PlusWrapperLoadTestConsumerABI = VRFV2PlusWrapperLoadTestConsumerMetaData.ABI var VRFV2PlusWrapperLoadTestConsumerBin = VRFV2PlusWrapperLoadTestConsumerMetaData.Bin -func DeployVRFV2PlusWrapperLoadTestConsumer(auth *bind.TransactOpts, backend bind.ContractBackend, _link common.Address, _vrfV2PlusWrapper common.Address) (common.Address, *types.Transaction, *VRFV2PlusWrapperLoadTestConsumer, error) { +func DeployVRFV2PlusWrapperLoadTestConsumer(auth *bind.TransactOpts, backend bind.ContractBackend, _vrfV2PlusWrapper common.Address) (common.Address, *types.Transaction, *VRFV2PlusWrapperLoadTestConsumer, error) { parsed, err := VRFV2PlusWrapperLoadTestConsumerMetaData.GetAbi() if err != nil { return common.Address{}, nil, nil, err @@ -48,7 +48,7 @@ func DeployVRFV2PlusWrapperLoadTestConsumer(auth *bind.TransactOpts, backend bin return common.Address{}, nil, nil, errors.New("GetABI returned nil") } - address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(VRFV2PlusWrapperLoadTestConsumerBin), backend, _link, _vrfV2PlusWrapper) + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(VRFV2PlusWrapperLoadTestConsumerBin), backend, _vrfV2PlusWrapper) if err != nil { return common.Address{}, nil, nil, err } @@ -215,6 +215,28 @@ func (_VRFV2PlusWrapperLoadTestConsumer *VRFV2PlusWrapperLoadTestConsumerCallerS return _VRFV2PlusWrapperLoadTestConsumer.Contract.GetLinkToken(&_VRFV2PlusWrapperLoadTestConsumer.CallOpts) } +func (_VRFV2PlusWrapperLoadTestConsumer *VRFV2PlusWrapperLoadTestConsumerCaller) GetRequestBlockTimes(opts *bind.CallOpts, offset *big.Int, quantity *big.Int) ([]uint32, error) { + var out []interface{} + err := _VRFV2PlusWrapperLoadTestConsumer.contract.Call(opts, &out, "getRequestBlockTimes", offset, quantity) + + if err != nil { + return *new([]uint32), err + } + + out0 := *abi.ConvertType(out[0], new([]uint32)).(*[]uint32) + + return out0, err + +} + +func (_VRFV2PlusWrapperLoadTestConsumer *VRFV2PlusWrapperLoadTestConsumerSession) GetRequestBlockTimes(offset *big.Int, quantity *big.Int) ([]uint32, error) { + return _VRFV2PlusWrapperLoadTestConsumer.Contract.GetRequestBlockTimes(&_VRFV2PlusWrapperLoadTestConsumer.CallOpts, offset, quantity) +} + +func (_VRFV2PlusWrapperLoadTestConsumer *VRFV2PlusWrapperLoadTestConsumerCallerSession) GetRequestBlockTimes(offset *big.Int, quantity *big.Int) ([]uint32, error) { + return _VRFV2PlusWrapperLoadTestConsumer.Contract.GetRequestBlockTimes(&_VRFV2PlusWrapperLoadTestConsumer.CallOpts, offset, quantity) +} + func (_VRFV2PlusWrapperLoadTestConsumer *VRFV2PlusWrapperLoadTestConsumerCaller) GetRequestStatus(opts *bind.CallOpts, _requestId *big.Int) (GetRequestStatus, error) { @@ -360,6 +382,28 @@ func (_VRFV2PlusWrapperLoadTestConsumer *VRFV2PlusWrapperLoadTestConsumerCallerS return _VRFV2PlusWrapperLoadTestConsumer.Contract.SLastRequestId(&_VRFV2PlusWrapperLoadTestConsumer.CallOpts) } +func (_VRFV2PlusWrapperLoadTestConsumer *VRFV2PlusWrapperLoadTestConsumerCaller) SRequestBlockTimes(opts *bind.CallOpts, arg0 *big.Int) (uint32, error) { + var out []interface{} + err := _VRFV2PlusWrapperLoadTestConsumer.contract.Call(opts, &out, "s_requestBlockTimes", arg0) + + if err != nil { + return *new(uint32), err + } + + out0 := *abi.ConvertType(out[0], new(uint32)).(*uint32) + + return out0, err + +} + +func (_VRFV2PlusWrapperLoadTestConsumer *VRFV2PlusWrapperLoadTestConsumerSession) SRequestBlockTimes(arg0 *big.Int) (uint32, error) { + return _VRFV2PlusWrapperLoadTestConsumer.Contract.SRequestBlockTimes(&_VRFV2PlusWrapperLoadTestConsumer.CallOpts, arg0) +} + +func (_VRFV2PlusWrapperLoadTestConsumer *VRFV2PlusWrapperLoadTestConsumerCallerSession) SRequestBlockTimes(arg0 *big.Int) (uint32, error) { + return _VRFV2PlusWrapperLoadTestConsumer.Contract.SRequestBlockTimes(&_VRFV2PlusWrapperLoadTestConsumer.CallOpts, arg0) +} + func (_VRFV2PlusWrapperLoadTestConsumer *VRFV2PlusWrapperLoadTestConsumerCaller) SRequestCount(opts *bind.CallOpts) (*big.Int, error) { var out []interface{} err := _VRFV2PlusWrapperLoadTestConsumer.contract.Call(opts, &out, "s_requestCount") @@ -521,18 +565,6 @@ func (_VRFV2PlusWrapperLoadTestConsumer *VRFV2PlusWrapperLoadTestConsumerTransac return _VRFV2PlusWrapperLoadTestConsumer.Contract.Reset(&_VRFV2PlusWrapperLoadTestConsumer.TransactOpts) } -func (_VRFV2PlusWrapperLoadTestConsumer *VRFV2PlusWrapperLoadTestConsumerTransactor) SetLinkToken(opts *bind.TransactOpts, _link common.Address) (*types.Transaction, error) { - return _VRFV2PlusWrapperLoadTestConsumer.contract.Transact(opts, "setLinkToken", _link) -} - -func (_VRFV2PlusWrapperLoadTestConsumer *VRFV2PlusWrapperLoadTestConsumerSession) SetLinkToken(_link common.Address) (*types.Transaction, error) { - return _VRFV2PlusWrapperLoadTestConsumer.Contract.SetLinkToken(&_VRFV2PlusWrapperLoadTestConsumer.TransactOpts, _link) -} - -func (_VRFV2PlusWrapperLoadTestConsumer *VRFV2PlusWrapperLoadTestConsumerTransactorSession) SetLinkToken(_link common.Address) (*types.Transaction, error) { - return _VRFV2PlusWrapperLoadTestConsumer.Contract.SetLinkToken(&_VRFV2PlusWrapperLoadTestConsumer.TransactOpts, _link) -} - func (_VRFV2PlusWrapperLoadTestConsumer *VRFV2PlusWrapperLoadTestConsumerTransactor) TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) { return _VRFV2PlusWrapperLoadTestConsumer.contract.Transact(opts, "transferOwnership", to) } @@ -1160,6 +1192,8 @@ type VRFV2PlusWrapperLoadTestConsumerInterface interface { GetLinkToken(opts *bind.CallOpts) (common.Address, error) + GetRequestBlockTimes(opts *bind.CallOpts, offset *big.Int, quantity *big.Int) ([]uint32, error) + GetRequestStatus(opts *bind.CallOpts, _requestId *big.Int) (GetRequestStatus, error) @@ -1174,6 +1208,8 @@ type VRFV2PlusWrapperLoadTestConsumerInterface interface { SLastRequestId(opts *bind.CallOpts) (*big.Int, error) + SRequestBlockTimes(opts *bind.CallOpts, arg0 *big.Int) (uint32, error) + SRequestCount(opts *bind.CallOpts) (*big.Int, error) SRequests(opts *bind.CallOpts, arg0 *big.Int) (SRequests, @@ -1194,8 +1230,6 @@ type VRFV2PlusWrapperLoadTestConsumerInterface interface { Reset(opts *bind.TransactOpts) (*types.Transaction, error) - SetLinkToken(opts *bind.TransactOpts, _link common.Address) (*types.Transaction, error) - TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) WithdrawLink(opts *bind.TransactOpts, amount *big.Int) (*types.Transaction, 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 6bf2ad1b4b2..8f855d5c609 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 @@ -4,23 +4,23 @@ aggregator_v3_interface: ../../contracts/solc/v0.8.6/AggregatorV2V3Interface/Agg arbitrum_module: ../../contracts/solc/v0.8.19/ArbitrumModule/ArbitrumModule.abi ../../contracts/solc/v0.8.19/ArbitrumModule/ArbitrumModule.bin b76cf77e3e8200c5f292e93af3f620f68f207f83634aacaaee43d682701dfea3 authorized_forwarder: ../../contracts/solc/v0.8.19/AuthorizedForwarder/AuthorizedForwarder.abi ../../contracts/solc/v0.8.19/AuthorizedForwarder/AuthorizedForwarder.bin 8ea76c883d460f8353a45a493f2aebeb5a2d9a7b4619d1bc4fff5fb590bb3e10 authorized_receiver: ../../contracts/solc/v0.8.19/AuthorizedReceiver/AuthorizedReceiver.abi ../../contracts/solc/v0.8.19/AuthorizedReceiver/AuthorizedReceiver.bin 18e8969ba3234b027e1b16c11a783aca58d0ea5c2361010ec597f134b7bf1c4f +automation_compatible_utils: ../../contracts/solc/v0.8.19/AutomationCompatibleUtils/AutomationCompatibleUtils.abi ../../contracts/solc/v0.8.19/AutomationCompatibleUtils/AutomationCompatibleUtils.bin dfe88f4f40d124b8cb5f36a7e9f9328008ca57f7ec5d07a28d949d569d5f2834 automation_consumer_benchmark: ../../contracts/solc/v0.8.16/AutomationConsumerBenchmark/AutomationConsumerBenchmark.abi ../../contracts/solc/v0.8.16/AutomationConsumerBenchmark/AutomationConsumerBenchmark.bin f52c76f1aaed4be541d82d97189d70f5aa027fc9838037dd7a7d21910c8c488e automation_forwarder_logic: ../../contracts/solc/v0.8.16/AutomationForwarderLogic/AutomationForwarderLogic.abi ../../contracts/solc/v0.8.16/AutomationForwarderLogic/AutomationForwarderLogic.bin 15ae0c367297955fdab4b552dbb10e1f2be80a8fde0efec4a4d398693e9d72b5 automation_registrar_wrapper2_1: ../../contracts/solc/v0.8.16/AutomationRegistrar2_1/AutomationRegistrar2_1.abi ../../contracts/solc/v0.8.16/AutomationRegistrar2_1/AutomationRegistrar2_1.bin eb06d853aab39d3196c593b03e555851cbe8386e0fe54a74c2479f62d14b3c42 -automation_registrar_wrapper2_2: ../../contracts/solc/v0.8.19/AutomationRegistrar2_2/AutomationRegistrar2_2.abi ../../contracts/solc/v0.8.19/AutomationRegistrar2_2/AutomationRegistrar2_2.bin 7c61908c1bb1bfd05a4da22bb73d62c0e2c05240f3f8fb5e06331603ff2246a9 -automation_registrar_wrapper2_3: ../../contracts/solc/v0.8.19/AutomationRegistrar2_3/AutomationRegistrar2_3.abi ../../contracts/solc/v0.8.19/AutomationRegistrar2_3/AutomationRegistrar2_3.bin 8e18d447009546ac8ad15d0d516ad4d663d0e1ca5f723300acb604b5571b63bf +automation_registrar_wrapper2_3: ../../contracts/solc/v0.8.19/AutomationRegistrar2_3/AutomationRegistrar2_3.abi ../../contracts/solc/v0.8.19/AutomationRegistrar2_3/AutomationRegistrar2_3.bin a68edeecffb5e212024a888832428a9c2b4536a89ca7ea3849977d74112c276c automation_registry_logic_a_wrapper_2_2: ../../contracts/solc/v0.8.19/AutomationRegistryLogicA2_2/AutomationRegistryLogicA2_2.abi ../../contracts/solc/v0.8.19/AutomationRegistryLogicA2_2/AutomationRegistryLogicA2_2.bin 58d09c16be20a6d3f70be6d06299ed61415b7796c71f176d87ce015e1294e029 -automation_registry_logic_a_wrapper_2_3: ../../contracts/solc/v0.8.19/AutomationRegistryLogicA2_3/AutomationRegistryLogicA2_3.abi ../../contracts/solc/v0.8.19/AutomationRegistryLogicA2_3/AutomationRegistryLogicA2_3.bin 56b9ed9923d0610fcc5c23c7e0d8f013195313138fbd2630b5148aced302582e -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 e5669214a6b747b17331ebbf8f2d13cf7100d3313d652c6f1304ccf158441fc6 -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 94a4b8b2d8116c13a6a0b03d4d726856e0f9bfdaf88e46c2fd5427c10c5589ca +automation_registry_logic_a_wrapper_2_3: ../../contracts/solc/v0.8.19/AutomationRegistryLogicA2_3/AutomationRegistryLogicA2_3.abi ../../contracts/solc/v0.8.19/AutomationRegistryLogicA2_3/AutomationRegistryLogicA2_3.bin 638b3d1bfb9d5883065c976ea69186380600464058fdf4a367814804b7107bdd +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 315498ab7e9c8d3a0d94dae7ef55d9cc2e30cd185c3c1251b96ba1283e2b66d6 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 eca1187a878b622ef3fced041a28a4229d45dd797d95630838ff6351b6afc437 -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 188df879a68b5ea35b909d33b050f32e4195670152c243957f7c78e3499d1b4e -automation_utils_2_1: ../../contracts/solc/v0.8.16/AutomationUtils2_1/AutomationUtils2_1.abi ../../contracts/solc/v0.8.16/AutomationUtils2_1/AutomationUtils2_1.bin 331bfa79685aee6ddf63b64c0747abee556c454cae3fb8175edff425b615d8aa -automation_utils_2_2: ../../contracts/solc/v0.8.19/AutomationUtils2_2/AutomationUtils2_2.abi ../../contracts/solc/v0.8.19/AutomationUtils2_2/AutomationUtils2_2.bin 6fe2e41b1d3b74bee4013a48c10d84da25e559f28e22749aa13efabbf2cc2ee8 -automation_utils_2_3: ../../contracts/solc/v0.8.19/AutomationUtils2_3/AutomationUtils2_3.abi ../../contracts/solc/v0.8.19/AutomationUtils2_3/AutomationUtils2_3.bin aa2373b5913b9ad6a641011d9cbd77c5c7042a05a61672127609ebff58f75905 +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 5156c8298dc6295967493319b2638880f267e23700f6491bb9468e917cf36ef7 +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 batch_blockhash_store: ../../contracts/solc/v0.8.6/BatchBlockhashStore/BatchBlockhashStore.abi ../../contracts/solc/v0.8.6/BatchBlockhashStore/BatchBlockhashStore.bin 14356c48ef70f66ef74f22f644450dbf3b2a147c1b68deaa7e7d1eb8ffab15db batch_vrf_coordinator_v2: ../../contracts/solc/v0.8.6/BatchVRFCoordinatorV2/BatchVRFCoordinatorV2.abi ../../contracts/solc/v0.8.6/BatchVRFCoordinatorV2/BatchVRFCoordinatorV2.bin d0a54963260d8c1f1bbd984b758285e6027cfb5a7e42701bcb562ab123219332 -batch_vrf_coordinator_v2plus: ../../contracts/solc/v0.8.6/BatchVRFCoordinatorV2Plus/BatchVRFCoordinatorV2Plus.abi ../../contracts/solc/v0.8.6/BatchVRFCoordinatorV2Plus/BatchVRFCoordinatorV2Plus.bin 73cb626b5cb2c3464655b61b8ac42fe7a1963fe25e6a5eea40b8e4d5bff3de36 +batch_vrf_coordinator_v2plus: ../../contracts/solc/v0.8.6/BatchVRFCoordinatorV2Plus/BatchVRFCoordinatorV2Plus.abi ../../contracts/solc/v0.8.6/BatchVRFCoordinatorV2Plus/BatchVRFCoordinatorV2Plus.bin fa604421e11692bcacd2c98eed03c0c87bdf55c2955859ddb731ae625cf94d33 blockhash_store: ../../contracts/solc/v0.8.6/BlockhashStore/BlockhashStore.abi ../../contracts/solc/v0.8.6/BlockhashStore/BlockhashStore.bin 12b0662f1636a341c8863bdec7a20f2ddd97c3a4fd1a7ae353fe316609face4e chain_module_base: ../../contracts/solc/v0.8.19/ChainModuleBase/ChainModuleBase.abi ../../contracts/solc/v0.8.19/ChainModuleBase/ChainModuleBase.bin 39dfce79330e921e5c169051b11c6e5ea15cd4db5a7b09c06aabbe9658148915 chain_reader_example: ../../contracts/solc/v0.8.19/ChainReaderTestContract/LatestValueHolder.abi ../../contracts/solc/v0.8.19/ChainReaderTestContract/LatestValueHolder.bin de88c7e68de36b96aa2bec844bdc96fcd7c9017b38e25062b3b9f9cec42c814f @@ -33,26 +33,27 @@ flags_wrapper: ../../contracts/solc/v0.6/Flags/Flags.abi ../../contracts/solc/v0 flux_aggregator_wrapper: ../../contracts/solc/v0.6/FluxAggregator/FluxAggregator.abi ../../contracts/solc/v0.6/FluxAggregator/FluxAggregator.bin a3b0a6396c4aa3b5ee39b3c4bd45efc89789d4859379a8a92caca3a0496c5794 gas_wrapper: ../../contracts/solc/v0.8.6/KeeperRegistryCheckUpkeepGasUsageWrapper1_2/KeeperRegistryCheckUpkeepGasUsageWrapper1_2.abi ../../contracts/solc/v0.8.6/KeeperRegistryCheckUpkeepGasUsageWrapper1_2/KeeperRegistryCheckUpkeepGasUsageWrapper1_2.bin 4a5dcdac486d18fcd58e3488c15c1710ae76b977556a3f3191bd269a4bc75723 gas_wrapper_mock: ../../contracts/solc/v0.8.6/KeeperRegistryCheckUpkeepGasUsageWrapper1_2Mock/KeeperRegistryCheckUpkeepGasUsageWrapper1_2Mock.abi ../../contracts/solc/v0.8.6/KeeperRegistryCheckUpkeepGasUsageWrapper1_2Mock/KeeperRegistryCheckUpkeepGasUsageWrapper1_2Mock.bin a9b08f18da59125c6fc305855710241f3d35161b8b9f3e3f635a7b1d5c6da9c8 -i_automation_registry_master_wrapper_2_2: ../../contracts/solc/v0.8.19/IAutomationRegistryMaster/IAutomationRegistryMaster.abi ../../contracts/solc/v0.8.19/IAutomationRegistryMaster/IAutomationRegistryMaster.bin 0886dd1df1f4dcf5b08012f8adcf30fd96caab28999610e70ce02beb2170c92f -i_automation_registry_master_wrapper_2_3: ../../contracts/solc/v0.8.19/IAutomationRegistryMaster2_3/IAutomationRegistryMaster.abi ../../contracts/solc/v0.8.19/IAutomationRegistryMaster2_3/IAutomationRegistryMaster.bin fa3527675516bccfbc266697e37b60b77aee45018b80a5e98e027008f5fe2dfd +i_automation_registry_master_wrapper_2_2: ../../contracts/solc/v0.8.19/IAutomationRegistryMaster/IAutomationRegistryMaster.abi ../../contracts/solc/v0.8.19/IAutomationRegistryMaster/IAutomationRegistryMaster.bin 9ff7087179f89f9b05964ebc3e71332fce11f1b8e85058f7b16b3bc0dd6fb96b +i_automation_registry_master_wrapper_2_3: ../../contracts/solc/v0.8.19/IAutomationRegistryMaster2_3/IAutomationRegistryMaster2_3.abi ../../contracts/solc/v0.8.19/IAutomationRegistryMaster2_3/IAutomationRegistryMaster2_3.bin 6daf9fadee84e2ba1c45fab3cddace553051fd50576344d4723c48af9b6be22b +i_automation_v21_plus_common: ../../contracts/solc/v0.8.19/IAutomationV21PlusCommon/IAutomationV21PlusCommon.abi ../../contracts/solc/v0.8.19/IAutomationV21PlusCommon/IAutomationV21PlusCommon.bin e8a601ec382c0a2e83c49759de13b0622b5e04e6b95901e96a1e9504329e594c i_chain_module: ../../contracts/solc/v0.8.19/IChainModule/IChainModule.abi ../../contracts/solc/v0.8.19/IChainModule/IChainModule.bin 383611981c86c70522f41b8750719faacc7d7933a22849d5004799ebef3371fa -i_keeper_registry_master_wrapper_2_1: ../../contracts/solc/v0.8.16/IKeeperRegistryMaster/IKeeperRegistryMaster.abi ../../contracts/solc/v0.8.16/IKeeperRegistryMaster/IKeeperRegistryMaster.bin 6501bb9bcf5048bab2737b00685c6984a24867e234ddf5b60a65904eee9a4ebc +i_keeper_registry_master_wrapper_2_1: ../../contracts/solc/v0.8.16/IKeeperRegistryMaster/IKeeperRegistryMaster.abi ../../contracts/solc/v0.8.16/IKeeperRegistryMaster/IKeeperRegistryMaster.bin ee0f150b3afbab2df3d24ff3f4c87851efa635da30db04cd1f70cb4e185a1781 i_log_automation: ../../contracts/solc/v0.8.16/ILogAutomation/ILogAutomation.abi ../../contracts/solc/v0.8.16/ILogAutomation/ILogAutomation.bin 296beccb6af655d6fc3a6e676b244831cce2da6688d3afc4f21f8738ae59e03e keeper_consumer_performance_wrapper: ../../contracts/solc/v0.8.16/KeeperConsumerPerformance/KeeperConsumerPerformance.abi ../../contracts/solc/v0.8.16/KeeperConsumerPerformance/KeeperConsumerPerformance.bin eeda39f5d3e1c8ffa0fb6cd1803731b98a4bc262d41833458e3fe8b40933ae90 -keeper_consumer_wrapper: ../../contracts/solc/v0.8.16/KeeperConsumer/KeeperConsumer.abi ../../contracts/solc/v0.8.16/KeeperConsumer/KeeperConsumer.bin 2c6163b145082fbab74b7343577a9cec8fda8b0da9daccf2a82581b1f5a84b83 +keeper_consumer_wrapper: ../../contracts/solc/v0.8.16/KeeperConsumer/KeeperConsumer.abi ../../contracts/solc/v0.8.16/KeeperConsumer/KeeperConsumer.bin 2b7f39ede193273782c2ab653fcb9941920eff02f16bdd128c582082a7352554 keeper_registrar_wrapper1_2: ../../contracts/solc/v0.8.6/KeeperRegistrar1_2/KeeperRegistrar.abi ../../contracts/solc/v0.8.6/KeeperRegistrar1_2/KeeperRegistrar.bin e49b2f8b23da17af1ed2209b8ae0968cc04350554d636711e6c24a3ad3118692 keeper_registrar_wrapper1_2_mock: ../../contracts/solc/v0.8.6/KeeperRegistrar1_2Mock/KeeperRegistrar1_2Mock.abi ../../contracts/solc/v0.8.6/KeeperRegistrar1_2Mock/KeeperRegistrar1_2Mock.bin 5b155a7cb3def309fd7525de1d7cd364ebf8491bdc3060eac08ea0ff55ab29bc keeper_registrar_wrapper2_0: ../../contracts/solc/v0.8.6/KeeperRegistrar2_0/KeeperRegistrar2_0.abi ../../contracts/solc/v0.8.6/KeeperRegistrar2_0/KeeperRegistrar2_0.bin 647f125c2f0dafabcdc545cb77b15dc2ec3ea9429357806813179b1fd555c2d2 keeper_registry_logic1_3: ../../contracts/solc/v0.8.6/KeeperRegistryLogic1_3/KeeperRegistryLogic1_3.abi ../../contracts/solc/v0.8.6/KeeperRegistryLogic1_3/KeeperRegistryLogic1_3.bin 903f8b9c8e25425ca6d0b81b89e339d695a83630bfbfa24a6f3b38869676bc5a keeper_registry_logic2_0: ../../contracts/solc/v0.8.6/KeeperRegistryLogic2_0/KeeperRegistryLogic2_0.abi ../../contracts/solc/v0.8.6/KeeperRegistryLogic2_0/KeeperRegistryLogic2_0.bin d69d2bc8e4844293dbc2d45abcddc50b84c88554ecccfa4fa77c0ca45ec80871 keeper_registry_logic_a_wrapper_2_1: ../../contracts/solc/v0.8.16/KeeperRegistryLogicA2_1/KeeperRegistryLogicA2_1.abi ../../contracts/solc/v0.8.16/KeeperRegistryLogicA2_1/KeeperRegistryLogicA2_1.bin 77481ab75c9aa86a62a7b2a708599b5ea1a6346ed1c0def6d4826e7ae523f1ee -keeper_registry_logic_b_wrapper_2_1: ../../contracts/solc/v0.8.16/KeeperRegistryLogicB2_1/KeeperRegistryLogicB2_1.abi ../../contracts/solc/v0.8.16/KeeperRegistryLogicB2_1/KeeperRegistryLogicB2_1.bin 467d10741a04601b136553a2b1c6ab37f2a65d809366faf03180a22ff26be215 +keeper_registry_logic_b_wrapper_2_1: ../../contracts/solc/v0.8.16/KeeperRegistryLogicB2_1/KeeperRegistryLogicB2_1.abi ../../contracts/solc/v0.8.16/KeeperRegistryLogicB2_1/KeeperRegistryLogicB2_1.bin 83b0cc20c6aa437b824f424b3e16ddcb18ab08bfa64398f143dbbf78f953dfef keeper_registry_wrapper1_1: ../../contracts/solc/v0.7/KeeperRegistry1_1/KeeperRegistry1_1.abi ../../contracts/solc/v0.7/KeeperRegistry1_1/KeeperRegistry1_1.bin 6ce079f2738f015f7374673a2816e8e9787143d00b780ea7652c8aa9ad9e1e20 keeper_registry_wrapper1_1_mock: ../../contracts/solc/v0.7/KeeperRegistry1_1Mock/KeeperRegistry1_1Mock.abi ../../contracts/solc/v0.7/KeeperRegistry1_1Mock/KeeperRegistry1_1Mock.bin 98ddb3680e86359de3b5d17e648253ba29a84703f087a1b52237824003a8c6df -keeper_registry_wrapper1_2: ../../contracts/solc/v0.8.6/KeeperRegistry1_2/KeeperRegistry1_2.abi ../../contracts/solc/v0.8.6/KeeperRegistry1_2/KeeperRegistry1_2.bin a40ff877dd7c280f984cbbb2b428e160662b0c295e881d5f778f941c0088ca22 +keeper_registry_wrapper1_2: ../../contracts/solc/v0.8.6/KeeperRegistry1_2/KeeperRegistry1_2.abi ../../contracts/solc/v0.8.6/KeeperRegistry1_2/KeeperRegistry1_2.bin f6f48cc6a4e03ffc987a017041417a1db78566275ec8ed7673fbfc9052ce0215 keeper_registry_wrapper1_3: ../../contracts/solc/v0.8.6/KeeperRegistry1_3/KeeperRegistry1_3.abi ../../contracts/solc/v0.8.6/KeeperRegistry1_3/KeeperRegistry1_3.bin d4dc760b767ae274ee25c4a604ea371e1fa603a7b6421b69efb2088ad9e8abb3 keeper_registry_wrapper2_0: ../../contracts/solc/v0.8.6/KeeperRegistry2_0/KeeperRegistry2_0.abi ../../contracts/solc/v0.8.6/KeeperRegistry2_0/KeeperRegistry2_0.bin c32dea7d5ef66b7c58ddc84ddf69aa44df1b3ae8601fbc271c95be4ff5853056 -keeper_registry_wrapper_2_1: ../../contracts/solc/v0.8.16/KeeperRegistry2_1/KeeperRegistry2_1.abi ../../contracts/solc/v0.8.16/KeeperRegistry2_1/KeeperRegistry2_1.bin 604e4a0cd980c713929b523b999462a3aa0ed06f96ff563a4c8566cf59c8445b +keeper_registry_wrapper_2_1: ../../contracts/solc/v0.8.16/KeeperRegistry2_1/KeeperRegistry2_1.abi ../../contracts/solc/v0.8.16/KeeperRegistry2_1/KeeperRegistry2_1.bin 3043b862a9c3d30b683f646739e42b41a09ad4922f6ea502bfef7c9c12fbfb5e keepers_vrf_consumer: ../../contracts/solc/v0.8.6/KeepersVRFConsumer/KeepersVRFConsumer.abi ../../contracts/solc/v0.8.6/KeepersVRFConsumer/KeepersVRFConsumer.bin fa75572e689c9e84705c63e8dbe1b7b8aa1a8fe82d66356c4873d024bb9166e8 log_emitter: ../../contracts/solc/v0.8.19/LogEmitter/LogEmitter.abi ../../contracts/solc/v0.8.19/LogEmitter/LogEmitter.bin 4b129ab93432c95ff9143f0631323e189887668889e0b36ccccf18a571e41ccf log_triggered_streams_lookup_wrapper: ../../contracts/solc/v0.8.16/LogTriggeredStreamsLookup/LogTriggeredStreamsLookup.abi ../../contracts/solc/v0.8.16/LogTriggeredStreamsLookup/LogTriggeredStreamsLookup.bin 920fff3b662909f12ed11b47d168036ffa74ad52070a94e2fa26cdad5e428b4e @@ -82,19 +83,19 @@ streams_lookup_upkeep_wrapper: ../../contracts/solc/v0.8.16/StreamsLookupUpkeep/ test_api_consumer_wrapper: ../../contracts/solc/v0.6/TestAPIConsumer/TestAPIConsumer.abi ../../contracts/solc/v0.6/TestAPIConsumer/TestAPIConsumer.bin ed10893cb18894c18e275302329c955f14ea2de37ee044f84aa1e067ac5ea71e trusted_blockhash_store: ../../contracts/solc/v0.8.6/TrustedBlockhashStore/TrustedBlockhashStore.abi ../../contracts/solc/v0.8.6/TrustedBlockhashStore/TrustedBlockhashStore.bin 98cb0dc06c15af5dcd3b53bdfc98e7ed2489edc96a42203294ac2fc0efdda02b type_and_version_interface_wrapper: ../../contracts/solc/v0.8.6/KeeperRegistry1_2/TypeAndVersionInterface.abi ../../contracts/solc/v0.8.6/KeeperRegistry1_2/TypeAndVersionInterface.bin bc9c3a6e73e3ebd5b58754df0deeb3b33f4bb404d5709bb904aed51d32f4b45e -upkeep_counter_wrapper: ../../contracts/solc/v0.8.16/UpkeepCounter/UpkeepCounter.abi ../../contracts/solc/v0.8.16/UpkeepCounter/UpkeepCounter.bin 77f000229a501f638dd2dc439859257f632894c728b31e68aea4f6d6c52f1b71 +upkeep_counter_wrapper: ../../contracts/solc/v0.8.16/UpkeepCounter/UpkeepCounter.abi ../../contracts/solc/v0.8.16/UpkeepCounter/UpkeepCounter.bin cef953186d12ac802e54d17c897d01605b60bbe0ce2df3b4cf2c31c5c3168b35 upkeep_perform_counter_restrictive_wrapper: ../../contracts/solc/v0.8.16/UpkeepPerformCounterRestrictive/UpkeepPerformCounterRestrictive.abi ../../contracts/solc/v0.8.16/UpkeepPerformCounterRestrictive/UpkeepPerformCounterRestrictive.bin 20955b21acceb58355fa287b29194a73edf5937067ba7140667301017cb2b24c upkeep_transcoder: ../../contracts/solc/v0.8.6/UpkeepTranscoder/UpkeepTranscoder.abi ../../contracts/solc/v0.8.6/UpkeepTranscoder/UpkeepTranscoder.bin 336c92a981597be26508455f81a908a0784a817b129a59686c5b2c4afcba730a -verifiable_load_log_trigger_upkeep_wrapper: ../../contracts/solc/v0.8.16/VerifiableLoadLogTriggerUpkeep/VerifiableLoadLogTriggerUpkeep.abi ../../contracts/solc/v0.8.16/VerifiableLoadLogTriggerUpkeep/VerifiableLoadLogTriggerUpkeep.bin ee5c608e4e84c80934e42b0c02a49624840adf10b50c91f688bf8f0c7c6994c2 -verifiable_load_streams_lookup_upkeep_wrapper: ../../contracts/solc/v0.8.16/VerifiableLoadStreamsLookupUpkeep/VerifiableLoadStreamsLookupUpkeep.abi ../../contracts/solc/v0.8.16/VerifiableLoadStreamsLookupUpkeep/VerifiableLoadStreamsLookupUpkeep.bin 58f1f6b31a313e04ceb3e0e0f0393bc195cc2f4784a3b0e14a80a86fc836f427 -verifiable_load_upkeep_wrapper: ../../contracts/solc/v0.8.16/VerifiableLoadUpkeep/VerifiableLoadUpkeep.abi ../../contracts/solc/v0.8.16/VerifiableLoadUpkeep/VerifiableLoadUpkeep.bin a3e02c43756ea91e7ce4b81e48c11648f1d12f6663c236780147e41dfa36ebee +verifiable_load_log_trigger_upkeep_wrapper: ../../contracts/solc/v0.8.16/VerifiableLoadLogTriggerUpkeep/VerifiableLoadLogTriggerUpkeep.abi ../../contracts/solc/v0.8.16/VerifiableLoadLogTriggerUpkeep/VerifiableLoadLogTriggerUpkeep.bin fdc345861ed01e59a5fe74538c7adccf1360db47d7660f5e463c0a99a78c9821 +verifiable_load_streams_lookup_upkeep_wrapper: ../../contracts/solc/v0.8.16/VerifiableLoadStreamsLookupUpkeep/VerifiableLoadStreamsLookupUpkeep.abi ../../contracts/solc/v0.8.16/VerifiableLoadStreamsLookupUpkeep/VerifiableLoadStreamsLookupUpkeep.bin 58ef2b6d008d8247055ecb042bf88eff3ebee808fcb28179fb6b14684a159f3b +verifiable_load_upkeep_wrapper: ../../contracts/solc/v0.8.16/VerifiableLoadUpkeep/VerifiableLoadUpkeep.abi ../../contracts/solc/v0.8.16/VerifiableLoadUpkeep/VerifiableLoadUpkeep.bin ff2bf9a9a29557ebfbebc6c5abf9bff6932a50d1c71440feb513504cb3b2d055 vrf_consumer_v2: ../../contracts/solc/v0.8.6/VRFConsumerV2/VRFConsumerV2.abi ../../contracts/solc/v0.8.6/VRFConsumerV2/VRFConsumerV2.bin 9ef258bf8e9f8d880fd229ceb145593d91e24fc89366baa0bf19169c5787d15f vrf_consumer_v2_plus_upgradeable_example: ../../contracts/solc/v0.8.6/VRFConsumerV2PlusUpgradeableExample/VRFConsumerV2PlusUpgradeableExample.abi ../../contracts/solc/v0.8.6/VRFConsumerV2PlusUpgradeableExample/VRFConsumerV2PlusUpgradeableExample.bin 3155c611e4d6882e9324b6e975033b31356776ea8b031ca63d63da37589d583b vrf_consumer_v2_upgradeable_example: ../../contracts/solc/v0.8.6/VRFConsumerV2UpgradeableExample/VRFConsumerV2UpgradeableExample.abi ../../contracts/solc/v0.8.6/VRFConsumerV2UpgradeableExample/VRFConsumerV2UpgradeableExample.bin f1790a9a2f2a04c730593e483459709cb89e897f8a19d7a3ac0cfe6a97265e6e vrf_coordinator_mock: ../../contracts/solc/v0.8.6/VRFCoordinatorMock/VRFCoordinatorMock.abi ../../contracts/solc/v0.8.6/VRFCoordinatorMock/VRFCoordinatorMock.bin 5c495cf8df1f46d8736b9150cdf174cce358cb8352f60f0d5bb9581e23920501 vrf_coordinator_test_v2: ../../contracts/solc/v0.8.6/VRFCoordinatorTestV2/VRFCoordinatorTestV2.abi ../../contracts/solc/v0.8.6/VRFCoordinatorTestV2/VRFCoordinatorTestV2.bin eaefd785c38bac67fb11a7fc2737ab2da68c988ca170e7db8ff235c80893e01c vrf_coordinator_v2: ../../contracts/solc/v0.8.6/VRFCoordinatorV2/VRFCoordinatorV2.abi ../../contracts/solc/v0.8.6/VRFCoordinatorV2/VRFCoordinatorV2.bin 295f35ce282060317dfd01f45959f5a2b05ba26913e422fbd4fb6bf90b107006 -vrf_coordinator_v2_5: ../../contracts/solc/v0.8.6/VRFCoordinatorV2_5/VRFCoordinatorV2_5.abi ../../contracts/solc/v0.8.6/VRFCoordinatorV2_5/VRFCoordinatorV2_5.bin 3230631b7920236588ccd4ad8795e52ede6222cac7a70fa477c7240da0955a5e +vrf_coordinator_v2_5: ../../contracts/solc/v0.8.6/VRFCoordinatorV2_5/VRFCoordinatorV2_5.abi ../../contracts/solc/v0.8.6/VRFCoordinatorV2_5/VRFCoordinatorV2_5.bin 96573903a5e9f92fd3532b8ea6e28702d399e36a39db86ff423c95f657e278b6 vrf_coordinator_v2_plus_v2_example: ../../contracts/solc/v0.8.6/VRFCoordinatorV2Plus_V2Example/VRFCoordinatorV2Plus_V2Example.abi ../../contracts/solc/v0.8.6/VRFCoordinatorV2Plus_V2Example/VRFCoordinatorV2Plus_V2Example.bin 4a5b86701983b1b65f0a8dfa116b3f6d75f8f706fa274004b57bdf5992e4cec3 vrf_coordinator_v2plus_interface: ../../contracts/solc/v0.8.6/IVRFCoordinatorV2PlusInternal/IVRFCoordinatorV2PlusInternal.abi ../../contracts/solc/v0.8.6/IVRFCoordinatorV2PlusInternal/IVRFCoordinatorV2PlusInternal.bin 86b8e23aab28c5b98e3d2384dc4f702b093e382dc985c88101278e6e4bf6f7b8 vrf_external_sub_owner_example: ../../contracts/solc/v0.8.6/VRFExternalSubOwnerExample/VRFExternalSubOwnerExample.abi ../../contracts/solc/v0.8.6/VRFExternalSubOwnerExample/VRFExternalSubOwnerExample.bin 14f888eb313930b50233a6f01ea31eba0206b7f41a41f6311670da8bb8a26963 @@ -103,17 +104,17 @@ vrf_load_test_ownerless_consumer: ../../contracts/solc/v0.8.6/VRFLoadTestOwnerle vrf_load_test_with_metrics: ../../contracts/solc/v0.8.6/VRFV2LoadTestWithMetrics/VRFV2LoadTestWithMetrics.abi ../../contracts/solc/v0.8.6/VRFV2LoadTestWithMetrics/VRFV2LoadTestWithMetrics.bin c9621c52d216a090ff6bbe942f1b75d2bce8658a27323c3789e5e14b523277ee vrf_log_emitter: ../../contracts/solc/v0.8.19/VRFLogEmitter/VRFLogEmitter.abi ../../contracts/solc/v0.8.19/VRFLogEmitter/VRFLogEmitter.bin 15f491d445ac4d0c712d1cbe4e5054c759b080bf20de7d54bfe2a82cde4dcf06 vrf_malicious_consumer_v2: ../../contracts/solc/v0.8.6/VRFMaliciousConsumerV2/VRFMaliciousConsumerV2.abi ../../contracts/solc/v0.8.6/VRFMaliciousConsumerV2/VRFMaliciousConsumerV2.bin 9755fa8ffc7f5f0b337d5d413d77b0c9f6cd6f68c31727d49acdf9d4a51bc522 -vrf_malicious_consumer_v2_plus: ../../contracts/solc/v0.8.6/VRFMaliciousConsumerV2Plus/VRFMaliciousConsumerV2Plus.abi ../../contracts/solc/v0.8.6/VRFMaliciousConsumerV2Plus/VRFMaliciousConsumerV2Plus.bin e2a72638e11da807b6533d037e7e5aaeed695efd5035777b8e20d2f8973a574c +vrf_malicious_consumer_v2_plus: ../../contracts/solc/v0.8.6/VRFMaliciousConsumerV2Plus/VRFMaliciousConsumerV2Plus.abi ../../contracts/solc/v0.8.6/VRFMaliciousConsumerV2Plus/VRFMaliciousConsumerV2Plus.bin 354752a49a62b33540d5690d5e04115844a752f4f3d07163a024a035b39c008f vrf_mock_ethlink_aggregator: ../../contracts/solc/v0.8.6/VRFMockETHLINKAggregator/VRFMockETHLINKAggregator.abi ../../contracts/solc/v0.8.6/VRFMockETHLINKAggregator/VRFMockETHLINKAggregator.bin 3657f8c552147eb55d7538fa7d8012c1a983d8c5184610de60600834a72e006b vrf_owner: ../../contracts/solc/v0.8.6/VRFOwner/VRFOwner.abi ../../contracts/solc/v0.8.6/VRFOwner/VRFOwner.bin eccfae5ee295b5850e22f61240c469f79752b8d9a3bac5d64aec7ac8def2f6cb vrf_owner_test_consumer: ../../contracts/solc/v0.8.6/VRFV2OwnerTestConsumer/VRFV2OwnerTestConsumer.abi ../../contracts/solc/v0.8.6/VRFV2OwnerTestConsumer/VRFV2OwnerTestConsumer.bin 6969de242efe8f366ae4097fc279d9375c8e2d0307aaa322e31f2ce6b8c1909a vrf_ownerless_consumer_example: ../../contracts/solc/v0.8.6/VRFOwnerlessConsumerExample/VRFOwnerlessConsumerExample.abi ../../contracts/solc/v0.8.6/VRFOwnerlessConsumerExample/VRFOwnerlessConsumerExample.bin 9893b3805863273917fb282eed32274e32aa3d5c2a67a911510133e1218132be vrf_single_consumer_example: ../../contracts/solc/v0.8.6/VRFSingleConsumerExample/VRFSingleConsumerExample.abi ../../contracts/solc/v0.8.6/VRFSingleConsumerExample/VRFSingleConsumerExample.bin 892a5ed35da2e933f7fd7835cd6f7f70ef3aa63a9c03a22c5b1fd026711b0ece vrf_v2_consumer_wrapper: ../../contracts/solc/v0.8.6/VRFv2Consumer/VRFv2Consumer.abi ../../contracts/solc/v0.8.6/VRFv2Consumer/VRFv2Consumer.bin 12368b3b5e06392440143a13b94c0ea2f79c4c897becc3b060982559e10ace40 -vrf_v2plus_load_test_with_metrics: ../../contracts/solc/v0.8.6/VRFV2PlusLoadTestWithMetrics/VRFV2PlusLoadTestWithMetrics.abi ../../contracts/solc/v0.8.6/VRFV2PlusLoadTestWithMetrics/VRFV2PlusLoadTestWithMetrics.bin dfb5ca62b8017ae5e3f03221bc8acb567fcce426b31b40d57590a76a97d267a2 -vrf_v2plus_single_consumer: ../../contracts/solc/v0.8.6/VRFV2PlusSingleConsumerExample/VRFV2PlusSingleConsumerExample.abi ../../contracts/solc/v0.8.6/VRFV2PlusSingleConsumerExample/VRFV2PlusSingleConsumerExample.bin 6226d05afa1664033b182bfbdde11d5dfb1d4c8e3eb0bd0448c8bfb76f5b96e4 -vrf_v2plus_sub_owner: ../../contracts/solc/v0.8.6/VRFV2PlusExternalSubOwnerExample/VRFV2PlusExternalSubOwnerExample.abi ../../contracts/solc/v0.8.6/VRFV2PlusExternalSubOwnerExample/VRFV2PlusExternalSubOwnerExample.bin 7541f986571b8a5671a256edc27ae9b8df9bcdff45ac3b96e5609bbfcc320e4e -vrf_v2plus_upgraded_version: ../../contracts/solc/v0.8.6/VRFCoordinatorV2PlusUpgradedVersion/VRFCoordinatorV2PlusUpgradedVersion.abi ../../contracts/solc/v0.8.6/VRFCoordinatorV2PlusUpgradedVersion/VRFCoordinatorV2PlusUpgradedVersion.bin 09e4186c64cdaf1e5d36405467fb86996d7e4177cb08ecec425a4352d4246140 +vrf_v2plus_load_test_with_metrics: ../../contracts/solc/v0.8.6/VRFV2PlusLoadTestWithMetrics/VRFV2PlusLoadTestWithMetrics.abi ../../contracts/solc/v0.8.6/VRFV2PlusLoadTestWithMetrics/VRFV2PlusLoadTestWithMetrics.bin a128707b611c961904d9d3bc15031252435e0422269160dc18941dfac351b609 +vrf_v2plus_single_consumer: ../../contracts/solc/v0.8.6/VRFV2PlusSingleConsumerExample/VRFV2PlusSingleConsumerExample.abi ../../contracts/solc/v0.8.6/VRFV2PlusSingleConsumerExample/VRFV2PlusSingleConsumerExample.bin b4ead0b412f961558f60fb279a7f7ef12fa6d4b9f0bb5f05ff09e86723bb647c +vrf_v2plus_sub_owner: ../../contracts/solc/v0.8.6/VRFV2PlusExternalSubOwnerExample/VRFV2PlusExternalSubOwnerExample.abi ../../contracts/solc/v0.8.6/VRFV2PlusExternalSubOwnerExample/VRFV2PlusExternalSubOwnerExample.bin 848977ee4dbff10c99a96d04beaa599cea13124d1cdb702877d90047f8cb19f2 +vrf_v2plus_upgraded_version: ../../contracts/solc/v0.8.6/VRFCoordinatorV2PlusUpgradedVersion/VRFCoordinatorV2PlusUpgradedVersion.abi ../../contracts/solc/v0.8.6/VRFCoordinatorV2PlusUpgradedVersion/VRFCoordinatorV2PlusUpgradedVersion.bin be13d0415a3404414c9a2e887f39ae282b2cf4bd755c02d9b5dcd73fda816215 vrfv2_proxy_admin: ../../contracts/solc/v0.8.6/VRFV2ProxyAdmin/VRFV2ProxyAdmin.abi ../../contracts/solc/v0.8.6/VRFV2ProxyAdmin/VRFV2ProxyAdmin.bin 402b1103087ffe1aa598854a8f8b38f8cd3de2e3aaa86369e28017a9157f4980 vrfv2_reverting_example: ../../contracts/solc/v0.8.6/VRFV2RevertingExample/VRFV2RevertingExample.abi ../../contracts/solc/v0.8.6/VRFV2RevertingExample/VRFV2RevertingExample.bin 1ae46f80351d428bd85ba58b9041b2a608a1845300d79a8fed83edf96606de87 vrfv2_transparent_upgradeable_proxy: ../../contracts/solc/v0.8.6/VRFV2TransparentUpgradeableProxy/VRFV2TransparentUpgradeableProxy.abi ../../contracts/solc/v0.8.6/VRFV2TransparentUpgradeableProxy/VRFV2TransparentUpgradeableProxy.bin fe1a8e6852fbd06d91f64315c5cede86d340891f5b5cc981fb5b86563f7eac3f @@ -122,9 +123,9 @@ vrfv2_wrapper_consumer_example: ../../contracts/solc/v0.8.6/VRFV2WrapperConsumer vrfv2_wrapper_interface: ../../contracts/solc/v0.8.6/VRFV2WrapperInterface/VRFV2WrapperInterface.abi ../../contracts/solc/v0.8.6/VRFV2WrapperInterface/VRFV2WrapperInterface.bin ff8560169de171a68b360b7438d13863682d07040d984fd0fb096b2379421003 vrfv2_wrapper_load_test_consumer: ../../contracts/solc/v0.8.6/VRFV2WrapperLoadTestConsumer/VRFV2WrapperLoadTestConsumer.abi ../../contracts/solc/v0.8.6/VRFV2WrapperLoadTestConsumer/VRFV2WrapperLoadTestConsumer.bin 664ca7fdf4dd65cc183bc25f20708c4b369c3401bba3ee12797a93bcd70138b6 vrfv2plus_client: ../../contracts/solc/v0.8.6/VRFV2PlusClient/VRFV2PlusClient.abi ../../contracts/solc/v0.8.6/VRFV2PlusClient/VRFV2PlusClient.bin 3ffbfa4971a7e5f46051a26b1722613f265d89ea1867547ecec58500953a9501 -vrfv2plus_consumer_example: ../../contracts/solc/v0.8.6/VRFV2PlusConsumerExample/VRFV2PlusConsumerExample.abi ../../contracts/solc/v0.8.6/VRFV2PlusConsumerExample/VRFV2PlusConsumerExample.bin 2c480a6d7955d33a00690fdd943486d95802e48a03f3cc243df314448e4ddb2c -vrfv2plus_malicious_migrator: ../../contracts/solc/v0.8.6/VRFV2PlusMaliciousMigrator/VRFV2PlusMaliciousMigrator.abi ../../contracts/solc/v0.8.6/VRFV2PlusMaliciousMigrator/VRFV2PlusMaliciousMigrator.bin 80dbc98be5e42246960c889d29488f978d3db0127e95e9b295352c481d8c9b07 -vrfv2plus_reverting_example: ../../contracts/solc/v0.8.6/VRFV2PlusRevertingExample/VRFV2PlusRevertingExample.abi ../../contracts/solc/v0.8.6/VRFV2PlusRevertingExample/VRFV2PlusRevertingExample.bin 6c9053a94f90b8151964d3311310478b57744fbbd153e8ee742ed570e1e49798 -vrfv2plus_wrapper: ../../contracts/solc/v0.8.6/VRFV2PlusWrapper/VRFV2PlusWrapper.abi ../../contracts/solc/v0.8.6/VRFV2PlusWrapper/VRFV2PlusWrapper.bin 934bafba386b934f491827e535306726069f4cafef9125079ea88abf0d808877 -vrfv2plus_wrapper_consumer_example: ../../contracts/solc/v0.8.6/VRFV2PlusWrapperConsumerExample/VRFV2PlusWrapperConsumerExample.abi ../../contracts/solc/v0.8.6/VRFV2PlusWrapperConsumerExample/VRFV2PlusWrapperConsumerExample.bin a14c4c6e2299cd963a8f0ed069e61dd135af5aad4c13a94f6ea7e086eced7191 -vrfv2plus_wrapper_load_test_consumer: ../../contracts/solc/v0.8.6/VRFV2PlusWrapperLoadTestConsumer/VRFV2PlusWrapperLoadTestConsumer.abi ../../contracts/solc/v0.8.6/VRFV2PlusWrapperLoadTestConsumer/VRFV2PlusWrapperLoadTestConsumer.bin 55e3bd534045125fb6579a201ab766185e9b0fac5737b4f37897bb69c9f599fa +vrfv2plus_consumer_example: ../../contracts/solc/v0.8.6/VRFV2PlusConsumerExample/VRFV2PlusConsumerExample.abi ../../contracts/solc/v0.8.6/VRFV2PlusConsumerExample/VRFV2PlusConsumerExample.bin 432de3457ed3635db3dee85fe899d73b4adb365e14271f1b4d014cc511cad707 +vrfv2plus_malicious_migrator: ../../contracts/solc/v0.8.6/VRFV2PlusMaliciousMigrator/VRFV2PlusMaliciousMigrator.abi ../../contracts/solc/v0.8.6/VRFV2PlusMaliciousMigrator/VRFV2PlusMaliciousMigrator.bin 36df34af33acaacca03c646f64686ef8c693fd68299ee1b887cd4537e94fc76d +vrfv2plus_reverting_example: ../../contracts/solc/v0.8.6/VRFV2PlusRevertingExample/VRFV2PlusRevertingExample.abi ../../contracts/solc/v0.8.6/VRFV2PlusRevertingExample/VRFV2PlusRevertingExample.bin 94a4709bfd6080507074636ec32899bd0183d4235445faca696d231ff41043ec +vrfv2plus_wrapper: ../../contracts/solc/v0.8.6/VRFV2PlusWrapper/VRFV2PlusWrapper.abi ../../contracts/solc/v0.8.6/VRFV2PlusWrapper/VRFV2PlusWrapper.bin a3a76ba9160dc8a40c21a88acf1b97d00fa79289281985b2faf4ae2ff37d8342 +vrfv2plus_wrapper_consumer_example: ../../contracts/solc/v0.8.6/VRFV2PlusWrapperConsumerExample/VRFV2PlusWrapperConsumerExample.abi ../../contracts/solc/v0.8.6/VRFV2PlusWrapperConsumerExample/VRFV2PlusWrapperConsumerExample.bin 5429cb0e7e8c0aff85c90da93532e1fd7eee8cc237d7887119d3e7b2684e3457 +vrfv2plus_wrapper_load_test_consumer: ../../contracts/solc/v0.8.6/VRFV2PlusWrapperLoadTestConsumer/VRFV2PlusWrapperLoadTestConsumer.abi ../../contracts/solc/v0.8.6/VRFV2PlusWrapperLoadTestConsumer/VRFV2PlusWrapperLoadTestConsumer.bin 83918ead0055fb924221071a569b209a67c052a8a3f2c49216d902d77da6e673 diff --git a/core/gethwrappers/go_generate.go b/core/gethwrappers/go_generate.go index 2744f14c003..52957905e11 100644 --- a/core/gethwrappers/go_generate.go +++ b/core/gethwrappers/go_generate.go @@ -56,23 +56,25 @@ package gethwrappers //go:generate go run ./generation/generate/wrap.go ../../contracts/solc/v0.8.16/KeeperRegistryLogicB2_1/KeeperRegistryLogicB2_1.abi ../../contracts/solc/v0.8.16/KeeperRegistryLogicB2_1/KeeperRegistryLogicB2_1.bin KeeperRegistryLogicB keeper_registry_logic_b_wrapper_2_1 //go:generate go run ./generation/generate/wrap.go ../../contracts/solc/v0.8.16/IKeeperRegistryMaster/IKeeperRegistryMaster.abi ../../contracts/solc/v0.8.16/IKeeperRegistryMaster/IKeeperRegistryMaster.bin IKeeperRegistryMaster i_keeper_registry_master_wrapper_2_1 //go:generate go run ./generation/generate/wrap.go ../../contracts/solc/v0.8.16/AutomationUtils2_1/AutomationUtils2_1.abi ../../contracts/solc/v0.8.16/AutomationUtils2_1/AutomationUtils2_1.bin AutomationUtils automation_utils_2_1 -//go:generate go run ./generation/generate/wrap.go ../../contracts/solc/v0.8.19/AutomationRegistrar2_2/AutomationRegistrar2_2.abi ../../contracts/solc/v0.8.19/AutomationRegistrar2_2/AutomationRegistrar2_2.bin AutomationRegistrar automation_registrar_wrapper2_2 //go:generate go run ./generation/generate/wrap.go ../../contracts/solc/v0.8.19/AutomationRegistry2_2/AutomationRegistry2_2.abi ../../contracts/solc/v0.8.19/AutomationRegistry2_2/AutomationRegistry2_2.bin AutomationRegistry automation_registry_wrapper_2_2 //go:generate go run ./generation/generate/wrap.go ../../contracts/solc/v0.8.19/AutomationRegistryLogicA2_2/AutomationRegistryLogicA2_2.abi ../../contracts/solc/v0.8.19/AutomationRegistryLogicA2_2/AutomationRegistryLogicA2_2.bin AutomationRegistryLogicA automation_registry_logic_a_wrapper_2_2 //go:generate go run ./generation/generate/wrap.go ../../contracts/solc/v0.8.19/AutomationRegistryLogicB2_2/AutomationRegistryLogicB2_2.abi ../../contracts/solc/v0.8.19/AutomationRegistryLogicB2_2/AutomationRegistryLogicB2_2.bin AutomationRegistryLogicB automation_registry_logic_b_wrapper_2_2 //go:generate go run ./generation/generate/wrap.go ../../contracts/solc/v0.8.19/IAutomationRegistryMaster/IAutomationRegistryMaster.abi ../../contracts/solc/v0.8.19/IAutomationRegistryMaster/IAutomationRegistryMaster.bin IAutomationRegistryMaster i_automation_registry_master_wrapper_2_2 +//go:generate go run ./generation/generate/wrap.go ../../contracts/solc/v0.8.19/AutomationCompatibleUtils/AutomationCompatibleUtils.abi ../../contracts/solc/v0.8.19/AutomationCompatibleUtils/AutomationCompatibleUtils.bin AutomationCompatibleUtils automation_compatible_utils //go:generate go run ./generation/generate/wrap.go ../../contracts/solc/v0.8.19/AutomationUtils2_2/AutomationUtils2_2.abi ../../contracts/solc/v0.8.19/AutomationUtils2_2/AutomationUtils2_2.bin AutomationUtils automation_utils_2_2 //go:generate go run ./generation/generate/wrap.go ../../contracts/solc/v0.8.19/AutomationRegistrar2_3/AutomationRegistrar2_3.abi ../../contracts/solc/v0.8.19/AutomationRegistrar2_3/AutomationRegistrar2_3.bin AutomationRegistrar automation_registrar_wrapper2_3 //go:generate go run ./generation/generate/wrap.go ../../contracts/solc/v0.8.19/AutomationRegistry2_3/AutomationRegistry2_3.abi ../../contracts/solc/v0.8.19/AutomationRegistry2_3/AutomationRegistry2_3.bin AutomationRegistry automation_registry_wrapper_2_3 //go:generate go run ./generation/generate/wrap.go ../../contracts/solc/v0.8.19/AutomationRegistryLogicA2_3/AutomationRegistryLogicA2_3.abi ../../contracts/solc/v0.8.19/AutomationRegistryLogicA2_3/AutomationRegistryLogicA2_3.bin AutomationRegistryLogicA automation_registry_logic_a_wrapper_2_3 //go:generate go run ./generation/generate/wrap.go ../../contracts/solc/v0.8.19/AutomationRegistryLogicB2_3/AutomationRegistryLogicB2_3.abi ../../contracts/solc/v0.8.19/AutomationRegistryLogicB2_3/AutomationRegistryLogicB2_3.bin AutomationRegistryLogicB automation_registry_logic_b_wrapper_2_3 -//go:generate go run ./generation/generate/wrap.go ../../contracts/solc/v0.8.19/IAutomationRegistryMaster2_3/IAutomationRegistryMaster.abi ../../contracts/solc/v0.8.19/IAutomationRegistryMaster2_3/IAutomationRegistryMaster.bin IAutomationRegistryMaster i_automation_registry_master_wrapper_2_3 +//go:generate go run ./generation/generate/wrap.go ../../contracts/solc/v0.8.19/IAutomationRegistryMaster2_3/IAutomationRegistryMaster2_3.abi ../../contracts/solc/v0.8.19/IAutomationRegistryMaster2_3/IAutomationRegistryMaster2_3.bin IAutomationRegistryMaster2_3 i_automation_registry_master_wrapper_2_3 //go:generate go run ./generation/generate/wrap.go ../../contracts/solc/v0.8.19/AutomationUtils2_3/AutomationUtils2_3.abi ../../contracts/solc/v0.8.19/AutomationUtils2_3/AutomationUtils2_3.bin AutomationUtils automation_utils_2_3 //go:generate go run ./generation/generate/wrap.go ../../contracts/solc/v0.8.19/ArbitrumModule/ArbitrumModule.abi ../../contracts/solc/v0.8.19/ArbitrumModule/ArbitrumModule.bin ArbitrumModule arbitrum_module //go:generate go run ./generation/generate/wrap.go ../../contracts/solc/v0.8.19/ChainModuleBase/ChainModuleBase.abi ../../contracts/solc/v0.8.19/ChainModuleBase/ChainModuleBase.bin ChainModuleBase chain_module_base //go:generate go run ./generation/generate/wrap.go ../../contracts/solc/v0.8.19/OptimismModule/OptimismModule.abi ../../contracts/solc/v0.8.19/OptimismModule/OptimismModule.bin OptimismModule optimism_module //go:generate go run ./generation/generate/wrap.go ../../contracts/solc/v0.8.19/ScrollModule/ScrollModule.abi ../../contracts/solc/v0.8.19/ScrollModule/ScrollModule.bin ScrollModule scroll_module //go:generate go run ./generation/generate/wrap.go ../../contracts/solc/v0.8.19/IChainModule/IChainModule.abi ../../contracts/solc/v0.8.19/IChainModule/IChainModule.bin IChainModule i_chain_module +//go:generate go run ./generation/generate/wrap.go ../../contracts/solc/v0.8.19/IAutomationV21PlusCommon/IAutomationV21PlusCommon.abi ../../contracts/solc/v0.8.19/IAutomationV21PlusCommon/IAutomationV21PlusCommon.bin IAutomationV21PlusCommon i_automation_v21_plus_common + //go:generate go run ./generation/generate/wrap.go ../../contracts/solc/v0.8.16/ILogAutomation/ILogAutomation.abi ../../contracts/solc/v0.8.16/ILogAutomation/ILogAutomation.bin ILogAutomation i_log_automation //go:generate go run ./generation/generate/wrap.go ../../contracts/solc/v0.8.16/AutomationForwarderLogic/AutomationForwarderLogic.abi ../../contracts/solc/v0.8.16/AutomationForwarderLogic/AutomationForwarderLogic.bin AutomationForwarderLogic automation_forwarder_logic //go:generate go run ./generation/generate/wrap.go ../../contracts/solc/v0.8.6/LogUpkeepCounter/LogUpkeepCounter.abi ../../contracts/solc/v0.8.6/LogUpkeepCounter/LogUpkeepCounter.bin LogUpkeepCounter log_upkeep_counter_wrapper diff --git a/core/internal/cltest/cltest.go b/core/internal/cltest/cltest.go index 08766d64c8b..b121b0b0494 100644 --- a/core/internal/cltest/cltest.go +++ b/core/internal/cltest/cltest.go @@ -363,6 +363,7 @@ func NewApplicationWithConfig(t testing.TB, cfg chainlink.GeneralConfig, flagsAn ChainOpts: legacyevm.ChainOpts{ AppConfig: cfg, MailMon: mailMon, + SqlxDB: db, DB: db, }, CSAETHKeystore: keyStore, @@ -418,6 +419,7 @@ func NewApplicationWithConfig(t testing.TB, cfg chainlink.GeneralConfig, flagsAn Config: cfg, MailMon: mailMon, SqlxDB: db, + DB: db, KeyStore: keyStore, RelayerChainInteroperators: relayChainInterops, Logger: lggr, @@ -469,7 +471,7 @@ func NewEthMocksWithStartupAssertions(t testing.TB) *evmclimocks.Client { c.On("Dial", mock.Anything).Maybe().Return(nil) c.On("SubscribeNewHead", mock.Anything, mock.Anything).Maybe().Return(EmptyMockSubscription(t), nil) c.On("SendTransaction", mock.Anything, mock.Anything).Maybe().Return(nil) - c.On("HeadByNumber", mock.Anything, (*big.Int)(nil)).Maybe().Return(Head(0), nil) + c.On("HeadByNumber", mock.Anything, mock.Anything).Maybe().Return(Head(0), nil) c.On("ConfiguredChainID").Maybe().Return(&FixtureChainID) c.On("CallContract", mock.Anything, mock.Anything, mock.Anything).Maybe().Return([]byte{}, nil) c.On("SubscribeFilterLogs", mock.Anything, mock.Anything, mock.Anything).Maybe().Return(nil, errors.New("mocked")) @@ -497,6 +499,7 @@ func NewEthMocksWithTransactionsOnBlocksAssertions(t testing.TB) *evmclimocks.Cl h1 := HeadWithHash(1, h2.ParentHash) h0 := HeadWithHash(0, h1.ParentHash) c.On("HeadByNumber", mock.Anything, (*big.Int)(nil)).Maybe().Return(h2, nil) + c.On("HeadByNumber", mock.Anything, big.NewInt(0)).Maybe().Return(h0, nil) // finalized block c.On("HeadByHash", mock.Anything, h1.Hash).Maybe().Return(h1, nil) c.On("HeadByHash", mock.Anything, h0.Hash).Maybe().Return(h0, nil) c.On("BatchCallContext", mock.Anything, mock.Anything).Maybe().Return(nil).Run(func(args mock.Arguments) { diff --git a/core/internal/cltest/factories.go b/core/internal/cltest/factories.go index 2649cc47c6c..1d715d349ac 100644 --- a/core/internal/cltest/factories.go +++ b/core/internal/cltest/factories.go @@ -23,6 +23,7 @@ import ( "github.com/jmoiron/sqlx" + "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" txmgrcommon "github.com/smartcontractkit/chainlink/v2/common/txmgr" txmgrtypes "github.com/smartcontractkit/chainlink/v2/common/txmgr/types" "github.com/smartcontractkit/chainlink/v2/core/auth" @@ -48,9 +49,9 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/utils" ) -func NewEIP55Address() ethkey.EIP55Address { +func NewEIP55Address() evmtypes.EIP55Address { a := testutils.NewAddress() - e, err := ethkey.NewEIP55Address(a.Hex()) + e, err := evmtypes.NewEIP55Address(a.Hex()) if err != nil { panic(err) } @@ -142,7 +143,7 @@ func NewEthTx(fromAddress common.Address) txmgr.Tx { ToAddress: testutils.NewAddress(), EncodedPayload: []byte{1, 2, 3}, Value: big.Int(assets.NewEthValue(142)), - FeeLimit: uint32(1000000000), + FeeLimit: uint64(1000000000), State: txmgrcommon.TxUnstarted, } } @@ -314,9 +315,9 @@ func MustGenerateRandomKeyState(_ testing.TB) ethkey.State { return ethkey.State{Address: NewEIP55Address()} } -func MustInsertHead(t *testing.T, db *sqlx.DB, cfg pg.QConfig, number int64) evmtypes.Head { +func MustInsertHead(t *testing.T, db sqlutil.DataSource, number int64) evmtypes.Head { h := evmtypes.NewHead(big.NewInt(number), evmutils.NewHash(), evmutils.NewHash(), 0, ubig.New(&FixtureChainID)) - horm := headtracker.NewORM(db, logger.TestLogger(t), cfg, FixtureChainID) + horm := headtracker.NewORM(FixtureChainID, db) err := horm.IdempotentInsertHead(testutils.Context(t), &h) require.NoError(t, err) @@ -326,7 +327,7 @@ func MustInsertHead(t *testing.T, db *sqlx.DB, cfg pg.QConfig, number int64) evm func MustInsertV2JobSpec(t *testing.T, db *sqlx.DB, transmitterAddress common.Address) job.Job { t.Helper() - addr, err := ethkey.NewEIP55Address(transmitterAddress.Hex()) + addr, err := evmtypes.NewEIP55Address(transmitterAddress.Hex()) require.NoError(t, err) pipelineSpec := pipeline.Spec{} @@ -350,7 +351,7 @@ func MustInsertV2JobSpec(t *testing.T, db *sqlx.DB, transmitterAddress common.Ad return jb } -func MustInsertOffchainreportingOracleSpec(t *testing.T, db *sqlx.DB, transmitterAddress ethkey.EIP55Address) job.OCROracleSpec { +func MustInsertOffchainreportingOracleSpec(t *testing.T, db *sqlx.DB, transmitterAddress evmtypes.EIP55Address) job.OCROracleSpec { t.Helper() ocrKeyID := models.MustSha256HashFromHex(DefaultOCRKeyBundleID) @@ -375,7 +376,7 @@ func MakeDirectRequestJobSpec(t *testing.T) *job.Job { return spec } -func MustInsertKeeperJob(t *testing.T, db *sqlx.DB, korm keeper.ORM, from ethkey.EIP55Address, contract ethkey.EIP55Address) job.Job { +func MustInsertKeeperJob(t *testing.T, db *sqlx.DB, korm keeper.ORM, from evmtypes.EIP55Address, contract evmtypes.EIP55Address) job.Job { t.Helper() var keeperSpec job.KeeperSpec @@ -420,7 +421,7 @@ func MustInsertKeeperRegistry(t *testing.T, db *sqlx.DB, korm keeper.ORM, ethKey JobID: job.ID, KeeperIndex: keeperIndex, NumKeepers: numKeepers, - KeeperIndexMap: map[ethkey.EIP55Address]int32{ + KeeperIndexMap: map[evmtypes.EIP55Address]int32{ from: keeperIndex, }, } diff --git a/core/internal/cltest/job_factories.go b/core/internal/cltest/job_factories.go index 399e71ff216..4b2ea66f22d 100644 --- a/core/internal/cltest/job_factories.go +++ b/core/internal/cltest/job_factories.go @@ -10,10 +10,10 @@ import ( "github.com/jmoiron/sqlx" "github.com/smartcontractkit/chainlink/v2/core/bridges" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/configtest" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/job" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ethkey" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/p2pkey" "github.com/smartcontractkit/chainlink/v2/core/services/pipeline" ) @@ -38,7 +38,7 @@ const ( ` ) -func MinimalOCRNonBootstrapSpec(contractAddress, transmitterAddress ethkey.EIP55Address, peerID p2pkey.PeerID, keyBundleID string) string { +func MinimalOCRNonBootstrapSpec(contractAddress, transmitterAddress types.EIP55Address, peerID p2pkey.PeerID, keyBundleID string) string { return fmt.Sprintf(minimalOCRNonBootstrapTemplate, contractAddress, peerID, transmitterAddress.Hex(), keyBundleID) } diff --git a/core/internal/features/features_test.go b/core/internal/features/features_test.go index d94452f2512..cd231450650 100644 --- a/core/internal/features/features_test.go +++ b/core/internal/features/features_test.go @@ -64,7 +64,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/chainlink" "github.com/smartcontractkit/chainlink/v2/core/services/job" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ethkey" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/keystest" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ocrkey" "github.com/smartcontractkit/chainlink/v2/core/services/ocr" @@ -774,9 +773,9 @@ func setupForwarderEnabledNode(t *testing.T, owner *bind.TransactOpts, portV2 in b.Commit() // add forwarder address to be tracked in db - forwarderORM := forwarders.NewORM(app.GetSqlxDB(), logger.TestLogger(t), config.Database()) + forwarderORM := forwarders.NewORM(app.GetDB()) chainID := ubig.Big(*b.Blockchain().Config().ChainID) - _, err = forwarderORM.CreateForwarder(forwarder, chainID) + _, err = forwarderORM.CreateForwarder(testutils.Context(t), forwarder, chainID) require.NoError(t, err) return app, p2pKey.PeerID().Raw(), transmitter, forwarder, key @@ -815,7 +814,7 @@ func TestIntegration_OCR(t *testing.T) { ports := freeport.GetN(t, numOracles) for i := 0; i < numOracles; i++ { app, peerID, transmitter, key := setupNode(t, owner, ports[i], b, func(c *chainlink.Config, s *chainlink.Secrets) { - c.EVM[0].FlagsContractAddress = ptr(ethkey.EIP55AddressFromAddress(flagsContractAddress)) + c.EVM[0].FlagsContractAddress = ptr(evmtypes.EIP55AddressFromAddress(flagsContractAddress)) c.EVM[0].GasEstimator.EIP1559DynamicFees = ptr(test.eip1559) c.P2P.V2.DefaultBootstrappers = &[]ocrcommontypes.BootstrapperLocator{ @@ -1036,7 +1035,7 @@ func TestIntegration_OCR_ForwarderFlow(t *testing.T) { for i := 0; i < numOracles; i++ { app, peerID, transmitter, forwarder, key := setupForwarderEnabledNode(t, owner, ports[i], b, func(c *chainlink.Config, s *chainlink.Secrets) { c.Feature.LogPoller = ptr(true) - c.EVM[0].FlagsContractAddress = ptr(ethkey.EIP55AddressFromAddress(flagsContractAddress)) + c.EVM[0].FlagsContractAddress = ptr(evmtypes.EIP55AddressFromAddress(flagsContractAddress)) c.EVM[0].GasEstimator.EIP1559DynamicFees = ptr(true) c.P2P.V2.DefaultBootstrappers = &[]ocrcommontypes.BootstrapperLocator{ {PeerID: bootstrapPeerID, Addrs: []string{fmt.Sprintf("127.0.0.1:%d", bootstrapNodePortV2)}}, @@ -1334,7 +1333,7 @@ func TestIntegration_BlockHistoryEstimator(t *testing.T) { estimator := chain.GasEstimator() gasPrice, gasLimit, err := estimator.GetFee(testutils.Context(t), nil, 500_000, maxGasPrice) require.NoError(t, err) - assert.Equal(t, uint32(500000), gasLimit) + assert.Equal(t, uint64(500000), gasLimit) assert.Equal(t, "41.5 gwei", gasPrice.Legacy.String()) assert.Equal(t, initialDefaultGasPrice, chain.Config().EVM().GasEstimator().PriceDefault().Int64()) // unchanged diff --git a/core/internal/features/ocr2/features_ocr2_test.go b/core/internal/features/ocr2/features_ocr2_test.go index 72d70720c65..ce0f3087187 100644 --- a/core/internal/features/ocr2/features_ocr2_test.go +++ b/core/internal/features/ocr2/features_ocr2_test.go @@ -171,9 +171,9 @@ func setupNodeOCR2( b.Commit() // add forwarder address to be tracked in db - forwarderORM := forwarders.NewORM(app.GetSqlxDB(), logger.TestLogger(t), config.Database()) + forwarderORM := forwarders.NewORM(app.GetDB()) chainID := ubig.Big(*b.Blockchain().Config().ChainID) - _, err2 = forwarderORM.CreateForwarder(faddr, chainID) + _, err2 = forwarderORM.CreateForwarder(testutils.Context(t), faddr, chainID) require.NoError(t, err2) effectiveTransmitter = faddr @@ -591,7 +591,7 @@ juelsPerFeeCoinCacheDuration = "1m" contractABI, err2 := abi.JSON(strings.NewReader(ocr2aggregator.OCR2AggregatorABI)) require.NoError(t, err2) apps[0].GetRelayers().LegacyEVMChains().Slice() - ct, err2 := evm.NewOCRContractTransmitter(ocrContractAddress, apps[0].GetRelayers().LegacyEVMChains().Slice()[0].Client(), contractABI, nil, apps[0].GetRelayers().LegacyEVMChains().Slice()[0].LogPoller(), lggr, nil) + ct, err2 := evm.NewOCRContractTransmitter(testutils.Context(t), ocrContractAddress, apps[0].GetRelayers().LegacyEVMChains().Slice()[0].Client(), contractABI, nil, apps[0].GetRelayers().LegacyEVMChains().Slice()[0].LogPoller(), lggr, nil) require.NoError(t, err2) configDigest, epoch, err2 := ct.LatestConfigDigestAndEpoch(testutils.Context(t)) require.NoError(t, err2) @@ -902,7 +902,7 @@ juelsPerFeeCoinCacheDuration = "1m" // Assert we can read the latest config digest and epoch after a report has been submitted. contractABI, err := abi.JSON(strings.NewReader(ocr2aggregator.OCR2AggregatorABI)) require.NoError(t, err) - ct, err := evm.NewOCRContractTransmitter(ocrContractAddress, apps[0].GetRelayers().LegacyEVMChains().Slice()[0].Client(), contractABI, nil, apps[0].GetRelayers().LegacyEVMChains().Slice()[0].LogPoller(), lggr, nil) + ct, err := evm.NewOCRContractTransmitter(testutils.Context(t), ocrContractAddress, apps[0].GetRelayers().LegacyEVMChains().Slice()[0].Client(), contractABI, nil, apps[0].GetRelayers().LegacyEVMChains().Slice()[0].LogPoller(), lggr, nil) require.NoError(t, err) configDigest, epoch, err := ct.LatestConfigDigestAndEpoch(testutils.Context(t)) require.NoError(t, err) diff --git a/core/internal/mocks/application.go b/core/internal/mocks/application.go index 20874e4b60e..98d4e8809e0 100644 --- a/core/internal/mocks/application.go +++ b/core/internal/mocks/application.go @@ -31,6 +31,8 @@ import ( sessions "github.com/smartcontractkit/chainlink/v2/core/sessions" + sqlutil "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" + sqlx "github.com/jmoiron/sqlx" txmgr "github.com/smartcontractkit/chainlink/v2/core/chains/evm/txmgr" @@ -205,6 +207,26 @@ func (_m *Application) GetConfig() chainlink.GeneralConfig { return r0 } +// GetDB provides a mock function with given fields: +func (_m *Application) GetDB() sqlutil.DataSource { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetDB") + } + + var r0 sqlutil.DataSource + if rf, ok := ret.Get(0).(func() sqlutil.DataSource); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(sqlutil.DataSource) + } + } + + return r0 +} + // GetExternalInitiatorManager provides a mock function with given fields: func (_m *Application) GetExternalInitiatorManager() webhook.ExternalInitiatorManager { ret := _m.Called() diff --git a/core/internal/testutils/configtest/general_config.go b/core/internal/testutils/configtest/general_config.go index c79b1c7c3cb..5ba3bf1724f 100644 --- a/core/internal/testutils/configtest/general_config.go +++ b/core/internal/testutils/configtest/general_config.go @@ -56,6 +56,7 @@ func overrides(c *chainlink.Config, s *chainlink.Secrets) { c.Database.DefaultLockTimeout = commonconfig.MustNewDuration(1 * time.Minute) c.JobPipeline.ReaperInterval = commonconfig.MustNewDuration(0) + c.JobPipeline.VerboseLogging = ptr(true) c.P2P.V2.Enabled = ptr(false) diff --git a/core/internal/testutils/evmtest/evmtest.go b/core/internal/testutils/evmtest/evmtest.go index cc56c3c9e9b..83c356bf1a3 100644 --- a/core/internal/testutils/evmtest/evmtest.go +++ b/core/internal/testutils/evmtest/evmtest.go @@ -89,6 +89,7 @@ func NewChainRelayExtOpts(t testing.TB, testopts TestChainOpts) legacyevm.ChainR AppConfig: testopts.GeneralConfig, MailMon: testopts.MailMon, GasEstimator: testopts.GasEstimator, + SqlxDB: testopts.DB, DB: testopts.DB, }, } diff --git a/core/scripts/chaincli/handler/debug.go b/core/scripts/chaincli/handler/debug.go index 183cafc9d37..b16932c14b9 100644 --- a/core/scripts/chaincli/handler/debug.go +++ b/core/scripts/chaincli/handler/debug.go @@ -30,8 +30,8 @@ import ( "github.com/smartcontractkit/chainlink/core/scripts/chaincli/config" "github.com/smartcontractkit/chainlink/core/scripts/common" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/automation_utils_2_1" - iregistry21 "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/i_keeper_registry_master_wrapper_2_1" + ac "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/automation_compatible_utils" + autov2common "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/i_automation_v21_plus_common" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/core" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/encoding" @@ -75,13 +75,13 @@ func (k *Keeper) Debug(ctx context.Context, args []string) { // connect to registry contract registryAddress := gethcommon.HexToAddress(k.cfg.RegistryAddress) - keeperRegistry21, err := iregistry21.NewIKeeperRegistryMaster(registryAddress, k.client) + v2common, err := autov2common.NewIAutomationV21PlusCommon(registryAddress, k.client) if err != nil { failUnknown("failed to connect to the registry contract", err) } // verify contract is correct - typeAndVersion, err := keeperRegistry21.TypeAndVersion(latestCallOpts) + typeAndVersion, err := v2common.TypeAndVersion(latestCallOpts) if err != nil { failCheckConfig("failed to get typeAndVersion: make sure your registry contract address and archive node are valid", err) } @@ -100,14 +100,14 @@ func (k *Keeper) Debug(ctx context.Context, args []string) { } // get trigger type, trigger type is immutable after its first setup - triggerType, err := keeperRegistry21.GetTriggerType(latestCallOpts, upkeepID) + triggerType, err := v2common.GetTriggerType(latestCallOpts, upkeepID) if err != nil { failUnknown("failed to get trigger type: ", err) } // local state for pipeline results - var upkeepInfo iregistry21.KeeperRegistryBase21UpkeepInfo - var checkResult iregistry21.CheckUpkeep + var upkeepInfo autov2common.IAutomationV21PlusCommonUpkeepInfoLegacy + var checkResult autov2common.CheckUpkeep var blockNum uint64 var performData []byte var workID [32]byte @@ -132,17 +132,17 @@ func (k *Keeper) Debug(ctx context.Context, args []string) { } // do basic checks - upkeepInfo = getUpkeepInfoAndRunBasicChecks(keeperRegistry21, triggerCallOpts, upkeepID, chainID) + upkeepInfo = getUpkeepInfoAndRunBasicChecks(v2common, triggerCallOpts, upkeepID, chainID) - var tmpCheckResult iregistry21.CheckUpkeep0 - tmpCheckResult, err = keeperRegistry21.CheckUpkeep0(triggerCallOpts, upkeepID) + var tmpCheckResult autov2common.CheckUpkeep0 + tmpCheckResult, err = v2common.CheckUpkeep0(triggerCallOpts, upkeepID) if err != nil { failUnknown("failed to check upkeep: ", err) } - checkResult = iregistry21.CheckUpkeep(tmpCheckResult) + checkResult = autov2common.CheckUpkeep(tmpCheckResult) // do tenderly simulation var rawCall []byte - rawCall, err = core.RegistryABI.Pack("checkUpkeep", upkeepID, []byte{}) + rawCall, err = core.AutoV2CommonABI.Pack("checkUpkeep", upkeepID, []byte{}) if err != nil { failUnknown("failed to pack raw checkUpkeep call", err) } @@ -196,7 +196,7 @@ func (k *Keeper) Debug(ctx context.Context, args []string) { message(fmt.Sprintf("workID computed: %s", hex.EncodeToString(workID[:]))) var hasKey bool - hasKey, err = keeperRegistry21.HasDedupKey(latestCallOpts, workID) + hasKey, err = v2common.HasDedupKey(latestCallOpts, workID) if err != nil { failUnknown("failed to check if upkeep was already performed: ", err) } @@ -206,14 +206,14 @@ func (k *Keeper) Debug(ctx context.Context, args []string) { triggerCallOpts = &bind.CallOpts{Context: ctx, BlockNumber: big.NewInt(receipt.BlockNumber.Int64())} // do basic checks - upkeepInfo = getUpkeepInfoAndRunBasicChecks(keeperRegistry21, triggerCallOpts, upkeepID, chainID) + upkeepInfo = getUpkeepInfoAndRunBasicChecks(v2common, triggerCallOpts, upkeepID, chainID) var rawTriggerConfig []byte - rawTriggerConfig, err = keeperRegistry21.GetUpkeepTriggerConfig(triggerCallOpts, upkeepID) + rawTriggerConfig, err = v2common.GetUpkeepTriggerConfig(triggerCallOpts, upkeepID) if err != nil { failUnknown("failed to fetch trigger config for upkeep", err) } - var triggerConfig automation_utils_2_1.LogTriggerConfig + var triggerConfig ac.IAutomationV21PlusCommonLogTriggerConfig triggerConfig, err = packer.UnpackLogTriggerConfig(rawTriggerConfig) if err != nil { failUnknown("failed to unpack trigger config", err) @@ -234,13 +234,13 @@ func (k *Keeper) Debug(ctx context.Context, args []string) { if err != nil { failUnknown("failed to pack trigger data", err) } - checkResult, err = keeperRegistry21.CheckUpkeep(triggerCallOpts, upkeepID, triggerData) + checkResult, err = v2common.CheckUpkeep(triggerCallOpts, upkeepID, triggerData) if err != nil { failUnknown("failed to check upkeep", err) } // do tenderly simulations var rawCall []byte - rawCall, err = core.RegistryABI.Pack("checkUpkeep", upkeepID, triggerData) + rawCall, err = core.AutoV2CommonABI.Pack("checkUpkeep", upkeepID, triggerData) if err != nil { failUnknown("failed to pack raw checkUpkeep call", err) } @@ -262,7 +262,7 @@ func (k *Keeper) Debug(ctx context.Context, args []string) { mercuryConfig := evm21.NewMercuryConfig(mc, core.StreamsCompatibleABI) lggr, _ := logger.NewLogger() blockSub := &blockSubscriber{k.client} - streams := streams.NewStreamsLookup(mercuryConfig, blockSub, k.rpcClient, keeperRegistry21, lggr) + streams := streams.NewStreamsLookup(mercuryConfig, blockSub, k.rpcClient, v2common, lggr) var streamsLookupErr *mercury.StreamsLookupError streamsLookupErr, err = mercuryPacker.DecodeStreamsLookupRequest(checkResult.PerformData) @@ -333,7 +333,7 @@ func (k *Keeper) Debug(ctx context.Context, args []string) { upkeepNeeded, performData = checkResults[0].Eligible, checkResults[0].PerformData // do tenderly simulations for checkCallback var rawCall []byte - rawCall, err = core.RegistryABI.Pack("checkCallback", upkeepID, values, streamsLookup.ExtraData) + rawCall, err = core.AutoV2CommonABI.Pack("checkCallback", upkeepID, values, streamsLookup.ExtraData) if err != nil { failUnknown("failed to pack raw checkCallback call", err) } @@ -351,13 +351,13 @@ func (k *Keeper) Debug(ctx context.Context, args []string) { resolveIneligible("upkeep is not needed") } // simulate perform upkeep - simulateResult, err := keeperRegistry21.SimulatePerformUpkeep(triggerCallOpts, upkeepID, performData) + simulateResult, err := v2common.SimulatePerformUpkeep(triggerCallOpts, upkeepID, performData) if err != nil { failUnknown("failed to simulate perform upkeep: ", err) } // do tenderly simulation - rawCall, err := core.RegistryABI.Pack("simulatePerformUpkeep", upkeepID, performData) + rawCall, err := core.AutoV2CommonABI.Pack("simulatePerformUpkeep", upkeepID, performData) if err != nil { failUnknown("failed to pack raw simulatePerformUpkeep call", err) } @@ -380,7 +380,7 @@ func (k *Keeper) Debug(ctx context.Context, args []string) { } } -func getUpkeepInfoAndRunBasicChecks(keeperRegistry21 *iregistry21.IKeeperRegistryMaster, callOpts *bind.CallOpts, upkeepID *big.Int, chainID int64) iregistry21.KeeperRegistryBase21UpkeepInfo { +func getUpkeepInfoAndRunBasicChecks(keeperRegistry21 *autov2common.IAutomationV21PlusCommon, callOpts *bind.CallOpts, upkeepID *big.Int, chainID int64) autov2common.IAutomationV21PlusCommonUpkeepInfoLegacy { // get upkeep info upkeepInfo, err := keeperRegistry21.GetUpkeep(callOpts, upkeepID) if err != nil { @@ -436,7 +436,7 @@ func getCheckUpkeepFailureReason(reasonIndex uint8) string { return fmt.Sprintf("Unknown : %d", reasonIndex) } -func mustAutomationCheckResult(upkeepID *big.Int, checkResult iregistry21.CheckUpkeep, trigger ocr2keepers.Trigger) ocr2keepers.CheckResult { +func mustAutomationCheckResult(upkeepID *big.Int, checkResult autov2common.CheckUpkeep, trigger ocr2keepers.Trigger) ocr2keepers.CheckResult { upkeepIdentifier := mustUpkeepIdentifier(upkeepID) checkResult2 := ocr2keepers.CheckResult{ Eligible: checkResult.UpkeepNeeded, @@ -469,7 +469,7 @@ func (bs *blockSubscriber) LatestBlock() *ocr2keepers.BlockKey { } } -func logMatchesTriggerConfig(log *types.Log, config automation_utils_2_1.LogTriggerConfig) bool { +func logMatchesTriggerConfig(log *types.Log, config ac.IAutomationV21PlusCommonLogTriggerConfig) bool { if log.Topics[0] != config.Topic0 { return false } @@ -490,7 +490,7 @@ func packTriggerData(log *types.Log, blockTime uint64) ([]byte, error) { for _, topic := range log.Topics { topics = append(topics, topic) } - b, err := core.UtilsABI.Methods["_log"].Inputs.Pack(&automation_utils_2_1.Log{ + b, err := core.CompatibleUtilsABI.Methods["_log"].Inputs.Pack(&ac.Log{ Index: big.NewInt(int64(log.Index)), Timestamp: big.NewInt(int64(blockTime)), TxHash: log.TxHash, diff --git a/core/scripts/chaincli/handler/keeper_deployer.go b/core/scripts/chaincli/handler/keeper_deployer.go index 118cbbb0ff9..9e5a791d6c4 100644 --- a/core/scripts/chaincli/handler/keeper_deployer.go +++ b/core/scripts/chaincli/handler/keeper_deployer.go @@ -339,7 +339,7 @@ func (d *v21KeeperDeployer) SetKeepers(ctx context.Context, opts *bind.TransactO transmitters = append(transmitters, common.HexToAddress(string(transmitter))) } - onchainConfig := iregistry21.KeeperRegistryBase21OnchainConfig{ + onchainConfig := iregistry21.IAutomationV21PlusCommonOnchainConfigLegacy{ PaymentPremiumPPB: d.cfg.PaymentPremiumPBB, FlatFeeMicroLink: d.cfg.FlatFeeMicroLink, CheckGasLimit: d.cfg.CheckGasLimit, diff --git a/core/scripts/chaincli/handler/keeper_upkeep_events.go b/core/scripts/chaincli/handler/keeper_upkeep_events.go index d63badb6f61..9625eaea67a 100644 --- a/core/scripts/chaincli/handler/keeper_upkeep_events.go +++ b/core/scripts/chaincli/handler/keeper_upkeep_events.go @@ -48,14 +48,14 @@ func (k *Keeper) UpkeepCounterEvents(ctx context.Context, hexAddr string, fromBl for upkeepIterator.Next() { fmt.Printf("%s,%s,%s,%s,%s\n", upkeepIterator.Event.From, - upkeepIterator.Event.InitialBlock, - upkeepIterator.Event.LastBlock, + upkeepIterator.Event.InitialTimestamp, + upkeepIterator.Event.LastTimestamp, upkeepIterator.Event.PreviousBlock, upkeepIterator.Event.Counter, ) row = []string{upkeepIterator.Event.From.String(), - upkeepIterator.Event.InitialBlock.String(), - upkeepIterator.Event.LastBlock.String(), + upkeepIterator.Event.InitialTimestamp.String(), + upkeepIterator.Event.LastTimestamp.String(), upkeepIterator.Event.PreviousBlock.String(), upkeepIterator.Event.Counter.String()} if err = w.Write(row); err != nil { diff --git a/core/scripts/go.mod b/core/scripts/go.mod index 39560095094..ae2a41ae3d8 100644 --- a/core/scripts/go.mod +++ b/core/scripts/go.mod @@ -18,15 +18,16 @@ require ( github.com/montanaflynn/stats v0.7.1 github.com/olekukonko/tablewriter v0.0.5 github.com/pelletier/go-toml/v2 v2.1.1 + github.com/prometheus/client_golang v1.17.0 github.com/shopspring/decimal v1.3.1 - github.com/smartcontractkit/chainlink-automation v1.0.2-0.20240118014648-1ab6a88c9429 - github.com/smartcontractkit/chainlink-common v0.1.7-0.20240227191958-d13aad8b4d61 + github.com/smartcontractkit/chainlink-automation v1.0.2-0.20240311111125-22812a072c35 + github.com/smartcontractkit/chainlink-common v0.1.7-0.20240314172156-049609b8e1f9 github.com/smartcontractkit/chainlink-vrf v0.0.0-20231120191722-fef03814f868 github.com/smartcontractkit/chainlink/v2 v2.0.0-00010101000000-000000000000 github.com/smartcontractkit/libocr v0.0.0-20240229181116-bfb2432a7a66 github.com/spf13/cobra v1.6.1 github.com/spf13/viper v1.15.0 - github.com/stretchr/testify v1.8.4 + github.com/stretchr/testify v1.9.0 github.com/umbracle/ethgo v0.1.3 github.com/umbracle/fastrlp v0.0.0-20220527094140-59d5dd30e722 github.com/urfave/cli v1.22.14 @@ -130,7 +131,7 @@ require ( github.com/go-kit/log v0.2.1 // indirect github.com/go-ldap/ldap/v3 v3.4.6 // indirect github.com/go-logfmt/logfmt v0.6.0 // indirect - github.com/go-logr/logr v1.3.0 // indirect + github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.2.6 // indirect github.com/go-playground/locales v0.14.1 // indirect @@ -156,8 +157,8 @@ require ( github.com/gorilla/securecookie v1.1.2 // indirect github.com/gorilla/sessions v1.2.2 // indirect github.com/gorilla/websocket v1.5.1 // indirect - github.com/grafana/pyroscope-go v1.0.4 // indirect - github.com/grafana/pyroscope-go/godeltaprof v0.1.4 // indirect + github.com/grafana/pyroscope-go v1.1.1 // indirect + github.com/grafana/pyroscope-go/godeltaprof v0.1.6 // indirect github.com/graph-gophers/dataloader v5.0.0+incompatible // indirect github.com/graph-gophers/graphql-go v1.3.0 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect @@ -169,10 +170,12 @@ require ( github.com/gtank/merlin v0.1.1 // indirect github.com/gtank/ristretto255 v0.1.2 // indirect github.com/hashicorp/consul/sdk v0.14.1 // indirect + github.com/hashicorp/go-cleanhttp v0.5.2 // indirect github.com/hashicorp/go-envparse v0.1.0 // indirect github.com/hashicorp/go-hclog v1.5.0 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect github.com/hashicorp/go-plugin v1.6.0 // indirect + github.com/hashicorp/go-retryablehttp v0.7.5 // indirect github.com/hashicorp/golang-lru v0.6.0 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/hashicorp/yamux v0.1.1 // indirect @@ -194,7 +197,7 @@ require ( github.com/jmhodges/levigo v1.0.0 // indirect github.com/jpillora/backoff v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/klauspost/compress v1.17.2 // indirect + github.com/klauspost/compress v1.17.3 // indirect github.com/klauspost/cpuid/v2 v2.2.5 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect @@ -231,7 +234,6 @@ require ( github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect github.com/pressly/goose/v3 v3.16.0 // indirect - github.com/prometheus/client_golang v1.17.0 // indirect github.com/prometheus/client_model v0.5.0 // indirect github.com/prometheus/common v0.45.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect @@ -288,14 +290,14 @@ require ( go.dedis.ch/fixbuf v1.0.3 // indirect go.etcd.io/bbolt v1.3.7 // indirect go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin v0.46.1 // 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 - go.opentelemetry.io/otel v1.21.0 // indirect + go.opentelemetry.io/otel v1.24.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0 // indirect - go.opentelemetry.io/otel/metric v1.21.0 // indirect + go.opentelemetry.io/otel/metric v1.24.0 // indirect go.opentelemetry.io/otel/sdk v1.21.0 // indirect - go.opentelemetry.io/otel/trace v1.21.0 // indirect + go.opentelemetry.io/otel/trace v1.24.0 // indirect go.opentelemetry.io/proto/otlp v1.0.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/ratelimit v0.3.0 // indirect diff --git a/core/scripts/go.sum b/core/scripts/go.sum index 424cd7b5939..b5c0fc172ce 100644 --- a/core/scripts/go.sum +++ b/core/scripts/go.sum @@ -484,8 +484,8 @@ github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4= github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= -github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= +github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= @@ -658,10 +658,10 @@ github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/ad github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.1 h1:gmztn0JnHVt9JZquRuzLw3g4wouNVzKL15iLr/zn/QY= github.com/gorilla/websocket v1.5.1/go.mod h1:x3kM2JMyaluk02fnUJpQuwD2dCS5NDG2ZHL0uE0tcaY= -github.com/grafana/pyroscope-go v1.0.4 h1:oyQX0BOkL+iARXzHuCdIF5TQ7/sRSel1YFViMHC7Bm0= -github.com/grafana/pyroscope-go v1.0.4/go.mod h1:0d7ftwSMBV/Awm7CCiYmHQEG8Y44Ma3YSjt+nWcWztY= -github.com/grafana/pyroscope-go/godeltaprof v0.1.4 h1:mDsJ3ngul7UfrHibGQpV66PbZ3q1T8glz/tK3bQKKEk= -github.com/grafana/pyroscope-go/godeltaprof v0.1.4/go.mod h1:1HSPtjU8vLG0jE9JrTdzjgFqdJ/VgN7fvxBNq3luJko= +github.com/grafana/pyroscope-go v1.1.1 h1:PQoUU9oWtO3ve/fgIiklYuGilvsm8qaGhlY4Vw6MAcQ= +github.com/grafana/pyroscope-go v1.1.1/go.mod h1:Mw26jU7jsL/KStNSGGuuVYdUq7Qghem5P8aXYXSXG88= +github.com/grafana/pyroscope-go/godeltaprof v0.1.6 h1:nEdZ8louGAplSvIJi1HVp7kWvFvdiiYg3COLlTwJiFo= +github.com/grafana/pyroscope-go/godeltaprof v0.1.6/go.mod h1:Tk376Nbldo4Cha9RgiU7ik8WKFkNpfds98aUzS8omLE= github.com/graph-gophers/dataloader v5.0.0+incompatible h1:R+yjsbrNq1Mo3aPG+Z/EKYrXrXXUNJHOgbRt+U6jOug= github.com/graph-gophers/dataloader v5.0.0+incompatible/go.mod h1:jk4jk0c5ZISbKaMe8WsVopGB5/15GvGHMdMdPtwlRp4= github.com/graph-gophers/graphql-go v1.3.0 h1:Eb9x/q6MFpCLz7jBCiP/WTxjSDrYLR1QY41SORZyNJ0= @@ -701,6 +701,7 @@ github.com/hashicorp/go-envparse v0.1.0 h1:bE++6bhIsNCPLvgDZkYqo3nA+/PFI51pkrHdm github.com/hashicorp/go-envparse v0.1.0/go.mod h1:OHheN1GoygLlAkTlXLXvAdnXdZxy8JUweQ1rAXx1xnc= github.com/hashicorp/go-getter v1.7.1 h1:SWiSWN/42qdpR0MdhaOc/bLR48PLuP1ZQtYLRlM69uY= github.com/hashicorp/go-getter v1.7.1/go.mod h1:W7TalhMmbPmsSMdNjD0ZskARur/9GJ17cfHTRtXV744= +github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= github.com/hashicorp/go-hclog v1.5.0 h1:bI2ocEMgcVlz55Oj1xZNBsVi900c7II+fWDyV9o+13c= github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= @@ -709,6 +710,8 @@ github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjh github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= +github.com/hashicorp/go-retryablehttp v0.7.5 h1:bJj+Pj19UZMIweq/iie+1u5YCdGrnxCT9yvm0e+Nd5M= +github.com/hashicorp/go-retryablehttp v0.7.5/go.mod h1:Jy/gPYAdjqffZ/yFGCFV2doI5wjtH1ewM9u8iYVjtX8= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= github.com/hashicorp/go-safetemp v1.0.0 h1:2HR189eFNrjHQyENnQMMpCiBAsRxzbTMIgBhEyExpmo= github.com/hashicorp/go-safetemp v1.0.0/go.mod h1:oaerMy3BhqiTbVye6QuFhFtIceqFoDHxNAB65b+Rj1I= @@ -868,8 +871,8 @@ github.com/klauspost/compress v1.9.7/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0 github.com/klauspost/compress v1.11.4/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= -github.com/klauspost/compress v1.17.2 h1:RlWWUY/Dr4fL8qk9YG7DTZ7PDgME2V4csBXA8L/ixi4= -github.com/klauspost/compress v1.17.2/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/compress v1.17.3 h1:qkRjuerhUU1EmXLYGkSH6EZL+vPSxIrYjLNAK4slzwA= +github.com/klauspost/compress v1.17.3/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM= github.com/klauspost/cpuid v1.2.1/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.2.5 h1:0E5MSMDEoAulmXNFquVs//DdoomxaoTY1kUhbc/qbZg= @@ -1172,10 +1175,10 @@ github.com/smartcontractkit/caigo v0.0.0-20230621050857-b29a4ca8c704 h1:T3lFWumv github.com/smartcontractkit/caigo v0.0.0-20230621050857-b29a4ca8c704/go.mod h1:2QuJdEouTWjh5BDy5o/vgGXQtR4Gz8yH1IYB5eT7u4M= github.com/smartcontractkit/chain-selectors v1.0.10 h1:t9kJeE6B6G+hKD0GYR4kGJSCqR1LNS7aI3jT0V+xGrg= github.com/smartcontractkit/chain-selectors v1.0.10/go.mod h1:d4Hi+E1zqjy9HqMkjBE5q1vcG9VGgxf5VxiRHfzi2kE= -github.com/smartcontractkit/chainlink-automation v1.0.2-0.20240118014648-1ab6a88c9429 h1:xkejUBZhcBpBrTSfxc91Iwzadrb6SXw8ks69bHIQ9Ww= -github.com/smartcontractkit/chainlink-automation v1.0.2-0.20240118014648-1ab6a88c9429/go.mod h1:wJmVvDf4XSjsahWtfUq3wvIAYEAuhr7oxmxYnEL/LGQ= -github.com/smartcontractkit/chainlink-common v0.1.7-0.20240227191958-d13aad8b4d61 h1:5aer8Pkw3XlXLjcPzWozy3RAbYQjVjpruxDeQENcVMw= -github.com/smartcontractkit/chainlink-common v0.1.7-0.20240227191958-d13aad8b4d61/go.mod h1:6aXWSEQawX2oZXcPPOdxnEGufAhj7PqPKolXf6ijRGA= +github.com/smartcontractkit/chainlink-automation v1.0.2-0.20240311111125-22812a072c35 h1:GNhRKD3izyzAoGMXDvVUAwEuzz4Atdj3U3RH7eak5Is= +github.com/smartcontractkit/chainlink-automation v1.0.2-0.20240311111125-22812a072c35/go.mod h1:2I0dWdYdK6jHPnSYYy7Y7Xp7L0YTnJ3KZtkhLQflsTU= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20240314172156-049609b8e1f9 h1:rlvE17wHiSnrl2d42TWQ2VVx8ho8c9vgznysXj68sRU= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20240314172156-049609b8e1f9/go.mod h1:/bJGelrpXvCcDCuaIgt91UN4B9YxZdK1O7VX5lzbysI= github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240213120401-01a23955f9f8 h1:I326nw5GwHQHsLKHwtu5Sb9EBLylC8CfUd7BFAS0jtg= github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240213120401-01a23955f9f8/go.mod h1:a65NtrK4xZb01mf0dDNghPkN2wXgcqFQ55ADthVBgMc= github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540 h1:xFSv8561jsLtF6gYZr/zW2z5qUUAkcFkApin2mnbYTo= @@ -1233,8 +1236,9 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= @@ -1246,8 +1250,9 @@ github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1F github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8= github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= @@ -1374,26 +1379,26 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin v0.46.1 h1:mMv2jG58h6ZI5t5S9QCVGdzCmAsTakMa3oxVgpSD44g= -go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin v0.46.1/go.mod h1:oqRuNKG0upTaDPbLVCG8AD0G2ETrfDtmh7jViy7ox6M= +go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin v0.49.0 h1:1f31+6grJmV3X4lxcEvUy13i5/kfDw1nJZwhd8mA4tg= +go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin v0.49.0/go.mod h1:1P/02zM3OwkX9uki+Wmxw3a5GVb6KUXRsa7m7bOC9Fg= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.1 h1:SpGay3w+nEwMpfVnbqOLH5gY52/foP8RE8UzTZ1pdSE= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.1/go.mod h1:4UoMYEZOC0yN/sPGH76KPkkU7zgiEWYWL9vwmbnTJPE= -go.opentelemetry.io/contrib/propagators/b3 v1.21.1 h1:WPYiUgmw3+b7b3sQ1bFBFAf0q+Di9dvNc3AtYfnT4RQ= -go.opentelemetry.io/contrib/propagators/b3 v1.21.1/go.mod h1:EmzokPoSqsYMBVK4nRnhsfm5mbn8J1eDuz/U1UaQaWg= -go.opentelemetry.io/otel v1.21.0 h1:hzLeKBZEL7Okw2mGzZ0cc4k/A7Fta0uoPgaJCr8fsFc= -go.opentelemetry.io/otel v1.21.0/go.mod h1:QZzNPQPm1zLX4gZK4cMi+71eaorMSGT3A4znnUvNNEo= +go.opentelemetry.io/contrib/propagators/b3 v1.24.0 h1:n4xwCdTx3pZqZs2CjS/CUZAs03y3dZcGhC/FepKtEUY= +go.opentelemetry.io/contrib/propagators/b3 v1.24.0/go.mod h1:k5wRxKRU2uXx2F8uNJ4TaonuEO/V7/5xoz7kdsDACT8= +go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= +go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0 h1:cl5P5/GIfFh4t6xyruOgJP5QiA1pw4fYYdv6nc6CBWw= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0/go.mod h1:zgBdWWAu7oEEMC06MMKc5NLbA/1YDXV1sMpSqEeLQLg= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0 h1:tIqheXEFWAZ7O8A7m+J0aPTmpJN3YQ7qetUAdkkkKpk= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0/go.mod h1:nUeKExfxAQVbiVFn32YXpXZZHZ61Cc3s3Rn1pDBGAb0= -go.opentelemetry.io/otel/metric v1.21.0 h1:tlYWfeo+Bocx5kLEloTjbcDwBuELRrIFxwdQ36PlJu4= -go.opentelemetry.io/otel/metric v1.21.0/go.mod h1:o1p3CA8nNHW8j5yuQLdc1eeqEaPfzug24uvsyIEJRWM= +go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= +go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= go.opentelemetry.io/otel/sdk v1.21.0 h1:FTt8qirL1EysG6sTQRZ5TokkU8d0ugCj8htOgThZXQ8= go.opentelemetry.io/otel/sdk v1.21.0/go.mod h1:Nna6Yv7PWTdgJHVRD9hIYywQBRx7pbox6nwBnZIxl/E= go.opentelemetry.io/otel/sdk/metric v1.21.0 h1:smhI5oD714d6jHE6Tie36fPx4WDFIg+Y6RfAY4ICcR0= go.opentelemetry.io/otel/sdk/metric v1.21.0/go.mod h1:FJ8RAsoPGv/wYMgBdUJXOm+6pzFY3YdljnXtv1SBE8Q= -go.opentelemetry.io/otel/trace v1.21.0 h1:WD9i5gzvoUPuXIXH24ZNBudiarZDKuekPqi/E8fpfLc= -go.opentelemetry.io/otel/trace v1.21.0/go.mod h1:LGbsEB0f9LGjN+OZaQQ26sohbOmiMR+BaslueVtS/qQ= +go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= +go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I= go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= diff --git a/core/scripts/p2ptoys/common/config.go b/core/scripts/p2ptoys/common/config.go new file mode 100644 index 00000000000..cc5934383eb --- /dev/null +++ b/core/scripts/p2ptoys/common/config.go @@ -0,0 +1,91 @@ +package common + +import ( + "crypto/ed25519" + "encoding/hex" + "encoding/json" + "fmt" + "os" + + "github.com/smartcontractkit/libocr/commontypes" + ragep2ptypes "github.com/smartcontractkit/libocr/ragep2p/types" +) + +type Config struct { + Nodes []string `json:"nodes"` + Bootstrappers []string `json:"bootstrappers"` + + // parsed values below + NodeKeys []ed25519.PrivateKey + NodePeerIDs []ragep2ptypes.PeerID + NodePeerIDsStr []string + + BootstrapperKeys []ed25519.PrivateKey + BootstrapperPeerInfos []ragep2ptypes.PeerInfo + BootstrapperLocators []commontypes.BootstrapperLocator +} + +const ( + // bootstrappers will listen on 127.0.0.1 ports 9000, 9001, 9002, etc. + BootstrapStartPort = 9000 + + // nodes will listen on 127.0.0.1 ports 8000, 8001, 8002, etc. + NodeStartPort = 8000 +) + +func ParseConfigFromFile(fileName string) (*Config, error) { + rawConfig, err := os.ReadFile(fileName) + if err != nil { + return nil, err + } + var config Config + err = json.Unmarshal(rawConfig, &config) + if err != nil { + return nil, err + } + + for _, hexKey := range config.Nodes { + key, peerID, err := parseKey(hexKey) + if err != nil { + return nil, err + } + config.NodeKeys = append(config.NodeKeys, key) + config.NodePeerIDs = append(config.NodePeerIDs, peerID) + config.NodePeerIDsStr = append(config.NodePeerIDsStr, peerID.String()) + } + + for _, hexKey := range config.Bootstrappers { + key, peerID, err := parseKey(hexKey) + if err != nil { + return nil, err + } + config.BootstrapperKeys = append(config.BootstrapperKeys, key) + config.BootstrapperPeerInfos = append(config.BootstrapperPeerInfos, ragep2ptypes.PeerInfo{ID: peerID}) + } + + locators := []commontypes.BootstrapperLocator{} + for id, peerID := range config.BootstrapperPeerInfos { + addr := fmt.Sprintf("127.0.0.1:%d", BootstrapStartPort+id) + locators = append(locators, commontypes.BootstrapperLocator{ + PeerID: peerID.ID.String(), + Addrs: []string{addr}, + }) + config.BootstrapperPeerInfos[id].Addrs = []ragep2ptypes.Address{ragep2ptypes.Address(addr)} + } + config.BootstrapperLocators = locators + + return &config, nil +} + +func parseKey(hexKey string) (ed25519.PrivateKey, ragep2ptypes.PeerID, error) { + b, err := hex.DecodeString(hexKey) + if err != nil { + return nil, ragep2ptypes.PeerID{}, err + } + key := ed25519.PrivateKey(b) + peerID, err := ragep2ptypes.PeerIDFromPrivateKey(key) + if err != nil { + return nil, ragep2ptypes.PeerID{}, err + } + return key, peerID, nil +} diff --git a/core/scripts/p2ptoys/keygen/gen_keys.go b/core/scripts/p2ptoys/keygen/gen_keys.go new file mode 100644 index 00000000000..bcee4a1bad0 --- /dev/null +++ b/core/scripts/p2ptoys/keygen/gen_keys.go @@ -0,0 +1,37 @@ +package main + +import ( + "crypto/ed25519" + "crypto/rand" + "encoding/hex" + "flag" + + "github.com/smartcontractkit/chainlink/v2/core/logger" + + ragep2ptypes "github.com/smartcontractkit/libocr/ragep2p/types" +) + +func main() { + lggr, _ := logger.NewLogger() + + n := flag.Int("n", 1, "how many key pairs to generate") + flag.Parse() + + for i := 0; i < *n; i++ { + pubKey, privKey, err := ed25519.GenerateKey(rand.Reader) + if err != nil { + lggr.Error("error generating key pair ", err) + return + } + lggr.Info("key pair ", i, ":") + lggr.Info("public key ", hex.EncodeToString(pubKey)) + lggr.Info("private key ", hex.EncodeToString(privKey)) + + peerID, err := ragep2ptypes.PeerIDFromPrivateKey(privKey) + if err != nil { + lggr.Error("error generating peer ID ", err) + return + } + lggr.Info("peer ID ", peerID.String()) + } +} diff --git a/core/scripts/p2ptoys/run.go b/core/scripts/p2ptoys/run.go new file mode 100644 index 00000000000..3d0a54f60bf --- /dev/null +++ b/core/scripts/p2ptoys/run.go @@ -0,0 +1,159 @@ +package main + +import ( + "context" + "crypto/ed25519" + "flag" + "fmt" + "os" + "os/signal" + "sync" + "time" + + "github.com/prometheus/client_golang/prometheus" + + "github.com/smartcontractkit/chainlink/core/scripts/p2ptoys/common" + "github.com/smartcontractkit/chainlink/v2/core/logger" + "github.com/smartcontractkit/chainlink/v2/core/services/p2p" + + "github.com/smartcontractkit/libocr/ragep2p" + ragetypes "github.com/smartcontractkit/libocr/ragep2p/types" + + p2ptypes "github.com/smartcontractkit/chainlink/v2/core/services/p2p/types" +) + +/* +Usage: + + go run run.go --bootstrap + go run run.go --index 0 + go run run.go --index 1 + +Observe nodes 0 and 1 discovering each other via the bootstrapper and exchanging messages. +*/ +func main() { + lggr, _ := logger.NewLogger() + ctx, _ := signal.NotifyContext(context.Background(), os.Interrupt) + var shutdownWaitGroup sync.WaitGroup + + configFile := flag.String("config", "test_keys.json", "Path to JSON config file") + nodeIndex := flag.Int("index", 0, "Index of the key in the config file to use") + isBootstrap := flag.Bool("bootstrap", false, "Whether to run as a bootstrapper or not") + flag.Parse() + config, err := common.ParseConfigFromFile(*configFile) + if err != nil { + lggr.Error("error parsing config ", err) + return + } + + // Select this node's private key and listen address from config. + var privateKey ed25519.PrivateKey + var peerIDs []ragetypes.PeerID + var listenAddr string + if *isBootstrap { + privateKey = config.BootstrapperKeys[*nodeIndex] + listenAddr = fmt.Sprintf("127.0.0.1:%d", common.BootstrapStartPort+*nodeIndex) + } else { + privateKey = config.NodeKeys[*nodeIndex] + listenAddr = fmt.Sprintf("127.0.0.1:%d", common.NodeStartPort+*nodeIndex) + } + for _, key := range config.NodeKeys { + peerID, _ := ragetypes.PeerIDFromPrivateKey(key) + peerIDs = append(peerIDs, peerID) + } + + reg := prometheus.NewRegistry() + peerConfig := p2p.PeerConfig{ + PrivateKey: privateKey, + ListenAddresses: []string{listenAddr}, + Bootstrappers: config.BootstrapperPeerInfos, + + DeltaReconcile: time.Second * 5, + DeltaDial: time.Second * 5, + DiscovererDatabase: p2p.NewInMemoryDiscovererDatabase(), + MetricsRegisterer: reg, + } + + peer, err := p2p.NewPeer(peerConfig, lggr) + if err != nil { + lggr.Error("error creating peer:", err) + return + } + err = peer.Start(ctx) + if err != nil { + lggr.Error("error starting peer:", err) + return + } + + peers := make(map[ragetypes.PeerID]p2ptypes.StreamConfig) + for _, peerID := range peerIDs { + peers[peerID] = p2ptypes.StreamConfig{ + IncomingMessageBufferSize: 1000000, + OutgoingMessageBufferSize: 1000000, + MaxMessageLenBytes: 100000, + MessageRateLimiter: ragep2p.TokenBucketParams{ + Rate: 2.0, + Capacity: 10, + }, + BytesRateLimiter: ragep2p.TokenBucketParams{ + Rate: 100000.0, + Capacity: 100000, + }, + } + } + + err = peer.UpdateConnections(peers) + if err != nil { + lggr.Errorw("error updating peer addresses", "error", err) + } + + if !*isBootstrap { + shutdownWaitGroup.Add(2) + go sendLoop(ctx, &shutdownWaitGroup, peer, peerIDs, *nodeIndex, lggr) + go recvLoop(ctx, &shutdownWaitGroup, peer.Receive(), lggr) + } + + <-ctx.Done() + err = peer.Close() + if err != nil { + lggr.Error("error closing peer:", err) + } + shutdownWaitGroup.Wait() +} + +func sendLoop(ctx context.Context, shutdownWaitGroup *sync.WaitGroup, peer p2ptypes.Peer, peerIDs []ragetypes.PeerID, myId int, lggr logger.Logger) { + defer shutdownWaitGroup.Done() + ticker := time.NewTicker(2 * time.Second) + defer ticker.Stop() + lastId := 0 + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if lastId != myId { + lggr.Infow("sending message", "receiver", peerIDs[lastId]) + err := peer.Send(peerIDs[lastId], []byte("hello!")) + if err != nil { + lggr.Errorw("error sending message", "receiver", peerIDs[lastId], "error", err) + } + } + lastId++ + if lastId >= len(peerIDs) { + lastId = 0 + } + } + } +} + +func recvLoop(ctx context.Context, shutdownWaitGroup *sync.WaitGroup, chRecv <-chan p2ptypes.Message, lggr logger.Logger) { + defer shutdownWaitGroup.Done() + for { + select { + case <-ctx.Done(): + return + case msg := <-chRecv: + lggr.Info("received message from ", msg.Sender, " : ", string(msg.Payload)) + } + } +} diff --git a/core/scripts/p2ptoys/test_keys.json b/core/scripts/p2ptoys/test_keys.json new file mode 100644 index 00000000000..1cb34734e7a --- /dev/null +++ b/core/scripts/p2ptoys/test_keys.json @@ -0,0 +1,11 @@ +{ + "bootstrappers": [ + "105fe90c7b474b9be25e87cce8cd25956bb888215cd8028d6da28a933c8b4124d838facdbdb2e3a2e3e79848b04c3c15815593c2c13ad229eb26a91cd565ab55" + ], + "nodes": [ + "5f45bf580bb7697f1dd23062444d5692fa0f5e60306e6782b172206aed292abf29c9f9b13bf79e30677cb701fab3140ab5a87d0d0d2dc75de500551de60e5e57", + "bc3d7c6479b44e7ce0377e07d5d456ec0089f77e89d2bdd8eaf98fdc602144dd28ff68e88c565ea4034eb09748ac042ec631c78b4d5db7509c8c54d63bb5550c", + "010fbc8ab7c425f80b7dcfab1b41f6e79ddf27168edb88f423eec624119bca7c99605c48f83f799ecb9abaab8630866867aca20cb8fb9e5518d12a7980ec8e0b", + "12b059c77f7d9367b380d778d45ac8a5dfc8a1737769a868e9e2bc1962eb690e3be9fe624419eb71183707abae4dd30ae56f269b010d98a360850673b51e9488" + ] +} \ No newline at end of file diff --git a/core/scripts/vrfv2plus/testnet/main.go b/core/scripts/vrfv2plus/testnet/main.go index d0fba011dab..7788dc56063 100644 --- a/core/scripts/vrfv2plus/testnet/main.go +++ b/core/scripts/vrfv2plus/testnet/main.go @@ -1079,6 +1079,20 @@ func main() { helpers.PanicErr(err) helpers.ConfirmTXMined(context.Background(), e.Ec, tx, e.ChainID, "transfer ownership to", *newOwner) + case "public-key-x-y": + publicKeyXY := flag.NewFlagSet("public-key-x-y", flag.ExitOnError) + uncompressedPubKeyCLI := publicKeyXY.String("pubkey", "", "uncompressed pubkey") + helpers.ParseArgs(publicKeyXY, os.Args[2:], "pubkey") + uncompressedPubKey := *uncompressedPubKeyCLI + // Put key in ECDSA format + if strings.HasPrefix(uncompressedPubKey, "0x") { + uncompressedPubKey = strings.Replace(uncompressedPubKey, "0x", "04", 1) + } + pubBytes, err := hex.DecodeString(uncompressedPubKey) + helpers.PanicErr(err) + pk, err := crypto.UnmarshalPubkey(pubBytes) + helpers.PanicErr(err) + fmt.Printf("PublicKey: %s, X: %s, Y: %s\n", *uncompressedPubKeyCLI, pk.X, pk.Y) case "coordinator-reregister-proving-key": coordinatorReregisterKey := flag.NewFlagSet("coordinator-register-key", flag.ExitOnError) coordinatorAddress := coordinatorReregisterKey.String("coordinator-address", "", "coordinator address") @@ -1147,7 +1161,7 @@ func main() { helpers.PanicErr(err) balance, err := link.BalanceOf(nil, common.HexToAddress(*wrapperAddress)) helpers.PanicErr(err) - tx, err := wrapper.Withdraw(e.Owner, common.HexToAddress(*recipientAddress), balance) + tx, err := wrapper.Withdraw(e.Owner, common.HexToAddress(*recipientAddress)) helpers.PanicErr(err) helpers.ConfirmTXMined(context.Background(), e.Ec, tx, e.ChainID, "withdrawing", balance.String(), "Juels from", *wrapperAddress, "to", *recipientAddress) case "wrapper-get-subscription-id": @@ -1164,26 +1178,29 @@ func main() { 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") - wrapperPremiumPercentage := cmd.Uint("wrapper-premium-percentage", 25, "gas premium charged by wrapper") + 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") keyHash := cmd.String("key-hash", "", "the keyhash that wrapper requests should use") maxNumWords := cmd.Uint("max-num-words", 10, "the keyhash that wrapper requests should use") fallbackWeiPerUnitLink := cmd.String("fallback-wei-per-unit-link", "", "the fallback wei per unit link") stalenessSeconds := cmd.Uint("staleness-seconds", 86400, "the number of seconds of staleness to allow") - fulfillmentFlatFeeLinkPPM := cmd.Uint("fulfillment-flat-fee-link-ppm", 500, "the link flat fee in ppm to charge for fulfillment") - fulfillmentFlatFeeNativePPM := cmd.Uint("fulfillment-flat-fee-native-ppm", 500, "the native flat fee in ppm to charge for fulfillment") + fulfillmentFlatFeeNativePPM := cmd.Uint("fulfillment-flat-fee-native-ppm", 500, "the native flat fee in ppm to charge for fulfillment denominated in native") + fulfillmentFlatFeeLinkDiscountPPM := cmd.Uint("fulfillment-flat-fee-link-discount-ppm", 500, "the link flat fee discount in ppm to charge for fulfillment denominated in native") helpers.ParseArgs(cmd, os.Args[2:], "wrapper-address", "key-hash", "fallback-wei-per-unit-link") v2plusscripts.WrapperConfigure(e, common.HexToAddress(*wrapperAddress), *wrapperGasOverhead, *coordinatorGasOverhead, - *wrapperPremiumPercentage, + *wrapperNativePremiumPercentage, + *wrapperLinkPremiumPercentage, *keyHash, *maxNumWords, decimal.RequireFromString(*fallbackWeiPerUnitLink).BigInt(), uint32(*stalenessSeconds), - uint32(*fulfillmentFlatFeeLinkPPM), - uint32(*fulfillmentFlatFeeNativePPM)) + uint32(*fulfillmentFlatFeeNativePPM), + uint32(*fulfillmentFlatFeeLinkDiscountPPM)) + case "wrapper-get-fulfillment-tx-size": cmd := flag.NewFlagSet("wrapper-get-fulfillment-tx-size", flag.ExitOnError) wrapperAddress := cmd.String("wrapper-address", "", "address of the VRFV2Wrapper contract") diff --git a/core/scripts/vrfv2plus/testnet/proofs.go b/core/scripts/vrfv2plus/testnet/proofs.go index 306d237caf4..ef35fd3e0ec 100644 --- a/core/scripts/vrfv2plus/testnet/proofs.go +++ b/core/scripts/vrfv2plus/testnet/proofs.go @@ -49,7 +49,7 @@ var rcTemplate = `{ callbackGasLimit: %d, numWords: %d, sender: %s, - nativePayment: %t + extraArgs: %s } ` diff --git a/core/scripts/vrfv2plus/testnet/v2plusscripts/super_scripts.go b/core/scripts/vrfv2plus/testnet/v2plusscripts/super_scripts.go index 12c08dd80a3..1f9d2f5c763 100644 --- a/core/scripts/vrfv2plus/testnet/v2plusscripts/super_scripts.go +++ b/core/scripts/vrfv2plus/testnet/v2plusscripts/super_scripts.go @@ -869,15 +869,16 @@ func DeployWrapperUniverse(e helpers.Environment) { coordinatorAddress := cmd.String("coordinator-address", "", "address of the vrf coordinator v2 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") - wrapperPremiumPercentage := cmd.Uint("wrapper-premium-percentage", 25, "gas premium charged by wrapper") + 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") keyHash := cmd.String("key-hash", "", "the keyhash that wrapper requests should use") maxNumWords := cmd.Uint("max-num-words", 10, "the keyhash that wrapper requests should use") subFunding := cmd.String("sub-funding", "10000000000000000000", "amount to fund the subscription with") consumerFunding := cmd.String("consumer-funding", "10000000000000000000", "amount to fund the consumer with") fallbackWeiPerUnitLink := cmd.String("fallback-wei-per-unit-link", "", "the fallback wei per unit link") stalenessSeconds := cmd.Uint("staleness-seconds", 86400, "the number of seconds of staleness to allow") - fulfillmentFlatFeeLinkPPM := cmd.Uint("fulfillment-flat-fee-link-ppm", 500, "the link flat fee in ppm to charge for fulfillment") - fulfillmentFlatFeeNativePPM := cmd.Uint("fulfillment-flat-fee-native-ppm", 500, "the native flat fee in ppm to charge for fulfillment") + fulfillmentFlatFeeNativePPM := cmd.Uint("fulfillment-flat-fee-native-ppm", 500, "the native flat fee in ppm to charge for fulfillment denominated in native") + fulfillmentFlatFeeLinkDiscountPPM := cmd.Uint("fulfillment-flat-fee-link-discount-ppm", 500, "the link flat fee discount in ppm to charge for fulfillment denominated in native") helpers.ParseArgs(cmd, os.Args[2:], "link-address", "link-eth-feed", "coordinator-address", "key-hash", "fallback-wei-per-unit-link") amount, s := big.NewInt(0).SetString(*subFunding, 10) @@ -894,13 +895,14 @@ func DeployWrapperUniverse(e helpers.Environment) { wrapper, *wrapperGasOverhead, *coordinatorGasOverhead, - *wrapperPremiumPercentage, + *wrapperNativePremiumPercentage, + *wrapperLinkPremiumPercentage, *keyHash, *maxNumWords, decimal.RequireFromString(*fallbackWeiPerUnitLink).BigInt(), uint32(*stalenessSeconds), - uint32(*fulfillmentFlatFeeLinkPPM), uint32(*fulfillmentFlatFeeNativePPM), + uint32(*fulfillmentFlatFeeLinkDiscountPPM), ) consumer := WrapperConsumerDeploy(e, diff --git a/core/scripts/vrfv2plus/testnet/v2plusscripts/util.go b/core/scripts/vrfv2plus/testnet/v2plusscripts/util.go index 716e0058ff4..3d0ec77b557 100644 --- a/core/scripts/vrfv2plus/testnet/v2plusscripts/util.go +++ b/core/scripts/vrfv2plus/testnet/v2plusscripts/util.go @@ -224,13 +224,14 @@ func WrapperDeploy( func WrapperConfigure( e helpers.Environment, wrapperAddress common.Address, - wrapperGasOverhead, coordinatorGasOverhead, premiumPercentage uint, + wrapperGasOverhead, coordinatorGasOverhead uint, + nativePremiumPercentage, linkPremiumPercentage uint, keyHash string, maxNumWords uint, fallbackWeiPerUnitLink *big.Int, stalenessSeconds uint32, - fulfillmentFlatFeeLinkPPM uint32, fulfillmentFlatFeeNativePPM uint32, + fulfillmentFlatFeeLinkDiscountPPM uint32, ) { wrapper, err := vrfv2plus_wrapper.NewVRFV2PlusWrapper(wrapperAddress, e.Ec) helpers.PanicErr(err) @@ -239,13 +240,14 @@ func WrapperConfigure( e.Owner, uint32(wrapperGasOverhead), uint32(coordinatorGasOverhead), - uint8(premiumPercentage), + uint8(nativePremiumPercentage), + uint8(linkPremiumPercentage), common.HexToHash(keyHash), uint8(maxNumWords), stalenessSeconds, fallbackWeiPerUnitLink, - fulfillmentFlatFeeLinkPPM, fulfillmentFlatFeeNativePPM, + fulfillmentFlatFeeLinkDiscountPPM, ) helpers.PanicErr(err) @@ -257,7 +259,6 @@ func WrapperConsumerDeploy( link, wrapper common.Address, ) common.Address { address, tx, _, err := vrfv2plus_wrapper_consumer_example.DeployVRFV2PlusWrapperConsumerExample(e.Owner, e.Ec, - link, wrapper) helpers.PanicErr(err) diff --git a/core/services/blockhashstore/batch_bhs.go b/core/services/blockhashstore/batch_bhs.go index d8381ff6231..58b4467f50c 100644 --- a/core/services/blockhashstore/batch_bhs.go +++ b/core/services/blockhashstore/batch_bhs.go @@ -11,14 +11,14 @@ 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/evm/types" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/batch_blockhash_store" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/keystore" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ethkey" ) type batchBHSConfig interface { - LimitDefault() uint32 + LimitDefault() uint64 } type BatchBlockhashStore struct { @@ -31,7 +31,7 @@ type BatchBlockhashStore struct { func NewBatchBHS( config batchBHSConfig, - fromAddresses []ethkey.EIP55Address, + fromAddresses []types.EIP55Address, txm txmgr.TxManager, batchbhs batch_blockhash_store.BatchBlockhashStoreInterface, chainID *big.Int, diff --git a/core/services/blockhashstore/bhs.go b/core/services/blockhashstore/bhs.go index 0ca91c682e7..d4dd52c5661 100644 --- a/core/services/blockhashstore/bhs.go +++ b/core/services/blockhashstore/bhs.go @@ -16,16 +16,16 @@ 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/evm/types" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/blockhash_store" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/trusted_blockhash_store" "github.com/smartcontractkit/chainlink/v2/core/services/keystore" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ethkey" ) var _ BHS = &BulletproofBHS{} type bpBHSConfig interface { - LimitDefault() uint32 + LimitDefault() uint64 } type bpBHSDatabaseConfig interface { @@ -38,7 +38,7 @@ type BulletproofBHS struct { config bpBHSConfig dbConfig bpBHSDatabaseConfig jobID uuid.UUID - fromAddresses []ethkey.EIP55Address + fromAddresses []types.EIP55Address txm txmgr.TxManager abi *abi.ABI trustedAbi *abi.ABI @@ -52,7 +52,7 @@ type BulletproofBHS struct { func NewBulletproofBHS( config bpBHSConfig, dbConfig bpBHSDatabaseConfig, - fromAddresses []ethkey.EIP55Address, + fromAddresses []types.EIP55Address, txm txmgr.TxManager, bhs blockhash_store.BlockhashStoreInterface, trustedBHS *trusted_blockhash_store.TrustedBlockhashStore, diff --git a/core/services/blockhashstore/bhs_test.go b/core/services/blockhashstore/bhs_test.go index f8d33b51a34..75424ee8059 100644 --- a/core/services/blockhashstore/bhs_test.go +++ b/core/services/blockhashstore/bhs_test.go @@ -9,6 +9,7 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/chains/evm/txmgr" txmmocks "github.com/smartcontractkit/chainlink/v2/core/chains/evm/txmgr/mocks" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/blockhash_store" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" @@ -18,7 +19,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/blockhashstore" "github.com/smartcontractkit/chainlink/v2/core/services/keystore" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ethkey" evmrelay "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm" "github.com/smartcontractkit/chainlink/v2/core/utils" ) @@ -41,7 +41,7 @@ func TestStoreRotatesFromAddresses(t *testing.T) { require.NoError(t, err) k2, err := ks.Eth().Create(ctx, &cltest.FixtureChainID) require.NoError(t, err) - fromAddresses := []ethkey.EIP55Address{k1.EIP55Address, k2.EIP55Address} + fromAddresses := []types.EIP55Address{k1.EIP55Address, k2.EIP55Address} txm := new(txmmocks.MockEvmTxManager) bhsAddress := common.HexToAddress("0x31Ca8bf590360B3198749f852D5c516c642846F6") diff --git a/core/services/blockhashstore/common.go b/core/services/blockhashstore/common.go index a19a3b868f7..30208296a4f 100644 --- a/core/services/blockhashstore/common.go +++ b/core/services/blockhashstore/common.go @@ -8,8 +8,8 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/pkg/errors" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" "github.com/smartcontractkit/chainlink/v2/core/logger" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ethkey" ) // Coordinator defines an interface for fetching request and fulfillment metadata from a VRF @@ -133,7 +133,7 @@ func GetSearchWindow(latestBlock, waitBlocks, lookbackBlocks int) (uint64, uint6 } // SendingKeys returns a list of sending keys (common.Address) given EIP55 addresses -func SendingKeys(fromAddresses []ethkey.EIP55Address) []common.Address { +func SendingKeys(fromAddresses []types.EIP55Address) []common.Address { var keys []common.Address for _, a := range fromAddresses { keys = append(keys, a.Address()) diff --git a/core/services/blockhashstore/coordinators.go b/core/services/blockhashstore/coordinators.go index 4cb58bab6fd..9a8c34a434e 100644 --- a/core/services/blockhashstore/coordinators.go +++ b/core/services/blockhashstore/coordinators.go @@ -12,7 +12,6 @@ import ( v1 "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/solidity_vrf_coordinator_interface" v2 "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/vrf_coordinator_v2" v2plus "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/vrf_coordinator_v2plus_interface" - "github.com/smartcontractkit/chainlink/v2/core/services/pg" ) var ( @@ -71,8 +70,8 @@ type V1Coordinator struct { } // NewV1Coordinator creates a new V1Coordinator from the given contract. -func NewV1Coordinator(c v1.VRFCoordinatorInterface, lp logpoller.LogPoller) (*V1Coordinator, error) { - err := lp.RegisterFilter(logpoller.Filter{ +func NewV1Coordinator(ctx context.Context, c v1.VRFCoordinatorInterface, lp logpoller.LogPoller) (*V1Coordinator, error) { + err := lp.RegisterFilter(ctx, logpoller.Filter{ Name: logpoller.FilterName("VRFv1CoordinatorFeeder", c.Address()), EventSigs: []common.Hash{ v1.VRFCoordinatorRandomnessRequest{}.Topic(), @@ -92,13 +91,13 @@ func (v *V1Coordinator) Requests( toBlock uint64, ) ([]Event, error) { logs, err := v.lp.LogsWithSigs( + ctx, int64(fromBlock), int64(toBlock), []common.Hash{ v1.VRFCoordinatorRandomnessRequest{}.Topic(), }, - v.c.Address(), - pg.WithParentCtx(ctx)) + v.c.Address()) if err != nil { return nil, errors.Wrap(err, "filter v1 requests") } @@ -121,19 +120,19 @@ func (v *V1Coordinator) Requests( // Fulfillments satisfies the Coordinator interface. func (v *V1Coordinator) Fulfillments(ctx context.Context, fromBlock uint64) ([]Event, error) { - toBlock, err := v.lp.LatestBlock(pg.WithParentCtx(ctx)) + toBlock, err := v.lp.LatestBlock(ctx) if err != nil { return nil, errors.Wrap(err, "fetching latest block") } logs, err := v.lp.LogsWithSigs( + ctx, int64(fromBlock), toBlock.BlockNumber, []common.Hash{ v1.VRFCoordinatorRandomnessRequestFulfilled{}.Topic(), }, - v.c.Address(), - pg.WithParentCtx(ctx)) + v.c.Address()) if err != nil { return nil, errors.Wrap(err, "filter v1 fulfillments") } @@ -160,8 +159,8 @@ type V2Coordinator struct { } // NewV2Coordinator creates a new V2Coordinator from the given contract. -func NewV2Coordinator(c v2.VRFCoordinatorV2Interface, lp logpoller.LogPoller) (*V2Coordinator, error) { - err := lp.RegisterFilter(logpoller.Filter{ +func NewV2Coordinator(ctx context.Context, c v2.VRFCoordinatorV2Interface, lp logpoller.LogPoller) (*V2Coordinator, error) { + err := lp.RegisterFilter(ctx, logpoller.Filter{ Name: logpoller.FilterName("VRFv2CoordinatorFeeder", c.Address()), EventSigs: []common.Hash{ v2.VRFCoordinatorV2RandomWordsRequested{}.Topic(), @@ -183,13 +182,13 @@ func (v *V2Coordinator) Requests( toBlock uint64, ) ([]Event, error) { logs, err := v.lp.LogsWithSigs( + ctx, int64(fromBlock), int64(toBlock), []common.Hash{ v2.VRFCoordinatorV2RandomWordsRequested{}.Topic(), }, - v.c.Address(), - pg.WithParentCtx(ctx)) + v.c.Address()) if err != nil { return nil, errors.Wrap(err, "filter v2 requests") } @@ -212,19 +211,19 @@ func (v *V2Coordinator) Requests( // Fulfillments satisfies the Coordinator interface. func (v *V2Coordinator) Fulfillments(ctx context.Context, fromBlock uint64) ([]Event, error) { - toBlock, err := v.lp.LatestBlock(pg.WithParentCtx(ctx)) + toBlock, err := v.lp.LatestBlock(ctx) if err != nil { return nil, errors.Wrap(err, "fetching latest block") } logs, err := v.lp.LogsWithSigs( + ctx, int64(fromBlock), toBlock.BlockNumber, []common.Hash{ v2.VRFCoordinatorV2RandomWordsFulfilled{}.Topic(), }, - v.c.Address(), - pg.WithParentCtx(ctx)) + v.c.Address()) if err != nil { return nil, errors.Wrap(err, "filter v2 fulfillments") } @@ -251,8 +250,8 @@ type V2PlusCoordinator struct { } // NewV2Coordinator creates a new V2Coordinator from the given contract. -func NewV2PlusCoordinator(c v2plus.IVRFCoordinatorV2PlusInternalInterface, lp logpoller.LogPoller) (*V2PlusCoordinator, error) { - err := lp.RegisterFilter(logpoller.Filter{ +func NewV2PlusCoordinator(ctx context.Context, c v2plus.IVRFCoordinatorV2PlusInternalInterface, lp logpoller.LogPoller) (*V2PlusCoordinator, error) { + err := lp.RegisterFilter(ctx, logpoller.Filter{ Name: logpoller.FilterName("VRFv2PlusCoordinatorFeeder", c.Address()), EventSigs: []common.Hash{ v2plus.IVRFCoordinatorV2PlusInternalRandomWordsRequested{}.Topic(), @@ -274,13 +273,13 @@ func (v *V2PlusCoordinator) Requests( toBlock uint64, ) ([]Event, error) { logs, err := v.lp.LogsWithSigs( + ctx, int64(fromBlock), int64(toBlock), []common.Hash{ v2plus.IVRFCoordinatorV2PlusInternalRandomWordsRequested{}.Topic(), }, - v.c.Address(), - pg.WithParentCtx(ctx)) + v.c.Address()) if err != nil { return nil, errors.Wrap(err, "filter v2 requests") } @@ -303,19 +302,19 @@ func (v *V2PlusCoordinator) Requests( // Fulfillments satisfies the Coordinator interface. func (v *V2PlusCoordinator) Fulfillments(ctx context.Context, fromBlock uint64) ([]Event, error) { - toBlock, err := v.lp.LatestBlock(pg.WithParentCtx(ctx)) + toBlock, err := v.lp.LatestBlock(ctx) if err != nil { return nil, errors.Wrap(err, "fetching latest block") } logs, err := v.lp.LogsWithSigs( + ctx, int64(fromBlock), toBlock.BlockNumber, []common.Hash{ v2plus.IVRFCoordinatorV2PlusInternalRandomWordsFulfilled{}.Topic(), }, - v.c.Address(), - pg.WithParentCtx(ctx)) + v.c.Address()) if err != nil { return nil, errors.Wrap(err, "filter v2 fulfillments") } diff --git a/core/services/blockhashstore/delegate.go b/core/services/blockhashstore/delegate.go index d07efcb95fe..9a11c057c32 100644 --- a/core/services/blockhashstore/delegate.go +++ b/core/services/blockhashstore/delegate.go @@ -9,6 +9,7 @@ import ( "github.com/pkg/errors" "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/gethwrappers/generated/blockhash_store" v1 "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/solidity_vrf_coordinator_interface" @@ -18,7 +19,6 @@ import ( "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/keystore/keys/ethkey" "github.com/smartcontractkit/chainlink/v2/core/services/pg" "github.com/smartcontractkit/chainlink/v2/core/utils" ) @@ -74,7 +74,7 @@ func (d *Delegate) ServicesForSpec(ctx context.Context, jb job.Job) ([]job.Servi if len(keys) == 0 { return nil, fmt.Errorf("missing sending keys for chain ID: %v", chain.ID()) } - fromAddresses := []ethkey.EIP55Address{keys[0].EIP55Address} + fromAddresses := []types.EIP55Address{keys[0].EIP55Address} if jb.BlockhashStoreSpec.FromAddresses != nil { fromAddresses = jb.BlockhashStoreSpec.FromAddresses } @@ -107,7 +107,7 @@ func (d *Delegate) ServicesForSpec(ctx context.Context, jb job.Job) ([]job.Servi } var coord *V1Coordinator - coord, err = NewV1Coordinator(c, lp) + coord, err = NewV1Coordinator(ctx, c, lp) if err != nil { return nil, errors.Wrap(err, "building V1 coordinator") } @@ -122,7 +122,7 @@ func (d *Delegate) ServicesForSpec(ctx context.Context, jb job.Job) ([]job.Servi } var coord *V2Coordinator - coord, err = NewV2Coordinator(c, lp) + coord, err = NewV2Coordinator(ctx, c, lp) if err != nil { return nil, errors.Wrap(err, "building V2 coordinator") } @@ -137,7 +137,7 @@ func (d *Delegate) ServicesForSpec(ctx context.Context, jb job.Job) ([]job.Servi } var coord *V2PlusCoordinator - coord, err = NewV2PlusCoordinator(c, lp) + coord, err = NewV2PlusCoordinator(ctx, c, lp) if err != nil { return nil, errors.Wrap(err, "building V2Plus coordinator") } @@ -169,7 +169,7 @@ func (d *Delegate) ServicesForSpec(ctx context.Context, jb job.Job) ([]job.Servi int(jb.BlockhashStoreSpec.LookbackBlocks), jb.BlockhashStoreSpec.HeartbeatPeriod, func(ctx context.Context) (uint64, error) { - head, err := lp.LatestBlock(pg.WithParentCtx(ctx)) + head, err := lp.LatestBlock(ctx) if err != nil { return 0, errors.Wrap(err, "getting chain head") } @@ -194,7 +194,7 @@ func (d *Delegate) BeforeJobCreated(spec job.Job) {} func (d *Delegate) BeforeJobDeleted(spec job.Job) {} // OnDeleteJob satisfies the job.Delegate interface. -func (d *Delegate) OnDeleteJob(spec job.Job, q pg.Queryer) error { return nil } +func (d *Delegate) OnDeleteJob(ctx context.Context, spec job.Job, q pg.Queryer) error { return nil } // service is a job.Service that runs the BHS feeder every pollPeriod. type service struct { diff --git a/core/services/blockhashstore/delegate_test.go b/core/services/blockhashstore/delegate_test.go index 5f5118afeaf..4c37273f161 100644 --- a/core/services/blockhashstore/delegate_test.go +++ b/core/services/blockhashstore/delegate_test.go @@ -58,8 +58,8 @@ func createTestDelegate(t *testing.T) (*blockhashstore.Delegate, *testData) { kst := cltest.NewKeyStore(t, db, cfg.Database()).Eth() sendingKey, _ := cltest.MustInsertRandomKey(t, kst) lp := &mocklp.LogPoller{} - lp.On("RegisterFilter", mock.Anything).Return(nil) - lp.On("LatestBlock", mock.Anything, mock.Anything).Return(logpoller.LogPollerBlock{}, nil) + lp.On("RegisterFilter", mock.Anything, mock.Anything).Return(nil) + lp.On("LatestBlock", mock.Anything).Return(logpoller.LogPollerBlock{}, nil) relayExtenders := evmtest.NewChainRelayExtenders( t, diff --git a/core/services/blockhashstore/feeder_test.go b/core/services/blockhashstore/feeder_test.go index 3266b7d92ea..945359dd81f 100644 --- a/core/services/blockhashstore/feeder_test.go +++ b/core/services/blockhashstore/feeder_test.go @@ -410,7 +410,7 @@ func (test testCase) testFeederWithLogPollerVRFv1(t *testing.T) { // Instantiate log poller & coordinator. lp := &mocklp.LogPoller{} - lp.On("RegisterFilter", mock.Anything).Return(nil) + lp.On("RegisterFilter", mock.Anything, mock.Anything).Return(nil) c, err := solidity_vrf_coordinator_interface.NewVRFCoordinator(coordinatorAddress, nil) require.NoError(t, err) coordinator := &V1Coordinator{ @@ -449,23 +449,23 @@ func (test testCase) testFeederWithLogPollerVRFv1(t *testing.T) { Return(logpoller.LogPollerBlock{BlockNumber: latest}, nil) lp.On( "LogsWithSigs", + mock.Anything, fromBlock, toBlock, []common.Hash{ solidity_vrf_coordinator_interface.VRFCoordinatorRandomnessRequest{}.Topic(), }, coordinatorAddress, - mock.Anything, ).Return(requestLogs, nil) lp.On( "LogsWithSigs", + mock.Anything, fromBlock, latest, []common.Hash{ solidity_vrf_coordinator_interface.VRFCoordinatorRandomnessRequestFulfilled{}.Topic(), }, coordinatorAddress, - mock.Anything, ).Return(fulfillmentLogs, nil) // Instantiate feeder. @@ -504,7 +504,7 @@ func (test testCase) testFeederWithLogPollerVRFv2(t *testing.T) { // Instantiate log poller & coordinator. lp := &mocklp.LogPoller{} - lp.On("RegisterFilter", mock.Anything).Return(nil) + lp.On("RegisterFilter", mock.Anything, mock.Anything).Return(nil) c, err := vrf_coordinator_v2.NewVRFCoordinatorV2(coordinatorAddress, nil) require.NoError(t, err) coordinator := &V2Coordinator{ @@ -547,23 +547,23 @@ func (test testCase) testFeederWithLogPollerVRFv2(t *testing.T) { Return(logpoller.LogPollerBlock{BlockNumber: latest}, nil) lp.On( "LogsWithSigs", + mock.Anything, fromBlock, toBlock, []common.Hash{ vrf_coordinator_v2.VRFCoordinatorV2RandomWordsRequested{}.Topic(), }, coordinatorAddress, - mock.Anything, ).Return(requestLogs, nil) lp.On( "LogsWithSigs", + mock.Anything, fromBlock, latest, []common.Hash{ vrf_coordinator_v2.VRFCoordinatorV2RandomWordsFulfilled{}.Topic(), }, coordinatorAddress, - mock.Anything, ).Return(fulfillmentLogs, nil) // Instantiate feeder. @@ -602,7 +602,7 @@ func (test testCase) testFeederWithLogPollerVRFv2Plus(t *testing.T) { // Instantiate log poller & coordinator. lp := &mocklp.LogPoller{} - lp.On("RegisterFilter", mock.Anything).Return(nil) + lp.On("RegisterFilter", mock.Anything, mock.Anything).Return(nil) c, err := vrf_coordinator_v2plus_interface.NewIVRFCoordinatorV2PlusInternal(coordinatorAddress, nil) require.NoError(t, err) coordinator := &V2PlusCoordinator{ @@ -645,23 +645,23 @@ func (test testCase) testFeederWithLogPollerVRFv2Plus(t *testing.T) { Return(logpoller.LogPollerBlock{BlockNumber: latest}, nil) lp.On( "LogsWithSigs", + mock.Anything, fromBlock, toBlock, []common.Hash{ vrf_coordinator_v2plus_interface.IVRFCoordinatorV2PlusInternalRandomWordsRequested{}.Topic(), }, coordinatorAddress, - mock.Anything, ).Return(requestLogs, nil) lp.On( "LogsWithSigs", + mock.Anything, fromBlock, latest, []common.Hash{ vrf_coordinator_v2plus_interface.IVRFCoordinatorV2PlusInternalRandomWordsFulfilled{}.Topic(), }, coordinatorAddress, - mock.Anything, ).Return(fulfillmentLogs, nil) // Instantiate feeder. diff --git a/core/services/blockhashstore/validate_test.go b/core/services/blockhashstore/validate_test.go index 48487bb5489..099e5db02ca 100644 --- a/core/services/blockhashstore/validate_test.go +++ b/core/services/blockhashstore/validate_test.go @@ -6,15 +6,15 @@ import ( "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils/big" "github.com/smartcontractkit/chainlink/v2/core/services/job" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ethkey" ) func TestValidate(t *testing.T) { - v1Coordinator := ethkey.EIP55Address("0x1F72B4A5DCf7CC6d2E38423bF2f4BFA7db97d139") - v2Coordinator := ethkey.EIP55Address("0x2be990eE17832b59E0086534c5ea2459Aa75E38F") - fromAddresses := []ethkey.EIP55Address{("0x469aA2CD13e037DC5236320783dCfd0e641c0559")} + v1Coordinator := types.EIP55Address("0x1F72B4A5DCf7CC6d2E38423bF2f4BFA7db97d139") + v2Coordinator := types.EIP55Address("0x2be990eE17832b59E0086534c5ea2459Aa75E38F") + fromAddresses := []types.EIP55Address{("0x469aA2CD13e037DC5236320783dCfd0e641c0559")} var tests = []struct { name string @@ -45,7 +45,7 @@ fromAddresses = ["0x469aA2CD13e037DC5236320783dCfd0e641c0559"]`, os.BlockhashStoreSpec.CoordinatorV2Address) require.Equal(t, int32(59), os.BlockhashStoreSpec.WaitBlocks) require.Equal(t, int32(159), os.BlockhashStoreSpec.LookbackBlocks) - require.Equal(t, ethkey.EIP55Address("0x3e20Cef636EdA7ba135bCbA4fe6177Bd3cE0aB17"), + require.Equal(t, types.EIP55Address("0x3e20Cef636EdA7ba135bCbA4fe6177Bd3cE0aB17"), os.BlockhashStoreSpec.BlockhashStoreAddress) require.Equal(t, 23*time.Second, os.BlockhashStoreSpec.PollPeriod) require.Equal(t, 7*time.Second, os.BlockhashStoreSpec.RunTimeout) diff --git a/core/services/blockheaderfeeder/block_header_feeder.go b/core/services/blockheaderfeeder/block_header_feeder.go index d1bcab4297a..b1e8ba7f2f3 100644 --- a/core/services/blockheaderfeeder/block_header_feeder.go +++ b/core/services/blockheaderfeeder/block_header_feeder.go @@ -12,10 +12,10 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/pkg/errors" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/blockhashstore" "github.com/smartcontractkit/chainlink/v2/core/services/keystore" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ethkey" ) var ( @@ -48,7 +48,7 @@ func NewBlockHeaderFeeder( gethks keystore.Eth, getBlockhashesBatchSize uint16, storeBlockhashesBatchSize uint16, - fromAddresses []ethkey.EIP55Address, + fromAddresses []types.EIP55Address, chainID *big.Int, ) *BlockHeaderFeeder { return &BlockHeaderFeeder{ @@ -86,7 +86,7 @@ type BlockHeaderFeeder struct { getBlockhashesBatchSize uint16 storeBlockhashesBatchSize uint16 gethks keystore.Eth - fromAddresses []ethkey.EIP55Address + fromAddresses []types.EIP55Address chainID *big.Int } diff --git a/core/services/blockheaderfeeder/block_header_feeder_test.go b/core/services/blockheaderfeeder/block_header_feeder_test.go index 1b855caf9d2..afd7525c9e2 100644 --- a/core/services/blockheaderfeeder/block_header_feeder_test.go +++ b/core/services/blockheaderfeeder/block_header_feeder_test.go @@ -9,10 +9,10 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/blockhashstore" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ethkey" keystoremocks "github.com/smartcontractkit/chainlink/v2/core/services/keystore/mocks" ) @@ -200,7 +200,7 @@ func (test testCase) testFeeder(t *testing.T) { blockHeaderProvider := &blockhashstore.TestBlockHeaderProvider{} fromAddress := "0x469aA2CD13e037DC5236320783dCfd0e641c0559" - fromAddresses := []ethkey.EIP55Address{ethkey.EIP55Address(fromAddress)} + fromAddresses := []types.EIP55Address{types.EIP55Address(fromAddress)} ks := keystoremocks.NewEth(t) ks.On("GetRoundRobinAddress", mock.Anything, testutils.FixtureChainID, mock.Anything).Maybe().Return(common.HexToAddress(fromAddress), nil) @@ -244,7 +244,7 @@ func TestFeeder_CachesStoredBlocks(t *testing.T) { batchBHS := &blockhashstore.TestBatchBHS{Stored: []uint64{75}} blockHeaderProvider := &blockhashstore.TestBlockHeaderProvider{} fromAddress := "0x469aA2CD13e037DC5236320783dCfd0e641c0559" - fromAddresses := []ethkey.EIP55Address{ethkey.EIP55Address(fromAddress)} + fromAddresses := []types.EIP55Address{types.EIP55Address(fromAddress)} ks := keystoremocks.NewEth(t) ks.On("GetRoundRobinAddress", mock.Anything, testutils.FixtureChainID, mock.Anything).Maybe().Return(common.HexToAddress(fromAddress), nil) diff --git a/core/services/blockheaderfeeder/delegate.go b/core/services/blockheaderfeeder/delegate.go index d78782f6592..19edb43bc23 100644 --- a/core/services/blockheaderfeeder/delegate.go +++ b/core/services/blockheaderfeeder/delegate.go @@ -104,7 +104,7 @@ func (d *Delegate) ServicesForSpec(ctx context.Context, jb job.Job) ([]job.Servi return nil, errors.Wrap(err, "building V1 coordinator") } var coord *blockhashstore.V1Coordinator - coord, err = blockhashstore.NewV1Coordinator(c, lp) + coord, err = blockhashstore.NewV1Coordinator(ctx, c, lp) if err != nil { return nil, errors.Wrap(err, "building V1 coordinator") } @@ -118,7 +118,7 @@ func (d *Delegate) ServicesForSpec(ctx context.Context, jb job.Job) ([]job.Servi return nil, errors.Wrap(err, "building V2 coordinator") } var coord *blockhashstore.V2Coordinator - coord, err = blockhashstore.NewV2Coordinator(c, lp) + coord, err = blockhashstore.NewV2Coordinator(ctx, c, lp) if err != nil { return nil, errors.Wrap(err, "building V2 coordinator") } @@ -132,7 +132,7 @@ func (d *Delegate) ServicesForSpec(ctx context.Context, jb job.Job) ([]job.Servi return nil, errors.Wrap(err, "building V2 plus coordinator") } var coord *blockhashstore.V2PlusCoordinator - coord, err = blockhashstore.NewV2PlusCoordinator(c, lp) + coord, err = blockhashstore.NewV2PlusCoordinator(ctx, c, lp) if err != nil { return nil, errors.Wrap(err, "building V2 plus coordinator") } @@ -208,7 +208,7 @@ func (d *Delegate) BeforeJobCreated(spec job.Job) {} func (d *Delegate) BeforeJobDeleted(spec job.Job) {} // OnDeleteJob satisfies the job.Delegate interface. -func (d *Delegate) OnDeleteJob(spec job.Job, q pg.Queryer) error { return nil } +func (d *Delegate) OnDeleteJob(ctx context.Context, spec job.Job, q pg.Queryer) error { return nil } // service is a job.Service that runs the BHS feeder every pollPeriod. type service struct { diff --git a/core/services/blockheaderfeeder/validate_test.go b/core/services/blockheaderfeeder/validate_test.go index cdab0322a40..66413a615bd 100644 --- a/core/services/blockheaderfeeder/validate_test.go +++ b/core/services/blockheaderfeeder/validate_test.go @@ -6,16 +6,16 @@ import ( "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils/big" "github.com/smartcontractkit/chainlink/v2/core/services/job" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ethkey" ) func TestValidate(t *testing.T) { - v1Coordinator := ethkey.EIP55Address("0x1F72B4A5DCf7CC6d2E38423bF2f4BFA7db97d139") - v2Coordinator := ethkey.EIP55Address("0x2be990eE17832b59E0086534c5ea2459Aa75E38F") - v2PlusCoordinator := ethkey.EIP55Address("0x92B5e28Ac583812874e4271380c7d070C5FB6E6b") - fromAddresses := []ethkey.EIP55Address{("0x469aA2CD13e037DC5236320783dCfd0e641c0559")} + v1Coordinator := types.EIP55Address("0x1F72B4A5DCf7CC6d2E38423bF2f4BFA7db97d139") + v2Coordinator := types.EIP55Address("0x2be990eE17832b59E0086534c5ea2459Aa75E38F") + v2PlusCoordinator := types.EIP55Address("0x92B5e28Ac583812874e4271380c7d070C5FB6E6b") + fromAddresses := []types.EIP55Address{("0x469aA2CD13e037DC5236320783dCfd0e641c0559")} var tests = []struct { name string @@ -53,9 +53,9 @@ storeBlockhashesBatchSize = 10 os.BlockHeaderFeederSpec.CoordinatorV2PlusAddress) require.Equal(t, int32(2000), os.BlockHeaderFeederSpec.LookbackBlocks) require.Equal(t, int32(500), os.BlockHeaderFeederSpec.WaitBlocks) - require.Equal(t, ethkey.EIP55Address("0x3e20Cef636EdA7ba135bCbA4fe6177Bd3cE0aB17"), + require.Equal(t, types.EIP55Address("0x3e20Cef636EdA7ba135bCbA4fe6177Bd3cE0aB17"), os.BlockHeaderFeederSpec.BlockhashStoreAddress) - require.Equal(t, ethkey.EIP55Address("0xD04E5b2ea4e55AEbe6f7522bc2A69Ec6639bfc63"), + require.Equal(t, types.EIP55Address("0xD04E5b2ea4e55AEbe6f7522bc2A69Ec6639bfc63"), os.BlockHeaderFeederSpec.BatchBlockhashStoreAddress) require.Equal(t, 23*time.Second, os.BlockHeaderFeederSpec.PollPeriod) require.Equal(t, 7*time.Second, os.BlockHeaderFeederSpec.RunTimeout) diff --git a/core/services/chainlink/application.go b/core/services/chainlink/application.go index d95458838bc..ca8f118b149 100644 --- a/core/services/chainlink/application.go +++ b/core/services/chainlink/application.go @@ -20,6 +20,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/loop" commonservices "github.com/smartcontractkit/chainlink-common/pkg/services" + "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" "github.com/smartcontractkit/chainlink-common/pkg/utils" "github.com/smartcontractkit/chainlink-common/pkg/utils/mailbox" "github.com/smartcontractkit/chainlink/v2/core/capabilities" @@ -48,6 +49,7 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/services/ocr2" "github.com/smartcontractkit/chainlink/v2/core/services/ocrbootstrap" "github.com/smartcontractkit/chainlink/v2/core/services/ocrcommon" + externalp2p "github.com/smartcontractkit/chainlink/v2/core/services/p2p/wrapper" "github.com/smartcontractkit/chainlink/v2/core/services/periodicbackup" "github.com/smartcontractkit/chainlink/v2/core/services/pg" "github.com/smartcontractkit/chainlink/v2/core/services/pipeline" @@ -74,7 +76,8 @@ type Application interface { GetLogger() logger.SugaredLogger GetAuditLogger() audit.AuditLogger GetHealthChecker() services.Checker - GetSqlxDB() *sqlx.DB + GetSqlxDB() *sqlx.DB // Deprecated: use GetDB + GetDB() sqlutil.DataSource GetConfig() GeneralConfig SetLogLevel(lvl zapcore.Level) error GetKeyStore() keystore.Master @@ -140,7 +143,8 @@ type ChainlinkApplication struct { logger logger.SugaredLogger AuditLogger audit.AuditLogger closeLogger func() error - sqlxDB *sqlx.DB + sqlxDB *sqlx.DB // Deprecated: use db instead + db sqlutil.DataSource secretGenerator SecretGenerator profiler *pyroscope.Profiler loopRegistry *plugins.LoopRegistry @@ -153,7 +157,8 @@ type ApplicationOpts struct { Config GeneralConfig Logger logger.Logger MailMon *mailbox.Monitor - SqlxDB *sqlx.DB + SqlxDB *sqlx.DB // Deprecated: use DB instead + DB sqlutil.DataSource KeyStore keystore.Master RelayerChainInteroperators *CoreRelayerChainInteroperators AuditLogger audit.AuditLogger @@ -176,7 +181,7 @@ type ApplicationOpts struct { func NewApplication(opts ApplicationOpts) (Application, error) { var srvcs []services.ServiceCtx auditLogger := opts.AuditLogger - db := opts.SqlxDB + sqlxDB := opts.SqlxDB cfg := opts.Config relayerChainInterops := opts.RelayerChainInteroperators mailMon := opts.MailMon @@ -187,6 +192,15 @@ func NewApplication(opts ApplicationOpts) (Application, error) { unrestrictedHTTPClient := opts.UnrestrictedHTTPClient registry := capabilities.NewRegistry(globalLogger) + if cfg.Capabilities().Peering().Enabled() { + externalPeerWrapper := externalp2p.NewExternalPeerWrapper(keyStore.P2P(), cfg.Capabilities().Peering(), globalLogger) + srvcs = append(srvcs, externalPeerWrapper) + + // NOTE: RegistrySyncer will depend on a Relayer when fully implemented + registrySyncer := capabilities.NewRegistrySyncer(externalPeerWrapper, registry, globalLogger) + srvcs = append(srvcs, registrySyncer) + } + // LOOPs can be created as options, in the case of LOOP relayers, or // as OCR2 job implementations, in the case of Median today. // We will have a non-nil registry here in LOOP relayers are being used, otherwise @@ -257,12 +271,12 @@ func NewApplication(opts ApplicationOpts) (Application, error) { srvcs = append(srvcs, mailMon) srvcs = append(srvcs, relayerChainInterops.Services()...) - promReporter := promreporter.NewPromReporter(db.DB, legacyEVMChains, globalLogger) + promReporter := promreporter.NewPromReporter(sqlxDB.DB, legacyEVMChains, globalLogger) srvcs = append(srvcs, promReporter) // Initialize Local Users ORM and Authentication Provider specified in config // BasicAdminUsersORM is initialized and required regardless of separate Authentication Provider - localAdminUsersORM := localauth.NewORM(db, cfg.WebServer().SessionTimeout().Duration(), globalLogger, cfg.Database(), auditLogger) + localAdminUsersORM := localauth.NewORM(sqlxDB, cfg.WebServer().SessionTimeout().Duration(), globalLogger, cfg.Database(), auditLogger) // Initialize Sessions ORM based on environment configured authenticator // localDB auth or remote LDAP auth @@ -274,26 +288,26 @@ func NewApplication(opts ApplicationOpts) (Application, error) { case sessions.LDAPAuth: var err error authenticationProvider, err = ldapauth.NewLDAPAuthenticator( - db, cfg.Database(), cfg.WebServer().LDAP(), cfg.Insecure().DevWebServer(), globalLogger, auditLogger, + sqlxDB, cfg.Database(), cfg.WebServer().LDAP(), cfg.Insecure().DevWebServer(), globalLogger, auditLogger, ) if err != nil { return nil, errors.Wrap(err, "NewApplication: failed to initialize LDAP Authentication module") } - sessionReaper = ldapauth.NewLDAPServerStateSync(db, cfg.Database(), cfg.WebServer().LDAP(), globalLogger) + sessionReaper = ldapauth.NewLDAPServerStateSync(sqlxDB, cfg.Database(), cfg.WebServer().LDAP(), globalLogger) case sessions.LocalAuth: - authenticationProvider = localauth.NewORM(db, cfg.WebServer().SessionTimeout().Duration(), globalLogger, cfg.Database(), auditLogger) - sessionReaper = localauth.NewSessionReaper(db.DB, cfg.WebServer(), globalLogger) + authenticationProvider = localauth.NewORM(sqlxDB, cfg.WebServer().SessionTimeout().Duration(), globalLogger, cfg.Database(), auditLogger) + sessionReaper = localauth.NewSessionReaper(sqlxDB.DB, cfg.WebServer(), globalLogger) default: return nil, errors.Errorf("NewApplication: Unexpected 'AuthenticationMethod': %s supported values: %s, %s", authMethod, sessions.LocalAuth, sessions.LDAPAuth) } var ( - pipelineORM = pipeline.NewORM(db, globalLogger, cfg.Database(), cfg.JobPipeline().MaxSuccessfulRuns()) - bridgeORM = bridges.NewORM(db, globalLogger, cfg.Database()) - mercuryORM = mercury.NewORM(db, globalLogger, cfg.Database()) + pipelineORM = pipeline.NewORM(sqlxDB, globalLogger, cfg.Database(), cfg.JobPipeline().MaxSuccessfulRuns()) + bridgeORM = bridges.NewORM(sqlxDB, globalLogger, cfg.Database()) + mercuryORM = mercury.NewORM(sqlxDB, globalLogger, cfg.Database()) pipelineRunner = pipeline.NewRunner(pipelineORM, bridgeORM, cfg.JobPipeline(), cfg.WebServer(), legacyEVMChains, keyStore.Eth(), keyStore.VRF(), globalLogger, restrictedHTTPClient, unrestrictedHTTPClient) - jobORM = job.NewORM(db, pipelineORM, bridgeORM, keyStore, globalLogger, cfg.Database()) - txmORM = txmgr.NewTxStore(db, globalLogger, cfg.Database()) + jobORM = job.NewORM(sqlxDB, pipelineORM, bridgeORM, keyStore, globalLogger, cfg.Database()) + txmORM = txmgr.NewTxStore(sqlxDB, globalLogger, cfg.Database()) streamRegistry = streams.NewRegistry(globalLogger, pipelineRunner) ) @@ -313,14 +327,14 @@ func NewApplication(opts ApplicationOpts) (Application, error) { legacyEVMChains, mailMon), job.Keeper: keeper.NewDelegate( - db, + sqlxDB, jobORM, pipelineRunner, globalLogger, legacyEVMChains, mailMon), job.VRF: vrf.NewDelegate( - db, + sqlxDB, keyStore, pipelineRunner, pipelineORM, @@ -346,7 +360,7 @@ func NewApplication(opts ApplicationOpts) (Application, error) { job.Gateway: gateway.NewDelegate( legacyEVMChains, keyStore.Eth(), - db, + sqlxDB, cfg.Database(), globalLogger), job.Stream: streams.NewDelegate( @@ -372,7 +386,7 @@ func NewApplication(opts ApplicationOpts) (Application, error) { jobORM, pipelineORM, pipelineRunner, - db, + sqlxDB, legacyEVMChains, globalLogger, ) @@ -385,7 +399,7 @@ func NewApplication(opts ApplicationOpts) (Application, error) { if err := ocrcommon.ValidatePeerWrapperConfig(cfg.P2P()); err != nil { return nil, err } - peerWrapper = ocrcommon.NewSingletonPeerWrapper(keyStore, cfg.P2P(), cfg.OCR(), cfg.Database(), db, globalLogger) + peerWrapper = ocrcommon.NewSingletonPeerWrapper(keyStore, cfg.P2P(), cfg.OCR(), cfg.Database(), sqlxDB, globalLogger) srvcs = append(srvcs, peerWrapper) } else { return nil, fmt.Errorf("P2P stack required for OCR or OCR2") @@ -393,7 +407,7 @@ func NewApplication(opts ApplicationOpts) (Application, error) { if cfg.OCR().Enabled() { delegates[job.OffchainReporting] = ocr.NewDelegate( - db, + sqlxDB, jobORM, keyStore, pipelineRunner, @@ -412,7 +426,7 @@ func NewApplication(opts ApplicationOpts) (Application, error) { registrarConfig := plugins.NewRegistrarConfig(opts.GRPCOpts, opts.LoopRegistry.Register) ocr2DelegateConfig := ocr2.NewDelegateConfig(cfg.OCR2(), cfg.Mercury(), cfg.Threshold(), cfg.Insecure(), cfg.JobPipeline(), cfg.Database(), registrarConfig) delegates[job.OffchainReporting2] = ocr2.NewDelegate( - db, + sqlxDB, jobORM, bridgeORM, mercuryORM, @@ -432,7 +446,7 @@ func NewApplication(opts ApplicationOpts) (Application, error) { registry, ) delegates[job.Bootstrap] = ocrbootstrap.NewDelegateBootstrap( - db, + sqlxDB, jobORM, peerWrapper, globalLogger, @@ -450,7 +464,7 @@ func NewApplication(opts ApplicationOpts) (Application, error) { for _, c := range legacyEVMChains.Slice() { lbs = append(lbs, c.LogBroadcaster()) } - jobSpawner := job.NewSpawner(jobORM, cfg.Database(), healthChecker, delegates, db, globalLogger, lbs) + jobSpawner := job.NewSpawner(jobORM, cfg.Database(), healthChecker, delegates, sqlxDB, globalLogger, lbs) srvcs = append(srvcs, jobSpawner, pipelineRunner) // We start the log poller after the job spawner @@ -463,11 +477,11 @@ func NewApplication(opts ApplicationOpts) (Application, error) { var feedsService feeds.Service if cfg.Feature().FeedsManager() { - feedsORM := feeds.NewORM(db, opts.Logger, cfg.Database()) + feedsORM := feeds.NewORM(sqlxDB, opts.Logger, cfg.Database()) feedsService = feeds.NewService( feedsORM, jobORM, - db, + sqlxDB, jobSpawner, keyStore, cfg.Insecure(), @@ -518,6 +532,7 @@ func NewApplication(opts ApplicationOpts) (Application, error) { loopRegistry: loopRegistry, sqlxDB: opts.SqlxDB, + db: opts.DB, // NOTE: Can keep things clean by putting more things in srvcs instead of manually start/closing srvcs: srvcs, @@ -826,6 +841,10 @@ func (app *ChainlinkApplication) GetSqlxDB() *sqlx.DB { return app.sqlxDB } +func (app *ChainlinkApplication) GetDB() sqlutil.DataSource { + return app.db +} + // Returns the configuration to use for creating and authenticating // new WebAuthn credentials func (app *ChainlinkApplication) GetWebAuthnConfiguration() sessions.WebAuthnConfiguration { diff --git a/core/services/chainlink/config.go b/core/services/chainlink/config.go index 6cd2732ece8..b77a54f39a8 100644 --- a/core/services/chainlink/config.go +++ b/core/services/chainlink/config.go @@ -12,6 +12,7 @@ import ( "github.com/smartcontractkit/chainlink-solana/pkg/solana" stkcfg "github.com/smartcontractkit/chainlink-starknet/relayer/pkg/chainlink/config" + commoncfg "github.com/smartcontractkit/chainlink/v2/common/config" evmcfg "github.com/smartcontractkit/chainlink/v2/core/chains/evm/config/toml" "github.com/smartcontractkit/chainlink/v2/core/config/docs" "github.com/smartcontractkit/chainlink/v2/core/config/env" @@ -76,7 +77,16 @@ func (c *Config) valueWarnings() (err error) { // deprecationWarnings returns an error if the Config contains deprecated fields. // This is typically used before defaults have been applied, with input from the user. func (c *Config) deprecationWarnings() (err error) { - // none + // ChainType xdai is deprecated and has been renamed to gnosis + for _, evm := range c.EVM { + if evm.ChainType != nil && *evm.ChainType == string(commoncfg.ChainXDai) { + err = multierr.Append(err, config.ErrInvalid{ + Name: "EVM.ChainType", + Value: *evm.ChainType, + Msg: "deprecated and will be removed in v2.13.0, use 'gnosis' instead", + }) + } + } return } diff --git a/core/services/chainlink/config_capabilities.go b/core/services/chainlink/config_capabilities.go new file mode 100644 index 00000000000..d432d31ad18 --- /dev/null +++ b/core/services/chainlink/config_capabilities.go @@ -0,0 +1,16 @@ +package chainlink + +import ( + "github.com/smartcontractkit/chainlink/v2/core/config" + "github.com/smartcontractkit/chainlink/v2/core/config/toml" +) + +var _ config.Capabilities = (*capabilitiesConfig)(nil) + +type capabilitiesConfig struct { + c toml.Capabilities +} + +func (c *capabilitiesConfig) Peering() config.P2P { + return &p2p{c: c.c.Peering} +} diff --git a/core/services/chainlink/config_capabilities_test.go b/core/services/chainlink/config_capabilities_test.go new file mode 100644 index 00000000000..7ff3f3fed08 --- /dev/null +++ b/core/services/chainlink/config_capabilities_test.go @@ -0,0 +1,46 @@ +package chainlink + +import ( + "testing" + "time" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/libocr/commontypes" +) + +func TestCapabilitiesConfig(t *testing.T) { + opts := GeneralConfigOpts{ + ConfigStrings: []string{fullTOML}, + } + cfg, err := opts.New() + require.NoError(t, err) + + p2p := cfg.Capabilities().Peering() + assert.Equal(t, "p2p_12D3KooWMoejJznyDuEk5aX6GvbjaG12UzeornPCBNzMRqdwrFJw", p2p.PeerID().String()) + assert.Equal(t, 13, p2p.IncomingMessageBufferSize()) + assert.Equal(t, 17, p2p.OutgoingMessageBufferSize()) + assert.True(t, p2p.TraceLogging()) + + v2 := p2p.V2() + assert.False(t, v2.Enabled()) + assert.Equal(t, []string{"a", "b", "c"}, v2.AnnounceAddresses()) + assert.ElementsMatch( + t, + []commontypes.BootstrapperLocator{ + { + PeerID: "12D3KooWMoejJznyDuEk5aX6GvbjaG12UzeornPCBNzMRqdwrFJw", + Addrs: []string{"test:99"}, + }, + { + PeerID: "12D3KooWMoejJznyDuEk5aX6GvbjaG12UzeornPCBNzMRqdwrFJw", + Addrs: []string{"foo:42", "bar:10"}, + }, + }, + v2.DefaultBootstrappers(), + ) + assert.Equal(t, time.Minute, v2.DeltaDial().Duration()) + assert.Equal(t, 2*time.Second, v2.DeltaReconcile().Duration()) + assert.Equal(t, []string{"foo", "bar"}, v2.ListenAddresses()) +} diff --git a/core/services/chainlink/config_general.go b/core/services/chainlink/config_general.go index 97243926973..cae01c01cb7 100644 --- a/core/services/chainlink/config_general.go +++ b/core/services/chainlink/config_general.go @@ -397,6 +397,10 @@ func (g *generalConfig) AutoPprofProfileRoot() string { return s } +func (g *generalConfig) Capabilities() config.Capabilities { + return &capabilitiesConfig{c: g.c.Capabilities} +} + func (g *generalConfig) Database() coreconfig.Database { return &databaseConfig{c: g.c.Database, s: g.secrets.Secrets.Database, logSQL: g.logSQL} } diff --git a/core/services/chainlink/config_job_pipeline.go b/core/services/chainlink/config_job_pipeline.go index 95106b84199..8d9858d2a44 100644 --- a/core/services/chainlink/config_job_pipeline.go +++ b/core/services/chainlink/config_job_pipeline.go @@ -45,3 +45,7 @@ func (j *jobPipelineConfig) ResultWriteQueueDepth() uint64 { func (j *jobPipelineConfig) ExternalInitiatorsEnabled() bool { return *j.c.ExternalInitiatorsEnabled } + +func (j *jobPipelineConfig) VerboseLogging() bool { + return *j.c.VerboseLogging +} diff --git a/core/services/chainlink/config_ocr.go b/core/services/chainlink/config_ocr.go index 072c724871a..cf6127e713a 100644 --- a/core/services/chainlink/config_ocr.go +++ b/core/services/chainlink/config_ocr.go @@ -5,9 +5,9 @@ import ( "github.com/pkg/errors" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" "github.com/smartcontractkit/chainlink/v2/core/config" "github.com/smartcontractkit/chainlink/v2/core/config/toml" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ethkey" ) var _ config.OCR = (*ocrConfig)(nil) @@ -48,7 +48,7 @@ func (o *ocrConfig) SimulateTransactions() bool { return *o.c.SimulateTransactions } -func (o *ocrConfig) TransmitterAddress() (ethkey.EIP55Address, error) { +func (o *ocrConfig) TransmitterAddress() (types.EIP55Address, error) { a := *o.c.TransmitterAddress if a.IsZero() { return a, errors.Wrap(config.ErrEnvUnset, "OCR.TransmitterAddress is not set") diff --git a/core/services/chainlink/config_test.go b/core/services/chainlink/config_test.go index 44c19aa257d..3c2c9c9d0f0 100644 --- a/core/services/chainlink/config_test.go +++ b/core/services/chainlink/config_test.go @@ -20,22 +20,22 @@ import ( commonassets "github.com/smartcontractkit/chainlink-common/pkg/assets" "github.com/smartcontractkit/chainlink-common/pkg/config" commoncfg "github.com/smartcontractkit/chainlink-common/pkg/config" - commonconfig "github.com/smartcontractkit/chainlink-common/pkg/config" "github.com/smartcontractkit/chainlink-common/pkg/utils/hex" coscfg "github.com/smartcontractkit/chainlink-cosmos/pkg/cosmos/config" "github.com/smartcontractkit/chainlink-solana/pkg/solana" solcfg "github.com/smartcontractkit/chainlink-solana/pkg/solana/config" stkcfg "github.com/smartcontractkit/chainlink-starknet/relayer/pkg/chainlink/config" + 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/client" evmcfg "github.com/smartcontractkit/chainlink/v2/core/chains/evm/config/toml" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" ubig "github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils/big" legacy "github.com/smartcontractkit/chainlink/v2/core/config" "github.com/smartcontractkit/chainlink/v2/core/config/toml" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/chainlink/cfgtest" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ethkey" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/p2pkey" "github.com/smartcontractkit/chainlink/v2/core/store/models" "github.com/smartcontractkit/chainlink/v2/core/utils" @@ -67,7 +67,7 @@ var ( }, Database: toml.Database{ Listener: toml.DatabaseListener{ - FallbackPollInterval: commonconfig.MustNewDuration(2 * time.Minute), + FallbackPollInterval: commoncfg.MustNewDuration(2 * time.Minute), }, }, Log: toml.Log{ @@ -76,16 +76,16 @@ var ( }, JobPipeline: toml.JobPipeline{ HTTPRequest: toml.JobPipelineHTTPRequest{ - DefaultTimeout: commonconfig.MustNewDuration(30 * time.Second), + DefaultTimeout: commoncfg.MustNewDuration(30 * time.Second), }, }, OCR2: toml.OCR2{ Enabled: ptr(true), - DatabaseTimeout: commonconfig.MustNewDuration(20 * time.Second), + DatabaseTimeout: commoncfg.MustNewDuration(20 * time.Second), }, OCR: toml.OCR{ Enabled: ptr(true), - BlockchainTimeout: commonconfig.MustNewDuration(5 * time.Second), + BlockchainTimeout: commoncfg.MustNewDuration(5 * time.Second), }, P2P: toml.P2P{ IncomingMessageBufferSize: ptr[int64](999), @@ -195,10 +195,10 @@ var ( ) func TestConfig_Marshal(t *testing.T) { - zeroSeconds := *commonconfig.MustNewDuration(time.Second * 0) - second := *commonconfig.MustNewDuration(time.Second) - minute := *commonconfig.MustNewDuration(time.Minute) - hour := *commonconfig.MustNewDuration(time.Hour) + zeroSeconds := *commoncfg.MustNewDuration(time.Second * 0) + second := *commoncfg.MustNewDuration(time.Second) + minute := *commoncfg.MustNewDuration(time.Minute) + hour := *commoncfg.MustNewDuration(time.Hour) mustPeerID := func(s string) *p2pkey.PeerID { id, err := p2pkey.MakePeerID(s) require.NoError(t, err) @@ -209,8 +209,8 @@ func TestConfig_Marshal(t *testing.T) { require.NoError(t, err) return &d } - mustAddress := func(s string) *ethkey.EIP55Address { - a, err := ethkey.NewEIP55Address(s) + mustAddress := func(s string) *types.EIP55Address { + a, err := types.NewEIP55Address(s) require.NoError(t, err) return &a } @@ -220,7 +220,7 @@ func TestConfig_Marshal(t *testing.T) { Core: toml.Core{ InsecureFastScrypt: ptr(true), RootDir: ptr("test/root/dir"), - ShutdownGracePeriod: commonconfig.MustNewDuration(10 * time.Second), + ShutdownGracePeriod: commoncfg.MustNewDuration(10 * time.Second), Insecure: toml.Insecure{ DevWebServer: ptr(false), OCRDevelopmentMode: ptr(false), @@ -261,17 +261,17 @@ func TestConfig_Marshal(t *testing.T) { UICSAKeys: ptr(true), } full.Database = toml.Database{ - DefaultIdleInTxSessionTimeout: commonconfig.MustNewDuration(time.Minute), - DefaultLockTimeout: commonconfig.MustNewDuration(time.Hour), - DefaultQueryTimeout: commonconfig.MustNewDuration(time.Second), + DefaultIdleInTxSessionTimeout: commoncfg.MustNewDuration(time.Minute), + DefaultLockTimeout: commoncfg.MustNewDuration(time.Hour), + DefaultQueryTimeout: commoncfg.MustNewDuration(time.Second), LogQueries: ptr(true), MigrateOnStartup: ptr(true), MaxIdleConns: ptr[int64](7), MaxOpenConns: ptr[int64](13), Listener: toml.DatabaseListener{ - MaxReconnectDuration: commonconfig.MustNewDuration(time.Minute), - MinReconnectInterval: commonconfig.MustNewDuration(5 * time.Minute), - FallbackPollInterval: commonconfig.MustNewDuration(2 * time.Minute), + MaxReconnectDuration: commoncfg.MustNewDuration(time.Minute), + MinReconnectInterval: commoncfg.MustNewDuration(5 * time.Minute), + FallbackPollInterval: commoncfg.MustNewDuration(2 * time.Minute), }, Lock: toml.DatabaseLock{ Enabled: ptr(false), @@ -290,8 +290,8 @@ func TestConfig_Marshal(t *testing.T) { Logging: ptr(true), BufferSize: ptr[uint16](1234), MaxBatchSize: ptr[uint16](4321), - SendInterval: commonconfig.MustNewDuration(time.Minute), - SendTimeout: commonconfig.MustNewDuration(5 * time.Second), + SendInterval: commoncfg.MustNewDuration(time.Minute), + SendTimeout: commoncfg.MustNewDuration(5 * time.Second), UseBatchSend: ptr(true), Endpoints: []toml.TelemetryIngressEndpoint{{ Network: ptr("EVM"), @@ -316,14 +316,14 @@ func TestConfig_Marshal(t *testing.T) { AuthenticationMethod: ptr("local"), AllowOrigins: ptr("*"), BridgeResponseURL: mustURL("https://bridge.response"), - BridgeCacheTTL: commonconfig.MustNewDuration(10 * time.Second), - HTTPWriteTimeout: commonconfig.MustNewDuration(time.Minute), + BridgeCacheTTL: commoncfg.MustNewDuration(10 * time.Second), + HTTPWriteTimeout: commoncfg.MustNewDuration(time.Minute), HTTPPort: ptr[uint16](56), SecureCookies: ptr(true), - SessionTimeout: commonconfig.MustNewDuration(time.Hour), - SessionReaperExpiration: commonconfig.MustNewDuration(7 * 24 * time.Hour), + SessionTimeout: commoncfg.MustNewDuration(time.Hour), + SessionReaperExpiration: commoncfg.MustNewDuration(7 * 24 * time.Hour), HTTPMaxSize: ptr(utils.FileSize(uint64(32770))), - StartTimeout: commonconfig.MustNewDuration(15 * time.Second), + StartTimeout: commoncfg.MustNewDuration(15 * time.Second), ListenIP: mustIP("192.158.1.37"), MFA: toml.WebServerMFA{ RPID: ptr("test-rpid"), @@ -331,8 +331,8 @@ func TestConfig_Marshal(t *testing.T) { }, LDAP: toml.WebServerLDAP{ ServerTLS: ptr(true), - SessionTimeout: commonconfig.MustNewDuration(15 * time.Minute), - QueryTimeout: commonconfig.MustNewDuration(2 * time.Minute), + SessionTimeout: commoncfg.MustNewDuration(15 * time.Minute), + QueryTimeout: commoncfg.MustNewDuration(2 * time.Minute), BaseUserAttr: ptr("uid"), BaseDN: ptr("dc=custom,dc=example,dc=com"), UsersDN: ptr("ou=users"), @@ -344,15 +344,15 @@ func TestConfig_Marshal(t *testing.T) { RunUserGroupCN: ptr("NodeRunners"), ReadUserGroupCN: ptr("NodeReadOnly"), UserApiTokenEnabled: ptr(false), - UserAPITokenDuration: commonconfig.MustNewDuration(240 * time.Hour), - UpstreamSyncInterval: commonconfig.MustNewDuration(0 * time.Second), - UpstreamSyncRateLimit: commonconfig.MustNewDuration(2 * time.Minute), + UserAPITokenDuration: commoncfg.MustNewDuration(240 * time.Hour), + UpstreamSyncInterval: commoncfg.MustNewDuration(0 * time.Second), + UpstreamSyncRateLimit: commoncfg.MustNewDuration(2 * time.Minute), }, RateLimit: toml.WebServerRateLimit{ Authenticated: ptr[int64](42), - AuthenticatedPeriod: commonconfig.MustNewDuration(time.Second), + AuthenticatedPeriod: commoncfg.MustNewDuration(time.Second), Unauthenticated: ptr[int64](7), - UnauthenticatedPeriod: commonconfig.MustNewDuration(time.Minute), + UnauthenticatedPeriod: commoncfg.MustNewDuration(time.Minute), }, TLS: toml.WebServerTLS{ CertPath: ptr("tls/cert/path"), @@ -365,14 +365,15 @@ func TestConfig_Marshal(t *testing.T) { } full.JobPipeline = toml.JobPipeline{ ExternalInitiatorsEnabled: ptr(true), - MaxRunDuration: commonconfig.MustNewDuration(time.Hour), + MaxRunDuration: commoncfg.MustNewDuration(time.Hour), MaxSuccessfulRuns: ptr[uint64](123456), - ReaperInterval: commonconfig.MustNewDuration(4 * time.Hour), - ReaperThreshold: commonconfig.MustNewDuration(7 * 24 * time.Hour), + ReaperInterval: commoncfg.MustNewDuration(4 * time.Hour), + ReaperThreshold: commoncfg.MustNewDuration(7 * 24 * time.Hour), ResultWriteQueueDepth: ptr[uint32](10), + VerboseLogging: ptr(true), HTTPRequest: toml.JobPipelineHTTPRequest{ MaxSize: ptr[utils.FileSize](100 * utils.MB), - DefaultTimeout: commonconfig.MustNewDuration(time.Minute), + DefaultTimeout: commoncfg.MustNewDuration(time.Minute), }, } full.FluxMonitor = toml.FluxMonitor{ @@ -382,11 +383,11 @@ func TestConfig_Marshal(t *testing.T) { full.OCR2 = toml.OCR2{ Enabled: ptr(true), ContractConfirmations: ptr[uint32](11), - BlockchainTimeout: commonconfig.MustNewDuration(3 * time.Second), - ContractPollInterval: commonconfig.MustNewDuration(time.Hour), - ContractSubscribeInterval: commonconfig.MustNewDuration(time.Minute), - ContractTransmitterTransmitTimeout: commonconfig.MustNewDuration(time.Minute), - DatabaseTimeout: commonconfig.MustNewDuration(8 * time.Second), + BlockchainTimeout: commoncfg.MustNewDuration(3 * time.Second), + ContractPollInterval: commoncfg.MustNewDuration(time.Hour), + ContractSubscribeInterval: commoncfg.MustNewDuration(time.Minute), + ContractTransmitterTransmitTimeout: commoncfg.MustNewDuration(time.Minute), + DatabaseTimeout: commoncfg.MustNewDuration(8 * time.Second), KeyBundleID: ptr(models.MustSha256HashFromHex("7a5f66bbe6594259325bf2b4f5b1a9c9")), CaptureEATelemetry: ptr(false), CaptureAutomationCustomTelemetry: ptr(true), @@ -396,14 +397,14 @@ func TestConfig_Marshal(t *testing.T) { } full.OCR = toml.OCR{ Enabled: ptr(true), - ObservationTimeout: commonconfig.MustNewDuration(11 * time.Second), - BlockchainTimeout: commonconfig.MustNewDuration(3 * time.Second), - ContractPollInterval: commonconfig.MustNewDuration(time.Hour), - ContractSubscribeInterval: commonconfig.MustNewDuration(time.Minute), + ObservationTimeout: commoncfg.MustNewDuration(11 * time.Second), + BlockchainTimeout: commoncfg.MustNewDuration(3 * time.Second), + ContractPollInterval: commoncfg.MustNewDuration(time.Hour), + ContractSubscribeInterval: commoncfg.MustNewDuration(time.Minute), DefaultTransactionQueueDepth: ptr[uint32](12), KeyBundleID: ptr(models.MustSha256HashFromHex("acdd42797a8b921b2910497badc50006")), SimulateTransactions: ptr(true), - TransmitterAddress: ptr(ethkey.MustEIP55Address("0xa0788FC17B1dEe36f057c42B6F373A34B014687e")), + TransmitterAddress: ptr(types.MustEIP55Address("0xa0788FC17B1dEe36f057c42B6F373A34B014687e")), CaptureEATelemetry: ptr(false), TraceLogging: ptr(false), } @@ -419,11 +420,30 @@ func TestConfig_Marshal(t *testing.T) { {PeerID: "12D3KooWMoejJznyDuEk5aX6GvbjaG12UzeornPCBNzMRqdwrFJw", Addrs: []string{"foo:42", "bar:10"}}, {PeerID: "12D3KooWMoejJznyDuEk5aX6GvbjaG12UzeornPCBNzMRqdwrFJw", Addrs: []string{"test:99"}}, }, - DeltaDial: commonconfig.MustNewDuration(time.Minute), - DeltaReconcile: commonconfig.MustNewDuration(time.Second), + DeltaDial: commoncfg.MustNewDuration(time.Minute), + DeltaReconcile: commoncfg.MustNewDuration(time.Second), ListenAddresses: &[]string{"foo", "bar"}, }, } + full.Capabilities = toml.Capabilities{ + Peering: toml.P2P{ + IncomingMessageBufferSize: ptr[int64](13), + OutgoingMessageBufferSize: ptr[int64](17), + PeerID: mustPeerID("12D3KooWMoejJznyDuEk5aX6GvbjaG12UzeornPCBNzMRqdwrFJw"), + TraceLogging: ptr(true), + V2: toml.P2PV2{ + Enabled: ptr(false), + AnnounceAddresses: &[]string{"a", "b", "c"}, + DefaultBootstrappers: &[]ocrcommontypes.BootstrapperLocator{ + {PeerID: "12D3KooWMoejJznyDuEk5aX6GvbjaG12UzeornPCBNzMRqdwrFJw", Addrs: []string{"foo:42", "bar:10"}}, + {PeerID: "12D3KooWMoejJznyDuEk5aX6GvbjaG12UzeornPCBNzMRqdwrFJw", Addrs: []string{"test:99"}}, + }, + DeltaDial: commoncfg.MustNewDuration(time.Minute), + DeltaReconcile: commoncfg.MustNewDuration(2 * time.Second), + ListenAddresses: &[]string{"foo", "bar"}, + }, + }, + } full.Keeper = toml.Keeper{ DefaultTransactionQueueDepth: ptr[uint32](17), GasPriceBufferPercent: ptr[uint16](12), @@ -434,7 +454,7 @@ func TestConfig_Marshal(t *testing.T) { Registry: toml.KeeperRegistry{ CheckGasOverhead: ptr[uint32](90), PerformGasOverhead: ptr[uint32](math.MaxUint32), - SyncInterval: commonconfig.MustNewDuration(time.Hour), + SyncInterval: commoncfg.MustNewDuration(time.Hour), SyncUpkeepQueueSize: ptr[uint32](31), MaxPerformDataSize: ptr[uint32](5000), }, @@ -442,9 +462,9 @@ func TestConfig_Marshal(t *testing.T) { full.AutoPprof = toml.AutoPprof{ Enabled: ptr(true), ProfileRoot: ptr("prof/root"), - PollInterval: commonconfig.MustNewDuration(time.Minute), - GatherDuration: commonconfig.MustNewDuration(12 * time.Second), - GatherTraceDuration: commonconfig.MustNewDuration(13 * time.Second), + PollInterval: commoncfg.MustNewDuration(time.Minute), + GatherDuration: commoncfg.MustNewDuration(12 * time.Second), + GatherTraceDuration: commoncfg.MustNewDuration(13 * time.Second), MaxProfileSize: ptr[utils.FileSize](utils.GB), CPUProfileRate: ptr[int64](7), MemProfileRate: ptr[int64](9), @@ -487,8 +507,8 @@ func TestConfig_Marshal(t *testing.T) { BumpTxDepth: ptr[uint32](6), BumpMin: assets.NewWeiI(100), FeeCapDefault: assets.NewWeiI(math.MaxInt64), - LimitDefault: ptr[uint32](12), - LimitMax: ptr[uint32](17), + LimitDefault: ptr[uint64](12), + LimitMax: ptr[uint64](17), LimitMultiplier: mustDecimal("1.234"), LimitTransfer: ptr[uint32](100), TipCapDefault: assets.NewWeiI(2), @@ -566,8 +586,8 @@ func TestConfig_Marshal(t *testing.T) { ContractConfirmations: ptr[uint16](11), ContractTransmitterTransmitTimeout: &minute, DatabaseTimeout: &second, - DeltaCOverride: commonconfig.MustNewDuration(time.Hour), - DeltaCJitterOverride: commonconfig.MustNewDuration(time.Second), + DeltaCOverride: commoncfg.MustNewDuration(time.Hour), + DeltaCJitterOverride: commoncfg.MustNewDuration(time.Second), ObservationGracePeriod: &second, }, OCR2: evmcfg.OCR2{ @@ -664,9 +684,9 @@ func TestConfig_Marshal(t *testing.T) { } full.Mercury = toml.Mercury{ Cache: toml.MercuryCache{ - LatestReportTTL: commonconfig.MustNewDuration(100 * time.Second), - MaxStaleAge: commonconfig.MustNewDuration(101 * time.Second), - LatestReportDeadline: commonconfig.MustNewDuration(102 * time.Second), + LatestReportTTL: commoncfg.MustNewDuration(100 * time.Second), + MaxStaleAge: commoncfg.MustNewDuration(101 * time.Second), + LatestReportDeadline: commoncfg.MustNewDuration(102 * time.Second), }, TLS: toml.MercuryTLS{ CertFile: ptr("/path/to/cert.pem"), @@ -826,6 +846,7 @@ MaxSuccessfulRuns = 123456 ReaperInterval = '4h0m0s' ReaperThreshold = '168h0m0s' ResultWriteQueueDepth = 10 +VerboseLogging = true [JobPipeline.HTTPRequest] DefaultTimeout = '1m0s' @@ -1130,7 +1151,7 @@ func TestConfig_full(t *testing.T) { require.NoError(t, config.DecodeTOML(strings.NewReader(fullTOML), &got)) // Except for some EVM node fields. for c := range got.EVM { - addr, err := ethkey.NewEIP55Address("0x2a3e23c6f242F5345320814aC8a1b4E58707D292") + addr, err := types.NewEIP55Address("0x2a3e23c6f242F5345320814aC8a1b4E58707D292") require.NoError(t, err) if got.EVM[c].ChainWriter.FromAddress == nil { got.EVM[c].ChainWriter.FromAddress = &addr @@ -1140,7 +1161,7 @@ func TestConfig_full(t *testing.T) { } for n := range got.EVM[c].Nodes { if got.EVM[c].Nodes[n].WSURL == nil { - got.EVM[c].Nodes[n].WSURL = new(commonconfig.URL) + got.EVM[c].Nodes[n].WSURL = new(commoncfg.URL) } if got.EVM[c].Nodes[n].SendOnly == nil { got.EVM[c].Nodes[n].SendOnly = ptr(true) @@ -1196,7 +1217,7 @@ func TestConfig_Validate(t *testing.T) { - 1: 6 errors: - ChainType: invalid value (Foo): must not be set with this chain id - Nodes: missing: must have at least one node - - ChainType: invalid value (Foo): must be one of arbitrum, metis, xdai, optimismBedrock, celo, kroma, wemix, zksync, scroll or omitted + - ChainType: invalid value (Foo): must be one of arbitrum, celo, gnosis, kroma, metis, optimismBedrock, scroll, wemix, zksync or omitted - HeadTracker.HistoryDepth: invalid value (30): must be equal to or greater than FinalityDepth - GasEstimator: 2 errors: - FeeCapDefault: invalid value (101 wei): must be equal to PriceMax (99 wei) since you are using FixedPrice estimation with gas bumping disabled in EIP1559 mode - PriceMax will be used as the FeeCap for transactions instead of FeeCapDefault @@ -1205,7 +1226,7 @@ func TestConfig_Validate(t *testing.T) { - 2: 5 errors: - ChainType: invalid value (Arbitrum): only "optimismBedrock" can be used with this chain id - Nodes: missing: must have at least one node - - ChainType: invalid value (Arbitrum): must be one of arbitrum, metis, xdai, optimismBedrock, celo, kroma, wemix, zksync, scroll or omitted + - ChainType: invalid value (Arbitrum): must be one of arbitrum, celo, gnosis, kroma, metis, optimismBedrock, scroll, wemix, zksync or omitted - FinalityDepth: invalid value (0): must be greater than or equal to 1 - MinIncomingConfirmations: invalid value (0): must be greater than or equal to 1 - 3.Nodes: 5 errors: @@ -1262,8 +1283,8 @@ func TestConfig_Validate(t *testing.T) { } } -func mustURL(s string) *commonconfig.URL { - var u commonconfig.URL +func mustURL(s string) *commoncfg.URL { + var u commoncfg.URL if err := u.UnmarshalText([]byte(s)); err != nil { panic(err) } @@ -1554,6 +1575,13 @@ func TestConfig_warnings(t *testing.T) { }, expectedErrors: []string{"Tracing.TLSCertPath: invalid value (/path/to/cert.pem): must be empty when Tracing.Mode is 'unencrypted'"}, }, + { + name: "Value warning - ChainType=xdai is deprecated", + config: Config{ + EVM: evmcfg.EVMConfigs{{Chain: evmcfg.Chain{ChainType: ptr(string(commonconfig.ChainXDai))}}}, + }, + expectedErrors: []string{"EVM.ChainType: invalid value (xdai): deprecated and will be removed in v2.13.0, use 'gnosis' instead"}, + }, } for _, tt := range tests { diff --git a/core/services/chainlink/mocks/general_config.go b/core/services/chainlink/mocks/general_config.go index 1dd85875395..a520a878d3c 100644 --- a/core/services/chainlink/mocks/general_config.go +++ b/core/services/chainlink/mocks/general_config.go @@ -86,6 +86,26 @@ func (_m *GeneralConfig) AutoPprof() config.AutoPprof { return r0 } +// Capabilities provides a mock function with given fields: +func (_m *GeneralConfig) Capabilities() config.Capabilities { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for Capabilities") + } + + var r0 config.Capabilities + if rf, ok := ret.Get(0).(func() config.Capabilities); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(config.Capabilities) + } + } + + return r0 +} + // ConfigTOML provides a mock function with given fields: func (_m *GeneralConfig) ConfigTOML() (string, string) { ret := _m.Called() diff --git a/core/services/chainlink/relayer_chain_interoperators_test.go b/core/services/chainlink/relayer_chain_interoperators_test.go index ea1a9ec3746..4cb6f57f8ba 100644 --- a/core/services/chainlink/relayer_chain_interoperators_test.go +++ b/core/services/chainlink/relayer_chain_interoperators_test.go @@ -206,6 +206,7 @@ func TestCoreRelayerChainInteroperators(t *testing.T) { ChainOpts: legacyevm.ChainOpts{ AppConfig: cfg, MailMon: &mailbox.Monitor{}, + SqlxDB: db, DB: db, }, CSAETHKeystore: keyStore, @@ -280,6 +281,7 @@ func TestCoreRelayerChainInteroperators(t *testing.T) { AppConfig: cfg, MailMon: &mailbox.Monitor{}, + SqlxDB: db, DB: db, }, CSAETHKeystore: keyStore, diff --git a/core/services/chainlink/relayer_factory.go b/core/services/chainlink/relayer_factory.go index c42ca77dc39..f5cb1badb95 100644 --- a/core/services/chainlink/relayer_factory.go +++ b/core/services/chainlink/relayer_factory.go @@ -67,7 +67,7 @@ func (r *RelayerFactory) NewEVM(ctx context.Context, config EVMFactoryConfig) (m } relayerOpts := evmrelay.RelayerOpts{ - DB: ccOpts.DB, + DB: ccOpts.SqlxDB, QConfig: ccOpts.AppConfig.Database(), CSAETHKeystore: config.CSAETHKeystore, MercuryPool: r.MercuryPool, diff --git a/core/services/chainlink/testdata/config-empty-effective.toml b/core/services/chainlink/testdata/config-empty-effective.toml index 148f6b24ff5..ff9a28176bd 100644 --- a/core/services/chainlink/testdata/config-empty-effective.toml +++ b/core/services/chainlink/testdata/config-empty-effective.toml @@ -116,6 +116,7 @@ MaxSuccessfulRuns = 10000 ReaperInterval = '1h0m0s' ReaperThreshold = '24h0m0s' ResultWriteQueueDepth = 100 +VerboseLogging = false [JobPipeline.HTTPRequest] DefaultTimeout = '15s' @@ -228,3 +229,18 @@ LatestReportDeadline = '5s' [Mercury.TLS] CertFile = '' + +[Capabilities] +[Capabilities.Peering] +IncomingMessageBufferSize = 10 +OutgoingMessageBufferSize = 10 +PeerID = '' +TraceLogging = false + +[Capabilities.Peering.V2] +Enabled = false +AnnounceAddresses = [] +DefaultBootstrappers = [] +DeltaDial = '15s' +DeltaReconcile = '1m0s' +ListenAddresses = [] diff --git a/core/services/chainlink/testdata/config-full.toml b/core/services/chainlink/testdata/config-full.toml index c1606a5b067..3fa9a9f73b6 100644 --- a/core/services/chainlink/testdata/config-full.toml +++ b/core/services/chainlink/testdata/config-full.toml @@ -122,6 +122,7 @@ MaxSuccessfulRuns = 123456 ReaperInterval = '4h0m0s' ReaperThreshold = '168h0m0s' ResultWriteQueueDepth = 10 +VerboseLogging = true [JobPipeline.HTTPRequest] DefaultTimeout = '1m0s' @@ -239,6 +240,21 @@ LatestReportDeadline = '1m42s' [Mercury.TLS] CertFile = '/path/to/cert.pem' +[Capabilities] +[Capabilities.Peering] +IncomingMessageBufferSize = 13 +OutgoingMessageBufferSize = 17 +PeerID = '12D3KooWMoejJznyDuEk5aX6GvbjaG12UzeornPCBNzMRqdwrFJw' +TraceLogging = true + +[Capabilities.Peering.V2] +Enabled = false +AnnounceAddresses = ['a', 'b', 'c'] +DefaultBootstrappers = ['12D3KooWMoejJznyDuEk5aX6GvbjaG12UzeornPCBNzMRqdwrFJw@foo:42/bar:10', '12D3KooWMoejJznyDuEk5aX6GvbjaG12UzeornPCBNzMRqdwrFJw@test:99'] +DeltaDial = '1m0s' +DeltaReconcile = '2s' +ListenAddresses = ['foo', 'bar'] + [[EVM]] ChainID = '1' Enabled = false diff --git a/core/services/chainlink/testdata/config-multi-chain-effective.toml b/core/services/chainlink/testdata/config-multi-chain-effective.toml index 9f69d4aa909..ef77c141328 100644 --- a/core/services/chainlink/testdata/config-multi-chain-effective.toml +++ b/core/services/chainlink/testdata/config-multi-chain-effective.toml @@ -116,6 +116,7 @@ MaxSuccessfulRuns = 10000 ReaperInterval = '1h0m0s' ReaperThreshold = '24h0m0s' ResultWriteQueueDepth = 100 +VerboseLogging = false [JobPipeline.HTTPRequest] DefaultTimeout = '30s' @@ -229,6 +230,21 @@ LatestReportDeadline = '5s' [Mercury.TLS] CertFile = '' +[Capabilities] +[Capabilities.Peering] +IncomingMessageBufferSize = 10 +OutgoingMessageBufferSize = 10 +PeerID = '' +TraceLogging = false + +[Capabilities.Peering.V2] +Enabled = false +AnnounceAddresses = [] +DefaultBootstrappers = [] +DeltaDial = '15s' +DeltaReconcile = '1m0s' +ListenAddresses = [] + [[EVM]] ChainID = '1' AutoCreateKey = true diff --git a/core/services/cron/delegate.go b/core/services/cron/delegate.go index 4a08fec5a40..05b5b36c00f 100644 --- a/core/services/cron/delegate.go +++ b/core/services/cron/delegate.go @@ -29,10 +29,10 @@ func (d *Delegate) JobType() job.Type { return job.Cron } -func (d *Delegate) BeforeJobCreated(spec job.Job) {} -func (d *Delegate) AfterJobCreated(spec job.Job) {} -func (d *Delegate) BeforeJobDeleted(spec job.Job) {} -func (d *Delegate) OnDeleteJob(spec job.Job, q pg.Queryer) error { return nil } +func (d *Delegate) BeforeJobCreated(spec job.Job) {} +func (d *Delegate) AfterJobCreated(spec job.Job) {} +func (d *Delegate) BeforeJobDeleted(spec job.Job) {} +func (d *Delegate) OnDeleteJob(ctx context.Context, spec job.Job, q pg.Queryer) error { return nil } // ServicesForSpec returns the scheduler to be used for running cron jobs func (d *Delegate) ServicesForSpec(ctx context.Context, spec job.Job) (services []job.ServiceCtx, err error) { diff --git a/core/services/directrequest/delegate.go b/core/services/directrequest/delegate.go index 083e6f02266..aa0f8cd4de0 100644 --- a/core/services/directrequest/delegate.go +++ b/core/services/directrequest/delegate.go @@ -63,10 +63,10 @@ func (d *Delegate) JobType() job.Type { return job.DirectRequest } -func (d *Delegate) BeforeJobCreated(spec job.Job) {} -func (d *Delegate) AfterJobCreated(spec job.Job) {} -func (d *Delegate) BeforeJobDeleted(spec job.Job) {} -func (d *Delegate) OnDeleteJob(spec job.Job, q pg.Queryer) error { return nil } +func (d *Delegate) BeforeJobCreated(spec job.Job) {} +func (d *Delegate) AfterJobCreated(spec job.Job) {} +func (d *Delegate) BeforeJobDeleted(spec job.Job) {} +func (d *Delegate) OnDeleteJob(ctx context.Context, spec job.Job, q pg.Queryer) error { return nil } // ServicesForSpec returns the log listener service for a direct request job func (d *Delegate) ServicesForSpec(ctx context.Context, jb job.Job) ([]job.ServiceCtx, error) { diff --git a/core/services/directrequest/validate.go b/core/services/directrequest/validate.go index 271e720660f..8cb9899d3f9 100644 --- a/core/services/directrequest/validate.go +++ b/core/services/directrequest/validate.go @@ -5,15 +5,15 @@ import ( "github.com/pkg/errors" "github.com/smartcontractkit/chainlink-common/pkg/assets" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils/big" "github.com/smartcontractkit/chainlink/v2/core/null" "github.com/smartcontractkit/chainlink/v2/core/services/job" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ethkey" "github.com/smartcontractkit/chainlink/v2/core/store/models" ) type DirectRequestToml struct { - ContractAddress ethkey.EIP55Address `toml:"contractAddress"` + ContractAddress types.EIP55Address `toml:"contractAddress"` Requesters models.AddressCollection `toml:"requesters"` MinContractPayment *assets.Link `toml:"minContractPaymentLinkJuels"` EVMChainID *big.Big `toml:"evmChainID"` diff --git a/core/services/feeds/models.go b/core/services/feeds/models.go index a5c8648fdd9..ac0568ca131 100644 --- a/core/services/feeds/models.go +++ b/core/services/feeds/models.go @@ -23,11 +23,12 @@ const ( type PluginType string const ( - PluginTypeCommit PluginType = "COMMIT" - PluginTypeExecute PluginType = "EXECUTE" - PluginTypeMedian PluginType = "MEDIAN" - PluginTypeMercury PluginType = "MERCURY" - PluginTypeUnknown PluginType = "UNKNOWN" + PluginTypeCommit PluginType = "COMMIT" + PluginTypeExecute PluginType = "EXECUTE" + PluginTypeMedian PluginType = "MEDIAN" + PluginTypeMercury PluginType = "MERCURY" + PluginTypeRebalancer PluginType = "REBALANCER" + PluginTypeUnknown PluginType = "UNKNOWN" ) func FromPluginTypeInput(pt PluginType) string { @@ -44,16 +45,19 @@ func ToPluginType(s string) (PluginType, error) { return PluginTypeMedian, nil case "mercury": return PluginTypeMercury, nil + case "rebalancer": + return PluginTypeRebalancer, nil default: return PluginTypeUnknown, errors.New("unknown plugin type") } } type Plugins struct { - Commit bool `json:"commit"` - Execute bool `json:"execute"` - Median bool `json:"median"` - Mercury bool `json:"mercury"` + Commit bool `json:"commit"` + Execute bool `json:"execute"` + Median bool `json:"median"` + Mercury bool `json:"mercury"` + Rebalancer bool `json:"rebalancer"` } func (p Plugins) Value() (driver.Value, error) { diff --git a/core/services/feeds/models_test.go b/core/services/feeds/models_test.go index 8a26d77e56a..9e3bb0f9f1c 100644 --- a/core/services/feeds/models_test.go +++ b/core/services/feeds/models_test.go @@ -64,6 +64,10 @@ func Test_ToPluginType(t *testing.T) { require.NoError(t, err) assert.Equal(t, pt, PluginTypeMercury) + pt, err = ToPluginType("rebalancer") + require.NoError(t, err) + assert.Equal(t, pt, PluginTypeRebalancer) + pt, err = ToPluginType("xxx") require.Error(t, err) assert.Equal(t, pt, PluginTypeUnknown) @@ -77,6 +81,7 @@ func Test_FromPluginType(t *testing.T) { assert.Equal(t, "execute", FromPluginTypeInput(PluginTypeExecute)) assert.Equal(t, "median", FromPluginTypeInput(PluginTypeMedian)) assert.Equal(t, "mercury", FromPluginTypeInput(PluginTypeMercury)) + assert.Equal(t, "rebalancer", FromPluginTypeInput(PluginTypeRebalancer)) assert.Equal(t, "unknown", FromPluginTypeInput(PluginTypeUnknown)) } @@ -241,12 +246,13 @@ func Test_Plugins_Value(t *testing.T) { var ( give = Plugins{ - Commit: true, - Execute: true, - Median: false, - Mercury: true, + Commit: true, + Execute: true, + Median: false, + Mercury: true, + Rebalancer: false, } - want = `{"commit":true,"execute":true,"median":false,"mercury":true}` + want = `{"commit":true,"execute":true,"median":false,"mercury":true,"rebalancer":false}` ) val, err := give.Value() @@ -262,12 +268,13 @@ func Test_Plugins_Scan(t *testing.T) { t.Parallel() var ( - give = `{"commit":true,"execute":true,"median":false,"mercury":true}` + give = `{"commit":true,"execute":true,"median":false,"mercury":true,"rebalancer":false}` want = Plugins{ - Commit: true, - Execute: true, - Median: false, - Mercury: true, + Commit: true, + Execute: true, + Median: false, + Mercury: true, + Rebalancer: false, } ) @@ -290,13 +297,14 @@ func Test_OCR2Config_Value(t *testing.T) { P2PPeerID: null.StringFrom("peerid"), KeyBundleID: null.StringFrom("ocrkeyid"), Plugins: Plugins{ - Commit: true, - Execute: true, - Median: false, - Mercury: true, + Commit: true, + Execute: true, + Median: false, + Mercury: true, + Rebalancer: false, }, } - want = `{"enabled":true,"is_bootstrap":false,"multiaddr":"multiaddr","forwarder_address":"forwarderaddress","p2p_peer_id":"peerid","key_bundle_id":"ocrkeyid","plugins":{"commit":true,"execute":true,"median":false,"mercury":true}}` + want = `{"enabled":true,"is_bootstrap":false,"multiaddr":"multiaddr","forwarder_address":"forwarderaddress","p2p_peer_id":"peerid","key_bundle_id":"ocrkeyid","plugins":{"commit":true,"execute":true,"median":false,"mercury":true,"rebalancer":false}}` ) val, err := give.Value() @@ -312,7 +320,7 @@ func Test_OCR2Config_Scan(t *testing.T) { t.Parallel() var ( - give = `{"enabled":true,"is_bootstrap":false,"multiaddr":"multiaddr","forwarder_address":"forwarderaddress","p2p_peer_id":"peerid","key_bundle_id":"ocrkeyid","plugins":{"commit":true,"execute":true,"median":false,"mercury":true}}` + give = `{"enabled":true,"is_bootstrap":false,"multiaddr":"multiaddr","forwarder_address":"forwarderaddress","p2p_peer_id":"peerid","key_bundle_id":"ocrkeyid","plugins":{"commit":true,"execute":true,"median":false,"mercury":true,"rebalancer":false}}` want = OCR2ConfigModel{ Enabled: true, IsBootstrap: false, @@ -321,10 +329,11 @@ func Test_OCR2Config_Scan(t *testing.T) { P2PPeerID: null.StringFrom("peerid"), KeyBundleID: null.StringFrom("ocrkeyid"), Plugins: Plugins{ - Commit: true, - Execute: true, - Median: false, - Mercury: true, + Commit: true, + Execute: true, + Median: false, + Mercury: true, + Rebalancer: false, }, } ) diff --git a/core/services/feeds/proto/feeds_manager.pb.go b/core/services/feeds/proto/feeds_manager.pb.go index 880cb8ed1a4..a73b4a0cd29 100644 --- a/core/services/feeds/proto/feeds_manager.pb.go +++ b/core/services/feeds/proto/feeds_manager.pb.go @@ -7,11 +7,10 @@ package proto import ( - reflect "reflect" - sync "sync" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) const ( @@ -1628,10 +1627,11 @@ type OCR2Config_Plugins struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Commit bool `protobuf:"varint,1,opt,name=commit,proto3" json:"commit,omitempty"` - Execute bool `protobuf:"varint,2,opt,name=execute,proto3" json:"execute,omitempty"` - Median bool `protobuf:"varint,3,opt,name=median,proto3" json:"median,omitempty"` - Mercury bool `protobuf:"varint,4,opt,name=mercury,proto3" json:"mercury,omitempty"` + Commit bool `protobuf:"varint,1,opt,name=commit,proto3" json:"commit,omitempty"` + Execute bool `protobuf:"varint,2,opt,name=execute,proto3" json:"execute,omitempty"` + Median bool `protobuf:"varint,3,opt,name=median,proto3" json:"median,omitempty"` + Mercury bool `protobuf:"varint,4,opt,name=mercury,proto3" json:"mercury,omitempty"` + Rebalancer bool `protobuf:"varint,5,opt,name=rebalancer,proto3" json:"rebalancer,omitempty"` } func (x *OCR2Config_Plugins) Reset() { @@ -1694,6 +1694,13 @@ func (x *OCR2Config_Plugins) GetMercury() bool { return false } +func (x *OCR2Config_Plugins) GetRebalancer() bool { + if x != nil { + return x.Rebalancer + } + return false +} + var File_pkg_noderpc_proto_feeds_manager_proto protoreflect.FileDescriptor var file_pkg_noderpc_proto_feeds_manager_proto_rawDesc = []byte{ @@ -1745,7 +1752,7 @@ var file_pkg_noderpc_proto_feeds_manager_proto_rawDesc = []byte{ 0x6e, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, 0x6f, 0x6e, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x22, 0xe3, 0x05, 0x0a, 0x0a, 0x4f, 0x43, 0x52, 0x32, 0x43, 0x6f, 0x6e, 0x66, + 0x65, 0x73, 0x73, 0x22, 0x84, 0x06, 0x0a, 0x0a, 0x4f, 0x43, 0x52, 0x32, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x73, 0x5f, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x18, 0x02, 0x20, 0x01, @@ -1783,150 +1790,152 @@ var file_pkg_noderpc_proto_feeds_manager_proto_rawDesc = []byte{ 0x6f, 0x6e, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, 0x6f, 0x6e, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x1a, 0x6d, 0x0a, 0x07, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x12, - 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x78, 0x65, 0x63, 0x75, - 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, - 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x06, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x72, - 0x63, 0x75, 0x72, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x6d, 0x65, 0x72, 0x63, - 0x75, 0x72, 0x79, 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x65, - 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0xa9, 0x02, 0x0a, 0x0b, 0x43, 0x68, - 0x61, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x20, 0x0a, 0x05, 0x63, 0x68, 0x61, - 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x63, 0x66, 0x6d, 0x2e, 0x43, - 0x68, 0x61, 0x69, 0x6e, 0x52, 0x05, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x27, 0x0a, 0x0f, 0x61, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x5f, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x64, 0x6d, - 0x69, 0x6e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x46, 0x0a, 0x13, 0x66, 0x6c, 0x75, - 0x78, 0x5f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, 0x66, 0x6d, 0x2e, 0x46, 0x6c, 0x75, - 0x78, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x11, - 0x66, 0x6c, 0x75, 0x78, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x12, 0x30, 0x0a, 0x0b, 0x6f, 0x63, 0x72, 0x31, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x63, 0x66, 0x6d, 0x2e, 0x4f, 0x43, 0x52, - 0x31, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0a, 0x6f, 0x63, 0x72, 0x31, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x12, 0x30, 0x0a, 0x0b, 0x6f, 0x63, 0x72, 0x32, 0x5f, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x63, 0x66, 0x6d, 0x2e, 0x4f, - 0x43, 0x52, 0x32, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0a, 0x6f, 0x63, 0x72, 0x32, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x9f, 0x03, 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x29, 0x0a, 0x09, 0x6a, - 0x6f, 0x62, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x0c, - 0x2e, 0x63, 0x66, 0x6d, 0x2e, 0x4a, 0x6f, 0x62, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x6a, 0x6f, - 0x62, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, - 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, - 0x64, 0x12, 0x2b, 0x0a, 0x11, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, 0x61, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, 0x2a, - 0x0a, 0x11, 0x69, 0x73, 0x5f, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x5f, 0x70, - 0x65, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x69, 0x73, 0x42, 0x6f, 0x6f, - 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x50, 0x65, 0x65, 0x72, 0x12, 0x2f, 0x0a, 0x13, 0x62, 0x6f, - 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x61, 0x64, 0x64, - 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, - 0x61, 0x70, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x61, 0x64, 0x64, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x76, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, - 0x64, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x03, 0x52, 0x08, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, - 0x64, 0x73, 0x12, 0x28, 0x0a, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, 0x08, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x63, 0x66, 0x6d, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x52, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x22, 0x0a, 0x06, - 0x63, 0x68, 0x61, 0x69, 0x6e, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x63, - 0x66, 0x6d, 0x2e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x06, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x73, - 0x12, 0x35, 0x0a, 0x0d, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x63, 0x66, 0x6d, 0x2e, 0x43, 0x68, - 0x61, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0c, 0x63, 0x68, 0x61, 0x69, 0x6e, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x22, 0x14, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x42, 0x0a, - 0x12, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x64, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x22, 0x15, 0x0a, 0x13, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x64, 0x4a, 0x6f, 0x62, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x14, 0x0a, 0x12, 0x48, 0x65, 0x61, 0x6c, - 0x74, 0x68, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x15, - 0x0a, 0x13, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x42, 0x0a, 0x12, 0x52, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x65, - 0x64, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x75, - 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, - 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x15, 0x0a, 0x13, 0x52, 0x65, 0x6a, - 0x65, 0x63, 0x74, 0x65, 0x64, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x43, 0x0a, 0x13, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x65, 0x64, 0x4a, 0x6f, 0x62, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x76, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x76, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x16, 0x0a, 0x14, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, - 0x65, 0x64, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x71, 0x0a, - 0x11, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, - 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, 0x1e, 0x0a, 0x0a, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x61, - 0x64, 0x64, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x6d, 0x75, 0x6c, 0x74, - 0x69, 0x61, 0x64, 0x64, 0x72, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x22, 0x24, 0x0a, 0x12, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x22, 0x0a, 0x10, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x23, 0x0a, 0x11, 0x44, 0x65, - 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, - 0x22, 0x0a, 0x10, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, + 0x72, 0x65, 0x73, 0x73, 0x1a, 0x8d, 0x01, 0x0a, 0x07, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, + 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x78, 0x65, 0x63, 0x75, + 0x74, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x6e, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x06, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, + 0x72, 0x63, 0x75, 0x72, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x6d, 0x65, 0x72, + 0x63, 0x75, 0x72, 0x79, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x65, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, + 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x72, 0x65, 0x62, 0x61, 0x6c, 0x61, + 0x6e, 0x63, 0x65, 0x72, 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, + 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0xa9, 0x02, 0x0a, 0x0b, 0x43, + 0x68, 0x61, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x20, 0x0a, 0x05, 0x63, 0x68, + 0x61, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x63, 0x66, 0x6d, 0x2e, + 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x05, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x27, 0x0a, 0x0f, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x5f, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x64, + 0x6d, 0x69, 0x6e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x46, 0x0a, 0x13, 0x66, 0x6c, + 0x75, 0x78, 0x5f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, 0x66, 0x6d, 0x2e, 0x46, 0x6c, + 0x75, 0x78, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, + 0x11, 0x66, 0x6c, 0x75, 0x78, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x12, 0x30, 0x0a, 0x0b, 0x6f, 0x63, 0x72, 0x31, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x63, 0x66, 0x6d, 0x2e, 0x4f, 0x43, + 0x52, 0x31, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0a, 0x6f, 0x63, 0x72, 0x31, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x12, 0x30, 0x0a, 0x0b, 0x6f, 0x63, 0x72, 0x32, 0x5f, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x63, 0x66, 0x6d, 0x2e, + 0x4f, 0x43, 0x52, 0x32, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0a, 0x6f, 0x63, 0x72, 0x32, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x9f, 0x03, 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x29, 0x0a, 0x09, + 0x6a, 0x6f, 0x62, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0e, 0x32, + 0x0c, 0x2e, 0x63, 0x66, 0x6d, 0x2e, 0x4a, 0x6f, 0x62, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x6a, + 0x6f, 0x62, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x69, 0x6e, + 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, + 0x49, 0x64, 0x12, 0x2b, 0x0a, 0x11, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, 0x61, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, + 0x2a, 0x0a, 0x11, 0x69, 0x73, 0x5f, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x5f, + 0x70, 0x65, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x69, 0x73, 0x42, 0x6f, + 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x50, 0x65, 0x65, 0x72, 0x12, 0x2f, 0x0a, 0x13, 0x62, + 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x61, 0x64, + 0x64, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, + 0x72, 0x61, 0x70, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x61, 0x64, 0x64, 0x72, 0x12, 0x18, 0x0a, 0x07, + 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, + 0x69, 0x64, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x03, 0x52, 0x08, 0x63, 0x68, 0x61, 0x69, 0x6e, + 0x49, 0x64, 0x73, 0x12, 0x28, 0x0a, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, + 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x63, 0x66, 0x6d, 0x2e, 0x41, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x52, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x22, 0x0a, + 0x06, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, + 0x63, 0x66, 0x6d, 0x2e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x06, 0x63, 0x68, 0x61, 0x69, 0x6e, + 0x73, 0x12, 0x35, 0x0a, 0x0d, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x63, 0x66, 0x6d, 0x2e, 0x43, + 0x68, 0x61, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0c, 0x63, 0x68, 0x61, 0x69, + 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x22, 0x14, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x42, + 0x0a, 0x12, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x64, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x22, 0x15, 0x0a, 0x13, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x64, 0x4a, 0x6f, + 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x14, 0x0a, 0x12, 0x48, 0x65, 0x61, + 0x6c, 0x74, 0x68, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, + 0x15, 0x0a, 0x13, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x42, 0x0a, 0x12, 0x52, 0x65, 0x6a, 0x65, 0x63, 0x74, + 0x65, 0x64, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, + 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, + 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x15, 0x0a, 0x13, 0x52, 0x65, + 0x6a, 0x65, 0x63, 0x74, 0x65, 0x64, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x43, 0x0a, 0x13, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x65, 0x64, 0x4a, 0x6f, + 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, + 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x76, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x16, 0x0a, 0x14, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, + 0x6c, 0x65, 0x64, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x71, + 0x0a, 0x11, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x02, 0x69, 0x64, 0x22, 0x23, 0x0a, 0x11, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x4a, 0x6f, 0x62, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x2a, 0x63, 0x0a, 0x07, 0x4a, 0x6f, 0x62, 0x54, - 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x14, 0x4a, 0x4f, 0x42, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, - 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x19, 0x0a, - 0x15, 0x4a, 0x4f, 0x42, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x4c, 0x55, 0x58, 0x5f, 0x4d, - 0x4f, 0x4e, 0x49, 0x54, 0x4f, 0x52, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x4a, 0x4f, 0x42, 0x5f, - 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x43, 0x52, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x4a, 0x4f, - 0x42, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x43, 0x52, 0x32, 0x10, 0x03, 0x2a, 0x52, 0x0a, - 0x09, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x43, 0x48, - 0x41, 0x49, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, - 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x43, 0x48, 0x41, 0x49, 0x4e, 0x5f, - 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x56, 0x4d, 0x10, 0x01, 0x12, 0x15, 0x0a, 0x11, 0x43, 0x48, - 0x41, 0x49, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x4f, 0x4c, 0x41, 0x4e, 0x41, 0x10, - 0x02, 0x32, 0xd8, 0x02, 0x0a, 0x0c, 0x46, 0x65, 0x65, 0x64, 0x73, 0x4d, 0x61, 0x6e, 0x61, 0x67, - 0x65, 0x72, 0x12, 0x40, 0x0a, 0x0b, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x64, 0x4a, 0x6f, - 0x62, 0x12, 0x17, 0x2e, 0x63, 0x66, 0x6d, 0x2e, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x64, - 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x63, 0x66, 0x6d, - 0x2e, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x64, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0b, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x63, 0x68, - 0x65, 0x63, 0x6b, 0x12, 0x17, 0x2e, 0x63, 0x66, 0x6d, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, - 0x63, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x63, - 0x66, 0x6d, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x2e, 0x63, 0x66, 0x6d, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x63, - 0x66, 0x6d, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0b, 0x52, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x65, - 0x64, 0x4a, 0x6f, 0x62, 0x12, 0x17, 0x2e, 0x63, 0x66, 0x6d, 0x2e, 0x52, 0x65, 0x6a, 0x65, 0x63, - 0x74, 0x65, 0x64, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, - 0x63, 0x66, 0x6d, 0x2e, 0x52, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x65, 0x64, 0x4a, 0x6f, 0x62, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x43, 0x0a, 0x0c, 0x43, 0x61, 0x6e, 0x63, 0x65, - 0x6c, 0x6c, 0x65, 0x64, 0x4a, 0x6f, 0x62, 0x12, 0x18, 0x2e, 0x63, 0x66, 0x6d, 0x2e, 0x43, 0x61, - 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x65, 0x64, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x19, 0x2e, 0x63, 0x66, 0x6d, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x65, - 0x64, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xc4, 0x01, 0x0a, - 0x0b, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x3d, 0x0a, 0x0a, - 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x4a, 0x6f, 0x62, 0x12, 0x16, 0x2e, 0x63, 0x66, 0x6d, - 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x63, 0x66, 0x6d, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, - 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x09, 0x44, - 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x12, 0x15, 0x2e, 0x63, 0x66, 0x6d, 0x2e, 0x44, - 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x16, 0x2e, 0x63, 0x66, 0x6d, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x09, 0x52, 0x65, 0x76, 0x6f, 0x6b, - 0x65, 0x4a, 0x6f, 0x62, 0x12, 0x15, 0x2e, 0x63, 0x66, 0x6d, 0x2e, 0x52, 0x65, 0x76, 0x6f, 0x6b, - 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x63, 0x66, - 0x6d, 0x2e, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x42, 0x3d, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x73, 0x6d, 0x61, 0x72, 0x74, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x6b, - 0x69, 0x74, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2d, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, - 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x72, 0x70, 0x63, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, 0x1e, 0x0a, 0x0a, 0x6d, 0x75, 0x6c, 0x74, 0x69, + 0x61, 0x64, 0x64, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x6d, 0x75, 0x6c, + 0x74, 0x69, 0x61, 0x64, 0x64, 0x72, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x22, 0x24, 0x0a, 0x12, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x4a, 0x6f, 0x62, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x22, 0x0a, 0x10, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x23, 0x0a, 0x11, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, + 0x22, 0x22, 0x0a, 0x10, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x02, 0x69, 0x64, 0x22, 0x23, 0x0a, 0x11, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x4a, 0x6f, + 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x2a, 0x63, 0x0a, 0x07, 0x4a, 0x6f, 0x62, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x14, 0x4a, 0x4f, 0x42, 0x5f, 0x54, 0x59, 0x50, 0x45, + 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x19, + 0x0a, 0x15, 0x4a, 0x4f, 0x42, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x4c, 0x55, 0x58, 0x5f, + 0x4d, 0x4f, 0x4e, 0x49, 0x54, 0x4f, 0x52, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x4a, 0x4f, 0x42, + 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x43, 0x52, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x4a, + 0x4f, 0x42, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x43, 0x52, 0x32, 0x10, 0x03, 0x2a, 0x52, + 0x0a, 0x09, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x43, + 0x48, 0x41, 0x49, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, + 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x43, 0x48, 0x41, 0x49, 0x4e, + 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x56, 0x4d, 0x10, 0x01, 0x12, 0x15, 0x0a, 0x11, 0x43, + 0x48, 0x41, 0x49, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x4f, 0x4c, 0x41, 0x4e, 0x41, + 0x10, 0x02, 0x32, 0xd8, 0x02, 0x0a, 0x0c, 0x46, 0x65, 0x65, 0x64, 0x73, 0x4d, 0x61, 0x6e, 0x61, + 0x67, 0x65, 0x72, 0x12, 0x40, 0x0a, 0x0b, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x64, 0x4a, + 0x6f, 0x62, 0x12, 0x17, 0x2e, 0x63, 0x66, 0x6d, 0x2e, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, + 0x64, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x63, 0x66, + 0x6d, 0x2e, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x64, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0b, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x63, + 0x68, 0x65, 0x63, 0x6b, 0x12, 0x17, 0x2e, 0x63, 0x66, 0x6d, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, + 0x68, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, + 0x63, 0x66, 0x6d, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x2e, 0x63, 0x66, 0x6d, 0x2e, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, + 0x63, 0x66, 0x6d, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0b, 0x52, 0x65, 0x6a, 0x65, 0x63, 0x74, + 0x65, 0x64, 0x4a, 0x6f, 0x62, 0x12, 0x17, 0x2e, 0x63, 0x66, 0x6d, 0x2e, 0x52, 0x65, 0x6a, 0x65, + 0x63, 0x74, 0x65, 0x64, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, + 0x2e, 0x63, 0x66, 0x6d, 0x2e, 0x52, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x65, 0x64, 0x4a, 0x6f, 0x62, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x43, 0x0a, 0x0c, 0x43, 0x61, 0x6e, 0x63, + 0x65, 0x6c, 0x6c, 0x65, 0x64, 0x4a, 0x6f, 0x62, 0x12, 0x18, 0x2e, 0x63, 0x66, 0x6d, 0x2e, 0x43, + 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x65, 0x64, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x63, 0x66, 0x6d, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, + 0x65, 0x64, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xc4, 0x01, + 0x0a, 0x0b, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x3d, 0x0a, + 0x0a, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x4a, 0x6f, 0x62, 0x12, 0x16, 0x2e, 0x63, 0x66, + 0x6d, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x63, 0x66, 0x6d, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, + 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x09, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x12, 0x15, 0x2e, 0x63, 0x66, 0x6d, 0x2e, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x16, 0x2e, 0x63, 0x66, 0x6d, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x09, 0x52, 0x65, 0x76, 0x6f, + 0x6b, 0x65, 0x4a, 0x6f, 0x62, 0x12, 0x15, 0x2e, 0x63, 0x66, 0x6d, 0x2e, 0x52, 0x65, 0x76, 0x6f, + 0x6b, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x63, + 0x66, 0x6d, 0x2e, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x3d, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x73, 0x6d, 0x61, 0x72, 0x74, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, + 0x6b, 0x69, 0x74, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2d, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, + 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x72, 0x70, 0x63, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/core/services/feeds/service.go b/core/services/feeds/service.go index ddb683facfb..abb85f39fe4 100644 --- a/core/services/feeds/service.go +++ b/core/services/feeds/service.go @@ -19,6 +19,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/evm/utils/big" "github.com/smartcontractkit/chainlink/v2/core/chains/legacyevm" "github.com/smartcontractkit/chainlink/v2/core/logger" @@ -26,7 +27,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/services/fluxmonitorv2" "github.com/smartcontractkit/chainlink/v2/core/services/job" "github.com/smartcontractkit/chainlink/v2/core/services/keystore" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ethkey" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ocrkey" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/p2pkey" "github.com/smartcontractkit/chainlink/v2/core/services/ocr" @@ -1101,7 +1101,7 @@ func (s *service) findExistingJobForOCR2(j *job.Job, qopts pg.QOpt) (int32, erro // findExistingJobForOCRFlux looks for existing job for OCR or flux func (s *service) findExistingJobForOCRFlux(j *job.Job, qopts pg.QOpt) (int32, error) { - var address ethkey.EIP55Address + var address types.EIP55Address var evmChainID *big.Big switch j.Type { @@ -1251,10 +1251,11 @@ func (s *service) newOCR2ConfigMsg(cfg OCR2ConfigModel) (*pb.OCR2Config, error) Multiaddr: cfg.Multiaddr.ValueOrZero(), ForwarderAddress: cfg.ForwarderAddress.Ptr(), Plugins: &pb.OCR2Config_Plugins{ - Commit: cfg.Plugins.Commit, - Execute: cfg.Plugins.Execute, - Median: cfg.Plugins.Median, - Mercury: cfg.Plugins.Mercury, + Commit: cfg.Plugins.Commit, + Execute: cfg.Plugins.Execute, + Median: cfg.Plugins.Median, + Mercury: cfg.Plugins.Mercury, + Rebalancer: cfg.Plugins.Rebalancer, }, } diff --git a/core/services/feeds/service_test.go b/core/services/feeds/service_test.go index be3620efac5..afefc5b2df8 100644 --- a/core/services/feeds/service_test.go +++ b/core/services/feeds/service_test.go @@ -20,6 +20,7 @@ import ( commonconfig "github.com/smartcontractkit/chainlink-common/pkg/config" "github.com/smartcontractkit/chainlink-common/pkg/services/servicetest" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/headtracker" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils/big" "github.com/smartcontractkit/chainlink/v2/core/chains/legacyevm" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" @@ -35,7 +36,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/services/job" jobmocks "github.com/smartcontractkit/chainlink/v2/core/services/job/mocks" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/csakey" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ethkey" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/keystest" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ocrkey" ksmocks "github.com/smartcontractkit/chainlink/v2/core/services/keystore/mocks" @@ -1153,10 +1153,11 @@ func Test_Service_SyncNodeInfo(t *testing.T) { Multiaddr: null.StringFrom(multiaddr), ForwarderAddress: null.StringFrom(forwarderAddr), Plugins: feeds.Plugins{ - Commit: true, - Execute: true, - Median: false, - Mercury: true, + Commit: true, + Execute: true, + Median: false, + Mercury: true, + Rebalancer: true, }, }, } @@ -1204,10 +1205,11 @@ func Test_Service_SyncNodeInfo(t *testing.T) { Multiaddr: multiaddr, ForwarderAddress: &forwarderAddr, Plugins: &proto.OCR2Config_Plugins{ - Commit: ccfg.OCR2Config.Plugins.Commit, - Execute: ccfg.OCR2Config.Plugins.Execute, - Median: ccfg.OCR2Config.Plugins.Median, - Mercury: ccfg.OCR2Config.Plugins.Mercury, + Commit: ccfg.OCR2Config.Plugins.Commit, + Execute: ccfg.OCR2Config.Plugins.Execute, + Median: ccfg.OCR2Config.Plugins.Median, + Mercury: ccfg.OCR2Config.Plugins.Mercury, + Rebalancer: ccfg.OCR2Config.Plugins.Rebalancer, }, }, }, @@ -1545,7 +1547,7 @@ func Test_Service_ListSpecsByJobProposalIDs(t *testing.T) { func Test_Service_ApproveSpec(t *testing.T) { var evmChainID *big.Big - address := ethkey.EIP55AddressFromAddress(common.Address{}) + address := types.EIP55AddressFromAddress(common.Address{}) externalJobID := uuid.New() var ( diff --git a/core/services/fluxmonitorv2/config.go b/core/services/fluxmonitorv2/config.go index 18fdf72798b..585c3f3f329 100644 --- a/core/services/fluxmonitorv2/config.go +++ b/core/services/fluxmonitorv2/config.go @@ -15,7 +15,7 @@ type Config interface { } type EvmFeeConfig interface { - LimitDefault() uint32 // Evm + LimitDefault() uint64 // Evm LimitJobType() config.LimitJobType } diff --git a/core/services/fluxmonitorv2/contract_submitter.go b/core/services/fluxmonitorv2/contract_submitter.go index c5a6e599f5d..c8d98a1a2f2 100644 --- a/core/services/fluxmonitorv2/contract_submitter.go +++ b/core/services/fluxmonitorv2/contract_submitter.go @@ -25,7 +25,7 @@ type FluxAggregatorContractSubmitter struct { flux_aggregator_wrapper.FluxAggregatorInterface orm ORM keyStore KeyStoreInterface - gasLimit uint32 + gasLimit uint64 forwardingAllowed bool chainID *big.Int } @@ -35,7 +35,7 @@ func NewFluxAggregatorContractSubmitter( contract flux_aggregator_wrapper.FluxAggregatorInterface, orm ORM, keyStore KeyStoreInterface, - gasLimit uint32, + gasLimit uint64, forwardingAllowed bool, chainID *big.Int, ) *FluxAggregatorContractSubmitter { diff --git a/core/services/fluxmonitorv2/contract_submitter_test.go b/core/services/fluxmonitorv2/contract_submitter_test.go index 4c8ce019bfd..238cf96e033 100644 --- a/core/services/fluxmonitorv2/contract_submitter_test.go +++ b/core/services/fluxmonitorv2/contract_submitter_test.go @@ -19,7 +19,7 @@ func TestFluxAggregatorContractSubmitter_Submit(t *testing.T) { fluxAggregator = mocks.NewFluxAggregator(t) orm = fmmocks.NewORM(t) keyStore = fmmocks.NewKeyStoreInterface(t) - gasLimit = uint32(2100) + gasLimit = uint64(2100) forwardingAllowed = false submitter = fluxmonitorv2.NewFluxAggregatorContractSubmitter(fluxAggregator, orm, keyStore, gasLimit, forwardingAllowed, testutils.FixtureChainID) diff --git a/core/services/fluxmonitorv2/delegate.go b/core/services/fluxmonitorv2/delegate.go index 5de59432d11..1e2eba8d000 100644 --- a/core/services/fluxmonitorv2/delegate.go +++ b/core/services/fluxmonitorv2/delegate.go @@ -56,10 +56,10 @@ func (d *Delegate) JobType() job.Type { return job.FluxMonitor } -func (d *Delegate) BeforeJobCreated(spec job.Job) {} -func (d *Delegate) AfterJobCreated(spec job.Job) {} -func (d *Delegate) BeforeJobDeleted(spec job.Job) {} -func (d *Delegate) OnDeleteJob(spec job.Job, q pg.Queryer) error { return nil } +func (d *Delegate) BeforeJobCreated(spec job.Job) {} +func (d *Delegate) AfterJobCreated(spec job.Job) {} +func (d *Delegate) BeforeJobDeleted(spec job.Job) {} +func (d *Delegate) OnDeleteJob(ctx context.Context, spec job.Job, q pg.Queryer) error { return nil } // ServicesForSpec returns the flux monitor service for the job spec func (d *Delegate) ServicesForSpec(ctx context.Context, jb job.Job) (services []job.ServiceCtx, err error) { diff --git a/core/services/fluxmonitorv2/flux_monitor.go b/core/services/fluxmonitorv2/flux_monitor.go index f21e56cbc80..724c03daa91 100644 --- a/core/services/fluxmonitorv2/flux_monitor.go +++ b/core/services/fluxmonitorv2/flux_monitor.go @@ -188,9 +188,9 @@ func NewFromJobSpec( gasLimit := fcfg.LimitDefault() fmLimit := fcfg.LimitJobType().FM() if jobSpec.GasLimit.Valid { - gasLimit = jobSpec.GasLimit.Uint32 + gasLimit = uint64(jobSpec.GasLimit.Uint32) } else if fmLimit != nil { - gasLimit = *fmLimit + gasLimit = uint64(*fmLimit) } contractSubmitter := NewFluxAggregatorContractSubmitter( diff --git a/core/services/fluxmonitorv2/integrations_test.go b/core/services/fluxmonitorv2/integrations_test.go index d2cb14a8dae..1e778ed0857 100644 --- a/core/services/fluxmonitorv2/integrations_test.go +++ b/core/services/fluxmonitorv2/integrations_test.go @@ -30,6 +30,7 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/bridges" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/assets" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/log" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" evmutils "github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/flags_wrapper" faw "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/flux_aggregator_wrapper" @@ -623,7 +624,7 @@ func TestFluxMonitor_NewRound(t *testing.T) { app := startApplication(t, fa, func(c *chainlink.Config, s *chainlink.Secrets) { c.JobPipeline.HTTPRequest.DefaultTimeout = commonconfig.MustNewDuration(100 * time.Millisecond) c.Database.Listener.FallbackPollInterval = commonconfig.MustNewDuration(1 * time.Second) - flags := ethkey.EIP55AddressFromAddress(fa.flagsContractAddress) + flags := types.EIP55AddressFromAddress(fa.flagsContractAddress) c.EVM[0].FlagsContractAddress = &flags }) @@ -734,7 +735,7 @@ func TestFluxMonitor_HibernationMode(t *testing.T) { app := startApplication(t, fa, func(c *chainlink.Config, s *chainlink.Secrets) { c.JobPipeline.HTTPRequest.DefaultTimeout = commonconfig.MustNewDuration(100 * time.Millisecond) c.Database.Listener.FallbackPollInterval = commonconfig.MustNewDuration(1 * time.Second) - flags := ethkey.EIP55AddressFromAddress(fa.flagsContractAddress) + flags := types.EIP55AddressFromAddress(fa.flagsContractAddress) c.EVM[0].FlagsContractAddress = &flags }) diff --git a/core/services/fluxmonitorv2/mocks/orm.go b/core/services/fluxmonitorv2/mocks/orm.go index 8d277d61d2e..287c7ebb5fa 100644 --- a/core/services/fluxmonitorv2/mocks/orm.go +++ b/core/services/fluxmonitorv2/mocks/orm.go @@ -48,7 +48,7 @@ func (_m *ORM) CountFluxMonitorRoundStats() (int, error) { } // CreateEthTransaction provides a mock function with given fields: ctx, fromAddress, toAddress, payload, gasLimit, idempotencyKey -func (_m *ORM) CreateEthTransaction(ctx context.Context, fromAddress common.Address, toAddress common.Address, payload []byte, gasLimit uint32, idempotencyKey *string) error { +func (_m *ORM) CreateEthTransaction(ctx context.Context, fromAddress common.Address, toAddress common.Address, payload []byte, gasLimit uint64, idempotencyKey *string) error { ret := _m.Called(ctx, fromAddress, toAddress, payload, gasLimit, idempotencyKey) if len(ret) == 0 { @@ -56,7 +56,7 @@ func (_m *ORM) CreateEthTransaction(ctx context.Context, fromAddress common.Addr } var r0 error - if rf, ok := ret.Get(0).(func(context.Context, common.Address, common.Address, []byte, uint32, *string) error); ok { + if rf, ok := ret.Get(0).(func(context.Context, common.Address, common.Address, []byte, uint64, *string) error); ok { r0 = rf(ctx, fromAddress, toAddress, payload, gasLimit, idempotencyKey) } else { r0 = ret.Error(0) diff --git a/core/services/fluxmonitorv2/orm.go b/core/services/fluxmonitorv2/orm.go index f85ab146c7e..91973387e32 100644 --- a/core/services/fluxmonitorv2/orm.go +++ b/core/services/fluxmonitorv2/orm.go @@ -27,7 +27,7 @@ type ORM interface { DeleteFluxMonitorRoundsBackThrough(aggregator common.Address, roundID uint32) error FindOrCreateFluxMonitorRoundStats(aggregator common.Address, roundID uint32, newRoundLogs uint) (FluxMonitorRoundStatsV2, error) UpdateFluxMonitorRoundStats(aggregator common.Address, roundID uint32, runID int64, newRoundLogsAddition uint, qopts ...pg.QOpt) error - CreateEthTransaction(ctx context.Context, fromAddress, toAddress common.Address, payload []byte, gasLimit uint32, idempotencyKey *string) error + CreateEthTransaction(ctx context.Context, fromAddress, toAddress common.Address, payload []byte, gasLimit uint64, idempotencyKey *string) error CountFluxMonitorRoundStats() (count int, err error) } @@ -119,7 +119,7 @@ func (o *orm) CreateEthTransaction( fromAddress common.Address, toAddress common.Address, payload []byte, - gasLimit uint32, + gasLimit uint64, idempotencyKey *string, ) (err error) { diff --git a/core/services/fluxmonitorv2/orm_test.go b/core/services/fluxmonitorv2/orm_test.go index bcbec4363e2..17e03a674f0 100644 --- a/core/services/fluxmonitorv2/orm_test.go +++ b/core/services/fluxmonitorv2/orm_test.go @@ -180,7 +180,7 @@ func TestORM_CreateEthTransaction(t *testing.T) { _, from = cltest.MustInsertRandomKey(t, ethKeyStore) to = testutils.NewAddress() payload = []byte{1, 0, 0} - gasLimit = uint32(21000) + gasLimit = uint64(21000) ) idempotencyKey := uuid.New().String() txm.On("CreateTransaction", mock.Anything, txmgr.TxRequest{ diff --git a/core/services/functions/external_adapter_client.go b/core/services/functions/external_adapter_client.go index fb64924a922..9dc77ca78e9 100644 --- a/core/services/functions/external_adapter_client.go +++ b/core/services/functions/external_adapter_client.go @@ -10,6 +10,7 @@ import ( "net/url" "time" + "github.com/hashicorp/go-retryablehttp" "github.com/pkg/errors" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" @@ -42,8 +43,10 @@ type ExternalAdapterClient interface { } type externalAdapterClient struct { - adapterURL url.URL - maxResponseBytes int64 + adapterURL url.URL + maxResponseBytes int64 + maxRetries int + exponentialBackoffBase time.Duration } var _ ExternalAdapterClient = (*externalAdapterClient)(nil) @@ -54,9 +57,11 @@ type BridgeAccessor interface { } type bridgeAccessor struct { - bridgeORM bridges.ORM - bridgeName string - maxResponseBytes int64 + bridgeORM bridges.ORM + bridgeName string + maxResponseBytes int64 + maxRetries int + exponentialBackoffBase time.Duration } var _ BridgeAccessor = (*bridgeAccessor)(nil) @@ -112,10 +117,12 @@ var ( ) ) -func NewExternalAdapterClient(adapterURL url.URL, maxResponseBytes int64) ExternalAdapterClient { +func NewExternalAdapterClient(adapterURL url.URL, maxResponseBytes int64, maxRetries int, exponentialBackoffBase time.Duration) ExternalAdapterClient { return &externalAdapterClient{ - adapterURL: adapterURL, - maxResponseBytes: maxResponseBytes, + adapterURL: adapterURL, + maxResponseBytes: maxResponseBytes, + maxRetries: maxRetries, + exponentialBackoffBase: exponentialBackoffBase, } } @@ -190,7 +197,13 @@ func (ea *externalAdapterClient) request( req.Header.Set("Content-Type", "application/json") start := time.Now() - client := &http.Client{} + + // retry will only happen on a 5XX error response code (except 501) + retryClient := retryablehttp.NewClient() + retryClient.RetryMax = ea.maxRetries + retryClient.RetryWaitMin = ea.exponentialBackoffBase + + client := retryClient.StandardClient() resp, err := client.Do(req) if err != nil { promEAClientErrors.WithLabelValues(label).Inc() @@ -244,11 +257,13 @@ func (ea *externalAdapterClient) request( } } -func NewBridgeAccessor(bridgeORM bridges.ORM, bridgeName string, maxResponseBytes int64) BridgeAccessor { +func NewBridgeAccessor(bridgeORM bridges.ORM, bridgeName string, maxResponseBytes int64, maxRetries int, exponentialBackoffBase time.Duration) BridgeAccessor { return &bridgeAccessor{ - bridgeORM: bridgeORM, - bridgeName: bridgeName, - maxResponseBytes: maxResponseBytes, + bridgeORM: bridgeORM, + bridgeName: bridgeName, + maxResponseBytes: maxResponseBytes, + maxRetries: maxRetries, + exponentialBackoffBase: exponentialBackoffBase, } } @@ -257,5 +272,5 @@ func (b *bridgeAccessor) NewExternalAdapterClient() (ExternalAdapterClient, erro if err != nil { return nil, err } - return NewExternalAdapterClient(url.URL(bridge.URL), b.maxResponseBytes), nil + return NewExternalAdapterClient(url.URL(bridge.URL), b.maxResponseBytes, b.maxRetries, b.exponentialBackoffBase), nil } diff --git a/core/services/functions/external_adapter_client_test.go b/core/services/functions/external_adapter_client_test.go index 9fd40ba8280..4ce78ee3fc3 100644 --- a/core/services/functions/external_adapter_client_test.go +++ b/core/services/functions/external_adapter_client_test.go @@ -27,7 +27,7 @@ func runFetcherTest(t *testing.T, adapterJSONResponse, expectedSecrets, expected adapterUrl, err := url.Parse(ts.URL) assert.NoError(t, err, "Unexpected error") - ea := functions.NewExternalAdapterClient(*adapterUrl, 100_000) + ea := functions.NewExternalAdapterClient(*adapterUrl, 100_000, 0, 0) encryptedSecrets, userError, err := ea.FetchEncryptedSecrets(testutils.Context(t), []byte("urls to secrets"), "requestID1234", "TestJob") if expectedError != nil { @@ -50,7 +50,7 @@ func runRequestTest(t *testing.T, adapterJSONResponse, expectedUserResult, expec adapterUrl, err := url.Parse(ts.URL) assert.NoError(t, err, "Unexpected error") - ea := functions.NewExternalAdapterClient(*adapterUrl, 100_000) + ea := functions.NewExternalAdapterClient(*adapterUrl, 100_000, 0, 0) userResult, userError, domains, err := ea.RunComputation(testutils.Context(t), "requestID1234", "TestJob", "SubOwner", 1, functions.RequestFlags{}, "", &functions.RequestData{}) if expectedError != nil { @@ -144,15 +144,7 @@ func TestFetchEncryptedSecrets_UnexpectedResult(t *testing.T) { } func TestRunComputation_Success(t *testing.T) { - runRequestTest(t, `{ - "result": "success", - "data": { - "result": "0x616263646566", - "error": "", - "domains": ["domain1", "domain2"] - }, - "statusCode": 200 - }`, "abcdef", "", []string{"domain1", "domain2"}, nil) + runRequestTest(t, runComputationSuccessResponse, "abcdef", "", []string{"domain1", "domain2"}, nil) } func TestRunComputation_MissingData(t *testing.T) { @@ -177,7 +169,7 @@ func TestRunComputation_CorrectAdapterRequest(t *testing.T) { adapterUrl, err := url.Parse(ts.URL) assert.NoError(t, err) - ea := functions.NewExternalAdapterClient(*adapterUrl, 100_000) + ea := functions.NewExternalAdapterClient(*adapterUrl, 100_000, 0, 0) reqData := &functions.RequestData{ Source: "abcd", Language: 7, @@ -199,7 +191,7 @@ func TestRunComputation_HTTP500(t *testing.T) { adapterUrl, err := url.Parse(ts.URL) assert.NoError(t, err) - ea := functions.NewExternalAdapterClient(*adapterUrl, 100_000) + ea := functions.NewExternalAdapterClient(*adapterUrl, 100_000, 0, 0) _, _, _, err = ea.RunComputation(testutils.Context(t), "requestID1234", "TestJob", "SubOwner", 1, functions.RequestFlags{}, "secRETS", &functions.RequestData{}) assert.Error(t, err) } @@ -214,10 +206,96 @@ func TestRunComputation_ContextRespected(t *testing.T) { adapterUrl, err := url.Parse(ts.URL) assert.NoError(t, err) - ea := functions.NewExternalAdapterClient(*adapterUrl, 100_000) + ea := functions.NewExternalAdapterClient(*adapterUrl, 100_000, 0, 0) ctx, cancel := context.WithTimeout(testutils.Context(t), 10*time.Millisecond) defer cancel() _, _, _, err = ea.RunComputation(ctx, "requestID1234", "TestJob", "SubOwner", 1, functions.RequestFlags{}, "secRETS", &functions.RequestData{}) assert.Error(t, err) close(done) } + +func TestRunComputationRetrial(t *testing.T) { + + t.Run("OK-retry_succeeds_after_one_failure", func(t *testing.T) { + counter := 0 + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + switch counter { + case 0: + counter++ + w.WriteHeader(http.StatusInternalServerError) + return + case 1: + counter++ + fmt.Fprintln(w, runComputationSuccessResponse) + return + default: + t.Errorf("invalid amount of retries: %d", counter) + t.FailNow() + } + })) + defer ts.Close() + + adapterUrl, err := url.Parse(ts.URL) + assert.NoError(t, err) + + ea := functions.NewExternalAdapterClient(*adapterUrl, 100_000, 1, 1*time.Nanosecond) + _, _, _, err = ea.RunComputation(testutils.Context(t), "requestID1234", "TestJob", "SubOwner", 1, functions.RequestFlags{}, "secRETS", &functions.RequestData{}) + assert.NoError(t, err) + }) + + t.Run("NOK-retry_fails_after_retrial", func(t *testing.T) { + counter := 0 + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + switch counter { + case 0, 1: + counter++ + w.WriteHeader(http.StatusInternalServerError) + return + default: + t.Errorf("invalid amount of retries: %d", counter) + t.FailNow() + } + })) + defer ts.Close() + + adapterUrl, err := url.Parse(ts.URL) + assert.NoError(t, err) + + ea := functions.NewExternalAdapterClient(*adapterUrl, 100_000, 1, 1*time.Nanosecond) + _, _, _, err = ea.RunComputation(testutils.Context(t), "requestID1234", "TestJob", "SubOwner", 1, functions.RequestFlags{}, "secRETS", &functions.RequestData{}) + assert.Error(t, err) + }) + + t.Run("NOK-dont_retry_on_4XX_errors", func(t *testing.T) { + counter := 0 + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + switch counter { + case 0: + counter++ + w.WriteHeader(http.StatusBadRequest) + return + default: + t.Errorf("invalid amount of retries: %d", counter) + t.FailNow() + } + })) + defer ts.Close() + + adapterUrl, err := url.Parse(ts.URL) + assert.NoError(t, err) + + ea := functions.NewExternalAdapterClient(*adapterUrl, 100_000, 1, 1*time.Nanosecond) + _, _, _, err = ea.RunComputation(testutils.Context(t), "requestID1234", "TestJob", "SubOwner", 1, functions.RequestFlags{}, "secRETS", &functions.RequestData{}) + assert.Error(t, err) + }) +} + +const runComputationSuccessResponse = `{ + "result": "success", + "data": { + "result": "0x616263646566", + "error": "", + "domains": ["domain1", "domain2"] + }, + "statusCode": 200 + }` diff --git a/core/services/functions/listener.go b/core/services/functions/listener.go index f9d74f1bae9..12516005c3d 100644 --- a/core/services/functions/listener.go +++ b/core/services/functions/listener.go @@ -192,7 +192,7 @@ func (l *functionsListener) Start(context.Context) error { switch l.pluginConfig.ContractVersion { case 1: l.shutdownWaitGroup.Add(1) - go l.processOracleEventsV1() + go l.processOracleEventsV1(l.serviceContext) default: return fmt.Errorf("unsupported contract version: %d", l.pluginConfig.ContractVersion) } @@ -221,7 +221,7 @@ func (l *functionsListener) Close() error { }) } -func (l *functionsListener) processOracleEventsV1() { +func (l *functionsListener) processOracleEventsV1(ctx context.Context) { defer l.shutdownWaitGroup.Done() freqMillis := l.pluginConfig.ListenerEventsCheckFrequencyMillis if freqMillis == 0 { @@ -235,7 +235,7 @@ func (l *functionsListener) processOracleEventsV1() { case <-l.chStop: return case <-ticker.C: - requests, responses, err := l.logPollerWrapper.LatestEvents() + requests, responses, err := l.logPollerWrapper.LatestEvents(ctx) if err != nil { l.logger.Errorw("error when calling LatestEvents()", "err", err) break diff --git a/core/services/functions/listener_test.go b/core/services/functions/listener_test.go index 75161d3410b..24d95cdcd6b 100644 --- a/core/services/functions/listener_test.go +++ b/core/services/functions/listener_test.go @@ -167,8 +167,8 @@ func TestFunctionsListener_HandleOracleRequestV1_Success(t *testing.T) { Data: make([]byte, 12), } - uni.logPollerWrapper.On("LatestEvents").Return([]types.OracleRequest{request}, nil, nil).Once() - uni.logPollerWrapper.On("LatestEvents").Return(nil, nil, nil) + uni.logPollerWrapper.On("LatestEvents", mock.Anything).Return([]types.OracleRequest{request}, nil, nil).Once() + uni.logPollerWrapper.On("LatestEvents", mock.Anything).Return(nil, nil, nil) uni.pluginORM.On("CreateRequest", mock.Anything, mock.Anything).Return(nil) uni.bridgeAccessor.On("NewExternalAdapterClient").Return(uni.eaClient, nil) uni.eaClient.On("RunComputation", mock.Anything, RequestIDStr, mock.Anything, SubscriptionOwner.Hex(), SubscriptionID, mock.Anything, mock.Anything, mock.Anything).Return(ResultBytes, nil, nil, nil) @@ -261,8 +261,8 @@ func TestFunctionsListener_HandleOracleRequestV1_ComputationError(t *testing.T) Data: make([]byte, 12), } - uni.logPollerWrapper.On("LatestEvents").Return([]types.OracleRequest{request}, nil, nil).Once() - uni.logPollerWrapper.On("LatestEvents").Return(nil, nil, nil) + uni.logPollerWrapper.On("LatestEvents", mock.Anything).Return([]types.OracleRequest{request}, nil, nil).Once() + uni.logPollerWrapper.On("LatestEvents", mock.Anything).Return(nil, nil, nil) uni.pluginORM.On("CreateRequest", mock.Anything, mock.Anything).Return(nil) uni.bridgeAccessor.On("NewExternalAdapterClient").Return(uni.eaClient, nil) uni.eaClient.On("RunComputation", mock.Anything, RequestIDStr, mock.Anything, SubscriptionOwner.Hex(), SubscriptionID, mock.Anything, mock.Anything, mock.Anything).Return(nil, ErrorBytes, nil, nil) @@ -300,8 +300,8 @@ func TestFunctionsListener_HandleOracleRequestV1_ThresholdDecryptedSecrets(t *te uni := NewFunctionsListenerUniverse(t, 0, 1_000_000) doneCh := make(chan struct{}) - uni.logPollerWrapper.On("LatestEvents").Return([]types.OracleRequest{request}, nil, nil).Once() - uni.logPollerWrapper.On("LatestEvents").Return(nil, nil, nil) + uni.logPollerWrapper.On("LatestEvents", mock.Anything).Return([]types.OracleRequest{request}, nil, nil).Once() + uni.logPollerWrapper.On("LatestEvents", mock.Anything).Return(nil, nil, nil) uni.pluginORM.On("CreateRequest", mock.Anything, mock.Anything).Return(nil) uni.bridgeAccessor.On("NewExternalAdapterClient").Return(uni.eaClient, nil) uni.eaClient.On("FetchEncryptedSecrets", mock.Anything, mock.Anything, RequestIDStr, mock.Anything, mock.Anything).Return(EncryptedSecrets, nil, nil) @@ -330,8 +330,8 @@ func TestFunctionsListener_HandleOracleRequestV1_CBORTooBig(t *testing.T) { Data: make([]byte, 20), } - uni.logPollerWrapper.On("LatestEvents").Return([]types.OracleRequest{request}, nil, nil).Once() - uni.logPollerWrapper.On("LatestEvents").Return(nil, nil, nil) + uni.logPollerWrapper.On("LatestEvents", mock.Anything).Return([]types.OracleRequest{request}, nil, nil).Once() + uni.logPollerWrapper.On("LatestEvents", mock.Anything).Return(nil, nil, nil) uni.pluginORM.On("CreateRequest", mock.Anything, mock.Anything).Return(nil) uni.pluginORM.On("SetError", RequestID, functions_service.USER_ERROR, []byte("request too big (max 10 bytes)"), mock.Anything, mock.Anything, mock.Anything).Run(func(args mock.Arguments) { close(doneCh) @@ -356,8 +356,8 @@ func TestFunctionsListener_ReportSourceCodeDomains(t *testing.T) { Data: make([]byte, 12), } - uni.logPollerWrapper.On("LatestEvents").Return([]types.OracleRequest{request}, nil, nil).Once() - uni.logPollerWrapper.On("LatestEvents").Return(nil, nil, nil) + uni.logPollerWrapper.On("LatestEvents", mock.Anything).Return([]types.OracleRequest{request}, nil, nil).Once() + uni.logPollerWrapper.On("LatestEvents", mock.Anything).Return(nil, nil, nil) uni.pluginORM.On("CreateRequest", mock.Anything, mock.Anything).Return(nil) uni.bridgeAccessor.On("NewExternalAdapterClient").Return(uni.eaClient, nil) uni.eaClient.On("RunComputation", mock.Anything, RequestIDStr, mock.Anything, SubscriptionOwner.Hex(), SubscriptionID, mock.Anything, mock.Anything, mock.Anything).Return(ResultBytes, nil, Domains, nil) @@ -387,7 +387,7 @@ func TestFunctionsListener_PruneRequests(t *testing.T) { uni := NewFunctionsListenerUniverse(t, 0, 1) doneCh := make(chan bool) - uni.logPollerWrapper.On("LatestEvents").Return(nil, nil, nil) + uni.logPollerWrapper.On("LatestEvents", mock.Anything).Return(nil, nil, nil) uni.pluginORM.On("PruneOldestRequests", functions_service.DefaultPruneMaxStoredRequests, functions_service.DefaultPruneBatchSize, mock.Anything).Return(uint32(0), uint32(0), nil).Run(func(args mock.Arguments) { doneCh <- true }) @@ -402,7 +402,7 @@ func TestFunctionsListener_TimeoutRequests(t *testing.T) { uni := NewFunctionsListenerUniverse(t, 1, 0) doneCh := make(chan bool) - uni.logPollerWrapper.On("LatestEvents").Return(nil, nil, nil) + uni.logPollerWrapper.On("LatestEvents", mock.Anything).Return(nil, nil, nil) uni.pluginORM.On("TimeoutExpiredResults", mock.Anything, uint32(1), mock.Anything).Return([]functions_service.RequestID{}, nil).Run(func(args mock.Arguments) { doneCh <- true }) @@ -420,8 +420,8 @@ func TestFunctionsListener_ORMDoesNotFreezeHandlersForever(t *testing.T) { uni := NewFunctionsListenerUniverse(t, 0, 0) request := types.OracleRequest{} - uni.logPollerWrapper.On("LatestEvents").Return([]types.OracleRequest{request}, nil, nil).Once() - uni.logPollerWrapper.On("LatestEvents").Return(nil, nil, nil) + uni.logPollerWrapper.On("LatestEvents", mock.Anything).Return([]types.OracleRequest{request}, nil, nil).Once() + uni.logPollerWrapper.On("LatestEvents", mock.Anything).Return(nil, nil, nil) uni.pluginORM.On("CreateRequest", mock.Anything, mock.Anything).Run(func(args mock.Arguments) { var queryerWrapper pg.Q args.Get(1).(pg.QOpt)(&queryerWrapper) diff --git a/core/services/gateway/delegate.go b/core/services/gateway/delegate.go index 3100877e96a..ba34f2894de 100644 --- a/core/services/gateway/delegate.go +++ b/core/services/gateway/delegate.go @@ -41,10 +41,10 @@ func (d *Delegate) JobType() job.Type { return job.Gateway } -func (d *Delegate) BeforeJobCreated(spec job.Job) {} -func (d *Delegate) AfterJobCreated(spec job.Job) {} -func (d *Delegate) BeforeJobDeleted(spec job.Job) {} -func (d *Delegate) OnDeleteJob(spec job.Job, q pg.Queryer) error { return nil } +func (d *Delegate) BeforeJobCreated(spec job.Job) {} +func (d *Delegate) AfterJobCreated(spec job.Job) {} +func (d *Delegate) BeforeJobDeleted(spec job.Job) {} +func (d *Delegate) OnDeleteJob(ctx context.Context, spec job.Job, q pg.Queryer) error { return nil } // ServicesForSpec returns the scheduler to be used for running observer jobs func (d *Delegate) ServicesForSpec(ctx context.Context, spec job.Job) (services []job.ServiceCtx, err error) { diff --git a/core/services/gateway/handlers/functions/subscriptions/subscriptions.go b/core/services/gateway/handlers/functions/subscriptions/subscriptions.go index 610aaa1d7f1..e90201a31a9 100644 --- a/core/services/gateway/handlers/functions/subscriptions/subscriptions.go +++ b/core/services/gateway/handlers/functions/subscriptions/subscriptions.go @@ -138,7 +138,7 @@ func (s *onchainSubscriptions) queryLoop() { latestBlockHeight, err := s.client.LatestBlockHeight(ctx) if err != nil || latestBlockHeight == nil { - s.lggr.Errorw("Error calling LatestBlockHeight", "err", err, "latestBlockHeight", latestBlockHeight.Int64()) + s.lggr.Errorw("Error calling LatestBlockHeight", "err", err, "latestBlockHeight", latestBlockHeight) return } diff --git a/core/services/gateway/handlers/functions/subscriptions/user_subscriptions.go b/core/services/gateway/handlers/functions/subscriptions/user_subscriptions.go index ec506b6a864..8d30f7de9cf 100644 --- a/core/services/gateway/handlers/functions/subscriptions/user_subscriptions.go +++ b/core/services/gateway/handlers/functions/subscriptions/user_subscriptions.go @@ -2,6 +2,7 @@ package subscriptions import ( "math/big" + "reflect" "github.com/ethereum/go-ethereum/common" "github.com/pkg/errors" @@ -54,7 +55,7 @@ func (us *userSubscriptions) UpdateSubscription(subscriptionId uint64, subscript } // there is no change to the subscription - if us.userSubscriptionsMap[subscription.Owner][subscriptionId] == subscription { + if reflect.DeepEqual(us.userSubscriptionsMap[subscription.Owner][subscriptionId], subscription) { return false } diff --git a/core/services/gateway/handlers/functions/subscriptions/user_subscriptions_test.go b/core/services/gateway/handlers/functions/subscriptions/user_subscriptions_test.go index 4d58155735f..aba39678973 100644 --- a/core/services/gateway/handlers/functions/subscriptions/user_subscriptions_test.go +++ b/core/services/gateway/handlers/functions/subscriptions/user_subscriptions_test.go @@ -135,15 +135,16 @@ func TestUserSubscriptions_UpdateSubscription(t *testing.T) { t.Run("no actual changes", func(t *testing.T) { us := subscriptions.NewUserSubscriptions() - subscription := &functions_router.IFunctionsSubscriptionsSubscription{ + subscription := functions_router.IFunctionsSubscriptionsSubscription{ Owner: utils.RandomAddress(), Balance: big.NewInt(25), BlockedBalance: big.NewInt(25), } - updated := us.UpdateSubscription(5, subscription) + identicalSubscription := subscription + updated := us.UpdateSubscription(5, &subscription) assert.True(t, updated) - updated = us.UpdateSubscription(5, subscription) + updated = us.UpdateSubscription(5, &identicalSubscription) assert.False(t, updated) }) } diff --git a/core/services/job/job_orm_test.go b/core/services/job/job_orm_test.go index 9716231868c..a8931796fd0 100644 --- a/core/services/job/job_orm_test.go +++ b/core/services/job/job_orm_test.go @@ -19,6 +19,7 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/bridges" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/assets" evmcfg "github.com/smartcontractkit/chainlink/v2/core/chains/evm/config/toml" + evmtypes "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" "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/cltest/heavyweight" @@ -483,7 +484,7 @@ func TestORM_CreateJob_VRFV2(t *testing.T) { actual = append(actual, common.BytesToAddress(b).String()) } require.ElementsMatch(t, fromAddresses, actual) - var vrfOwnerAddress ethkey.EIP55Address + var vrfOwnerAddress evmtypes.EIP55Address require.NoError(t, db.Get(&vrfOwnerAddress, `SELECT vrf_owner_address FROM vrf_specs LIMIT 1`)) require.Equal(t, "0x32891BD79647DC9136Fc0a59AAB48c7825eb624c", vrfOwnerAddress.Address().String()) require.NoError(t, jobORM.DeleteJob(jb.ID)) @@ -567,7 +568,7 @@ func TestORM_CreateJob_VRFV2Plus(t *testing.T) { actual = append(actual, common.BytesToAddress(b).String()) } require.ElementsMatch(t, fromAddresses, actual) - var vrfOwnerAddress ethkey.EIP55Address + var vrfOwnerAddress evmtypes.EIP55Address require.Error(t, db.Get(&vrfOwnerAddress, `SELECT vrf_owner_address FROM vrf_specs LIMIT 1`)) require.NoError(t, jobORM.DeleteJob(jb.ID)) cltest.AssertCount(t, db, "vrf_specs", 0) diff --git a/core/services/job/kv_orm.go b/core/services/job/kv_orm.go new file mode 100644 index 00000000000..890336b4ec7 --- /dev/null +++ b/core/services/job/kv_orm.go @@ -0,0 +1,68 @@ +package job + +import ( + "encoding/json" + "fmt" + "time" + + "github.com/jmoiron/sqlx" + "github.com/jmoiron/sqlx/types" + + "github.com/smartcontractkit/chainlink/v2/core/logger" + "github.com/smartcontractkit/chainlink/v2/core/services/pg" +) + +// KVStore is a simple KV store that can store and retrieve serializable data. +// +//go:generate mockery --quiet --name KVStore --output ./mocks/ --case=underscore +type KVStore interface { + Store(key string, val interface{}) error + Get(key string, dest interface{}) error +} + +type kVStore struct { + jobID int32 + q pg.Q + lggr logger.SugaredLogger +} + +var _ KVStore = (*kVStore)(nil) + +func NewKVStore(jobID int32, db *sqlx.DB, cfg pg.QConfig, lggr logger.Logger) kVStore { + namedLogger := logger.Sugared(lggr.Named("JobORM")) + return kVStore{ + jobID: jobID, + q: pg.NewQ(db, namedLogger, cfg), + lggr: namedLogger, + } +} + +// Store saves serializable value by key. +func (kv kVStore) Store(key string, val interface{}) error { + jsonVal, err := json.Marshal(val) + if err != nil { + return err + } + + sql := `INSERT INTO job_kv_store (job_id, key, val) + VALUES ($1, $2, $3) + ON CONFLICT (job_id, key) DO UPDATE SET + val = EXCLUDED.val, + updated_at = $4;` + + if err = kv.q.ExecQ(sql, kv.jobID, key, types.JSONText(jsonVal), time.Now()); err != nil { + return fmt.Errorf("failed to store value: %s for key: %s for jobID: %d : %w", string(jsonVal), key, kv.jobID, err) + } + return nil +} + +// Get retrieves serializable value by key. +func (kv kVStore) Get(key string, dest interface{}) error { + var ret json.RawMessage + sql := "SELECT val FROM job_kv_store WHERE job_id = $1 AND key = $2" + if err := kv.q.Get(&ret, sql, kv.jobID, key); err != nil { + return fmt.Errorf("failed to get value by key: %s for jobID: %d : %w", key, kv.jobID, err) + } + + return json.Unmarshal(ret, dest) +} diff --git a/core/services/job/kv_orm_test.go b/core/services/job/kv_orm_test.go new file mode 100644 index 00000000000..794e27b3c9f --- /dev/null +++ b/core/services/job/kv_orm_test.go @@ -0,0 +1,85 @@ +package job_test + +import ( + "fmt" + "reflect" + "testing" + + "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink/v2/core/bridges" + "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" + "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/configtest" + "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest" + "github.com/smartcontractkit/chainlink/v2/core/logger" + "github.com/smartcontractkit/chainlink/v2/core/services/directrequest" + "github.com/smartcontractkit/chainlink/v2/core/services/job" + "github.com/smartcontractkit/chainlink/v2/core/services/pipeline" + "github.com/smartcontractkit/chainlink/v2/core/testdata/testspecs" +) + +func TestJobKVStore(t *testing.T) { + config := configtest.NewTestGeneralConfig(t) + db := pgtest.NewSqlxDB(t) + + lggr := logger.TestLogger(t) + + pipelineORM := pipeline.NewORM(db, logger.TestLogger(t), config.Database(), config.JobPipeline().MaxSuccessfulRuns()) + bridgesORM := bridges.NewORM(db, logger.TestLogger(t), config.Database()) + + jobID := int32(1337) + kvStore := job.NewKVStore(jobID, db, config.Database(), lggr) + jobORM := NewTestORM(t, db, pipelineORM, bridgesORM, cltest.NewKeyStore(t, db, config.Database()), config.Database()) + + jb, err := directrequest.ValidatedDirectRequestSpec(testspecs.GetDirectRequestSpec()) + require.NoError(t, err) + jb.ID = jobID + require.NoError(t, jobORM.CreateJob(&jb)) + + type testData struct { + Test string + } + + type nested struct { + Contact testData // Nested struct + } + + values := []interface{}{ + 42, // int + "hello", // string + 3.14, // float64 + true, // bool + []int{1, 2, 3}, // slice of ints + map[string]int{"a": 1, "b": 2}, // map of string to int + testData{Test: "value1"}, // regular struct + nested{testData{"value2"}}, // nested struct + } + + for i, value := range values { + testKey := "test_key_" + fmt.Sprint(i) + require.NoError(t, kvStore.Store(testKey, value)) + + // Get the type of the current value + valueType := reflect.TypeOf(value) + // Create a new instance of the value's type + temp := reflect.New(valueType).Interface() + + require.NoError(t, kvStore.Get(testKey, &temp)) + + tempValue := reflect.ValueOf(temp).Elem().Interface() + require.Equal(t, value, tempValue) + } + + key := "test_key_updating" + td1 := testData{Test: "value1"} + td2 := testData{Test: "value2"} + + var retData testData + require.NoError(t, kvStore.Store(key, td1)) + require.NoError(t, kvStore.Get(key, &retData)) + require.Equal(t, td1, retData) + + require.NoError(t, kvStore.Store(key, td2)) + require.NoError(t, kvStore.Get(key, &retData)) + require.Equal(t, td2, retData) +} diff --git a/core/services/job/mocks/kv_store.go b/core/services/job/mocks/kv_store.go new file mode 100644 index 00000000000..48e4538f606 --- /dev/null +++ b/core/services/job/mocks/kv_store.go @@ -0,0 +1,60 @@ +// Code generated by mockery v2.38.0. DO NOT EDIT. + +package mocks + +import mock "github.com/stretchr/testify/mock" + +// KVStore is an autogenerated mock type for the KVStore type +type KVStore struct { + mock.Mock +} + +// Get provides a mock function with given fields: key, dest +func (_m *KVStore) Get(key string, dest interface{}) error { + ret := _m.Called(key, dest) + + if len(ret) == 0 { + panic("no return value specified for Get") + } + + var r0 error + if rf, ok := ret.Get(0).(func(string, interface{}) error); ok { + r0 = rf(key, dest) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// Store provides a mock function with given fields: key, val +func (_m *KVStore) Store(key string, val interface{}) error { + ret := _m.Called(key, val) + + if len(ret) == 0 { + panic("no return value specified for Store") + } + + var r0 error + if rf, ok := ret.Get(0).(func(string, interface{}) error); ok { + r0 = rf(key, val) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// NewKVStore creates a new instance of KVStore. 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 NewKVStore(t interface { + mock.TestingT + Cleanup(func()) +}) *KVStore { + mock := &KVStore{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/core/services/job/mocks/orm.go b/core/services/job/mocks/orm.go index 062c6e936bc..1068f511cdc 100644 --- a/core/services/job/mocks/orm.go +++ b/core/services/job/mocks/orm.go @@ -8,8 +8,6 @@ import ( context "context" - ethkey "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ethkey" - job "github.com/smartcontractkit/chainlink/v2/core/services/job" mock "github.com/stretchr/testify/mock" @@ -18,6 +16,8 @@ import ( pipeline "github.com/smartcontractkit/chainlink/v2/core/services/pipeline" + types "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" + uuid "github.com/google/uuid" ) @@ -222,7 +222,7 @@ func (_m *ORM) FindJobByExternalJobID(_a0 uuid.UUID, qopts ...pg.QOpt) (job.Job, } // FindJobIDByAddress provides a mock function with given fields: address, evmChainID, qopts -func (_m *ORM) FindJobIDByAddress(address ethkey.EIP55Address, evmChainID *big.Big, qopts ...pg.QOpt) (int32, error) { +func (_m *ORM) FindJobIDByAddress(address types.EIP55Address, evmChainID *big.Big, qopts ...pg.QOpt) (int32, error) { _va := make([]interface{}, len(qopts)) for _i := range qopts { _va[_i] = qopts[_i] @@ -238,16 +238,16 @@ func (_m *ORM) FindJobIDByAddress(address ethkey.EIP55Address, evmChainID *big.B var r0 int32 var r1 error - if rf, ok := ret.Get(0).(func(ethkey.EIP55Address, *big.Big, ...pg.QOpt) (int32, error)); ok { + if rf, ok := ret.Get(0).(func(types.EIP55Address, *big.Big, ...pg.QOpt) (int32, error)); ok { return rf(address, evmChainID, qopts...) } - if rf, ok := ret.Get(0).(func(ethkey.EIP55Address, *big.Big, ...pg.QOpt) int32); ok { + if rf, ok := ret.Get(0).(func(types.EIP55Address, *big.Big, ...pg.QOpt) int32); ok { r0 = rf(address, evmChainID, qopts...) } else { r0 = ret.Get(0).(int32) } - if rf, ok := ret.Get(1).(func(ethkey.EIP55Address, *big.Big, ...pg.QOpt) error); ok { + if rf, ok := ret.Get(1).(func(types.EIP55Address, *big.Big, ...pg.QOpt) error); ok { r1 = rf(address, evmChainID, qopts...) } else { r1 = ret.Error(1) diff --git a/core/services/job/models.go b/core/services/job/models.go index 233912d09c2..218be21bc54 100644 --- a/core/services/job/models.go +++ b/core/services/job/models.go @@ -20,10 +20,10 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/bridges" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/assets" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/config/toml" + evmtypes "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils" "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/keystore/keys/ethkey" "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" @@ -247,24 +247,24 @@ func (pr *PipelineRun) SetID(value string) error { // OCROracleSpec defines the job spec for OCR jobs. type OCROracleSpec struct { - ID int32 `toml:"-"` - ContractAddress ethkey.EIP55Address `toml:"contractAddress"` - P2PV2Bootstrappers pq.StringArray `toml:"p2pv2Bootstrappers" db:"p2pv2_bootstrappers"` - IsBootstrapPeer bool `toml:"isBootstrapPeer"` - EncryptedOCRKeyBundleID *models.Sha256Hash `toml:"keyBundleID"` - TransmitterAddress *ethkey.EIP55Address `toml:"transmitterAddress"` - ObservationTimeout models.Interval `toml:"observationTimeout"` - BlockchainTimeout models.Interval `toml:"blockchainTimeout"` - ContractConfigTrackerSubscribeInterval models.Interval `toml:"contractConfigTrackerSubscribeInterval"` - ContractConfigTrackerPollInterval models.Interval `toml:"contractConfigTrackerPollInterval"` - ContractConfigConfirmations uint16 `toml:"contractConfigConfirmations"` - EVMChainID *big.Big `toml:"evmChainID" db:"evm_chain_id"` - DatabaseTimeout *models.Interval `toml:"databaseTimeout"` - ObservationGracePeriod *models.Interval `toml:"observationGracePeriod"` - ContractTransmitterTransmitTimeout *models.Interval `toml:"contractTransmitterTransmitTimeout"` - CaptureEATelemetry bool `toml:"captureEATelemetry"` - CreatedAt time.Time `toml:"-"` - UpdatedAt time.Time `toml:"-"` + ID int32 `toml:"-"` + ContractAddress evmtypes.EIP55Address `toml:"contractAddress"` + P2PV2Bootstrappers pq.StringArray `toml:"p2pv2Bootstrappers" db:"p2pv2_bootstrappers"` + IsBootstrapPeer bool `toml:"isBootstrapPeer"` + EncryptedOCRKeyBundleID *models.Sha256Hash `toml:"keyBundleID"` + TransmitterAddress *evmtypes.EIP55Address `toml:"transmitterAddress"` + ObservationTimeout models.Interval `toml:"observationTimeout"` + BlockchainTimeout models.Interval `toml:"blockchainTimeout"` + ContractConfigTrackerSubscribeInterval models.Interval `toml:"contractConfigTrackerSubscribeInterval"` + ContractConfigTrackerPollInterval models.Interval `toml:"contractConfigTrackerPollInterval"` + ContractConfigConfirmations uint16 `toml:"contractConfigConfirmations"` + EVMChainID *big.Big `toml:"evmChainID" db:"evm_chain_id"` + DatabaseTimeout *models.Interval `toml:"databaseTimeout"` + ObservationGracePeriod *models.Interval `toml:"observationGracePeriod"` + ContractTransmitterTransmitTimeout *models.Interval `toml:"contractTransmitterTransmitTimeout"` + CaptureEATelemetry bool `toml:"captureEATelemetry"` + CreatedAt time.Time `toml:"-"` + UpdatedAt time.Time `toml:"-"` } // GetID is a getter function that returns the ID of the spec. @@ -443,7 +443,7 @@ func (w *WebhookSpec) SetID(value string) error { type DirectRequestSpec struct { ID int32 `toml:"-"` - ContractAddress ethkey.EIP55Address `toml:"contractAddress"` + ContractAddress evmtypes.EIP55Address `toml:"contractAddress"` MinIncomingConfirmations clnull.Uint32 `toml:"minIncomingConfirmations"` Requesters models.AddressCollection `toml:"requesters"` MinContractPayment *commonassets.Link `toml:"minContractPaymentLinkJuels"` @@ -473,9 +473,9 @@ func (s *CronSpec) SetID(value string) error { } type FluxMonitorSpec struct { - ID int32 `toml:"-"` - ContractAddress ethkey.EIP55Address `toml:"contractAddress"` - Threshold tomlutils.Float32 `toml:"threshold,float"` + ID int32 `toml:"-"` + ContractAddress evmtypes.EIP55Address `toml:"contractAddress"` + Threshold tomlutils.Float32 `toml:"threshold,float"` // AbsoluteThreshold is the maximum absolute change allowed in a fluxmonitored // value before a new round should be kicked off, so that the current value // can be reported on-chain. @@ -494,13 +494,13 @@ type FluxMonitorSpec struct { } type KeeperSpec struct { - ID int32 `toml:"-"` - ContractAddress ethkey.EIP55Address `toml:"contractAddress"` - MinIncomingConfirmations *uint32 `toml:"minIncomingConfirmations"` - FromAddress ethkey.EIP55Address `toml:"fromAddress"` - EVMChainID *big.Big `toml:"evmChainID"` - CreatedAt time.Time `toml:"-"` - UpdatedAt time.Time `toml:"-"` + ID int32 `toml:"-"` + ContractAddress evmtypes.EIP55Address `toml:"contractAddress"` + MinIncomingConfirmations *uint32 `toml:"minIncomingConfirmations"` + FromAddress evmtypes.EIP55Address `toml:"fromAddress"` + EVMChainID *big.Big `toml:"evmChainID"` + CreatedAt time.Time `toml:"-"` + UpdatedAt time.Time `toml:"-"` } type VRFSpec struct { @@ -508,7 +508,7 @@ type VRFSpec struct { // BatchCoordinatorAddress is the address of the batch vrf coordinator to use. // This is required if batchFulfillmentEnabled is set to true in the job spec. - BatchCoordinatorAddress *ethkey.EIP55Address `toml:"batchCoordinatorAddress"` + BatchCoordinatorAddress *evmtypes.EIP55Address `toml:"batchCoordinatorAddress"` // BatchFulfillmentEnabled indicates to the vrf job to use the batch vrf coordinator // for fulfilling requests. If set to true, batchCoordinatorAddress must be set in // the job spec. @@ -523,16 +523,16 @@ type VRFSpec struct { // VRFOwnerAddress is the address of the VRFOwner address to use. // // V2 only. - VRFOwnerAddress *ethkey.EIP55Address `toml:"vrfOwnerAddress"` + VRFOwnerAddress *evmtypes.EIP55Address `toml:"vrfOwnerAddress"` - CoordinatorAddress ethkey.EIP55Address `toml:"coordinatorAddress"` - PublicKey secp256k1.PublicKey `toml:"publicKey"` - MinIncomingConfirmations uint32 `toml:"minIncomingConfirmations"` - EVMChainID *big.Big `toml:"evmChainID"` - FromAddresses []ethkey.EIP55Address `toml:"fromAddresses"` - PollPeriod time.Duration `toml:"pollPeriod"` // For v2 jobs - RequestedConfsDelay int64 `toml:"requestedConfsDelay"` // For v2 jobs. Optional, defaults to 0 if not provided. - RequestTimeout time.Duration `toml:"requestTimeout"` // Optional, defaults to 24hr if not provided. + CoordinatorAddress evmtypes.EIP55Address `toml:"coordinatorAddress"` + PublicKey secp256k1.PublicKey `toml:"publicKey"` + MinIncomingConfirmations uint32 `toml:"minIncomingConfirmations"` + EVMChainID *big.Big `toml:"evmChainID"` + FromAddresses []evmtypes.EIP55Address `toml:"fromAddresses"` + PollPeriod time.Duration `toml:"pollPeriod"` // For v2 jobs + RequestedConfsDelay int64 `toml:"requestedConfsDelay"` // For v2 jobs. Optional, defaults to 0 if not provided. + RequestTimeout time.Duration `toml:"requestTimeout"` // Optional, defaults to 24hr if not provided. // GasLanePrice specifies the gas lane price for this VRF job. // If the specified keys in FromAddresses do not have the provided gas price the job @@ -563,15 +563,15 @@ type BlockhashStoreSpec struct { // CoordinatorV1Address is the VRF V1 coordinator to watch for unfulfilled requests. If empty, // no V1 coordinator will be watched. - CoordinatorV1Address *ethkey.EIP55Address `toml:"coordinatorV1Address"` + CoordinatorV1Address *evmtypes.EIP55Address `toml:"coordinatorV1Address"` // CoordinatorV2Address is the VRF V2 coordinator to watch for unfulfilled requests. If empty, // no V2 coordinator will be watched. - CoordinatorV2Address *ethkey.EIP55Address `toml:"coordinatorV2Address"` + CoordinatorV2Address *evmtypes.EIP55Address `toml:"coordinatorV2Address"` // CoordinatorV2PlusAddress is the VRF V2Plus coordinator to watch for unfulfilled requests. If empty, // no V2Plus coordinator will be watched. - CoordinatorV2PlusAddress *ethkey.EIP55Address `toml:"coordinatorV2PlusAddress"` + CoordinatorV2PlusAddress *evmtypes.EIP55Address `toml:"coordinatorV2PlusAddress"` // LookbackBlocks defines the maximum age of blocks whose hashes should be stored. LookbackBlocks int32 `toml:"lookbackBlocks"` @@ -587,10 +587,10 @@ type BlockhashStoreSpec struct { // BlockhashStoreAddress is the address of the BlockhashStore contract to store blockhashes // into. - BlockhashStoreAddress ethkey.EIP55Address `toml:"blockhashStoreAddress"` + BlockhashStoreAddress evmtypes.EIP55Address `toml:"blockhashStoreAddress"` // BatchBlockhashStoreAddress is the address of the trusted BlockhashStore contract to store blockhashes - TrustedBlockhashStoreAddress *ethkey.EIP55Address `toml:"trustedBlockhashStoreAddress"` + TrustedBlockhashStoreAddress *evmtypes.EIP55Address `toml:"trustedBlockhashStoreAddress"` // BatchBlockhashStoreBatchSize is the number of blockhashes to store in a single batch TrustedBlockhashStoreBatchSize int32 `toml:"trustedBlockhashStoreBatchSize"` @@ -605,7 +605,7 @@ type BlockhashStoreSpec struct { EVMChainID *big.Big `toml:"evmChainID"` // FromAddress is the sender address that should be used to store blockhashes. - FromAddresses []ethkey.EIP55Address `toml:"fromAddresses"` + FromAddresses []evmtypes.EIP55Address `toml:"fromAddresses"` // CreatedAt is the time this job was created. CreatedAt time.Time `toml:"-"` @@ -620,15 +620,15 @@ type BlockHeaderFeederSpec struct { // CoordinatorV1Address is the VRF V1 coordinator to watch for unfulfilled requests. If empty, // no V1 coordinator will be watched. - CoordinatorV1Address *ethkey.EIP55Address `toml:"coordinatorV1Address"` + CoordinatorV1Address *evmtypes.EIP55Address `toml:"coordinatorV1Address"` // CoordinatorV2Address is the VRF V2 coordinator to watch for unfulfilled requests. If empty, // no V2 coordinator will be watched. - CoordinatorV2Address *ethkey.EIP55Address `toml:"coordinatorV2Address"` + CoordinatorV2Address *evmtypes.EIP55Address `toml:"coordinatorV2Address"` // CoordinatorV2PlusAddress is the VRF V2Plus coordinator to watch for unfulfilled requests. If empty, // no V2Plus coordinator will be watched. - CoordinatorV2PlusAddress *ethkey.EIP55Address `toml:"coordinatorV2PlusAddress"` + CoordinatorV2PlusAddress *evmtypes.EIP55Address `toml:"coordinatorV2PlusAddress"` // LookbackBlocks defines the maximum age of blocks whose hashes should be stored. LookbackBlocks int32 `toml:"lookbackBlocks"` @@ -638,11 +638,11 @@ type BlockHeaderFeederSpec struct { // BlockhashStoreAddress is the address of the BlockhashStore contract to store blockhashes // into. - BlockhashStoreAddress ethkey.EIP55Address `toml:"blockhashStoreAddress"` + BlockhashStoreAddress evmtypes.EIP55Address `toml:"blockhashStoreAddress"` // BatchBlockhashStoreAddress is the address of the BatchBlockhashStore contract to store blockhashes // into. - BatchBlockhashStoreAddress ethkey.EIP55Address `toml:"batchBlockhashStoreAddress"` + BatchBlockhashStoreAddress evmtypes.EIP55Address `toml:"batchBlockhashStoreAddress"` // PollPeriod defines how often recent blocks should be scanned for blockhash storage. PollPeriod time.Duration `toml:"pollPeriod"` @@ -654,7 +654,7 @@ type BlockHeaderFeederSpec struct { EVMChainID *big.Big `toml:"evmChainID"` // FromAddress is the sender address that should be used to store blockhashes. - FromAddresses []ethkey.EIP55Address `toml:"fromAddresses"` + FromAddresses []evmtypes.EIP55Address `toml:"fromAddresses"` // GetBlockHashesBatchSize is the RPC call batch size for retrieving blockhashes GetBlockhashesBatchSize uint16 `toml:"getBlockhashesBatchSize"` @@ -675,7 +675,7 @@ type LegacyGasStationServerSpec struct { // ForwarderAddress is the address of EIP2771 forwarder that verifies signature // and forwards requests to target contracts - ForwarderAddress ethkey.EIP55Address `toml:"forwarderAddress"` + ForwarderAddress evmtypes.EIP55Address `toml:"forwarderAddress"` // EVMChainID defines the chain ID from which the meta-transaction request originates. EVMChainID *big.Big `toml:"evmChainID"` @@ -685,7 +685,7 @@ type LegacyGasStationServerSpec struct { CCIPChainSelector *big.Big `toml:"ccipChainSelector"` // FromAddress is the sender address that should be used to send meta-transactions - FromAddresses []ethkey.EIP55Address `toml:"fromAddresses"` + FromAddresses []evmtypes.EIP55Address `toml:"fromAddresses"` // CreatedAt is the time this job was created. CreatedAt time.Time `toml:"-"` @@ -700,10 +700,10 @@ type LegacyGasStationSidecarSpec struct { // ForwarderAddress is the address of EIP2771 forwarder that verifies signature // and forwards requests to target contracts - ForwarderAddress ethkey.EIP55Address `toml:"forwarderAddress"` + ForwarderAddress evmtypes.EIP55Address `toml:"forwarderAddress"` // OffRampAddress is the address of CCIP OffRamp for the given chainID - OffRampAddress ethkey.EIP55Address `toml:"offRampAddress"` + OffRampAddress evmtypes.EIP55Address `toml:"offRampAddress"` // LookbackBlocks defines the maximum number of blocks to search for on-chain events. LookbackBlocks int32 `toml:"lookbackBlocks"` @@ -785,13 +785,13 @@ type EALSpec struct { // ForwarderAddress is the address of EIP2771 forwarder that verifies signature // and forwards requests to target contracts - ForwarderAddress ethkey.EIP55Address `toml:"forwarderAddress"` + ForwarderAddress evmtypes.EIP55Address `toml:"forwarderAddress"` // EVMChainID defines the chain ID from which the meta-transaction request originates. EVMChainID *big.Big `toml:"evmChainID"` // FromAddress is the sender address that should be used to send meta-transactions - FromAddresses []ethkey.EIP55Address `toml:"fromAddresses"` + FromAddresses []evmtypes.EIP55Address `toml:"fromAddresses"` // LookbackBlocks defines the maximum age of blocks to lookback in status tracker LookbackBlocks int32 `toml:"lookbackBlocks"` diff --git a/core/services/job/orm.go b/core/services/job/orm.go index c608e2cc544..6c8533d1dee 100644 --- a/core/services/job/orm.go +++ b/core/services/job/orm.go @@ -22,12 +22,12 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/bridges" evmconfig "github.com/smartcontractkit/chainlink/v2/core/chains/evm/config" + evmtypes "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils/big" "github.com/smartcontractkit/chainlink/v2/core/config" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/null" "github.com/smartcontractkit/chainlink/v2/core/services/keystore" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ethkey" 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" @@ -52,7 +52,7 @@ type ORM interface { FindJobTx(ctx context.Context, id int32) (Job, error) FindJob(ctx context.Context, id int32) (Job, error) FindJobByExternalJobID(uuid uuid.UUID, qopts ...pg.QOpt) (Job, error) - FindJobIDByAddress(address ethkey.EIP55Address, evmChainID *big.Big, qopts ...pg.QOpt) (int32, error) + FindJobIDByAddress(address evmtypes.EIP55Address, evmChainID *big.Big, qopts ...pg.QOpt) (int32, error) FindOCR2JobIDByAddress(contractID string, feedID *common.Hash, qopts ...pg.QOpt) (int32, error) FindJobIDsWithBridge(name string) ([]int32, error) DeleteJob(id int32, qopts ...pg.QOpt) error @@ -731,7 +731,7 @@ type OCRConfig interface { ContractSubscribeInterval() time.Duration KeyBundleID() (string, error) ObservationTimeout() time.Duration - TransmitterAddress() (ethkey.EIP55Address, error) + TransmitterAddress() (evmtypes.EIP55Address, error) } // LoadConfigVarsLocalOCR loads local OCR vars into the OCROracleSpec. @@ -842,7 +842,7 @@ func (o *orm) FindJobByExternalJobID(externalJobID uuid.UUID, qopts ...pg.QOpt) } // FindJobIDByAddress - finds a job id by contract address. Currently only OCR and FM jobs are supported -func (o *orm) FindJobIDByAddress(address ethkey.EIP55Address, evmChainID *big.Big, qopts ...pg.QOpt) (jobID int32, err error) { +func (o *orm) FindJobIDByAddress(address evmtypes.EIP55Address, evmChainID *big.Big, qopts ...pg.QOpt) (jobID int32, err error) { q := o.q.WithOpts(qopts...) err = q.Transaction(func(tx pg.Queryer) error { stmt := ` @@ -1321,7 +1321,7 @@ func toVRFSpecRow(spec *VRFSpec) vrfSpecRow { func (r vrfSpecRow) toVRFSpec() *VRFSpec { for _, a := range r.FromAddresses { r.VRFSpec.FromAddresses = append(r.VRFSpec.FromAddresses, - ethkey.EIP55AddressFromAddress(common.BytesToAddress(a))) + evmtypes.EIP55AddressFromAddress(common.BytesToAddress(a))) } return r.VRFSpec } @@ -1360,7 +1360,7 @@ func toBlockhashStoreSpecRow(spec *BlockhashStoreSpec) blockhashStoreSpecRow { func (r blockhashStoreSpecRow) toBlockhashStoreSpec() *BlockhashStoreSpec { for _, a := range r.FromAddresses { r.BlockhashStoreSpec.FromAddresses = append(r.BlockhashStoreSpec.FromAddresses, - ethkey.EIP55AddressFromAddress(common.BytesToAddress(a))) + evmtypes.EIP55AddressFromAddress(common.BytesToAddress(a))) } return r.BlockhashStoreSpec } @@ -1399,7 +1399,7 @@ func toBlockHeaderFeederSpecRow(spec *BlockHeaderFeederSpec) blockHeaderFeederSp func (r blockHeaderFeederSpecRow) toBlockHeaderFeederSpec() *BlockHeaderFeederSpec { for _, a := range r.FromAddresses { r.BlockHeaderFeederSpec.FromAddresses = append(r.BlockHeaderFeederSpec.FromAddresses, - ethkey.EIP55AddressFromAddress(common.BytesToAddress(a))) + evmtypes.EIP55AddressFromAddress(common.BytesToAddress(a))) } return r.BlockHeaderFeederSpec } @@ -1438,7 +1438,7 @@ func toLegacyGasStationServerSpecRow(spec *LegacyGasStationServerSpec) legacyGas func (r legacyGasStationServerSpecRow) toLegacyGasStationServerSpec() *LegacyGasStationServerSpec { for _, a := range r.FromAddresses { r.LegacyGasStationServerSpec.FromAddresses = append(r.LegacyGasStationServerSpec.FromAddresses, - ethkey.EIP55AddressFromAddress(common.BytesToAddress(a))) + evmtypes.EIP55AddressFromAddress(common.BytesToAddress(a))) } return r.LegacyGasStationServerSpec } diff --git a/core/services/job/runner_integration_test.go b/core/services/job/runner_integration_test.go index 2722e190e24..8c631984680 100644 --- a/core/services/job/runner_integration_test.go +++ b/core/services/job/runner_integration_test.go @@ -29,6 +29,7 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/auth" "github.com/smartcontractkit/chainlink/v2/core/bridges" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" "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" @@ -38,7 +39,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/chainlink" "github.com/smartcontractkit/chainlink/v2/core/services/job" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ethkey" "github.com/smartcontractkit/chainlink/v2/core/services/ocr" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/validate" "github.com/smartcontractkit/chainlink/v2/core/services/ocrcommon" @@ -67,7 +67,7 @@ func TestRunner(t *testing.T) { require.NoError(t, err) kbid := models.MustSha256HashFromHex(kb.ID()) c.OCR.KeyBundleID = &kbid - taddress := ethkey.EIP55AddressFromAddress(transmitterAddress) + taddress := types.EIP55AddressFromAddress(transmitterAddress) c.OCR.TransmitterAddress = &taddress c.OCR2.DatabaseTimeout = commonconfig.MustNewDuration(time.Second) c.OCR2.ContractTransmitterTransmitTimeout = commonconfig.MustNewDuration(time.Second) diff --git a/core/services/job/spawner.go b/core/services/job/spawner.go index f0486df1c25..3d30a3190b3 100644 --- a/core/services/job/spawner.go +++ b/core/services/job/spawner.go @@ -78,7 +78,7 @@ type ( // non-db side effects. This is required in order to guarantee mutual atomicity between // all tasks intended to happen during job deletion. For the same reason, the job will // not show up in the db within OnDeleteJob(), even though it is still actively running. - OnDeleteJob(jb Job, q pg.Queryer) error + OnDeleteJob(ctx context.Context, jb Job, q pg.Queryer) error } activeJob struct { @@ -340,7 +340,7 @@ func (js *spawner) DeleteJob(jobID int32, qopts ...pg.QOpt) error { // we know the DELETE will succeed. The DELETE will be finalized only if all db transactions in OnDeleteJob() // succeed. If either of those fails, the job will not be stopped and everything will be rolled back. lggr.Debugw("Callback: OnDeleteJob") - err = aj.delegate.OnDeleteJob(aj.spec, tx) + err = aj.delegate.OnDeleteJob(ctx, aj.spec, tx) if err != nil { return err } @@ -395,7 +395,7 @@ func (n *NullDelegate) ServicesForSpec(ctx context.Context, spec Job) (s []Servi return } -func (n *NullDelegate) BeforeJobCreated(spec Job) {} -func (n *NullDelegate) AfterJobCreated(spec Job) {} -func (n *NullDelegate) BeforeJobDeleted(spec Job) {} -func (n *NullDelegate) OnDeleteJob(spec Job, q pg.Queryer) error { return nil } +func (n *NullDelegate) BeforeJobCreated(spec Job) {} +func (n *NullDelegate) AfterJobCreated(spec Job) {} +func (n *NullDelegate) BeforeJobDeleted(spec Job) {} +func (n *NullDelegate) OnDeleteJob(ctx context.Context, spec Job, q pg.Queryer) error { return nil } diff --git a/core/services/keeper/delegate.go b/core/services/keeper/delegate.go index c2c546fcd33..8cadb8cd77f 100644 --- a/core/services/keeper/delegate.go +++ b/core/services/keeper/delegate.go @@ -51,10 +51,10 @@ func (d *Delegate) JobType() job.Type { return job.Keeper } -func (d *Delegate) BeforeJobCreated(spec job.Job) {} -func (d *Delegate) AfterJobCreated(spec job.Job) {} -func (d *Delegate) BeforeJobDeleted(spec job.Job) {} -func (d *Delegate) OnDeleteJob(spec job.Job, q pg.Queryer) error { return nil } +func (d *Delegate) BeforeJobCreated(spec job.Job) {} +func (d *Delegate) AfterJobCreated(spec job.Job) {} +func (d *Delegate) BeforeJobDeleted(spec job.Job) {} +func (d *Delegate) OnDeleteJob(ctx context.Context, spec job.Job, q pg.Queryer) error { return nil } // ServicesForSpec satisfies the job.Delegate interface. func (d *Delegate) ServicesForSpec(ctx context.Context, spec job.Job) (services []job.ServiceCtx, err error) { diff --git a/core/services/keeper/integration_test.go b/core/services/keeper/integration_test.go index af95788029f..d78b1fb2ca5 100644 --- a/core/services/keeper/integration_test.go +++ b/core/services/keeper/integration_test.go @@ -20,6 +20,7 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/chains/evm/assets" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/client" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/forwarders" + evmtypes "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" ubig "github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils/big" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/authorized_forwarder" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/basic_upkeep_contract" @@ -36,7 +37,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/services/chainlink" "github.com/smartcontractkit/chainlink/v2/core/services/job" "github.com/smartcontractkit/chainlink/v2/core/services/keeper" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ethkey" webpresenters "github.com/smartcontractkit/chainlink/v2/core/web/presenters" ) @@ -77,7 +77,7 @@ func deployKeeperRegistry( require.NoError(t, err) backend.Commit() - wrapper, err := keeper.NewRegistryWrapper(ethkey.EIP55AddressFromAddress(regAddr), backend) + wrapper, err := keeper.NewRegistryWrapper(evmtypes.EIP55AddressFromAddress(regAddr), backend) require.NoError(t, err) return regAddr, wrapper case keeper.RegistryVersion_1_2: @@ -104,7 +104,7 @@ func deployKeeperRegistry( ) require.NoError(t, err) backend.Commit() - wrapper, err := keeper.NewRegistryWrapper(ethkey.EIP55AddressFromAddress(regAddr), backend) + wrapper, err := keeper.NewRegistryWrapper(evmtypes.EIP55AddressFromAddress(regAddr), backend) require.NoError(t, err) return regAddr, wrapper case keeper.RegistryVersion_1_3: @@ -140,7 +140,7 @@ func deployKeeperRegistry( ) require.NoError(t, err) backend.Commit() - wrapper, err := keeper.NewRegistryWrapper(ethkey.EIP55AddressFromAddress(regAddr), backend) + wrapper, err := keeper.NewRegistryWrapper(evmtypes.EIP55AddressFromAddress(regAddr), backend) require.NoError(t, err) return regAddr, wrapper default: @@ -181,7 +181,7 @@ func TestKeeperEthIntegration(t *testing.T) { // setup node key nodeKey := cltest.MustGenerateRandomKey(t) nodeAddress := nodeKey.Address - nodeAddressEIP55 := ethkey.EIP55AddressFromAddress(nodeAddress) + nodeAddressEIP55 := evmtypes.EIP55AddressFromAddress(nodeAddress) // setup blockchain sergey := testutils.MustNewSimTransactor(t) // owns all the link @@ -254,7 +254,7 @@ func TestKeeperEthIntegration(t *testing.T) { require.NoError(t, app.Start(testutils.Context(t))) // create job - regAddrEIP55 := ethkey.EIP55AddressFromAddress(regAddr) + regAddrEIP55 := evmtypes.EIP55AddressFromAddress(regAddr) job := cltest.MustInsertKeeperJob(t, db, korm, nodeAddressEIP55, regAddrEIP55) err = app.JobSpawner().StartService(testutils.Context(t), job) require.NoError(t, err) @@ -333,7 +333,7 @@ func TestKeeperForwarderEthIntegration(t *testing.T) { // setup node key nodeKey := cltest.MustGenerateRandomKey(t) nodeAddress := nodeKey.Address - nodeAddressEIP55 := ethkey.EIP55AddressFromAddress(nodeAddress) + nodeAddressEIP55 := evmtypes.EIP55AddressFromAddress(nodeAddress) // setup blockchain sergey := testutils.MustNewSimTransactor(t) // owns all the link @@ -413,9 +413,9 @@ func TestKeeperForwarderEthIntegration(t *testing.T) { app := cltest.NewApplicationWithConfigV2AndKeyOnSimulatedBlockchain(t, config, backend.Backend(), nodeKey) require.NoError(t, app.Start(testutils.Context(t))) - forwarderORM := forwarders.NewORM(db, logger.TestLogger(t), config.Database()) + forwarderORM := forwarders.NewORM(db) chainID := ubig.Big(*backend.ConfiguredChainID()) - _, err = forwarderORM.CreateForwarder(fwdrAddress, chainID) + _, err = forwarderORM.CreateForwarder(testutils.Context(t), fwdrAddress, chainID) require.NoError(t, err) addr, err := app.GetRelayers().LegacyEVMChains().Slice()[0].TxManager().GetForwarderForEOA(nodeAddress) @@ -423,7 +423,7 @@ func TestKeeperForwarderEthIntegration(t *testing.T) { require.Equal(t, addr, fwdrAddress) // create job - regAddrEIP55 := ethkey.EIP55AddressFromAddress(regAddr) + regAddrEIP55 := evmtypes.EIP55AddressFromAddress(regAddr) jb := job.Job{ ID: 1, @@ -447,9 +447,9 @@ func TestKeeperForwarderEthIntegration(t *testing.T) { JobID: jb.ID, KeeperIndex: 0, NumKeepers: 2, - KeeperIndexMap: map[ethkey.EIP55Address]int32{ + KeeperIndexMap: map[evmtypes.EIP55Address]int32{ nodeAddressEIP55: 0, - ethkey.EIP55AddressFromAddress(nelly.From): 1, + evmtypes.EIP55AddressFromAddress(nelly.From): 1, }, } err = korm.UpsertRegistry(®istry) @@ -489,7 +489,7 @@ func TestMaxPerformDataSize(t *testing.T) { // setup node key nodeKey := cltest.MustGenerateRandomKey(t) nodeAddress := nodeKey.Address - nodeAddressEIP55 := ethkey.EIP55AddressFromAddress(nodeAddress) + nodeAddressEIP55 := evmtypes.EIP55AddressFromAddress(nodeAddress) // setup blockchain sergey := testutils.MustNewSimTransactor(t) // owns all the link @@ -558,7 +558,7 @@ func TestMaxPerformDataSize(t *testing.T) { require.NoError(t, app.Start(testutils.Context(t))) // create job - regAddrEIP55 := ethkey.EIP55AddressFromAddress(regAddr) + regAddrEIP55 := evmtypes.EIP55AddressFromAddress(regAddr) job := cltest.MustInsertKeeperJob(t, db, korm, nodeAddressEIP55, regAddrEIP55) err = app.JobSpawner().StartService(testutils.Context(t), job) require.NoError(t, err) diff --git a/core/services/keeper/models.go b/core/services/keeper/models.go index fe034bcc505..69bd0e6a577 100644 --- a/core/services/keeper/models.go +++ b/core/services/keeper/models.go @@ -8,20 +8,20 @@ import ( "github.com/pkg/errors" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils/big" "github.com/smartcontractkit/chainlink/v2/core/null" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ethkey" ) -type KeeperIndexMap map[ethkey.EIP55Address]int32 +type KeeperIndexMap map[types.EIP55Address]int32 type Registry struct { ID int64 BlockCountPerTurn int32 CheckGas uint32 - ContractAddress ethkey.EIP55Address - FromAddress ethkey.EIP55Address + ContractAddress types.EIP55Address + FromAddress types.EIP55Address JobID int32 KeeperIndex int32 NumKeepers int32 diff --git a/core/services/keeper/orm.go b/core/services/keeper/orm.go index fc8770cd864..55dd6c52e68 100644 --- a/core/services/keeper/orm.go +++ b/core/services/keeper/orm.go @@ -7,9 +7,9 @@ import ( "github.com/lib/pq" "github.com/pkg/errors" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils/big" "github.com/smartcontractkit/chainlink/v2/core/logger" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ethkey" "github.com/smartcontractkit/chainlink/v2/core/services/pg" ) @@ -40,7 +40,7 @@ func (korm ORM) Registries() ([]Registry, error) { } // RegistryByContractAddress returns a single registry based on provided address -func (korm ORM) RegistryByContractAddress(registryAddress ethkey.EIP55Address) (Registry, error) { +func (korm ORM) RegistryByContractAddress(registryAddress types.EIP55Address) (Registry, error) { var registry Registry err := korm.q.Get(®istry, `SELECT * FROM keeper_registries WHERE keeper_registries.contract_address = $1`, registryAddress) return registry, errors.Wrap(err, "failed to get registry") @@ -86,7 +86,7 @@ RETURNING * } // UpdateUpkeepLastKeeperIndex updates the last keeper index for an upkeep -func (korm ORM) UpdateUpkeepLastKeeperIndex(jobID int32, upkeepID *big.Big, fromAddress ethkey.EIP55Address) error { +func (korm ORM) UpdateUpkeepLastKeeperIndex(jobID int32, upkeepID *big.Big, fromAddress types.EIP55Address) error { _, err := korm.q.Exec(` UPDATE upkeep_registrations SET @@ -125,7 +125,7 @@ DELETE FROM upkeep_registrations WHERE registry_id IN ( // -- OR is it my buddy's turn AND they were the last keeper to do the perform for this upkeep // DEV: note we cast upkeep_id and binaryHash as 32 bits, even though both are 256 bit numbers when performing XOR. This is enough information // to distribute the upkeeps over the keepers so long as num keepers < 4294967296 -func (korm ORM) EligibleUpkeepsForRegistry(registryAddress ethkey.EIP55Address, blockNumber int64, gracePeriod int64, binaryHash string) (upkeeps []UpkeepRegistration, err error) { +func (korm ORM) EligibleUpkeepsForRegistry(registryAddress types.EIP55Address, blockNumber int64, gracePeriod int64, binaryHash string) (upkeeps []UpkeepRegistration, err error) { stmt := ` SELECT upkeep_registrations.* FROM upkeep_registrations @@ -212,7 +212,7 @@ WHERE registry_id = $1 } // SetLastRunInfoForUpkeepOnJob sets the last run block height and the associated keeper index only if the new block height is greater than the previous. -func (korm ORM) SetLastRunInfoForUpkeepOnJob(jobID int32, upkeepID *big.Big, height int64, fromAddress ethkey.EIP55Address, qopts ...pg.QOpt) (int64, error) { +func (korm ORM) SetLastRunInfoForUpkeepOnJob(jobID int32, upkeepID *big.Big, height int64, fromAddress types.EIP55Address, qopts ...pg.QOpt) (int64, error) { res, err := korm.q.WithOpts(qopts...).Exec(` UPDATE upkeep_registrations SET last_run_block_height = $1, diff --git a/core/services/keeper/orm_test.go b/core/services/keeper/orm_test.go index 2ce459886ae..ed58554ef0d 100644 --- a/core/services/keeper/orm_test.go +++ b/core/services/keeper/orm_test.go @@ -15,6 +15,7 @@ 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" @@ -23,7 +24,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/keeper" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ethkey" "github.com/smartcontractkit/chainlink/v2/core/utils" bigmath "github.com/smartcontractkit/chainlink/v2/core/utils/big_math" ) @@ -400,9 +400,9 @@ func TestKeeperDB_NewSetLastRunInfoForUpkeepOnJob(t *testing.T) { registry, j := cltest.MustInsertKeeperRegistry(t, db, orm, ethKeyStore, 0, 1, 20) upkeep := cltest.MustInsertUpkeepForRegistry(t, db, config.Database(), registry) registry.NumKeepers = 2 - registry.KeeperIndexMap = map[ethkey.EIP55Address]int32{ + registry.KeeperIndexMap = map[types.EIP55Address]int32{ registry.FromAddress: 0, - ethkey.EIP55AddressFromAddress(evmutils.ZeroAddress): 1, + types.EIP55AddressFromAddress(evmutils.ZeroAddress): 1, } err := orm.UpsertRegistry(®istry) require.NoError(t, err, "UPDATE keeper_registries") @@ -418,7 +418,7 @@ func TestKeeperDB_NewSetLastRunInfoForUpkeepOnJob(t *testing.T) { require.Equal(t, rowsAffected, int64(0)) assertLastRunHeight(t, db, upkeep, 100, 0) // update to same block height allowed - rowsAffected, err = orm.SetLastRunInfoForUpkeepOnJob(j.ID, upkeep.UpkeepID, 100, ethkey.EIP55AddressFromAddress(evmutils.ZeroAddress)) + rowsAffected, err = orm.SetLastRunInfoForUpkeepOnJob(j.ID, upkeep.UpkeepID, 100, types.EIP55AddressFromAddress(evmutils.ZeroAddress)) require.NoError(t, err) require.Equal(t, rowsAffected, int64(1)) assertLastRunHeight(t, db, upkeep, 100, 1) diff --git a/core/services/keeper/registry1_1_synchronizer_test.go b/core/services/keeper/registry1_1_synchronizer_test.go index a4f03d4d34a..e0c2ebb2b3a 100644 --- a/core/services/keeper/registry1_1_synchronizer_test.go +++ b/core/services/keeper/registry1_1_synchronizer_test.go @@ -229,8 +229,7 @@ func Test_RegistrySynchronizer1_1_ConfigSetLog(t *testing.T) { registryMock.MockResponse("getKeeperList", []common.Address{fromAddress}).Once() registryMock.MockResponse("getConfig", newConfig).Once() - cfg := configtest.NewGeneralConfig(t, nil) - head := cltest.MustInsertHead(t, db, cfg.Database(), 1) + head := cltest.MustInsertHead(t, db, 1) rawLog := types.Log{BlockHash: head.Hash} log := registry1_1.KeeperRegistryConfigSet{} logBroadcast := logmocks.NewBroadcast(t) @@ -276,8 +275,7 @@ func Test_RegistrySynchronizer1_1_KeepersUpdatedLog(t *testing.T) { registryMock.MockResponse("getConfig", registryConfig1_1).Once() registryMock.MockResponse("getKeeperList", addresses).Once() - cfg := configtest.NewGeneralConfig(t, nil) - head := cltest.MustInsertHead(t, db, cfg.Database(), 1) + head := cltest.MustInsertHead(t, db, 1) rawLog := types.Log{BlockHash: head.Hash} log := registry1_1.KeeperRegistryKeepersUpdated{} logBroadcast := logmocks.NewBroadcast(t) @@ -316,8 +314,7 @@ func Test_RegistrySynchronizer1_1_UpkeepCanceledLog(t *testing.T) { cltest.WaitForCount(t, db, "keeper_registries", 1) cltest.WaitForCount(t, db, "upkeep_registrations", 3) - cfg := configtest.NewGeneralConfig(t, nil) - head := cltest.MustInsertHead(t, db, cfg.Database(), 1) + head := cltest.MustInsertHead(t, db, 1) rawLog := types.Log{BlockHash: head.Hash} log := registry1_1.KeeperRegistryUpkeepCanceled{Id: big.NewInt(1)} logBroadcast := logmocks.NewBroadcast(t) @@ -357,8 +354,7 @@ func Test_RegistrySynchronizer1_1_UpkeepRegisteredLog(t *testing.T) { registryMock := cltest.NewContractMockReceiver(t, ethMock, keeper.Registry1_1ABI, contractAddress) registryMock.MockResponse("getUpkeep", upkeepConfig1_1).Once() - cfg := configtest.NewGeneralConfig(t, nil) - head := cltest.MustInsertHead(t, db, cfg.Database(), 1) + head := cltest.MustInsertHead(t, db, 1) rawLog := types.Log{BlockHash: head.Hash} log := registry1_1.KeeperRegistryUpkeepRegistered{Id: big.NewInt(1)} logBroadcast := logmocks.NewBroadcast(t) @@ -399,8 +395,7 @@ func Test_RegistrySynchronizer1_1_UpkeepPerformedLog(t *testing.T) { pgtest.MustExec(t, db, `UPDATE upkeep_registrations SET last_run_block_height = 100`) - cfg := configtest.NewGeneralConfig(t, nil) - head := cltest.MustInsertHead(t, db, cfg.Database(), 1) + head := cltest.MustInsertHead(t, db, 1) rawLog := types.Log{BlockHash: head.Hash, BlockNumber: 200} log := registry1_1.KeeperRegistryUpkeepPerformed{Id: big.NewInt(0), From: fromAddress} logBroadcast := logmocks.NewBroadcast(t) diff --git a/core/services/keeper/registry1_2_synchronizer_test.go b/core/services/keeper/registry1_2_synchronizer_test.go index b7456ad94e4..387452dddf9 100644 --- a/core/services/keeper/registry1_2_synchronizer_test.go +++ b/core/services/keeper/registry1_2_synchronizer_test.go @@ -252,8 +252,7 @@ func Test_RegistrySynchronizer1_2_ConfigSetLog(t *testing.T) { Keepers: []common.Address{fromAddress}, }).Once() - cfg := configtest.NewGeneralConfig(t, nil) - head := cltest.MustInsertHead(t, db, cfg.Database(), 1) + head := cltest.MustInsertHead(t, db, 1) rawLog := types.Log{BlockHash: head.Hash} log := registry1_2.KeeperRegistryConfigSet{} logBroadcast := logmocks.NewBroadcast(t) @@ -303,8 +302,7 @@ func Test_RegistrySynchronizer1_2_KeepersUpdatedLog(t *testing.T) { Keepers: addresses, }).Once() - cfg := configtest.NewGeneralConfig(t, nil) - head := cltest.MustInsertHead(t, db, cfg.Database(), 1) + head := cltest.MustInsertHead(t, db, 1) rawLog := types.Log{BlockHash: head.Hash} log := registry1_2.KeeperRegistryKeepersUpdated{} logBroadcast := logmocks.NewBroadcast(t) @@ -345,8 +343,7 @@ func Test_RegistrySynchronizer1_2_UpkeepCanceledLog(t *testing.T) { cltest.WaitForCount(t, db, "keeper_registries", 1) cltest.WaitForCount(t, db, "upkeep_registrations", 3) - cfg := configtest.NewGeneralConfig(t, nil) - head := cltest.MustInsertHead(t, db, cfg.Database(), 1) + head := cltest.MustInsertHead(t, db, 1) rawLog := types.Log{BlockHash: head.Hash} log := registry1_2.KeeperRegistryUpkeepCanceled{Id: big.NewInt(3)} logBroadcast := logmocks.NewBroadcast(t) @@ -387,8 +384,7 @@ func Test_RegistrySynchronizer1_2_UpkeepRegisteredLog(t *testing.T) { registryMock := cltest.NewContractMockReceiver(t, ethMock, keeper.Registry1_2ABI, contractAddress) registryMock.MockResponse("getUpkeep", upkeepConfig1_2).Once() - cfg := configtest.NewGeneralConfig(t, nil) - head := cltest.MustInsertHead(t, db, cfg.Database(), 1) + head := cltest.MustInsertHead(t, db, 1) rawLog := types.Log{BlockHash: head.Hash} log := registry1_2.KeeperRegistryUpkeepRegistered{Id: big.NewInt(420)} logBroadcast := logmocks.NewBroadcast(t) @@ -430,8 +426,7 @@ func Test_RegistrySynchronizer1_2_UpkeepPerformedLog(t *testing.T) { pgtest.MustExec(t, db, `UPDATE upkeep_registrations SET last_run_block_height = 100`) - cfg := configtest.NewGeneralConfig(t, nil) - head := cltest.MustInsertHead(t, db, cfg.Database(), 1) + head := cltest.MustInsertHead(t, db, 1) rawLog := types.Log{BlockHash: head.Hash, BlockNumber: 200} log := registry1_2.KeeperRegistryUpkeepPerformed{Id: big.NewInt(3), From: fromAddress} logBroadcast := logmocks.NewBroadcast(t) @@ -495,8 +490,7 @@ func Test_RegistrySynchronizer1_2_UpkeepGasLimitSetLog(t *testing.T) { newConfig.ExecuteGas = 4_000_000 // change from default registryMock.MockResponse("getUpkeep", newConfig).Once() - cfg := configtest.NewGeneralConfig(t, nil) - head := cltest.MustInsertHead(t, db, cfg.Database(), 1) + head := cltest.MustInsertHead(t, db, 1) rawLog := types.Log{BlockHash: head.Hash} log := registry1_2.KeeperRegistryUpkeepGasLimitSet{Id: big.NewInt(3), GasLimit: big.NewInt(4_000_000)} logBroadcast := logmocks.NewBroadcast(t) @@ -537,8 +531,7 @@ func Test_RegistrySynchronizer1_2_UpkeepReceivedLog(t *testing.T) { registryMock := cltest.NewContractMockReceiver(t, ethMock, keeper.Registry1_2ABI, contractAddress) registryMock.MockResponse("getUpkeep", upkeepConfig1_2).Once() - cfg := configtest.NewGeneralConfig(t, nil) - head := cltest.MustInsertHead(t, db, cfg.Database(), 1) + head := cltest.MustInsertHead(t, db, 1) rawLog := types.Log{BlockHash: head.Hash} log := registry1_2.KeeperRegistryUpkeepReceived{Id: big.NewInt(420)} logBroadcast := logmocks.NewBroadcast(t) @@ -576,8 +569,7 @@ func Test_RegistrySynchronizer1_2_UpkeepMigratedLog(t *testing.T) { cltest.WaitForCount(t, db, "keeper_registries", 1) cltest.WaitForCount(t, db, "upkeep_registrations", 3) - cfg := configtest.NewGeneralConfig(t, nil) - head := cltest.MustInsertHead(t, db, cfg.Database(), 1) + head := cltest.MustInsertHead(t, db, 1) rawLog := types.Log{BlockHash: head.Hash} log := registry1_2.KeeperRegistryUpkeepMigrated{Id: big.NewInt(3)} logBroadcast := logmocks.NewBroadcast(t) diff --git a/core/services/keeper/registry1_3_synchronizer_test.go b/core/services/keeper/registry1_3_synchronizer_test.go index 77bb873e1d0..6fc919775cc 100644 --- a/core/services/keeper/registry1_3_synchronizer_test.go +++ b/core/services/keeper/registry1_3_synchronizer_test.go @@ -257,8 +257,7 @@ func Test_RegistrySynchronizer1_3_ConfigSetLog(t *testing.T) { Keepers: []common.Address{fromAddress}, }).Once() - cfg := configtest.NewGeneralConfig(t, nil) - head := cltest.MustInsertHead(t, db, cfg.Database(), 1) + head := cltest.MustInsertHead(t, db, 1) rawLog := types.Log{BlockHash: head.Hash} log := registry1_3.KeeperRegistryConfigSet{} logBroadcast := logmocks.NewBroadcast(t) @@ -308,8 +307,7 @@ func Test_RegistrySynchronizer1_3_KeepersUpdatedLog(t *testing.T) { Keepers: addresses, }).Once() - cfg := configtest.NewGeneralConfig(t, nil) - head := cltest.MustInsertHead(t, db, cfg.Database(), 1) + head := cltest.MustInsertHead(t, db, 1) rawLog := types.Log{BlockHash: head.Hash} log := registry1_3.KeeperRegistryKeepersUpdated{} logBroadcast := logmocks.NewBroadcast(t) @@ -350,8 +348,7 @@ func Test_RegistrySynchronizer1_3_UpkeepCanceledLog(t *testing.T) { cltest.WaitForCount(t, db, "keeper_registries", 1) cltest.WaitForCount(t, db, "upkeep_registrations", 3) - cfg := configtest.NewGeneralConfig(t, nil) - head := cltest.MustInsertHead(t, db, cfg.Database(), 1) + head := cltest.MustInsertHead(t, db, 1) rawLog := types.Log{BlockHash: head.Hash} log := registry1_3.KeeperRegistryUpkeepCanceled{Id: big.NewInt(3)} logBroadcast := logmocks.NewBroadcast(t) @@ -392,8 +389,7 @@ func Test_RegistrySynchronizer1_3_UpkeepRegisteredLog(t *testing.T) { registryMock := cltest.NewContractMockReceiver(t, ethMock, keeper.Registry1_3ABI, contractAddress) registryMock.MockResponse("getUpkeep", upkeepConfig1_3).Once() - cfg := configtest.NewGeneralConfig(t, nil) - head := cltest.MustInsertHead(t, db, cfg.Database(), 1) + head := cltest.MustInsertHead(t, db, 1) rawLog := types.Log{BlockHash: head.Hash} log := registry1_3.KeeperRegistryUpkeepRegistered{Id: big.NewInt(420)} logBroadcast := logmocks.NewBroadcast(t) @@ -435,8 +431,7 @@ func Test_RegistrySynchronizer1_3_UpkeepPerformedLog(t *testing.T) { pgtest.MustExec(t, db, `UPDATE upkeep_registrations SET last_run_block_height = 100`) - cfg := configtest.NewGeneralConfig(t, nil) - head := cltest.MustInsertHead(t, db, cfg.Database(), 1) + head := cltest.MustInsertHead(t, db, 1) rawLog := types.Log{BlockHash: head.Hash, BlockNumber: 200} log := registry1_3.KeeperRegistryUpkeepPerformed{Id: big.NewInt(3), From: fromAddress} logBroadcast := logmocks.NewBroadcast(t) @@ -500,8 +495,7 @@ func Test_RegistrySynchronizer1_3_UpkeepGasLimitSetLog(t *testing.T) { newConfig.ExecuteGas = 4_000_000 // change from default registryMock.MockResponse("getUpkeep", newConfig).Once() - cfg := configtest.NewGeneralConfig(t, nil) - head := cltest.MustInsertHead(t, db, cfg.Database(), 1) + head := cltest.MustInsertHead(t, db, 1) rawLog := types.Log{BlockHash: head.Hash} log := registry1_3.KeeperRegistryUpkeepGasLimitSet{Id: big.NewInt(3), GasLimit: big.NewInt(4_000_000)} logBroadcast := logmocks.NewBroadcast(t) @@ -542,8 +536,7 @@ func Test_RegistrySynchronizer1_3_UpkeepReceivedLog(t *testing.T) { registryMock := cltest.NewContractMockReceiver(t, ethMock, keeper.Registry1_3ABI, contractAddress) registryMock.MockResponse("getUpkeep", upkeepConfig1_3).Once() - cfg := configtest.NewGeneralConfig(t, nil) - head := cltest.MustInsertHead(t, db, cfg.Database(), 1) + head := cltest.MustInsertHead(t, db, 1) rawLog := types.Log{BlockHash: head.Hash} log := registry1_3.KeeperRegistryUpkeepReceived{Id: big.NewInt(420)} logBroadcast := logmocks.NewBroadcast(t) @@ -581,8 +574,7 @@ func Test_RegistrySynchronizer1_3_UpkeepMigratedLog(t *testing.T) { cltest.WaitForCount(t, db, "keeper_registries", 1) cltest.WaitForCount(t, db, "upkeep_registrations", 3) - cfg := configtest.NewGeneralConfig(t, nil) - head := cltest.MustInsertHead(t, db, cfg.Database(), 1) + head := cltest.MustInsertHead(t, db, 1) rawLog := types.Log{BlockHash: head.Hash} log := registry1_3.KeeperRegistryUpkeepMigrated{Id: big.NewInt(3)} logBroadcast := logmocks.NewBroadcast(t) @@ -622,8 +614,7 @@ func Test_RegistrySynchronizer1_3_UpkeepPausedLog_UpkeepUnpausedLog(t *testing.T cltest.WaitForCount(t, db, "keeper_registries", 1) cltest.WaitForCount(t, db, "upkeep_registrations", 3) - cfg := configtest.NewGeneralConfig(t, nil) - head := cltest.MustInsertHead(t, db, cfg.Database(), 1) + head := cltest.MustInsertHead(t, db, 1) rawLog := types.Log{BlockHash: head.Hash} log := registry1_3.KeeperRegistryUpkeepPaused{Id: upkeepId} logBroadcast := logmocks.NewBroadcast(t) @@ -638,8 +629,7 @@ func Test_RegistrySynchronizer1_3_UpkeepPausedLog_UpkeepUnpausedLog(t *testing.T cltest.WaitForCount(t, db, "upkeep_registrations", 2) - cfg = configtest.NewGeneralConfig(t, nil) - head = cltest.MustInsertHead(t, db, cfg.Database(), 2) + head = cltest.MustInsertHead(t, db, 2) rawLog = types.Log{BlockHash: head.Hash} unpausedlog := registry1_3.KeeperRegistryUpkeepUnpaused{Id: upkeepId} logBroadcast = logmocks.NewBroadcast(t) @@ -691,8 +681,7 @@ func Test_RegistrySynchronizer1_3_UpkeepCheckDataUpdatedLog(t *testing.T) { cltest.WaitForCount(t, db, "keeper_registries", 1) cltest.WaitForCount(t, db, "upkeep_registrations", 1) - cfg := configtest.NewGeneralConfig(t, nil) - head := cltest.MustInsertHead(t, db, cfg.Database(), 1) + head := cltest.MustInsertHead(t, db, 1) rawLog := types.Log{BlockHash: head.Hash} _ = logmocks.NewBroadcast(t) newCheckData := []byte("Chainlink") diff --git a/core/services/keeper/registry_interface.go b/core/services/keeper/registry_interface.go index fd1c2314a41..c80be29154a 100644 --- a/core/services/keeper/registry_interface.go +++ b/core/services/keeper/registry_interface.go @@ -17,7 +17,6 @@ import ( registry1_2 "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/keeper_registry_wrapper1_2" registry1_3 "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/keeper_registry_wrapper1_3" type_and_version "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/type_and_version_interface_wrapper" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ethkey" ) type RegistryVersion int32 @@ -53,7 +52,7 @@ type upkeepGetter interface { // RegistryWrapper implements a layer on top of different versions of registry wrappers // to provide a unified layer to rest of the codebase type RegistryWrapper struct { - Address ethkey.EIP55Address + Address evmtypes.EIP55Address Version RegistryVersion contract1_1 *registry1_1.KeeperRegistry contract1_2 *registry1_2.KeeperRegistry @@ -61,7 +60,7 @@ type RegistryWrapper struct { evmClient evmclient.Client } -func NewRegistryWrapper(address ethkey.EIP55Address, evmClient evmclient.Client) (*RegistryWrapper, error) { +func NewRegistryWrapper(address evmtypes.EIP55Address, evmClient evmclient.Client) (*RegistryWrapper, error) { interface_wrapper, err := type_and_version.NewTypeAndVersionInterface( address.Address(), evmClient, diff --git a/core/services/keeper/registry_synchronizer_process_logs.go b/core/services/keeper/registry_synchronizer_process_logs.go index 7b82f49ae4c..b0a3f6af5bd 100644 --- a/core/services/keeper/registry_synchronizer_process_logs.go +++ b/core/services/keeper/registry_synchronizer_process_logs.go @@ -7,11 +7,11 @@ import ( "github.com/pkg/errors" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/log" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils/big" registry1_1 "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/keeper_registry_wrapper1_1" registry1_2 "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/keeper_registry_wrapper1_2" registry1_3 "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/keeper_registry_wrapper1_3" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ethkey" ) func (rs *RegistrySynchronizer) processLogs() { @@ -144,7 +144,7 @@ func (rs *RegistrySynchronizer) handleUpkeepPerformed(broadcast log.Broadcast) e if err != nil { return errors.Wrap(err, "Unable to fetch upkeep ID from performed log") } - rowsAffected, err := rs.orm.SetLastRunInfoForUpkeepOnJob(rs.job.ID, big.New(log.UpkeepID), int64(broadcast.RawLog().BlockNumber), ethkey.EIP55AddressFromAddress(log.FromKeeper)) + rowsAffected, err := rs.orm.SetLastRunInfoForUpkeepOnJob(rs.job.ID, big.New(log.UpkeepID), int64(broadcast.RawLog().BlockNumber), types.EIP55AddressFromAddress(log.FromKeeper)) if err != nil { return errors.Wrap(err, "failed to set last run to 0") } @@ -152,7 +152,7 @@ func (rs *RegistrySynchronizer) handleUpkeepPerformed(broadcast log.Broadcast) e "jobID", rs.job.ID, "upkeepID", log.UpkeepID.String(), "blockNumber", int64(broadcast.RawLog().BlockNumber), - "fromAddr", ethkey.EIP55AddressFromAddress(log.FromKeeper), + "fromAddr", types.EIP55AddressFromAddress(log.FromKeeper), "rowsAffected", rowsAffected, ) return nil diff --git a/core/services/keeper/registry_synchronizer_sync.go b/core/services/keeper/registry_synchronizer_sync.go index 7614ed15edb..cdca9512976 100644 --- a/core/services/keeper/registry_synchronizer_sync.go +++ b/core/services/keeper/registry_synchronizer_sync.go @@ -7,9 +7,9 @@ import ( "github.com/pkg/errors" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils/big" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ethkey" ) func (rs *RegistrySynchronizer) fullSync() { @@ -130,7 +130,7 @@ func (rs *RegistrySynchronizer) syncUpkeep(getter upkeepGetter, registry Registr return errors.Wrap(err, "failed to upsert upkeep") } - if err := rs.orm.UpdateUpkeepLastKeeperIndex(rs.job.ID, upkeepID, ethkey.EIP55AddressFromAddress(upkeep.LastKeeper)); err != nil { + if err := rs.orm.UpdateUpkeepLastKeeperIndex(rs.job.ID, upkeepID, types.EIP55AddressFromAddress(upkeep.LastKeeper)); err != nil { return errors.Wrap(err, "failed to update upkeep last keeper index") } @@ -149,9 +149,9 @@ func (rs *RegistrySynchronizer) newRegistryFromChain() (Registry, error) { } keeperIndex := int32(-1) - keeperMap := map[ethkey.EIP55Address]int32{} + keeperMap := map[types.EIP55Address]int32{} for idx, address := range registryConfig.KeeperAddresses { - keeperMap[ethkey.EIP55AddressFromAddress(address)] = int32(idx) + keeperMap[types.EIP55AddressFromAddress(address)] = int32(idx) if address == fromAddress { keeperIndex = int32(idx) } @@ -174,7 +174,7 @@ func (rs *RegistrySynchronizer) newRegistryFromChain() (Registry, error) { // CalcPositioningConstant calculates a positioning constant. // The positioning constant is fixed because upkeepID and registryAddress are immutable -func CalcPositioningConstant(upkeepID *big.Big, registryAddress ethkey.EIP55Address) (int32, error) { +func CalcPositioningConstant(upkeepID *big.Big, registryAddress types.EIP55Address) (int32, error) { upkeepBytes := make([]byte, binary.MaxVarintLen64) binary.PutVarint(upkeepBytes, upkeepID.Mod(big.NewI(math.MaxInt64)).Int64()) bytesToHash := utils.ConcatBytes(upkeepBytes, registryAddress.Bytes()) diff --git a/core/services/keeper/registry_synchronizer_sync_test.go b/core/services/keeper/registry_synchronizer_sync_test.go index e6f42a83201..e4d8e44e20a 100644 --- a/core/services/keeper/registry_synchronizer_sync_test.go +++ b/core/services/keeper/registry_synchronizer_sync_test.go @@ -10,10 +10,10 @@ import ( "github.com/stretchr/testify/require" "go.uber.org/zap/zapcore" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" ubig "github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils/big" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/logger" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ethkey" ) // GetUpkeepFailure implements the upkeepGetter interface with an induced error and nil @@ -32,7 +32,7 @@ func TestSyncUpkeepWithCallback_UpkeepNotFound(t *testing.T) { logger: log.(logger.SugaredLogger), } - addr := ethkey.EIP55Address(testutils.NewAddress().Hex()) + addr := types.EIP55Address(testutils.NewAddress().Hex()) registry := Registry{ ContractAddress: addr, } diff --git a/core/services/keeper/upkeep_executer_test.go b/core/services/keeper/upkeep_executer_test.go index 1018d5f2aab..9b6d64c2e20 100644 --- a/core/services/keeper/upkeep_executer_test.go +++ b/core/services/keeper/upkeep_executer_test.go @@ -132,7 +132,7 @@ func Test_UpkeepExecuter_PerformsUpkeep_Happy(t *testing.T) { c.EVM[0].ChainID = (*ubig.Big)(testutils.SimulatedChainID) }) - gasLimit := 5_000_000 + config.Keeper().Registry().PerformGasOverhead() + gasLimit := uint64(5_000_000 + config.Keeper().Registry().PerformGasOverhead()) ethTxCreated := cltest.NewAwaiter() txm.On("CreateTransaction", @@ -177,7 +177,7 @@ func Test_UpkeepExecuter_PerformsUpkeep_Happy(t *testing.T) { c.EVM[0].ChainID = (*ubig.Big)(testutils.SimulatedChainID) }) - gasLimit := 5_000_000 + config.Keeper().Registry().PerformGasOverhead() + gasLimit := uint64(5_000_000 + config.Keeper().Registry().PerformGasOverhead()) ethTxCreated := cltest.NewAwaiter() txm.On("CreateTransaction", @@ -287,7 +287,7 @@ func Test_UpkeepExecuter_PerformsUpkeep_Happy(t *testing.T) { cltest.NewAwaiter(), cltest.NewAwaiter(), } - gasLimit := 5_000_000 + config.Keeper().Registry().PerformGasOverhead() + gasLimit := uint64(5_000_000 + config.Keeper().Registry().PerformGasOverhead()) txm.On("CreateTransaction", mock.Anything, mock.MatchedBy(func(txRequest txmgr.TxRequest) bool { return txRequest.FeeLimit == gasLimit }), diff --git a/core/services/keeper/upkeep_executer_unit_test.go b/core/services/keeper/upkeep_executer_unit_test.go index 8589720ca5f..9b7a5609e94 100644 --- a/core/services/keeper/upkeep_executer_unit_test.go +++ b/core/services/keeper/upkeep_executer_unit_test.go @@ -7,10 +7,10 @@ import ( "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/assets" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils/big" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/services/job" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ethkey" "github.com/smartcontractkit/chainlink/v2/core/services/pipeline" ) @@ -24,8 +24,8 @@ func (r *registry) PerformGasOverhead() uint32 { return r.pgo } func (r *registry) MaxPerformDataSize() uint32 { return r.mpds } func TestBuildJobSpec(t *testing.T) { - from := ethkey.EIP55Address(testutils.NewAddress().Hex()) - contract := ethkey.EIP55Address(testutils.NewAddress().Hex()) + from := types.EIP55Address(testutils.NewAddress().Hex()) + contract := types.EIP55Address(testutils.NewAddress().Hex()) chainID := "250" jb := job.Job{ ID: 10, diff --git a/core/services/keystore/keys/ethkey/export.go b/core/services/keystore/keys/ethkey/export.go index 451a7453433..dfa85dedc98 100644 --- a/core/services/keystore/keys/ethkey/export.go +++ b/core/services/keystore/keys/ethkey/export.go @@ -5,12 +5,13 @@ import ( "github.com/google/uuid" "github.com/pkg/errors" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" "github.com/smartcontractkit/chainlink/v2/core/utils" ) type EncryptedEthKeyExport struct { KeyType string `json:"keyType"` - Address EIP55Address `json:"address"` + Address types.EIP55Address `json:"address"` Crypto keystore.CryptoJSON `json:"crypto"` } diff --git a/core/services/keystore/keys/ethkey/key.go b/core/services/keystore/keys/ethkey/key.go index 6335ed55adc..02f256b320d 100644 --- a/core/services/keystore/keys/ethkey/key.go +++ b/core/services/keystore/keys/ethkey/key.go @@ -4,6 +4,7 @@ import ( "time" "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" ) // NOTE: This model refers to the OLD key and is only used for migrations @@ -14,7 +15,7 @@ import ( // By default, a key is assumed to represent an ethereum account. type Key struct { ID int32 - Address EIP55Address + Address types.EIP55Address JSON sqlutil.JSON `json:"-"` CreatedAt time.Time `json:"-"` UpdatedAt time.Time `json:"-"` diff --git a/core/services/keystore/keys/ethkey/key_v2.go b/core/services/keystore/keys/ethkey/key_v2.go index 15dc15d3f02..88cc9185787 100644 --- a/core/services/keystore/keys/ethkey/key_v2.go +++ b/core/services/keystore/keys/ethkey/key_v2.go @@ -9,6 +9,8 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" + + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" ) var curve = crypto.S256() @@ -22,7 +24,7 @@ func (raw Raw) Key() KeyV2 { privateKey.D = d privateKey.PublicKey.X, privateKey.PublicKey.Y = curve.ScalarBaseMult(d.Bytes()) address := crypto.PubkeyToAddress(privateKey.PublicKey) - eip55 := EIP55AddressFromAddress(address) + eip55 := types.EIP55AddressFromAddress(address) return KeyV2{ Address: address, EIP55Address: eip55, @@ -42,7 +44,7 @@ var _ fmt.GoStringer = &KeyV2{} type KeyV2 struct { Address common.Address - EIP55Address EIP55Address + EIP55Address types.EIP55Address privateKey *ecdsa.PrivateKey } @@ -56,7 +58,7 @@ func NewV2() (KeyV2, error) { func FromPrivateKey(privKey *ecdsa.PrivateKey) (key KeyV2) { address := crypto.PubkeyToAddress(privKey.PublicKey) - eip55 := EIP55AddressFromAddress(address) + eip55 := types.EIP55AddressFromAddress(address) return KeyV2{ Address: address, EIP55Address: eip55, diff --git a/core/services/keystore/keys/ethkey/key_v2_test.go b/core/services/keystore/keys/ethkey/key_v2_test.go index 82b1084eb97..79a470103ed 100644 --- a/core/services/keystore/keys/ethkey/key_v2_test.go +++ b/core/services/keystore/keys/ethkey/key_v2_test.go @@ -8,6 +8,8 @@ import ( "github.com/ethereum/go-ethereum/crypto" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" ) func TestEthKeyV2_ToKey(t *testing.T) { @@ -20,7 +22,7 @@ func TestEthKeyV2_ToKey(t *testing.T) { assert.Equal(t, k.privateKey, privateKeyECDSA) assert.Equal(t, k.privateKey.PublicKey.X, privateKeyECDSA.PublicKey.X) assert.Equal(t, k.privateKey.PublicKey.Y, privateKeyECDSA.PublicKey.Y) - assert.Equal(t, EIP55AddressFromAddress(crypto.PubkeyToAddress(privateKeyECDSA.PublicKey)).Hex(), k.ID()) + assert.Equal(t, types.EIP55AddressFromAddress(crypto.PubkeyToAddress(privateKeyECDSA.PublicKey)).Hex(), k.ID()) } func TestEthKeyV2_RawPrivateKey(t *testing.T) { diff --git a/core/services/keystore/keys/ethkey/models.go b/core/services/keystore/keys/ethkey/models.go index df4c474b7b9..43af2caffc5 100644 --- a/core/services/keystore/keys/ethkey/models.go +++ b/core/services/keystore/keys/ethkey/models.go @@ -3,12 +3,13 @@ package ethkey import ( "time" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils/big" ) type State struct { ID int32 - Address EIP55Address + Address types.EIP55Address EVMChainID big.Big Disabled bool CreatedAt time.Time diff --git a/core/services/llo/onchain_channel_definition_cache.go b/core/services/llo/onchain_channel_definition_cache.go index af35d237b98..d72079d0b1e 100644 --- a/core/services/llo/onchain_channel_definition_cache.go +++ b/core/services/llo/onchain_channel_definition_cache.go @@ -19,7 +19,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/chains/evm/logpoller" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/llo-feeds/generated/channel_config_store" "github.com/smartcontractkit/chainlink/v2/core/logger" - "github.com/smartcontractkit/chainlink/v2/core/services/pg" "github.com/smartcontractkit/chainlink/v2/core/utils" ) @@ -89,7 +88,7 @@ func NewChannelDefinitionCache(lggr logger.Logger, orm ChannelDefinitionCacheORM func (c *channelDefinitionCache) Start(ctx context.Context) error { // Initial load from DB, then async poll from chain thereafter return c.StartOnce("ChannelDefinitionCache", func() (err error) { - err = c.lp.RegisterFilter(logpoller.Filter{Name: c.filterName, EventSigs: allTopics, Addresses: []common.Address{c.addr}}, pg.WithParentCtx(ctx)) + err = c.lp.RegisterFilter(ctx, logpoller.Filter{Name: c.filterName, EventSigs: allTopics, Addresses: []common.Address{c.addr}}) if err != nil { return err } @@ -140,8 +139,10 @@ func (c *channelDefinitionCache) poll() { func (c *channelDefinitionCache) fetchFromChain() (nLogs int, err error) { // TODO: Pass context + ctx, cancel := services.StopChan(c.chStop).NewCtx() + defer cancel() // https://smartcontract-it.atlassian.net/browse/MERC-3653 - latest, err := c.lp.LatestBlock() + latest, err := c.lp.LatestBlock(ctx) if errors.Is(err, sql.ErrNoRows) { c.lggr.Debug("Logpoller has no logs yet, skipping poll") return 0, nil @@ -156,10 +157,8 @@ func (c *channelDefinitionCache) fetchFromChain() (nLogs int, err error) { return 0, nil } - ctx, cancel := services.StopChan(c.chStop).NewCtx() - defer cancel() // NOTE: We assume that log poller returns logs in ascending order chronologically - logs, err := c.lp.LogsWithSigs(fromBlock, toBlock, allTopics, c.addr, pg.WithParentCtx(ctx)) + logs, err := c.lp.LogsWithSigs(ctx, fromBlock, toBlock, allTopics, c.addr) if err != nil { // TODO: retry? // https://smartcontract-it.atlassian.net/browse/MERC-3653 diff --git a/core/services/ocr/config_overrider.go b/core/services/ocr/config_overrider.go index ac87d0e3924..a58cb402695 100644 --- a/core/services/ocr/config_overrider.go +++ b/core/services/ocr/config_overrider.go @@ -14,8 +14,8 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/services" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" "github.com/smartcontractkit/chainlink/v2/core/logger" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ethkey" "github.com/smartcontractkit/chainlink/v2/core/utils" ) @@ -23,7 +23,7 @@ type ConfigOverriderImpl struct { services.StateMachine logger logger.Logger flags *ContractFlags - contractAddress ethkey.EIP55Address + contractAddress types.EIP55Address pollTicker utils.TickerBase lastStateChangeTimestamp time.Time @@ -49,7 +49,7 @@ type DeltaCConfig interface { func NewConfigOverriderImpl( logger logger.Logger, cfg DeltaCConfig, - contractAddress ethkey.EIP55Address, + contractAddress types.EIP55Address, flags *ContractFlags, pollTicker utils.TickerBase, ) (*ConfigOverriderImpl, error) { diff --git a/core/services/ocr/config_overrider_test.go b/core/services/ocr/config_overrider_test.go index e01102a62f8..1f782989e66 100644 --- a/core/services/ocr/config_overrider_test.go +++ b/core/services/ocr/config_overrider_test.go @@ -15,18 +15,18 @@ import ( ocrtypes "github.com/smartcontractkit/libocr/offchainreporting/types" "github.com/smartcontractkit/chainlink-common/pkg/services/servicetest" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" evmutils "github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/mocks" "github.com/smartcontractkit/chainlink/v2/core/logger" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ethkey" "github.com/smartcontractkit/chainlink/v2/core/services/ocr" "github.com/smartcontractkit/chainlink/v2/core/utils" ) type configOverriderUni struct { overrider *ocr.ConfigOverriderImpl - contractAddress ethkey.EIP55Address + contractAddress types.EIP55Address } type deltaCConfig struct{} @@ -164,10 +164,10 @@ func Test_OCRConfigOverrider(t *testing.T) { flagsContract := mocks.NewFlags(t) flags := &ocr.ContractFlags{FlagsInterface: flagsContract} - address1, err := ethkey.NewEIP55Address(common.BigToAddress(big.NewInt(10000)).Hex()) + address1, err := types.NewEIP55Address(common.BigToAddress(big.NewInt(10000)).Hex()) require.NoError(t, err) - address2, err := ethkey.NewEIP55Address(common.BigToAddress(big.NewInt(1234567890)).Hex()) + address2, err := types.NewEIP55Address(common.BigToAddress(big.NewInt(1234567890)).Hex()) require.NoError(t, err) overrider1a, err := ocr.NewConfigOverriderImpl(testLogger, deltaCConfig{}, address1, flags, nil) @@ -185,7 +185,7 @@ func Test_OCRConfigOverrider(t *testing.T) { }) } -func checkFlagsAddress(t *testing.T, contractAddress ethkey.EIP55Address) func(args mock.Arguments) { +func checkFlagsAddress(t *testing.T, contractAddress types.EIP55Address) func(args mock.Arguments) { return func(args mock.Arguments) { require.Equal(t, []common.Address{ evmutils.ZeroAddress, diff --git a/core/services/ocr/contract_tracker.go b/core/services/ocr/contract_tracker.go index 9eabf93a834..4c3260511d5 100644 --- a/core/services/ocr/contract_tracker.go +++ b/core/services/ocr/contract_tracker.go @@ -402,7 +402,7 @@ func (t *OCRContractTracker) LatestBlockHeight(ctx context.Context) (blockheight // care about the block height; we have no way of getting the L1 block // height anyway return 0, nil - case "", config.ChainArbitrum, config.ChainCelo, config.ChainOptimismBedrock, config.ChainXDai, config.ChainKroma, config.ChainWeMix, config.ChainZkSync, config.ChainScroll: + case "", config.ChainArbitrum, config.ChainCelo, config.ChainGnosis, config.ChainKroma, config.ChainOptimismBedrock, config.ChainScroll, config.ChainWeMix, config.ChainXDai, config.ChainZkSync: // continue } latestBlockHeight := t.getLatestBlockHeight() diff --git a/core/services/ocr/delegate.go b/core/services/ocr/delegate.go index 6d7757ea528..bcdda397e20 100644 --- a/core/services/ocr/delegate.go +++ b/core/services/ocr/delegate.go @@ -21,12 +21,12 @@ 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/evm/types" "github.com/smartcontractkit/chainlink/v2/core/chains/legacyevm" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/offchain_aggregator_wrapper" "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/keystore/keys/ethkey" "github.com/smartcontractkit/chainlink/v2/core/services/ocrcommon" "github.com/smartcontractkit/chainlink/v2/core/services/pg" "github.com/smartcontractkit/chainlink/v2/core/services/pipeline" @@ -82,10 +82,10 @@ func (d *Delegate) JobType() job.Type { return job.OffchainReporting } -func (d *Delegate) BeforeJobCreated(spec job.Job) {} -func (d *Delegate) AfterJobCreated(spec job.Job) {} -func (d *Delegate) BeforeJobDeleted(spec job.Job) {} -func (d *Delegate) OnDeleteJob(spec job.Job, q pg.Queryer) error { return nil } +func (d *Delegate) BeforeJobCreated(spec job.Job) {} +func (d *Delegate) AfterJobCreated(spec job.Job) {} +func (d *Delegate) BeforeJobDeleted(spec job.Job) {} +func (d *Delegate) OnDeleteJob(ctx context.Context, spec job.Job, q pg.Queryer) error { return nil } // ServicesForSpec returns the OCR services that need to run for this job func (d *Delegate) ServicesForSpec(ctx context.Context, jb job.Job) (services []job.ServiceCtx, err error) { @@ -323,7 +323,7 @@ func (d *Delegate) ServicesForSpec(ctx context.Context, jb job.Job) (services [] return services, nil } -func (d *Delegate) maybeCreateConfigOverrider(logger logger.Logger, chain legacyevm.Chain, contractAddress ethkey.EIP55Address) (*ConfigOverriderImpl, error) { +func (d *Delegate) maybeCreateConfigOverrider(logger logger.Logger, chain legacyevm.Chain, contractAddress types.EIP55Address) (*ConfigOverriderImpl, error) { flagsContractAddress := chain.Config().EVM().FlagsContractAddress() if flagsContractAddress != "" { flags, err := NewFlags(flagsContractAddress, chain.Client()) diff --git a/core/services/ocr/validate.go b/core/services/ocr/validate.go index 0524ed24d0b..a0f2353eac1 100644 --- a/core/services/ocr/validate.go +++ b/core/services/ocr/validate.go @@ -12,9 +12,9 @@ import ( "github.com/smartcontractkit/chainlink/v2/common/config" 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" "github.com/smartcontractkit/chainlink/v2/core/services/job" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ethkey" "github.com/smartcontractkit/chainlink/v2/core/services/ocrcommon" ) @@ -29,7 +29,7 @@ type OCRValidationConfig interface { ContractSubscribeInterval() time.Duration KeyBundleID() (string, error) ObservationTimeout() time.Duration - TransmitterAddress() (ethkey.EIP55Address, error) + TransmitterAddress() (types.EIP55Address, error) } type insecureConfig interface { diff --git a/core/services/ocr2/database_test.go b/core/services/ocr2/database_test.go index b70ac629da1..486bf1fd708 100644 --- a/core/services/ocr2/database_test.go +++ b/core/services/ocr2/database_test.go @@ -5,6 +5,7 @@ import ( "testing" "time" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" medianconfig "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/median/config" "github.com/stretchr/testify/assert" @@ -19,14 +20,13 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/job" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ethkey" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/testhelpers" ) const defaultPluginID = 0 -func MustInsertOCROracleSpec(t *testing.T, db *sqlx.DB, transmitterAddress ethkey.EIP55Address) job.OCR2OracleSpec { +func MustInsertOCROracleSpec(t *testing.T, db *sqlx.DB, transmitterAddress types.EIP55Address) job.OCR2OracleSpec { t.Helper() spec := job.OCR2OracleSpec{} diff --git a/core/services/ocr2/delegate.go b/core/services/ocr2/delegate.go index ecb652c2d1e..38297d96bc7 100644 --- a/core/services/ocr2/delegate.go +++ b/core/services/ocr2/delegate.go @@ -273,7 +273,7 @@ func (d *Delegate) BeforeJobCreated(spec job.Job) { } func (d *Delegate) AfterJobCreated(spec job.Job) {} func (d *Delegate) BeforeJobDeleted(spec job.Job) {} -func (d *Delegate) OnDeleteJob(jb job.Job, q pg.Queryer) error { +func (d *Delegate) OnDeleteJob(ctx context.Context, jb job.Job, q pg.Queryer) error { // If the job spec is malformed in any way, we report the error but return nil so that // the job deletion itself isn't blocked. @@ -290,13 +290,13 @@ func (d *Delegate) OnDeleteJob(jb job.Job, q pg.Queryer) error { } // we only have clean to do for the EVM if rid.Network == relay.EVM { - return d.cleanupEVM(jb, q, rid) + return d.cleanupEVM(ctx, jb, q, rid) } return nil } // cleanupEVM is a helper for clean up EVM specific state when a job is deleted -func (d *Delegate) cleanupEVM(jb job.Job, q pg.Queryer, relayID relay.ID) error { +func (d *Delegate) cleanupEVM(ctx context.Context, jb job.Job, q pg.Queryer, relayID relay.ID) 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 @@ -341,10 +341,9 @@ func (d *Delegate) cleanupEVM(jb job.Job, q pg.Queryer, relayID relay.ID) error } filters = append(filters, relayFilters...) - for _, filter := range filters { d.lggr.Debugf("Unregistering %s filter", filter) - err = lp.UnregisterFilter(filter, pg.WithQueryer(q)) + err = lp.UnregisterFilter(ctx, filter) if err != nil { return errors.Wrapf(err, "Failed to unregister filter %s", filter) } @@ -375,6 +374,8 @@ func (d *Delegate) ServicesForSpec(ctx context.Context, jb job.Job) ([]job.Servi } lggr := logger.Sugared(d.lggr.Named(jb.ExternalJobID.String()).With(lggrCtx.Args()...)) + kvStore := job.NewKVStore(jb.ID, d.db, d.cfg.Database(), lggr) + rid, err := spec.RelayID() if err != nil { return nil, ErrJobSpecNoRelayer{Err: err, PluginName: string(spec.PluginType)} @@ -448,13 +449,13 @@ func (d *Delegate) ServicesForSpec(ctx context.Context, jb job.Job) ([]job.Servi return d.newServicesLLO(ctx, lggr, jb, bootstrapPeers, kb, ocrDB, lc, ocrLogger) case types.Median: - return d.newServicesMedian(ctx, lggr, jb, bootstrapPeers, kb, ocrDB, lc, ocrLogger) + return d.newServicesMedian(ctx, lggr, jb, bootstrapPeers, kb, kvStore, ocrDB, lc, ocrLogger) case types.DKG: return d.newServicesDKG(lggr, jb, bootstrapPeers, kb, ocrDB, lc, ocrLogger) case types.OCR2VRF: - return d.newServicesOCR2VRF(lggr, jb, bootstrapPeers, kb, ocrDB, lc) + return d.newServicesOCR2VRF(ctx, lggr, jb, bootstrapPeers, kb, ocrDB, lc) case types.OCR2Keeper: return d.newServicesOCR2Keepers(ctx, lggr, jb, bootstrapPeers, kb, ocrDB, lc, ocrLogger) @@ -927,6 +928,7 @@ func (d *Delegate) newServicesMedian( jb job.Job, bootstrapPeers []commontypes.BootstrapperLocator, kb ocr2key.KeyBundle, + kvStore job.KVStore, ocrDB *db, lc ocrtypes.LocalConfig, ocrLogger commontypes.Logger, @@ -962,7 +964,7 @@ func (d *Delegate) newServicesMedian( return nil, ErrRelayNotEnabled{Err: err, PluginName: "median", Relay: spec.Relay} } - medianServices, err2 := median.NewMedianServices(ctx, jb, d.isNewlyCreatedJob, relayer, d.pipelineRunner, lggr, oracleArgsNoPlugin, mConfig, enhancedTelemChan, errorLog) + medianServices, err2 := median.NewMedianServices(ctx, jb, d.isNewlyCreatedJob, relayer, kvStore, d.pipelineRunner, lggr, oracleArgsNoPlugin, mConfig, enhancedTelemChan, errorLog) if ocrcommon.ShouldCollectEnhancedTelemetry(&jb) { enhancedTelemService := ocrcommon.NewEnhancedTelemetryService(&jb, enhancedTelemChan, make(chan struct{}), d.monitoringEndpointGen.GenMonitoringEndpoint(rid.Network, rid.ChainID, spec.ContractID, synchronization.EnhancedEA), lggr.Named("EnhancedTelemetry")) @@ -1044,6 +1046,7 @@ func (d *Delegate) newServicesDKG( } func (d *Delegate) newServicesOCR2VRF( + ctx context.Context, lggr logger.SugaredLogger, jb job.Job, bootstrapPeers []commontypes.BootstrapperLocator, @@ -1146,6 +1149,7 @@ func (d *Delegate) newServicesOCR2VRF( } coordinator, err2 := ocr2coordinator.New( + ctx, lggr.Named("OCR2VRFCoordinator"), common.HexToAddress(spec.ContractID), common.HexToAddress(cfg.VRFCoordinatorAddress), @@ -1246,9 +1250,9 @@ func (d *Delegate) newServicesOCR2Keepers( // Future contracts of v2.1 (v2.x) will use the same job spec as v2.1 return d.newServicesOCR2Keepers21(ctx, lggr, jb, bootstrapPeers, kb, ocrDB, lc, ocrLogger, cfg, spec) case "v2.0": - return d.newServicesOCR2Keepers20(lggr, jb, bootstrapPeers, kb, ocrDB, lc, ocrLogger, cfg, spec) + return d.newServicesOCR2Keepers20(ctx, lggr, jb, bootstrapPeers, kb, ocrDB, lc, ocrLogger, cfg, spec) default: - return d.newServicesOCR2Keepers20(lggr, jb, bootstrapPeers, kb, ocrDB, lc, ocrLogger, cfg, spec) + return d.newServicesOCR2Keepers20(ctx, lggr, jb, bootstrapPeers, kb, ocrDB, lc, ocrLogger, cfg, spec) } } @@ -1340,6 +1344,7 @@ func (d *Delegate) newServicesOCR2Keepers21( V2Bootstrappers: bootstrapPeers, ContractTransmitter: evmrelay.NewKeepersOCR3ContractTransmitter(keeperProvider.ContractTransmitter()), ContractConfigTracker: keeperProvider.ContractConfigTracker(), + MetricsRegisterer: prometheus.WrapRegistererWith(map[string]string{"job_name": jb.Name.ValueOrZero()}, prometheus.DefaultRegisterer), KeepersDatabase: ocrDB, Logger: ocrLogger, MonitoringEndpoint: d.monitoringEndpointGen.GenMonitoringEndpoint(rid.Network, rid.ChainID, spec.ContractID, synchronization.OCR3Automation), @@ -1400,6 +1405,7 @@ func (d *Delegate) newServicesOCR2Keepers21( } func (d *Delegate) newServicesOCR2Keepers20( + ctx context.Context, lggr logger.SugaredLogger, jb job.Job, bootstrapPeers []commontypes.BootstrapperLocator, @@ -1423,7 +1429,7 @@ func (d *Delegate) newServicesOCR2Keepers20( return nil, fmt.Errorf("keepers2.0 services: failed to get chain (%s): %w", rid.ChainID, err2) } - keeperProvider, rgstry, encoder, logProvider, err2 := ocr2keeper.EVMDependencies20(jb, d.db, lggr, chain, d.ethKs, d.cfg.Database()) + keeperProvider, rgstry, encoder, logProvider, err2 := ocr2keeper.EVMDependencies20(ctx, jb, d.db, lggr, chain, d.ethKs, d.cfg.Database()) if err2 != nil { return nil, errors.Wrap(err2, "could not build dependencies for ocr2 keepers") } @@ -1488,6 +1494,7 @@ func (d *Delegate) newServicesOCR2Keepers20( V2Bootstrappers: bootstrapPeers, ContractTransmitter: keeperProvider.ContractTransmitter(), ContractConfigTracker: keeperProvider.ContractConfigTracker(), + MetricsRegisterer: prometheus.WrapRegistererWith(map[string]string{"job_name": jb.Name.ValueOrZero()}, prometheus.DefaultRegisterer), KeepersDatabase: ocrDB, LocalConfig: lc, Logger: ocrLogger, diff --git a/core/services/ocr2/plugins/functions/config/config.go b/core/services/ocr2/plugins/functions/config/config.go index e0e1ba3bfa0..2e18d6727f6 100644 --- a/core/services/ocr2/plugins/functions/config/config.go +++ b/core/services/ocr2/plugins/functions/config/config.go @@ -21,34 +21,36 @@ import ( // This config is part of the job spec and is loaded only once on node boot/job creation. type PluginConfig struct { - EnableRequestSignatureCheck bool `json:"enableRequestSignatureCheck"` - DONID string `json:"donID"` - ContractVersion uint32 `json:"contractVersion"` - MinRequestConfirmations uint32 `json:"minRequestConfirmations"` - MinResponseConfirmations uint32 `json:"minResponseConfirmations"` - MinIncomingConfirmations uint32 `json:"minIncomingConfirmations"` - PastBlocksToPoll uint32 `json:"pastBlocksToPoll"` - LogPollerCacheDurationSec uint32 `json:"logPollerCacheDurationSec"` // Duration to cache previously detected request or response logs such that they can be filtered when calling logpoller_wrapper.LatestEvents() - RequestTimeoutSec uint32 `json:"requestTimeoutSec"` - RequestTimeoutCheckFrequencySec uint32 `json:"requestTimeoutCheckFrequencySec"` - RequestTimeoutBatchLookupSize uint32 `json:"requestTimeoutBatchLookupSize"` - PruneMaxStoredRequests uint32 `json:"pruneMaxStoredRequests"` - PruneCheckFrequencySec uint32 `json:"pruneCheckFrequencySec"` - PruneBatchSize uint32 `json:"pruneBatchSize"` - ListenerEventHandlerTimeoutSec uint32 `json:"listenerEventHandlerTimeoutSec"` - ListenerEventsCheckFrequencyMillis uint32 `json:"listenerEventsCheckFrequencyMillis"` - ContractUpdateCheckFrequencySec uint32 `json:"contractUpdateCheckFrequencySec"` - MaxRequestSizeBytes uint32 `json:"maxRequestSizeBytes"` - MaxRequestSizesList []uint32 `json:"maxRequestSizesList"` - MaxSecretsSizesList []uint32 `json:"maxSecretsSizesList"` - MinimumSubscriptionBalance assets.Link `json:"minimumSubscriptionBalance"` - AllowedHeartbeatInitiators []string `json:"allowedHeartbeatInitiators"` - GatewayConnectorConfig *connector.ConnectorConfig `json:"gatewayConnectorConfig"` - OnchainAllowlist *allowlist.OnchainAllowlistConfig `json:"onchainAllowlist"` - OnchainSubscriptions *subscriptions.OnchainSubscriptionsConfig `json:"onchainSubscriptions"` - RateLimiter *common.RateLimiterConfig `json:"rateLimiter"` - S4Constraints *s4.Constraints `json:"s4Constraints"` - DecryptionQueueConfig *DecryptionQueueConfig `json:"decryptionQueueConfig"` + EnableRequestSignatureCheck bool `json:"enableRequestSignatureCheck"` + DONID string `json:"donID"` + ContractVersion uint32 `json:"contractVersion"` + MinRequestConfirmations uint32 `json:"minRequestConfirmations"` + MinResponseConfirmations uint32 `json:"minResponseConfirmations"` + MinIncomingConfirmations uint32 `json:"minIncomingConfirmations"` + PastBlocksToPoll uint32 `json:"pastBlocksToPoll"` + LogPollerCacheDurationSec uint32 `json:"logPollerCacheDurationSec"` // Duration to cache previously detected request or response logs such that they can be filtered when calling logpoller_wrapper.LatestEvents() + RequestTimeoutSec uint32 `json:"requestTimeoutSec"` + RequestTimeoutCheckFrequencySec uint32 `json:"requestTimeoutCheckFrequencySec"` + RequestTimeoutBatchLookupSize uint32 `json:"requestTimeoutBatchLookupSize"` + PruneMaxStoredRequests uint32 `json:"pruneMaxStoredRequests"` + PruneCheckFrequencySec uint32 `json:"pruneCheckFrequencySec"` + PruneBatchSize uint32 `json:"pruneBatchSize"` + ListenerEventHandlerTimeoutSec uint32 `json:"listenerEventHandlerTimeoutSec"` + ListenerEventsCheckFrequencyMillis uint32 `json:"listenerEventsCheckFrequencyMillis"` + ContractUpdateCheckFrequencySec uint32 `json:"contractUpdateCheckFrequencySec"` + MaxRequestSizeBytes uint32 `json:"maxRequestSizeBytes"` + MaxRequestSizesList []uint32 `json:"maxRequestSizesList"` + MaxSecretsSizesList []uint32 `json:"maxSecretsSizesList"` + MinimumSubscriptionBalance assets.Link `json:"minimumSubscriptionBalance"` + AllowedHeartbeatInitiators []string `json:"allowedHeartbeatInitiators"` + GatewayConnectorConfig *connector.ConnectorConfig `json:"gatewayConnectorConfig"` + OnchainAllowlist *allowlist.OnchainAllowlistConfig `json:"onchainAllowlist"` + OnchainSubscriptions *subscriptions.OnchainSubscriptionsConfig `json:"onchainSubscriptions"` + RateLimiter *common.RateLimiterConfig `json:"rateLimiter"` + S4Constraints *s4.Constraints `json:"s4Constraints"` + DecryptionQueueConfig *DecryptionQueueConfig `json:"decryptionQueueConfig"` + ExternalAdapterMaxRetries *uint32 `json:"externalAdapterMaxRetries"` + ExternalAdapterExponentialBackoffBaseSec *uint32 `json:"externalAdapterExponentialBackoffBaseSec"` } type DecryptionQueueConfig struct { diff --git a/core/services/ocr2/plugins/functions/integration_tests/v1/internal/testutils.go b/core/services/ocr2/plugins/functions/integration_tests/v1/internal/testutils.go index 7f562c9adb3..1216eec0a63 100644 --- a/core/services/ocr2/plugins/functions/integration_tests/v1/internal/testutils.go +++ b/core/services/ocr2/plugins/functions/integration_tests/v1/internal/testutils.go @@ -337,7 +337,7 @@ func StartNewNode( c.EVM[0].LogPollInterval = commonconfig.MustNewDuration(1 * time.Second) c.EVM[0].Transactions.ForwardersEnabled = ptr(false) - c.EVM[0].GasEstimator.LimitDefault = ptr(maxGas) + c.EVM[0].GasEstimator.LimitDefault = ptr(uint64(maxGas)) c.EVM[0].GasEstimator.Mode = ptr("FixedPrice") c.EVM[0].GasEstimator.PriceDefault = assets.NewWei(big.NewInt(int64(DefaultGasPrice))) diff --git a/core/services/ocr2/plugins/functions/plugin.go b/core/services/ocr2/plugins/functions/plugin.go index 27835127d0d..92b15892885 100644 --- a/core/services/ocr2/plugins/functions/plugin.go +++ b/core/services/ocr2/plugins/functions/plugin.go @@ -57,12 +57,14 @@ const ( FunctionsS4Namespace string = "functions" MaxAdapterResponseBytes int64 = 1_000_000 DefaultOffchainTransmitterChannelSize uint32 = 1000 + DefaultMaxAdapterRetry int = 3 + DefaultExponentialBackoffBase = 5 * time.Second ) // Create all OCR2 plugin Oracles and all extra services needed to run a Functions job. func NewFunctionsServices(ctx context.Context, functionsOracleArgs, thresholdOracleArgs, s4OracleArgs *libocr2.OCR2OracleArgs, conf *FunctionsServicesConfig) ([]job.ServiceCtx, error) { pluginORM := functions.NewORM(conf.DB, conf.Logger, conf.QConfig, common.HexToAddress(conf.ContractID)) - s4ORM := s4.NewPostgresORM(conf.DB, conf.Logger, conf.QConfig, s4.SharedTableName, FunctionsS4Namespace) + s4ORM := s4.NewCachedORMWrapper(s4.NewPostgresORM(conf.DB, conf.Logger, conf.QConfig, s4.SharedTableName, FunctionsS4Namespace), conf.Logger) var pluginConfig config.PluginConfig if err := json.Unmarshal(conf.Job.OCR2OracleSpec.PluginConfig.Bytes(), &pluginConfig); err != nil { @@ -106,7 +108,24 @@ func NewFunctionsServices(ctx context.Context, functionsOracleArgs, thresholdOra offchainTransmitter := functions.NewOffchainTransmitter(DefaultOffchainTransmitterChannelSize) listenerLogger := conf.Logger.Named("FunctionsListener") - bridgeAccessor := functions.NewBridgeAccessor(conf.BridgeORM, FunctionsBridgeName, MaxAdapterResponseBytes) + + var maxRetries int + if pluginConfig.ExternalAdapterMaxRetries != nil { + maxRetries = int(*pluginConfig.ExternalAdapterMaxRetries) + } else { + maxRetries = DefaultMaxAdapterRetry + } + conf.Logger.Debugf("external adapter maxRetries configured to: %d", maxRetries) + + var exponentialBackoffBase time.Duration + if pluginConfig.ExternalAdapterExponentialBackoffBaseSec != nil { + exponentialBackoffBase = time.Duration(*pluginConfig.ExternalAdapterExponentialBackoffBaseSec) * time.Second + } else { + exponentialBackoffBase = DefaultExponentialBackoffBase + } + conf.Logger.Debugf("external adapter exponentialBackoffBase configured to: %g sec", exponentialBackoffBase.Seconds()) + + bridgeAccessor := functions.NewBridgeAccessor(conf.BridgeORM, FunctionsBridgeName, MaxAdapterResponseBytes, maxRetries, exponentialBackoffBase) functionsListener := functions.NewFunctionsListener( conf.Job, conf.Chain.Client(), diff --git a/core/services/ocr2/plugins/llo/onchain_channel_definition_cache_integration_test.go b/core/services/ocr2/plugins/llo/onchain_channel_definition_cache_integration_test.go index 418c5a90eb4..ea8f64c02fa 100644 --- a/core/services/ocr2/plugins/llo/onchain_channel_definition_cache_integration_test.go +++ b/core/services/ocr2/plugins/llo/onchain_channel_definition_cache_integration_test.go @@ -1,6 +1,7 @@ package llo_test import ( + "context" "math/rand" "testing" "time" @@ -26,7 +27,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/llo" - "github.com/smartcontractkit/chainlink/v2/core/services/pg" ) func Test_ChannelDefinitionCache_Integration(t *testing.T) { @@ -85,7 +85,7 @@ func Test_ChannelDefinitionCache_Integration(t *testing.T) { KeepFinalizedBlocksDepth: 1000, } lp := logpoller.NewLogPoller( - logpoller.NewORM(testutils.SimulatedChainID, db, lggr, pgtest.NewQConfig(true)), ethClient, lggr, lpOpts) + logpoller.NewORM(testutils.SimulatedChainID, db, lggr), ethClient, lggr, lpOpts) servicetest.Run(t, lp) cdc := llo.NewChannelDefinitionCache(lggr, orm, lp, configStoreAddress, 0) @@ -157,11 +157,11 @@ func Test_ChannelDefinitionCache_Integration(t *testing.T) { KeepFinalizedBlocksDepth: 1000, } lp := &mockLogPoller{ - LogPoller: logpoller.NewLogPoller(logpoller.NewORM(testutils.SimulatedChainID, db, lggr, pgtest.NewQConfig(true)), ethClient, lggr, lpOpts), - LatestBlockFn: func(qopts ...pg.QOpt) (int64, error) { + LogPoller: logpoller.NewLogPoller(logpoller.NewORM(testutils.SimulatedChainID, db, lggr), ethClient, lggr, lpOpts), + LatestBlockFn: func(ctx context.Context) (int64, error) { return 0, nil }, - LogsWithSigsFn: func(start, end int64, eventSigs []common.Hash, address common.Address, qopts ...pg.QOpt) ([]logpoller.Log, error) { + LogsWithSigsFn: func(ctx context.Context, start, end int64, eventSigs []common.Hash, address common.Address) ([]logpoller.Log, error) { return []logpoller.Log{}, nil }, } @@ -198,7 +198,7 @@ func Test_ChannelDefinitionCache_Integration(t *testing.T) { RpcBatchSize: 2, KeepFinalizedBlocksDepth: 1000, } - lp := logpoller.NewLogPoller(logpoller.NewORM(testutils.SimulatedChainID, db, lggr, pgtest.NewQConfig(true)), ethClient, lggr, lpOpts) + lp := logpoller.NewLogPoller(logpoller.NewORM(testutils.SimulatedChainID, db, lggr), ethClient, lggr, lpOpts) servicetest.Run(t, lp) cdc := llo.NewChannelDefinitionCache(lggr, orm, lp, configStoreAddress, channel2Block.Number().Int64()+1) @@ -222,14 +222,14 @@ func Test_ChannelDefinitionCache_Integration(t *testing.T) { type mockLogPoller struct { logpoller.LogPoller - LatestBlockFn func(qopts ...pg.QOpt) (int64, error) - LogsWithSigsFn func(start, end int64, eventSigs []common.Hash, address common.Address, qopts ...pg.QOpt) ([]logpoller.Log, error) + LatestBlockFn func(ctx context.Context) (int64, error) + LogsWithSigsFn func(ctx context.Context, start, end int64, eventSigs []common.Hash, address common.Address) ([]logpoller.Log, error) } -func (p *mockLogPoller) LogsWithSigs(start, end int64, eventSigs []common.Hash, address common.Address, qopts ...pg.QOpt) ([]logpoller.Log, error) { - return p.LogsWithSigsFn(start, end, eventSigs, address, qopts...) +func (p *mockLogPoller) LogsWithSigs(ctx context.Context, start, end int64, eventSigs []common.Hash, address common.Address) ([]logpoller.Log, error) { + return p.LogsWithSigsFn(ctx, start, end, eventSigs, address) } -func (p *mockLogPoller) LatestBlock(qopts ...pg.QOpt) (logpoller.LogPollerBlock, error) { - block, err := p.LatestBlockFn(qopts...) +func (p *mockLogPoller) LatestBlock(ctx context.Context) (logpoller.LogPollerBlock, error) { + block, err := p.LatestBlockFn(ctx) return logpoller.LogPollerBlock{BlockNumber: block}, err } diff --git a/core/services/ocr2/plugins/median/services.go b/core/services/ocr2/plugins/median/services.go index 74690565e94..a432045c867 100644 --- a/core/services/ocr2/plugins/median/services.go +++ b/core/services/ocr2/plugins/median/services.go @@ -56,6 +56,7 @@ func NewMedianServices(ctx context.Context, jb job.Job, isNewlyCreatedJob bool, relayer loop.Relayer, + kvStore job.KVStore, pipelineRunner pipeline.Runner, lggr logger.Logger, argsNoPlugin libocr.OCR2OracleArgs, @@ -128,7 +129,7 @@ func NewMedianServices(ctx context.Context, if !pluginConfig.JuelsPerFeeCoinCacheDisabled { lggr.Infof("juelsPerFeeCoin data source caching is enabled") - if juelsPerFeeCoinSource, err = ocrcommon.NewInMemoryDataSourceCache(juelsPerFeeCoinSource, pluginConfig.JuelsPerFeeCoinCacheDuration.Duration()); err != nil { + if juelsPerFeeCoinSource, err = ocrcommon.NewInMemoryDataSourceCache(juelsPerFeeCoinSource, kvStore, pluginConfig.JuelsPerFeeCoinCacheDuration.Duration()); err != nil { return nil, err } } diff --git a/core/services/ocr2/plugins/mercury/config/config.go b/core/services/ocr2/plugins/mercury/config/config.go index fc5d0a6a20d..5763b883ac0 100644 --- a/core/services/ocr2/plugins/mercury/config/config.go +++ b/core/services/ocr2/plugins/mercury/config/config.go @@ -8,6 +8,7 @@ import ( "fmt" "net/url" "regexp" + "sort" pkgerrors "github.com/pkg/errors" @@ -17,8 +18,18 @@ import ( ) type PluginConfig struct { + // Must either specify details for single server OR multiple servers. + // Specifying both is not valid. + + // Single mercury server + // LEGACY: This is the old way of specifying a mercury server RawServerURL string `json:"serverURL" toml:"serverURL"` ServerPubKey utils.PlainHexBytes `json:"serverPubKey" toml:"serverPubKey"` + + // Multi mercury servers + // This is the preferred way to specify mercury server(s) + Servers map[string]utils.PlainHexBytes `json:"servers" toml:"servers"` + // InitialBlockNumber allows to set a custom "validFromBlockNumber" for // the first ever report in the case of a brand new feed, where the mercury // server does not have any previous reports. For a brand new feed, this @@ -29,26 +40,64 @@ type PluginConfig struct { NativeFeedID *mercuryutils.FeedID `json:"nativeFeedID" toml:"nativeFeedID"` } -func ValidatePluginConfig(config PluginConfig, feedID mercuryutils.FeedID) (merr error) { - if config.RawServerURL == "" { - merr = errors.New("mercury: ServerURL must be specified") +func validateURL(rawServerURL string) error { + var normalizedURI string + if schemeRegexp.MatchString(rawServerURL) { + normalizedURI = rawServerURL } else { - var normalizedURI string - if schemeRegexp.MatchString(config.RawServerURL) { - normalizedURI = config.RawServerURL + normalizedURI = fmt.Sprintf("wss://%s", rawServerURL) + } + uri, err := url.ParseRequestURI(normalizedURI) + if err != nil { + return pkgerrors.Errorf(`Mercury: invalid value for ServerURL, got: %q`, rawServerURL) + } + if uri.Scheme != "wss" { + return pkgerrors.Errorf(`Mercury: invalid scheme specified for MercuryServer, got: %q (scheme: %q) but expected a websocket url e.g. "192.0.2.2:4242" or "wss://192.0.2.2:4242"`, rawServerURL, uri.Scheme) + } + return nil +} + +type Server struct { + URL string + PubKey utils.PlainHexBytes +} + +func (p PluginConfig) GetServers() (servers []Server) { + if p.RawServerURL != "" { + return []Server{{URL: wssRegexp.ReplaceAllString(p.RawServerURL, ""), PubKey: p.ServerPubKey}} + } + for url, pubKey := range p.Servers { + servers = append(servers, Server{URL: wssRegexp.ReplaceAllString(url, ""), PubKey: pubKey}) + } + sort.Slice(servers, func(i, j int) bool { + return servers[i].URL < servers[j].URL + }) + return +} + +func ValidatePluginConfig(config PluginConfig, feedID mercuryutils.FeedID) (merr error) { + if len(config.Servers) > 0 { + if config.RawServerURL != "" || len(config.ServerPubKey) != 0 { + merr = errors.Join(merr, errors.New("Mercury: Servers and RawServerURL/ServerPubKey may not be specified together")) } else { - normalizedURI = fmt.Sprintf("wss://%s", config.RawServerURL) + for serverName, serverPubKey := range config.Servers { + if err := validateURL(serverName); err != nil { + merr = errors.Join(merr, pkgerrors.Wrap(err, "Mercury: invalid value for ServerURL")) + } + if len(serverPubKey) != 32 { + merr = errors.Join(merr, errors.New("Mercury: ServerPubKey must be a 32-byte hex string")) + } + } } - uri, err := url.ParseRequestURI(normalizedURI) - if err != nil { - merr = pkgerrors.Wrap(err, "Mercury: invalid value for ServerURL") - } else if uri.Scheme != "wss" { - merr = pkgerrors.Errorf(`Mercury: invalid scheme specified for MercuryServer, got: %q (scheme: %q) but expected a websocket url e.g. "192.0.2.2:4242" or "wss://192.0.2.2:4242"`, config.RawServerURL, uri.Scheme) + } else if config.RawServerURL == "" { + merr = errors.Join(merr, errors.New("Mercury: Servers must be specified")) + } else { + if err := validateURL(config.RawServerURL); err != nil { + merr = errors.Join(merr, pkgerrors.Wrap(err, "Mercury: invalid value for ServerURL")) + } + if len(config.ServerPubKey) != 32 { + merr = errors.Join(merr, errors.New("Mercury: If RawServerURL is specified, ServerPubKey is also required and must be a 32-byte hex string")) } - } - - if len(config.ServerPubKey) != 32 { - merr = errors.Join(merr, errors.New("mercury: ServerPubKey is required and must be a 32-byte hex string")) } switch feedID.Version() { @@ -78,7 +127,3 @@ func ValidatePluginConfig(config PluginConfig, feedID mercuryutils.FeedID) (merr var schemeRegexp = regexp.MustCompile(`^[a-zA-Z][a-zA-Z0-9+.-]*://`) var wssRegexp = regexp.MustCompile(`^wss://`) - -func (p PluginConfig) ServerURL() string { - return wssRegexp.ReplaceAllString(p.RawServerURL, "") -} diff --git a/core/services/ocr2/plugins/mercury/config/config_test.go b/core/services/ocr2/plugins/mercury/config/config_test.go index 60cc548f1fa..cc7c6a82e36 100644 --- a/core/services/ocr2/plugins/mercury/config/config_test.go +++ b/core/services/ocr2/plugins/mercury/config/config_test.go @@ -6,6 +6,8 @@ import ( "github.com/pelletier/go-toml/v2" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink/v2/core/utils" ) var v1FeedId = [32]uint8{00, 01, 107, 74, 167, 229, 124, 167, 182, 138, 225, 191, 69, 101, 63, 86, 182, 86, 253, 58, 163, 53, 239, 127, 174, 105, 107, 102, 63, 27, 132, 114} @@ -31,6 +33,46 @@ func Test_PluginConfig(t *testing.T) { err = ValidatePluginConfig(mc, v1FeedId) require.NoError(t, err) }) + t.Run("with multiple server URLs", func(t *testing.T) { + t.Run("if no ServerURL/ServerPubKey is specified", func(t *testing.T) { + rawToml := ` + Servers = { "example.com:80" = "724ff6eae9e900270edfff233e16322a70ec06e1a6e62a81ef13921f398f6c93", "example2.invalid:1234" = "524ff6eae9e900270edfff233e16322a70ec06e1a6e62a81ef13921f398f6c93" } + ` + + var mc PluginConfig + err := toml.Unmarshal([]byte(rawToml), &mc) + require.NoError(t, err) + + assert.Len(t, mc.Servers, 2) + assert.Equal(t, "724ff6eae9e900270edfff233e16322a70ec06e1a6e62a81ef13921f398f6c93", mc.Servers["example.com:80"].String()) + assert.Equal(t, "524ff6eae9e900270edfff233e16322a70ec06e1a6e62a81ef13921f398f6c93", mc.Servers["example2.invalid:1234"].String()) + + err = ValidatePluginConfig(mc, v1FeedId) + require.NoError(t, err) + }) + t.Run("if ServerURL or ServerPubKey is specified", func(t *testing.T) { + rawToml := ` + Servers = { "example.com:80" = "724ff6eae9e900270edfff233e16322a70ec06e1a6e62a81ef13921f398f6c93", "example2.invalid:1234" = "524ff6eae9e900270edfff233e16322a70ec06e1a6e62a81ef13921f398f6c93" } + ServerURL = "example.com:80" + ` + var mc PluginConfig + err := toml.Unmarshal([]byte(rawToml), &mc) + require.NoError(t, err) + + err = ValidatePluginConfig(mc, v1FeedId) + require.EqualError(t, err, "Mercury: Servers and RawServerURL/ServerPubKey may not be specified together") + + rawToml = ` + Servers = { "example.com:80" = "724ff6eae9e900270edfff233e16322a70ec06e1a6e62a81ef13921f398f6c93", "example2.invalid:1234" = "524ff6eae9e900270edfff233e16322a70ec06e1a6e62a81ef13921f398f6c93" } + ServerPubKey = "724ff6eae9e900270edfff233e16322a70ec06e1a6e62a81ef13921f398f6c93" + ` + err = toml.Unmarshal([]byte(rawToml), &mc) + require.NoError(t, err) + + err = ValidatePluginConfig(mc, v1FeedId) + require.EqualError(t, err, "Mercury: Servers and RawServerURL/ServerPubKey may not be specified together") + }) + }) t.Run("with invalid values", func(t *testing.T) { rawToml := ` @@ -53,7 +95,7 @@ func Test_PluginConfig(t *testing.T) { err = ValidatePluginConfig(mc, v1FeedId) require.Error(t, err) assert.Contains(t, err.Error(), `Mercury: invalid scheme specified for MercuryServer, got: "http://example.com" (scheme: "http") but expected a websocket url e.g. "192.0.2.2:4242" or "wss://192.0.2.2:4242"`) - assert.Contains(t, err.Error(), `mercury: ServerPubKey is required and must be a 32-byte hex string`) + assert.Contains(t, err.Error(), `If RawServerURL is specified, ServerPubKey is also required and must be a 32-byte hex string`) }) t.Run("with unnecessary values", func(t *testing.T) { @@ -135,13 +177,41 @@ func Test_PluginConfig(t *testing.T) { }) } -func Test_PluginConfig_ServerURL(t *testing.T) { - pc := PluginConfig{RawServerURL: "example.com"} - assert.Equal(t, "example.com", pc.ServerURL()) - pc = PluginConfig{RawServerURL: "wss://example.com"} - assert.Equal(t, "example.com", pc.ServerURL()) - pc = PluginConfig{RawServerURL: "example.com:1234/foo"} - assert.Equal(t, "example.com:1234/foo", pc.ServerURL()) - pc = PluginConfig{RawServerURL: "wss://example.com:1234/foo"} - assert.Equal(t, "example.com:1234/foo", pc.ServerURL()) +func Test_PluginConfig_GetServers(t *testing.T) { + t.Run("with single server", func(t *testing.T) { + pubKey := utils.PlainHexBytes([]byte{1, 2, 3}) + pc := PluginConfig{RawServerURL: "example.com", ServerPubKey: pubKey} + require.Len(t, pc.GetServers(), 1) + assert.Equal(t, "example.com", pc.GetServers()[0].URL) + assert.Equal(t, pubKey, pc.GetServers()[0].PubKey) + + pc = PluginConfig{RawServerURL: "wss://example.com", ServerPubKey: pubKey} + require.Len(t, pc.GetServers(), 1) + assert.Equal(t, "example.com", pc.GetServers()[0].URL) + assert.Equal(t, pubKey, pc.GetServers()[0].PubKey) + + pc = PluginConfig{RawServerURL: "example.com:1234/foo", ServerPubKey: pubKey} + require.Len(t, pc.GetServers(), 1) + assert.Equal(t, "example.com:1234/foo", pc.GetServers()[0].URL) + assert.Equal(t, pubKey, pc.GetServers()[0].PubKey) + + pc = PluginConfig{RawServerURL: "wss://example.com:1234/foo", ServerPubKey: pubKey} + require.Len(t, pc.GetServers(), 1) + assert.Equal(t, "example.com:1234/foo", pc.GetServers()[0].URL) + assert.Equal(t, pubKey, pc.GetServers()[0].PubKey) + }) + + t.Run("with multiple servers", func(t *testing.T) { + servers := map[string]utils.PlainHexBytes{ + "example.com:80": utils.PlainHexBytes([]byte{1, 2, 3}), + "mercuryserver.invalid:1234/foo": utils.PlainHexBytes([]byte{4, 5, 6}), + } + pc := PluginConfig{Servers: servers} + + require.Len(t, pc.GetServers(), 2) + assert.Equal(t, "example.com:80", pc.GetServers()[0].URL) + assert.Equal(t, utils.PlainHexBytes{1, 2, 3}, pc.GetServers()[0].PubKey) + assert.Equal(t, "mercuryserver.invalid:1234/foo", pc.GetServers()[1].URL) + assert.Equal(t, utils.PlainHexBytes{4, 5, 6}, pc.GetServers()[1].PubKey) + }) } diff --git a/core/services/ocr2/plugins/mercury/helpers_test.go b/core/services/ocr2/plugins/mercury/helpers_test.go index 473db53bc6f..1323f834398 100644 --- a/core/services/ocr2/plugins/mercury/helpers_test.go +++ b/core/services/ocr2/plugins/mercury/helpers_test.go @@ -8,6 +8,7 @@ import ( "fmt" "math/big" "net" + "strings" "testing" "time" @@ -167,6 +168,7 @@ func setupNode( // [JobPipeline] // MaxSuccessfulRuns = 0 c.JobPipeline.MaxSuccessfulRuns = ptr(uint64(0)) + c.JobPipeline.VerboseLogging = ptr(true) // [Feature] // UICSAKeys=true @@ -389,23 +391,28 @@ func addV3MercuryJob( bootstrapNodePort int, bmBridge, bidBridge, - askBridge, - serverURL string, - serverPubKey, + askBridge string, + servers map[string]string, clientPubKey ed25519.PublicKey, feedName string, feedID [32]byte, linkFeedID [32]byte, nativeFeedID [32]byte, ) { + srvs := make([]string, 0, len(servers)) + for u, k := range servers { + srvs = append(srvs, fmt.Sprintf("%q = %q", u, k)) + } + serversStr := fmt.Sprintf("{ %s }", strings.Join(srvs, ", ")) + node.AddJob(t, fmt.Sprintf(` type = "offchainreporting2" schemaVersion = 1 -name = "mercury-%[1]d-%[12]s" +name = "mercury-%[1]d-%[11]s" forwardingAllowed = false maxTaskDuration = "1s" contractID = "%[2]s" -feedID = "0x%[11]x" +feedID = "0x%[10]x" contractConfigTrackerPollInterval = "1s" ocrKeyBundleID = "%[3]s" p2pv2Bootstrappers = [ @@ -413,7 +420,7 @@ p2pv2Bootstrappers = [ ] relay = "evm" pluginType = "mercury" -transmitterID = "%[10]x" +transmitterID = "%[9]x" observationSource = """ // Benchmark Price price1 [type=bridge name="%[5]s" timeout="50ms" requestData="{\\"data\\":{\\"from\\":\\"ETH\\",\\"to\\":\\"USD\\"}}"]; @@ -438,10 +445,9 @@ observationSource = """ """ [pluginConfig] -serverURL = "%[8]s" -serverPubKey = "%[9]x" -linkFeedID = "0x%[13]x" -nativeFeedID = "0x%[14]x" +servers = %[8]s +linkFeedID = "0x%[12]x" +nativeFeedID = "0x%[13]x" [relayConfig] chainID = 1337 @@ -453,8 +459,7 @@ chainID = 1337 bmBridge, bidBridge, askBridge, - serverURL, - serverPubKey, + serversStr, clientPubKey, feedID, feedName, diff --git a/core/services/ocr2/plugins/mercury/integration_test.go b/core/services/ocr2/plugins/mercury/integration_test.go index a12052e0b74..e4ac5dd7c5c 100644 --- a/core/services/ocr2/plugins/mercury/integration_test.go +++ b/core/services/ocr2/plugins/mercury/integration_test.go @@ -788,16 +788,6 @@ func integration_MercuryV3(t *testing.T) { feedM[feeds[i].id] = feeds[i] } - reqs := make(chan request) - serverKey := csakey.MustNewV2XXXTestingOnly(big.NewInt(-1)) - serverPubKey := serverKey.PublicKey - srv := NewMercuryServer(t, ed25519.PrivateKey(serverKey.Raw()), reqs, func() []byte { - report, err := (&reportcodecv3.ReportCodec{}).BuildReport(v3.ReportFields{BenchmarkPrice: big.NewInt(234567), Bid: big.NewInt(1), Ask: big.NewInt(1), LinkFee: big.NewInt(1), NativeFee: big.NewInt(1)}) - if err != nil { - panic(err) - } - return report - }) clientCSAKeys := make([]csakey.KeyV2, n+1) clientPubKeys := make([]ed25519.PublicKey, n+1) for i := 0; i < n+1; i++ { @@ -806,7 +796,25 @@ func integration_MercuryV3(t *testing.T) { clientCSAKeys[i] = key clientPubKeys[i] = key.PublicKey } - serverURL := startMercuryServer(t, srv, clientPubKeys) + + // Test multi-send to three servers + const nSrvs = 3 + reqChs := make([]chan request, nSrvs) + servers := make(map[string]string) + for i := 0; i < nSrvs; i++ { + k := csakey.MustNewV2XXXTestingOnly(big.NewInt(int64(-(i + 1)))) + reqs := make(chan request, 100) + srv := NewMercuryServer(t, ed25519.PrivateKey(k.Raw()), reqs, func() []byte { + report, err := (&reportcodecv3.ReportCodec{}).BuildReport(v3.ReportFields{BenchmarkPrice: big.NewInt(234567), Bid: big.NewInt(1), Ask: big.NewInt(1), LinkFee: big.NewInt(1), NativeFee: big.NewInt(1)}) + if err != nil { + panic(err) + } + return report + }) + serverURL := startMercuryServer(t, srv, clientPubKeys) + reqChs[i] = reqs + servers[serverURL] = fmt.Sprintf("%x", k.PublicKey) + } chainID := testutils.SimulatedChainID steve, backend, verifier, verifierAddress := setupBlockchain(t) @@ -895,8 +903,7 @@ func integration_MercuryV3(t *testing.T) { bmBridge, bidBridge, askBridge, - serverURL, - serverPubKey, + servers, clientPubKeys[i], feed.name, feed.id, @@ -963,8 +970,8 @@ func integration_MercuryV3(t *testing.T) { backend.Commit() } - runTestSetup := func() { - // Expect at least one report per feed from each oracle + runTestSetup := func(reqs chan request) { + // Expect at least one report per feed from each oracle, per server seen := make(map[[32]byte]map[credentials.StaticSizedPublicKey]struct{}) for i := range feeds { // feedID will be deleted when all n oracles have reported @@ -1017,12 +1024,10 @@ func integration_MercuryV3(t *testing.T) { } } - t.Run("receives at least one report per feed from each oracle when EAs are at 100% reliability", func(t *testing.T) { - runTestSetup() - }) - - t.Run("receives at least one report per feed from each oracle when EAs are at 80% reliability", func(t *testing.T) { - pError.Store(20) - runTestSetup() + t.Run("receives at least one report per feed for every server from each oracle when EAs are at 100% reliability", func(t *testing.T) { + for i := 0; i < nSrvs; i++ { + reqs := reqChs[i] + runTestSetup(reqs) + } }) } diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v20/log_provider.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v20/log_provider.go index 45884d2f726..50c1e5b7c1a 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v20/log_provider.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v20/log_provider.go @@ -21,7 +21,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/chains/evm/logpoller" registry "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/keeper_registry_wrapper2_0" "github.com/smartcontractkit/chainlink/v2/core/logger" - "github.com/smartcontractkit/chainlink/v2/core/services/pg" ) type TransmitUnpacker interface { @@ -49,6 +48,7 @@ func LogProviderFilterName(addr common.Address) string { } func NewLogProvider( + ctx context.Context, logger logger.Logger, logPoller logpoller.LogPoller, registryAddress common.Address, @@ -69,7 +69,7 @@ func NewLogProvider( // Add log filters for the log poller so that it can poll and find the logs that // we need. - err = logPoller.RegisterFilter(logpoller.Filter{ + err = logPoller.RegisterFilter(ctx, logpoller.Filter{ Name: LogProviderFilterName(contract.Address()), EventSigs: []common.Hash{ registry.KeeperRegistryUpkeepPerformed{}.Topic(), @@ -144,7 +144,7 @@ func (c *LogProvider) HealthReport() map[string]error { } func (c *LogProvider) PerformLogs(ctx context.Context) ([]ocr2keepers.PerformLog, error) { - end, err := c.logPoller.LatestBlock(pg.WithParentCtx(ctx)) + end, err := c.logPoller.LatestBlock(ctx) if err != nil { return nil, fmt.Errorf("%w: failed to get latest block from log poller", err) } @@ -152,13 +152,13 @@ func (c *LogProvider) PerformLogs(ctx context.Context) ([]ocr2keepers.PerformLog // always check the last lookback number of blocks and rebroadcast // this allows the plugin to make decisions based on event confirmations logs, err := c.logPoller.LogsWithSigs( + ctx, end.BlockNumber-c.lookbackBlocks, end.BlockNumber, []common.Hash{ registry.KeeperRegistryUpkeepPerformed{}.Topic(), }, c.registryAddress, - pg.WithParentCtx(ctx), ) if err != nil { return nil, fmt.Errorf("%w: failed to collect logs from log poller", err) @@ -185,7 +185,7 @@ func (c *LogProvider) PerformLogs(ctx context.Context) ([]ocr2keepers.PerformLog } func (c *LogProvider) StaleReportLogs(ctx context.Context) ([]ocr2keepers.StaleReportLog, error) { - end, err := c.logPoller.LatestBlock(pg.WithParentCtx(ctx)) + end, err := c.logPoller.LatestBlock(ctx) if err != nil { return nil, fmt.Errorf("%w: failed to get latest block from log poller", err) } @@ -195,13 +195,13 @@ func (c *LogProvider) StaleReportLogs(ctx context.Context) ([]ocr2keepers.StaleR // ReorgedUpkeepReportLogs logs, err := c.logPoller.LogsWithSigs( + ctx, end.BlockNumber-c.lookbackBlocks, end.BlockNumber, []common.Hash{ registry.KeeperRegistryReorgedUpkeepReport{}.Topic(), }, c.registryAddress, - pg.WithParentCtx(ctx), ) if err != nil { return nil, fmt.Errorf("%w: failed to collect logs from log poller", err) @@ -213,13 +213,13 @@ func (c *LogProvider) StaleReportLogs(ctx context.Context) ([]ocr2keepers.StaleR // StaleUpkeepReportLogs logs, err = c.logPoller.LogsWithSigs( + ctx, end.BlockNumber-c.lookbackBlocks, end.BlockNumber, []common.Hash{ registry.KeeperRegistryStaleUpkeepReport{}.Topic(), }, c.registryAddress, - pg.WithParentCtx(ctx), ) if err != nil { return nil, fmt.Errorf("%w: failed to collect logs from log poller", err) @@ -231,13 +231,13 @@ func (c *LogProvider) StaleReportLogs(ctx context.Context) ([]ocr2keepers.StaleR // InsufficientFundsUpkeepReportLogs logs, err = c.logPoller.LogsWithSigs( + ctx, end.BlockNumber-c.lookbackBlocks, end.BlockNumber, []common.Hash{ registry.KeeperRegistryInsufficientFundsUpkeepReport{}.Topic(), }, c.registryAddress, - pg.WithParentCtx(ctx), ) if err != nil { return nil, fmt.Errorf("%w: failed to collect logs from log poller", err) diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v20/registry.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v20/registry.go index a6a2f40f855..9fc2d7891f2 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v20/registry.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v20/registry.go @@ -27,7 +27,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/keeper_registry_wrapper2_0" "github.com/smartcontractkit/chainlink/v2/core/logger" - "github.com/smartcontractkit/chainlink/v2/core/services/pg" ) const ( @@ -103,6 +102,9 @@ func NewEVMRegistryService(addr common.Address, client legacyevm.Chain, lggr log enc: EVMAutomationEncoder20{}, } + r.ctx, r.cancel = context.WithCancel(context.Background()) + r.reInit = time.NewTimer(reInitializationDelay) + if err := r.registerEvents(client.ID().Uint64(), addr); err != nil { return nil, fmt.Errorf("logPoller error while registering automation events: %w", err) } @@ -201,13 +203,10 @@ func (r *EvmRegistry) Name() string { return r.lggr.Name() } -func (r *EvmRegistry) Start(ctx context.Context) error { +func (r *EvmRegistry) Start(_ context.Context) error { return r.sync.StartOnce("AutomationRegistry", func() error { r.mu.Lock() defer r.mu.Unlock() - r.ctx, r.cancel = context.WithCancel(context.Background()) - r.reInit = time.NewTimer(reInitializationDelay) - // initialize the upkeep keys; if the reInit timer returns, do it again { go func(cx context.Context, tmr *time.Timer, lggr logger.Logger, f func() error) { @@ -351,7 +350,7 @@ func (r *EvmRegistry) pollLogs() error { var end logpoller.LogPollerBlock var err error - if end, err = r.poller.LatestBlock(pg.WithParentCtx(r.ctx)); err != nil { + if end, err = r.poller.LatestBlock(r.ctx); err != nil { return fmt.Errorf("%w: %s", ErrHeadNotAvailable, err) } @@ -367,13 +366,12 @@ func (r *EvmRegistry) pollLogs() error { { var logs []logpoller.Log - if logs, err = r.poller.LogsWithSigs( + r.ctx, end.BlockNumber-logEventLookback, end.BlockNumber, upkeepStateEvents, r.addr, - pg.WithParentCtx(r.ctx), ); err != nil { return fmt.Errorf("%w: %s", ErrLogReadFailure, err) } @@ -393,7 +391,7 @@ func UpkeepFilterName(addr common.Address) string { func (r *EvmRegistry) registerEvents(chainID uint64, addr common.Address) error { // Add log filters for the log poller so that it can poll and find the logs that // we need - return r.poller.RegisterFilter(logpoller.Filter{ + return r.poller.RegisterFilter(r.ctx, logpoller.Filter{ Name: UpkeepFilterName(addr), EventSigs: append(upkeepStateEvents, upkeepActiveEvents...), Addresses: []common.Address{addr}, diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v20/registry_test.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v20/registry_test.go index 51448db35cf..3de22e507c7 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v20/registry_test.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v20/registry_test.go @@ -195,7 +195,7 @@ func TestPollLogs(t *testing.T) { if test.LogsWithSigs != nil { fc := test.LogsWithSigs - mp.On("LogsWithSigs", fc.InputStart, fc.InputEnd, upkeepStateEvents, test.Address, mock.Anything).Return(fc.OutputLogs, fc.OutputErr) + mp.On("LogsWithSigs", mock.Anything, fc.InputStart, fc.InputEnd, upkeepStateEvents, test.Address).Return(fc.OutputLogs, fc.OutputErr) } rg := &EvmRegistry{ diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/block_subscriber.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/block_subscriber.go index 9ae17c08ee3..3a7d329ac02 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/block_subscriber.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/block_subscriber.go @@ -17,7 +17,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/chains/evm/logpoller" evmtypes "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" "github.com/smartcontractkit/chainlink/v2/core/logger" - "github.com/smartcontractkit/chainlink/v2/core/services/pg" "github.com/smartcontractkit/chainlink/v2/core/utils" ) @@ -80,7 +79,7 @@ func NewBlockSubscriber(hb httypes.HeadBroadcaster, lp logpoller.LogPoller, fina } func (bs *BlockSubscriber) getBlockRange(ctx context.Context) ([]uint64, error) { - h, err := bs.lp.LatestBlock(pg.WithParentCtx(ctx)) + h, err := bs.lp.LatestBlock(ctx) if err != nil { return nil, err } diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/block_subscriber_test.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/block_subscriber_test.go index 2be6a6a874c..b984101bc16 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/block_subscriber_test.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/block_subscriber_test.go @@ -155,7 +155,7 @@ func TestBlockSubscriber_InitializeBlocks(t *testing.T) { for _, tc := range tests { t.Run(tc.Name, func(t *testing.T) { lp := new(mocks.LogPoller) - lp.On("GetBlocksRange", mock.Anything, tc.Blocks, mock.Anything).Return(tc.PollerBlocks, tc.Error) + lp.On("GetBlocksRange", mock.Anything, tc.Blocks).Return(tc.PollerBlocks, tc.Error) bs := NewBlockSubscriber(hb, lp, finality, lggr) bs.blockHistorySize = historySize bs.blockSize = blockSize @@ -299,7 +299,7 @@ func TestBlockSubscriber_Start(t *testing.T) { }, } - lp.On("GetBlocksRange", mock.Anything, blocks, mock.Anything).Return(pollerBlocks, nil) + lp.On("GetBlocksRange", mock.Anything, blocks).Return(pollerBlocks, nil) bs := NewBlockSubscriber(hb, lp, finality, lggr) bs.blockHistorySize = historySize diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/core/abi.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/core/abi.go index 0acb59917ac..9d94dea0f78 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/core/abi.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/core/abi.go @@ -2,13 +2,13 @@ package core import ( "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/automation_utils_2_1" - iregistry21 "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/i_keeper_registry_master_wrapper_2_1" + ac "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/automation_compatible_utils" + autov2common "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/i_automation_v21_plus_common" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/i_log_automation" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/streams_lookup_compatible_interface" ) -var UtilsABI = types.MustGetABI(automation_utils_2_1.AutomationUtilsABI) -var RegistryABI = types.MustGetABI(iregistry21.IKeeperRegistryMasterABI) +var CompatibleUtilsABI = types.MustGetABI(ac.AutomationCompatibleUtilsABI) +var AutoV2CommonABI = types.MustGetABI(autov2common.IAutomationV21PlusCommonABI) var StreamsCompatibleABI = types.MustGetABI(streams_lookup_compatible_interface.StreamsLookupCompatibleInterfaceABI) var ILogAutomationABI = types.MustGetABI(i_log_automation.ILogAutomationABI) diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/core/trigger.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/core/trigger.go index b6ea7399736..1118fa736d2 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/core/trigger.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/core/trigger.go @@ -9,10 +9,10 @@ import ( "github.com/ethereum/go-ethereum/accounts/abi" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/automation_utils_2_1" + ac "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/automation_compatible_utils" ) -type triggerWrapper = automation_utils_2_1.KeeperRegistryBase21LogTrigger +type triggerWrapper = ac.IAutomationV21PlusCommonLogTrigger var ErrABINotParsable = fmt.Errorf("error parsing abi") @@ -22,7 +22,7 @@ func PackTrigger(id *big.Int, trig triggerWrapper) ([]byte, error) { var err error // construct utils abi - utilsABI, err := abi.JSON(strings.NewReader(automation_utils_2_1.AutomationUtilsABI)) + utilsABI, err := abi.JSON(strings.NewReader(ac.AutomationCompatibleUtilsABI)) if err != nil { return nil, fmt.Errorf("%w: %s", ErrABINotParsable, err) } @@ -34,13 +34,13 @@ func PackTrigger(id *big.Int, trig triggerWrapper) ([]byte, error) { } switch upkeepType { case types.ConditionTrigger: - trig := automation_utils_2_1.KeeperRegistryBase21ConditionalTrigger{ + trig := ac.IAutomationV21PlusCommonConditionalTrigger{ BlockNum: trig.BlockNum, BlockHash: trig.BlockHash, } trigger, err = utilsABI.Pack("_conditionalTrigger", &trig) case types.LogTrigger: - logTrig := automation_utils_2_1.KeeperRegistryBase21LogTrigger{ + logTrig := ac.IAutomationV21PlusCommonLogTrigger{ BlockNum: trig.BlockNum, BlockHash: trig.BlockHash, LogBlockHash: trig.LogBlockHash, @@ -60,7 +60,7 @@ func PackTrigger(id *big.Int, trig triggerWrapper) ([]byte, error) { // UnpackTrigger unpacks the trigger from the given raw data, according to the upkeep type of the given id. func UnpackTrigger(id *big.Int, raw []byte) (triggerWrapper, error) { // construct utils abi - utilsABI, err := abi.JSON(strings.NewReader(automation_utils_2_1.AutomationUtilsABI)) + utilsABI, err := abi.JSON(strings.NewReader(ac.AutomationCompatibleUtilsABI)) if err != nil { return triggerWrapper{}, fmt.Errorf("%w: %s", ErrABINotParsable, err) } @@ -75,7 +75,7 @@ func UnpackTrigger(id *big.Int, raw []byte) (triggerWrapper, error) { if err != nil { return triggerWrapper{}, fmt.Errorf("%w: failed to unpack conditional trigger", err) } - converted, ok := abi.ConvertType(unpacked[0], new(automation_utils_2_1.KeeperRegistryBase21ConditionalTrigger)).(*automation_utils_2_1.KeeperRegistryBase21ConditionalTrigger) + converted, ok := abi.ConvertType(unpacked[0], new(ac.IAutomationV21PlusCommonConditionalTrigger)).(*ac.IAutomationV21PlusCommonConditionalTrigger) if !ok { return triggerWrapper{}, fmt.Errorf("failed to convert type") } @@ -89,7 +89,7 @@ func UnpackTrigger(id *big.Int, raw []byte) (triggerWrapper, error) { if err != nil { return triggerWrapper{}, fmt.Errorf("%w: failed to unpack log trigger", err) } - converted, ok := abi.ConvertType(unpacked[0], new(automation_utils_2_1.KeeperRegistryBase21LogTrigger)).(*automation_utils_2_1.KeeperRegistryBase21LogTrigger) + converted, ok := abi.ConvertType(unpacked[0], new(ac.IAutomationV21PlusCommonLogTrigger)).(*ac.IAutomationV21PlusCommonLogTrigger) if !ok { return triggerWrapper{}, fmt.Errorf("failed to convert type") } diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/encoding/encoder.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/encoding/encoder.go index cdf2b0ea521..cbd0a7eb214 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/encoding/encoder.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/encoding/encoder.go @@ -8,7 +8,7 @@ import ( ocr2keepers "github.com/smartcontractkit/chainlink-common/pkg/types/automation" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/automation_utils_2_1" + ac "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/automation_compatible_utils" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/core" ) @@ -33,7 +33,7 @@ func (e reportEncoder) Encode(results ...ocr2keepers.CheckResult) ([]byte, error return nil, ErrEmptyResults } - report := automation_utils_2_1.KeeperRegistryBase21Report{ + report := ac.IAutomationV21PlusCommonReport{ FastGasWei: big.NewInt(0), LinkNative: big.NewInt(0), UpkeepIds: make([]*big.Int, len(results)), diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/encoding/interface.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/encoding/interface.go index d455e17406a..e942078fe54 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/encoding/interface.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/encoding/interface.go @@ -5,8 +5,8 @@ import ( ocr2keepers "github.com/smartcontractkit/chainlink-common/pkg/types/automation" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/automation_utils_2_1" - iregistry21 "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/i_keeper_registry_master_wrapper_2_1" + ac "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/automation_compatible_utils" + autov2common "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/i_automation_v21_plus_common" ) type UpkeepFailureReason uint8 @@ -85,12 +85,12 @@ func HttpToStreamsErrCode(statusCode int) ErrCode { } } -type UpkeepInfo = iregistry21.KeeperRegistryBase21UpkeepInfo +type UpkeepInfo = autov2common.IAutomationV21PlusCommonUpkeepInfoLegacy type Packer interface { UnpackCheckResult(payload ocr2keepers.UpkeepPayload, raw string) (ocr2keepers.CheckResult, error) UnpackPerformResult(raw string) (PipelineExecutionState, bool, error) - UnpackLogTriggerConfig(raw []byte) (automation_utils_2_1.LogTriggerConfig, error) - PackReport(report automation_utils_2_1.KeeperRegistryBase21Report) ([]byte, error) - UnpackReport(raw []byte) (automation_utils_2_1.KeeperRegistryBase21Report, error) + UnpackLogTriggerConfig(raw []byte) (ac.IAutomationV21PlusCommonLogTriggerConfig, error) + PackReport(report ac.IAutomationV21PlusCommonReport) ([]byte, error) + UnpackReport(raw []byte) (ac.IAutomationV21PlusCommonReport, error) } diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/encoding/packer.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/encoding/packer.go index 81f4716a51b..dde0d24f1ba 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/encoding/packer.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/encoding/packer.go @@ -9,24 +9,24 @@ import ( ocr2keepers "github.com/smartcontractkit/chainlink-common/pkg/types/automation" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/automation_utils_2_1" + ac "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/automation_compatible_utils" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/core" ) // triggerWrapper is a wrapper for the different trigger types (log and condition triggers). // NOTE: we use log trigger because it extends condition trigger, -type triggerWrapper = automation_utils_2_1.KeeperRegistryBase21LogTrigger +type triggerWrapper = ac.IAutomationV21PlusCommonLogTrigger type abiPacker struct { - registryABI abi.ABI - utilsABI abi.ABI - streamsABI abi.ABI + autoV2CommonABI abi.ABI + utilsABI abi.ABI + streamsABI abi.ABI } var _ Packer = (*abiPacker)(nil) func NewAbiPacker() *abiPacker { - return &abiPacker{registryABI: core.RegistryABI, utilsABI: core.UtilsABI, streamsABI: core.StreamsCompatibleABI} + return &abiPacker{autoV2CommonABI: core.AutoV2CommonABI, utilsABI: core.CompatibleUtilsABI, streamsABI: core.StreamsCompatibleABI} } func (p *abiPacker) UnpackCheckResult(payload ocr2keepers.UpkeepPayload, raw string) (ocr2keepers.CheckResult, error) { @@ -37,7 +37,7 @@ func (p *abiPacker) UnpackCheckResult(payload ocr2keepers.UpkeepPayload, raw str fmt.Errorf("upkeepId %s failed to decode checkUpkeep result %s: %s", payload.UpkeepID.String(), raw, err) } - out, err := p.registryABI.Methods["checkUpkeep"].Outputs.UnpackValues(b) + out, err := p.autoV2CommonABI.Methods["checkUpkeep"].Outputs.UnpackValues(b) if err != nil { // unpack failed, not retryable return GetIneligibleCheckResultWithoutPerformData(payload, UpkeepFailureReasonNone, PackUnpackDecodeFailed, false), @@ -72,7 +72,7 @@ func (p *abiPacker) UnpackPerformResult(raw string) (PipelineExecutionState, boo return PackUnpackDecodeFailed, false, err } - out, err := p.registryABI.Methods["simulatePerformUpkeep"].Outputs.UnpackValues(b) + out, err := p.autoV2CommonABI.Methods["simulatePerformUpkeep"].Outputs.UnpackValues(b) if err != nil { return PackUnpackDecodeFailed, false, err } @@ -81,15 +81,15 @@ func (p *abiPacker) UnpackPerformResult(raw string) (PipelineExecutionState, boo } // UnpackLogTriggerConfig unpacks the log trigger config from the given raw data -func (p *abiPacker) UnpackLogTriggerConfig(raw []byte) (automation_utils_2_1.LogTriggerConfig, error) { - var cfg automation_utils_2_1.LogTriggerConfig +func (p *abiPacker) UnpackLogTriggerConfig(raw []byte) (ac.IAutomationV21PlusCommonLogTriggerConfig, error) { + var cfg ac.IAutomationV21PlusCommonLogTriggerConfig - out, err := core.UtilsABI.Methods["_logTriggerConfig"].Inputs.UnpackValues(raw) + out, err := core.CompatibleUtilsABI.Methods["_logTriggerConfig"].Inputs.UnpackValues(raw) if err != nil { return cfg, fmt.Errorf("%w: unpack _logTriggerConfig return: %s", err, raw) } - converted, ok := abi.ConvertType(out[0], new(automation_utils_2_1.LogTriggerConfig)).(*automation_utils_2_1.LogTriggerConfig) + converted, ok := abi.ConvertType(out[0], new(ac.IAutomationV21PlusCommonLogTriggerConfig)).(*ac.IAutomationV21PlusCommonLogTriggerConfig) if !ok { return cfg, fmt.Errorf("failed to convert type during UnpackLogTriggerConfig") } @@ -97,7 +97,7 @@ func (p *abiPacker) UnpackLogTriggerConfig(raw []byte) (automation_utils_2_1.Log } // PackReport packs the report with abi definitions from the contract. -func (p *abiPacker) PackReport(report automation_utils_2_1.KeeperRegistryBase21Report) ([]byte, error) { +func (p *abiPacker) PackReport(report ac.IAutomationV21PlusCommonReport) ([]byte, error) { bts, err := p.utilsABI.Methods["_report"].Inputs.Pack(&report) if err != nil { return nil, fmt.Errorf("%w: failed to pack report", err) @@ -106,16 +106,16 @@ func (p *abiPacker) PackReport(report automation_utils_2_1.KeeperRegistryBase21R } // UnpackReport unpacks the report from the given raw data. -func (p *abiPacker) UnpackReport(raw []byte) (automation_utils_2_1.KeeperRegistryBase21Report, error) { +func (p *abiPacker) UnpackReport(raw []byte) (ac.IAutomationV21PlusCommonReport, error) { unpacked, err := p.utilsABI.Methods["_report"].Inputs.Unpack(raw) if err != nil { - return automation_utils_2_1.KeeperRegistryBase21Report{}, fmt.Errorf("%w: failed to unpack report", err) + return ac.IAutomationV21PlusCommonReport{}, fmt.Errorf("%w: failed to unpack report", err) } - converted, ok := abi.ConvertType(unpacked[0], new(automation_utils_2_1.KeeperRegistryBase21Report)).(*automation_utils_2_1.KeeperRegistryBase21Report) + converted, ok := abi.ConvertType(unpacked[0], new(ac.IAutomationV21PlusCommonReport)).(*ac.IAutomationV21PlusCommonReport) if !ok { - return automation_utils_2_1.KeeperRegistryBase21Report{}, fmt.Errorf("failed to convert type") + return ac.IAutomationV21PlusCommonReport{}, fmt.Errorf("failed to convert type") } - report := automation_utils_2_1.KeeperRegistryBase21Report{ + report := ac.IAutomationV21PlusCommonReport{ FastGasWei: converted.FastGasWei, LinkNative: converted.LinkNative, UpkeepIds: make([]*big.Int, len(converted.UpkeepIds)), diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/encoding/packer_test.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/encoding/packer_test.go index 79221a620e1..3a3cf843024 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/encoding/packer_test.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/encoding/packer_test.go @@ -12,22 +12,21 @@ import ( ocr2keepers "github.com/smartcontractkit/chainlink-common/pkg/types/automation" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/automation_utils_2_1" - automation21Utils "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/automation_utils_2_1" + ac "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/automation_compatible_utils" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/core" ) func TestPacker_PackReport(t *testing.T) { for _, tc := range []struct { name string - report automation21Utils.KeeperRegistryBase21Report + report ac.IAutomationV21PlusCommonReport expectsErr bool wantErr error wantBytes int }{ { name: "all non-nil values get encoded to a byte array of a specific length", - report: automation21Utils.KeeperRegistryBase21Report{ + report: ac.IAutomationV21PlusCommonReport{ FastGasWei: big.NewInt(0), LinkNative: big.NewInt(0), UpkeepIds: []*big.Int{big.NewInt(3)}, @@ -43,7 +42,7 @@ func TestPacker_PackReport(t *testing.T) { }, { name: "if upkeep IDs are nil, the packed report is smaller", - report: automation21Utils.KeeperRegistryBase21Report{ + report: ac.IAutomationV21PlusCommonReport{ FastGasWei: big.NewInt(1), LinkNative: big.NewInt(2), UpkeepIds: nil, @@ -59,7 +58,7 @@ func TestPacker_PackReport(t *testing.T) { }, { name: "if gas limits are nil, the packed report is smaller", - report: automation21Utils.KeeperRegistryBase21Report{ + report: ac.IAutomationV21PlusCommonReport{ FastGasWei: big.NewInt(1), LinkNative: big.NewInt(2), UpkeepIds: []*big.Int{big.NewInt(3)}, @@ -75,7 +74,7 @@ func TestPacker_PackReport(t *testing.T) { }, { name: "if perform datas are nil, the packed report is smaller", - report: automation21Utils.KeeperRegistryBase21Report{ + report: ac.IAutomationV21PlusCommonReport{ FastGasWei: big.NewInt(1), LinkNative: big.NewInt(2), UpkeepIds: []*big.Int{big.NewInt(3)}, @@ -89,7 +88,7 @@ func TestPacker_PackReport(t *testing.T) { }, { name: "if triggers are nil, the packed report is smaller", - report: automation21Utils.KeeperRegistryBase21Report{ + report: ac.IAutomationV21PlusCommonReport{ FastGasWei: big.NewInt(1), LinkNative: big.NewInt(2), UpkeepIds: []*big.Int{big.NewInt(3)}, @@ -232,7 +231,7 @@ func TestPacker_UnpackLogTriggerConfig(t *testing.T) { tests := []struct { name string raw []byte - res automation21Utils.LogTriggerConfig + res ac.IAutomationV21PlusCommonLogTriggerConfig errored bool }{ { @@ -241,7 +240,7 @@ func TestPacker_UnpackLogTriggerConfig(t *testing.T) { b, _ := hexutil.Decode("0x0000000000000000000000007456fadf415b7c34b1182bd20b0537977e945e3e00000000000000000000000000000000000000000000000000000000000000003d53a39550e04688065827f3bb86584cb007ab9ebca7ebd528e7301c9c31eb5d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000") return b }(), - automation21Utils.LogTriggerConfig{ + ac.IAutomationV21PlusCommonLogTriggerConfig{ ContractAddress: common.HexToAddress("0x7456FadF415b7c34B1182Bd20B0537977e945e3E"), Topic0: [32]uint8{0x3d, 0x53, 0xa3, 0x95, 0x50, 0xe0, 0x46, 0x88, 0x6, 0x58, 0x27, 0xf3, 0xbb, 0x86, 0x58, 0x4c, 0xb0, 0x7, 0xab, 0x9e, 0xbc, 0xa7, 0xeb, 0xd5, 0x28, 0xe7, 0x30, 0x1c, 0x9c, 0x31, 0xeb, 0x5d}, }, @@ -253,7 +252,7 @@ func TestPacker_UnpackLogTriggerConfig(t *testing.T) { b, _ := hexutil.Decode("0x000000000000000000000000b1182bd20b0537977e945e3e00000000000000000000000000000000000000000000000000000000000000003d53a39550e04688065827f3bb86584cb007ab9ebca7ebd528e7301c9c31eb5d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000") return b }(), - automation21Utils.LogTriggerConfig{}, + ac.IAutomationV21PlusCommonLogTriggerConfig{}, true, }, } @@ -273,7 +272,7 @@ func TestPacker_UnpackLogTriggerConfig(t *testing.T) { } func TestPacker_PackReport_UnpackReport(t *testing.T) { - report := automation_utils_2_1.KeeperRegistryBase21Report{ + report := ac.IAutomationV21PlusCommonReport{ FastGasWei: big.NewInt(1), LinkNative: big.NewInt(1), UpkeepIds: []*big.Int{big.NewInt(1), big.NewInt(2)}, diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/block_time.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/block_time.go index 814ed29d900..9dd442f2e8d 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/block_time.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/block_time.go @@ -7,7 +7,6 @@ import ( "time" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/logpoller" - "github.com/smartcontractkit/chainlink/v2/core/services/pg" ) var ( @@ -30,7 +29,7 @@ func (r *blockTimeResolver) BlockTime(ctx context.Context, blockSampleSize int64 blockSampleSize = defaultSampleSize } - latest, err := r.poller.LatestBlock(pg.WithParentCtx(ctx)) + latest, err := r.poller.LatestBlock(ctx) if err != nil { return 0, fmt.Errorf("failed to get latest block from poller: %w", err) } diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/integration_test.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/integration_test.go index aa8a5c97d70..1fc642a946f 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/integration_test.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/integration_test.go @@ -30,12 +30,10 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest/heavyweight" "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/chainlink" evmregistry21 "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/core" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider" - "github.com/smartcontractkit/chainlink/v2/core/services/pg" ) func TestIntegration_LogEventProvider(t *testing.T) { @@ -315,7 +313,7 @@ func TestIntegration_LogEventProvider_RateLimit(t *testing.T) { { // total block history at this point should be 566 var minimumBlockCount int64 = 500 - latestBlock, _ := lp.LatestBlock() + latestBlock, _ := lp.LatestBlock(ctx) assert.GreaterOrEqual(t, latestBlock.BlockNumber, minimumBlockCount, "to ensure the integrety of the test, the minimum block count before the test should be %d but got %d", minimumBlockCount, latestBlock) } @@ -562,7 +560,7 @@ func waitLogPoller(ctx context.Context, t *testing.T, backend *backends.Simulate require.NoError(t, err) latestBlock := b.Number().Int64() for { - latestPolled, lberr := lp.LatestBlock(pg.WithParentCtx(ctx)) + latestPolled, lberr := lp.LatestBlock(ctx) require.NoError(t, lberr) if latestPolled.BlockNumber >= latestBlock { break @@ -660,7 +658,7 @@ func setupDependencies(t *testing.T, db *sqlx.DB, backend *backends.SimulatedBac ethClient := evmclient.NewSimulatedBackendClient(t, backend, big.NewInt(1337)) pollerLggr := logger.TestLogger(t) pollerLggr.SetLogLevel(zapcore.WarnLevel) - lorm := logpoller.NewORM(big.NewInt(1337), db, pollerLggr, pgtest.NewQConfig(false)) + lorm := logpoller.NewORM(big.NewInt(1337), db, pollerLggr) lpOpts := logpoller.Opts{ PollPeriod: 100 * time.Millisecond, FinalityDepth: 1, diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/log_packer.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/log_packer.go index 5902af73f03..9ffc48c6c36 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/log_packer.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/log_packer.go @@ -6,7 +6,7 @@ import ( "github.com/ethereum/go-ethereum/accounts/abi" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/logpoller" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/automation_utils_2_1" + ac "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/automation_compatible_utils" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/core" ) @@ -19,7 +19,7 @@ type logEventsPacker struct { } func NewLogEventsPacker() *logEventsPacker { - return &logEventsPacker{abi: core.UtilsABI} + return &logEventsPacker{abi: core.CompatibleUtilsABI} } func (p *logEventsPacker) PackLogData(log logpoller.Log) ([]byte, error) { @@ -27,7 +27,7 @@ func (p *logEventsPacker) PackLogData(log logpoller.Log) ([]byte, error) { for _, topic := range log.GetTopics() { topics = append(topics, topic) } - b, err := p.abi.Methods["_log"].Inputs.Pack(&automation_utils_2_1.Log{ + b, err := p.abi.Methods["_log"].Inputs.Pack(&ac.Log{ Index: big.NewInt(log.LogIndex), Timestamp: big.NewInt(log.BlockTimestamp.Unix()), TxHash: log.TxHash, diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/provider.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/provider.go index e06593a9109..ed84410548d 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/provider.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/provider.go @@ -21,11 +21,10 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/services" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/logpoller" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/automation_utils_2_1" + ac "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/automation_compatible_utils" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/core" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/prommetrics" - "github.com/smartcontractkit/chainlink/v2/core/services/pg" "github.com/smartcontractkit/chainlink/v2/core/utils" ) @@ -50,7 +49,7 @@ var ( ) // LogTriggerConfig is an alias for log trigger config. -type LogTriggerConfig automation_utils_2_1.LogTriggerConfig +type LogTriggerConfig ac.IAutomationV21PlusCommonLogTriggerConfig type FilterOptions struct { UpkeepID *big.Int @@ -62,13 +61,13 @@ type LogTriggersLifeCycle interface { // RegisterFilter registers the filter (if valid) for the given upkeepID. RegisterFilter(ctx context.Context, opts FilterOptions) error // UnregisterFilter removes the filter for the given upkeepID. - UnregisterFilter(upkeepID *big.Int) error + UnregisterFilter(ctx context.Context, upkeepID *big.Int) error } type LogEventProvider interface { ocr2keepers.LogEventProvider LogTriggersLifeCycle - RefreshActiveUpkeeps(ids ...*big.Int) ([]*big.Int, error) + RefreshActiveUpkeeps(ctx context.Context, ids ...*big.Int) ([]*big.Int, error) Start(context.Context) error io.Closer @@ -159,7 +158,7 @@ func (p *logEventProvider) HealthReport() map[string]error { } func (p *logEventProvider) GetLatestPayloads(ctx context.Context) ([]ocr2keepers.UpkeepPayload, error) { - latest, err := p.poller.LatestBlock(pg.WithParentCtx(ctx)) + latest, err := p.poller.LatestBlock(ctx) if err != nil { return nil, fmt.Errorf("%w: %s", ErrHeadNotAvailable, err) } @@ -198,7 +197,7 @@ func (p *logEventProvider) ReadLogs(pctx context.Context, ids ...*big.Int) error ctx, cancel := context.WithTimeout(pctx, readLogsTimeout) defer cancel() - latest, err := p.poller.LatestBlock(pg.WithParentCtx(ctx)) + latest, err := p.poller.LatestBlock(ctx) if err != nil { return fmt.Errorf("%w: %s", ErrHeadNotAvailable, err) } @@ -380,7 +379,7 @@ func (p *logEventProvider) readLogs(ctx context.Context, latest int64, filters [ start = configUpdateBlock } // query logs based on contract address, event sig, and blocks - logs, err := p.poller.LogsWithSigs(start, latest, []common.Hash{filter.topics[0]}, common.BytesToAddress(filter.addr), pg.WithParentCtx(ctx)) + logs, err := p.poller.LogsWithSigs(ctx, start, latest, []common.Hash{filter.topics[0]}, common.BytesToAddress(filter.addr)) if err != nil { // cancel limit reservation as we failed to get logs resv.Cancel() diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/provider_life_cycle.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/provider_life_cycle.go index 69a4872351d..ae6a373ad22 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/provider_life_cycle.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/provider_life_cycle.go @@ -12,7 +12,6 @@ import ( "golang.org/x/time/rate" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/logpoller" - "github.com/smartcontractkit/chainlink/v2/core/services/pg" ) var ( @@ -22,7 +21,7 @@ var ( LogBackfillBuffer = 100 ) -func (p *logEventProvider) RefreshActiveUpkeeps(ids ...*big.Int) ([]*big.Int, error) { +func (p *logEventProvider) RefreshActiveUpkeeps(ctx context.Context, ids ...*big.Int) ([]*big.Int, error) { // Exploratory: investigate how we can batch the refresh if len(ids) == 0 { return nil, nil @@ -42,7 +41,7 @@ func (p *logEventProvider) RefreshActiveUpkeeps(ids ...*big.Int) ([]*big.Int, er if len(inactiveIDs) > 0 { p.lggr.Debugw("Removing inactive upkeeps", "upkeeps", len(inactiveIDs)) for _, id := range inactiveIDs { - if err := p.UnregisterFilter(id); err != nil { + if err := p.UnregisterFilter(ctx, id); err != nil { merr = errors.Join(merr, fmt.Errorf("failed to unregister filter: %s", id.String())) } } @@ -105,7 +104,7 @@ func (p *logEventProvider) RegisterFilter(ctx context.Context, opts FilterOption // register registers the upkeep filter with the log poller and adds it to the filter store. func (p *logEventProvider) register(ctx context.Context, lpFilter logpoller.Filter, ufilter upkeepFilter) error { - latest, err := p.poller.LatestBlock(pg.WithParentCtx(ctx)) + latest, err := p.poller.LatestBlock(ctx) if err != nil { return fmt.Errorf("failed to get latest block while registering filter: %w", err) } @@ -115,12 +114,12 @@ func (p *logEventProvider) register(ctx context.Context, lpFilter logpoller.Filt if filterStoreHasFilter { // removing filter in case of an update so we can recreate it with updated values lggr.Debugw("Upserting upkeep filter") - err := p.poller.UnregisterFilter(lpFilter.Name) + err := p.poller.UnregisterFilter(ctx, lpFilter.Name) if err != nil { return fmt.Errorf("failed to upsert (unregister) upkeep filter %s: %w", ufilter.upkeepID.String(), err) } } - if err := p.poller.RegisterFilter(lpFilter); err != nil { + if err := p.poller.RegisterFilter(ctx, lpFilter); err != nil { return err } p.filterStore.AddActiveUpkeeps(ufilter) @@ -144,10 +143,10 @@ func (p *logEventProvider) register(ctx context.Context, lpFilter logpoller.Filt return nil } -func (p *logEventProvider) UnregisterFilter(upkeepID *big.Int) error { +func (p *logEventProvider) UnregisterFilter(ctx context.Context, upkeepID *big.Int) error { // Filter might have been unregistered already, only try to unregister if it exists if p.poller.HasFilter(p.filterName(upkeepID)) { - if err := p.poller.UnregisterFilter(p.filterName(upkeepID)); err != nil { + if err := p.poller.UnregisterFilter(ctx, p.filterName(upkeepID)); err != nil { return fmt.Errorf("failed to unregister upkeep filter %s: %w", upkeepID.String(), err) } } diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/provider_life_cycle_test.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/provider_life_cycle_test.go index d978940d297..5d87a986a56 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/provider_life_cycle_test.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/provider_life_cycle_test.go @@ -108,8 +108,8 @@ func TestLogEventProvider_LifeCycle(t *testing.T) { if tc.mockPoller { lp := new(mocks.LogPoller) - lp.On("RegisterFilter", mock.Anything).Return(nil) - lp.On("UnregisterFilter", mock.Anything).Return(nil) + lp.On("RegisterFilter", mock.Anything, mock.Anything).Return(nil) + lp.On("UnregisterFilter", mock.Anything, mock.Anything).Return(nil) lp.On("LatestBlock", mock.Anything).Return(logpoller.LogPollerBlock{}, nil) hasFitlerTimes := 1 if tc.unregister { @@ -136,7 +136,7 @@ func TestLogEventProvider_LifeCycle(t *testing.T) { } else { require.NoError(t, err) if tc.unregister { - require.NoError(t, p.UnregisterFilter(tc.upkeepID)) + require.NoError(t, p.UnregisterFilter(ctx, tc.upkeepID)) } } }) @@ -146,8 +146,8 @@ func TestLogEventProvider_LifeCycle(t *testing.T) { func TestEventLogProvider_RefreshActiveUpkeeps(t *testing.T) { ctx := testutils.Context(t) mp := new(mocks.LogPoller) - mp.On("RegisterFilter", mock.Anything).Return(nil) - mp.On("UnregisterFilter", mock.Anything).Return(nil) + mp.On("RegisterFilter", mock.Anything, mock.Anything).Return(nil) + mp.On("UnregisterFilter", mock.Anything, mock.Anything).Return(nil) mp.On("HasFilter", mock.Anything).Return(false) mp.On("LatestBlock", mock.Anything).Return(logpoller.LogPollerBlock{}, nil) mp.On("ReplayAsync", mock.Anything).Return(nil) @@ -172,11 +172,12 @@ func TestEventLogProvider_RefreshActiveUpkeeps(t *testing.T) { })) require.Equal(t, 2, p.filterStore.Size()) - newIds, err := p.RefreshActiveUpkeeps() + newIds, err := p.RefreshActiveUpkeeps(ctx) require.NoError(t, err) require.Len(t, newIds, 0) mp.On("HasFilter", p.filterName(core.GenUpkeepID(types.LogTrigger, "2222").BigInt())).Return(true) newIds, err = p.RefreshActiveUpkeeps( + ctx, core.GenUpkeepID(types.LogTrigger, "2222").BigInt(), core.GenUpkeepID(types.LogTrigger, "1234").BigInt(), core.GenUpkeepID(types.LogTrigger, "123").BigInt()) diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/provider_test.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/provider_test.go index 464b9aa3ba6..6ed68d4028a 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/provider_test.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/provider_test.go @@ -242,7 +242,7 @@ func TestLogEventProvider_ReadLogs(t *testing.T) { mp := new(mocks.LogPoller) - mp.On("RegisterFilter", mock.Anything).Return(nil) + mp.On("RegisterFilter", mock.Anything, mock.Anything).Return(nil) mp.On("ReplayAsync", mock.Anything).Return() mp.On("HasFilter", mock.Anything).Return(false) mp.On("UnregisterFilter", mock.Anything, mock.Anything).Return(nil) diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/recoverer.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/recoverer.go index 2eef5db17d9..26c56c23b8c 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/recoverer.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/recoverer.go @@ -28,7 +28,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/core" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/prommetrics" - "github.com/smartcontractkit/chainlink/v2/core/services/pg" "github.com/smartcontractkit/chainlink/v2/core/utils" ) @@ -207,7 +206,7 @@ func (r *logRecoverer) getLogTriggerCheckData(ctx context.Context, proposal ocr2 if !r.filterStore.Has(proposal.UpkeepID.BigInt()) { return nil, fmt.Errorf("filter not found for upkeep %v", proposal.UpkeepID) } - latest, err := r.poller.LatestBlock(pg.WithParentCtx(ctx)) + latest, err := r.poller.LatestBlock(ctx) if err != nil { return nil, err } @@ -261,7 +260,7 @@ func (r *logRecoverer) getLogTriggerCheckData(ctx context.Context, proposal ocr2 return nil, fmt.Errorf("log block %d is before the filter configUpdateBlock %d for upkeepID %s", logBlock, filter.configUpdateBlock, proposal.UpkeepID.String()) } - logs, err := r.poller.LogsWithSigs(logBlock-1, logBlock+1, filter.topics, common.BytesToAddress(filter.addr), pg.WithParentCtx(ctx)) + logs, err := r.poller.LogsWithSigs(ctx, logBlock-1, logBlock+1, filter.topics, common.BytesToAddress(filter.addr)) if err != nil { return nil, fmt.Errorf("could not read logs: %w", err) } @@ -286,7 +285,7 @@ func (r *logRecoverer) getLogTriggerCheckData(ctx context.Context, proposal ocr2 } func (r *logRecoverer) GetRecoveryProposals(ctx context.Context) ([]ocr2keepers.UpkeepPayload, error) { - latestBlock, err := r.poller.LatestBlock(pg.WithParentCtx(ctx)) + latestBlock, err := r.poller.LatestBlock(ctx) if err != nil { return nil, fmt.Errorf("%w: %s", ErrHeadNotAvailable, err) } @@ -330,7 +329,7 @@ func (r *logRecoverer) GetRecoveryProposals(ctx context.Context) ([]ocr2keepers. } func (r *logRecoverer) recover(ctx context.Context) error { - latest, err := r.poller.LatestBlock(pg.WithParentCtx(ctx)) + latest, err := r.poller.LatestBlock(ctx) if err != nil { return fmt.Errorf("%w: %s", ErrHeadNotAvailable, err) } @@ -389,7 +388,7 @@ func (r *logRecoverer) recoverFilter(ctx context.Context, f upkeepFilter, startB end = offsetBlock } // we expect start to be > offsetBlock in any case - logs, err := r.poller.LogsWithSigs(start, end, f.topics, common.BytesToAddress(f.addr), pg.WithParentCtx(ctx)) + logs, err := r.poller.LogsWithSigs(ctx, start, end, f.topics, common.BytesToAddress(f.addr)) if err != nil { return fmt.Errorf("could not read logs: %w", err) } @@ -605,7 +604,7 @@ func (r *logRecoverer) clean(ctx context.Context) { } func (r *logRecoverer) tryExpire(ctx context.Context, ids ...string) error { - latestBlock, err := r.poller.LatestBlock(pg.WithParentCtx(ctx)) + latestBlock, err := r.poller.LatestBlock(ctx) if err != nil { return fmt.Errorf("failed to get latest block: %w", err) } diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/recoverer_test.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/recoverer_test.go index eadd0446da8..54338207190 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/recoverer_test.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/recoverer_test.go @@ -28,7 +28,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/core" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/core/mocks" - "github.com/smartcontractkit/chainlink/v2/core/services/pg" ) func TestLogRecoverer_GetRecoverables(t *testing.T) { @@ -607,7 +606,7 @@ func TestLogRecoverer_GetProposalData(t *testing.T) { }, }, logPoller: &mockLogPoller{ - LatestBlockFn: func(qopts ...pg.QOpt) (int64, error) { + LatestBlockFn: func(ctx context.Context) (int64, error) { return 0, errors.New("latest block boom") }, }, @@ -630,7 +629,7 @@ func TestLogRecoverer_GetProposalData(t *testing.T) { }, }, logPoller: &mockLogPoller{ - LatestBlockFn: func(qopts ...pg.QOpt) (int64, error) { + LatestBlockFn: func(ctx context.Context) (int64, error) { return 100, nil }, }, @@ -658,7 +657,7 @@ func TestLogRecoverer_GetProposalData(t *testing.T) { }, }, logPoller: &mockLogPoller{ - LatestBlockFn: func(qopts ...pg.QOpt) (int64, error) { + LatestBlockFn: func(ctx context.Context) (int64, error) { return 100, nil }, }, @@ -686,7 +685,7 @@ func TestLogRecoverer_GetProposalData(t *testing.T) { }, }, logPoller: &mockLogPoller{ - LatestBlockFn: func(qopts ...pg.QOpt) (int64, error) { + LatestBlockFn: func(ctx context.Context) (int64, error) { return 100, nil }, }, @@ -716,7 +715,7 @@ func TestLogRecoverer_GetProposalData(t *testing.T) { }, }, logPoller: &mockLogPoller{ - LatestBlockFn: func(qopts ...pg.QOpt) (int64, error) { + LatestBlockFn: func(ctx context.Context) (int64, error) { return 100, nil }, }, @@ -747,7 +746,7 @@ func TestLogRecoverer_GetProposalData(t *testing.T) { }, }, logPoller: &mockLogPoller{ - LatestBlockFn: func(qopts ...pg.QOpt) (int64, error) { + LatestBlockFn: func(ctx context.Context) (int64, error) { return 100, nil }, }, @@ -778,7 +777,7 @@ func TestLogRecoverer_GetProposalData(t *testing.T) { }, }, logPoller: &mockLogPoller{ - LatestBlockFn: func(qopts ...pg.QOpt) (int64, error) { + LatestBlockFn: func(ctx context.Context) (int64, error) { return 300, nil }, }, @@ -813,7 +812,7 @@ func TestLogRecoverer_GetProposalData(t *testing.T) { }, }, logPoller: &mockLogPoller{ - LatestBlockFn: func(qopts ...pg.QOpt) (int64, error) { + LatestBlockFn: func(ctx context.Context) (int64, error) { return 300, nil }, }, @@ -853,7 +852,7 @@ func TestLogRecoverer_GetProposalData(t *testing.T) { }, }, logPoller: &mockLogPoller{ - LatestBlockFn: func(qopts ...pg.QOpt) (int64, error) { + LatestBlockFn: func(ctx context.Context) (int64, error) { return 300, nil }, }, @@ -885,10 +884,10 @@ func TestLogRecoverer_GetProposalData(t *testing.T) { }, }, logPoller: &mockLogPoller{ - LatestBlockFn: func(qopts ...pg.QOpt) (int64, error) { + LatestBlockFn: func(ctx context.Context) (int64, error) { return 300, nil }, - LogsWithSigsFn: func(start, end int64, eventSigs []common.Hash, address common.Address, qopts ...pg.QOpt) ([]logpoller.Log, error) { + LogsWithSigsFn: func(ctx context.Context, start, end int64, eventSigs []common.Hash, address common.Address) ([]logpoller.Log, error) { return nil, errors.New("logs with sigs boom") }, }, @@ -920,10 +919,10 @@ func TestLogRecoverer_GetProposalData(t *testing.T) { }, }, logPoller: &mockLogPoller{ - LatestBlockFn: func(qopts ...pg.QOpt) (int64, error) { + LatestBlockFn: func(ctx context.Context) (int64, error) { return 300, nil }, - LogsWithSigsFn: func(start, end int64, eventSigs []common.Hash, address common.Address, qopts ...pg.QOpt) ([]logpoller.Log, error) { + LogsWithSigsFn: func(ctx context.Context, start, end int64, eventSigs []common.Hash, address common.Address) ([]logpoller.Log, error) { return []logpoller.Log{ { BlockNumber: 80, @@ -968,10 +967,10 @@ func TestLogRecoverer_GetProposalData(t *testing.T) { WorkID: "7f775793422d178c90e99c3bbdf05181bc6bb6ce13170e87c92ac396bb7ddda0", }, logPoller: &mockLogPoller{ - LatestBlockFn: func(qopts ...pg.QOpt) (int64, error) { + LatestBlockFn: func(ctx context.Context) (int64, error) { return 300, nil }, - LogsWithSigsFn: func(start, end int64, eventSigs []common.Hash, address common.Address, qopts ...pg.QOpt) ([]logpoller.Log, error) { + LogsWithSigsFn: func(ctx context.Context, start, end int64, eventSigs []common.Hash, address common.Address) ([]logpoller.Log, error) { return []logpoller.Log{ { BlockNumber: 80, @@ -1019,10 +1018,10 @@ func TestLogRecoverer_GetProposalData(t *testing.T) { WorkID: "7f775793422d178c90e99c3bbdf05181bc6bb6ce13170e87c92ac396bb7ddda0", }, logPoller: &mockLogPoller{ - LatestBlockFn: func(qopts ...pg.QOpt) (int64, error) { + LatestBlockFn: func(ctx context.Context) (int64, error) { return 300, nil }, - LogsWithSigsFn: func(start, end int64, eventSigs []common.Hash, address common.Address, qopts ...pg.QOpt) ([]logpoller.Log, error) { + LogsWithSigsFn: func(ctx context.Context, start, end int64, eventSigs []common.Hash, address common.Address) ([]logpoller.Log, error) { return []logpoller.Log{ { EvmChainId: ubig.New(big.NewInt(1)), @@ -1200,15 +1199,15 @@ func (s *mockFilterStore) Has(id *big.Int) bool { type mockLogPoller struct { logpoller.LogPoller - LatestBlockFn func(qopts ...pg.QOpt) (int64, error) - LogsWithSigsFn func(start, end int64, eventSigs []common.Hash, address common.Address, qopts ...pg.QOpt) ([]logpoller.Log, error) + LatestBlockFn func(ctx context.Context) (int64, error) + LogsWithSigsFn func(ctx context.Context, start, end int64, eventSigs []common.Hash, address common.Address) ([]logpoller.Log, error) } -func (p *mockLogPoller) LogsWithSigs(start, end int64, eventSigs []common.Hash, address common.Address, qopts ...pg.QOpt) ([]logpoller.Log, error) { - return p.LogsWithSigsFn(start, end, eventSigs, address, qopts...) +func (p *mockLogPoller) LogsWithSigs(ctx context.Context, start, end int64, eventSigs []common.Hash, address common.Address) ([]logpoller.Log, error) { + return p.LogsWithSigsFn(ctx, start, end, eventSigs, address) } -func (p *mockLogPoller) LatestBlock(qopts ...pg.QOpt) (logpoller.LogPollerBlock, error) { - block, err := p.LatestBlockFn(qopts...) +func (p *mockLogPoller) LatestBlock(ctx context.Context) (logpoller.LogPollerBlock, error) { + block, err := p.LatestBlockFn(ctx) return logpoller.LogPollerBlock{BlockNumber: block}, err } diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/mercury/mercury.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/mercury/mercury.go index 4ec62b243d1..651e4cde2fe 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/mercury/mercury.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/mercury/mercury.go @@ -144,7 +144,7 @@ type abiPacker struct { } func NewAbiPacker() *abiPacker { - return &abiPacker{registryABI: core.RegistryABI, streamsABI: core.StreamsCompatibleABI} + return &abiPacker{registryABI: core.AutoV2CommonABI, streamsABI: core.StreamsCompatibleABI} } // DecodeStreamsLookupRequest decodes the revert error StreamsLookup(string feedParamKey, string[] feeds, string feedParamKey, uint256 time, byte[] extraData) diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/mercury/streams/streams.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/mercury/streams/streams.go index 843091ea7a0..b9847dd3e0d 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/mercury/streams/streams.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/mercury/streams/streams.go @@ -18,7 +18,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/services" ocr2keepers "github.com/smartcontractkit/chainlink-common/pkg/types/automation" - iregistry21 "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/i_keeper_registry_master_wrapper_2_1" + autov2common "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/i_automation_v21_plus_common" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/core" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/encoding" @@ -42,7 +42,7 @@ type latestBlockProvider interface { type streamRegistry interface { GetUpkeepPrivilegeConfig(opts *bind.CallOpts, upkeepId *big.Int) ([]byte, error) - CheckCallback(opts *bind.CallOpts, id *big.Int, values [][]byte, extraData []byte) (iregistry21.CheckCallback, error) + CheckCallback(opts *bind.CallOpts, id *big.Int, values [][]byte, extraData []byte) (autov2common.CheckCallback, error) Address() common.Address } @@ -83,7 +83,7 @@ func NewStreamsLookup( return &streams{ packer: packer, mercuryConfig: mercuryConfig, - abi: core.RegistryABI, + abi: core.AutoV2CommonABI, blockSubscriber: blockSubscriber, registry: registry, client: client, diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/mercury/streams/streams_test.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/mercury/streams/streams_test.go index 6a4aa69ec4d..517cfcb4e1e 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/mercury/streams/streams_test.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/mercury/streams/streams_test.go @@ -31,7 +31,7 @@ import ( ocr2keepers "github.com/smartcontractkit/chainlink-common/pkg/types/automation" evmClientMocks "github.com/smartcontractkit/chainlink/v2/core/chains/evm/client/mocks" - iregistry21 "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/i_keeper_registry_master_wrapper_2_1" + autov2common "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/i_automation_v21_plus_common" "github.com/smartcontractkit/chainlink/v2/core/logger" ) @@ -86,7 +86,7 @@ func (mock *MockHttpClient) Do(req *http.Request) (*http.Response, error) { type mockRegistry struct { GetUpkeepPrivilegeConfigFn func(opts *bind.CallOpts, upkeepId *big.Int) ([]byte, error) - CheckCallbackFn func(opts *bind.CallOpts, id *big.Int, values [][]byte, extraData []byte) (iregistry21.CheckCallback, error) + CheckCallbackFn func(opts *bind.CallOpts, id *big.Int, values [][]byte, extraData []byte) (autov2common.CheckCallback, error) } func (r *mockRegistry) Address() common.Address { @@ -97,7 +97,7 @@ func (r *mockRegistry) GetUpkeepPrivilegeConfig(opts *bind.CallOpts, upkeepId *b return r.GetUpkeepPrivilegeConfigFn(opts, upkeepId) } -func (r *mockRegistry) CheckCallback(opts *bind.CallOpts, id *big.Int, values [][]byte, extraData []byte) (iregistry21.CheckCallback, error) { +func (r *mockRegistry) CheckCallback(opts *bind.CallOpts, id *big.Int, values [][]byte, extraData []byte) (autov2common.CheckCallback, error) { return r.CheckCallbackFn(opts, id, values, extraData) } @@ -314,8 +314,8 @@ func TestStreams_CheckCallback(t *testing.T) { GetUpkeepPrivilegeConfigFn: func(opts *bind.CallOpts, upkeepId *big.Int) ([]byte, error) { return []byte(`{"mercuryEnabled":true}`), nil }, - CheckCallbackFn: func(opts *bind.CallOpts, id *big.Int, values [][]byte, extraData []byte) (iregistry21.CheckCallback, error) { - return iregistry21.CheckCallback{ + CheckCallbackFn: func(opts *bind.CallOpts, id *big.Int, values [][]byte, extraData []byte) (autov2common.CheckCallback, error) { + return autov2common.CheckCallback{ UpkeepNeeded: true, PerformData: []byte{48, 120, 48, 48}, }, nil @@ -349,8 +349,8 @@ func TestStreams_CheckCallback(t *testing.T) { GetUpkeepPrivilegeConfigFn: func(opts *bind.CallOpts, upkeepId *big.Int) ([]byte, error) { return []byte(`{"mercuryEnabled":true}`), nil }, - CheckCallbackFn: func(opts *bind.CallOpts, id *big.Int, values [][]byte, extraData []byte) (iregistry21.CheckCallback, error) { - return iregistry21.CheckCallback{ + CheckCallbackFn: func(opts *bind.CallOpts, id *big.Int, values [][]byte, extraData []byte) (autov2common.CheckCallback, error) { + return autov2common.CheckCallback{ UpkeepNeeded: true, PerformData: []byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100}, }, nil @@ -384,8 +384,8 @@ func TestStreams_CheckCallback(t *testing.T) { GetUpkeepPrivilegeConfigFn: func(opts *bind.CallOpts, upkeepId *big.Int) ([]byte, error) { return []byte(`{"mercuryEnabled":true}`), nil }, - CheckCallbackFn: func(opts *bind.CallOpts, id *big.Int, values [][]byte, extraData []byte) (iregistry21.CheckCallback, error) { - return iregistry21.CheckCallback{}, errors.New("bad response") + CheckCallbackFn: func(opts *bind.CallOpts, id *big.Int, values [][]byte, extraData []byte) (autov2common.CheckCallback, error) { + return autov2common.CheckCallback{}, errors.New("bad response") }, }, }, @@ -442,8 +442,8 @@ func TestStreams_AllowedToUseMercury(t *testing.T) { GetUpkeepPrivilegeConfigFn: func(opts *bind.CallOpts, upkeepId *big.Int) ([]byte, error) { return nil, nil }, - CheckCallbackFn: func(opts *bind.CallOpts, id *big.Int, values [][]byte, extraData []byte) (iregistry21.CheckCallback, error) { - return iregistry21.CheckCallback{}, nil + CheckCallbackFn: func(opts *bind.CallOpts, id *big.Int, values [][]byte, extraData []byte) (autov2common.CheckCallback, error) { + return autov2common.CheckCallback{}, nil }, }, }, @@ -454,8 +454,8 @@ func TestStreams_AllowedToUseMercury(t *testing.T) { GetUpkeepPrivilegeConfigFn: func(opts *bind.CallOpts, upkeepId *big.Int) ([]byte, error) { return []byte(`{"mercuryEnabled":true}`), nil }, - CheckCallbackFn: func(opts *bind.CallOpts, id *big.Int, values [][]byte, extraData []byte) (iregistry21.CheckCallback, error) { - return iregistry21.CheckCallback{}, nil + CheckCallbackFn: func(opts *bind.CallOpts, id *big.Int, values [][]byte, extraData []byte) (autov2common.CheckCallback, error) { + return autov2common.CheckCallback{}, nil }, }, }, @@ -467,8 +467,8 @@ func TestStreams_AllowedToUseMercury(t *testing.T) { GetUpkeepPrivilegeConfigFn: func(opts *bind.CallOpts, upkeepId *big.Int) ([]byte, error) { return nil, nil }, - CheckCallbackFn: func(opts *bind.CallOpts, id *big.Int, values [][]byte, extraData []byte) (iregistry21.CheckCallback, error) { - return iregistry21.CheckCallback{}, nil + CheckCallbackFn: func(opts *bind.CallOpts, id *big.Int, values [][]byte, extraData []byte) (autov2common.CheckCallback, error) { + return autov2common.CheckCallback{}, nil }, }, }, @@ -479,8 +479,8 @@ func TestStreams_AllowedToUseMercury(t *testing.T) { GetUpkeepPrivilegeConfigFn: func(opts *bind.CallOpts, upkeepId *big.Int) ([]byte, error) { return []byte(`{"mercuryEnabled":false}`), nil }, - CheckCallbackFn: func(opts *bind.CallOpts, id *big.Int, values [][]byte, extraData []byte) (iregistry21.CheckCallback, error) { - return iregistry21.CheckCallback{}, nil + CheckCallbackFn: func(opts *bind.CallOpts, id *big.Int, values [][]byte, extraData []byte) (autov2common.CheckCallback, error) { + return autov2common.CheckCallback{}, nil }, }, }, @@ -493,8 +493,8 @@ func TestStreams_AllowedToUseMercury(t *testing.T) { GetUpkeepPrivilegeConfigFn: func(opts *bind.CallOpts, upkeepId *big.Int) ([]byte, error) { return []byte(`{`), nil }, - CheckCallbackFn: func(opts *bind.CallOpts, id *big.Int, values [][]byte, extraData []byte) (iregistry21.CheckCallback, error) { - return iregistry21.CheckCallback{}, nil + CheckCallbackFn: func(opts *bind.CallOpts, id *big.Int, values [][]byte, extraData []byte) (autov2common.CheckCallback, error) { + return autov2common.CheckCallback{}, nil }, }, }, @@ -508,8 +508,8 @@ func TestStreams_AllowedToUseMercury(t *testing.T) { GetUpkeepPrivilegeConfigFn: func(opts *bind.CallOpts, upkeepId *big.Int) ([]byte, error) { return nil, errors.New("flaky RPC") }, - CheckCallbackFn: func(opts *bind.CallOpts, id *big.Int, values [][]byte, extraData []byte) (iregistry21.CheckCallback, error) { - return iregistry21.CheckCallback{}, nil + CheckCallbackFn: func(opts *bind.CallOpts, id *big.Int, values [][]byte, extraData []byte) (autov2common.CheckCallback, error) { + return autov2common.CheckCallback{}, nil }, }, }, @@ -522,8 +522,8 @@ func TestStreams_AllowedToUseMercury(t *testing.T) { GetUpkeepPrivilegeConfigFn: func(opts *bind.CallOpts, upkeepId *big.Int) ([]byte, error) { return []byte(``), nil }, - CheckCallbackFn: func(opts *bind.CallOpts, id *big.Int, values [][]byte, extraData []byte) (iregistry21.CheckCallback, error) { - return iregistry21.CheckCallback{}, nil + CheckCallbackFn: func(opts *bind.CallOpts, id *big.Int, values [][]byte, extraData []byte) (autov2common.CheckCallback, error) { + return autov2common.CheckCallback{}, nil }, }, }, @@ -660,8 +660,8 @@ func TestStreams_StreamsLookup(t *testing.T) { GetUpkeepPrivilegeConfigFn: func(opts *bind.CallOpts, upkeepId *big.Int) ([]byte, error) { return []byte(`{"mercuryEnabled":true}`), nil }, - CheckCallbackFn: func(opts *bind.CallOpts, id *big.Int, values [][]byte, extraData []byte) (iregistry21.CheckCallback, error) { - return iregistry21.CheckCallback{ + CheckCallbackFn: func(opts *bind.CallOpts, id *big.Int, values [][]byte, extraData []byte) (autov2common.CheckCallback, error) { + return autov2common.CheckCallback{ UpkeepNeeded: true, PerformData: hexutil.MustDecode("0x000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000006a000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000034000000000000000000000000000000000000000000000000000000000000002e000066dfcd1ed2d95b18c948dbc5bd64c687afe93e4ca7d663ddec14c20090ad80000000000000000000000000000000000000000000000000000000004555638000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000002200000000000000000000000000000000000000000000000000000000000000280010100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001204554482d5553442d415242495452554d2d544553544e455400000000000000000000000000000000000000000000000000000000000000000000000064f0d4a0000000000000000000000000000000000000000000000000000000269ecbb83b000000000000000000000000000000000000000000000000000000269e4a4e14000000000000000000000000000000000000000000000000000000269f4d0edb000000000000000000000000000000000000000000000000000000000243716664b42d20423a47fb13ad3098b49b37f667548e6745fff958b663afe25a845f6100000000000000000000000000000000000000000000000000000000024371660000000000000000000000000000000000000000000000000000000064f0d4a00000000000000000000000000000000000000000000000000000000000000002381e91cffa9502c20de1ddcee350db3f715a5ab449448e3184a5b03c682356c6e2115f20663b3731e373cf33465a96da26f2876debb548f281e62e48f64c374200000000000000000000000000000000000000000000000000000000000000027db99e34135098d4e0bb9ae143ec9cd72fd63150c6d0cc5b38f4aa1aa42408377e8fe8e5ac489c9b7f62ff5aa7b05d2e892e7dee4cac631097247969b3b03fa300000000000000000000000000000000000000000000000000000000000002e00006da4a86c4933dd4a87b21dd2871aea29f706bcde43c70039355ac5b664fb5000000000000000000000000000000000000000000000000000000000454d118000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000002200000000000000000000000000000000000000000000000000000000000000280000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001204254432d5553442d415242495452554d2d544553544e455400000000000000000000000000000000000000000000000000000000000000000000000064f0d4a0000000000000000000000000000000000000000000000000000002645f00877a000000000000000000000000000000000000000000000000000002645e1e1010000000000000000000000000000000000000000000000000000002645fe2fee4000000000000000000000000000000000000000000000000000000000243716664b42d20423a47fb13ad3098b49b37f667548e6745fff958b663afe25a845f6100000000000000000000000000000000000000000000000000000000024371660000000000000000000000000000000000000000000000000000000064f0d4a00000000000000000000000000000000000000000000000000000000000000002a0373c0bce7393673f819eb9681cac2773c2d718ce933eb858252195b17a9c832d7b0bee173c02c3c25fb65912b8b13b9302ede8423bab3544cb7a8928d5eb3600000000000000000000000000000000000000000000000000000000000000027d7b79d7646383a5dbf51edf14d53bd3ad0a9f3ca8affab3165e89d3ddce9cb17b58e892fafe4ecb24d2fde07c6a756029e752a5114c33c173df4e7d309adb4d00000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000064000000000000000000000000"), }, nil @@ -723,8 +723,8 @@ func TestStreams_StreamsLookup(t *testing.T) { GetUpkeepPrivilegeConfigFn: func(opts *bind.CallOpts, upkeepId *big.Int) ([]byte, error) { return []byte(`{"mercuryEnabled":true}`), nil }, - CheckCallbackFn: func(opts *bind.CallOpts, id *big.Int, values [][]byte, extraData []byte) (iregistry21.CheckCallback, error) { - return iregistry21.CheckCallback{ + CheckCallbackFn: func(opts *bind.CallOpts, id *big.Int, values [][]byte, extraData []byte) (autov2common.CheckCallback, error) { + return autov2common.CheckCallback{ UpkeepNeeded: true, PerformData: hexutil.MustDecode("0x000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000006a000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000034000000000000000000000000000000000000000000000000000000000000002e000066dfcd1ed2d95b18c948dbc5bd64c687afe93e4ca7d663ddec14c20090ad80000000000000000000000000000000000000000000000000000000004555638000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000002200000000000000000000000000000000000000000000000000000000000000280010100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001204554482d5553442d415242495452554d2d544553544e455400000000000000000000000000000000000000000000000000000000000000000000000064f0d4a0000000000000000000000000000000000000000000000000000000269ecbb83b000000000000000000000000000000000000000000000000000000269e4a4e14000000000000000000000000000000000000000000000000000000269f4d0edb000000000000000000000000000000000000000000000000000000000243716664b42d20423a47fb13ad3098b49b37f667548e6745fff958b663afe25a845f6100000000000000000000000000000000000000000000000000000000024371660000000000000000000000000000000000000000000000000000000064f0d4a00000000000000000000000000000000000000000000000000000000000000002381e91cffa9502c20de1ddcee350db3f715a5ab449448e3184a5b03c682356c6e2115f20663b3731e373cf33465a96da26f2876debb548f281e62e48f64c374200000000000000000000000000000000000000000000000000000000000000027db99e34135098d4e0bb9ae143ec9cd72fd63150c6d0cc5b38f4aa1aa42408377e8fe8e5ac489c9b7f62ff5aa7b05d2e892e7dee4cac631097247969b3b03fa300000000000000000000000000000000000000000000000000000000000002e00006da4a86c4933dd4a87b21dd2871aea29f706bcde43c70039355ac5b664fb5000000000000000000000000000000000000000000000000000000000454d118000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000002200000000000000000000000000000000000000000000000000000000000000280000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001204254432d5553442d415242495452554d2d544553544e455400000000000000000000000000000000000000000000000000000000000000000000000064f0d4a0000000000000000000000000000000000000000000000000000002645f00877a000000000000000000000000000000000000000000000000000002645e1e1010000000000000000000000000000000000000000000000000000002645fe2fee4000000000000000000000000000000000000000000000000000000000243716664b42d20423a47fb13ad3098b49b37f667548e6745fff958b663afe25a845f6100000000000000000000000000000000000000000000000000000000024371660000000000000000000000000000000000000000000000000000000064f0d4a00000000000000000000000000000000000000000000000000000000000000002a0373c0bce7393673f819eb9681cac2773c2d718ce933eb858252195b17a9c832d7b0bee173c02c3c25fb65912b8b13b9302ede8423bab3544cb7a8928d5eb3600000000000000000000000000000000000000000000000000000000000000027d7b79d7646383a5dbf51edf14d53bd3ad0a9f3ca8affab3165e89d3ddce9cb17b58e892fafe4ecb24d2fde07c6a756029e752a5114c33c173df4e7d309adb4d00000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000064000000000000000000000000"), }, nil @@ -769,8 +769,8 @@ func TestStreams_StreamsLookup(t *testing.T) { GetUpkeepPrivilegeConfigFn: func(opts *bind.CallOpts, upkeepId *big.Int) ([]byte, error) { return []byte(`{"mercuryEnabled":true}`), nil }, - CheckCallbackFn: func(opts *bind.CallOpts, id *big.Int, values [][]byte, extraData []byte) (iregistry21.CheckCallback, error) { - return iregistry21.CheckCallback{ + CheckCallbackFn: func(opts *bind.CallOpts, id *big.Int, values [][]byte, extraData []byte) (autov2common.CheckCallback, error) { + return autov2common.CheckCallback{ UpkeepNeeded: true, PerformData: hexutil.MustDecode("0x000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000006a000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000034000000000000000000000000000000000000000000000000000000000000002e000066dfcd1ed2d95b18c948dbc5bd64c687afe93e4ca7d663ddec14c20090ad80000000000000000000000000000000000000000000000000000000004555638000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000002200000000000000000000000000000000000000000000000000000000000000280010100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001204554482d5553442d415242495452554d2d544553544e455400000000000000000000000000000000000000000000000000000000000000000000000064f0d4a0000000000000000000000000000000000000000000000000000000269ecbb83b000000000000000000000000000000000000000000000000000000269e4a4e14000000000000000000000000000000000000000000000000000000269f4d0edb000000000000000000000000000000000000000000000000000000000243716664b42d20423a47fb13ad3098b49b37f667548e6745fff958b663afe25a845f6100000000000000000000000000000000000000000000000000000000024371660000000000000000000000000000000000000000000000000000000064f0d4a00000000000000000000000000000000000000000000000000000000000000002381e91cffa9502c20de1ddcee350db3f715a5ab449448e3184a5b03c682356c6e2115f20663b3731e373cf33465a96da26f2876debb548f281e62e48f64c374200000000000000000000000000000000000000000000000000000000000000027db99e34135098d4e0bb9ae143ec9cd72fd63150c6d0cc5b38f4aa1aa42408377e8fe8e5ac489c9b7f62ff5aa7b05d2e892e7dee4cac631097247969b3b03fa300000000000000000000000000000000000000000000000000000000000002e00006da4a86c4933dd4a87b21dd2871aea29f706bcde43c70039355ac5b664fb5000000000000000000000000000000000000000000000000000000000454d118000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000002200000000000000000000000000000000000000000000000000000000000000280000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001204254432d5553442d415242495452554d2d544553544e455400000000000000000000000000000000000000000000000000000000000000000000000064f0d4a0000000000000000000000000000000000000000000000000000002645f00877a000000000000000000000000000000000000000000000000000002645e1e1010000000000000000000000000000000000000000000000000000002645fe2fee4000000000000000000000000000000000000000000000000000000000243716664b42d20423a47fb13ad3098b49b37f667548e6745fff958b663afe25a845f6100000000000000000000000000000000000000000000000000000000024371660000000000000000000000000000000000000000000000000000000064f0d4a00000000000000000000000000000000000000000000000000000000000000002a0373c0bce7393673f819eb9681cac2773c2d718ce933eb858252195b17a9c832d7b0bee173c02c3c25fb65912b8b13b9302ede8423bab3544cb7a8928d5eb3600000000000000000000000000000000000000000000000000000000000000027d7b79d7646383a5dbf51edf14d53bd3ad0a9f3ca8affab3165e89d3ddce9cb17b58e892fafe4ecb24d2fde07c6a756029e752a5114c33c173df4e7d309adb4d00000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000064000000000000000000000000"), }, nil @@ -805,8 +805,8 @@ func TestStreams_StreamsLookup(t *testing.T) { GetUpkeepPrivilegeConfigFn: func(opts *bind.CallOpts, upkeepId *big.Int) ([]byte, error) { return []byte(`{"mercuryEnabled":true}`), nil }, - CheckCallbackFn: func(opts *bind.CallOpts, id *big.Int, values [][]byte, extraData []byte) (iregistry21.CheckCallback, error) { - return iregistry21.CheckCallback{ + CheckCallbackFn: func(opts *bind.CallOpts, id *big.Int, values [][]byte, extraData []byte) (autov2common.CheckCallback, error) { + return autov2common.CheckCallback{ UpkeepNeeded: true, PerformData: []byte{}, }, nil 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 1bb4cb2a325..0ef1fdd4038 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/mocks/registry.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/mocks/registry.go @@ -9,7 +9,7 @@ import ( generated "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated" - i_keeper_registry_master_wrapper_2_1 "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/i_keeper_registry_master_wrapper_2_1" + i_automation_v21_plus_common "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/i_automation_v21_plus_common" mock "github.com/stretchr/testify/mock" @@ -22,22 +22,22 @@ type Registry struct { } // CheckCallback provides a mock function with given fields: opts, id, values, extraData -func (_m *Registry) CheckCallback(opts *bind.CallOpts, id *big.Int, values [][]byte, extraData []byte) (i_keeper_registry_master_wrapper_2_1.CheckCallback, error) { +func (_m *Registry) CheckCallback(opts *bind.CallOpts, id *big.Int, values [][]byte, extraData []byte) (i_automation_v21_plus_common.CheckCallback, error) { ret := _m.Called(opts, id, values, extraData) if len(ret) == 0 { panic("no return value specified for CheckCallback") } - var r0 i_keeper_registry_master_wrapper_2_1.CheckCallback + var r0 i_automation_v21_plus_common.CheckCallback var r1 error - if rf, ok := ret.Get(0).(func(*bind.CallOpts, *big.Int, [][]byte, []byte) (i_keeper_registry_master_wrapper_2_1.CheckCallback, error)); ok { + if rf, ok := ret.Get(0).(func(*bind.CallOpts, *big.Int, [][]byte, []byte) (i_automation_v21_plus_common.CheckCallback, error)); ok { return rf(opts, id, values, extraData) } - if rf, ok := ret.Get(0).(func(*bind.CallOpts, *big.Int, [][]byte, []byte) i_keeper_registry_master_wrapper_2_1.CheckCallback); ok { + if rf, ok := ret.Get(0).(func(*bind.CallOpts, *big.Int, [][]byte, []byte) i_automation_v21_plus_common.CheckCallback); ok { r0 = rf(opts, id, values, extraData) } else { - r0 = ret.Get(0).(i_keeper_registry_master_wrapper_2_1.CheckCallback) + r0 = ret.Get(0).(i_automation_v21_plus_common.CheckCallback) } if rf, ok := ret.Get(1).(func(*bind.CallOpts, *big.Int, [][]byte, []byte) error); ok { @@ -80,22 +80,22 @@ func (_m *Registry) GetActiveUpkeepIDs(opts *bind.CallOpts, startIndex *big.Int, } // GetState provides a mock function with given fields: opts -func (_m *Registry) GetState(opts *bind.CallOpts) (i_keeper_registry_master_wrapper_2_1.GetState, error) { +func (_m *Registry) GetState(opts *bind.CallOpts) (i_automation_v21_plus_common.GetState, error) { ret := _m.Called(opts) if len(ret) == 0 { panic("no return value specified for GetState") } - var r0 i_keeper_registry_master_wrapper_2_1.GetState + var r0 i_automation_v21_plus_common.GetState var r1 error - if rf, ok := ret.Get(0).(func(*bind.CallOpts) (i_keeper_registry_master_wrapper_2_1.GetState, error)); ok { + if rf, ok := ret.Get(0).(func(*bind.CallOpts) (i_automation_v21_plus_common.GetState, error)); ok { return rf(opts) } - if rf, ok := ret.Get(0).(func(*bind.CallOpts) i_keeper_registry_master_wrapper_2_1.GetState); ok { + if rf, ok := ret.Get(0).(func(*bind.CallOpts) i_automation_v21_plus_common.GetState); ok { r0 = rf(opts) } else { - r0 = ret.Get(0).(i_keeper_registry_master_wrapper_2_1.GetState) + r0 = ret.Get(0).(i_automation_v21_plus_common.GetState) } if rf, ok := ret.Get(1).(func(*bind.CallOpts) error); ok { @@ -108,22 +108,22 @@ func (_m *Registry) GetState(opts *bind.CallOpts) (i_keeper_registry_master_wrap } // GetUpkeep provides a mock function with given fields: opts, id -func (_m *Registry) GetUpkeep(opts *bind.CallOpts, id *big.Int) (i_keeper_registry_master_wrapper_2_1.KeeperRegistryBase21UpkeepInfo, error) { +func (_m *Registry) GetUpkeep(opts *bind.CallOpts, id *big.Int) (i_automation_v21_plus_common.IAutomationV21PlusCommonUpkeepInfoLegacy, error) { ret := _m.Called(opts, id) if len(ret) == 0 { panic("no return value specified for GetUpkeep") } - var r0 i_keeper_registry_master_wrapper_2_1.KeeperRegistryBase21UpkeepInfo + var r0 i_automation_v21_plus_common.IAutomationV21PlusCommonUpkeepInfoLegacy var r1 error - if rf, ok := ret.Get(0).(func(*bind.CallOpts, *big.Int) (i_keeper_registry_master_wrapper_2_1.KeeperRegistryBase21UpkeepInfo, error)); ok { + if rf, ok := ret.Get(0).(func(*bind.CallOpts, *big.Int) (i_automation_v21_plus_common.IAutomationV21PlusCommonUpkeepInfoLegacy, error)); ok { return rf(opts, id) } - if rf, ok := ret.Get(0).(func(*bind.CallOpts, *big.Int) i_keeper_registry_master_wrapper_2_1.KeeperRegistryBase21UpkeepInfo); ok { + if rf, ok := ret.Get(0).(func(*bind.CallOpts, *big.Int) i_automation_v21_plus_common.IAutomationV21PlusCommonUpkeepInfoLegacy); ok { r0 = rf(opts, id) } else { - r0 = ret.Get(0).(i_keeper_registry_master_wrapper_2_1.KeeperRegistryBase21UpkeepInfo) + r0 = ret.Get(0).(i_automation_v21_plus_common.IAutomationV21PlusCommonUpkeepInfoLegacy) } if rf, ok := ret.Get(1).(func(*bind.CallOpts, *big.Int) error); ok { diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/registry.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/registry.go index fd7bfa91d7f..bb6bd3c0aff 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/registry.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/registry.go @@ -29,13 +29,12 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/chains/evm/logpoller" "github.com/smartcontractkit/chainlink/v2/core/chains/legacyevm" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated" - iregistry21 "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/i_keeper_registry_master_wrapper_2_1" + ac "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/i_automation_v21_plus_common" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/core" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/encoding" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/mercury/streams" - "github.com/smartcontractkit/chainlink/v2/core/services/pg" "github.com/smartcontractkit/chainlink/v2/core/utils" ) @@ -66,11 +65,11 @@ var ( //go:generate mockery --quiet --name Registry --output ./mocks/ --case=underscore type Registry interface { GetUpkeep(opts *bind.CallOpts, id *big.Int) (encoding.UpkeepInfo, error) - GetState(opts *bind.CallOpts) (iregistry21.GetState, error) + GetState(opts *bind.CallOpts) (ac.GetState, error) GetActiveUpkeepIDs(opts *bind.CallOpts, startIndex *big.Int, maxCount *big.Int) ([]*big.Int, error) GetUpkeepPrivilegeConfig(opts *bind.CallOpts, upkeepId *big.Int) ([]byte, error) GetUpkeepTriggerConfig(opts *bind.CallOpts, upkeepId *big.Int) ([]byte, error) - CheckCallback(opts *bind.CallOpts, id *big.Int, values [][]byte, extraData []byte) (iregistry21.CheckCallback, error) + CheckCallback(opts *bind.CallOpts, id *big.Int, values [][]byte, extraData []byte) (ac.CheckCallback, error) ParseLog(log coreTypes.Log) (generated.AbigenLog, error) } @@ -83,7 +82,7 @@ func NewEvmRegistry( lggr logger.Logger, addr common.Address, client legacyevm.Chain, - registry *iregistry21.IKeeperRegistryMaster, + registry *ac.IAutomationV21PlusCommon, mc *types.MercuryCredentials, al ActiveUpkeepList, logEventProvider logprovider.LogEventProvider, @@ -108,7 +107,7 @@ func NewEvmRegistry( client: client.Client(), logProcessed: make(map[string]bool), registry: registry, - abi: core.RegistryABI, + abi: core.AutoV2CommonABI, active: al, packer: packer, headFunc: func(ocr2keepers.BlockKey) {}, @@ -122,13 +121,13 @@ func NewEvmRegistry( } var upkeepStateEvents = []common.Hash{ - iregistry21.IKeeperRegistryMasterUpkeepRegistered{}.Topic(), // adds new upkeep id to registry - iregistry21.IKeeperRegistryMasterUpkeepReceived{}.Topic(), // adds new upkeep id to registry via migration - iregistry21.IKeeperRegistryMasterUpkeepUnpaused{}.Topic(), // unpauses an upkeep - iregistry21.IKeeperRegistryMasterUpkeepPaused{}.Topic(), // pauses an upkeep - iregistry21.IKeeperRegistryMasterUpkeepMigrated{}.Topic(), // migrated an upkeep, equivalent to cancel from this registry's perspective - iregistry21.IKeeperRegistryMasterUpkeepCanceled{}.Topic(), // cancels an upkeep - iregistry21.IKeeperRegistryMasterUpkeepTriggerConfigSet{}.Topic(), // trigger config was changed + ac.IAutomationV21PlusCommonUpkeepRegistered{}.Topic(), // adds new upkeep id to registry + ac.IAutomationV21PlusCommonUpkeepReceived{}.Topic(), // adds new upkeep id to registry via migration + ac.IAutomationV21PlusCommonUpkeepUnpaused{}.Topic(), // unpauses an upkeep + ac.IAutomationV21PlusCommonUpkeepPaused{}.Topic(), // pauses an upkeep + ac.IAutomationV21PlusCommonUpkeepMigrated{}.Topic(), // migrated an upkeep, equivalent to cancel from this registry's perspective + ac.IAutomationV21PlusCommonUpkeepCanceled{}.Topic(), // cancels an upkeep + ac.IAutomationV21PlusCommonUpkeepTriggerConfigSet{}.Topic(), // trigger config was changed } type MercuryConfig struct { @@ -304,7 +303,7 @@ func (r *EvmRegistry) refreshActiveUpkeeps() error { } } - _, err = r.logEventProvider.RefreshActiveUpkeeps(logTriggerIDs...) + _, err = r.logEventProvider.RefreshActiveUpkeeps(r.ctx, logTriggerIDs...) if err != nil { return fmt.Errorf("failed to refresh active upkeep ids in log event provider: %w", err) } @@ -339,11 +338,11 @@ func (r *EvmRegistry) refreshLogTriggerUpkeepsBatch(logTriggerIDs []*big.Int) er logTriggerHashes = append(logTriggerHashes, common.BigToHash(id)) } - unpausedLogs, err := r.poller.IndexedLogs(iregistry21.IKeeperRegistryMasterUpkeepUnpaused{}.Topic(), r.addr, 1, logTriggerHashes, logpoller.Confirmations(r.finalityDepth), pg.WithParentCtx(r.ctx)) + unpausedLogs, err := r.poller.IndexedLogs(r.ctx, ac.IAutomationV21PlusCommonUpkeepUnpaused{}.Topic(), r.addr, 1, logTriggerHashes, logpoller.Confirmations(r.finalityDepth)) if err != nil { return err } - configSetLogs, err := r.poller.IndexedLogs(iregistry21.IKeeperRegistryMasterUpkeepTriggerConfigSet{}.Topic(), r.addr, 1, logTriggerHashes, logpoller.Confirmations(r.finalityDepth), pg.WithParentCtx(r.ctx)) + configSetLogs, err := r.poller.IndexedLogs(r.ctx, ac.IAutomationV21PlusCommonUpkeepTriggerConfigSet{}.Topic(), r.addr, 1, logTriggerHashes, logpoller.Confirmations(r.finalityDepth)) if err != nil { return err } @@ -361,12 +360,12 @@ func (r *EvmRegistry) refreshLogTriggerUpkeepsBatch(logTriggerIDs []*big.Int) er return err } switch l := abilog.(type) { - case *iregistry21.IKeeperRegistryMasterUpkeepTriggerConfigSet: + case *ac.IAutomationV21PlusCommonUpkeepTriggerConfigSet: if rawLog.BlockNumber > configSetBlockNumbers[l.Id.String()] { configSetBlockNumbers[l.Id.String()] = rawLog.BlockNumber perUpkeepConfig[l.Id.String()] = l.TriggerConfig } - case *iregistry21.IKeeperRegistryMasterUpkeepUnpaused: + case *ac.IAutomationV21PlusCommonUpkeepUnpaused: if rawLog.BlockNumber > unpausedBlockNumbers[l.Id.String()] { unpausedBlockNumbers[l.Id.String()] = rawLog.BlockNumber } @@ -406,7 +405,7 @@ func (r *EvmRegistry) pollUpkeepStateLogs() error { var end logpoller.LogPollerBlock var err error - if end, err = r.poller.LatestBlock(pg.WithParentCtx(r.ctx)); err != nil { + if end, err = r.poller.LatestBlock(r.ctx); err != nil { return fmt.Errorf("%w: %s", ErrHeadNotAvailable, err) } @@ -422,11 +421,11 @@ func (r *EvmRegistry) pollUpkeepStateLogs() error { var logs []logpoller.Log if logs, err = r.poller.LogsWithSigs( + r.ctx, end.BlockNumber-logEventLookback, end.BlockNumber, upkeepStateEvents, r.addr, - pg.WithParentCtx(r.ctx), ); err != nil { return fmt.Errorf("%w: %s", ErrLogReadFailure, err) } @@ -456,40 +455,40 @@ func (r *EvmRegistry) processUpkeepStateLog(l logpoller.Log) error { } switch l := abilog.(type) { - case *iregistry21.IKeeperRegistryMasterUpkeepPaused: + case *ac.IAutomationV21PlusCommonUpkeepPaused: r.lggr.Debugf("KeeperRegistryUpkeepPaused log detected for upkeep ID %s in transaction %s", l.Id.String(), txHash) - r.removeFromActive(l.Id) - case *iregistry21.IKeeperRegistryMasterUpkeepCanceled: + r.removeFromActive(r.ctx, l.Id) + case *ac.IAutomationV21PlusCommonUpkeepCanceled: r.lggr.Debugf("KeeperRegistryUpkeepCanceled log detected for upkeep ID %s in transaction %s", l.Id.String(), txHash) - r.removeFromActive(l.Id) - case *iregistry21.IKeeperRegistryMasterUpkeepMigrated: - r.lggr.Debugf("KeeperRegistryMasterUpkeepMigrated log detected for upkeep ID %s in transaction %s", l.Id.String(), txHash) - r.removeFromActive(l.Id) - case *iregistry21.IKeeperRegistryMasterUpkeepTriggerConfigSet: + r.removeFromActive(r.ctx, l.Id) + case *ac.IAutomationV21PlusCommonUpkeepMigrated: + r.lggr.Debugf("AutomationV2CommonUpkeepMigrated log detected for upkeep ID %s in transaction %s", l.Id.String(), txHash) + r.removeFromActive(r.ctx, l.Id) + case *ac.IAutomationV21PlusCommonUpkeepTriggerConfigSet: r.lggr.Debugf("KeeperRegistryUpkeepTriggerConfigSet log detected for upkeep ID %s in transaction %s", l.Id.String(), txHash) if err := r.updateTriggerConfig(l.Id, l.TriggerConfig, rawLog.BlockNumber); err != nil { - r.lggr.Warnf("failed to update trigger config upon KeeperRegistryMasterUpkeepTriggerConfigSet for upkeep ID %s: %s", l.Id.String(), err) + r.lggr.Warnf("failed to update trigger config upon AutomationV2CommonUpkeepTriggerConfigSet for upkeep ID %s: %s", l.Id.String(), err) } - case *iregistry21.IKeeperRegistryMasterUpkeepRegistered: + case *ac.IAutomationV21PlusCommonUpkeepRegistered: uid := &ocr2keepers.UpkeepIdentifier{} uid.FromBigInt(l.Id) trigger := core.GetUpkeepType(*uid) r.lggr.Debugf("KeeperRegistryUpkeepRegistered log detected for upkeep ID %s (trigger=%d) in transaction %s", l.Id.String(), trigger, txHash) r.active.Add(l.Id) if err := r.updateTriggerConfig(l.Id, nil, rawLog.BlockNumber); err != nil { - r.lggr.Warnf("failed to update trigger config upon KeeperRegistryMasterUpkeepRegistered for upkeep ID %s: %s", err) + r.lggr.Warnf("failed to update trigger config upon AutomationV2CommonUpkeepRegistered for upkeep ID %s: %s", err) } - case *iregistry21.IKeeperRegistryMasterUpkeepReceived: + case *ac.IAutomationV21PlusCommonUpkeepReceived: r.lggr.Debugf("KeeperRegistryUpkeepReceived log detected for upkeep ID %s in transaction %s", l.Id.String(), txHash) r.active.Add(l.Id) if err := r.updateTriggerConfig(l.Id, nil, rawLog.BlockNumber); err != nil { - r.lggr.Warnf("failed to update trigger config upon KeeperRegistryMasterUpkeepReceived for upkeep ID %s: %s", err) + r.lggr.Warnf("failed to update trigger config upon AutomationV2CommonUpkeepReceived for upkeep ID %s: %s", err) } - case *iregistry21.IKeeperRegistryMasterUpkeepUnpaused: + case *ac.IAutomationV21PlusCommonUpkeepUnpaused: r.lggr.Debugf("KeeperRegistryUpkeepUnpaused log detected for upkeep ID %s in transaction %s", l.Id.String(), txHash) r.active.Add(l.Id) if err := r.updateTriggerConfig(l.Id, nil, rawLog.BlockNumber); err != nil { - r.lggr.Warnf("failed to update trigger config upon KeeperRegistryMasterUpkeepUnpaused for upkeep ID %s: %s", err) + r.lggr.Warnf("failed to update trigger config upon AutomationV2CommonUpkeepUnpaused for upkeep ID %s: %s", err) } default: r.lggr.Debugf("Unknown log detected for log %+v in transaction %s", l, txHash) @@ -505,7 +504,7 @@ func RegistryUpkeepFilterName(addr common.Address) string { // registerEvents registers upkeep state events from keeper registry on log poller func (r *EvmRegistry) registerEvents(_ uint64, addr common.Address) error { // Add log filters for the log poller so that it can poll and find the logs that we need - return r.poller.RegisterFilter(logpoller.Filter{ + return r.poller.RegisterFilter(r.ctx, logpoller.Filter{ Name: RegistryUpkeepFilterName(addr), EventSigs: upkeepStateEvents, Addresses: []common.Address{addr}, @@ -513,7 +512,7 @@ func (r *EvmRegistry) registerEvents(_ uint64, addr common.Address) error { } // removeFromActive removes an upkeepID from active list and unregisters the log filter for log upkeeps -func (r *EvmRegistry) removeFromActive(id *big.Int) { +func (r *EvmRegistry) removeFromActive(ctx context.Context, id *big.Int) { r.active.Remove(id) uid := &ocr2keepers.UpkeepIdentifier{} @@ -521,7 +520,7 @@ func (r *EvmRegistry) removeFromActive(id *big.Int) { trigger := core.GetUpkeepType(*uid) switch trigger { case types2.LogTrigger: - if err := r.logEventProvider.UnregisterFilter(id); err != nil { + if err := r.logEventProvider.UnregisterFilter(ctx, id); err != nil { r.lggr.Warnw("failed to unregister log filter", "upkeepID", id.String()) } r.lggr.Debugw("unregistered log filter", "upkeepID", id.String()) diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/registry_check_pipeline_test.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/registry_check_pipeline_test.go index e6b61be8d0a..330da44b71b 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/registry_check_pipeline_test.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/registry_check_pipeline_test.go @@ -25,14 +25,13 @@ import ( evmClientMocks "github.com/smartcontractkit/chainlink/v2/core/chains/evm/client/mocks" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/logpoller" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/i_keeper_registry_master_wrapper_2_1" + ac "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/i_automation_v21_plus_common" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/streams_lookup_compatible_interface" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/core" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/encoding" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/mocks" - "github.com/smartcontractkit/chainlink/v2/core/services/pg" ) func TestRegistry_GetBlockAndUpkeepId(t *testing.T) { @@ -109,7 +108,7 @@ func TestRegistry_VerifyCheckBlock(t *testing.T) { WorkID: "work", }, poller: &mockLogPoller{ - GetBlocksRangeFn: func(ctx context.Context, numbers []uint64, qopts ...pg.QOpt) ([]logpoller.LogPollerBlock, error) { + GetBlocksRangeFn: func(ctx context.Context, numbers []uint64) ([]logpoller.LogPollerBlock, error) { return []logpoller.LogPollerBlock{ { BlockHash: common.HexToHash("abcdef"), @@ -133,7 +132,7 @@ func TestRegistry_VerifyCheckBlock(t *testing.T) { WorkID: "work", }, poller: &mockLogPoller{ - GetBlocksRangeFn: func(ctx context.Context, numbers []uint64, qopts ...pg.QOpt) ([]logpoller.LogPollerBlock, error) { + GetBlocksRangeFn: func(ctx context.Context, numbers []uint64) ([]logpoller.LogPollerBlock, error) { return []logpoller.LogPollerBlock{ { BlockHash: common.HexToHash("0x5bff03de234fe771ac0d685f9ee0fb0b757ea02ec9e6f10e8e2ee806db1b6b83"), @@ -157,7 +156,7 @@ func TestRegistry_VerifyCheckBlock(t *testing.T) { WorkID: "work", }, poller: &mockLogPoller{ - GetBlocksRangeFn: func(ctx context.Context, numbers []uint64, qopts ...pg.QOpt) ([]logpoller.LogPollerBlock, error) { + GetBlocksRangeFn: func(ctx context.Context, numbers []uint64) ([]logpoller.LogPollerBlock, error) { return []logpoller.LogPollerBlock{ { BlockHash: common.HexToHash("0xcba5cf9e2bb32373c76015384e1098912d9510a72481c78057fcb088209167de"), @@ -215,16 +214,16 @@ func TestRegistry_VerifyCheckBlock(t *testing.T) { type mockLogPoller struct { logpoller.LogPoller - GetBlocksRangeFn func(ctx context.Context, numbers []uint64, qopts ...pg.QOpt) ([]logpoller.LogPollerBlock, error) - IndexedLogsFn func(eventSig common.Hash, address common.Address, topicIndex int, topicValues []common.Hash, confs logpoller.Confirmations, qopts ...pg.QOpt) ([]logpoller.Log, error) + GetBlocksRangeFn func(ctx context.Context, numbers []uint64) ([]logpoller.LogPollerBlock, error) + IndexedLogsFn func(ctx context.Context, eventSig common.Hash, address common.Address, topicIndex int, topicValues []common.Hash, confs logpoller.Confirmations) ([]logpoller.Log, error) } -func (p *mockLogPoller) GetBlocksRange(ctx context.Context, numbers []uint64, qopts ...pg.QOpt) ([]logpoller.LogPollerBlock, error) { - return p.GetBlocksRangeFn(ctx, numbers, qopts...) +func (p *mockLogPoller) GetBlocksRange(ctx context.Context, numbers []uint64) ([]logpoller.LogPollerBlock, error) { + return p.GetBlocksRangeFn(ctx, numbers) } -func (p *mockLogPoller) IndexedLogs(eventSig common.Hash, address common.Address, topicIndex int, topicValues []common.Hash, confs logpoller.Confirmations, qopts ...pg.QOpt) ([]logpoller.Log, error) { - return p.IndexedLogsFn(eventSig, address, topicIndex, topicValues, confs, qopts...) +func (p *mockLogPoller) IndexedLogs(ctx context.Context, eventSig common.Hash, address common.Address, topicIndex int, topicValues []common.Hash, confs logpoller.Confirmations) ([]logpoller.Log, error) { + return p.IndexedLogsFn(ctx, eventSig, address, topicIndex, topicValues, confs) } func TestRegistry_VerifyLogExists(t *testing.T) { @@ -486,7 +485,7 @@ func TestRegistry_CheckUpkeeps(t *testing.T) { }, receipts: map[string]*types.Receipt{}, poller: &mockLogPoller{ - GetBlocksRangeFn: func(ctx context.Context, numbers []uint64, qopts ...pg.QOpt) ([]logpoller.LogPollerBlock, error) { + GetBlocksRangeFn: func(ctx context.Context, numbers []uint64) ([]logpoller.LogPollerBlock, error) { return []logpoller.LogPollerBlock{ { BlockHash: common.HexToHash("0xcba5cf9e2bb32373c76015384e1098912d9510a72481c78057fcb088209167de"), @@ -663,7 +662,7 @@ func TestRegistry_SimulatePerformUpkeeps(t *testing.T) { func setupEVMRegistry(t *testing.T) *EvmRegistry { lggr := logger.TestLogger(t) addr := common.HexToAddress("0x6cA639822c6C241Fa9A7A6b5032F6F7F1C513CAD") - keeperRegistryABI, err := abi.JSON(strings.NewReader(i_keeper_registry_master_wrapper_2_1.IKeeperRegistryMasterABI)) + keeperRegistryABI, err := abi.JSON(strings.NewReader(ac.IAutomationV21PlusCommonABI)) require.Nil(t, err, "need registry abi") streamsLookupCompatibleABI, err := abi.JSON(strings.NewReader(streams_lookup_compatible_interface.StreamsLookupCompatibleInterfaceABI)) require.Nil(t, err, "need mercury abi") diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/registry_test.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/registry_test.go index dc48c3d75f6..024c5e79925 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/registry_test.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/registry_test.go @@ -21,13 +21,12 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/chains/evm/logpoller/mocks" ubig "github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils/big" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/automation_utils_2_1" - iregistry21 "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/i_keeper_registry_master_wrapper_2_1" + ac "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/automation_compatible_utils" + autov2common "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/i_automation_v21_plus_common" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/core" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/encoding" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider" - "github.com/smartcontractkit/chainlink/v2/core/services/pg" ) func TestPollLogs(t *testing.T) { @@ -151,7 +150,7 @@ func TestPollLogs(t *testing.T) { if test.LogsWithSigs != nil { fc := test.LogsWithSigs - mp.On("LogsWithSigs", fc.InputStart, fc.InputEnd, upkeepStateEvents, test.Address, mock.Anything).Return(fc.OutputLogs, fc.OutputErr) + mp.On("LogsWithSigs", mock.Anything, fc.InputStart, fc.InputEnd, upkeepStateEvents, test.Address).Return(fc.OutputLogs, fc.OutputErr) } rg := &EvmRegistry{ @@ -209,20 +208,20 @@ func TestRegistry_refreshLogTriggerUpkeeps(t *testing.T) { wantErr error }{ { - name: "an error is returned when fetching indexed logs for IKeeperRegistryMasterUpkeepUnpaused errors", + name: "an error is returned when fetching indexed logs for IAutomationV21PlusCommonUpkeepUnpaused errors", ids: []*big.Int{ core.GenUpkeepID(types2.LogTrigger, "abc").BigInt(), }, logEventProvider: &mockLogEventProvider{ - RefreshActiveUpkeepsFn: func(ids ...*big.Int) ([]*big.Int, error) { + RefreshActiveUpkeepsFn: func(ctx context.Context, ids ...*big.Int) ([]*big.Int, error) { // of the ids specified in the test, only one is a valid log trigger upkeep assert.Equal(t, 1, len(ids)) return ids, nil }, }, poller: &mockLogPoller{ - IndexedLogsFn: func(eventSig common.Hash, address common.Address, topicIndex int, topicValues []common.Hash, confs logpoller.Confirmations, qopts ...pg.QOpt) ([]logpoller.Log, error) { - if eventSig == (iregistry21.IKeeperRegistryMasterUpkeepUnpaused{}.Topic()) { + IndexedLogsFn: func(ctx context.Context, eventSig common.Hash, address common.Address, topicIndex int, topicValues []common.Hash, confs logpoller.Confirmations) ([]logpoller.Log, error) { + if eventSig == (autov2common.IAutomationV21PlusCommonUpkeepUnpaused{}.Topic()) { return nil, errors.New("indexed logs boom") } return nil, nil @@ -232,22 +231,22 @@ func TestRegistry_refreshLogTriggerUpkeeps(t *testing.T) { wantErr: errors.New("indexed logs boom"), }, { - name: "an error is returned when fetching indexed logs for IKeeperRegistryMasterUpkeepTriggerConfigSet errors", + name: "an error is returned when fetching indexed logs for IAutomationV21PlusCommonUpkeepTriggerConfigSet errors", ids: []*big.Int{ core.GenUpkeepID(types2.LogTrigger, "abc").BigInt(), core.GenUpkeepID(types2.ConditionTrigger, "abc").BigInt(), big.NewInt(-1), }, logEventProvider: &mockLogEventProvider{ - RefreshActiveUpkeepsFn: func(ids ...*big.Int) ([]*big.Int, error) { + RefreshActiveUpkeepsFn: func(ctx context.Context, ids ...*big.Int) ([]*big.Int, error) { // of the ids specified in the test, only one is a valid log trigger upkeep assert.Equal(t, 1, len(ids)) return ids, nil }, }, poller: &mockLogPoller{ - IndexedLogsFn: func(eventSig common.Hash, address common.Address, topicIndex int, topicValues []common.Hash, confs logpoller.Confirmations, qopts ...pg.QOpt) ([]logpoller.Log, error) { - if eventSig == (iregistry21.IKeeperRegistryMasterUpkeepTriggerConfigSet{}.Topic()) { + IndexedLogsFn: func(ctx context.Context, eventSig common.Hash, address common.Address, topicIndex int, topicValues []common.Hash, confs logpoller.Confirmations) ([]logpoller.Log, error) { + if eventSig == (autov2common.IAutomationV21PlusCommonUpkeepTriggerConfigSet{}.Topic()) { return nil, errors.New("indexed logs boom") } return nil, nil @@ -264,14 +263,14 @@ func TestRegistry_refreshLogTriggerUpkeeps(t *testing.T) { big.NewInt(-1), }, logEventProvider: &mockLogEventProvider{ - RefreshActiveUpkeepsFn: func(ids ...*big.Int) ([]*big.Int, error) { + RefreshActiveUpkeepsFn: func(ctx context.Context, ids ...*big.Int) ([]*big.Int, error) { // of the ids specified in the test, only one is a valid log trigger upkeep assert.Equal(t, 1, len(ids)) return ids, nil }, }, poller: &mockLogPoller{ - IndexedLogsFn: func(eventSig common.Hash, address common.Address, topicIndex int, topicValues []common.Hash, confs logpoller.Confirmations, qopts ...pg.QOpt) ([]logpoller.Log, error) { + IndexedLogsFn: func(ctx context.Context, eventSig common.Hash, address common.Address, topicIndex int, topicValues []common.Hash, confs logpoller.Confirmations) ([]logpoller.Log, error) { return []logpoller.Log{ {}, }, nil @@ -293,17 +292,17 @@ func TestRegistry_refreshLogTriggerUpkeeps(t *testing.T) { big.NewInt(-1), }, logEventProvider: &mockLogEventProvider{ - RefreshActiveUpkeepsFn: func(ids ...*big.Int) ([]*big.Int, error) { + RefreshActiveUpkeepsFn: func(ctx context.Context, ids ...*big.Int) ([]*big.Int, error) { // of the ids specified in the test, only one is a valid log trigger upkeep assert.Equal(t, 1, len(ids)) return ids, nil }, - RegisterFilterFn: func(opts logprovider.FilterOptions) error { + RegisterFilterFn: func(ctx context.Context, opts logprovider.FilterOptions) error { return errors.New("register filter boom") }, }, poller: &mockLogPoller{ - IndexedLogsFn: func(eventSig common.Hash, address common.Address, topicIndex int, topicValues []common.Hash, confs logpoller.Confirmations, qopts ...pg.QOpt) ([]logpoller.Log, error) { + IndexedLogsFn: func(ctx context.Context, eventSig common.Hash, address common.Address, topicIndex int, topicValues []common.Hash, confs logpoller.Confirmations) ([]logpoller.Log, error) { return []logpoller.Log{ { BlockNumber: 1, @@ -317,12 +316,12 @@ func TestRegistry_refreshLogTriggerUpkeeps(t *testing.T) { registry: &mockRegistry{ ParseLogFn: func(log coreTypes.Log) (generated.AbigenLog, error) { if log.BlockNumber == 1 { - return &iregistry21.IKeeperRegistryMasterUpkeepTriggerConfigSet{ + return &autov2common.IAutomationV21PlusCommonUpkeepTriggerConfigSet{ TriggerConfig: []byte{1, 2, 3}, Id: core.GenUpkeepID(types2.LogTrigger, "abc").BigInt(), }, nil } - return &iregistry21.IKeeperRegistryMasterUpkeepUnpaused{ + return &autov2common.IAutomationV21PlusCommonUpkeepUnpaused{ Id: core.GenUpkeepID(types2.LogTrigger, "abc").BigInt(), }, nil }, @@ -331,8 +330,8 @@ func TestRegistry_refreshLogTriggerUpkeeps(t *testing.T) { }, }, packer: &mockPacker{ - UnpackLogTriggerConfigFn: func(raw []byte) (automation_utils_2_1.LogTriggerConfig, error) { - return automation_utils_2_1.LogTriggerConfig{}, nil + UnpackLogTriggerConfigFn: func(raw []byte) (ac.IAutomationV21PlusCommonLogTriggerConfig, error) { + return ac.IAutomationV21PlusCommonLogTriggerConfig{}, nil }, }, expectsErr: true, @@ -347,17 +346,17 @@ func TestRegistry_refreshLogTriggerUpkeeps(t *testing.T) { big.NewInt(-1), }, logEventProvider: &mockLogEventProvider{ - RefreshActiveUpkeepsFn: func(ids ...*big.Int) ([]*big.Int, error) { + RefreshActiveUpkeepsFn: func(ctx context.Context, ids ...*big.Int) ([]*big.Int, error) { // of the ids specified in the test, only two are a valid log trigger upkeep assert.Equal(t, 2, len(ids)) return ids, nil }, - RegisterFilterFn: func(opts logprovider.FilterOptions) error { + RegisterFilterFn: func(ctx context.Context, opts logprovider.FilterOptions) error { return nil }, }, poller: &mockLogPoller{ - IndexedLogsFn: func(eventSig common.Hash, address common.Address, topicIndex int, topicValues []common.Hash, confs logpoller.Confirmations, qopts ...pg.QOpt) ([]logpoller.Log, error) { + IndexedLogsFn: func(ctx context.Context, eventSig common.Hash, address common.Address, topicIndex int, topicValues []common.Hash, confs logpoller.Confirmations) ([]logpoller.Log, error) { return []logpoller.Log{ { BlockNumber: 2, @@ -371,12 +370,12 @@ func TestRegistry_refreshLogTriggerUpkeeps(t *testing.T) { registry: &mockRegistry{ ParseLogFn: func(log coreTypes.Log) (generated.AbigenLog, error) { if log.BlockNumber == 1 { - return &iregistry21.IKeeperRegistryMasterUpkeepTriggerConfigSet{ + return &autov2common.IAutomationV21PlusCommonUpkeepTriggerConfigSet{ Id: core.GenUpkeepID(types2.LogTrigger, "abc").BigInt(), TriggerConfig: []byte{1, 2, 3}, }, nil } - return &iregistry21.IKeeperRegistryMasterUpkeepUnpaused{ + return &autov2common.IAutomationV21PlusCommonUpkeepUnpaused{ Id: core.GenUpkeepID(types2.LogTrigger, "def").BigInt(), }, nil }, @@ -385,8 +384,8 @@ func TestRegistry_refreshLogTriggerUpkeeps(t *testing.T) { }, }, packer: &mockPacker{ - UnpackLogTriggerConfigFn: func(raw []byte) (automation_utils_2_1.LogTriggerConfig, error) { - return automation_utils_2_1.LogTriggerConfig{}, nil + UnpackLogTriggerConfigFn: func(raw []byte) (ac.IAutomationV21PlusCommonLogTriggerConfig, error) { + return ac.IAutomationV21PlusCommonLogTriggerConfig{}, nil }, }, }, @@ -400,16 +399,16 @@ func TestRegistry_refreshLogTriggerUpkeeps(t *testing.T) { return res }(), logEventProvider: &mockLogEventProvider{ - RefreshActiveUpkeepsFn: func(ids ...*big.Int) ([]*big.Int, error) { + RefreshActiveUpkeepsFn: func(ctx context.Context, ids ...*big.Int) ([]*big.Int, error) { assert.Equal(t, logTriggerRefreshBatchSize, len(ids)) return ids, nil }, - RegisterFilterFn: func(opts logprovider.FilterOptions) error { + RegisterFilterFn: func(ctx context.Context, opts logprovider.FilterOptions) error { return nil }, }, poller: &mockLogPoller{ - IndexedLogsFn: func(eventSig common.Hash, address common.Address, topicIndex int, topicValues []common.Hash, confs logpoller.Confirmations, qopts ...pg.QOpt) ([]logpoller.Log, error) { + IndexedLogsFn: func(ctx context.Context, eventSig common.Hash, address common.Address, topicIndex int, topicValues []common.Hash, confs logpoller.Confirmations) ([]logpoller.Log, error) { return []logpoller.Log{ { BlockNumber: 2, @@ -423,12 +422,12 @@ func TestRegistry_refreshLogTriggerUpkeeps(t *testing.T) { registry: &mockRegistry{ ParseLogFn: func(log coreTypes.Log) (generated.AbigenLog, error) { if log.BlockNumber == 1 { - return &iregistry21.IKeeperRegistryMasterUpkeepTriggerConfigSet{ + return &autov2common.IAutomationV21PlusCommonUpkeepTriggerConfigSet{ Id: core.GenUpkeepID(types2.LogTrigger, "abc").BigInt(), TriggerConfig: []byte{1, 2, 3}, }, nil } - return &iregistry21.IKeeperRegistryMasterUpkeepUnpaused{ + return &autov2common.IAutomationV21PlusCommonUpkeepUnpaused{ Id: core.GenUpkeepID(types2.LogTrigger, "def").BigInt(), }, nil }, @@ -437,8 +436,8 @@ func TestRegistry_refreshLogTriggerUpkeeps(t *testing.T) { }, }, packer: &mockPacker{ - UnpackLogTriggerConfigFn: func(raw []byte) (automation_utils_2_1.LogTriggerConfig, error) { - return automation_utils_2_1.LogTriggerConfig{}, nil + UnpackLogTriggerConfigFn: func(raw []byte) (ac.IAutomationV21PlusCommonLogTriggerConfig, error) { + return ac.IAutomationV21PlusCommonLogTriggerConfig{}, nil }, }, }, @@ -452,18 +451,18 @@ func TestRegistry_refreshLogTriggerUpkeeps(t *testing.T) { return res }(), logEventProvider: &mockLogEventProvider{ - RefreshActiveUpkeepsFn: func(ids ...*big.Int) ([]*big.Int, error) { + RefreshActiveUpkeepsFn: func(ctx context.Context, ids ...*big.Int) ([]*big.Int, error) { if len(ids) != logTriggerRefreshBatchSize { assert.Equal(t, 3, len(ids)) } return ids, nil }, - RegisterFilterFn: func(opts logprovider.FilterOptions) error { + RegisterFilterFn: func(ctx context.Context, opts logprovider.FilterOptions) error { return nil }, }, poller: &mockLogPoller{ - IndexedLogsFn: func(eventSig common.Hash, address common.Address, topicIndex int, topicValues []common.Hash, confs logpoller.Confirmations, qopts ...pg.QOpt) ([]logpoller.Log, error) { + IndexedLogsFn: func(ctx context.Context, eventSig common.Hash, address common.Address, topicIndex int, topicValues []common.Hash, confs logpoller.Confirmations) ([]logpoller.Log, error) { return []logpoller.Log{ { BlockNumber: 2, @@ -477,12 +476,12 @@ func TestRegistry_refreshLogTriggerUpkeeps(t *testing.T) { registry: &mockRegistry{ ParseLogFn: func(log coreTypes.Log) (generated.AbigenLog, error) { if log.BlockNumber == 1 { - return &iregistry21.IKeeperRegistryMasterUpkeepTriggerConfigSet{ + return &autov2common.IAutomationV21PlusCommonUpkeepTriggerConfigSet{ Id: core.GenUpkeepID(types2.LogTrigger, "abc").BigInt(), TriggerConfig: []byte{1, 2, 3}, }, nil } - return &iregistry21.IKeeperRegistryMasterUpkeepUnpaused{ + return &autov2common.IAutomationV21PlusCommonUpkeepUnpaused{ Id: core.GenUpkeepID(types2.LogTrigger, "def").BigInt(), }, nil }, @@ -491,8 +490,8 @@ func TestRegistry_refreshLogTriggerUpkeeps(t *testing.T) { }, }, packer: &mockPacker{ - UnpackLogTriggerConfigFn: func(raw []byte) (automation_utils_2_1.LogTriggerConfig, error) { - return automation_utils_2_1.LogTriggerConfig{}, nil + UnpackLogTriggerConfigFn: func(raw []byte) (ac.IAutomationV21PlusCommonLogTriggerConfig, error) { + return ac.IAutomationV21PlusCommonLogTriggerConfig{}, nil }, }, }, @@ -528,16 +527,16 @@ func TestRegistry_refreshLogTriggerUpkeeps(t *testing.T) { type mockLogEventProvider struct { logprovider.LogEventProvider - RefreshActiveUpkeepsFn func(ids ...*big.Int) ([]*big.Int, error) - RegisterFilterFn func(opts logprovider.FilterOptions) error + RefreshActiveUpkeepsFn func(ctx context.Context, ids ...*big.Int) ([]*big.Int, error) + RegisterFilterFn func(ctx context.Context, opts logprovider.FilterOptions) error } -func (p *mockLogEventProvider) RefreshActiveUpkeeps(ids ...*big.Int) ([]*big.Int, error) { - return p.RefreshActiveUpkeepsFn(ids...) +func (p *mockLogEventProvider) RefreshActiveUpkeeps(ctx context.Context, ids ...*big.Int) ([]*big.Int, error) { + return p.RefreshActiveUpkeepsFn(ctx, ids...) } func (p *mockLogEventProvider) RegisterFilter(ctx context.Context, opts logprovider.FilterOptions) error { - return p.RegisterFilterFn(opts) + return p.RegisterFilterFn(ctx, opts) } type mockRegistry struct { @@ -556,9 +555,9 @@ func (r *mockRegistry) GetUpkeepTriggerConfig(opts *bind.CallOpts, upkeepId *big type mockPacker struct { encoding.Packer - UnpackLogTriggerConfigFn func(raw []byte) (automation_utils_2_1.LogTriggerConfig, error) + UnpackLogTriggerConfigFn func(raw []byte) (ac.IAutomationV21PlusCommonLogTriggerConfig, error) } -func (p *mockPacker) UnpackLogTriggerConfig(raw []byte) (automation_utils_2_1.LogTriggerConfig, error) { +func (p *mockPacker) UnpackLogTriggerConfig(raw []byte) (ac.IAutomationV21PlusCommonLogTriggerConfig, error) { return p.UnpackLogTriggerConfigFn(raw) } diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/transmit/encoding.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/transmit/encoding.go index 89dbb52c0e3..c77e01dc847 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/transmit/encoding.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/transmit/encoding.go @@ -7,11 +7,11 @@ import ( ocr2keepers "github.com/smartcontractkit/chainlink-common/pkg/types/automation" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/logpoller" - iregistry21 "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/i_keeper_registry_master_wrapper_2_1" + ac "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/i_automation_v21_plus_common" ) // defaultLogParser parses logs from the registry contract -func defaultLogParser(registry *iregistry21.IKeeperRegistryMaster, log logpoller.Log) (transmitEventLog, error) { +func defaultLogParser(registry *ac.IAutomationV21PlusCommon, log logpoller.Log) (transmitEventLog, error) { rawLog := log.ToGethLog() abilog, err := registry.ParseLog(rawLog) if err != nil { @@ -19,7 +19,7 @@ func defaultLogParser(registry *iregistry21.IKeeperRegistryMaster, log logpoller } switch l := abilog.(type) { - case *iregistry21.IKeeperRegistryMasterUpkeepPerformed: + case *ac.IAutomationV21PlusCommonUpkeepPerformed: if l == nil { break } @@ -27,7 +27,7 @@ func defaultLogParser(registry *iregistry21.IKeeperRegistryMaster, log logpoller Log: log, Performed: l, }, nil - case *iregistry21.IKeeperRegistryMasterReorgedUpkeepReport: + case *ac.IAutomationV21PlusCommonReorgedUpkeepReport: if l == nil { break } @@ -35,7 +35,7 @@ func defaultLogParser(registry *iregistry21.IKeeperRegistryMaster, log logpoller Log: log, Reorged: l, }, nil - case *iregistry21.IKeeperRegistryMasterStaleUpkeepReport: + case *ac.IAutomationV21PlusCommonStaleUpkeepReport: if l == nil { break } @@ -43,7 +43,7 @@ func defaultLogParser(registry *iregistry21.IKeeperRegistryMaster, log logpoller Log: log, Stale: l, }, nil - case *iregistry21.IKeeperRegistryMasterInsufficientFundsUpkeepReport: + case *ac.IAutomationV21PlusCommonInsufficientFundsUpkeepReport: if l == nil { break } @@ -60,10 +60,10 @@ func defaultLogParser(registry *iregistry21.IKeeperRegistryMaster, log logpoller // transmitEventLog is a wrapper around logpoller.Log and the parsed log type transmitEventLog struct { logpoller.Log - Performed *iregistry21.IKeeperRegistryMasterUpkeepPerformed - Stale *iregistry21.IKeeperRegistryMasterStaleUpkeepReport - Reorged *iregistry21.IKeeperRegistryMasterReorgedUpkeepReport - InsufficientFunds *iregistry21.IKeeperRegistryMasterInsufficientFundsUpkeepReport + Performed *ac.IAutomationV21PlusCommonUpkeepPerformed + Stale *ac.IAutomationV21PlusCommonStaleUpkeepReport + Reorged *ac.IAutomationV21PlusCommonReorgedUpkeepReport + InsufficientFunds *ac.IAutomationV21PlusCommonInsufficientFundsUpkeepReport } func (l transmitEventLog) Id() *big.Int { diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/transmit/encoding_test.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/transmit/encoding_test.go index 97aed4706ec..34dccdbafd5 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/transmit/encoding_test.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/transmit/encoding_test.go @@ -11,7 +11,7 @@ import ( ocr2keepers "github.com/smartcontractkit/chainlink-common/pkg/types/automation" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/logpoller" - iregistry21 "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/i_keeper_registry_master_wrapper_2_1" + ac "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/i_automation_v21_plus_common" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/core" ) @@ -30,7 +30,7 @@ func TestTransmitEventLog(t *testing.T) { BlockNumber: 1, BlockHash: common.HexToHash("0x010203040"), }, - Performed: &iregistry21.IKeeperRegistryMasterUpkeepPerformed{ + Performed: &ac.IAutomationV21PlusCommonUpkeepPerformed{ Id: uid.BigInt(), Trigger: []byte{1, 2, 3, 4, 5, 6, 7, 8}, }, @@ -44,7 +44,7 @@ func TestTransmitEventLog(t *testing.T) { BlockNumber: 1, BlockHash: common.HexToHash("0x010203040"), }, - Stale: &iregistry21.IKeeperRegistryMasterStaleUpkeepReport{ + Stale: &ac.IAutomationV21PlusCommonStaleUpkeepReport{ Id: uid.BigInt(), Trigger: []byte{1, 2, 3, 4, 5, 6, 7, 8}, }, @@ -58,7 +58,7 @@ func TestTransmitEventLog(t *testing.T) { BlockNumber: 1, BlockHash: common.HexToHash("0x010203040"), }, - InsufficientFunds: &iregistry21.IKeeperRegistryMasterInsufficientFundsUpkeepReport{ + InsufficientFunds: &ac.IAutomationV21PlusCommonInsufficientFundsUpkeepReport{ Id: uid.BigInt(), Trigger: []byte{1, 2, 3, 4, 5, 6, 7, 8}, }, @@ -72,7 +72,7 @@ func TestTransmitEventLog(t *testing.T) { BlockNumber: 1, BlockHash: common.HexToHash("0x010203040"), }, - Reorged: &iregistry21.IKeeperRegistryMasterReorgedUpkeepReport{ + Reorged: &ac.IAutomationV21PlusCommonReorgedUpkeepReport{ Id: uid.BigInt(), Trigger: []byte{1, 2, 3, 4, 5, 6, 7, 8}, }, diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/transmit/event_provider.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/transmit/event_provider.go index eb8dc1793c1..f1a64688044 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/transmit/event_provider.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/transmit/event_provider.go @@ -16,15 +16,14 @@ import ( evmclient "github.com/smartcontractkit/chainlink/v2/core/chains/evm/client" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/logpoller" - iregistry21 "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/i_keeper_registry_master_wrapper_2_1" + ac "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/i_automation_v21_plus_common" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/core" - "github.com/smartcontractkit/chainlink/v2/core/services/pg" ) var _ types.TransmitEventProvider = &EventProvider{} -type logParser func(registry *iregistry21.IKeeperRegistryMaster, log logpoller.Log) (transmitEventLog, error) +type logParser func(registry *ac.IAutomationV21PlusCommon, log logpoller.Log) (transmitEventLog, error) type EventProvider struct { sync services.StateMachine @@ -34,7 +33,7 @@ type EventProvider struct { logger logger.Logger logPoller logpoller.LogPoller - registry *iregistry21.IKeeperRegistryMaster + registry *ac.IAutomationV21PlusCommon client evmclient.Client registryAddress common.Address @@ -49,6 +48,7 @@ func EventProviderFilterName(addr common.Address) string { } func NewTransmitEventProvider( + ctx context.Context, logger logger.Logger, logPoller logpoller.LogPoller, registryAddress common.Address, @@ -57,20 +57,20 @@ func NewTransmitEventProvider( ) (*EventProvider, error) { var err error - contract, err := iregistry21.NewIKeeperRegistryMaster(registryAddress, client) + contract, err := ac.NewIAutomationV21PlusCommon(registryAddress, client) if err != nil { return nil, err } - err = logPoller.RegisterFilter(logpoller.Filter{ + err = logPoller.RegisterFilter(ctx, logpoller.Filter{ Name: EventProviderFilterName(contract.Address()), EventSigs: []common.Hash{ // These are the events that are emitted when a node transmits a report - iregistry21.IKeeperRegistryMasterUpkeepPerformed{}.Topic(), // Happy path: report performed the upkeep - iregistry21.IKeeperRegistryMasterReorgedUpkeepReport{}.Topic(), // Report checkBlockNumber was reorged - iregistry21.IKeeperRegistryMasterInsufficientFundsUpkeepReport{}.Topic(), // Upkeep didn't have sufficient funds when report reached chain, perform was aborted early + ac.IAutomationV21PlusCommonUpkeepPerformed{}.Topic(), // Happy path: report performed the upkeep + ac.IAutomationV21PlusCommonReorgedUpkeepReport{}.Topic(), // Report checkBlockNumber was reorged + ac.IAutomationV21PlusCommonInsufficientFundsUpkeepReport{}.Topic(), // Upkeep didn't have sufficient funds when report reached chain, perform was aborted early // Report was too old when it reached the chain. For conditionals upkeep was already performed on a higher block than checkBlockNum // for logs upkeep was already performed for the particular log - iregistry21.IKeeperRegistryMasterStaleUpkeepReport{}.Topic(), + ac.IAutomationV21PlusCommonStaleUpkeepReport{}.Topic(), }, Addresses: []common.Address{registryAddress}, }) @@ -136,7 +136,7 @@ func (c *EventProvider) HealthReport() map[string]error { } func (c *EventProvider) GetLatestEvents(ctx context.Context) ([]ocr2keepers.TransmitEvent, error) { - end, err := c.logPoller.LatestBlock(pg.WithParentCtx(ctx)) + end, err := c.logPoller.LatestBlock(ctx) if err != nil { return nil, fmt.Errorf("%w: failed to get latest block from log poller", err) } @@ -144,16 +144,16 @@ func (c *EventProvider) GetLatestEvents(ctx context.Context) ([]ocr2keepers.Tran // always check the last lookback number of blocks and rebroadcast // this allows the plugin to make decisions based on event confirmations logs, err := c.logPoller.LogsWithSigs( + ctx, end.BlockNumber-c.lookbackBlocks, end.BlockNumber, []common.Hash{ - iregistry21.IKeeperRegistryMasterUpkeepPerformed{}.Topic(), - iregistry21.IKeeperRegistryMasterStaleUpkeepReport{}.Topic(), - iregistry21.IKeeperRegistryMasterReorgedUpkeepReport{}.Topic(), - iregistry21.IKeeperRegistryMasterInsufficientFundsUpkeepReport{}.Topic(), + ac.IAutomationV21PlusCommonUpkeepPerformed{}.Topic(), + ac.IAutomationV21PlusCommonStaleUpkeepReport{}.Topic(), + ac.IAutomationV21PlusCommonReorgedUpkeepReport{}.Topic(), + ac.IAutomationV21PlusCommonInsufficientFundsUpkeepReport{}.Topic(), }, c.registryAddress, - pg.WithParentCtx(ctx), ) if err != nil { return nil, fmt.Errorf("%w: failed to collect logs from log poller", err) diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/transmit/event_provider_test.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/transmit/event_provider_test.go index 89a49f07807..fb6ebf24462 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/transmit/event_provider_test.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/transmit/event_provider_test.go @@ -18,7 +18,7 @@ import ( evmClientMocks "github.com/smartcontractkit/chainlink/v2/core/chains/evm/client/mocks" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/logpoller" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/logpoller/mocks" - iregistry21 "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/i_keeper_registry_master_wrapper_2_1" + ac "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/i_automation_v21_plus_common" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/core" @@ -29,9 +29,9 @@ func TestTransmitEventProvider_Sanity(t *testing.T) { lp := new(mocks.LogPoller) - lp.On("RegisterFilter", mock.Anything).Return(nil) + lp.On("RegisterFilter", mock.Anything, mock.Anything).Return(nil) - provider, err := NewTransmitEventProvider(logger.TestLogger(t), lp, common.HexToAddress("0x"), client.NewNullClient(big.NewInt(1), logger.TestLogger(t)), 32) + provider, err := NewTransmitEventProvider(ctx, logger.TestLogger(t), lp, common.HexToAddress("0x"), client.NewNullClient(big.NewInt(1), logger.TestLogger(t)), 32) require.NoError(t, err) require.NotNil(t, provider) @@ -78,9 +78,9 @@ func TestTransmitEventProvider_Sanity(t *testing.T) { LogIndex: 1, Address: common.HexToAddress("0x1"), Topics: [][]byte{ - iregistry21.IKeeperRegistryMasterUpkeepPerformed{}.Topic().Bytes(), + ac.IAutomationV21PlusCommonUpkeepPerformed{}.Topic().Bytes(), }, - EventSig: iregistry21.IKeeperRegistryMasterUpkeepPerformed{}.Topic(), + EventSig: ac.IAutomationV21PlusCommonUpkeepPerformed{}.Topic(), Data: []byte{}, }, }, @@ -103,10 +103,11 @@ func TestTransmitEventProvider_Sanity(t *testing.T) { func TestTransmitEventProvider_ProcessLogs(t *testing.T) { lp := new(mocks.LogPoller) - lp.On("RegisterFilter", mock.Anything).Return(nil) + lp.On("RegisterFilter", mock.Anything, mock.Anything).Return(nil) client := evmClientMocks.NewClient(t) + ctx := testutils.Context(t) - provider, err := NewTransmitEventProvider(logger.TestLogger(t), lp, common.HexToAddress("0x"), client, 250) + provider, err := NewTransmitEventProvider(ctx, logger.TestLogger(t), lp, common.HexToAddress("0x"), client, 250) require.NoError(t, err) id := core.GenUpkeepID(types.LogTrigger, "1111111111111111") @@ -126,7 +127,7 @@ func TestTransmitEventProvider_ProcessLogs(t *testing.T) { BlockNumber: 1, BlockHash: common.HexToHash("0x0102030405060708010203040506070801020304050607080102030405060708"), }, - Performed: &iregistry21.IKeeperRegistryMasterUpkeepPerformed{ + Performed: &ac.IAutomationV21PlusCommonUpkeepPerformed{ Id: id.BigInt(), Trigger: func() []byte { b, _ := hexutil.Decode("0x0000000000000000000000000000000000000000000000000000000001111abc0000000000000000000000000000000000000000000000000000000001111111000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000001111111") @@ -160,7 +161,7 @@ func TestTransmitEventProvider_ProcessLogs(t *testing.T) { BlockNumber: 1, BlockHash: common.HexToHash("0x0102030405060708010203040506070801020304050607080102030405060708"), }, - Performed: &iregistry21.IKeeperRegistryMasterUpkeepPerformed{ + Performed: &ac.IAutomationV21PlusCommonUpkeepPerformed{ Id: id.BigInt(), Trigger: func() []byte { b, _ := hexutil.Decode("0x0000000000000000000000000000000000000000000000000000000001111abc0000000000000000000000000000000000000000000000000000000001111111000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000001111111") @@ -173,7 +174,7 @@ func TestTransmitEventProvider_ProcessLogs(t *testing.T) { BlockNumber: 1, BlockHash: common.HexToHash("0x0102030405060708010203040506070801020304050607080102030405060708"), }, - Performed: &iregistry21.IKeeperRegistryMasterUpkeepPerformed{ + Performed: &ac.IAutomationV21PlusCommonUpkeepPerformed{ Id: id.BigInt(), Trigger: func() []byte { b, _ := hexutil.Decode("0x0000000000000000000000000000000000000000000000000000000001111abc0000000000000000000000000000000000000000000000000000000001111111000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000001111111") @@ -212,7 +213,7 @@ func TestTransmitEventProvider_ProcessLogs(t *testing.T) { } provider.mu.Lock() provider.cache = newTransmitEventCache(provider.cache.cap) - provider.parseLog = func(registry *iregistry21.IKeeperRegistryMaster, log logpoller.Log) (transmitEventLog, error) { + provider.parseLog = func(registry *ac.IAutomationV21PlusCommon, log logpoller.Log) (transmitEventLog, error) { return parseResults[provider.logKey(log)], nil } provider.mu.Unlock() diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/upkeepstate/scanner.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/upkeepstate/scanner.go index 30a50977d17..93b0c155870 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/upkeepstate/scanner.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/upkeepstate/scanner.go @@ -9,10 +9,9 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/logpoller" - iregistry21 "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/i_keeper_registry_master_wrapper_2_1" + ac "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/i_automation_v21_plus_common" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider" - "github.com/smartcontractkit/chainlink/v2/core/services/pg" ) var ( @@ -50,12 +49,12 @@ func NewPerformedEventsScanner( } } -func (s *performedEventsScanner) Start(_ context.Context) error { - return s.poller.RegisterFilter(logpoller.Filter{ +func (s *performedEventsScanner) Start(ctx context.Context) error { + return s.poller.RegisterFilter(ctx, logpoller.Filter{ Name: dedupFilterName(s.registryAddress), EventSigs: []common.Hash{ // listening to dedup key added event - iregistry21.IKeeperRegistryMasterDedupKeyAdded{}.Topic(), + ac.IAutomationV21PlusCommonDedupKeyAdded{}.Topic(), }, Addresses: []common.Address{s.registryAddress}, Retention: logprovider.LogRetention, @@ -79,7 +78,8 @@ func (s *performedEventsScanner) ScanWorkIDs(ctx context.Context, workID ...stri end = len(ids) } batch := ids[i:end] - batchLogs, err := s.poller.IndexedLogs(iregistry21.IKeeperRegistryMasterDedupKeyAdded{}.Topic(), s.registryAddress, 1, batch, logpoller.Confirmations(s.finalityDepth), pg.WithParentCtx(ctx)) + + batchLogs, err := s.poller.IndexedLogs(ctx, ac.IAutomationV21PlusCommonDedupKeyAdded{}.Topic(), s.registryAddress, 1, batch, logpoller.Confirmations(s.finalityDepth)) if err != nil { return nil, fmt.Errorf("error fetching logs: %w", err) } diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/upkeepstate/scanner_test.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/upkeepstate/scanner_test.go index 9442a5f5d7a..dad9273aabc 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/upkeepstate/scanner_test.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/upkeepstate/scanner_test.go @@ -11,7 +11,7 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/chains/evm/logpoller" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/logpoller/mocks" - iregistry21 "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/i_keeper_registry_master_wrapper_2_1" + ac "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/i_automation_v21_plus_common" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/logger" ) @@ -53,7 +53,7 @@ func TestPerformedEventsScanner(t *testing.T) { BlockNumber: 1, Address: registryAddr, Topics: convertTopics([]common.Hash{ - iregistry21.IKeeperRegistryMasterDedupKeyAdded{}.Topic(), + ac.IAutomationV21PlusCommonDedupKeyAdded{}.Topic(), common.HexToHash("0x290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e563"), }), }, @@ -70,7 +70,7 @@ func TestPerformedEventsScanner(t *testing.T) { BlockNumber: 1, Address: registryAddr, Topics: convertTopics([]common.Hash{ - iregistry21.IKeeperRegistryMasterDedupKeyAdded{}.Topic(), + ac.IAutomationV21PlusCommonDedupKeyAdded{}.Topic(), }), }, }, @@ -83,7 +83,7 @@ func TestPerformedEventsScanner(t *testing.T) { for _, tc := range tests { t.Run(tc.name, func(t *testing.T) { mp := new(mocks.LogPoller) - mp.On("RegisterFilter", mock.Anything).Return(nil) + mp.On("RegisterFilter", mock.Anything, mock.Anything).Return(nil) mp.On("UnregisterFilter", mock.Anything, mock.Anything).Return(nil) scanner := NewPerformedEventsScanner(lggr, mp, registryAddr, 100) @@ -123,7 +123,7 @@ func TestPerformedEventsScanner_Batch(t *testing.T) { BlockNumber: 1, Address: registryAddr, Topics: convertTopics([]common.Hash{ - iregistry21.IKeeperRegistryMasterDedupKeyAdded{}.Topic(), + ac.IAutomationV21PlusCommonDedupKeyAdded{}.Topic(), common.HexToHash("0x290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e563"), }), }, @@ -133,7 +133,7 @@ func TestPerformedEventsScanner_Batch(t *testing.T) { BlockNumber: 3, Address: registryAddr, Topics: convertTopics([]common.Hash{ - iregistry21.IKeeperRegistryMasterDedupKeyAdded{}.Topic(), + ac.IAutomationV21PlusCommonDedupKeyAdded{}.Topic(), common.HexToHash("0x331decd9548b62a8d603457658386fc84ba6bc95888008f6362f93160ef3b663"), }), }, diff --git a/core/services/ocr2/plugins/ocr2keeper/integration_test.go b/core/services/ocr2/plugins/ocr2keeper/integration_test.go index 937c3df0c36..236e89ae671 100644 --- a/core/services/ocr2/plugins/ocr2keeper/integration_test.go +++ b/core/services/ocr2/plugins/ocr2keeper/integration_test.go @@ -436,9 +436,9 @@ func setupForwarderForNode( backend.Commit() // add forwarder address to be tracked in db - forwarderORM := forwarders.NewORM(app.GetSqlxDB(), logger.TestLogger(t), app.GetConfig().Database()) + forwarderORM := forwarders.NewORM(app.GetDB()) chainID := ubig.Big(*backend.Blockchain().Config().ChainID) - _, err = forwarderORM.CreateForwarder(faddr, chainID) + _, err = forwarderORM.CreateForwarder(testutils.Context(t), faddr, chainID) require.NoError(t, err) chain, err := app.GetRelayers().LegacyEVMChains().Get((*big.Int)(&chainID).String()) diff --git a/core/services/ocr2/plugins/ocr2keeper/util.go b/core/services/ocr2/plugins/ocr2keeper/util.go index 53fff8751c3..35bd62eeed8 100644 --- a/core/services/ocr2/plugins/ocr2keeper/util.go +++ b/core/services/ocr2/plugins/ocr2keeper/util.go @@ -1,6 +1,7 @@ package ocr2keeper import ( + "context" "fmt" "github.com/smartcontractkit/chainlink-common/pkg/types" @@ -17,10 +18,10 @@ import ( ocr2keepers20runner "github.com/smartcontractkit/chainlink-automation/pkg/v2/runner" ocr2keepers21 "github.com/smartcontractkit/chainlink-common/pkg/types/automation" + evmtypes "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" "github.com/smartcontractkit/chainlink/v2/core/chains/legacyevm" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/job" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ethkey" evmregistry20 "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ocr2keeper/evmregistry/v20" evmregistry21 "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21" evmregistry21transmit "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/transmit" @@ -67,6 +68,7 @@ func EVMProvider(db *sqlx.DB, chain legacyevm.Chain, lggr logger.Logger, spec jo } func EVMDependencies20( + ctx context.Context, spec job.Job, db *sqlx.DB, lggr logger.Logger, @@ -84,7 +86,7 @@ func EVMDependencies20( return nil, nil, nil, nil, err } - rAddr := ethkey.MustEIP55Address(spec.OCR2OracleSpec.ContractID).Address() + rAddr := evmtypes.MustEIP55Address(spec.OCR2OracleSpec.ContractID).Address() if registry, err = evmregistry20.NewEVMRegistryService(rAddr, chain, lggr); err != nil { return nil, nil, nil, nil, err } @@ -95,13 +97,13 @@ func EVMDependencies20( // to be detected in most cases var lookbackBlocks int64 = 250 // TODO: accept a version of the registry contract and use the correct interfaces - logProvider, err := evmregistry20.NewLogProvider(lggr, chain.LogPoller(), rAddr, chain.Client(), lookbackBlocks) + logProvider, err := evmregistry20.NewLogProvider(ctx, lggr, chain.LogPoller(), rAddr, chain.Client(), lookbackBlocks) return keeperProvider, registry, encoder, logProvider, err } func FilterNamesFromSpec20(spec *job.OCR2OracleSpec) (names []string, err error) { - addr, err := ethkey.NewEIP55Address(spec.ContractID) + addr, err := evmtypes.NewEIP55Address(spec.ContractID) if err != nil { return nil, err } @@ -115,7 +117,7 @@ func EVMDependencies21( } func FilterNamesFromSpec21(spec *job.OCR2OracleSpec) (names []string, err error) { - addr, err := ethkey.NewEIP55Address(spec.ContractID) + addr, err := evmtypes.NewEIP55Address(spec.ContractID) if err != nil { return nil, err } diff --git a/core/services/ocr2/plugins/ocr2vrf/coordinator/coordinator.go b/core/services/ocr2/plugins/ocr2vrf/coordinator/coordinator.go index 4f3e4fdade4..e7688556124 100644 --- a/core/services/ocr2/plugins/ocr2vrf/coordinator/coordinator.go +++ b/core/services/ocr2/plugins/ocr2vrf/coordinator/coordinator.go @@ -37,9 +37,7 @@ import ( vrf_wrapper "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ocr2vrf/generated/vrf_coordinator" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/job" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ethkey" ocr2vrfconfig "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ocr2vrf/config" - "github.com/smartcontractkit/chainlink/v2/core/services/pg" ) var _ ocr2vrftypes.CoordinatorInterface = &coordinator{} @@ -166,6 +164,7 @@ type coordinator struct { // New creates a new CoordinatorInterface implementor. func New( + ctx context.Context, lggr logger.Logger, beaconAddress common.Address, coordinatorAddress common.Address, @@ -183,7 +182,7 @@ func New( // Add log filters for the log poller so that it can poll and find the logs that // we need. - err = logPoller.RegisterFilter(logpoller.Filter{ + err = logPoller.RegisterFilter(ctx, logpoller.Filter{ Name: filterName(beaconAddress, coordinatorAddress, dkgAddress), EventSigs: []common.Hash{ t.randomnessRequestedTopic, @@ -226,7 +225,7 @@ func New( } func (c *coordinator) CurrentChainHeight(ctx context.Context) (uint64, error) { - head, err := c.lp.LatestBlock(pg.WithParentCtx(ctx)) + head, err := c.lp.LatestBlock(ctx) if err != nil { return 0, err } @@ -257,14 +256,14 @@ func (c *coordinator) ReportIsOnchain( c.lggr.Info(fmt.Sprintf("epoch and round: %s %s", epochAndRound.String(), enrTopic.String())) logs, err := c.lp.IndexedLogs( + ctx, c.topics.newTransmissionTopic, c.beaconAddress, 2, []common.Hash{ enrTopic, }, - 1, - pg.WithParentCtx(ctx)) + 1) if err != nil { return false, errors.Wrap(err, "log poller IndexedLogs") } @@ -342,6 +341,7 @@ func (c *coordinator) ReportBlocks( c.lggr.Infow("current chain height", "currentHeight", currentHeight) logs, err := c.lp.LogsWithSigs( + ctx, int64(currentHeight-c.coordinatorConfig.LookbackBlocks), int64(currentHeight), []common.Hash{ @@ -350,8 +350,7 @@ func (c *coordinator) ReportBlocks( c.randomWordsFulfilledTopic, c.outputsServedTopic, }, - c.coordinatorAddress, - pg.WithParentCtx(ctx)) + c.coordinatorAddress) if err != nil { err = errors.Wrapf(err, "logs with topics. address: %s", c.coordinatorAddress) return @@ -547,7 +546,7 @@ func (c *coordinator) getBlockhashesMapping( return blockNumbers[a] < blockNumbers[b] }) - heads, err := c.lp.GetBlocksRange(ctx, blockNumbers, pg.WithParentCtx(ctx)) + heads, err := c.lp.GetBlocksRange(ctx, blockNumbers) if err != nil { return nil, errors.Wrap(err, "logpoller.GetBlocks") } @@ -911,10 +910,10 @@ func (c *coordinator) DKGVRFCommittees(ctx context.Context) (dkgCommittee, vrfCo defer c.logAndEmitFunctionDuration("DKGVRFCommittees", startTime) latestVRF, err := c.lp.LatestLogByEventSigWithConfs( + ctx, c.configSetTopic, c.beaconAddress, logpoller.Confirmations(c.finalityDepth), - pg.WithParentCtx(ctx), ) if err != nil { err = errors.Wrap(err, "latest vrf ConfigSet by sig with confs") @@ -922,10 +921,10 @@ func (c *coordinator) DKGVRFCommittees(ctx context.Context) (dkgCommittee, vrfCo } latestDKG, err := c.lp.LatestLogByEventSigWithConfs( + ctx, c.configSetTopic, c.dkgAddress, logpoller.Confirmations(c.finalityDepth), - pg.WithParentCtx(ctx), ) if err != nil { err = errors.Wrap(err, "latest dkg ConfigSet by sig with confs") @@ -1142,16 +1141,16 @@ func filterName(beaconAddress, coordinatorAddress, dkgAddress common.Address) st func FilterNamesFromSpec(spec *job.OCR2OracleSpec) (names []string, err error) { var cfg ocr2vrfconfig.PluginConfig - var beaconAddress, coordinatorAddress, dkgAddress ethkey.EIP55Address + var beaconAddress, coordinatorAddress, dkgAddress evmtypes.EIP55Address if err = json.Unmarshal(spec.PluginConfig.Bytes(), &cfg); err != nil { err = errors.Wrap(err, "failed to unmarshal ocr2vrf plugin config") return nil, err } - if beaconAddress, err = ethkey.NewEIP55Address(spec.ContractID); err == nil { - if coordinatorAddress, err = ethkey.NewEIP55Address(cfg.VRFCoordinatorAddress); err == nil { - if dkgAddress, err = ethkey.NewEIP55Address(cfg.DKGContractAddress); err == nil { + if beaconAddress, err = evmtypes.NewEIP55Address(spec.ContractID); err == nil { + if coordinatorAddress, err = evmtypes.NewEIP55Address(cfg.VRFCoordinatorAddress); err == nil { + if dkgAddress, err = evmtypes.NewEIP55Address(cfg.DKGContractAddress); err == nil { return []string{filterName(beaconAddress.Address(), coordinatorAddress.Address(), dkgAddress.Address())}, nil } } diff --git a/core/services/ocr2/plugins/ocr2vrf/coordinator/coordinator_test.go b/core/services/ocr2/plugins/ocr2vrf/coordinator/coordinator_test.go index 096589b2053..beee01eaf7a 100644 --- a/core/services/ocr2/plugins/ocr2vrf/coordinator/coordinator_test.go +++ b/core/services/ocr2/plugins/ocr2vrf/coordinator/coordinator_test.go @@ -85,11 +85,11 @@ func TestCoordinator_DKGVRFCommittees(t *testing.T) { coordinatorAddress := newAddress(t) beaconAddress := newAddress(t) dkgAddress := newAddress(t) - lp.On("LatestLogByEventSigWithConfs", tp.configSetTopic, beaconAddress, logpoller.Confirmations(10), mock.Anything). + lp.On("LatestLogByEventSigWithConfs", mock.Anything, tp.configSetTopic, beaconAddress, logpoller.Confirmations(10)). Return(&logpoller.Log{ Data: hexutil.MustDecode("0x0000000000000000000000000000000000000000000000000000000000a6fca200010576e704b4a519484d6239ef17f1f5b4a82e330b0daf827ed4dc2789971b0000000000000000000000000000000000000000000000000000000000000032000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000002a0000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000002e000000000000000000000000000000000000000000000000000000000000000050000000000000000000000000a8cbea12a06869d3ec432ab9682dab6c761d591000000000000000000000000f4f9db7bb1d16b7cdfb18ec68994c26964f5985300000000000000000000000022fb3f90c539457f00d8484438869135e604a65500000000000000000000000033cbcedccb11c9773ad78e214ba342e979255ab30000000000000000000000006ffaa96256fbc1012325cca88c79f725c33eed80000000000000000000000000000000000000000000000000000000000000000500000000000000000000000074103cf8b436465870b26aa9fa2f62ad62b22e3500000000000000000000000038a6cb196f805cc3041f6645a5a6cec27b64430d00000000000000000000000047d7095cfebf8285bdaa421bc8268d0db87d933c000000000000000000000000a8842be973800ff61d80d2d53fa62c3a685380eb0000000000000000000000003750e31321aee8c024751877070e8d5f704ce98700000000000000000000000000000000000000000000000000000000000000206f3b82406688b8ddb944c6f2e6d808f014c8fa8d568d639c25019568c715fbf000000000000000000000000000000000000000000000000000000000000004220880d88ee16f1080c8afa0251880c8afa025208090dfc04a288090dfc04a30033a05010101010142206c5ca6f74b532222ac927dd3de235d46a943e372c0563393a33b01dcfd3f371c4220855114d25c2ef5e85fffe4f20a365672d8f2dba3b2ec82333f494168a2039c0442200266e835634db00977cbc1caa4db10e1676c1a4c0fcbc6ba7f09300f0d1831824220980cd91f7a73f20f4b0d51d00cd4e00373dc2beafbb299ca3c609757ab98c8304220eb6d36e2af8922085ff510bbe1eb8932a0e3295ca9f047fef25d90e69c52948f4a34313244334b6f6f574463364b7232644542684b59326b336e685057694676544565325331703978544532544b74344d7572716f684a34313244334b6f6f574b436e4367724b637743324a3577576a626e355435335068646b6b6f57454e534a39546537544b7836366f4a4a34313244334b6f6f575239616f675948786b357a38636b624c4c56346e426f7a777a747871664a7050586671336d4a7232796452474a34313244334b6f6f5744695444635565675637776b313133473366476a69616259756f54436f3157726f6f53656741343263556f544a34313244334b6f6f574e64687072586b5472665370354d5071736270467a70364167394a53787358694341434442676454424c656652820300050e416c74424e2d3132382047e282810e86e8cf899ae9a1b43e023bbe8825b103659bb8d6d4e54f6a3cfae7b106069c216a812d7616e47f0bd38fa4863f48fbcda6a38af4c58d2233dfa7cf79620947042d09f923e0a2f7a2270391e8b058d8bdb8f79fe082b7b627f025651c7290382fdff97c3181d15d162c146ce87ff752499d2acc2b26011439a12e29571a6f1e1defb1751c3be4258c493984fd9f0f6b4a26c539870b5f15bfed3d8ffac92499eb62dbd2beb7c1524275a8019022f6ce6a7e86c9e65e3099452a2b96fc2432b127a112970e1adf615f823b2b2180754c2f0ee01f1b389e56df55ca09702cd0401b66ff71779d2dd67222503a85ab921b28c329cc1832800b192d0b0247c0776e1b9653dc00df48daa6364287c84c0382f5165e7269fef06d10bc67c1bba252305d1af0dc7bb0fe92558eb4c5f38c23163dee1cfb34a72020669dbdfe337c16f3307472616e736c61746f722066726f6d20416c74424e2d3132382047e2828120746f20416c74424e2d3132382047e282825880ade2046080c8afa0256880c8afa0257080ade204788094ebdc0382019e010a205034214e0bd4373f38e162cf9fc9133e2f3b71441faa4c3d1ac01c1877f1cd2712200e03e975b996f911abba2b79d2596c2150bc94510963c40a1137a03df6edacdb1a107dee1cdb894163813bb3da604c9c133c1a10bb33302eeafbd55d352e35dcc5d2b3311a10d2c658b6b93d74a02d467849b6fe75251a10fea5308cc1fea69e7246eafe7ca8a3a51a1048efe1ad873b6f025ac0243bdef715f8000000000000000000000000000000000000000000000000000000000000"), }, nil) - lp.On("LatestLogByEventSigWithConfs", tp.configSetTopic, dkgAddress, logpoller.Confirmations(10), mock.Anything). + lp.On("LatestLogByEventSigWithConfs", mock.Anything, tp.configSetTopic, dkgAddress, logpoller.Confirmations(10)). Return(&logpoller.Log{ Data: hexutil.MustDecode("0x0000000000000000000000000000000000000000000000000000000000a6fca200010576e704b4a519484d6239ef17f1f5b4a82e330b0daf827ed4dc2789971b0000000000000000000000000000000000000000000000000000000000000032000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000002a0000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000002e000000000000000000000000000000000000000000000000000000000000000050000000000000000000000000a8cbea12a06869d3ec432ab9682dab6c761d591000000000000000000000000f4f9db7bb1d16b7cdfb18ec68994c26964f5985300000000000000000000000022fb3f90c539457f00d8484438869135e604a65500000000000000000000000033cbcedccb11c9773ad78e214ba342e979255ab30000000000000000000000006ffaa96256fbc1012325cca88c79f725c33eed80000000000000000000000000000000000000000000000000000000000000000500000000000000000000000074103cf8b436465870b26aa9fa2f62ad62b22e3500000000000000000000000038a6cb196f805cc3041f6645a5a6cec27b64430d00000000000000000000000047d7095cfebf8285bdaa421bc8268d0db87d933c000000000000000000000000a8842be973800ff61d80d2d53fa62c3a685380eb0000000000000000000000003750e31321aee8c024751877070e8d5f704ce98700000000000000000000000000000000000000000000000000000000000000206f3b82406688b8ddb944c6f2e6d808f014c8fa8d568d639c25019568c715fbf000000000000000000000000000000000000000000000000000000000000004220880d88ee16f1080c8afa0251880c8afa025208090dfc04a288090dfc04a30033a05010101010142206c5ca6f74b532222ac927dd3de235d46a943e372c0563393a33b01dcfd3f371c4220855114d25c2ef5e85fffe4f20a365672d8f2dba3b2ec82333f494168a2039c0442200266e835634db00977cbc1caa4db10e1676c1a4c0fcbc6ba7f09300f0d1831824220980cd91f7a73f20f4b0d51d00cd4e00373dc2beafbb299ca3c609757ab98c8304220eb6d36e2af8922085ff510bbe1eb8932a0e3295ca9f047fef25d90e69c52948f4a34313244334b6f6f574463364b7232644542684b59326b336e685057694676544565325331703978544532544b74344d7572716f684a34313244334b6f6f574b436e4367724b637743324a3577576a626e355435335068646b6b6f57454e534a39546537544b7836366f4a4a34313244334b6f6f575239616f675948786b357a38636b624c4c56346e426f7a777a747871664a7050586671336d4a7232796452474a34313244334b6f6f5744695444635565675637776b313133473366476a69616259756f54436f3157726f6f53656741343263556f544a34313244334b6f6f574e64687072586b5472665370354d5071736270467a70364167394a53787358694341434442676454424c656652820300050e416c74424e2d3132382047e282810e86e8cf899ae9a1b43e023bbe8825b103659bb8d6d4e54f6a3cfae7b106069c216a812d7616e47f0bd38fa4863f48fbcda6a38af4c58d2233dfa7cf79620947042d09f923e0a2f7a2270391e8b058d8bdb8f79fe082b7b627f025651c7290382fdff97c3181d15d162c146ce87ff752499d2acc2b26011439a12e29571a6f1e1defb1751c3be4258c493984fd9f0f6b4a26c539870b5f15bfed3d8ffac92499eb62dbd2beb7c1524275a8019022f6ce6a7e86c9e65e3099452a2b96fc2432b127a112970e1adf615f823b2b2180754c2f0ee01f1b389e56df55ca09702cd0401b66ff71779d2dd67222503a85ab921b28c329cc1832800b192d0b0247c0776e1b9653dc00df48daa6364287c84c0382f5165e7269fef06d10bc67c1bba252305d1af0dc7bb0fe92558eb4c5f38c23163dee1cfb34a72020669dbdfe337c16f3307472616e736c61746f722066726f6d20416c74424e2d3132382047e2828120746f20416c74424e2d3132382047e282825880ade2046080c8afa0256880c8afa0257080ade204788094ebdc0382019e010a205034214e0bd4373f38e162cf9fc9133e2f3b71441faa4c3d1ac01c1877f1cd2712200e03e975b996f911abba2b79d2596c2150bc94510963c40a1137a03df6edacdb1a107dee1cdb894163813bb3da604c9c133c1a10bb33302eeafbd55d352e35dcc5d2b3311a10d2c658b6b93d74a02d467849b6fe75251a10fea5308cc1fea69e7246eafe7ca8a3a51a1048efe1ad873b6f025ac0243bdef715f8000000000000000000000000000000000000000000000000000000000000"), }, nil) @@ -134,7 +134,7 @@ func TestCoordinator_DKGVRFCommittees(t *testing.T) { tp := newTopics() beaconAddress := newAddress(t) - lp.On("LatestLogByEventSigWithConfs", tp.configSetTopic, beaconAddress, logpoller.Confirmations(10), mock.Anything). + lp.On("LatestLogByEventSigWithConfs", mock.Anything, tp.configSetTopic, beaconAddress, logpoller.Confirmations(10)). Return(nil, errors.New("rpc error")) c := &coordinator{ @@ -156,11 +156,11 @@ func TestCoordinator_DKGVRFCommittees(t *testing.T) { beaconAddress := newAddress(t) coordinatorAddress := newAddress(t) dkgAddress := newAddress(t) - lp.On("LatestLogByEventSigWithConfs", tp.configSetTopic, beaconAddress, logpoller.Confirmations(10), mock.Anything). + lp.On("LatestLogByEventSigWithConfs", mock.Anything, tp.configSetTopic, beaconAddress, logpoller.Confirmations(10)). Return(&logpoller.Log{ Data: hexutil.MustDecode("0x0000000000000000000000000000000000000000000000000000000000a6fca200010576e704b4a519484d6239ef17f1f5b4a82e330b0daf827ed4dc2789971b0000000000000000000000000000000000000000000000000000000000000032000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000002a0000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000002e000000000000000000000000000000000000000000000000000000000000000050000000000000000000000000a8cbea12a06869d3ec432ab9682dab6c761d591000000000000000000000000f4f9db7bb1d16b7cdfb18ec68994c26964f5985300000000000000000000000022fb3f90c539457f00d8484438869135e604a65500000000000000000000000033cbcedccb11c9773ad78e214ba342e979255ab30000000000000000000000006ffaa96256fbc1012325cca88c79f725c33eed80000000000000000000000000000000000000000000000000000000000000000500000000000000000000000074103cf8b436465870b26aa9fa2f62ad62b22e3500000000000000000000000038a6cb196f805cc3041f6645a5a6cec27b64430d00000000000000000000000047d7095cfebf8285bdaa421bc8268d0db87d933c000000000000000000000000a8842be973800ff61d80d2d53fa62c3a685380eb0000000000000000000000003750e31321aee8c024751877070e8d5f704ce98700000000000000000000000000000000000000000000000000000000000000206f3b82406688b8ddb944c6f2e6d808f014c8fa8d568d639c25019568c715fbf000000000000000000000000000000000000000000000000000000000000004220880d88ee16f1080c8afa0251880c8afa025208090dfc04a288090dfc04a30033a05010101010142206c5ca6f74b532222ac927dd3de235d46a943e372c0563393a33b01dcfd3f371c4220855114d25c2ef5e85fffe4f20a365672d8f2dba3b2ec82333f494168a2039c0442200266e835634db00977cbc1caa4db10e1676c1a4c0fcbc6ba7f09300f0d1831824220980cd91f7a73f20f4b0d51d00cd4e00373dc2beafbb299ca3c609757ab98c8304220eb6d36e2af8922085ff510bbe1eb8932a0e3295ca9f047fef25d90e69c52948f4a34313244334b6f6f574463364b7232644542684b59326b336e685057694676544565325331703978544532544b74344d7572716f684a34313244334b6f6f574b436e4367724b637743324a3577576a626e355435335068646b6b6f57454e534a39546537544b7836366f4a4a34313244334b6f6f575239616f675948786b357a38636b624c4c56346e426f7a777a747871664a7050586671336d4a7232796452474a34313244334b6f6f5744695444635565675637776b313133473366476a69616259756f54436f3157726f6f53656741343263556f544a34313244334b6f6f574e64687072586b5472665370354d5071736270467a70364167394a53787358694341434442676454424c656652820300050e416c74424e2d3132382047e282810e86e8cf899ae9a1b43e023bbe8825b103659bb8d6d4e54f6a3cfae7b106069c216a812d7616e47f0bd38fa4863f48fbcda6a38af4c58d2233dfa7cf79620947042d09f923e0a2f7a2270391e8b058d8bdb8f79fe082b7b627f025651c7290382fdff97c3181d15d162c146ce87ff752499d2acc2b26011439a12e29571a6f1e1defb1751c3be4258c493984fd9f0f6b4a26c539870b5f15bfed3d8ffac92499eb62dbd2beb7c1524275a8019022f6ce6a7e86c9e65e3099452a2b96fc2432b127a112970e1adf615f823b2b2180754c2f0ee01f1b389e56df55ca09702cd0401b66ff71779d2dd67222503a85ab921b28c329cc1832800b192d0b0247c0776e1b9653dc00df48daa6364287c84c0382f5165e7269fef06d10bc67c1bba252305d1af0dc7bb0fe92558eb4c5f38c23163dee1cfb34a72020669dbdfe337c16f3307472616e736c61746f722066726f6d20416c74424e2d3132382047e2828120746f20416c74424e2d3132382047e282825880ade2046080c8afa0256880c8afa0257080ade204788094ebdc0382019e010a205034214e0bd4373f38e162cf9fc9133e2f3b71441faa4c3d1ac01c1877f1cd2712200e03e975b996f911abba2b79d2596c2150bc94510963c40a1137a03df6edacdb1a107dee1cdb894163813bb3da604c9c133c1a10bb33302eeafbd55d352e35dcc5d2b3311a10d2c658b6b93d74a02d467849b6fe75251a10fea5308cc1fea69e7246eafe7ca8a3a51a1048efe1ad873b6f025ac0243bdef715f8000000000000000000000000000000000000000000000000000000000000"), }, nil) - lp.On("LatestLogByEventSigWithConfs", tp.configSetTopic, dkgAddress, logpoller.Confirmations(10), mock.Anything). + lp.On("LatestLogByEventSigWithConfs", mock.Anything, tp.configSetTopic, dkgAddress, logpoller.Confirmations(10)). Return(nil, errors.New("rpc error")) c := &coordinator{ @@ -230,6 +230,7 @@ func TestCoordinator_ReportBlocks(t *testing.T) { lp := getLogPoller(t, []uint64{195}, latestHeadNumber, true, true, lookbackBlocks) lp.On( "LogsWithSigs", + mock.Anything, int64(latestHeadNumber-lookbackBlocks), int64(latestHeadNumber), []common.Hash{ @@ -239,7 +240,6 @@ func TestCoordinator_ReportBlocks(t *testing.T) { tp.outputsServedTopic, }, coordinatorAddress, - mock.Anything, ).Return([]logpoller.Log{ newRandomnessRequestedLog(t, 3, 195, 191, 0, coordinatorAddress), newRandomnessRequestedLog(t, 3, 195, 192, 1, coordinatorAddress), @@ -289,6 +289,7 @@ func TestCoordinator_ReportBlocks(t *testing.T) { lp := getLogPoller(t, []uint64{195}, latestHeadNumber, true, true, lookbackBlocks) lp.On( "LogsWithSigs", + mock.Anything, int64(latestHeadNumber-lookbackBlocks), int64(latestHeadNumber), []common.Hash{ @@ -298,7 +299,6 @@ func TestCoordinator_ReportBlocks(t *testing.T) { tp.outputsServedTopic, }, coordinatorAddress, - mock.Anything, ).Return([]logpoller.Log{ newRandomnessFulfillmentRequestedLog(t, 3, 195, 191, 1, 1000, coordinatorAddress), newRandomnessFulfillmentRequestedLog(t, 3, 195, 192, 2, 1000, coordinatorAddress), @@ -351,6 +351,7 @@ func TestCoordinator_ReportBlocks(t *testing.T) { lp := getLogPoller(t, []uint64{195}, latestHeadNumber, true, true, lookbackBlocks) lp.On( "LogsWithSigs", + mock.Anything, int64(latestHeadNumber-lookbackBlocks), int64(latestHeadNumber), []common.Hash{ @@ -360,7 +361,6 @@ func TestCoordinator_ReportBlocks(t *testing.T) { tp.outputsServedTopic, }, coordinatorAddress, - mock.Anything, ).Return([]logpoller.Log{ newRandomnessRequestedLog(t, 3, 195, 191, 0, coordinatorAddress), newRandomnessRequestedLog(t, 3, 195, 192, 1, coordinatorAddress), @@ -420,6 +420,7 @@ func TestCoordinator_ReportBlocks(t *testing.T) { // when a VRF fulfillment happens on chain. lp.On( "LogsWithSigs", + mock.Anything, int64(latestHeadNumber-lookbackBlocks), int64(latestHeadNumber), []common.Hash{ @@ -429,7 +430,6 @@ func TestCoordinator_ReportBlocks(t *testing.T) { tp.outputsServedTopic, }, coordinatorAddress, - mock.Anything, ).Return([]logpoller.Log{ newRandomnessFulfillmentRequestedLog(t, 3, 195, 191, 1, 1000, coordinatorAddress), newRandomnessFulfillmentRequestedLog(t, 3, 195, 192, 2, 1000, coordinatorAddress), @@ -489,6 +489,7 @@ func TestCoordinator_ReportBlocks(t *testing.T) { lp := getLogPoller(t, []uint64{}, latestHeadNumber, true, true, lookbackBlocks) lp.On( "LogsWithSigs", + mock.Anything, int64(latestHeadNumber-lookbackBlocks), int64(latestHeadNumber), []common.Hash{ @@ -498,7 +499,6 @@ func TestCoordinator_ReportBlocks(t *testing.T) { tp.outputsServedTopic, }, coordinatorAddress, - mock.Anything, ).Return([]logpoller.Log{newOutputsServedLog(t, []vrf_coordinator.VRFBeaconTypesOutputServed{ { Height: 195, @@ -600,6 +600,7 @@ func TestCoordinator_ReportBlocks(t *testing.T) { c.lp = lp lp.On( "LogsWithSigs", + mock.Anything, int64(latestHeadNumber-lookbackBlocks), int64(latestHeadNumber), []common.Hash{ @@ -609,7 +610,6 @@ func TestCoordinator_ReportBlocks(t *testing.T) { tp.outputsServedTopic, }, coordinatorAddress, - mock.Anything, ).Return([]logpoller.Log{ newRandomnessFulfillmentRequestedLog(t, 3, 195, 191, 1, 1000, coordinatorAddress), newRandomnessFulfillmentRequestedLog(t, 3, 195, 192, 2, 1000, coordinatorAddress), @@ -662,6 +662,7 @@ func TestCoordinator_ReportBlocks(t *testing.T) { lp := getLogPoller(t, requestedBlocks, latestHeadNumber, true, true, blockhashLookback) lp.On( "LogsWithSigs", + mock.Anything, int64(latestHeadNumber-lookbackBlocks), int64(latestHeadNumber), []common.Hash{ @@ -671,7 +672,6 @@ func TestCoordinator_ReportBlocks(t *testing.T) { tp.outputsServedTopic, }, coordinatorAddress, - mock.Anything, ).Return(logs, nil) c := &coordinator{ @@ -724,6 +724,7 @@ func TestCoordinator_ReportBlocks(t *testing.T) { lp := getLogPoller(t, requestedBlocks, latestHeadNumber, true, true, lookbackBlocks) lp.On( "LogsWithSigs", + mock.Anything, int64(latestHeadNumber-lookbackBlocks), int64(latestHeadNumber), []common.Hash{ @@ -733,7 +734,6 @@ func TestCoordinator_ReportBlocks(t *testing.T) { tp.outputsServedTopic, }, coordinatorAddress, - mock.Anything, ).Return([]logpoller.Log{ newRandomnessRequestedLog(t, 3, 195, 191, 0, coordinatorAddress), newRandomnessFulfillmentRequestedLog(t, 3, 195, 191, 1, 2_000_000, coordinatorAddress), @@ -791,6 +791,7 @@ func TestCoordinator_ReportBlocks(t *testing.T) { lp := getLogPoller(t, requestedBlocks, latestHeadNumber, true, true, lookbackBlocks) lp.On( "LogsWithSigs", + mock.Anything, int64(latestHeadNumber-lookbackBlocks), int64(latestHeadNumber), []common.Hash{ @@ -800,7 +801,6 @@ func TestCoordinator_ReportBlocks(t *testing.T) { tp.outputsServedTopic, }, coordinatorAddress, - mock.Anything, ).Return([]logpoller.Log{ newRandomnessRequestedLog(t, 3, 195, 191, 0, coordinatorAddress), newRandomnessFulfillmentRequestedLog(t, 3, 195, 191, 1, 10_000_000, coordinatorAddress), @@ -854,6 +854,7 @@ func TestCoordinator_ReportBlocks(t *testing.T) { lp := getLogPoller(t, requestedBlocks, latestHeadNumber, true, true, lookbackBlocks) lp.On( "LogsWithSigs", + mock.Anything, int64(latestHeadNumber-lookbackBlocks), int64(latestHeadNumber), []common.Hash{ @@ -863,7 +864,6 @@ func TestCoordinator_ReportBlocks(t *testing.T) { tp.outputsServedTopic, }, coordinatorAddress, - mock.Anything, ).Return([]logpoller.Log{ newRandomnessRequestedLog(t, 3, 195, 191, 0, coordinatorAddress), newRandomnessFulfillmentRequestedLog(t, 3, 195, 191, 1, 10_000_000, coordinatorAddress), @@ -920,6 +920,7 @@ func TestCoordinator_ReportBlocks(t *testing.T) { lp := getLogPoller(t, requestedBlocks, latestHeadNumber, true, true, lookbackBlocks) lp.On( "LogsWithSigs", + mock.Anything, int64(latestHeadNumber-lookbackBlocks), int64(latestHeadNumber), []common.Hash{ @@ -929,7 +930,6 @@ func TestCoordinator_ReportBlocks(t *testing.T) { tp.outputsServedTopic, }, coordinatorAddress, - mock.Anything, ).Return([]logpoller.Log{}, nil) c := &coordinator{ @@ -977,6 +977,7 @@ func TestCoordinator_ReportBlocks(t *testing.T) { lp := getLogPoller(t, requestedBlocks, latestHeadNumber, true, true, lookbackBlocks) lp.On( "LogsWithSigs", + mock.Anything, int64(latestHeadNumber-lookbackBlocks), int64(latestHeadNumber), []common.Hash{ @@ -986,7 +987,6 @@ func TestCoordinator_ReportBlocks(t *testing.T) { tp.outputsServedTopic, }, coordinatorAddress, - mock.Anything, ).Return([]logpoller.Log{}, nil) c := &coordinator{ @@ -1035,10 +1035,11 @@ func TestCoordinator_ReportBlocks(t *testing.T) { lp.On("LatestBlock", mock.Anything). Return(logpoller.LogPollerBlock{BlockNumber: int64(latestHeadNumber)}, nil) - lp.On("GetBlocksRange", mock.Anything, append(requestedBlocks, latestHeadNumber-lookbackBlocks+1, latestHeadNumber), mock.Anything). + lp.On("GetBlocksRange", mock.Anything, append(requestedBlocks, latestHeadNumber-lookbackBlocks+1, latestHeadNumber)). Return(nil, errors.New("GetBlocks error")) lp.On( "LogsWithSigs", + mock.Anything, int64(latestHeadNumber-lookbackBlocks), int64(latestHeadNumber), []common.Hash{ @@ -1048,7 +1049,6 @@ func TestCoordinator_ReportBlocks(t *testing.T) { tp.outputsServedTopic, }, coordinatorAddress, - mock.Anything, ).Return([]logpoller.Log{ newRandomnessRequestedLog(t, 3, 195, 191, 0, coordinatorAddress), newRandomnessFulfillmentRequestedLog(t, 3, 195, 191, 1, 10_000_000, coordinatorAddress), @@ -1218,9 +1218,9 @@ func TestCoordinator_ReportIsOnchain(t *testing.T) { configDigest := common.BigToHash(big.NewInt(1337)) log := newNewTransmissionLog(t, beaconAddress, configDigest) log.BlockNumber = 195 - lp.On("IndexedLogs", tp.newTransmissionTopic, beaconAddress, 2, []common.Hash{ + lp.On("IndexedLogs", mock.Anything, tp.newTransmissionTopic, beaconAddress, 2, []common.Hash{ enrTopic, - }, logpoller.Confirmations(1), mock.Anything).Return([]logpoller.Log{log}, nil) + }, logpoller.Confirmations(1)).Return([]logpoller.Log{log}, nil) c := &coordinator{ lp: lp, @@ -1254,9 +1254,9 @@ func TestCoordinator_ReportIsOnchain(t *testing.T) { newConfigDigest := common.BigToHash(big.NewInt(8888)) log := newNewTransmissionLog(t, beaconAddress, oldConfigDigest) log.BlockNumber = 195 - lp.On("IndexedLogs", tp.newTransmissionTopic, beaconAddress, 2, []common.Hash{ + lp.On("IndexedLogs", mock.Anything, tp.newTransmissionTopic, beaconAddress, 2, []common.Hash{ enrTopic, - }, logpoller.Confirmations(1), mock.Anything).Return([]logpoller.Log{log}, nil) + }, logpoller.Confirmations(1)).Return([]logpoller.Log{log}, nil) c := &coordinator{ lp: lp, @@ -1281,9 +1281,9 @@ func TestCoordinator_ReportIsOnchain(t *testing.T) { epochAndRound := toEpochAndRoundUint40(epoch, round) enrTopic := common.BytesToHash(common.LeftPadBytes(epochAndRound.Bytes(), 32)) lp := lp_mocks.NewLogPoller(t) - lp.On("IndexedLogs", tp.newTransmissionTopic, beaconAddress, 2, []common.Hash{ + lp.On("IndexedLogs", mock.Anything, tp.newTransmissionTopic, beaconAddress, 2, []common.Hash{ enrTopic, - }, logpoller.Confirmations(1), mock.Anything).Return([]logpoller.Log{}, nil) + }, logpoller.Confirmations(1)).Return([]logpoller.Log{}, nil) c := &coordinator{ lp: lp, @@ -1751,7 +1751,7 @@ func getLogPoller( }) } - lp.On("GetBlocksRange", mock.Anything, requestedBlocks, mock.Anything). + lp.On("GetBlocksRange", mock.Anything, requestedBlocks). Return(logPollerBlocks, nil) return lp diff --git a/core/services/ocr2/plugins/ocr2vrf/internal/ocr2vrf_integration_test.go b/core/services/ocr2/plugins/ocr2vrf/internal/ocr2vrf_integration_test.go index 8d50b8076bb..8f743a370c2 100644 --- a/core/services/ocr2/plugins/ocr2vrf/internal/ocr2vrf_integration_test.go +++ b/core/services/ocr2/plugins/ocr2vrf/internal/ocr2vrf_integration_test.go @@ -47,7 +47,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest/heavyweight" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" - "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/chainlink" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/dkgencryptkey" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/dkgsignkey" @@ -246,7 +245,7 @@ func setupNodeOCR2( c.OCR2.Enabled = ptr(true) c.EVM[0].LogPollInterval = commonconfig.MustNewDuration(500 * time.Millisecond) - c.EVM[0].GasEstimator.LimitDefault = ptr[uint32](3_500_000) + c.EVM[0].GasEstimator.LimitDefault = ptr[uint64](3_500_000) c.EVM[0].Transactions.ForwardersEnabled = &useForwarders c.OCR2.ContractPollInterval = commonconfig.MustNewDuration(10 * time.Second) }) @@ -286,9 +285,9 @@ func setupNodeOCR2( b.Commit() // Add the forwarder to the node's forwarder manager. - forwarderORM := forwarders.NewORM(app.GetSqlxDB(), logger.TestLogger(t), config.Database()) + forwarderORM := forwarders.NewORM(app.GetDB()) chainID := ubig.Big(*b.Blockchain().Config().ChainID) - _, err = forwarderORM.CreateForwarder(faddr, chainID) + _, err = forwarderORM.CreateForwarder(testutils.Context(t), faddr, chainID) require.NoError(t, err) effectiveTransmitter = faddr } diff --git a/core/services/ocrbootstrap/delegate.go b/core/services/ocrbootstrap/delegate.go index 46c664007bc..9ed7cbea477 100644 --- a/core/services/ocrbootstrap/delegate.go +++ b/core/services/ocrbootstrap/delegate.go @@ -190,6 +190,6 @@ func (d *Delegate) AfterJobCreated(spec job.Job) { func (d *Delegate) BeforeJobDeleted(spec job.Job) {} // OnDeleteJob satisfies the job.Delegate interface. -func (d *Delegate) OnDeleteJob(spec job.Job, q pg.Queryer) error { +func (d *Delegate) OnDeleteJob(ctx context.Context, spec job.Job, q pg.Queryer) error { return nil } diff --git a/core/services/ocrcommon/arbitrum_block_translator_test.go b/core/services/ocrcommon/arbitrum_block_translator_test.go index 1ad3a6c5950..fa6875fb798 100644 --- a/core/services/ocrcommon/arbitrum_block_translator_test.go +++ b/core/services/ocrcommon/arbitrum_block_translator_test.go @@ -1,6 +1,7 @@ package ocrcommon_test import ( + "database/sql" "math/big" mrand "math/rand" "testing" @@ -10,7 +11,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/evmtest" "github.com/smartcontractkit/chainlink/v2/core/logger" - "github.com/smartcontractkit/chainlink/v2/core/null" "github.com/smartcontractkit/chainlink/v2/core/services/ocrcommon" "github.com/ethereum/go-ethereum/common" @@ -239,7 +239,7 @@ func generateDeterministicL2Blocks() (heads []evmtypes.Head) { for i := 0; i <= l2max; i++ { head := evmtypes.Head{ Number: int64(i), - L1BlockNumber: null.Int64From(l1BlockNumber), + L1BlockNumber: sql.NullInt64{Int64: l1BlockNumber, Valid: true}, Hash: utils.NewHash(), ParentHash: parentHash, } diff --git a/core/services/ocrcommon/block_translator.go b/core/services/ocrcommon/block_translator.go index dcac83fd2bd..bc7242a6019 100644 --- a/core/services/ocrcommon/block_translator.go +++ b/core/services/ocrcommon/block_translator.go @@ -21,7 +21,7 @@ func NewBlockTranslator(cfg Config, client evmclient.Client, lggr logger.Logger) switch cfg.ChainType() { case config.ChainArbitrum: return NewArbitrumBlockTranslator(client, lggr) - case config.ChainXDai, config.ChainMetis, config.ChainOptimismBedrock: + case "", config.ChainCelo, config.ChainGnosis, config.ChainKroma, config.ChainMetis, config.ChainOptimismBedrock, config.ChainScroll, config.ChainWeMix, config.ChainXDai, config.ChainZkSync: fallthrough default: return &l1BlockTranslator{} diff --git a/core/services/ocrcommon/data_source.go b/core/services/ocrcommon/data_source.go index 3dd7e4eebc0..011b8d0644d 100644 --- a/core/services/ocrcommon/data_source.go +++ b/core/services/ocrcommon/data_source.go @@ -13,6 +13,7 @@ import ( ocr2types "github.com/smartcontractkit/libocr/offchainreporting2plus/types" "github.com/smartcontractkit/chainlink/v2/core/bridges" + serializablebig "github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils/big" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/job" "github.com/smartcontractkit/chainlink/v2/core/services/pipeline" @@ -99,20 +100,22 @@ func NewInMemoryDataSource(pr pipeline.Runner, jb job.Job, spec pipeline.Spec, l } } -const defaultInMemoryCacheDuration = time.Minute * 5 +const defaultCacheFreshness = time.Minute * 5 +const dataSourceCacheKey = "dscache" -func NewInMemoryDataSourceCache(ds median.DataSource, cacheExpiryDuration time.Duration) (median.DataSource, error) { +func NewInMemoryDataSourceCache(ds median.DataSource, kvStore job.KVStore, cacheFreshness time.Duration) (median.DataSource, error) { inMemoryDS, ok := ds.(*inMemoryDataSource) if !ok { return nil, errors.Errorf("unsupported data source type: %T, only inMemoryDataSource supported", ds) } - if cacheExpiryDuration == 0 { - cacheExpiryDuration = defaultInMemoryCacheDuration + if cacheFreshness == 0 { + cacheFreshness = defaultCacheFreshness } dsCache := &inMemoryDataSourceCache{ - cacheExpiration: cacheExpiryDuration, + kvStore: kvStore, + cacheFreshness: cacheFreshness, inMemoryDataSource: inMemoryDS, } go func() { dsCache.updater() }() @@ -217,20 +220,23 @@ func (ds *inMemoryDataSource) Observe(ctx context.Context, timestamp ocr2types.R // If cache update is overdue Observe defaults to standard inMemoryDataSource behaviour. type inMemoryDataSourceCache struct { *inMemoryDataSource - cacheExpiration time.Duration + // cacheFreshness indicates duration between cache updates. + // Even if updates fail, previous values are returned. + cacheFreshness time.Duration mu sync.RWMutex latestUpdateErr error latestTrrs pipeline.TaskRunResults latestResult pipeline.FinalResult + kvStore job.KVStore } // updater periodically updates data source cache. func (ds *inMemoryDataSourceCache) updater() { - ticker := time.NewTicker(ds.cacheExpiration) + ticker := time.NewTicker(ds.cacheFreshness) for ; true; <-ticker.C { ctx, cancel := context.WithTimeout(context.Background(), time.Second*10) if err := ds.updateCache(ctx); err != nil { - ds.lggr.Infow("failed to update cache", "err", err) + ds.lggr.Warnf("failed to update cache", "err", err) } cancel() } @@ -239,15 +245,35 @@ func (ds *inMemoryDataSourceCache) updater() { func (ds *inMemoryDataSourceCache) updateCache(ctx context.Context) error { ds.mu.Lock() defer ds.mu.Unlock() - _, ds.latestTrrs, ds.latestUpdateErr = ds.executeRun(ctx) - if ds.latestUpdateErr != nil { - return errors.Wrapf(ds.latestUpdateErr, "error executing run for spec ID %v", ds.spec.ID) - } else if ds.latestTrrs.FinalResult(ds.lggr).HasErrors() { - ds.latestUpdateErr = errjoin.Join(ds.latestTrrs.FinalResult(ds.lggr).AllErrors...) + + // 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 { + previousUpdateErr := ds.latestUpdateErr + ds.latestUpdateErr = latestUpdateErr + // raise log severity + if previousUpdateErr != nil { + ds.lggr.Errorf("consecutive cache updates errored: previous err: %w new err: %w", previousUpdateErr, ds.latestUpdateErr) + } return errors.Wrapf(ds.latestUpdateErr, "error executing run for spec ID %v", ds.spec.ID) } + ds.latestTrrs = latestTrrs ds.latestResult = ds.latestTrrs.FinalResult(ds.lggr) + value, err := ds.inMemoryDataSource.parse(ds.latestResult) + if err != nil { + return errors.Wrapf(err, "invalid result") + } + + // backup in case data source fails continuously and node gets rebooted + if err = ds.kvStore.Store(dataSourceCacheKey, serializablebig.New(value)); err != nil { + ds.lggr.Errorf("failed to persist latest task run value", err) + } + return nil } @@ -261,7 +287,7 @@ func (ds *inMemoryDataSourceCache) get(ctx context.Context) (pipeline.FinalResul ds.mu.RUnlock() if err := ds.updateCache(ctx); err != nil { - ds.lggr.Errorw("failed to update cache, returning stale result now", "err", err) + ds.lggr.Warnf("failed to update cache, returning stale result now", "err", err) } ds.mu.RLock() @@ -270,7 +296,13 @@ func (ds *inMemoryDataSourceCache) get(ctx context.Context) (pipeline.FinalResul } func (ds *inMemoryDataSourceCache) Observe(ctx context.Context, timestamp ocr2types.ReportTimestamp) (*big.Int, error) { + var val serializablebig.Big latestResult, latestTrrs := ds.get(ctx) + if latestTrrs == nil { + ds.lggr.Errorf("cache is empty, returning persisted value now") + return val.ToInt(), ds.kvStore.Get(dataSourceCacheKey, &val) + } + setEATelemetry(ds.inMemoryDataSource, latestResult, latestTrrs, ObservationTimestamp{ Round: timestamp.Round, Epoch: timestamp.Epoch, diff --git a/core/services/ocrcommon/data_source_test.go b/core/services/ocrcommon/data_source_test.go index 2e4e07973a0..a921bc060ff 100644 --- a/core/services/ocrcommon/data_source_test.go +++ b/core/services/ocrcommon/data_source_test.go @@ -14,9 +14,11 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" + serializablebig "github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils/big" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/job" + "github.com/smartcontractkit/chainlink/v2/core/services/job/mocks" "github.com/smartcontractkit/chainlink/v2/core/services/ocrcommon" "github.com/smartcontractkit/chainlink/v2/core/services/pipeline" pipelinemocks "github.com/smartcontractkit/chainlink/v2/core/services/pipeline/mocks" @@ -47,13 +49,7 @@ func Test_InMemoryDataSource(t *testing.T) { } func Test_CachedInMemoryDataSourceErrHandling(t *testing.T) { - runner := pipelinemocks.NewRunner(t) - - ds := ocrcommon.NewInMemoryDataSource(runner, job.Job{}, pipeline.Spec{}, logger.TestLogger(t)) - dsCache, err := ocrcommon.NewInMemoryDataSourceCache(ds, time.Second*2) - require.NoError(t, err) - - changeResultValue := func(value string, returnErr, once bool) { + changeResultValue := func(runner *pipelinemocks.Runner, value string, returnErr, once bool) { result := pipeline.Result{ Value: value, Error: nil, @@ -74,23 +70,72 @@ func Test_CachedInMemoryDataSourceErrHandling(t *testing.T) { call.Once() } } - - mockVal := int64(1) - // Test if Observe notices that cache updater failed and can refresh the cache on its own - // 1. Set initial value - changeResultValue(fmt.Sprint(mockVal), false, true) - time.Sleep(time.Millisecond * 100) - val, err := dsCache.Observe(testutils.Context(t), types.ReportTimestamp{}) - require.NoError(t, err) - assert.Equal(t, mockVal, val.Int64()) - // 2. Set values again, but make it error in updater - changeResultValue(fmt.Sprint(mockVal+1), true, true) - time.Sleep(time.Second*2 + time.Millisecond*100) - // 3. Set value in between updates and call Observe (shouldn't flake because of huge wait time) - changeResultValue(fmt.Sprint(mockVal+2), false, false) - val, err = dsCache.Observe(testutils.Context(t), types.ReportTimestamp{}) - require.NoError(t, err) - assert.Equal(t, mockVal+2, val.Int64()) + t.Run("test normal cache updater fail recovery", func(t *testing.T) { + runner := pipelinemocks.NewRunner(t) + ds := ocrcommon.NewInMemoryDataSource(runner, job.Job{}, pipeline.Spec{}, logger.TestLogger(t)) + mockKVStore := mocks.KVStore{} + mockKVStore.On("Store", mock.Anything, mock.Anything).Return(nil) + mockKVStore.On("Get", mock.Anything, mock.AnythingOfType("*big.Big")).Return(nil) + dsCache, err := ocrcommon.NewInMemoryDataSourceCache(ds, &mockKVStore, time.Second*2) + require.NoError(t, err) + + mockVal := int64(1) + // Test if Observe notices that cache updater failed and can refresh the cache on its own + // 1. Set initial value + changeResultValue(runner, fmt.Sprint(mockVal), false, true) + time.Sleep(time.Millisecond * 100) + val, err := dsCache.Observe(testutils.Context(t), types.ReportTimestamp{}) + require.NoError(t, err) + assert.Equal(t, mockVal, val.Int64()) + // 2. Set values again, but make it error in updater + changeResultValue(runner, fmt.Sprint(mockVal+1), true, true) + time.Sleep(time.Second*2 + time.Millisecond*100) + // 3. Set value in between updates and call Observe (shouldn't flake because of huge wait time) + changeResultValue(runner, fmt.Sprint(mockVal+2), false, false) + val, err = dsCache.Observe(testutils.Context(t), types.ReportTimestamp{}) + require.NoError(t, err) + assert.Equal(t, mockVal+2, val.Int64()) + }) + + t.Run("test total updater fail with persisted value recovery", func(t *testing.T) { + persistedVal := big.NewInt(1337) + runner := pipelinemocks.NewRunner(t) + ds := ocrcommon.NewInMemoryDataSource(runner, job.Job{}, pipeline.Spec{}, logger.TestLogger(t)) + + mockKVStore := mocks.KVStore{} + mockKVStore.On("Get", mock.Anything, mock.AnythingOfType("*big.Big")).Return(nil).Run(func(args mock.Arguments) { + arg := args.Get(1).(*serializablebig.Big) + arg.ToInt().Set(persistedVal) + }) + + // set updater to a long time so that it doesn't log errors after the test is done + dsCache, err := ocrcommon.NewInMemoryDataSourceCache(ds, &mockKVStore, time.Hour*100) + require.NoError(t, err) + changeResultValue(runner, "-1", true, false) + + time.Sleep(time.Millisecond * 100) + val, err := dsCache.Observe(testutils.Context(t), types.ReportTimestamp{}) + require.NoError(t, err) + assert.Equal(t, persistedVal.String(), val.String()) + + }) + + t.Run("test total updater fail with no persisted value ", func(t *testing.T) { + runner := pipelinemocks.NewRunner(t) + ds := ocrcommon.NewInMemoryDataSource(runner, job.Job{}, pipeline.Spec{}, logger.TestLogger(t)) + + mockKVStore := mocks.KVStore{} + mockKVStore.On("Get", mock.Anything, mock.AnythingOfType("*big.Big")).Return(nil).Return(assert.AnError) + + // set updater to a long time so that it doesn't log errors after the test is done + dsCache, err := ocrcommon.NewInMemoryDataSourceCache(ds, &mockKVStore, time.Hour*100) + require.NoError(t, err) + changeResultValue(runner, "-1", true, false) + + time.Sleep(time.Millisecond * 100) + _, err = dsCache.Observe(testutils.Context(t), types.ReportTimestamp{}) + require.Error(t, err) + }) } func Test_InMemoryDataSourceWithProm(t *testing.T) { diff --git a/core/services/ocrcommon/telemetry_test.go b/core/services/ocrcommon/telemetry_test.go index caa8ccfcc01..e7a59622d97 100644 --- a/core/services/ocrcommon/telemetry_test.go +++ b/core/services/ocrcommon/telemetry_test.go @@ -19,11 +19,11 @@ import ( mercuryv1 "github.com/smartcontractkit/chainlink-common/pkg/types/mercury/v1" mercuryv2 "github.com/smartcontractkit/chainlink-common/pkg/types/mercury/v2" + evmtypes "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" "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/logger" "github.com/smartcontractkit/chainlink/v2/core/services/job" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ethkey" "github.com/smartcontractkit/chainlink/v2/core/services/pipeline" "github.com/smartcontractkit/chainlink/v2/core/services/synchronization" "github.com/smartcontractkit/chainlink/v2/core/services/synchronization/mocks" @@ -126,7 +126,7 @@ func TestGetContract(t *testing.T) { job: &j, lggr: nil, } - contractAddress := ethkey.EIP55Address(utils.RandomAddress().String()) + contractAddress := evmtypes.EIP55Address(utils.RandomAddress().String()) j.Type = job.Type(pipeline.OffchainReportingJobType) j.OCROracleSpec.ContractAddress = contractAddress @@ -208,7 +208,7 @@ func TestSendEATelemetry(t *testing.T) { jb := job.Job{ Type: job.Type(pipeline.OffchainReportingJobType), OCROracleSpec: &job.OCROracleSpec{ - ContractAddress: ethkey.EIP55AddressFromAddress(feedAddress), + ContractAddress: evmtypes.EIP55AddressFromAddress(feedAddress), CaptureEATelemetry: true, EVMChainID: (*ubig.Big)(big.NewInt(9)), }, diff --git a/core/services/ocrcommon/transmitter.go b/core/services/ocrcommon/transmitter.go index 1c4173798ea..423db2316a7 100644 --- a/core/services/ocrcommon/transmitter.go +++ b/core/services/ocrcommon/transmitter.go @@ -27,7 +27,7 @@ type Transmitter interface { type transmitter struct { txm txManager fromAddresses []common.Address - gasLimit uint32 + gasLimit uint64 effectiveTransmitterAddress common.Address strategy types.TxStrategy checker txmgr.TransmitCheckerSpec @@ -39,7 +39,7 @@ type transmitter struct { func NewTransmitter( txm txManager, fromAddresses []common.Address, - gasLimit uint32, + gasLimit uint64, effectiveTransmitterAddress common.Address, strategy types.TxStrategy, checker txmgr.TransmitCheckerSpec, diff --git a/core/services/ocrcommon/transmitter_test.go b/core/services/ocrcommon/transmitter_test.go index d954da869bc..c56896ab2b9 100644 --- a/core/services/ocrcommon/transmitter_test.go +++ b/core/services/ocrcommon/transmitter_test.go @@ -31,7 +31,7 @@ func Test_DefaultTransmitter_CreateEthTransaction(t *testing.T) { _, fromAddress := cltest.MustInsertRandomKey(t, ethKeyStore) - gasLimit := uint32(1000) + gasLimit := uint64(1000) chainID := big.NewInt(0) effectiveTransmitterAddress := fromAddress toAddress := testutils.NewAddress() @@ -73,7 +73,7 @@ func Test_DefaultTransmitter_Forwarding_Enabled_CreateEthTransaction(t *testing. _, fromAddress := cltest.MustInsertRandomKey(t, ethKeyStore) _, fromAddress2 := cltest.MustInsertRandomKey(t, ethKeyStore) - gasLimit := uint32(1000) + gasLimit := uint64(1000) chainID := big.NewInt(0) effectiveTransmitterAddress := common.Address{} toAddress := testutils.NewAddress() @@ -124,7 +124,7 @@ func Test_DefaultTransmitter_Forwarding_Enabled_CreateEthTransaction_Round_Robin fromAddress := common.Address{} - gasLimit := uint32(1000) + gasLimit := uint64(1000) chainID := big.NewInt(0) effectiveTransmitterAddress := common.Address{} toAddress := testutils.NewAddress() @@ -156,7 +156,7 @@ func Test_DefaultTransmitter_Forwarding_Enabled_CreateEthTransaction_No_Keystore _, fromAddress := cltest.MustInsertRandomKey(t, ethKeyStore) _, fromAddress2 := cltest.MustInsertRandomKey(t, ethKeyStore) - gasLimit := uint32(1000) + gasLimit := uint64(1000) chainID := big.NewInt(0) effectiveTransmitterAddress := common.Address{} txm := txmmocks.NewMockEvmTxManager(t) diff --git a/core/services/p2p/peer.go b/core/services/p2p/peer.go new file mode 100644 index 00000000000..2ed84f6a3f1 --- /dev/null +++ b/core/services/p2p/peer.go @@ -0,0 +1,228 @@ +package p2p + +import ( + "context" + "crypto/ed25519" + "fmt" + "sync" + "time" + + "github.com/prometheus/client_golang/prometheus" + "github.com/smartcontractkit/libocr/networking/ragedisco" + nettypes "github.com/smartcontractkit/libocr/networking/types" + "github.com/smartcontractkit/libocr/ragep2p" + ragetypes "github.com/smartcontractkit/libocr/ragep2p/types" + + commonlogger "github.com/smartcontractkit/chainlink-common/pkg/logger" + "github.com/smartcontractkit/chainlink-common/pkg/services" + "github.com/smartcontractkit/chainlink/v2/core/logger" + p2ptypes "github.com/smartcontractkit/chainlink/v2/core/services/p2p/types" +) + +var ( + defaultGroupID = [32]byte{0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01} + defaultStreamName = "stream" + defaultRecvChSize = 10000 +) + +type PeerConfig struct { + PrivateKey ed25519.PrivateKey + // List of : addresses. + ListenAddresses []string + // List of : addresses. If empty, defaults to ListenAddresses. + AnnounceAddresses []string + Bootstrappers []ragetypes.PeerInfo + // Every DeltaReconcile a Reconcile message is sent to every peer. + DeltaReconcile time.Duration + // Dial attempts will be at least DeltaDial apart. + DeltaDial time.Duration + DiscovererDatabase nettypes.DiscovererDatabase + MetricsRegisterer prometheus.Registerer +} + +type peer struct { + streams map[ragetypes.PeerID]*ragep2p.Stream + cfg PeerConfig + isBootstrap bool + host *ragep2p.Host + discoverer *ragedisco.Ragep2pDiscoverer + myID ragetypes.PeerID + recvCh chan p2ptypes.Message + + stopCh services.StopChan + wg sync.WaitGroup + lggr logger.Logger +} + +var _ p2ptypes.Peer = &peer{} + +func NewPeer(cfg PeerConfig, lggr logger.Logger) (*peer, error) { + peerID, err := ragetypes.PeerIDFromPrivateKey(cfg.PrivateKey) + if err != nil { + return nil, fmt.Errorf("error extracting v2 peer ID from private key: %w", err) + } + isBootstrap := false + for _, info := range cfg.Bootstrappers { + if info.ID == peerID { + isBootstrap = true + break + } + } + + announceAddresses := cfg.AnnounceAddresses + if len(cfg.AnnounceAddresses) == 0 { + announceAddresses = cfg.ListenAddresses + } + + discoverer := ragedisco.NewRagep2pDiscoverer(cfg.DeltaReconcile, announceAddresses, cfg.DiscovererDatabase, cfg.MetricsRegisterer) + commonLggr := commonlogger.NewOCRWrapper(lggr, true, func(string) {}) + + host, err := ragep2p.NewHost( + ragep2p.HostConfig{DurationBetweenDials: cfg.DeltaDial}, + cfg.PrivateKey, + cfg.ListenAddresses, + discoverer, + commonLggr, + cfg.MetricsRegisterer, + ) + if err != nil { + return nil, fmt.Errorf("failed to construct ragep2p host: %w", err) + } + + return &peer{ + streams: make(map[ragetypes.PeerID]*ragep2p.Stream), + cfg: cfg, + isBootstrap: isBootstrap, + host: host, + discoverer: discoverer, + myID: peerID, + recvCh: make(chan p2ptypes.Message, defaultRecvChSize), + stopCh: make(services.StopChan), + lggr: lggr.Named("P2PPeer"), + }, nil +} + +func (p *peer) UpdateConnections(peers map[ragetypes.PeerID]p2ptypes.StreamConfig) error { + p.lggr.Infow("updating peer addresses", "peers", peers) + if !p.isBootstrap { + if err := p.recreateStreams(peers); err != nil { + return err + } + } + + if err := p.discoverer.RemoveGroup(defaultGroupID); err != nil { + p.lggr.Warnw("failed to remove old group", "groupID", defaultGroupID) + } + peerIDs := []ragetypes.PeerID{} + for pid := range peers { + peerIDs = append(peerIDs, pid) + } + if err := p.discoverer.AddGroup(defaultGroupID, peerIDs, p.cfg.Bootstrappers); err != nil { + p.lggr.Warnw("failed to add group", "groupID", defaultGroupID) + return err + } + return nil +} + +func (p *peer) recreateStreams(peers map[ragetypes.PeerID]p2ptypes.StreamConfig) error { + for pid, cfg := range peers { + pid := pid + if pid == p.myID { // don't create a self-stream + continue + } + _, ok := p.streams[pid] + if ok { // already have a stream with this peer + continue + } + + stream, err := p.host.NewStream( + pid, + defaultStreamName, + cfg.OutgoingMessageBufferSize, + cfg.IncomingMessageBufferSize, + cfg.MaxMessageLenBytes, + cfg.MessageRateLimiter, + cfg.BytesRateLimiter, + ) + if err != nil { + return fmt.Errorf("failed to create stream to peer id: %q: %w", pid, err) + } + p.lggr.Infow("adding peer", "peerID", pid) + p.streams[pid] = stream + p.wg.Add(1) + go p.recvLoopSingle(pid, stream.ReceiveMessages()) + } + // remove obsolete streams + for pid, stream := range p.streams { + _, ok := peers[pid] + if !ok { + p.lggr.Infow("removing peer", "peerID", pid) + delete(p.streams, pid) + err := stream.Close() + if err != nil { + p.lggr.Errorw("failed to close stream", "peerID", pid, "error", err) + } + } + } + return nil +} + +func (p *peer) Start(ctx context.Context) error { + err := p.host.Start() + if err != nil { + return fmt.Errorf("failed to start ragep2p host: %w", err) + } + p.lggr.Info("peer started") + return nil +} + +func (p *peer) recvLoopSingle(pid ragetypes.PeerID, ch <-chan []byte) { + p.lggr.Infow("starting recvLoopSingle", "peerID", pid) + defer p.wg.Done() + for { + select { + case <-p.stopCh: + p.lggr.Infow("stopped - exiting recvLoopSingle", "peerID", pid) + return + case msg, ok := <-ch: + if !ok { + p.lggr.Infow("channel closed - exiting recvLoopSingle", "peerID", pid) + return + } + p.recvCh <- p2ptypes.Message{Sender: pid, Payload: msg} + } + } +} + +func (p *peer) Send(peerID ragetypes.PeerID, msg []byte) error { + stream, ok := p.streams[peerID] + if !ok { + return fmt.Errorf("no stream to peer id: %q", peerID) + } + stream.SendMessage(msg) + return nil +} + +func (p *peer) Receive() <-chan p2ptypes.Message { + return p.recvCh +} + +func (p *peer) Close() error { + err := p.host.Close() + close(p.stopCh) + p.wg.Wait() + p.lggr.Info("peer closed") + return err +} + +func (p *peer) Ready() error { + return nil +} + +func (p *peer) HealthReport() map[string]error { + return nil +} + +func (p *peer) Name() string { + return "P2PPeer" +} diff --git a/core/services/p2p/peer_test.go b/core/services/p2p/peer_test.go new file mode 100644 index 00000000000..004f299d781 --- /dev/null +++ b/core/services/p2p/peer_test.go @@ -0,0 +1,50 @@ +package p2p_test + +import ( + "crypto/ed25519" + "crypto/rand" + "fmt" + "testing" + "time" + + "github.com/hashicorp/consul/sdk/freeport" + "github.com/prometheus/client_golang/prometheus" + ragetypes "github.com/smartcontractkit/libocr/ragep2p/types" + "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" + "github.com/smartcontractkit/chainlink/v2/core/logger" + "github.com/smartcontractkit/chainlink/v2/core/services/p2p" +) + +func TestPeer_CleanStartClose(t *testing.T) { + lggr := logger.TestLogger(t) + port := freeport.GetOne(t) + privKey, _ := newKeyPair(t) + + reg := prometheus.NewRegistry() + peerConfig := p2p.PeerConfig{ + PrivateKey: privKey, + ListenAddresses: []string{fmt.Sprintf("127.0.0.1:%d", port)}, + + DeltaReconcile: time.Second * 5, + DeltaDial: time.Second * 5, + DiscovererDatabase: p2p.NewInMemoryDiscovererDatabase(), + MetricsRegisterer: reg, + } + + peer, err := p2p.NewPeer(peerConfig, lggr) + require.NoError(t, err) + err = peer.Start(testutils.Context(t)) + require.NoError(t, err) + err = peer.Close() + require.NoError(t, err) +} + +func newKeyPair(t *testing.T) (ed25519.PrivateKey, ragetypes.PeerID) { + _, privKey, err := ed25519.GenerateKey(rand.Reader) + require.NoError(t, err) + peerID, err := ragetypes.PeerIDFromPrivateKey(privKey) + require.NoError(t, err) + return privKey, peerID +} diff --git a/core/services/p2p/types/mocks/peer.go b/core/services/p2p/types/mocks/peer.go new file mode 100644 index 00000000000..ac4e4eee73d --- /dev/null +++ b/core/services/p2p/types/mocks/peer.go @@ -0,0 +1,179 @@ +// Code generated by mockery v2.38.0. DO NOT EDIT. + +package mocks + +import ( + context "context" + + ragep2ptypes "github.com/smartcontractkit/libocr/ragep2p/types" + mock "github.com/stretchr/testify/mock" + + types "github.com/smartcontractkit/chainlink/v2/core/services/p2p/types" +) + +// Peer is an autogenerated mock type for the Peer type +type Peer struct { + mock.Mock +} + +// Close provides a mock function with given fields: +func (_m *Peer) Close() error { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for Close") + } + + var r0 error + if rf, ok := ret.Get(0).(func() error); ok { + r0 = rf() + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// HealthReport provides a mock function with given fields: +func (_m *Peer) HealthReport() map[string]error { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for HealthReport") + } + + var r0 map[string]error + if rf, ok := ret.Get(0).(func() map[string]error); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(map[string]error) + } + } + + return r0 +} + +// Name provides a mock function with given fields: +func (_m *Peer) Name() string { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for Name") + } + + var r0 string + if rf, ok := ret.Get(0).(func() string); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(string) + } + + return r0 +} + +// Ready provides a mock function with given fields: +func (_m *Peer) Ready() error { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for Ready") + } + + var r0 error + if rf, ok := ret.Get(0).(func() error); ok { + r0 = rf() + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// Receive provides a mock function with given fields: +func (_m *Peer) Receive() <-chan types.Message { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for Receive") + } + + var r0 <-chan types.Message + if rf, ok := ret.Get(0).(func() <-chan types.Message); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(<-chan types.Message) + } + } + + return r0 +} + +// Send provides a mock function with given fields: peerID, msg +func (_m *Peer) Send(peerID ragep2ptypes.PeerID, msg []byte) error { + ret := _m.Called(peerID, msg) + + if len(ret) == 0 { + panic("no return value specified for Send") + } + + var r0 error + if rf, ok := ret.Get(0).(func(ragep2ptypes.PeerID, []byte) error); ok { + r0 = rf(peerID, msg) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// Start provides a mock function with given fields: _a0 +func (_m *Peer) Start(_a0 context.Context) error { + ret := _m.Called(_a0) + + if len(ret) == 0 { + panic("no return value specified for Start") + } + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context) error); ok { + r0 = rf(_a0) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// UpdateConnections provides a mock function with given fields: peers +func (_m *Peer) UpdateConnections(peers map[ragep2ptypes.PeerID]types.StreamConfig) error { + ret := _m.Called(peers) + + if len(ret) == 0 { + panic("no return value specified for UpdateConnections") + } + + var r0 error + if rf, ok := ret.Get(0).(func(map[ragep2ptypes.PeerID]types.StreamConfig) error); ok { + r0 = rf(peers) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// NewPeer creates a new instance of Peer. 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 NewPeer(t interface { + mock.TestingT + Cleanup(func()) +}) *Peer { + mock := &Peer{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/core/services/p2p/types/mocks/peer_wrapper.go b/core/services/p2p/types/mocks/peer_wrapper.go new file mode 100644 index 00000000000..02347cf6b86 --- /dev/null +++ b/core/services/p2p/types/mocks/peer_wrapper.go @@ -0,0 +1,141 @@ +// Code generated by mockery v2.38.0. DO NOT EDIT. + +package mocks + +import ( + context "context" + + types "github.com/smartcontractkit/chainlink/v2/core/services/p2p/types" + mock "github.com/stretchr/testify/mock" +) + +// PeerWrapper is an autogenerated mock type for the PeerWrapper type +type PeerWrapper struct { + mock.Mock +} + +// Close provides a mock function with given fields: +func (_m *PeerWrapper) Close() error { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for Close") + } + + var r0 error + if rf, ok := ret.Get(0).(func() error); ok { + r0 = rf() + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// GetPeer provides a mock function with given fields: +func (_m *PeerWrapper) GetPeer() types.Peer { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetPeer") + } + + var r0 types.Peer + if rf, ok := ret.Get(0).(func() types.Peer); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(types.Peer) + } + } + + return r0 +} + +// HealthReport provides a mock function with given fields: +func (_m *PeerWrapper) HealthReport() map[string]error { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for HealthReport") + } + + var r0 map[string]error + if rf, ok := ret.Get(0).(func() map[string]error); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(map[string]error) + } + } + + return r0 +} + +// Name provides a mock function with given fields: +func (_m *PeerWrapper) Name() string { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for Name") + } + + var r0 string + if rf, ok := ret.Get(0).(func() string); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(string) + } + + return r0 +} + +// Ready provides a mock function with given fields: +func (_m *PeerWrapper) Ready() error { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for Ready") + } + + var r0 error + if rf, ok := ret.Get(0).(func() error); ok { + r0 = rf() + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// Start provides a mock function with given fields: _a0 +func (_m *PeerWrapper) Start(_a0 context.Context) error { + ret := _m.Called(_a0) + + if len(ret) == 0 { + panic("no return value specified for Start") + } + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context) error); ok { + r0 = rf(_a0) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// NewPeerWrapper creates a new instance of PeerWrapper. 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 NewPeerWrapper(t interface { + mock.TestingT + Cleanup(func()) +}) *PeerWrapper { + mock := &PeerWrapper{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/core/services/p2p/types/types.go b/core/services/p2p/types/types.go new file mode 100644 index 00000000000..0f395d75409 --- /dev/null +++ b/core/services/p2p/types/types.go @@ -0,0 +1,35 @@ +package types + +import ( + "github.com/smartcontractkit/libocr/ragep2p" + ragetypes "github.com/smartcontractkit/libocr/ragep2p/types" + + "github.com/smartcontractkit/chainlink-common/pkg/services" +) + +//go:generate mockery --quiet --name Peer --output ./mocks/ --case=underscore +type Peer interface { + services.Service + UpdateConnections(peers map[ragetypes.PeerID]StreamConfig) error + Send(peerID ragetypes.PeerID, msg []byte) error + Receive() <-chan Message +} + +//go:generate mockery --quiet --name PeerWrapper --output ./mocks/ --case=underscore +type PeerWrapper interface { + services.Service + GetPeer() Peer +} + +type Message struct { + Sender ragetypes.PeerID + Payload []byte +} + +type StreamConfig struct { + IncomingMessageBufferSize int + OutgoingMessageBufferSize int + MaxMessageLenBytes int + MessageRateLimiter ragep2p.TokenBucketParams + BytesRateLimiter ragep2p.TokenBucketParams +} diff --git a/core/services/p2p/utils.go b/core/services/p2p/utils.go new file mode 100644 index 00000000000..44898f443eb --- /dev/null +++ b/core/services/p2p/utils.go @@ -0,0 +1,32 @@ +package p2p + +import ( + "context" + + ocrnetworking "github.com/smartcontractkit/libocr/networking/types" +) + +var _ ocrnetworking.DiscovererDatabase = &InMemoryDiscovererDatabase{} + +type InMemoryDiscovererDatabase struct { + store map[string][]byte +} + +func NewInMemoryDiscovererDatabase() *InMemoryDiscovererDatabase { + return &InMemoryDiscovererDatabase{make(map[string][]byte)} +} + +func (d *InMemoryDiscovererDatabase) StoreAnnouncement(ctx context.Context, peerID string, ann []byte) error { + d.store[peerID] = ann + return nil +} + +func (d *InMemoryDiscovererDatabase) ReadAnnouncements(ctx context.Context, peerIDs []string) (map[string][]byte, error) { + ret := make(map[string][]byte) + for _, peerID := range peerIDs { + if ann, ok := d.store[peerID]; ok { + ret[peerID] = ann + } + } + return ret, nil +} diff --git a/core/services/p2p/utils_test.go b/core/services/p2p/utils_test.go new file mode 100644 index 00000000000..968633cca1a --- /dev/null +++ b/core/services/p2p/utils_test.go @@ -0,0 +1,29 @@ +package p2p_test + +import ( + "testing" + + "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" + "github.com/smartcontractkit/chainlink/v2/core/services/p2p" +) + +const ( + peerID1 = "peer1" + peerID2 = "peer2" + ann1 = "announcement1" + ann2 = "announcement2" +) + +func TestInMemoryDiscovererDatabase(t *testing.T) { + db := p2p.NewInMemoryDiscovererDatabase() + require.NoError(t, db.StoreAnnouncement(testutils.Context(t), peerID1, []byte(ann1))) + require.NoError(t, db.StoreAnnouncement(testutils.Context(t), peerID2, []byte(ann2))) + state, err := db.ReadAnnouncements(testutils.Context(t), []string{peerID1, peerID2}) + require.NoError(t, err) + require.Equal(t, map[string][]byte{peerID1: []byte(ann1), peerID2: []byte(ann2)}, state) + state, err = db.ReadAnnouncements(testutils.Context(t), []string{peerID2}) + require.NoError(t, err) + require.Equal(t, map[string][]byte{peerID2: []byte(ann2)}, state) +} diff --git a/core/services/p2p/wrapper/wrapper.go b/core/services/p2p/wrapper/wrapper.go new file mode 100644 index 00000000000..138d1ef21fc --- /dev/null +++ b/core/services/p2p/wrapper/wrapper.go @@ -0,0 +1,120 @@ +package wrapper + +import ( + "context" + "fmt" + + "github.com/prometheus/client_golang/prometheus" + + "github.com/smartcontractkit/libocr/commontypes" + ragetypes "github.com/smartcontractkit/libocr/ragep2p/types" + + "github.com/smartcontractkit/chainlink/v2/core/config" + "github.com/smartcontractkit/chainlink/v2/core/logger" + "github.com/smartcontractkit/chainlink/v2/core/services/keystore" + "github.com/smartcontractkit/chainlink/v2/core/services/p2p" + "github.com/smartcontractkit/chainlink/v2/core/services/p2p/types" +) + +type peerWrapper struct { + peer types.Peer + keystoreP2P keystore.P2P + p2pConfig config.P2P + lggr logger.Logger +} + +var _ types.PeerWrapper = &peerWrapper{} + +func NewExternalPeerWrapper(keystoreP2P keystore.P2P, p2pConfig config.P2P, lggr logger.Logger) *peerWrapper { + return &peerWrapper{ + keystoreP2P: keystoreP2P, + p2pConfig: p2pConfig, + lggr: lggr, + } +} + +func (e *peerWrapper) GetPeer() types.Peer { + return e.peer +} + +// convert to "external" P2P PeerConfig, which is independent of OCR +// this has to be done in Start() because keystore is not unlocked at construction time +func convertPeerConfig(keystoreP2P keystore.P2P, p2pConfig config.P2P) (p2p.PeerConfig, error) { + key, err := keystoreP2P.GetOrFirst(p2pConfig.PeerID()) + if err != nil { + return p2p.PeerConfig{}, err + } + + // TODO(KS-106): use real DB + discovererDB := p2p.NewInMemoryDiscovererDatabase() + bootstrappers, err := convertBootstrapperLocators(p2pConfig.V2().DefaultBootstrappers()) + if err != nil { + return p2p.PeerConfig{}, err + } + + peerConfig := p2p.PeerConfig{ + PrivateKey: key.PrivKey, + + ListenAddresses: p2pConfig.V2().ListenAddresses(), + AnnounceAddresses: p2pConfig.V2().AnnounceAddresses(), + Bootstrappers: bootstrappers, + + DeltaReconcile: p2pConfig.V2().DeltaReconcile().Duration(), + DeltaDial: p2pConfig.V2().DeltaDial().Duration(), + DiscovererDatabase: discovererDB, + + MetricsRegisterer: prometheus.DefaultRegisterer, + } + + return peerConfig, nil +} + +func convertBootstrapperLocators(bootstrappers []commontypes.BootstrapperLocator) ([]ragetypes.PeerInfo, error) { + infos := []ragetypes.PeerInfo{} + for _, b := range bootstrappers { + addrs := make([]ragetypes.Address, len(b.Addrs)) + for i, a := range b.Addrs { + addrs[i] = ragetypes.Address(a) + } + var rageID ragetypes.PeerID + err := rageID.UnmarshalText([]byte(b.PeerID)) + if err != nil { + return nil, fmt.Errorf("failed to unmarshal v2 peer ID (%q) from BootstrapperLocator: %w", b.PeerID, err) + } + infos = append(infos, ragetypes.PeerInfo{ + ID: rageID, + Addrs: addrs, + }) + } + return infos, nil +} + +func (e *peerWrapper) Start(ctx context.Context) error { + cfg, err := convertPeerConfig(e.keystoreP2P, e.p2pConfig) + if err != nil { + return err + } + e.lggr.Info("Starting external P2P peer") + peer, err := p2p.NewPeer(cfg, e.lggr) + if err != nil { + return err + } + e.peer = peer + return e.peer.Start(ctx) +} + +func (e *peerWrapper) Close() error { + return e.peer.Close() +} + +func (e *peerWrapper) Ready() error { + return nil +} + +func (e *peerWrapper) HealthReport() map[string]error { + return nil +} + +func (e *peerWrapper) Name() string { + return "PeerWrapper" +} diff --git a/core/services/p2p/wrapper/wrapper_test.go b/core/services/p2p/wrapper/wrapper_test.go new file mode 100644 index 00000000000..dd91ecaee47 --- /dev/null +++ b/core/services/p2p/wrapper/wrapper_test.go @@ -0,0 +1,37 @@ +package wrapper_test + +import ( + "fmt" + "testing" + + "github.com/hashicorp/consul/sdk/freeport" + "github.com/stretchr/testify/mock" + "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" + "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/configtest" + "github.com/smartcontractkit/chainlink/v2/core/logger" + "github.com/smartcontractkit/chainlink/v2/core/services/chainlink" + "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/p2pkey" + ksmocks "github.com/smartcontractkit/chainlink/v2/core/services/keystore/mocks" + "github.com/smartcontractkit/chainlink/v2/core/services/p2p/wrapper" +) + +func TestPeerWrapper_CleanStartClose(t *testing.T) { + lggr := logger.TestLogger(t) + port := freeport.GetOne(t) + cfg := configtest.NewGeneralConfig(t, func(c *chainlink.Config, s *chainlink.Secrets) { + enabled := true + c.Capabilities.Peering.V2.Enabled = &enabled + c.Capabilities.Peering.V2.ListenAddresses = &[]string{fmt.Sprintf("127.0.0.1:%d", port)} + }) + keystoreP2P := ksmocks.NewP2P(t) + key, err := p2pkey.NewV2() + require.NoError(t, err) + keystoreP2P.On("GetOrFirst", mock.Anything).Return(key, nil) + + wrapper := wrapper.NewExternalPeerWrapper(keystoreP2P, cfg.Capabilities().Peering(), lggr) + require.NotNil(t, wrapper) + require.NoError(t, wrapper.Start(testutils.Context(t))) + require.NoError(t, wrapper.Close()) +} diff --git a/core/services/pg/q.go b/core/services/pg/q.go index 52225ac6168..433023ddbc9 100644 --- a/core/services/pg/q.go +++ b/core/services/pg/q.go @@ -10,22 +10,16 @@ import ( "time" "github.com/ethereum/go-ethereum/common" + "github.com/jmoiron/sqlx" "github.com/lib/pq" "github.com/pkg/errors" - "github.com/prometheus/client_golang/prometheus" - "github.com/prometheus/client_golang/prometheus/promauto" - - "github.com/jmoiron/sqlx" "github.com/smartcontractkit/chainlink-common/pkg/logger" + "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" ) -var promSQLQueryTime = promauto.NewHistogram(prometheus.HistogramOpts{ - Name: "sql_query_timeout_percent", - Help: "SQL query time as a pecentage of timeout.", - Buckets: []float64{10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120}, -}) - +// QOpt is deprecated. Use [sqlutil.DataSource] with [sqlutil.QueryHook]s instead. +// // QOpt pattern for ORM methods aims to clarify usage and remove some common footguns, notably: // // 1. It should be easy and obvious how to pass a parent context or a transaction into an ORM method @@ -114,6 +108,7 @@ type QConfig interface { // // This is not the prettiest construct but without macros its about the best we // can do. +// Deprecated: Use a `sqlutil.DataSource` with `sqlutil.QueryHook`s instead type Q struct { Queryer ParentCtx context.Context @@ -385,5 +380,5 @@ func (q *queryLogger) postSqlLog(ctx context.Context, begin time.Time) { q.logger.Warnw("SLOW SQL QUERY", kvs...) } - promSQLQueryTime.Observe(pct) + sqlutil.PromSQLQueryTime.Observe(pct) } diff --git a/core/services/pg/sqlx.go b/core/services/pg/sqlx.go index c252edf9f5a..76eae792cbf 100644 --- a/core/services/pg/sqlx.go +++ b/core/services/pg/sqlx.go @@ -12,6 +12,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/logger" ) +// Queryer is deprecated. Use sqlutil.DataSource instead type Queryer interface { sqlx.Ext sqlx.ExtContext diff --git a/core/services/pipeline/common.go b/core/services/pipeline/common.go index 6e7ad1e7e4e..a6b573d8583 100644 --- a/core/services/pipeline/common.go +++ b/core/services/pipeline/common.go @@ -71,6 +71,7 @@ type ( MaxRunDuration() time.Duration ReaperInterval() time.Duration ReaperThreshold() time.Duration + VerboseLogging() bool } BridgeConfig interface { @@ -200,8 +201,8 @@ func (result FinalResult) SingularResult() (Result, error) { // TaskSpecID will always be non-zero type TaskRunResult struct { ID uuid.UUID - Task Task - TaskRun TaskRun + Task Task `json:"-"` + TaskRun TaskRun `json:"-"` Result Result Attempts uint CreatedAt time.Time @@ -560,9 +561,9 @@ func CheckInputs(inputs []Result, minLen, maxLen, maxErrors int) ([]interface{}, var ErrInvalidEVMChainID = errors.New("invalid EVM chain ID") -func SelectGasLimit(ge config.GasEstimator, jobType string, specGasLimit *uint32) uint32 { +func SelectGasLimit(ge config.GasEstimator, jobType string, specGasLimit *uint32) uint64 { if specGasLimit != nil { - return *specGasLimit + return uint64(*specGasLimit) } jt := ge.LimitJobType() @@ -583,7 +584,7 @@ func SelectGasLimit(ge config.GasEstimator, jobType string, specGasLimit *uint32 } if jobTypeGasLimit != nil { - return *jobTypeGasLimit + return uint64(*jobTypeGasLimit) } return ge.LimitDefault() } diff --git a/core/services/pipeline/common_test.go b/core/services/pipeline/common_test.go index 7da80d3af47..ea3f4d90c3b 100644 --- a/core/services/pipeline/common_test.go +++ b/core/services/pipeline/common_test.go @@ -324,7 +324,7 @@ func TestSelectGasLimit(t *testing.T) { t.Parallel() gcfg := configtest.NewGeneralConfig(t, func(c *chainlink.Config, s *chainlink.Secrets) { - c.EVM[0].GasEstimator.LimitDefault = ptr(uint32(999)) + c.EVM[0].GasEstimator.LimitDefault = ptr(uint64(999)) c.EVM[0].GasEstimator.LimitJobType = toml.GasLimitJobType{ DR: ptr(uint32(100)), VRF: ptr(uint32(101)), @@ -339,42 +339,42 @@ func TestSelectGasLimit(t *testing.T) { t.Run("spec defined gas limit", func(t *testing.T) { var specGasLimit uint32 = 1 gasLimit := pipeline.SelectGasLimit(cfg.EVM().GasEstimator(), pipeline.DirectRequestJobType, &specGasLimit) - assert.Equal(t, uint32(1), gasLimit) + assert.Equal(t, uint64(1), gasLimit) }) t.Run("direct request specific gas limit", func(t *testing.T) { gasLimit := pipeline.SelectGasLimit(cfg.EVM().GasEstimator(), pipeline.DirectRequestJobType, nil) - assert.Equal(t, uint32(100), gasLimit) + assert.Equal(t, uint64(100), gasLimit) }) t.Run("OCR specific gas limit", func(t *testing.T) { gasLimit := pipeline.SelectGasLimit(cfg.EVM().GasEstimator(), pipeline.OffchainReportingJobType, nil) - assert.Equal(t, uint32(103), gasLimit) + assert.Equal(t, uint64(103), gasLimit) }) t.Run("OCR2 specific gas limit", func(t *testing.T) { gasLimit := pipeline.SelectGasLimit(cfg.EVM().GasEstimator(), pipeline.OffchainReporting2JobType, nil) - assert.Equal(t, uint32(105), gasLimit) + assert.Equal(t, uint64(105), gasLimit) }) t.Run("VRF specific gas limit", func(t *testing.T) { gasLimit := pipeline.SelectGasLimit(cfg.EVM().GasEstimator(), pipeline.VRFJobType, nil) - assert.Equal(t, uint32(101), gasLimit) + assert.Equal(t, uint64(101), gasLimit) }) t.Run("flux monitor specific gas limit", func(t *testing.T) { gasLimit := pipeline.SelectGasLimit(cfg.EVM().GasEstimator(), pipeline.FluxMonitorJobType, nil) - assert.Equal(t, uint32(102), gasLimit) + assert.Equal(t, uint64(102), gasLimit) }) t.Run("keeper specific gas limit", func(t *testing.T) { gasLimit := pipeline.SelectGasLimit(cfg.EVM().GasEstimator(), pipeline.KeeperJobType, nil) - assert.Equal(t, uint32(104), gasLimit) + assert.Equal(t, uint64(104), gasLimit) }) t.Run("fallback to default gas limit", func(t *testing.T) { gasLimit := pipeline.SelectGasLimit(cfg.EVM().GasEstimator(), pipeline.WebhookJobType, nil) - assert.Equal(t, uint32(999), gasLimit) + assert.Equal(t, uint64(999), gasLimit) }) } func TestGetNextTaskOf(t *testing.T) { diff --git a/core/services/pipeline/mocks/config.go b/core/services/pipeline/mocks/config.go index 581a84dc049..b29a3cc9e11 100644 --- a/core/services/pipeline/mocks/config.go +++ b/core/services/pipeline/mocks/config.go @@ -104,6 +104,24 @@ func (_m *Config) ReaperThreshold() time.Duration { return r0 } +// VerboseLogging provides a mock function with given fields: +func (_m *Config) VerboseLogging() bool { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for VerboseLogging") + } + + var r0 bool + if rf, ok := ret.Get(0).(func() bool); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(bool) + } + + return r0 +} + // NewConfig creates a new instance of Config. 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 NewConfig(t interface { diff --git a/core/services/pipeline/runner.go b/core/services/pipeline/runner.go index cc6214abf5a..f4f23f909b0 100644 --- a/core/services/pipeline/runner.go +++ b/core/services/pipeline/runner.go @@ -319,7 +319,7 @@ func (r *runner) InitializePipeline(spec Spec) (pipeline *Pipeline, err error) { } func (r *runner) run(ctx context.Context, pipeline *Pipeline, run *Run, vars Vars, l logger.Logger) TaskRunResults { - l = l.With("jobID", run.PipelineSpec.JobID, "jobName", run.PipelineSpec.JobName) + l = l.With("run.ID", run.ID, "executionID", uuid.New(), "specID", run.PipelineSpecID, "jobID", run.PipelineSpec.JobID, "jobName", run.PipelineSpec.JobName) l.Debug("Initiating tasks for pipeline run of spec") scheduler := newScheduler(pipeline, run, vars, l) @@ -362,12 +362,12 @@ func (r *runner) run(ctx context.Context, pipeline *Pipeline, run *Run, vars Var run.FailSilently = scheduler.exiting run.State = RunStatusSuspended + var runTime time.Duration if !scheduler.pending { run.FinishedAt = null.TimeFrom(time.Now()) // NOTE: runTime can be very long now because it'll include suspend - runTime := run.FinishedAt.Time.Sub(run.CreatedAt) - l.Debugw("Finished all tasks for pipeline run", "specID", run.PipelineSpecID, "runTime", runTime) + runTime = run.FinishedAt.Time.Sub(run.CreatedAt) PromPipelineRunTotalTimeToCompletion.WithLabelValues(fmt.Sprintf("%d", run.PipelineSpec.JobID), run.PipelineSpec.JobName).Set(float64(runTime)) } @@ -389,6 +389,9 @@ func (r *runner) run(ctx context.Context, pipeline *Pipeline, run *Run, vars Var }) sort.Slice(run.PipelineTaskRuns, func(i, j int) bool { + if run.PipelineTaskRuns[i].task.OutputIndex() == run.PipelineTaskRuns[j].task.OutputIndex() { + return run.PipelineTaskRuns[i].FinishedAt.ValueOrZero().Before(run.PipelineTaskRuns[j].FinishedAt.ValueOrZero()) + } return run.PipelineTaskRuns[i].task.OutputIndex() < run.PipelineTaskRuns[j].task.OutputIndex() }) } @@ -439,6 +442,33 @@ func (r *runner) run(ctx context.Context, pipeline *Pipeline, run *Run, vars Var idxs[i] = taskRunResults[i].Task.OutputIndex() } + if r.config.VerboseLogging() { + l = l.With( + "run.PipelineTaskRuns", run.PipelineTaskRuns, + "run.Outputs", run.Outputs, + "run.CreatedAt", run.CreatedAt, + "run.FinishedAt", run.FinishedAt, + "run.Meta", run.Meta, + "run.Inputs", run.Inputs, + ) + } + if run.HasFatalErrors() { + l = l.With("run.FatalErrors", run.FatalErrors) + } + if run.HasErrors() { + l = l.With("run.AllErrors", run.AllErrors) + } + l = l.With("run.State", run.State, "fatal", run.HasFatalErrors(), "runTime", runTime) + if run.HasFatalErrors() { + // This will also log at error level in OCR if it fails Observe so the + // level is appropriate + l.Errorw("Completed pipeline run with fatal errors") + } else if run.HasErrors() { + l.Debugw("Completed pipeline run with errors") + } else { + l.Debugw("Completed pipeline run successfully") + } + return taskRunResults } @@ -480,7 +510,9 @@ func (r *runner) executeTaskRun(ctx context.Context, spec Spec, taskRun *memoryT loggerFields = append(loggerFields, "resultString", fmt.Sprintf("%q", v)) loggerFields = append(loggerFields, "resultHex", fmt.Sprintf("%x", v)) } - l.Tracew("Pipeline task completed", loggerFields...) + if r.config.VerboseLogging() { + l.Tracew("Pipeline task completed", loggerFields...) + } now := time.Now() diff --git a/core/services/pipeline/task.estimategas.go b/core/services/pipeline/task.estimategas.go index 8fccc5e8eac..54be6273057 100644 --- a/core/services/pipeline/task.estimategas.go +++ b/core/services/pipeline/task.estimategas.go @@ -123,7 +123,7 @@ func (t *EstimateGasLimitTask) Run(ctx context.Context, lggr logger.Logger, vars if !gasLimitWithMultiplier.IsUint64() { return Result{Error: ErrInvalidMultiplier}, retryableRunInfo() } - gasLimitFinal := uint32(gasLimitWithMultiplier.Uint64()) + gasLimitFinal := gasLimitWithMultiplier.Uint64() if gasLimitFinal > maximumGasLimit { lggr.Warnw("EstimateGas: estimated amount is greater than configured limit, fallback to configured limit", "estimate", gasLimitFinal, diff --git a/core/services/pipeline/task.eth_call.go b/core/services/pipeline/task.eth_call.go index f011cd7a9b6..a3e95c3cfc1 100644 --- a/core/services/pipeline/task.eth_call.go +++ b/core/services/pipeline/task.eth_call.go @@ -106,14 +106,14 @@ func (t *ETHCallTask) Run(ctx context.Context, lggr logger.Logger, vars Vars, in return Result{Error: err}, runInfo } - var selectedGas uint32 + var selectedGas uint64 if gasUnlimited { if gas > 0 { return Result{Error: errors.Wrapf(ErrBadInput, "gas must be zero when gasUnlimited is true")}, runInfo } } else { if gas > 0 { - selectedGas = uint32(gas) + selectedGas = uint64(gas) } else { selectedGas = SelectGasLimit(chain.Config().EVM().GasEstimator(), t.jobType, t.specGasLimit) } @@ -123,7 +123,7 @@ func (t *ETHCallTask) Run(ctx context.Context, lggr logger.Logger, vars Vars, in To: (*common.Address)(&contractAddr), From: (common.Address)(from), Data: []byte(data), - Gas: uint64(selectedGas), + Gas: selectedGas, GasPrice: gasPrice.BigInt(), GasTipCap: gasTipCap.BigInt(), GasFeeCap: gasFeeCap.BigInt(), diff --git a/core/services/pipeline/task.eth_call_test.go b/core/services/pipeline/task.eth_call_test.go index 28af94ba25c..b21b3065f8c 100644 --- a/core/services/pipeline/task.eth_call_test.go +++ b/core/services/pipeline/task.eth_call_test.go @@ -33,7 +33,7 @@ func TestETHCallTask(t *testing.T) { testutils.SkipShortDB(t) var specGasLimit uint32 = 123 - const gasLimit uint32 = 500_000 + const gasLimit uint64 = 500_000 const drJobTypeGasLimit uint32 = 789 tests := []struct { diff --git a/core/services/pipeline/task.eth_tx.go b/core/services/pipeline/task.eth_tx.go index ffd496c486d..354651acbb4 100644 --- a/core/services/pipeline/task.eth_tx.go +++ b/core/services/pipeline/task.eth_tx.go @@ -150,7 +150,7 @@ func (t *ETHTxTask) Run(ctx context.Context, lggr logger.Logger, vars Vars, inpu FromAddress: fromAddr, ToAddress: common.Address(toAddr), EncodedPayload: []byte(data), - FeeLimit: uint32(gasLimit), + FeeLimit: uint64(gasLimit), Meta: txMeta, ForwarderAddress: forwarderAddress, Strategy: strategy, diff --git a/core/services/pipeline/task.eth_tx_test.go b/core/services/pipeline/task.eth_tx_test.go index d50949e120d..c38c338df20 100644 --- a/core/services/pipeline/task.eth_tx_test.go +++ b/core/services/pipeline/task.eth_tx_test.go @@ -31,7 +31,7 @@ func TestETHTxTask(t *testing.T) { reqID := common.HexToHash("0x5198616554d738d9485d1a7cf53b2f33e09c3bbc8fe9ac0020bd672cd2bc15d2") reqTxHash := common.HexToHash("0xc524fafafcaec40652b1f84fca09c231185437d008d195fccf2f51e64b7062f8") specGasLimit := uint32(123) - const defaultGasLimit uint32 = 999 + const defaultGasLimit uint64 = 999 const drJobTypeGasLimit uint32 = 789 from := common.HexToAddress("0x882969652440ccf14a5dbb9bd53eb21cb1e11e5c") @@ -74,7 +74,7 @@ func TestETHTxTask(t *testing.T) { func(keyStore *keystoremocks.Eth, txManager *txmmocks.MockEvmTxManager) { data := []byte("foobar") - gasLimit := uint32(12345) + gasLimit := uint64(12345) jobID := int32(321) addr := common.HexToAddress("0x2E396ecbc8223Ebc16EC45136228AE5EDB649943") txMeta := &txmgr.TxMeta{ @@ -124,7 +124,7 @@ func TestETHTxTask(t *testing.T) { nil, func(keyStore *keystoremocks.Eth, txManager *txmmocks.MockEvmTxManager) { data := []byte("foobar") - gasLimit := uint32(12345) + gasLimit := uint64(12345) txMeta := &txmgr.TxMeta{ JobID: &jid, RequestID: &reqID, @@ -202,7 +202,7 @@ func TestETHTxTask(t *testing.T) { nil, func(keyStore *keystoremocks.Eth, txManager *txmmocks.MockEvmTxManager) { data := []byte("foobar") - gasLimit := uint32(12345) + gasLimit := uint64(12345) txMeta := &txmgr.TxMeta{ JobID: &jid, RequestID: &reqID, @@ -248,7 +248,7 @@ func TestETHTxTask(t *testing.T) { nil, func(keyStore *keystoremocks.Eth, txManager *txmmocks.MockEvmTxManager) { data := []byte("foobar") - gasLimit := uint32(12345) + gasLimit := uint64(12345) txMeta := &txmgr.TxMeta{ JobID: &jid, RequestID: &reqID, @@ -284,7 +284,7 @@ func TestETHTxTask(t *testing.T) { nil, func(keyStore *keystoremocks.Eth, txManager *txmmocks.MockEvmTxManager) { data := []byte("foobar") - gasLimit := uint32(12345) + gasLimit := uint64(12345) txMeta := &txmgr.TxMeta{FailOnRevert: null.BoolFrom(false)} keyStore.On("GetRoundRobinAddress", mock.Anything, testutils.FixtureChainID, from).Return(from, nil) txManager.On("CreateTransaction", mock.Anything, txmgr.TxRequest{ @@ -326,7 +326,7 @@ func TestETHTxTask(t *testing.T) { FromAddress: from, ToAddress: to, EncodedPayload: data, - FeeLimit: drJobTypeGasLimit, + FeeLimit: uint64(drJobTypeGasLimit), Meta: txMeta, Strategy: txmgrcommon.NewSendEveryStrategy(), SignalCallback: true, @@ -361,7 +361,7 @@ func TestETHTxTask(t *testing.T) { FromAddress: from, ToAddress: to, EncodedPayload: data, - FeeLimit: specGasLimit, + FeeLimit: uint64(specGasLimit), Meta: txMeta, Strategy: txmgrcommon.NewSendEveryStrategy(), SignalCallback: true, @@ -415,7 +415,7 @@ func TestETHTxTask(t *testing.T) { nil, func(keyStore *keystoremocks.Eth, txManager *txmmocks.MockEvmTxManager) { data := []byte("foobar") - gasLimit := uint32(12345) + gasLimit := uint64(12345) txMeta := &txmgr.TxMeta{ JobID: &jid, RequestID: &reqID, diff --git a/core/services/promreporter/prom_reporter_test.go b/core/services/promreporter/prom_reporter_test.go index 66133072ebd..a2a744ae924 100644 --- a/core/services/promreporter/prom_reporter_test.go +++ b/core/services/promreporter/prom_reporter_test.go @@ -45,9 +45,10 @@ func newLegacyChainContainer(t *testing.T, db *sqlx.DB) legacyevm.LegacyChainCon RpcBatchSize: 2, KeepFinalizedBlocksDepth: 1000, } - lp := logpoller.NewLogPoller(logpoller.NewORM(testutils.FixtureChainID, db, lggr, pgtest.NewQConfig(true)), ethClient, lggr, lpOpts) + lp := logpoller.NewLogPoller(logpoller.NewORM(testutils.FixtureChainID, db, lggr), ethClient, lggr, lpOpts) txm, err := txmgr.NewTxm( + db, db, evmConfig, evmConfig.GasEstimator(), diff --git a/core/services/relay/evm/binding.go b/core/services/relay/evm/binding.go index e78d9f0a770..976ba05b1e8 100644 --- a/core/services/relay/evm/binding.go +++ b/core/services/relay/evm/binding.go @@ -8,8 +8,8 @@ import ( type readBinding interface { GetLatestValue(ctx context.Context, params, returnVal any) error - Bind(binding commontypes.BoundContract) error + Bind(ctx context.Context, binding commontypes.BoundContract) error SetCodec(codec commontypes.RemoteCodec) - Register() error - Unregister() error + Register(ctx context.Context) error + Unregister(ctx context.Context) error } diff --git a/core/services/relay/evm/bindings.go b/core/services/relay/evm/bindings.go index 1a23128d19f..e13fcbc02d5 100644 --- a/core/services/relay/evm/bindings.go +++ b/core/services/relay/evm/bindings.go @@ -1,6 +1,7 @@ package evm import ( + "context" "fmt" commontypes "github.com/smartcontractkit/chainlink-common/pkg/types" @@ -34,14 +35,14 @@ func (b contractBindings) AddReadBinding(contractName, readName string, reader r rbs[readName] = reader } -func (b contractBindings) Bind(boundContracts []commontypes.BoundContract) error { +func (b contractBindings) Bind(ctx context.Context, boundContracts []commontypes.BoundContract) error { for _, bc := range boundContracts { rbs, rbsExist := b[bc.Name] if !rbsExist { return fmt.Errorf("%w: no contract named %s", commontypes.ErrInvalidConfig, bc.Name) } for _, r := range rbs { - if err := r.Bind(bc); err != nil { + if err := r.Bind(ctx, bc); err != nil { return err } } @@ -49,10 +50,10 @@ func (b contractBindings) Bind(boundContracts []commontypes.BoundContract) error return nil } -func (b contractBindings) ForEach(fn func(readBinding) error) error { +func (b contractBindings) ForEach(ctx context.Context, fn func(readBinding, context.Context) error) error { for _, rbs := range b { for _, rb := range rbs { - if err := fn(rb); err != nil { + if err := fn(rb, ctx); err != nil { return err } } diff --git a/core/services/relay/evm/chain_reader.go b/core/services/relay/evm/chain_reader.go index dba05af7e3c..ff4f026d118 100644 --- a/core/services/relay/evm/chain_reader.go +++ b/core/services/relay/evm/chain_reader.go @@ -5,6 +5,7 @@ import ( "fmt" "reflect" "strings" + "time" "github.com/ethereum/go-ethereum/accounts/abi" "github.com/google/uuid" @@ -39,7 +40,7 @@ type chainReader struct { } // NewChainReaderService is a constructor for ChainReader, returns nil if there is any error -func NewChainReaderService(lggr logger.Logger, lp logpoller.LogPoller, chain legacyevm.Chain, config types.ChainReaderConfig) (ChainReaderService, error) { +func NewChainReaderService(ctx context.Context, lggr logger.Logger, lp logpoller.LogPoller, chain legacyevm.Chain, config types.ChainReaderConfig) (ChainReaderService, error) { cr := &chainReader{ lggr: lggr.Named("ChainReader"), lp: lp, @@ -57,7 +58,7 @@ func NewChainReaderService(lggr logger.Logger, lp logpoller.LogPoller, chain leg return nil, err } - err = cr.contractBindings.ForEach(func(b readBinding) error { + err = cr.contractBindings.ForEach(ctx, func(b readBinding, c context.Context) error { b.SetCodec(cr.codec) return nil }) @@ -78,8 +79,8 @@ func (cr *chainReader) GetLatestValue(ctx context.Context, contractName, method return b.GetLatestValue(ctx, params, returnVal) } -func (cr *chainReader) Bind(_ context.Context, bindings []commontypes.BoundContract) error { - return cr.contractBindings.Bind(bindings) +func (cr *chainReader) Bind(ctx context.Context, bindings []commontypes.BoundContract) error { + return cr.contractBindings.Bind(ctx, bindings) } func (cr *chainReader) init(chainContractReaders map[string]types.ChainContractReader) error { @@ -110,15 +111,17 @@ func (cr *chainReader) init(chainContractReaders map[string]types.ChainContractR return nil } -func (cr *chainReader) Start(_ context.Context) error { +func (cr *chainReader) Start(ctx context.Context) error { return cr.StartOnce("ChainReader", func() error { - return cr.contractBindings.ForEach(readBinding.Register) + return cr.contractBindings.ForEach(ctx, readBinding.Register) }) } func (cr *chainReader) Close() error { return cr.StopOnce("ChainReader", func() error { - return cr.contractBindings.ForEach(readBinding.Unregister) + ctx, cancel := context.WithTimeout(context.Background(), time.Second) + defer cancel() + return cr.contractBindings.ForEach(ctx, readBinding.Unregister) }) } diff --git a/core/services/relay/evm/chain_reader_test.go b/core/services/relay/evm/chain_reader_test.go index 39cf317204b..edca5c19b60 100644 --- a/core/services/relay/evm/chain_reader_test.go +++ b/core/services/relay/evm/chain_reader_test.go @@ -263,7 +263,6 @@ func (it *chainReaderInterfaceTester) GetChainReader(t *testing.T) clcommontypes lggr := logger.NullLogger db := pgtest.NewSqlxDB(t) - lpOpts := logpoller.Opts{ PollPeriod: time.Millisecond, FinalityDepth: 4, @@ -271,10 +270,10 @@ func (it *chainReaderInterfaceTester) GetChainReader(t *testing.T) clcommontypes RpcBatchSize: 1, KeepFinalizedBlocksDepth: 10000, } - lp := logpoller.NewLogPoller(logpoller.NewORM(testutils.SimulatedChainID, db, lggr, pgtest.NewQConfig(true)), it.chain.Client(), lggr, lpOpts) + lp := logpoller.NewLogPoller(logpoller.NewORM(testutils.SimulatedChainID, db, lggr), it.chain.Client(), lggr, lpOpts) require.NoError(t, lp.Start(ctx)) it.chain.On("LogPoller").Return(lp) - cr, err := evm.NewChainReaderService(lggr, lp, it.chain, it.chainConfig) + cr, err := evm.NewChainReaderService(ctx, lggr, lp, it.chain, it.chainConfig) require.NoError(t, err) require.NoError(t, cr.Start(ctx)) it.cr = cr diff --git a/core/services/relay/evm/config_poller.go b/core/services/relay/evm/config_poller.go index bb962fc6ed5..2280d60d7ee 100644 --- a/core/services/relay/evm/config_poller.go +++ b/core/services/relay/evm/config_poller.go @@ -20,7 +20,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/chains/evm/client" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/logpoller" "github.com/smartcontractkit/chainlink/v2/core/logger" - "github.com/smartcontractkit/chainlink/v2/core/services/pg" evmRelayTypes "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/types" ) @@ -71,12 +70,12 @@ type CPConfig struct { LogDecoder LogDecoder } -func NewConfigPoller(lggr logger.Logger, cfg CPConfig) (evmRelayTypes.ConfigPoller, error) { - return newConfigPoller(lggr, cfg.Client, cfg.DestinationChainPoller, cfg.AggregatorContractAddress, cfg.ConfigStoreAddress, cfg.LogDecoder) +func NewConfigPoller(ctx context.Context, lggr logger.Logger, cfg CPConfig) (evmRelayTypes.ConfigPoller, error) { + return newConfigPoller(ctx, lggr, cfg.Client, cfg.DestinationChainPoller, cfg.AggregatorContractAddress, cfg.ConfigStoreAddress, cfg.LogDecoder) } -func newConfigPoller(lggr logger.Logger, client client.Client, destChainPoller logpoller.LogPoller, aggregatorContractAddr common.Address, configStoreAddr *common.Address, ld LogDecoder) (*configPoller, error) { - err := destChainPoller.RegisterFilter(logpoller.Filter{Name: configPollerFilterName(aggregatorContractAddr), EventSigs: []common.Hash{ld.EventSig()}, Addresses: []common.Address{aggregatorContractAddr}}) +func newConfigPoller(ctx context.Context, lggr logger.Logger, client client.Client, destChainPoller logpoller.LogPoller, aggregatorContractAddr common.Address, configStoreAddr *common.Address, ld LogDecoder) (*configPoller, error) { + err := destChainPoller.RegisterFilter(ctx, logpoller.Filter{Name: configPollerFilterName(aggregatorContractAddr), EventSigs: []common.Hash{ld.EventSig()}, Addresses: []common.Address{aggregatorContractAddr}}) if err != nil { return nil, err } @@ -125,7 +124,7 @@ func (cp *configPoller) Replay(ctx context.Context, fromBlock int64) error { // LatestConfigDetails returns the latest config details from the logs func (cp *configPoller) LatestConfigDetails(ctx context.Context) (changedInBlock uint64, configDigest ocrtypes.ConfigDigest, err error) { - latest, err := cp.destChainLogPoller.LatestLogByEventSigWithConfs(cp.ld.EventSig(), cp.aggregatorContractAddr, 1, pg.WithParentCtx(ctx)) + latest, err := cp.destChainLogPoller.LatestLogByEventSigWithConfs(ctx, cp.ld.EventSig(), cp.aggregatorContractAddr, 1) if err != nil { if errors.Is(err, sql.ErrNoRows) { if cp.isConfigStoreAvailable() { @@ -146,7 +145,7 @@ func (cp *configPoller) LatestConfigDetails(ctx context.Context) (changedInBlock // LatestConfig returns the latest config from the logs on a certain block func (cp *configPoller) LatestConfig(ctx context.Context, changedInBlock uint64) (ocrtypes.ContractConfig, error) { - lgs, err := cp.destChainLogPoller.Logs(int64(changedInBlock), int64(changedInBlock), cp.ld.EventSig(), cp.aggregatorContractAddr, pg.WithParentCtx(ctx)) + lgs, err := cp.destChainLogPoller.Logs(ctx, int64(changedInBlock), int64(changedInBlock), cp.ld.EventSig(), cp.aggregatorContractAddr) if err != nil { return ocrtypes.ContractConfig{}, err } @@ -167,7 +166,7 @@ func (cp *configPoller) LatestConfig(ctx context.Context, changedInBlock uint64) // LatestBlockHeight returns the latest block height from the logs func (cp *configPoller) LatestBlockHeight(ctx context.Context) (blockHeight uint64, err error) { - latest, err := cp.destChainLogPoller.LatestBlock(pg.WithParentCtx(ctx)) + latest, err := cp.destChainLogPoller.LatestBlock(ctx) if err != nil { if errors.Is(err, sql.ErrNoRows) { return 0, nil diff --git a/core/services/relay/evm/config_poller_test.go b/core/services/relay/evm/config_poller_test.go index d2d33944df7..4778c983c9c 100644 --- a/core/services/relay/evm/config_poller_test.go +++ b/core/services/relay/evm/config_poller_test.go @@ -55,6 +55,7 @@ func TestConfigPoller(t *testing.T) { var b *backends.SimulatedBackend var linkTokenAddress common.Address var accessAddress common.Address + ctx := testutils.Context(t) ld := OCR2AggregatorLogDecoder @@ -87,9 +88,9 @@ func TestConfigPoller(t *testing.T) { b.Commit() db := pgtest.NewSqlxDB(t) - cfg := pgtest.NewQConfig(false) ethClient = evmclient.NewSimulatedBackendClient(t, b, testutils.SimulatedChainID) - lorm := logpoller.NewORM(testutils.SimulatedChainID, db, lggr, cfg) + + lorm := logpoller.NewORM(testutils.SimulatedChainID, db, lggr) lpOpts := logpoller.Opts{ PollPeriod: 100 * time.Millisecond, @@ -103,7 +104,7 @@ func TestConfigPoller(t *testing.T) { } t.Run("LatestConfig errors if there is no config in logs and config store is unconfigured", func(t *testing.T) { - cp, err := NewConfigPoller(lggr, CPConfig{ethClient, lp, ocrAddress, nil, ld}) + cp, err := NewConfigPoller(ctx, lggr, CPConfig{ethClient, lp, ocrAddress, nil, ld}) require.NoError(t, err) _, err = cp.LatestConfig(testutils.Context(t), 0) @@ -112,7 +113,7 @@ func TestConfigPoller(t *testing.T) { }) t.Run("happy path (with config store)", func(t *testing.T) { - cp, err := NewConfigPoller(lggr, CPConfig{ethClient, lp, ocrAddress, &configStoreContractAddr, ld}) + cp, err := NewConfigPoller(ctx, lggr, CPConfig{ethClient, lp, ocrAddress, &configStoreContractAddr, ld}) require.NoError(t, err) // Should have no config to begin with. _, configDigest, err := cp.LatestConfigDetails(testutils.Context(t)) @@ -179,11 +180,11 @@ func TestConfigPoller(t *testing.T) { t.Run("LatestConfigDetails, when logs have been pruned and config store contract is configured", func(t *testing.T) { // Give it a log poller that will never return logs mp := new(mocks.LogPoller) - mp.On("RegisterFilter", mock.Anything).Return(nil) + mp.On("RegisterFilter", mock.Anything, mock.Anything).Return(nil) mp.On("LatestLogByEventSigWithConfs", mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil, sql.ErrNoRows) t.Run("if callLatestConfigDetails succeeds", func(t *testing.T) { - cp, err := newConfigPoller(lggr, ethClient, mp, ocrAddress, &configStoreContractAddr, ld) + cp, err := newConfigPoller(ctx, lggr, ethClient, mp, ocrAddress, &configStoreContractAddr, ld) require.NoError(t, err) t.Run("when config has not been set, returns zero values", func(t *testing.T) { @@ -220,7 +221,7 @@ func TestConfigPoller(t *testing.T) { failingClient := new(evmClientMocks.Client) failingClient.On("ConfiguredChainID").Return(big.NewInt(42)) failingClient.On("CallContract", mock.Anything, mock.Anything, mock.Anything).Return(nil, errors.New("something exploded")) - cp, err := newConfigPoller(lggr, failingClient, mp, ocrAddress, &configStoreContractAddr, ld) + cp, err := newConfigPoller(ctx, lggr, failingClient, mp, ocrAddress, &configStoreContractAddr, ld) require.NoError(t, err) cp.configStoreContractAddr = &configStoreContractAddr @@ -254,12 +255,12 @@ func TestConfigPoller(t *testing.T) { t.Run("LatestConfig, when logs have been pruned and config store contract is configured", func(t *testing.T) { // Give it a log poller that will never return logs mp := mocks.NewLogPoller(t) - mp.On("RegisterFilter", mock.Anything).Return(nil) + mp.On("RegisterFilter", mock.Anything, mock.Anything).Return(nil) mp.On("Logs", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil, nil) mp.On("LatestLogByEventSigWithConfs", mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil, sql.ErrNoRows) t.Run("if callReadConfig succeeds", func(t *testing.T) { - cp, err := newConfigPoller(lggr, ethClient, mp, ocrAddress, &configStoreContractAddr, ld) + cp, err := newConfigPoller(ctx, lggr, ethClient, mp, ocrAddress, &configStoreContractAddr, ld) require.NoError(t, err) t.Run("when config has not been set, returns error", func(t *testing.T) { @@ -321,7 +322,7 @@ func TestConfigPoller(t *testing.T) { // initial call to retrieve config store address from aggregator return *callArgs.To == ocrAddress }), mock.Anything).Return(nil, errors.New("something exploded")).Once() - cp, err := newConfigPoller(lggr, failingClient, mp, ocrAddress, &configStoreContractAddr, ld) + cp, err := newConfigPoller(ctx, lggr, failingClient, mp, ocrAddress, &configStoreContractAddr, ld) require.NoError(t, err) _, err = cp.LatestConfig(testutils.Context(t), 0) diff --git a/core/services/relay/evm/contract_transmitter.go b/core/services/relay/evm/contract_transmitter.go index 76360e34e1a..af0f83f6979 100644 --- a/core/services/relay/evm/contract_transmitter.go +++ b/core/services/relay/evm/contract_transmitter.go @@ -19,7 +19,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services" - "github.com/smartcontractkit/chainlink/v2/core/services/pg" ) type ContractTransmitter interface { @@ -56,6 +55,7 @@ func transmitterFilterName(addr common.Address) string { } func NewOCRContractTransmitter( + ctx context.Context, address gethcommon.Address, caller contractReader, contractABI abi.ABI, @@ -69,7 +69,7 @@ func NewOCRContractTransmitter( return nil, errors.New("invalid ABI, missing transmitted") } - err := lp.RegisterFilter(logpoller.Filter{Name: transmitterFilterName(address), EventSigs: []common.Hash{transmitted.ID}, Addresses: []common.Address{address}}) + err := lp.RegisterFilter(ctx, logpoller.Filter{Name: transmitterFilterName(address), EventSigs: []common.Hash{transmitted.ID}, Addresses: []common.Address{address}}) if err != nil { return nil, err } @@ -181,8 +181,7 @@ func (oc *contractTransmitter) LatestConfigDigestAndEpoch(ctx context.Context) ( if err != nil { return ocrtypes.ConfigDigest{}, 0, err } - latest, err := oc.lp.LatestLogByEventSigWithConfs( - oc.transmittedEventSig, oc.contractAddress, 1, pg.WithParentCtx(ctx)) + latest, err := oc.lp.LatestLogByEventSigWithConfs(ctx, oc.transmittedEventSig, oc.contractAddress, 1) if err != nil { if errors.Is(err, sql.ErrNoRows) { // No transmissions yet diff --git a/core/services/relay/evm/contract_transmitter_test.go b/core/services/relay/evm/contract_transmitter_test.go index e03c5508247..930ef0249e6 100644 --- a/core/services/relay/evm/contract_transmitter_test.go +++ b/core/services/relay/evm/contract_transmitter_test.go @@ -36,6 +36,7 @@ func TestContractTransmitter(t *testing.T) { lggr := logger.TestLogger(t) c := evmclimocks.NewClient(t) lp := lpmocks.NewLogPoller(t) + ctx := testutils.Context(t) // scanLogs = false digestAndEpochDontScanLogs, _ := hex.DecodeString( "0000000000000000000000000000000000000000000000000000000000000000" + // false @@ -43,8 +44,8 @@ func TestContractTransmitter(t *testing.T) { "0000000000000000000000000000000000000000000000000000000000000002") // epoch c.On("CallContract", mock.Anything, mock.Anything, mock.Anything).Return(digestAndEpochDontScanLogs, nil).Once() contractABI, _ := abi.JSON(strings.NewReader(ocr2aggregator.OCR2AggregatorABI)) - lp.On("RegisterFilter", mock.Anything).Return(nil) - ot, err := NewOCRContractTransmitter(gethcommon.Address{}, c, contractABI, mockTransmitter{}, lp, lggr, func(b []byte) (*txmgr.TxMeta, error) { + lp.On("RegisterFilter", mock.Anything, mock.Anything).Return(nil) + ot, err := NewOCRContractTransmitter(ctx, gethcommon.Address{}, c, contractABI, mockTransmitter{}, lp, lggr, func(b []byte) (*txmgr.TxMeta, error) { return &txmgr.TxMeta{}, nil }) require.NoError(t, err) diff --git a/core/services/relay/evm/event_binding.go b/core/services/relay/evm/event_binding.go index b7148348e4b..bded6ba476d 100644 --- a/core/services/relay/evm/event_binding.go +++ b/core/services/relay/evm/event_binding.go @@ -43,7 +43,7 @@ func (e *eventBinding) SetCodec(codec commontypes.RemoteCodec) { e.codec = codec } -func (e *eventBinding) Register() error { +func (e *eventBinding) Register(ctx context.Context) error { e.lock.Lock() defer e.lock.Unlock() @@ -52,7 +52,7 @@ func (e *eventBinding) Register() error { return nil } - if err := e.lp.RegisterFilter(logpoller.Filter{ + if err := e.lp.RegisterFilter(ctx, logpoller.Filter{ Name: e.id, EventSigs: evmtypes.HashArray{e.hash}, Addresses: evmtypes.AddressArray{e.address}, @@ -62,7 +62,7 @@ func (e *eventBinding) Register() error { return nil } -func (e *eventBinding) Unregister() error { +func (e *eventBinding) Unregister(ctx context.Context) error { e.lock.Lock() defer e.lock.Unlock() @@ -70,7 +70,7 @@ func (e *eventBinding) Unregister() error { return nil } - if err := e.lp.UnregisterFilter(e.id); err != nil { + if err := e.lp.UnregisterFilter(ctx, e.id); err != nil { return fmt.Errorf("%w: %w", commontypes.ErrInternal, err) } return nil @@ -93,8 +93,8 @@ func (e *eventBinding) GetLatestValue(ctx context.Context, params, into any) err return e.getLatestValueWithFilters(ctx, confs, params, into) } -func (e *eventBinding) Bind(binding commontypes.BoundContract) error { - if err := e.Unregister(); err != nil { +func (e *eventBinding) Bind(ctx context.Context, binding commontypes.BoundContract) error { + if err := e.Unregister(ctx); err != nil { return err } @@ -103,13 +103,13 @@ func (e *eventBinding) Bind(binding commontypes.BoundContract) error { e.bound = true if e.registerCalled { - return e.Register() + return e.Register(ctx) } return nil } func (e *eventBinding) getLatestValueWithoutFilters(ctx context.Context, confs logpoller.Confirmations, into any) error { - log, err := e.lp.LatestLogByEventSigWithConfs(e.hash, e.address, confs) + log, err := e.lp.LatestLogByEventSigWithConfs(ctx, e.hash, e.address, confs) if err = wrapInternalErr(err); err != nil { return err } @@ -142,7 +142,7 @@ func (e *eventBinding) getLatestValueWithFilters( fai := filtersAndIndices[0] remainingFilters := filtersAndIndices[1:] - logs, err := e.lp.IndexedLogs(e.hash, e.address, 1, []common.Hash{fai}, confs) + logs, err := e.lp.IndexedLogs(ctx, e.hash, e.address, 1, []common.Hash{fai}, confs) if err != nil { return wrapInternalErr(err) } diff --git a/core/services/relay/evm/evm.go b/core/services/relay/evm/evm.go index a02885cb556..ddddb82aaed 100644 --- a/core/services/relay/evm/evm.go +++ b/core/services/relay/evm/evm.go @@ -10,6 +10,7 @@ import ( "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/common" + "github.com/google/uuid" "github.com/jmoiron/sqlx" pkgerrors "github.com/pkg/errors" "golang.org/x/exp/maps" @@ -24,10 +25,10 @@ import ( txmgrcommon "github.com/smartcontractkit/chainlink/v2/common/txmgr" txm "github.com/smartcontractkit/chainlink/v2/core/chains/evm/txmgr" + evmtypes "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" "github.com/smartcontractkit/chainlink/v2/core/chains/legacyevm" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/keystore" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ethkey" "github.com/smartcontractkit/chainlink/v2/core/services/llo" "github.com/smartcontractkit/chainlink/v2/core/services/llo/bm" lloconfig "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/llo/config" @@ -78,9 +79,12 @@ type Relayer struct { chainReader commontypes.ChainReader codec commontypes.Codec + // Mercury + mercuryORM mercury.ORM + // LLO/data streams cdcFactory llo.ChannelDefinitionCacheFactory - orm llo.ORM + lloORM llo.ORM } type CSAETHKeystore interface { @@ -120,8 +124,9 @@ func NewRelayer(lggr logger.Logger, chain legacyevm.Chain, opts RelayerOpts) (*R } lggr = lggr.Named("Relayer") - orm := llo.NewORM(pg.NewQ(opts.DB, lggr, opts.QConfig), chain.ID()) - cdcFactory := llo.NewChannelDefinitionCacheFactory(lggr, orm, chain.LogPoller()) + mercuryORM := mercury.NewORM(opts.DB, lggr, opts.QConfig) + lloORM := llo.NewORM(pg.NewQ(opts.DB, lggr, opts.QConfig), chain.ID()) + cdcFactory := llo.NewChannelDefinitionCacheFactory(lggr, lloORM, chain.LogPoller()) return &Relayer{ db: opts.DB, chain: chain, @@ -130,7 +135,8 @@ func NewRelayer(lggr logger.Logger, chain legacyevm.Chain, opts RelayerOpts) (*R mercuryPool: opts.MercuryPool, pgCfg: opts.QConfig, cdcFactory: cdcFactory, - orm: orm, + lloORM: lloORM, + mercuryORM: mercuryORM, }, nil } @@ -165,7 +171,7 @@ func (r *Relayer) NewPluginProvider(rargs commontypes.RelayArgs, pargs commontyp lggr := r.lggr.Named("PluginProvider").Named(rargs.ExternalJobID.String()) - configWatcher, err := newStandardConfigProvider(r.lggr, r.chain, types.NewRelayOpts(rargs)) + configWatcher, err := newStandardConfigProvider(ctx, r.lggr, r.chain, types.NewRelayOpts(rargs)) if err != nil { return nil, err } @@ -185,6 +191,8 @@ func (r *Relayer) NewPluginProvider(rargs commontypes.RelayArgs, pargs commontyp } func (r *Relayer) NewMercuryProvider(rargs commontypes.RelayArgs, pargs commontypes.PluginArgs) (commontypes.MercuryProvider, error) { + // TODO https://smartcontract-it.atlassian.net/browse/BCF-2887 + ctx := context.Background() lggr := r.lggr.Named("MercuryProvider").Named(rargs.ExternalJobID.String()) relayOpts := types.NewRelayOpts(rargs) relayConfig, err := relayOpts.RelayConfig() @@ -205,7 +213,7 @@ func (r *Relayer) NewMercuryProvider(rargs commontypes.RelayArgs, pargs commonty if relayConfig.ChainID.String() != r.chain.ID().String() { return nil, fmt.Errorf("internal error: chain id in spec does not match this relayer's chain: have %s expected %s", relayConfig.ChainID.String(), r.chain.ID().String()) } - cp, err := newMercuryConfigProvider(lggr, r.chain, relayOpts) + cp, err := newMercuryConfigProvider(ctx, lggr, r.chain, relayOpts) if err != nil { return nil, pkgerrors.WithStack(err) } @@ -218,9 +226,13 @@ func (r *Relayer) NewMercuryProvider(rargs commontypes.RelayArgs, pargs commonty return nil, pkgerrors.Wrap(err, "failed to get CSA key for mercury connection") } - client, err := r.mercuryPool.Checkout(context.Background(), privKey, mercuryConfig.ServerPubKey, mercuryConfig.ServerURL()) - if err != nil { - return nil, err + clients := make(map[string]wsrpc.Client) + for _, server := range mercuryConfig.GetServers() { + client, err := r.mercuryPool.Checkout(context.Background(), privKey, server.PubKey, server.URL) + if err != nil { + return nil, err + } + clients[server.URL] = client } // FIXME: We actually know the version here since it's in the feed ID, can @@ -241,12 +253,16 @@ func (r *Relayer) NewMercuryProvider(rargs commontypes.RelayArgs, pargs commonty default: return nil, fmt.Errorf("invalid feed version %d", feedID.Version()) } - transmitter := mercury.NewTransmitter(lggr, client, privKey.PublicKey, rargs.JobID, *relayConfig.FeedID, r.db, r.pgCfg, transmitterCodec) + transmitter := mercury.NewTransmitter(lggr, clients, privKey.PublicKey, rargs.JobID, *relayConfig.FeedID, r.mercuryORM, transmitterCodec) return NewMercuryProvider(cp, r.chainReader, r.codec, NewMercuryChainReader(r.chain.HeadTracker()), transmitter, reportCodecV1, reportCodecV2, reportCodecV3, lggr), nil } func (r *Relayer) NewLLOProvider(rargs commontypes.RelayArgs, pargs commontypes.PluginArgs) (commontypes.LLOProvider, error) { + + // TODO https://smartcontract-it.atlassian.net/browse/BCF-2887 + ctx := context.Background() + relayOpts := types.NewRelayOpts(rargs) var relayConfig types.RelayConfig { @@ -268,7 +284,7 @@ func (r *Relayer) NewLLOProvider(rargs commontypes.RelayArgs, pargs commontypes. if relayConfig.ChainID.String() != r.chain.ID().String() { return nil, fmt.Errorf("internal error: chain id in spec does not match this relayer's chain: have %s expected %s", relayConfig.ChainID.String(), r.chain.ID().String()) } - cp, err := newLLOConfigProvider(r.lggr, r.chain, relayOpts) + cp, err := newLLOConfigProvider(ctx, r.lggr, r.chain, relayOpts) if err != nil { return nil, pkgerrors.WithStack(err) } @@ -315,6 +331,9 @@ func (r *Relayer) NewFunctionsProvider(rargs commontypes.RelayArgs, pargs common // NewConfigProvider is called by bootstrap jobs func (r *Relayer) NewConfigProvider(args commontypes.RelayArgs) (configProvider commontypes.ConfigProvider, err error) { + // TODO https://smartcontract-it.atlassian.net/browse/BCF-2887 + ctx := context.Background() + lggr := r.lggr.Named("ConfigProvider").Named(args.ExternalJobID.String()) relayOpts := types.NewRelayOpts(args) relayConfig, err := relayOpts.RelayConfig() @@ -338,11 +357,11 @@ func (r *Relayer) NewConfigProvider(args commontypes.RelayArgs) (configProvider switch args.ProviderType { case "median": - configProvider, err = newStandardConfigProvider(lggr, r.chain, relayOpts) + configProvider, err = newStandardConfigProvider(ctx, lggr, r.chain, relayOpts) case "mercury": - configProvider, err = newMercuryConfigProvider(lggr, r.chain, relayOpts) + configProvider, err = newMercuryConfigProvider(ctx, lggr, r.chain, relayOpts) case "llo": - configProvider, err = newLLOConfigProvider(lggr, r.chain, relayOpts) + configProvider, err = newLLOConfigProvider(ctx, lggr, r.chain, relayOpts) default: return nil, fmt.Errorf("unrecognized provider type: %q", args.ProviderType) } @@ -355,8 +374,8 @@ func (r *Relayer) NewConfigProvider(args commontypes.RelayArgs) (configProvider } func FilterNamesFromRelayArgs(args commontypes.RelayArgs) (filterNames []string, err error) { - var addr ethkey.EIP55Address - if addr, err = ethkey.NewEIP55Address(args.ContractID); err != nil { + var addr evmtypes.EIP55Address + if addr, err = evmtypes.NewEIP55Address(args.ContractID); err != nil { return nil, err } var relayConfig types.RelayConfig @@ -454,10 +473,13 @@ func (c *configWatcher) ContractConfigTracker() ocrtypes.ContractConfigTracker { } type configTransmitterOpts struct { - // override the gas limit default provided in the config watcher + // pluginGasLimit overrides the gas limit default provided in the config watcher. pluginGasLimit *uint32 + // subjectID overrides the queueing subject id (the job external id will be used by default). + subjectID *uuid.UUID } +// newOnChainContractTransmitter creates a new contract transmitter. func newOnChainContractTransmitter(ctx context.Context, lggr logger.Logger, rargs commontypes.RelayArgs, transmitterID string, ethKeystore keystore.Eth, configWatcher *configWatcher, opts configTransmitterOpts, transmissionContractABI abi.ABI) (*contractTransmitter, error) { var relayConfig types.RelayConfig if err := json.Unmarshal(rargs.RelayConfig, &relayConfig); err != nil { @@ -487,8 +509,12 @@ func newOnChainContractTransmitter(ctx context.Context, lggr logger.Logger, rarg fromAddresses = append(fromAddresses, common.HexToAddress(s)) } + subject := rargs.ExternalJobID + if opts.subjectID != nil { + subject = *opts.subjectID + } scoped := configWatcher.chain.Config() - strategy := txmgrcommon.NewQueueingTxStrategy(rargs.ExternalJobID, scoped.OCR2().DefaultTransactionQueueDepth(), scoped.Database().DefaultQueryTimeout()) + strategy := txmgrcommon.NewQueueingTxStrategy(subject, scoped.OCR2().DefaultTransactionQueueDepth(), scoped.Database().DefaultQueryTimeout()) var checker txm.TransmitCheckerSpec if configWatcher.chain.Config().OCR2().SimulateTransactions() { @@ -498,10 +524,10 @@ func newOnChainContractTransmitter(ctx context.Context, lggr logger.Logger, rarg gasLimit := configWatcher.chain.Config().EVM().GasEstimator().LimitDefault() ocr2Limit := configWatcher.chain.Config().EVM().GasEstimator().LimitJobType().OCR2() if ocr2Limit != nil { - gasLimit = *ocr2Limit + gasLimit = uint64(*ocr2Limit) } if opts.pluginGasLimit != nil { - gasLimit = *opts.pluginGasLimit + gasLimit = uint64(*opts.pluginGasLimit) } transmitter, err := ocrcommon.NewTransmitter( @@ -520,6 +546,7 @@ func newOnChainContractTransmitter(ctx context.Context, lggr logger.Logger, rarg } return NewOCRContractTransmitter( + ctx, configWatcher.contractAddress, configWatcher.chain.Client(), transmissionContractABI, @@ -549,7 +576,7 @@ func (r *Relayer) NewMedianProvider(rargs commontypes.RelayArgs, pargs commontyp } contractID := common.HexToAddress(relayOpts.ContractID) - configWatcher, err := newStandardConfigProvider(lggr, r.chain, relayOpts) + configWatcher, err := newStandardConfigProvider(ctx, lggr, r.chain, relayOpts) if err != nil { return nil, err } @@ -577,7 +604,7 @@ func (r *Relayer) NewMedianProvider(rargs commontypes.RelayArgs, pargs commontyp // allow fallback until chain reader is default and median contract is removed, but still log just in case var chainReaderService ChainReaderService if relayConfig.ChainReader != nil { - if chainReaderService, err = NewChainReaderService(lggr, r.chain.LogPoller(), r.chain, *relayConfig.ChainReader); err != nil { + if chainReaderService, err = NewChainReaderService(ctx, lggr, r.chain.LogPoller(), r.chain, *relayConfig.ChainReader); err != nil { return nil, err } diff --git a/core/services/relay/evm/functions.go b/core/services/relay/evm/functions.go index c10134f3acc..da423c6d5fc 100644 --- a/core/services/relay/evm/functions.go +++ b/core/services/relay/evm/functions.go @@ -115,7 +115,7 @@ func NewFunctionsProvider(ctx context.Context, chain legacyevm.Chain, rargs comm if err != nil { return nil, err } - configWatcher, err := newFunctionsConfigProvider(pluginType, chain, rargs, relayConfig.FromBlock, logPollerWrapper, lggr) + configWatcher, err := newFunctionsConfigProvider(ctx, pluginType, chain, rargs, relayConfig.FromBlock, logPollerWrapper, lggr) if err != nil { return nil, err } @@ -135,7 +135,7 @@ func NewFunctionsProvider(ctx context.Context, chain legacyevm.Chain, rargs comm }, nil } -func newFunctionsConfigProvider(pluginType functionsRelay.FunctionsPluginType, chain legacyevm.Chain, args commontypes.RelayArgs, fromBlock uint64, logPollerWrapper evmRelayTypes.LogPollerWrapper, lggr logger.Logger) (*configWatcher, error) { +func newFunctionsConfigProvider(ctx context.Context, pluginType functionsRelay.FunctionsPluginType, chain legacyevm.Chain, args commontypes.RelayArgs, fromBlock uint64, logPollerWrapper evmRelayTypes.LogPollerWrapper, lggr logger.Logger) (*configWatcher, error) { if !common.IsHexAddress(args.ContractID) { return nil, errors.Errorf("invalid contractID, expected hex address") } @@ -146,10 +146,10 @@ func newFunctionsConfigProvider(pluginType functionsRelay.FunctionsPluginType, c if err != nil { return nil, err } - logPollerWrapper.SubscribeToUpdates("FunctionsConfigPoller", cp) + logPollerWrapper.SubscribeToUpdates(ctx, "FunctionsConfigPoller", cp) offchainConfigDigester := functionsRelay.NewFunctionsOffchainConfigDigester(pluginType, chain.ID().Uint64()) - logPollerWrapper.SubscribeToUpdates("FunctionsOffchainConfigDigester", offchainConfigDigester) + logPollerWrapper.SubscribeToUpdates(ctx, "FunctionsOffchainConfigDigester", offchainConfigDigester) return newConfigWatcher(lggr, routerContractAddress, offchainConfigDigester, cp, chain, fromBlock, args.New), nil } @@ -194,7 +194,7 @@ func newFunctionsContractTransmitter(ctx context.Context, contractVersion uint32 gasLimit := configWatcher.chain.Config().EVM().GasEstimator().LimitDefault() ocr2Limit := configWatcher.chain.Config().EVM().GasEstimator().LimitJobType().OCR2() if ocr2Limit != nil { - gasLimit = *ocr2Limit + gasLimit = uint64(*ocr2Limit) } transmitter, err := ocrcommon.NewTransmitter( @@ -224,6 +224,6 @@ func newFunctionsContractTransmitter(ctx context.Context, contractVersion uint32 if err != nil { return nil, err } - logPollerWrapper.SubscribeToUpdates("FunctionsConfigTransmitter", functionsTransmitter) + logPollerWrapper.SubscribeToUpdates(ctx, "FunctionsConfigTransmitter", functionsTransmitter) return functionsTransmitter, err } diff --git a/core/services/relay/evm/functions/config_poller.go b/core/services/relay/evm/functions/config_poller.go index 7a59d499898..71616f2e840 100644 --- a/core/services/relay/evm/functions/config_poller.go +++ b/core/services/relay/evm/functions/config_poller.go @@ -15,7 +15,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/chains/evm/logpoller" "github.com/smartcontractkit/chainlink/v2/core/logger" - "github.com/smartcontractkit/chainlink/v2/core/services/pg" "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/types" ) @@ -136,7 +135,7 @@ func (cp *configPoller) LatestConfigDetails(ctx context.Context) (changedInBlock return 0, ocrtypes.ConfigDigest{}, nil } - latest, err := cp.destChainLogPoller.LatestLogByEventSigWithConfs(ConfigSet, *contractAddr, 1, pg.WithParentCtx(ctx)) + latest, err := cp.destChainLogPoller.LatestLogByEventSigWithConfs(ctx, ConfigSet, *contractAddr, 1) if err != nil { if errors.Is(err, sql.ErrNoRows) { return 0, ocrtypes.ConfigDigest{}, nil @@ -158,7 +157,7 @@ func (cp *configPoller) LatestConfig(ctx context.Context, changedInBlock uint64) return ocrtypes.ContractConfig{}, errors.New("no target contract address set yet") } - lgs, err := cp.destChainLogPoller.Logs(int64(changedInBlock), int64(changedInBlock), ConfigSet, *contractAddr, pg.WithParentCtx(ctx)) + lgs, err := cp.destChainLogPoller.Logs(ctx, int64(changedInBlock), int64(changedInBlock), ConfigSet, *contractAddr) if err != nil { return ocrtypes.ContractConfig{}, err } @@ -174,7 +173,7 @@ func (cp *configPoller) LatestConfig(ctx context.Context, changedInBlock uint64) } func (cp *configPoller) LatestBlockHeight(ctx context.Context) (blockHeight uint64, err error) { - latest, err := cp.destChainLogPoller.LatestBlock(pg.WithParentCtx(ctx)) + latest, err := cp.destChainLogPoller.LatestBlock(ctx) if err != nil { if errors.Is(err, sql.ErrNoRows) { return 0, nil @@ -185,14 +184,14 @@ func (cp *configPoller) LatestBlockHeight(ctx context.Context) (blockHeight uint } // called from LogPollerWrapper in a separate goroutine -func (cp *configPoller) UpdateRoutes(activeCoordinator common.Address, proposedCoordinator common.Address) error { +func (cp *configPoller) UpdateRoutes(ctx context.Context, activeCoordinator common.Address, proposedCoordinator common.Address) error { cp.targetContract.Store(&activeCoordinator) // Register filters for both active and proposed - err := cp.destChainLogPoller.RegisterFilter(logpoller.Filter{Name: configPollerFilterName(activeCoordinator), EventSigs: []common.Hash{ConfigSet}, Addresses: []common.Address{activeCoordinator}}) + err := cp.destChainLogPoller.RegisterFilter(ctx, logpoller.Filter{Name: configPollerFilterName(activeCoordinator), EventSigs: []common.Hash{ConfigSet}, Addresses: []common.Address{activeCoordinator}}) if err != nil { return err } - err = cp.destChainLogPoller.RegisterFilter(logpoller.Filter{Name: configPollerFilterName(proposedCoordinator), EventSigs: []common.Hash{ConfigSet}, Addresses: []common.Address{activeCoordinator}}) + err = cp.destChainLogPoller.RegisterFilter(ctx, logpoller.Filter{Name: configPollerFilterName(proposedCoordinator), EventSigs: []common.Hash{ConfigSet}, Addresses: []common.Address{activeCoordinator}}) if err != nil { return err } diff --git a/core/services/relay/evm/functions/config_poller_test.go b/core/services/relay/evm/functions/config_poller_test.go index ab80f3ae565..2d96b2fd15d 100644 --- a/core/services/relay/evm/functions/config_poller_test.go +++ b/core/services/relay/evm/functions/config_poller_test.go @@ -76,11 +76,11 @@ func runTest(t *testing.T, pluginType functions.FunctionsPluginType, expectedDig b.Commit() db := pgtest.NewSqlxDB(t) defer db.Close() - cfg := pgtest.NewQConfig(false) ethClient := evmclient.NewSimulatedBackendClient(t, b, big.NewInt(1337)) defer ethClient.Close() lggr := logger.TestLogger(t) - lorm := logpoller.NewORM(big.NewInt(1337), db, lggr, cfg) + + lorm := logpoller.NewORM(big.NewInt(1337), db, lggr) lpOpts := logpoller.Opts{ PollPeriod: 100 * time.Millisecond, FinalityDepth: 1, @@ -92,7 +92,7 @@ func runTest(t *testing.T, pluginType functions.FunctionsPluginType, expectedDig servicetest.Run(t, lp) configPoller, err := functions.NewFunctionsConfigPoller(pluginType, lp, lggr) require.NoError(t, err) - require.NoError(t, configPoller.UpdateRoutes(ocrAddress, ocrAddress)) + require.NoError(t, configPoller.UpdateRoutes(testutils.Context(t), ocrAddress, ocrAddress)) // Should have no config to begin with. _, config, err := configPoller.LatestConfigDetails(testutils.Context(t)) require.NoError(t, err) diff --git a/core/services/relay/evm/functions/contract_transmitter.go b/core/services/relay/evm/functions/contract_transmitter.go index 78a5ff39bb7..051b1f0bef9 100644 --- a/core/services/relay/evm/functions/contract_transmitter.go +++ b/core/services/relay/evm/functions/contract_transmitter.go @@ -22,7 +22,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/functions/encoding" - "github.com/smartcontractkit/chainlink/v2/core/services/pg" evmRelayTypes "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/types" ) @@ -228,8 +227,7 @@ func (oc *contractTransmitter) LatestConfigDigestAndEpoch(ctx context.Context) ( if err != nil { return ocrtypes.ConfigDigest{}, 0, err } - latest, err := oc.lp.LatestLogByEventSigWithConfs( - oc.transmittedEventSig, *contractAddr, 1, pg.WithParentCtx(ctx)) + latest, err := oc.lp.LatestLogByEventSigWithConfs(ctx, oc.transmittedEventSig, *contractAddr, 1) if err != nil { if errors.Is(err, sql.ErrNoRows) { // No transmissions yet @@ -255,14 +253,14 @@ func (oc *contractTransmitter) HealthReport() map[string]error { } func (oc *contractTransmitter) Name() string { return oc.lggr.Name() } -func (oc *contractTransmitter) UpdateRoutes(activeCoordinator common.Address, proposedCoordinator common.Address) error { +func (oc *contractTransmitter) UpdateRoutes(ctx context.Context, activeCoordinator common.Address, proposedCoordinator common.Address) error { // transmitter only cares about the active coordinator previousContract := oc.contractAddress.Swap(&activeCoordinator) if previousContract != nil && *previousContract == activeCoordinator { return nil } oc.lggr.Debugw("FunctionsContractTransmitter: updating routes", "previousContract", previousContract, "activeCoordinator", activeCoordinator) - err := oc.lp.RegisterFilter(logpoller.Filter{Name: transmitterFilterName(activeCoordinator), EventSigs: []common.Hash{oc.transmittedEventSig}, Addresses: []common.Address{activeCoordinator}}) + err := oc.lp.RegisterFilter(ctx, logpoller.Filter{Name: transmitterFilterName(activeCoordinator), EventSigs: []common.Hash{oc.transmittedEventSig}, Addresses: []common.Address{activeCoordinator}}) if err != nil { return err } diff --git a/core/services/relay/evm/functions/contract_transmitter_test.go b/core/services/relay/evm/functions/contract_transmitter_test.go index c9dc942c5df..e9712a3687c 100644 --- a/core/services/relay/evm/functions/contract_transmitter_test.go +++ b/core/services/relay/evm/functions/contract_transmitter_test.go @@ -35,6 +35,7 @@ func (mockTransmitter) FromAddress() gethcommon.Address { return testutils.NewAd func TestContractTransmitter_LatestConfigDigestAndEpoch(t *testing.T) { t.Parallel() + ctx := testutils.Context(t) digestStr := "000130da6b9315bd59af6b0a3f5463c0d0a39e92eaa34cbcbdbace7b3bfcc776" lggr := logger.TestLogger(t) @@ -48,13 +49,13 @@ func TestContractTransmitter_LatestConfigDigestAndEpoch(t *testing.T) { c.On("CallContract", mock.Anything, mock.Anything, mock.Anything).Return(digestAndEpochDontScanLogs, nil).Once() contractABI, err := abi.JSON(strings.NewReader(ocr2aggregator.OCR2AggregatorABI)) require.NoError(t, err) - lp.On("RegisterFilter", mock.Anything).Return(nil) + lp.On("RegisterFilter", mock.Anything, mock.Anything).Return(nil) functionsTransmitter, err := functions.NewFunctionsContractTransmitter(c, contractABI, &mockTransmitter{}, lp, lggr, func(b []byte) (*txmgr.TxMeta, error) { return &txmgr.TxMeta{}, nil }, 1) require.NoError(t, err) - require.NoError(t, functionsTransmitter.UpdateRoutes(gethcommon.Address{}, gethcommon.Address{})) + require.NoError(t, functionsTransmitter.UpdateRoutes(ctx, gethcommon.Address{}, gethcommon.Address{})) digest, epoch, err := functionsTransmitter.LatestConfigDigestAndEpoch(testutils.Context(t)) require.NoError(t, err) @@ -64,6 +65,7 @@ func TestContractTransmitter_LatestConfigDigestAndEpoch(t *testing.T) { func TestContractTransmitter_Transmit_V1(t *testing.T) { t.Parallel() + ctx := testutils.Context(t) contractVersion := uint32(1) configuredDestAddress, coordinatorAddress := testutils.NewAddress(), testutils.NewAddress() @@ -71,14 +73,14 @@ func TestContractTransmitter_Transmit_V1(t *testing.T) { c := evmclimocks.NewClient(t) lp := lpmocks.NewLogPoller(t) contractABI, _ := abi.JSON(strings.NewReader(ocr2aggregator.OCR2AggregatorABI)) - lp.On("RegisterFilter", mock.Anything).Return(nil) + lp.On("RegisterFilter", mock.Anything, mock.Anything).Return(nil) ocrTransmitter := mockTransmitter{} ot, err := functions.NewFunctionsContractTransmitter(c, contractABI, &ocrTransmitter, lp, lggr, func(b []byte) (*txmgr.TxMeta, error) { return &txmgr.TxMeta{}, nil }, contractVersion) require.NoError(t, err) - require.NoError(t, ot.UpdateRoutes(configuredDestAddress, configuredDestAddress)) + require.NoError(t, ot.UpdateRoutes(ctx, configuredDestAddress, configuredDestAddress)) reqId, err := hex.DecodeString("000102030405060708090a0b0c0d0e0f000102030405060708090a0b0c0d0e0f") require.NoError(t, err) @@ -107,6 +109,7 @@ func TestContractTransmitter_Transmit_V1(t *testing.T) { func TestContractTransmitter_Transmit_V1_CoordinatorMismatch(t *testing.T) { t.Parallel() + ctx := testutils.Context(t) contractVersion := uint32(1) configuredDestAddress, coordinatorAddress1, coordinatorAddress2 := testutils.NewAddress(), testutils.NewAddress(), testutils.NewAddress() @@ -114,14 +117,14 @@ func TestContractTransmitter_Transmit_V1_CoordinatorMismatch(t *testing.T) { c := evmclimocks.NewClient(t) lp := lpmocks.NewLogPoller(t) contractABI, _ := abi.JSON(strings.NewReader(ocr2aggregator.OCR2AggregatorABI)) - lp.On("RegisterFilter", mock.Anything).Return(nil) + lp.On("RegisterFilter", mock.Anything, mock.Anything).Return(nil) ocrTransmitter := mockTransmitter{} ot, err := functions.NewFunctionsContractTransmitter(c, contractABI, &ocrTransmitter, lp, lggr, func(b []byte) (*txmgr.TxMeta, error) { return &txmgr.TxMeta{}, nil }, contractVersion) require.NoError(t, err) - require.NoError(t, ot.UpdateRoutes(configuredDestAddress, configuredDestAddress)) + require.NoError(t, ot.UpdateRoutes(ctx, configuredDestAddress, configuredDestAddress)) reqId1, err := hex.DecodeString("110102030405060708090a0b0c0d0e0f000102030405060708090a0b0c0d0e0f") require.NoError(t, err) diff --git a/core/services/relay/evm/functions/logpoller_wrapper.go b/core/services/relay/evm/functions/logpoller_wrapper.go index f11b6bee1e0..471f18b4b0e 100644 --- a/core/services/relay/evm/functions/logpoller_wrapper.go +++ b/core/services/relay/evm/functions/logpoller_wrapper.go @@ -19,7 +19,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/functions/config" evmRelayTypes "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/types" - "github.com/smartcontractkit/chainlink/v2/core/utils" ) type logPollerWrapper struct { @@ -142,7 +141,7 @@ func (l *logPollerWrapper) HealthReport() map[string]error { func (l *logPollerWrapper) Name() string { return l.lggr.Name() } // methods of LogPollerWrapper -func (l *logPollerWrapper) LatestEvents() ([]evmRelayTypes.OracleRequest, []evmRelayTypes.OracleResponse, error) { +func (l *logPollerWrapper) LatestEvents(ctx context.Context) ([]evmRelayTypes.OracleRequest, []evmRelayTypes.OracleResponse, error) { l.mu.Lock() coordinators := []common.Address{} if l.activeCoordinator != (common.Address{}) { @@ -151,7 +150,7 @@ func (l *logPollerWrapper) LatestEvents() ([]evmRelayTypes.OracleRequest, []evmR if l.proposedCoordinator != (common.Address{}) && l.activeCoordinator != l.proposedCoordinator { coordinators = append(coordinators, l.proposedCoordinator) } - latest, err := l.logPoller.LatestBlock() + latest, err := l.logPoller.LatestBlock(ctx) if err != nil { l.mu.Unlock() return nil, nil, err @@ -173,7 +172,7 @@ func (l *logPollerWrapper) LatestEvents() ([]evmRelayTypes.OracleRequest, []evmR for _, coordinator := range coordinators { requestEndBlock := latestBlockNum - l.requestBlockOffset - requestLogs, err := l.logPoller.Logs(startBlockNum, requestEndBlock, functions_coordinator.FunctionsCoordinatorOracleRequest{}.Topic(), coordinator) + requestLogs, err := l.logPoller.Logs(ctx, startBlockNum, requestEndBlock, functions_coordinator.FunctionsCoordinatorOracleRequest{}.Topic(), coordinator) if err != nil { l.lggr.Errorw("LatestEvents: fetching request logs from LogPoller failed", "startBlock", startBlockNum, "endBlock", requestEndBlock) return nil, nil, err @@ -181,7 +180,7 @@ func (l *logPollerWrapper) LatestEvents() ([]evmRelayTypes.OracleRequest, []evmR l.lggr.Debugw("LatestEvents: fetched request logs", "nRequestLogs", len(requestLogs), "latestBlock", latest, "startBlock", startBlockNum, "endBlock", requestEndBlock) requestLogs = l.filterPreviouslyDetectedEvents(requestLogs, &l.detectedRequests, "requests") responseEndBlock := latestBlockNum - l.responseBlockOffset - responseLogs, err := l.logPoller.Logs(startBlockNum, responseEndBlock, functions_coordinator.FunctionsCoordinatorOracleResponse{}.Topic(), coordinator) + responseLogs, err := l.logPoller.Logs(ctx, startBlockNum, responseEndBlock, functions_coordinator.FunctionsCoordinatorOracleResponse{}.Topic(), coordinator) if err != nil { l.lggr.Errorw("LatestEvents: fetching response logs from LogPoller failed", "startBlock", startBlockNum, "endBlock", responseEndBlock) return nil, nil, err @@ -316,10 +315,10 @@ func (l *logPollerWrapper) filterPreviouslyDetectedEvents(logs []logpoller.Log, } // "internal" method called only by EVM relayer components -func (l *logPollerWrapper) SubscribeToUpdates(subscriberName string, subscriber evmRelayTypes.RouteUpdateSubscriber) { +func (l *logPollerWrapper) SubscribeToUpdates(ctx context.Context, subscriberName string, subscriber evmRelayTypes.RouteUpdateSubscriber) { if l.pluginConfig.ContractVersion == 0 { // in V0, immediately set contract address to Oracle contract and never update again - if err := subscriber.UpdateRoutes(l.routerContract.Address(), l.routerContract.Address()); err != nil { + if err := subscriber.UpdateRoutes(ctx, l.routerContract.Address(), l.routerContract.Address()); err != nil { l.lggr.Errorw("LogPollerWrapper: Failed to update routes", "subscriberName", subscriberName, "err", err) } } else if l.pluginConfig.ContractVersion == 1 { @@ -339,14 +338,16 @@ func (l *logPollerWrapper) checkForRouteUpdates() { updateOnce := func() { // NOTE: timeout == frequency here, could be changed to a separate config value - timeoutCtx, cancel := utils.ContextFromChanWithTimeout(l.stopCh, time.Duration(l.pluginConfig.ContractUpdateCheckFrequencySec)*time.Second) + timeout := time.Duration(l.pluginConfig.ContractUpdateCheckFrequencySec) * time.Second + ctx, cancel := l.stopCh.CtxCancel(context.WithTimeout(context.Background(), timeout)) defer cancel() - active, proposed, err := l.getCurrentCoordinators(timeoutCtx) + active, proposed, err := l.getCurrentCoordinators(ctx) if err != nil { l.lggr.Errorw("LogPollerWrapper: error calling getCurrentCoordinators", "err", err) return } - l.handleRouteUpdate(active, proposed) + + l.handleRouteUpdate(ctx, active, proposed) } updateOnce() // update once right away @@ -388,7 +389,7 @@ func (l *logPollerWrapper) getCurrentCoordinators(ctx context.Context) (common.A return activeCoordinator, proposedCoordinator, nil } -func (l *logPollerWrapper) handleRouteUpdate(activeCoordinator common.Address, proposedCoordinator common.Address) { +func (l *logPollerWrapper) handleRouteUpdate(ctx context.Context, activeCoordinator common.Address, proposedCoordinator common.Address) { l.mu.Lock() defer l.mu.Unlock() @@ -401,8 +402,8 @@ func (l *logPollerWrapper) handleRouteUpdate(activeCoordinator common.Address, p l.lggr.Debug("LogPollerWrapper: no changes to routes") return } - errActive := l.registerFilters(activeCoordinator) - errProposed := l.registerFilters(proposedCoordinator) + errActive := l.registerFilters(ctx, activeCoordinator) + errProposed := l.registerFilters(ctx, proposedCoordinator) if errActive != nil || errProposed != nil { l.lggr.Errorw("LogPollerWrapper: Failed to register filters", "errorActive", errActive, "errorProposed", errProposed) return @@ -413,7 +414,7 @@ func (l *logPollerWrapper) handleRouteUpdate(activeCoordinator common.Address, p l.proposedCoordinator = proposedCoordinator for _, subscriber := range l.subscribers { - err := subscriber.UpdateRoutes(activeCoordinator, proposedCoordinator) + err := subscriber.UpdateRoutes(ctx, activeCoordinator, proposedCoordinator) if err != nil { l.lggr.Errorw("LogPollerWrapper: Failed to update routes", "err", err) } @@ -424,11 +425,12 @@ func filterName(addr common.Address) string { return logpoller.FilterName("FunctionsLogPollerWrapper", addr.String()) } -func (l *logPollerWrapper) registerFilters(coordinatorAddress common.Address) error { +func (l *logPollerWrapper) registerFilters(ctx context.Context, coordinatorAddress common.Address) error { if (coordinatorAddress == common.Address{}) { return nil } return l.logPoller.RegisterFilter( + ctx, logpoller.Filter{ Name: filterName(coordinatorAddress), EventSigs: []common.Hash{ diff --git a/core/services/relay/evm/functions/logpoller_wrapper_test.go b/core/services/relay/evm/functions/logpoller_wrapper_test.go index 9df285b4c25..b9a1684050d 100644 --- a/core/services/relay/evm/functions/logpoller_wrapper_test.go +++ b/core/services/relay/evm/functions/logpoller_wrapper_test.go @@ -1,12 +1,15 @@ package functions import ( + "context" "crypto/rand" "encoding/hex" "sync" "testing" "time" + "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" + "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" @@ -27,7 +30,7 @@ type subscriber struct { expectedCalls int } -func (s *subscriber) UpdateRoutes(activeCoordinator common.Address, proposedCoordinator common.Address) error { +func (s *subscriber) UpdateRoutes(ctx context.Context, activeCoordinator common.Address, proposedCoordinator common.Address) error { if s.expectedCalls == 0 { panic("unexpected call to UpdateRoutes") } @@ -85,19 +88,20 @@ func getMockedRequestLog(t *testing.T) logpoller.Log { func TestLogPollerWrapper_SingleSubscriberEmptyEvents(t *testing.T) { t.Parallel() + ctx := testutils.Context(t) lp, lpWrapper, client := setUp(t, 100_000) // check only once - lp.On("LatestBlock").Return(logpoller.LogPollerBlock{BlockNumber: int64(100)}, nil) + lp.On("LatestBlock", mock.Anything).Return(logpoller.LogPollerBlock{BlockNumber: int64(100)}, nil) - lp.On("Logs", mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return([]logpoller.Log{}, nil) + lp.On("Logs", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return([]logpoller.Log{}, nil) client.On("CallContract", mock.Anything, mock.Anything, mock.Anything).Return(addr(t, "01"), nil) - lp.On("RegisterFilter", mock.Anything).Return(nil) + lp.On("RegisterFilter", mock.Anything, mock.Anything).Return(nil) subscriber := newSubscriber(1) - lpWrapper.SubscribeToUpdates("mock_subscriber", subscriber) + lpWrapper.SubscribeToUpdates(ctx, "mock_subscriber", subscriber) servicetest.Run(t, lpWrapper) subscriber.updates.Wait() - reqs, resps, err := lpWrapper.LatestEvents() + reqs, resps, err := lpWrapper.LatestEvents(ctx) require.NoError(t, err) require.Equal(t, 0, len(reqs)) require.Equal(t, 0, len(resps)) @@ -105,45 +109,47 @@ func TestLogPollerWrapper_SingleSubscriberEmptyEvents(t *testing.T) { func TestLogPollerWrapper_ErrorOnZeroAddresses(t *testing.T) { t.Parallel() + ctx := testutils.Context(t) lp, lpWrapper, client := setUp(t, 100_000) // check only once - lp.On("LatestBlock").Return(logpoller.LogPollerBlock{BlockNumber: int64(100)}, nil) + lp.On("LatestBlock", mock.Anything).Return(logpoller.LogPollerBlock{BlockNumber: int64(100)}, nil) client.On("CallContract", mock.Anything, mock.Anything, mock.Anything).Return(addr(t, "00"), nil) servicetest.Run(t, lpWrapper) - _, _, err := lpWrapper.LatestEvents() + _, _, err := lpWrapper.LatestEvents(ctx) require.Error(t, err) } func TestLogPollerWrapper_LatestEvents_ReorgHandling(t *testing.T) { t.Parallel() + ctx := testutils.Context(t) lp, lpWrapper, client := setUp(t, 100_000) - lp.On("LatestBlock").Return(logpoller.LogPollerBlock{BlockNumber: int64(100)}, nil) + lp.On("LatestBlock", mock.Anything).Return(logpoller.LogPollerBlock{BlockNumber: int64(100)}, nil) client.On("CallContract", mock.Anything, mock.Anything, mock.Anything).Return(addr(t, "01"), nil) - lp.On("RegisterFilter", mock.Anything).Return(nil) + lp.On("RegisterFilter", mock.Anything, mock.Anything).Return(nil) subscriber := newSubscriber(1) - lpWrapper.SubscribeToUpdates("mock_subscriber", subscriber) + lpWrapper.SubscribeToUpdates(ctx, "mock_subscriber", subscriber) mockedLog := getMockedRequestLog(t) // All logPoller queries for responses return none - lp.On("Logs", mock.Anything, mock.Anything, functions_coordinator.FunctionsCoordinatorOracleResponse{}.Topic(), mock.Anything).Return([]logpoller.Log{}, nil) + lp.On("Logs", mock.Anything, mock.Anything, mock.Anything, functions_coordinator.FunctionsCoordinatorOracleResponse{}.Topic(), mock.Anything).Return([]logpoller.Log{}, nil) // On the first logPoller query for requests, the request log appears - lp.On("Logs", mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return([]logpoller.Log{mockedLog}, nil).Once() + lp.On("Logs", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return([]logpoller.Log{mockedLog}, nil).Once() // On the 2nd query, the request log disappears - lp.On("Logs", mock.Anything, mock.Anything, functions_coordinator.FunctionsCoordinatorOracleRequest{}.Topic(), mock.Anything).Return([]logpoller.Log{}, nil).Once() + lp.On("Logs", mock.Anything, mock.Anything, mock.Anything, functions_coordinator.FunctionsCoordinatorOracleRequest{}.Topic(), mock.Anything).Return([]logpoller.Log{}, nil).Once() // On the 3rd query, the original request log appears again - lp.On("Logs", mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return([]logpoller.Log{mockedLog}, nil).Once() + lp.On("Logs", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return([]logpoller.Log{mockedLog}, nil).Once() servicetest.Run(t, lpWrapper) subscriber.updates.Wait() - oracleRequests, _, err := lpWrapper.LatestEvents() + oracleRequests, _, err := lpWrapper.LatestEvents(ctx) require.NoError(t, err) assert.Equal(t, 1, len(oracleRequests)) - oracleRequests, _, err = lpWrapper.LatestEvents() + oracleRequests, _, err = lpWrapper.LatestEvents(ctx) require.NoError(t, err) assert.Equal(t, 0, len(oracleRequests)) require.NoError(t, err) - oracleRequests, _, err = lpWrapper.LatestEvents() + oracleRequests, _, err = lpWrapper.LatestEvents(ctx) require.NoError(t, err) assert.Equal(t, 0, len(oracleRequests)) } diff --git a/core/services/relay/evm/functions/offchain_config_digester.go b/core/services/relay/evm/functions/offchain_config_digester.go index 29547e794ce..c53d07e77ca 100644 --- a/core/services/relay/evm/functions/offchain_config_digester.go +++ b/core/services/relay/evm/functions/offchain_config_digester.go @@ -1,6 +1,7 @@ package functions import ( + "context" "encoding/binary" "errors" "fmt" @@ -82,7 +83,7 @@ func (d *functionsOffchainConfigDigester) ConfigDigestPrefix() (types.ConfigDige } // called from LogPollerWrapper in a separate goroutine -func (d *functionsOffchainConfigDigester) UpdateRoutes(activeCoordinator common.Address, proposedCoordinator common.Address) error { +func (d *functionsOffchainConfigDigester) UpdateRoutes(ctx context.Context, activeCoordinator common.Address, proposedCoordinator common.Address) error { d.contractAddress.Store(&activeCoordinator) return nil } diff --git a/core/services/relay/evm/llo_config_provider.go b/core/services/relay/evm/llo_config_provider.go index bd8dbac8460..6efd0ccada2 100644 --- a/core/services/relay/evm/llo_config_provider.go +++ b/core/services/relay/evm/llo_config_provider.go @@ -1,6 +1,8 @@ package evm import ( + "context" + "github.com/ethereum/go-ethereum/common" pkgerrors "github.com/pkg/errors" @@ -10,12 +12,12 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/types" ) -func newLLOConfigProvider(lggr logger.Logger, chain legacyevm.Chain, opts *types.RelayOpts) (*configWatcher, error) { +func newLLOConfigProvider(ctx context.Context, lggr logger.Logger, chain legacyevm.Chain, opts *types.RelayOpts) (*configWatcher, error) { if !common.IsHexAddress(opts.ContractID) { return nil, pkgerrors.Errorf("invalid contractID, expected hex address") } aggregatorAddress := common.HexToAddress(opts.ContractID) configDigester := llo.NewOffchainConfigDigester(chain.Config().EVM().ChainID(), aggregatorAddress) - return newContractConfigProvider(lggr, chain, opts, aggregatorAddress, ChannelVerifierLogDecoder, configDigester) + return newContractConfigProvider(ctx, lggr, chain, opts, aggregatorAddress, ChannelVerifierLogDecoder, configDigester) } diff --git a/core/services/relay/evm/mercury/config_poller.go b/core/services/relay/evm/mercury/config_poller.go index 98ef78020c7..2da541a8e42 100644 --- a/core/services/relay/evm/mercury/config_poller.go +++ b/core/services/relay/evm/mercury/config_poller.go @@ -14,7 +14,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/chains/evm/logpoller" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/llo-feeds/generated/verifier" "github.com/smartcontractkit/chainlink/v2/core/logger" - "github.com/smartcontractkit/chainlink/v2/core/services/pg" "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/mercury/utils" ) @@ -98,8 +97,8 @@ func FilterName(addr common.Address, feedID common.Hash) string { } // NewConfigPoller creates a new Mercury ConfigPoller -func NewConfigPoller(lggr logger.Logger, destChainPoller logpoller.LogPoller, addr common.Address, feedId common.Hash) (*ConfigPoller, error) { - err := destChainPoller.RegisterFilter(logpoller.Filter{Name: FilterName(addr, feedId), EventSigs: []common.Hash{FeedScopedConfigSet}, Addresses: []common.Address{addr}}) +func NewConfigPoller(ctx context.Context, lggr logger.Logger, destChainPoller logpoller.LogPoller, addr common.Address, feedId common.Hash) (*ConfigPoller, error) { + err := destChainPoller.RegisterFilter(ctx, logpoller.Filter{Name: FilterName(addr, feedId), EventSigs: []common.Hash{FeedScopedConfigSet}, Addresses: []common.Address{addr}}) if err != nil { return nil, err } @@ -132,7 +131,7 @@ func (cp *ConfigPoller) Replay(ctx context.Context, fromBlock int64) error { // LatestConfigDetails returns the latest config details from the logs func (cp *ConfigPoller) LatestConfigDetails(ctx context.Context) (changedInBlock uint64, configDigest ocrtypes.ConfigDigest, err error) { cp.lggr.Debugw("LatestConfigDetails", "eventSig", FeedScopedConfigSet, "addr", cp.addr, "topicIndex", feedIdTopicIndex, "feedID", cp.feedId) - logs, err := cp.destChainLogPoller.IndexedLogs(FeedScopedConfigSet, cp.addr, feedIdTopicIndex, []common.Hash{cp.feedId}, 1, pg.WithParentCtx(ctx)) + logs, err := cp.destChainLogPoller.IndexedLogs(ctx, FeedScopedConfigSet, cp.addr, feedIdTopicIndex, []common.Hash{cp.feedId}, 1) if err != nil { return 0, ocrtypes.ConfigDigest{}, err } @@ -149,7 +148,7 @@ func (cp *ConfigPoller) LatestConfigDetails(ctx context.Context) (changedInBlock // LatestConfig returns the latest config from the logs on a certain block func (cp *ConfigPoller) LatestConfig(ctx context.Context, changedInBlock uint64) (ocrtypes.ContractConfig, error) { - lgs, err := cp.destChainLogPoller.IndexedLogsByBlockRange(int64(changedInBlock), int64(changedInBlock), FeedScopedConfigSet, cp.addr, feedIdTopicIndex, []common.Hash{cp.feedId}, pg.WithParentCtx(ctx)) + lgs, err := cp.destChainLogPoller.IndexedLogsByBlockRange(ctx, int64(changedInBlock), int64(changedInBlock), FeedScopedConfigSet, cp.addr, feedIdTopicIndex, []common.Hash{cp.feedId}) if err != nil { return ocrtypes.ContractConfig{}, err } @@ -166,7 +165,7 @@ func (cp *ConfigPoller) LatestConfig(ctx context.Context, changedInBlock uint64) // LatestBlockHeight returns the latest block height from the logs func (cp *ConfigPoller) LatestBlockHeight(ctx context.Context) (blockHeight uint64, err error) { - latest, err := cp.destChainLogPoller.LatestBlock(pg.WithParentCtx(ctx)) + latest, err := cp.destChainLogPoller.LatestBlock(ctx) if err != nil { if errors.Is(err, sql.ErrNoRows) { return 0, nil diff --git a/core/services/relay/evm/mercury/helpers_test.go b/core/services/relay/evm/mercury/helpers_test.go index 4b05b974c3d..f2923696bfc 100644 --- a/core/services/relay/evm/mercury/helpers_test.go +++ b/core/services/relay/evm/mercury/helpers_test.go @@ -163,10 +163,9 @@ func SetupTH(t *testing.T, feedID common.Hash) TestHarness { b.Commit() db := pgtest.NewSqlxDB(t) - cfg := pgtest.NewQConfig(false) ethClient := evmclient.NewSimulatedBackendClient(t, b, big.NewInt(1337)) lggr := logger.TestLogger(t) - lorm := logpoller.NewORM(big.NewInt(1337), db, lggr, cfg) + lorm := logpoller.NewORM(big.NewInt(1337), db, lggr) lpOpts := logpoller.Opts{ PollPeriod: 100 * time.Millisecond, @@ -178,7 +177,7 @@ func SetupTH(t *testing.T, feedID common.Hash) TestHarness { lp := logpoller.NewLogPoller(lorm, ethClient, lggr, lpOpts) servicetest.Run(t, lp) - configPoller, err := NewConfigPoller(lggr, lp, verifierAddress, feedID) + configPoller, err := NewConfigPoller(testutils.Context(t), lggr, lp, verifierAddress, feedID) require.NoError(t, err) configPoller.Start() diff --git a/core/services/relay/evm/mercury/orm.go b/core/services/relay/evm/mercury/orm.go index f8d4c8cb1ee..19f2aa8e16b 100644 --- a/core/services/relay/evm/mercury/orm.go +++ b/core/services/relay/evm/mercury/orm.go @@ -21,10 +21,10 @@ import ( ) type ORM interface { - InsertTransmitRequest(req *pb.TransmitRequest, jobID int32, reportCtx ocrtypes.ReportContext, qopts ...pg.QOpt) error - DeleteTransmitRequests(reqs []*pb.TransmitRequest, qopts ...pg.QOpt) error - GetTransmitRequests(jobID int32, qopts ...pg.QOpt) ([]*Transmission, error) - PruneTransmitRequests(jobID int32, maxSize int, qopts ...pg.QOpt) error + InsertTransmitRequest(serverURL string, req *pb.TransmitRequest, jobID int32, reportCtx ocrtypes.ReportContext, qopts ...pg.QOpt) error + DeleteTransmitRequests(serverURL string, reqs []*pb.TransmitRequest, qopts ...pg.QOpt) error + GetTransmitRequests(serverURL string, jobID int32, qopts ...pg.QOpt) ([]*Transmission, error) + PruneTransmitRequests(serverURL string, jobID int32, maxSize int, qopts ...pg.QOpt) error LatestReport(ctx context.Context, feedID [32]byte, qopts ...pg.QOpt) (report []byte, err error) } @@ -48,7 +48,7 @@ func NewORM(db *sqlx.DB, lggr logger.Logger, cfg pg.QConfig) ORM { } // InsertTransmitRequest inserts one transmit request if the payload does not exist already. -func (o *orm) InsertTransmitRequest(req *pb.TransmitRequest, jobID int32, reportCtx ocrtypes.ReportContext, qopts ...pg.QOpt) error { +func (o *orm) InsertTransmitRequest(serverURL string, req *pb.TransmitRequest, jobID int32, reportCtx ocrtypes.ReportContext, qopts ...pg.QOpt) error { feedID, err := FeedIDFromReport(req.Payload) if err != nil { return err @@ -62,10 +62,10 @@ func (o *orm) InsertTransmitRequest(req *pb.TransmitRequest, jobID int32, report go func() { defer wg.Done() err1 = q.ExecQ(` - INSERT INTO mercury_transmit_requests (payload, payload_hash, config_digest, epoch, round, extra_hash, job_id, feed_id) - VALUES ($1, $2, $3, $4, $5, $6, $7, $8) - ON CONFLICT (payload_hash) DO NOTHING - `, req.Payload, hashPayload(req.Payload), reportCtx.ConfigDigest[:], reportCtx.Epoch, reportCtx.Round, reportCtx.ExtraHash[:], jobID, feedID[:]) + INSERT INTO mercury_transmit_requests (server_url, payload, payload_hash, config_digest, epoch, round, extra_hash, job_id, feed_id) + VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) + ON CONFLICT (server_url, payload_hash) DO NOTHING + `, serverURL, req.Payload, hashPayload(req.Payload), reportCtx.ConfigDigest[:], reportCtx.Epoch, reportCtx.Round, reportCtx.ExtraHash[:], jobID, feedID[:]) }() go func() { @@ -83,7 +83,7 @@ func (o *orm) InsertTransmitRequest(req *pb.TransmitRequest, jobID int32, report } // DeleteTransmitRequest deletes the given transmit requests if they exist. -func (o *orm) DeleteTransmitRequests(reqs []*pb.TransmitRequest, qopts ...pg.QOpt) error { +func (o *orm) DeleteTransmitRequests(serverURL string, reqs []*pb.TransmitRequest, qopts ...pg.QOpt) error { if len(reqs) == 0 { return nil } @@ -96,22 +96,22 @@ func (o *orm) DeleteTransmitRequests(reqs []*pb.TransmitRequest, qopts ...pg.QOp q := o.q.WithOpts(qopts...) err := q.ExecQ(` DELETE FROM mercury_transmit_requests - WHERE payload_hash = ANY($1) - `, hashes) + WHERE server_url = $1 AND payload_hash = ANY($2) + `, serverURL, hashes) return err } // GetTransmitRequests returns all transmit requests in chronologically descending order. -func (o *orm) GetTransmitRequests(jobID int32, qopts ...pg.QOpt) ([]*Transmission, error) { +func (o *orm) GetTransmitRequests(serverURL string, jobID int32, qopts ...pg.QOpt) ([]*Transmission, error) { q := o.q.WithOpts(qopts...) // The priority queue uses epoch and round to sort transmissions so order by // the same fields here for optimal insertion into the pq. rows, err := q.QueryContext(q.ParentCtx, ` SELECT payload, config_digest, epoch, round, extra_hash FROM mercury_transmit_requests - WHERE job_id = $1 + WHERE job_id = $1 AND server_url = $2 ORDER BY epoch DESC, round DESC - `, jobID) + `, jobID, serverURL) if err != nil { return nil, err } @@ -146,20 +146,20 @@ func (o *orm) GetTransmitRequests(jobID int32, qopts ...pg.QOpt) ([]*Transmissio // PruneTransmitRequests keeps at most maxSize rows for the given job ID, // deleting the oldest transactions. -func (o *orm) PruneTransmitRequests(jobID int32, maxSize int, qopts ...pg.QOpt) error { +func (o *orm) PruneTransmitRequests(serverURL string, jobID int32, maxSize int, qopts ...pg.QOpt) error { q := o.q.WithOpts(qopts...) // Prune the oldest requests by epoch and round. return q.ExecQ(` DELETE FROM mercury_transmit_requests - WHERE job_id = $1 AND + WHERE job_id = $1 AND server_url = $2 AND payload_hash NOT IN ( SELECT payload_hash FROM mercury_transmit_requests - WHERE job_id = $1 + WHERE job_id = $1 AND server_url = $2 ORDER BY epoch DESC, round DESC - LIMIT $2 + LIMIT $3 ) - `, jobID, maxSize) + `, jobID, serverURL, maxSize) } func (o *orm) LatestReport(ctx context.Context, feedID [32]byte, qopts ...pg.QOpt) (report []byte, err error) { diff --git a/core/services/relay/evm/mercury/orm_test.go b/core/services/relay/evm/mercury/orm_test.go index 56dea70417b..14be878eeef 100644 --- a/core/services/relay/evm/mercury/orm_test.go +++ b/core/services/relay/evm/mercury/orm_test.go @@ -14,6 +14,12 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/mercury/wsrpc/pb" ) +var ( + sURL = "wss://example.com/mercury" + sURL2 = "wss://mercuryserver.test" + sURL3 = "wss://mercuryserver.example/foo" +) + func TestORM(t *testing.T) { db := pgtest.NewSqlxDB(t) @@ -42,20 +48,30 @@ func TestORM(t *testing.T) { assert.Nil(t, l) // Test insert and get requests. - err = orm.InsertTransmitRequest(&pb.TransmitRequest{Payload: reports[0]}, jobID, reportContexts[0]) + // s1 + err = orm.InsertTransmitRequest(sURL, &pb.TransmitRequest{Payload: reports[0]}, jobID, reportContexts[0]) require.NoError(t, err) - err = orm.InsertTransmitRequest(&pb.TransmitRequest{Payload: reports[1]}, jobID, reportContexts[1]) + err = orm.InsertTransmitRequest(sURL, &pb.TransmitRequest{Payload: reports[1]}, jobID, reportContexts[1]) require.NoError(t, err) - err = orm.InsertTransmitRequest(&pb.TransmitRequest{Payload: reports[2]}, jobID, reportContexts[2]) + err = orm.InsertTransmitRequest(sURL, &pb.TransmitRequest{Payload: reports[2]}, jobID, reportContexts[2]) require.NoError(t, err) - transmissions, err := orm.GetTransmitRequests(jobID) + // s2 + err = orm.InsertTransmitRequest(sURL2, &pb.TransmitRequest{Payload: reports[3]}, jobID, reportContexts[0]) + require.NoError(t, err) + + transmissions, err := orm.GetTransmitRequests(sURL, jobID) require.NoError(t, err) require.Equal(t, transmissions, []*Transmission{ {Req: &pb.TransmitRequest{Payload: reports[2]}, ReportCtx: reportContexts[2]}, {Req: &pb.TransmitRequest{Payload: reports[1]}, ReportCtx: reportContexts[1]}, {Req: &pb.TransmitRequest{Payload: reports[0]}, ReportCtx: reportContexts[0]}, }) + transmissions, err = orm.GetTransmitRequests(sURL2, jobID) + require.NoError(t, err) + require.Equal(t, transmissions, []*Transmission{ + {Req: &pb.TransmitRequest{Payload: reports[3]}, ReportCtx: reportContexts[0]}, + }) l, err = orm.LatestReport(testutils.Context(t), feedID) require.NoError(t, err) @@ -63,10 +79,10 @@ func TestORM(t *testing.T) { assert.Equal(t, reports[2], l) // Test requests can be deleted. - err = orm.DeleteTransmitRequests([]*pb.TransmitRequest{{Payload: reports[1]}}) + err = orm.DeleteTransmitRequests(sURL, []*pb.TransmitRequest{{Payload: reports[1]}}) require.NoError(t, err) - transmissions, err = orm.GetTransmitRequests(jobID) + transmissions, err = orm.GetTransmitRequests(sURL, jobID) require.NoError(t, err) require.Equal(t, transmissions, []*Transmission{ {Req: &pb.TransmitRequest{Payload: reports[2]}, ReportCtx: reportContexts[2]}, @@ -78,10 +94,10 @@ func TestORM(t *testing.T) { assert.Equal(t, reports[2], l) // Test deleting non-existent requests does not error. - err = orm.DeleteTransmitRequests([]*pb.TransmitRequest{{Payload: []byte("does-not-exist")}}) + err = orm.DeleteTransmitRequests(sURL, []*pb.TransmitRequest{{Payload: []byte("does-not-exist")}}) require.NoError(t, err) - transmissions, err = orm.GetTransmitRequests(jobID) + transmissions, err = orm.GetTransmitRequests(sURL, jobID) require.NoError(t, err) require.Equal(t, transmissions, []*Transmission{ {Req: &pb.TransmitRequest{Payload: reports[2]}, ReportCtx: reportContexts[2]}, @@ -89,7 +105,7 @@ func TestORM(t *testing.T) { }) // Test deleting multiple requests. - err = orm.DeleteTransmitRequests([]*pb.TransmitRequest{ + err = orm.DeleteTransmitRequests(sURL, []*pb.TransmitRequest{ {Payload: reports[0]}, {Payload: reports[2]}, }) @@ -99,27 +115,27 @@ func TestORM(t *testing.T) { require.NoError(t, err) assert.Equal(t, reports[2], l) - transmissions, err = orm.GetTransmitRequests(jobID) + transmissions, err = orm.GetTransmitRequests(sURL, jobID) require.NoError(t, err) require.Empty(t, transmissions) // More inserts. - err = orm.InsertTransmitRequest(&pb.TransmitRequest{Payload: reports[3]}, jobID, reportContexts[3]) + err = orm.InsertTransmitRequest(sURL, &pb.TransmitRequest{Payload: reports[3]}, jobID, reportContexts[3]) require.NoError(t, err) - transmissions, err = orm.GetTransmitRequests(jobID) + transmissions, err = orm.GetTransmitRequests(sURL, jobID) require.NoError(t, err) require.Equal(t, transmissions, []*Transmission{ {Req: &pb.TransmitRequest{Payload: reports[3]}, ReportCtx: reportContexts[3]}, }) // Duplicate requests are ignored. - err = orm.InsertTransmitRequest(&pb.TransmitRequest{Payload: reports[3]}, jobID, reportContexts[3]) + err = orm.InsertTransmitRequest(sURL, &pb.TransmitRequest{Payload: reports[3]}, jobID, reportContexts[3]) require.NoError(t, err) - err = orm.InsertTransmitRequest(&pb.TransmitRequest{Payload: reports[3]}, jobID, reportContexts[3]) + err = orm.InsertTransmitRequest(sURL, &pb.TransmitRequest{Payload: reports[3]}, jobID, reportContexts[3]) require.NoError(t, err) - transmissions, err = orm.GetTransmitRequests(jobID) + transmissions, err = orm.GetTransmitRequests(sURL, jobID) require.NoError(t, err) require.Equal(t, transmissions, []*Transmission{ {Req: &pb.TransmitRequest{Payload: reports[3]}, ReportCtx: reportContexts[3]}, @@ -128,6 +144,12 @@ func TestORM(t *testing.T) { l, err = orm.LatestReport(testutils.Context(t), feedID) require.NoError(t, err) assert.Equal(t, reports[3], l) + + // s2 not affected by deletion + transmissions, err = orm.GetTransmitRequests(sURL2, jobID) + require.NoError(t, err) + require.Len(t, transmissions, 1) + } func TestORM_PruneTransmitRequests(t *testing.T) { @@ -152,60 +174,75 @@ func TestORM_PruneTransmitRequests(t *testing.T) { } } - err := orm.InsertTransmitRequest(&pb.TransmitRequest{Payload: reports[0]}, jobID, makeReportContext(1, 1)) + // s1 + err := orm.InsertTransmitRequest(sURL, &pb.TransmitRequest{Payload: reports[0]}, jobID, makeReportContext(1, 1)) require.NoError(t, err) - err = orm.InsertTransmitRequest(&pb.TransmitRequest{Payload: reports[1]}, jobID, makeReportContext(1, 2)) + err = orm.InsertTransmitRequest(sURL, &pb.TransmitRequest{Payload: reports[1]}, jobID, makeReportContext(1, 2)) + require.NoError(t, err) + // s2 - should not be touched + err = orm.InsertTransmitRequest(sURL2, &pb.TransmitRequest{Payload: reports[0]}, jobID, makeReportContext(1, 0)) + require.NoError(t, err) + err = orm.InsertTransmitRequest(sURL2, &pb.TransmitRequest{Payload: reports[0]}, jobID, makeReportContext(1, 1)) + require.NoError(t, err) + err = orm.InsertTransmitRequest(sURL2, &pb.TransmitRequest{Payload: reports[1]}, jobID, makeReportContext(1, 2)) + require.NoError(t, err) + err = orm.InsertTransmitRequest(sURL2, &pb.TransmitRequest{Payload: reports[2]}, jobID, makeReportContext(1, 3)) require.NoError(t, err) - // Max size greater than table size, expect no-op - err = orm.PruneTransmitRequests(jobID, 5) + // Max size greater than number of records, expect no-op + err = orm.PruneTransmitRequests(sURL, jobID, 5) require.NoError(t, err) - transmissions, err := orm.GetTransmitRequests(jobID) + transmissions, err := orm.GetTransmitRequests(sURL, jobID) require.NoError(t, err) require.Equal(t, transmissions, []*Transmission{ {Req: &pb.TransmitRequest{Payload: reports[1]}, ReportCtx: makeReportContext(1, 2)}, {Req: &pb.TransmitRequest{Payload: reports[0]}, ReportCtx: makeReportContext(1, 1)}, }) - // Max size equal to table size, expect no-op - err = orm.PruneTransmitRequests(jobID, 2) + // Max size equal to number of records, expect no-op + err = orm.PruneTransmitRequests(sURL, jobID, 2) require.NoError(t, err) - transmissions, err = orm.GetTransmitRequests(jobID) + transmissions, err = orm.GetTransmitRequests(sURL, jobID) require.NoError(t, err) require.Equal(t, transmissions, []*Transmission{ {Req: &pb.TransmitRequest{Payload: reports[1]}, ReportCtx: makeReportContext(1, 2)}, {Req: &pb.TransmitRequest{Payload: reports[0]}, ReportCtx: makeReportContext(1, 1)}, }) - // Max size is table size + 1, but jobID differs, expect no-op - err = orm.PruneTransmitRequests(-1, 2) + // Max size is number of records + 1, but jobID differs, expect no-op + err = orm.PruneTransmitRequests(sURL, -1, 2) require.NoError(t, err) - transmissions, err = orm.GetTransmitRequests(jobID) + transmissions, err = orm.GetTransmitRequests(sURL, jobID) require.NoError(t, err) require.Equal(t, []*Transmission{ {Req: &pb.TransmitRequest{Payload: reports[1]}, ReportCtx: makeReportContext(1, 2)}, {Req: &pb.TransmitRequest{Payload: reports[0]}, ReportCtx: makeReportContext(1, 1)}, }, transmissions) - err = orm.InsertTransmitRequest(&pb.TransmitRequest{Payload: reports[2]}, jobID, makeReportContext(2, 1)) + err = orm.InsertTransmitRequest(sURL, &pb.TransmitRequest{Payload: reports[2]}, jobID, makeReportContext(2, 1)) require.NoError(t, err) - err = orm.InsertTransmitRequest(&pb.TransmitRequest{Payload: reports[3]}, jobID, makeReportContext(2, 2)) + err = orm.InsertTransmitRequest(sURL, &pb.TransmitRequest{Payload: reports[3]}, jobID, makeReportContext(2, 2)) require.NoError(t, err) // Max size is table size - 1, expect the oldest row to be pruned. - err = orm.PruneTransmitRequests(jobID, 3) + err = orm.PruneTransmitRequests(sURL, jobID, 3) require.NoError(t, err) - transmissions, err = orm.GetTransmitRequests(jobID) + transmissions, err = orm.GetTransmitRequests(sURL, jobID) require.NoError(t, err) require.Equal(t, []*Transmission{ {Req: &pb.TransmitRequest{Payload: reports[3]}, ReportCtx: makeReportContext(2, 2)}, {Req: &pb.TransmitRequest{Payload: reports[2]}, ReportCtx: makeReportContext(2, 1)}, {Req: &pb.TransmitRequest{Payload: reports[1]}, ReportCtx: makeReportContext(1, 2)}, }, transmissions) + + // s2 not touched + transmissions, err = orm.GetTransmitRequests(sURL2, jobID) + require.NoError(t, err) + assert.Len(t, transmissions, 3) } func TestORM_InsertTransmitRequest_LatestReport(t *testing.T) { @@ -231,7 +268,13 @@ func TestORM_InsertTransmitRequest_LatestReport(t *testing.T) { } } - err := orm.InsertTransmitRequest(&pb.TransmitRequest{Payload: reports[0]}, jobID, makeReportContext( + err := orm.InsertTransmitRequest(sURL, &pb.TransmitRequest{Payload: reports[0]}, jobID, makeReportContext( + 0, 0, + )) + require.NoError(t, err) + + // this should be ignored, because report context is the same + err = orm.InsertTransmitRequest(sURL2, &pb.TransmitRequest{Payload: reports[1]}, jobID, makeReportContext( 0, 0, )) require.NoError(t, err) @@ -241,7 +284,7 @@ func TestORM_InsertTransmitRequest_LatestReport(t *testing.T) { assert.Equal(t, reports[0], l) t.Run("replaces if epoch and round are larger", func(t *testing.T) { - err = orm.InsertTransmitRequest(&pb.TransmitRequest{Payload: reports[1]}, jobID, makeReportContext(1, 1)) + err = orm.InsertTransmitRequest("foo", &pb.TransmitRequest{Payload: reports[1]}, jobID, makeReportContext(1, 1)) require.NoError(t, err) l, err = orm.LatestReport(testutils.Context(t), feedID) @@ -249,7 +292,7 @@ func TestORM_InsertTransmitRequest_LatestReport(t *testing.T) { assert.Equal(t, reports[1], l) }) t.Run("replaces if epoch is the same but round is greater", func(t *testing.T) { - err = orm.InsertTransmitRequest(&pb.TransmitRequest{Payload: reports[2]}, jobID, makeReportContext(1, 2)) + err = orm.InsertTransmitRequest(sURL, &pb.TransmitRequest{Payload: reports[2]}, jobID, makeReportContext(1, 2)) require.NoError(t, err) l, err = orm.LatestReport(testutils.Context(t), feedID) @@ -257,7 +300,7 @@ func TestORM_InsertTransmitRequest_LatestReport(t *testing.T) { assert.Equal(t, reports[2], l) }) t.Run("replaces if epoch is larger but round is smaller", func(t *testing.T) { - err = orm.InsertTransmitRequest(&pb.TransmitRequest{Payload: reports[3]}, jobID, makeReportContext(2, 1)) + err = orm.InsertTransmitRequest("bar", &pb.TransmitRequest{Payload: reports[3]}, jobID, makeReportContext(2, 1)) require.NoError(t, err) l, err = orm.LatestReport(testutils.Context(t), feedID) @@ -265,7 +308,7 @@ func TestORM_InsertTransmitRequest_LatestReport(t *testing.T) { assert.Equal(t, reports[3], l) }) t.Run("does not overwrite if epoch/round is the same", func(t *testing.T) { - err = orm.InsertTransmitRequest(&pb.TransmitRequest{Payload: reports[0]}, jobID, makeReportContext(2, 1)) + err = orm.InsertTransmitRequest(sURL, &pb.TransmitRequest{Payload: reports[0]}, jobID, makeReportContext(2, 1)) require.NoError(t, err) l, err = orm.LatestReport(testutils.Context(t), feedID) diff --git a/core/services/relay/evm/mercury/persistence_manager.go b/core/services/relay/evm/mercury/persistence_manager.go index 779e275f154..dc805c12e7b 100644 --- a/core/services/relay/evm/mercury/persistence_manager.go +++ b/core/services/relay/evm/mercury/persistence_manager.go @@ -20,8 +20,9 @@ var ( ) type PersistenceManager struct { - lggr logger.Logger - orm ORM + lggr logger.Logger + orm ORM + serverURL string once services.StateMachine stopCh services.StopChan @@ -37,10 +38,11 @@ type PersistenceManager struct { pruneFrequency time.Duration } -func NewPersistenceManager(lggr logger.Logger, orm ORM, jobID int32, maxTransmitQueueSize int, flushDeletesFrequency, pruneFrequency time.Duration) *PersistenceManager { +func NewPersistenceManager(lggr logger.Logger, serverURL string, orm ORM, jobID int32, maxTransmitQueueSize int, flushDeletesFrequency, pruneFrequency time.Duration) *PersistenceManager { return &PersistenceManager{ - lggr: lggr.Named("MercuryPersistenceManager"), + lggr: lggr.Named("MercuryPersistenceManager").With("serverURL", serverURL), orm: orm, + serverURL: serverURL, stopCh: make(services.StopChan), jobID: jobID, maxTransmitQueueSize: maxTransmitQueueSize, @@ -67,11 +69,11 @@ func (pm *PersistenceManager) Close() error { } func (pm *PersistenceManager) Insert(ctx context.Context, req *pb.TransmitRequest, reportCtx ocrtypes.ReportContext) error { - return pm.orm.InsertTransmitRequest(req, pm.jobID, reportCtx, pg.WithParentCtx(ctx)) + return pm.orm.InsertTransmitRequest(pm.serverURL, req, pm.jobID, reportCtx, pg.WithParentCtx(ctx)) } func (pm *PersistenceManager) Delete(ctx context.Context, req *pb.TransmitRequest) error { - return pm.orm.DeleteTransmitRequests([]*pb.TransmitRequest{req}, pg.WithParentCtx(ctx)) + return pm.orm.DeleteTransmitRequests(pm.serverURL, []*pb.TransmitRequest{req}, pg.WithParentCtx(ctx)) } func (pm *PersistenceManager) AsyncDelete(req *pb.TransmitRequest) { @@ -79,7 +81,7 @@ func (pm *PersistenceManager) AsyncDelete(req *pb.TransmitRequest) { } func (pm *PersistenceManager) Load(ctx context.Context) ([]*Transmission, error) { - return pm.orm.GetTransmitRequests(pm.jobID, pg.WithParentCtx(ctx)) + return pm.orm.GetTransmitRequests(pm.serverURL, pm.jobID, pg.WithParentCtx(ctx)) } func (pm *PersistenceManager) runFlushDeletesLoop() { @@ -96,7 +98,7 @@ func (pm *PersistenceManager) runFlushDeletesLoop() { return case <-ticker.C: queuedReqs := pm.resetDeleteQueue() - if err := pm.orm.DeleteTransmitRequests(queuedReqs, pg.WithParentCtx(ctx)); err != nil { + if err := pm.orm.DeleteTransmitRequests(pm.serverURL, queuedReqs, pg.WithParentCtx(ctx)); err != nil { pm.lggr.Errorw("Failed to delete queued transmit requests", "err", err) pm.addToDeleteQueue(queuedReqs...) } else { @@ -119,7 +121,7 @@ func (pm *PersistenceManager) runPruneLoop() { ticker.Stop() return case <-ticker.C: - if err := pm.orm.PruneTransmitRequests(pm.jobID, pm.maxTransmitQueueSize, pg.WithParentCtx(ctx), pg.WithLongQueryTimeout()); err != nil { + if err := pm.orm.PruneTransmitRequests(pm.serverURL, pm.jobID, pm.maxTransmitQueueSize, pg.WithParentCtx(ctx), pg.WithLongQueryTimeout()); err != nil { pm.lggr.Errorw("Failed to prune transmit requests table", "err", err) } else { pm.lggr.Debugw("Pruned transmit requests table") diff --git a/core/services/relay/evm/mercury/persistence_manager_test.go b/core/services/relay/evm/mercury/persistence_manager_test.go index 755d64a5a23..15b1424f1a4 100644 --- a/core/services/relay/evm/mercury/persistence_manager_test.go +++ b/core/services/relay/evm/mercury/persistence_manager_test.go @@ -23,7 +23,7 @@ func bootstrapPersistenceManager(t *testing.T, jobID int32, db *sqlx.DB) (*Persi t.Helper() lggr, observedLogs := logger.TestLoggerObserved(t, zapcore.DebugLevel) orm := NewORM(db, lggr, pgtest.NewQConfig(true)) - return NewPersistenceManager(lggr, orm, jobID, 2, 5*time.Millisecond, 5*time.Millisecond), observedLogs + return NewPersistenceManager(lggr, "mercuryserver.example", orm, jobID, 2, 5*time.Millisecond, 5*time.Millisecond), observedLogs } func TestPersistenceManager(t *testing.T) { diff --git a/core/services/relay/evm/mercury/queue.go b/core/services/relay/evm/mercury/queue.go index 07ef8a97426..8a89f47302b 100644 --- a/core/services/relay/evm/mercury/queue.go +++ b/core/services/relay/evm/mercury/queue.go @@ -31,7 +31,7 @@ var transmitQueueLoad = promauto.NewGaugeVec(prometheus.GaugeOpts{ Name: "mercury_transmit_queue_load", Help: "Percent of transmit queue capacity used", }, - []string{"feedID", "capacity"}, + []string{"feedID", "serverURL", "capacity"}, ) // Prometheus' default interval is 15s, set this to under 7.5s to avoid @@ -64,9 +64,7 @@ type Transmission struct { // maxlen controls how many items will be stored in the queue // 0 means unlimited - be careful, this can cause memory leaks -func NewTransmitQueue(lggr logger.Logger, feedID string, maxlen int, transmissions []*Transmission, asyncDeleter asyncDeleter) *TransmitQueue { - pq := priorityQueue(transmissions) - heap.Init(&pq) // ensure the heap is ordered +func NewTransmitQueue(lggr logger.Logger, serverURL, feedID string, maxlen int, asyncDeleter asyncDeleter) *TransmitQueue { mu := new(sync.RWMutex) return &TransmitQueue{ services.StateMachine{}, @@ -74,14 +72,20 @@ func NewTransmitQueue(lggr logger.Logger, feedID string, maxlen int, transmissio lggr.Named("TransmitQueue"), asyncDeleter, mu, - &pq, + nil, // pq needs to be initialized by calling tq.Init before use maxlen, false, nil, - transmitQueueLoad.WithLabelValues(feedID, fmt.Sprintf("%d", maxlen)), + transmitQueueLoad.WithLabelValues(feedID, serverURL, fmt.Sprintf("%d", maxlen)), } } +func (tq *TransmitQueue) Init(transmissions []*Transmission) { + pq := priorityQueue(transmissions) + heap.Init(&pq) // ensure the heap is ordered + tq.pq = &pq +} + func (tq *TransmitQueue) Push(req *pb.TransmitRequest, reportCtx ocrtypes.ReportContext) (ok bool) { tq.cond.L.Lock() defer tq.cond.L.Unlock() diff --git a/core/services/relay/evm/mercury/queue_test.go b/core/services/relay/evm/mercury/queue_test.go index de2f64f9fe9..8e5a0caf614 100644 --- a/core/services/relay/evm/mercury/queue_test.go +++ b/core/services/relay/evm/mercury/queue_test.go @@ -68,7 +68,8 @@ func Test_Queue(t *testing.T) { lggr, observedLogs := logger.TestLoggerObserved(t, zapcore.ErrorLevel) testTransmissions := createTestTransmissions(t) deleter := mocks.NewAsyncDeleter(t) - transmitQueue := NewTransmitQueue(lggr, "foo feed ID", 7, nil, deleter) + transmitQueue := NewTransmitQueue(lggr, sURL, "foo feed ID", 7, deleter) + transmitQueue.Init([]*Transmission{}) t.Run("successfully add transmissions to transmit queue", func(t *testing.T) { for _, tt := range testTransmissions { @@ -138,7 +139,8 @@ func Test_Queue(t *testing.T) { }, }, } - transmitQueue := NewTransmitQueue(lggr, "foo feed ID", 7, transmissions, deleter) + transmitQueue := NewTransmitQueue(lggr, sURL, "foo feed ID", 7, deleter) + transmitQueue.Init(transmissions) transmission := transmitQueue.BlockingPop() assert.Equal(t, transmission.Req.Payload, []byte("new1")) diff --git a/core/services/relay/evm/mercury/transmitter.go b/core/services/relay/evm/mercury/transmitter.go index 9444b904b89..6f49ca91bfc 100644 --- a/core/services/relay/evm/mercury/transmitter.go +++ b/core/services/relay/evm/mercury/transmitter.go @@ -6,7 +6,9 @@ import ( "crypto/ed25519" "errors" "fmt" + "io" "math/big" + "sort" "sync" "time" @@ -16,8 +18,7 @@ import ( pkgerrors "github.com/pkg/errors" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" - - "github.com/jmoiron/sqlx" + "golang.org/x/sync/errgroup" "github.com/smartcontractkit/libocr/offchainreporting2plus/chains/evmutil" ocrtypes "github.com/smartcontractkit/libocr/offchainreporting2plus/types" @@ -26,7 +27,6 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/types/mercury" "github.com/smartcontractkit/chainlink/v2/core/logger" - "github.com/smartcontractkit/chainlink/v2/core/services/pg" mercuryutils "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/mercury/utils" "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/mercury/wsrpc" "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/mercury/wsrpc/pb" @@ -49,43 +49,43 @@ var ( Name: "mercury_transmit_success_count", Help: "Number of successful transmissions (duplicates are counted as success)", }, - []string{"feedID"}, + []string{"feedID", "serverURL"}, ) transmitDuplicateCount = promauto.NewCounterVec(prometheus.CounterOpts{ Name: "mercury_transmit_duplicate_count", Help: "Number of transmissions where the server told us it was a duplicate", }, - []string{"feedID"}, + []string{"feedID", "serverURL"}, ) transmitConnectionErrorCount = promauto.NewCounterVec(prometheus.CounterOpts{ Name: "mercury_transmit_connection_error_count", Help: "Number of errored transmissions that failed due to problem with the connection", }, - []string{"feedID"}, + []string{"feedID", "serverURL"}, ) transmitQueueDeleteErrorCount = promauto.NewCounterVec(prometheus.CounterOpts{ Name: "mercury_transmit_queue_delete_error_count", Help: "Running count of DB errors when trying to delete an item from the queue DB", }, - []string{"feedID"}, + []string{"feedID", "serverURL"}, ) transmitQueueInsertErrorCount = promauto.NewCounterVec(prometheus.CounterOpts{ Name: "mercury_transmit_queue_insert_error_count", Help: "Running count of DB errors when trying to insert an item into the queue DB", }, - []string{"feedID"}, + []string{"feedID", "serverURL"}, ) transmitQueuePushErrorCount = promauto.NewCounterVec(prometheus.CounterOpts{ Name: "mercury_transmit_queue_push_error_count", Help: "Running count of DB errors when trying to push an item onto the queue", }, - []string{"feedID"}, + []string{"feedID", "serverURL"}, ) transmitServerErrorCount = promauto.NewCounterVec(prometheus.CounterOpts{ Name: "mercury_transmit_server_error_count", Help: "Number of errored transmissions that failed due to an error returned by the mercury server", }, - []string{"feedID", "code"}, + []string{"feedID", "serverURL", "code"}, ) ) @@ -106,27 +106,18 @@ var _ Transmitter = (*mercuryTransmitter)(nil) type mercuryTransmitter struct { services.StateMachine - lggr logger.Logger - rpcClient wsrpc.Client - persistenceManager *PersistenceManager - codec TransmitterReportDecoder + lggr logger.Logger + + servers map[string]*server + + codec TransmitterReportDecoder feedID mercuryutils.FeedID jobID int32 fromAccount string stopCh services.StopChan - queue *TransmitQueue - wg sync.WaitGroup - - deleteQueue chan *pb.TransmitRequest - - transmitSuccessCount prometheus.Counter - transmitDuplicateCount prometheus.Counter - transmitConnectionErrorCount prometheus.Counter - transmitQueueDeleteErrorCount prometheus.Counter - transmitQueueInsertErrorCount prometheus.Counter - transmitQueuePushErrorCount prometheus.Counter + wg *sync.WaitGroup } var PayloadTypes = getPayloadTypes() @@ -148,83 +139,33 @@ func getPayloadTypes() abi.Arguments { }) } -func NewTransmitter(lggr logger.Logger, rpcClient wsrpc.Client, fromAccount ed25519.PublicKey, jobID int32, feedID [32]byte, db *sqlx.DB, cfg pg.QConfig, codec TransmitterReportDecoder) *mercuryTransmitter { - feedIDHex := fmt.Sprintf("0x%x", feedID[:]) - persistenceManager := NewPersistenceManager(lggr, NewORM(db, lggr, cfg), jobID, maxTransmitQueueSize, flushDeletesFrequency, pruneFrequency) - return &mercuryTransmitter{ - services.StateMachine{}, - lggr.Named("MercuryTransmitter").With("feedID", feedIDHex), - rpcClient, - persistenceManager, - codec, - feedID, - jobID, - fmt.Sprintf("%x", fromAccount), - make(services.StopChan), - nil, - sync.WaitGroup{}, - make(chan *pb.TransmitRequest, maxDeleteQueueSize), - transmitSuccessCount.WithLabelValues(feedIDHex), - transmitDuplicateCount.WithLabelValues(feedIDHex), - transmitConnectionErrorCount.WithLabelValues(feedIDHex), - transmitQueueDeleteErrorCount.WithLabelValues(feedIDHex), - transmitQueueInsertErrorCount.WithLabelValues(feedIDHex), - transmitQueuePushErrorCount.WithLabelValues(feedIDHex), - } -} +type server struct { + lggr logger.Logger -func (mt *mercuryTransmitter) Start(ctx context.Context) (err error) { - return mt.StartOnce("MercuryTransmitter", func() error { - mt.lggr.Debugw("Loading transmit requests from database") - if err := mt.persistenceManager.Start(ctx); err != nil { - return err - } - transmissions, err := mt.persistenceManager.Load(ctx) - if err != nil { - return err - } - mt.queue = NewTransmitQueue(mt.lggr, mt.feedID.String(), maxTransmitQueueSize, transmissions, mt.persistenceManager) + c wsrpc.Client + pm *PersistenceManager + q *TransmitQueue - if err := mt.rpcClient.Start(ctx); err != nil { - return err - } - if err := mt.queue.Start(ctx); err != nil { - return err - } - mt.wg.Add(1) - go mt.runDeleteQueueLoop() - mt.wg.Add(1) - go mt.runQueueLoop() - return nil - }) -} + deleteQueue chan *pb.TransmitRequest -func (mt *mercuryTransmitter) Close() error { - return mt.StopOnce("MercuryTransmitter", func() error { - if err := mt.queue.Close(); err != nil { - return err - } - if err := mt.persistenceManager.Close(); err != nil { - return err - } - close(mt.stopCh) - mt.wg.Wait() - return mt.rpcClient.Close() - }) + transmitSuccessCount prometheus.Counter + transmitDuplicateCount prometheus.Counter + transmitConnectionErrorCount prometheus.Counter + transmitQueueDeleteErrorCount prometheus.Counter + transmitQueueInsertErrorCount prometheus.Counter + transmitQueuePushErrorCount prometheus.Counter } -func (mt *mercuryTransmitter) Name() string { return mt.lggr.Name() } - -func (mt *mercuryTransmitter) HealthReport() map[string]error { - report := map[string]error{mt.Name(): mt.Healthy()} - services.CopyHealth(report, mt.rpcClient.HealthReport()) - services.CopyHealth(report, mt.queue.HealthReport()) +func (s *server) HealthReport() map[string]error { + report := map[string]error{} + services.CopyHealth(report, s.c.HealthReport()) + services.CopyHealth(report, s.q.HealthReport()) return report } -func (mt *mercuryTransmitter) runDeleteQueueLoop() { - defer mt.wg.Done() - runloopCtx, cancel := mt.stopCh.Ctx(context.Background()) +func (s *server) runDeleteQueueLoop(stopCh services.StopChan, wg *sync.WaitGroup) { + defer wg.Done() + runloopCtx, cancel := stopCh.Ctx(context.Background()) defer cancel() // Exponential backoff for very rarely occurring errors (DB disconnect etc) @@ -237,16 +178,16 @@ func (mt *mercuryTransmitter) runDeleteQueueLoop() { for { select { - case req := <-mt.deleteQueue: + case req := <-s.deleteQueue: for { - if err := mt.persistenceManager.Delete(runloopCtx, req); err != nil { - mt.lggr.Errorw("Failed to delete transmit request record", "err", err, "req.Payload", req.Payload) - mt.transmitQueueDeleteErrorCount.Inc() + if err := s.pm.Delete(runloopCtx, req); err != nil { + s.lggr.Errorw("Failed to delete transmit request record", "err", err, "req.Payload", req.Payload) + s.transmitQueueDeleteErrorCount.Inc() select { case <-time.After(b.Duration()): // Wait a backoff duration before trying to delete again continue - case <-mt.stopCh: + case <-stopCh: // abort and return immediately on stop even if items remain in queue return } @@ -255,15 +196,15 @@ func (mt *mercuryTransmitter) runDeleteQueueLoop() { } // success b.Reset() - case <-mt.stopCh: + case <-stopCh: // abort and return immediately on stop even if items remain in queue return } } } -func (mt *mercuryTransmitter) runQueueLoop() { - defer mt.wg.Done() +func (s *server) runQueueLoop(stopCh services.StopChan, wg *sync.WaitGroup, feedIDHex string) { + defer wg.Done() // Exponential backoff with very short retry interval (since latency is a priority) // 5ms, 10ms, 20ms, 40ms etc b := backoff.Backoff{ @@ -272,26 +213,26 @@ func (mt *mercuryTransmitter) runQueueLoop() { Factor: 2, Jitter: true, } - runloopCtx, cancel := mt.stopCh.Ctx(context.Background()) + runloopCtx, cancel := stopCh.Ctx(context.Background()) defer cancel() for { - t := mt.queue.BlockingPop() + t := s.q.BlockingPop() if t == nil { // queue was closed return } ctx, cancel := context.WithTimeout(runloopCtx, utils.WithJitter(transmitTimeout)) - res, err := mt.rpcClient.Transmit(ctx, t.Req) + res, err := s.c.Transmit(ctx, t.Req) cancel() if runloopCtx.Err() != nil { // runloop context is only canceled on transmitter close so we can // exit the runloop here return } else if err != nil { - mt.transmitConnectionErrorCount.Inc() - mt.lggr.Errorw("Transmit report failed", "err", err, "reportCtx", t.ReportCtx) - if ok := mt.queue.Push(t.Req, t.ReportCtx); !ok { - mt.lggr.Error("Failed to push report to transmit queue; queue is closed") + s.transmitConnectionErrorCount.Inc() + s.lggr.Errorw("Transmit report failed", "err", err, "reportCtx", t.ReportCtx) + if ok := s.q.Push(t.Req, t.ReportCtx); !ok { + s.lggr.Error("Failed to push report to transmit queue; queue is closed") return } // Wait a backoff duration before pulling the most recent transmission @@ -299,36 +240,132 @@ func (mt *mercuryTransmitter) runQueueLoop() { select { case <-time.After(b.Duration()): continue - case <-mt.stopCh: + case <-stopCh: return } } b.Reset() if res.Error == "" { - mt.transmitSuccessCount.Inc() - mt.lggr.Debugw("Transmit report success", "payload", hexutil.Encode(t.Req.Payload), "response", res, "reportCtx", t.ReportCtx) + s.transmitSuccessCount.Inc() + s.lggr.Debugw("Transmit report success", "payload", hexutil.Encode(t.Req.Payload), "response", res, "reportCtx", t.ReportCtx) } else { // We don't need to retry here because the mercury server // has confirmed it received the report. We only need to retry // on networking/unknown errors switch res.Code { case DuplicateReport: - mt.transmitSuccessCount.Inc() - mt.transmitDuplicateCount.Inc() - mt.lggr.Debugw("Transmit report success; duplicate report", "payload", hexutil.Encode(t.Req.Payload), "response", res, "reportCtx", t.ReportCtx) + s.transmitSuccessCount.Inc() + s.transmitDuplicateCount.Inc() + s.lggr.Debugw("Transmit report success; duplicate report", "payload", hexutil.Encode(t.Req.Payload), "response", res, "reportCtx", t.ReportCtx) default: - transmitServerErrorCount.WithLabelValues(mt.feedID.String(), fmt.Sprintf("%d", res.Code)).Inc() - mt.lggr.Errorw("Transmit report failed; mercury server returned error", "response", res, "reportCtx", t.ReportCtx, "err", res.Error, "code", res.Code) + transmitServerErrorCount.WithLabelValues(feedIDHex, fmt.Sprintf("%d", res.Code)).Inc() + s.lggr.Errorw("Transmit report failed; mercury server returned error", "response", res, "reportCtx", t.ReportCtx, "err", res.Error, "code", res.Code) } } select { - case mt.deleteQueue <- t.Req: + case s.deleteQueue <- t.Req: default: - mt.lggr.Criticalw("Delete queue is full", "reportCtx", t.ReportCtx) + s.lggr.Criticalw("Delete queue is full", "reportCtx", t.ReportCtx) + } + } +} + +func NewTransmitter(lggr logger.Logger, clients map[string]wsrpc.Client, fromAccount ed25519.PublicKey, jobID int32, feedID [32]byte, orm ORM, codec TransmitterReportDecoder) *mercuryTransmitter { + feedIDHex := fmt.Sprintf("0x%x", feedID[:]) + servers := make(map[string]*server, len(clients)) + for serverURL, client := range clients { + cLggr := lggr.Named(serverURL).With("serverURL", serverURL) + pm := NewPersistenceManager(cLggr, serverURL, orm, jobID, maxTransmitQueueSize, flushDeletesFrequency, pruneFrequency) + servers[serverURL] = &server{ + cLggr, + client, + pm, + NewTransmitQueue(cLggr, serverURL, feedIDHex, maxTransmitQueueSize, pm), + make(chan *pb.TransmitRequest, maxDeleteQueueSize), + transmitSuccessCount.WithLabelValues(feedIDHex, serverURL), + transmitDuplicateCount.WithLabelValues(feedIDHex, serverURL), + transmitConnectionErrorCount.WithLabelValues(feedIDHex, serverURL), + transmitQueueDeleteErrorCount.WithLabelValues(feedIDHex, serverURL), + transmitQueueInsertErrorCount.WithLabelValues(feedIDHex, serverURL), + transmitQueuePushErrorCount.WithLabelValues(feedIDHex, serverURL), + } + } + return &mercuryTransmitter{ + services.StateMachine{}, + lggr.Named("MercuryTransmitter").With("feedID", feedIDHex), + servers, + codec, + feedID, + jobID, + fmt.Sprintf("%x", fromAccount), + make(services.StopChan), + &sync.WaitGroup{}, + } +} + +func (mt *mercuryTransmitter) Start(ctx context.Context) (err error) { + return mt.StartOnce("MercuryTransmitter", func() error { + mt.lggr.Debugw("Loading transmit requests from database") + + { + var startClosers []services.StartClose + for _, s := range mt.servers { + transmissions, err := s.pm.Load(ctx) + if err != nil { + return err + } + s.q.Init(transmissions) + // starting pm after loading from it is fine because it simply spawns some garbage collection/prune goroutines + startClosers = append(startClosers, s.c, s.q, s.pm) + + mt.wg.Add(2) + go s.runDeleteQueueLoop(mt.stopCh, mt.wg) + go s.runQueueLoop(mt.stopCh, mt.wg, mt.feedID.Hex()) + } + if err := (&services.MultiStart{}).Start(ctx, startClosers...); err != nil { + return err + } + } + + return nil + }) +} + +func (mt *mercuryTransmitter) Close() error { + return mt.StopOnce("MercuryTransmitter", func() error { + // Drain all the queues first + var qs []io.Closer + for _, s := range mt.servers { + qs = append(qs, s.q) + } + if err := services.CloseAll(qs...); err != nil { + return err + } + + close(mt.stopCh) + mt.wg.Wait() + + // Close all the persistence managers + // Close all the clients + var closers []io.Closer + for _, s := range mt.servers { + closers = append(closers, s.pm) + closers = append(closers, s.c) } + return services.CloseAll(closers...) + }) +} + +func (mt *mercuryTransmitter) Name() string { return mt.lggr.Name() } + +func (mt *mercuryTransmitter) HealthReport() map[string]error { + report := map[string]error{mt.Name(): mt.Healthy()} + for _, s := range mt.servers { + services.CopyHealth(report, s.HealthReport()) } + return report } // Transmit sends the report to the on-chain smart contract's Transmit method. @@ -358,15 +395,23 @@ func (mt *mercuryTransmitter) Transmit(ctx context.Context, reportCtx ocrtypes.R mt.lggr.Tracew("Transmit enqueue", "req.Payload", req.Payload, "report", report, "reportCtx", reportCtx, "signatures", signatures) - if err := mt.persistenceManager.Insert(ctx, req, reportCtx); err != nil { - mt.transmitQueueInsertErrorCount.Inc() - return err - } - if ok := mt.queue.Push(req, reportCtx); !ok { - mt.transmitQueuePushErrorCount.Inc() - return errors.New("transmit queue is closed") + g := new(errgroup.Group) + for _, s := range mt.servers { + s := s // https://golang.org/doc/faq#closures_and_goroutines + g.Go(func() error { + if err := s.pm.Insert(ctx, req, reportCtx); err != nil { + s.transmitQueueInsertErrorCount.Inc() + return err + } + if ok := s.q.Push(req, reportCtx); !ok { + s.transmitQueuePushErrorCount.Inc() + return errors.New("transmit queue is closed") + } + return nil + }) } - return nil + + return g.Wait() } // FromAccount returns the stringified (hex) CSA public key @@ -444,29 +489,67 @@ func (mt *mercuryTransmitter) latestReport(ctx context.Context, feedID [32]byte) req := &pb.LatestReportRequest{ FeedId: feedID[:], } - resp, err := mt.rpcClient.LatestReport(ctx, req) - if err != nil { - mt.lggr.Warnw("latestReport failed", "err", err) - return nil, pkgerrors.Wrap(err, "latestReport failed") - } - if resp == nil { - return nil, errors.New("latestReport expected non-nil response") - } - if resp.Error != "" { - err = errors.New(resp.Error) - mt.lggr.Warnw("latestReport failed; mercury server returned error", "err", err) - return nil, err + + var reports []*pb.Report + mu := sync.Mutex{} + var g errgroup.Group + for _, s := range mt.servers { + s := s + g.Go(func() error { + resp, err := s.c.LatestReport(ctx, req) + if err != nil { + s.lggr.Warnw("latestReport failed", "err", err) + return err + } + if resp == nil { + err = errors.New("latestReport expected non-nil response from server") + s.lggr.Warn(err.Error()) + return err + } + if resp.Error != "" { + err = errors.New(resp.Error) + s.lggr.Warnw("latestReport failed; mercury server returned error", "err", err) + return fmt.Errorf("latestReport failed; mercury server returned error: %s", resp.Error) + } + if resp.Report == nil { + s.lggr.Tracew("latestReport success: returned nil") + } else if !bytes.Equal(resp.Report.FeedId, feedID[:]) { + err = fmt.Errorf("latestReport failed; mismatched feed IDs, expected: 0x%x, got: 0x%x", mt.feedID[:], resp.Report.FeedId[:]) + s.lggr.Errorw("latestReport failed", "err", err) + return err + } else { + s.lggr.Tracew("latestReport success", "observationsTimestamp", resp.Report.ObservationsTimestamp, "currentBlockNum", resp.Report.CurrentBlockNumber) + } + mu.Lock() + defer mu.Unlock() + reports = append(reports, resp.Report) + return nil + }) } - if resp.Report == nil { - mt.lggr.Tracew("latestReport success: returned nil") - return nil, nil - } else if !bytes.Equal(resp.Report.FeedId, feedID[:]) { - err = fmt.Errorf("latestReport failed; mismatched feed IDs, expected: 0x%x, got: 0x%x", mt.feedID[:], resp.Report.FeedId[:]) - mt.lggr.Errorw("latestReport failed", "err", err) - return nil, err + err := g.Wait() + + if len(reports) == 0 { + return nil, fmt.Errorf("latestReport failed; all servers returned an error: %w", err) } - mt.lggr.Tracew("latestReport success", "currentBlockNum", resp.Report.CurrentBlockNumber) + sortReportsLatestFirst(reports) + + return reports[0], nil +} - return resp.Report, nil +func sortReportsLatestFirst(reports []*pb.Report) { + sort.Slice(reports, func(i, j int) bool { + // nils are "earliest" so they go to the end + if reports[i] == nil { + return false + } else if reports[j] == nil { + return true + } + // Handle block number case + if reports[i].ObservationsTimestamp == reports[j].ObservationsTimestamp { + return reports[i].CurrentBlockNumber > reports[j].CurrentBlockNumber + } + // Timestamp case + return reports[i].ObservationsTimestamp > reports[j].ObservationsTimestamp + }) } diff --git a/core/services/relay/evm/mercury/transmitter_test.go b/core/services/relay/evm/mercury/transmitter_test.go index 188beff5113..d7d62a9f422 100644 --- a/core/services/relay/evm/mercury/transmitter_test.go +++ b/core/services/relay/evm/mercury/transmitter_test.go @@ -16,6 +16,7 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest" "github.com/smartcontractkit/chainlink/v2/core/logger" mercurytypes "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/mercury/types" + "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/mercury/wsrpc" mocks "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/mercury/wsrpc/mocks" "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/mercury/wsrpc/pb" ) @@ -26,62 +27,78 @@ func Test_MercuryTransmitter_Transmit(t *testing.T) { var jobID int32 pgtest.MustExec(t, db, `SET CONSTRAINTS mercury_transmit_requests_job_id_fkey DEFERRED`) pgtest.MustExec(t, db, `SET CONSTRAINTS feed_latest_reports_job_id_fkey DEFERRED`) - q := NewTransmitQueue(lggr, "", 0, nil, nil) codec := new(mockCodec) + orm := NewORM(db, lggr, pgtest.NewQConfig(true)) + clients := map[string]wsrpc.Client{} + + t.Run("with one mercury server", func(t *testing.T) { + t.Run("v1 report transmission successfully enqueued", func(t *testing.T) { + report := sampleV1Report + c := &mocks.MockWSRPCClient{} + clients[sURL] = c + mt := NewTransmitter(lggr, clients, sampleClientPubKey, jobID, sampleFeedID, orm, codec) + // init the queue since we skipped starting transmitter + mt.servers[sURL].q.Init([]*Transmission{}) + err := mt.Transmit(testutils.Context(t), sampleReportContext, report, sampleSigs) + require.NoError(t, err) - t.Run("v1 report transmission successfully enqueued", func(t *testing.T) { - report := sampleV1Report - c := mocks.MockWSRPCClient{ - TransmitF: func(ctx context.Context, in *pb.TransmitRequest) (out *pb.TransmitResponse, err error) { - require.NotNil(t, in) - assert.Equal(t, hexutil.Encode(buildSamplePayload(report)), hexutil.Encode(in.Payload)) - out = new(pb.TransmitResponse) - out.Code = 42 - out.Error = "" - return out, nil - }, - } - mt := NewTransmitter(lggr, c, sampleClientPubKey, jobID, sampleFeedID, db, pgtest.NewQConfig(true), codec) - mt.queue = q - err := mt.Transmit(testutils.Context(t), sampleReportContext, report, sampleSigs) + // ensure it was added to the queue + require.Equal(t, mt.servers[sURL].q.pq.Len(), 1) + assert.Subset(t, mt.servers[sURL].q.pq.Pop().(*Transmission).Req.Payload, report) + }) + t.Run("v2 report transmission successfully enqueued", func(t *testing.T) { + report := sampleV2Report + c := &mocks.MockWSRPCClient{} + clients[sURL] = c + mt := NewTransmitter(lggr, clients, sampleClientPubKey, jobID, sampleFeedID, orm, codec) + // init the queue since we skipped starting transmitter + mt.servers[sURL].q.Init([]*Transmission{}) + err := mt.Transmit(testutils.Context(t), sampleReportContext, report, sampleSigs) + require.NoError(t, err) - require.NoError(t, err) - }) - t.Run("v2 report transmission successfully enqueued", func(t *testing.T) { - report := sampleV2Report - c := mocks.MockWSRPCClient{ - TransmitF: func(ctx context.Context, in *pb.TransmitRequest) (out *pb.TransmitResponse, err error) { - require.NotNil(t, in) - assert.Equal(t, hexutil.Encode(buildSamplePayload(report)), hexutil.Encode(in.Payload)) - out = new(pb.TransmitResponse) - out.Code = 42 - out.Error = "" - return out, nil - }, - } - mt := NewTransmitter(lggr, c, sampleClientPubKey, jobID, sampleFeedID, db, pgtest.NewQConfig(true), codec) - mt.queue = q - err := mt.Transmit(testutils.Context(t), sampleReportContext, report, sampleSigs) + // ensure it was added to the queue + require.Equal(t, mt.servers[sURL].q.pq.Len(), 1) + assert.Subset(t, mt.servers[sURL].q.pq.Pop().(*Transmission).Req.Payload, report) + }) + t.Run("v3 report transmission successfully enqueued", func(t *testing.T) { + report := sampleV3Report + c := &mocks.MockWSRPCClient{} + clients[sURL] = c + mt := NewTransmitter(lggr, clients, sampleClientPubKey, jobID, sampleFeedID, orm, codec) + // init the queue since we skipped starting transmitter + mt.servers[sURL].q.Init([]*Transmission{}) + err := mt.Transmit(testutils.Context(t), sampleReportContext, report, sampleSigs) + require.NoError(t, err) - require.NoError(t, err) + // ensure it was added to the queue + require.Equal(t, mt.servers[sURL].q.pq.Len(), 1) + assert.Subset(t, mt.servers[sURL].q.pq.Pop().(*Transmission).Req.Payload, report) + }) }) - t.Run("v3 report transmission successfully enqueued", func(t *testing.T) { + + t.Run("with multiple mercury servers", func(t *testing.T) { report := sampleV3Report - c := mocks.MockWSRPCClient{ - TransmitF: func(ctx context.Context, in *pb.TransmitRequest) (out *pb.TransmitResponse, err error) { - require.NotNil(t, in) - assert.Equal(t, hexutil.Encode(buildSamplePayload(report)), hexutil.Encode(in.Payload)) - out = new(pb.TransmitResponse) - out.Code = 42 - out.Error = "" - return out, nil - }, - } - mt := NewTransmitter(lggr, c, sampleClientPubKey, jobID, sampleFeedID, db, pgtest.NewQConfig(true), codec) - mt.queue = q - err := mt.Transmit(testutils.Context(t), sampleReportContext, report, sampleSigs) + c := &mocks.MockWSRPCClient{} + clients[sURL] = c + clients[sURL2] = c + clients[sURL3] = c + mt := NewTransmitter(lggr, clients, sampleClientPubKey, jobID, sampleFeedID, orm, codec) + // init the queue since we skipped starting transmitter + mt.servers[sURL].q.Init([]*Transmission{}) + mt.servers[sURL2].q.Init([]*Transmission{}) + mt.servers[sURL3].q.Init([]*Transmission{}) + + err := mt.Transmit(testutils.Context(t), sampleReportContext, report, sampleSigs) require.NoError(t, err) + + // ensure it was added to the queue + require.Equal(t, mt.servers[sURL].q.pq.Len(), 1) + assert.Subset(t, mt.servers[sURL].q.pq.Pop().(*Transmission).Req.Payload, report) + require.Equal(t, mt.servers[sURL2].q.pq.Len(), 1) + assert.Subset(t, mt.servers[sURL2].q.pq.Pop().(*Transmission).Req.Payload, report) + require.Equal(t, mt.servers[sURL3].q.pq.Len(), 1) + assert.Subset(t, mt.servers[sURL3].q.pq.Pop().(*Transmission).Req.Payload, report) }) } @@ -92,8 +109,11 @@ func Test_MercuryTransmitter_LatestTimestamp(t *testing.T) { var jobID int32 codec := new(mockCodec) + orm := NewORM(db, lggr, pgtest.NewQConfig(true)) + clients := map[string]wsrpc.Client{} + t.Run("successful query", func(t *testing.T) { - c := mocks.MockWSRPCClient{ + c := &mocks.MockWSRPCClient{ LatestReportF: func(ctx context.Context, in *pb.LatestReportRequest) (out *pb.LatestReportResponse, err error) { require.NotNil(t, in) assert.Equal(t, hexutil.Encode(sampleFeedID[:]), hexutil.Encode(in.FeedId)) @@ -104,7 +124,8 @@ func Test_MercuryTransmitter_LatestTimestamp(t *testing.T) { return out, nil }, } - mt := NewTransmitter(lggr, c, sampleClientPubKey, jobID, sampleFeedID, db, pgtest.NewQConfig(true), codec) + clients[sURL] = c + mt := NewTransmitter(lggr, clients, sampleClientPubKey, jobID, sampleFeedID, orm, codec) ts, err := mt.LatestTimestamp(testutils.Context(t)) require.NoError(t, err) @@ -112,14 +133,15 @@ func Test_MercuryTransmitter_LatestTimestamp(t *testing.T) { }) t.Run("successful query returning nil report (new feed) gives latest timestamp = -1", func(t *testing.T) { - c := mocks.MockWSRPCClient{ + c := &mocks.MockWSRPCClient{ LatestReportF: func(ctx context.Context, in *pb.LatestReportRequest) (out *pb.LatestReportResponse, err error) { out = new(pb.LatestReportResponse) out.Report = nil return out, nil }, } - mt := NewTransmitter(lggr, c, sampleClientPubKey, jobID, sampleFeedID, db, pgtest.NewQConfig(true), codec) + clients[sURL] = c + mt := NewTransmitter(lggr, clients, sampleClientPubKey, jobID, sampleFeedID, orm, codec) ts, err := mt.LatestTimestamp(testutils.Context(t)) require.NoError(t, err) @@ -127,16 +149,48 @@ func Test_MercuryTransmitter_LatestTimestamp(t *testing.T) { }) t.Run("failing query", func(t *testing.T) { - c := mocks.MockWSRPCClient{ + c := &mocks.MockWSRPCClient{ LatestReportF: func(ctx context.Context, in *pb.LatestReportRequest) (out *pb.LatestReportResponse, err error) { return nil, errors.New("something exploded") }, } - mt := NewTransmitter(lggr, c, sampleClientPubKey, jobID, sampleFeedID, db, pgtest.NewQConfig(true), codec) + clients[sURL] = c + mt := NewTransmitter(lggr, clients, sampleClientPubKey, jobID, sampleFeedID, orm, codec) _, err := mt.LatestTimestamp(testutils.Context(t)) require.Error(t, err) assert.Contains(t, err.Error(), "something exploded") }) + + t.Run("with multiple servers, uses latest", func(t *testing.T) { + clients[sURL] = &mocks.MockWSRPCClient{ + LatestReportF: func(ctx context.Context, in *pb.LatestReportRequest) (out *pb.LatestReportResponse, err error) { + return nil, errors.New("something exploded") + }, + } + clients[sURL2] = &mocks.MockWSRPCClient{ + LatestReportF: func(ctx context.Context, in *pb.LatestReportRequest) (out *pb.LatestReportResponse, err error) { + out = new(pb.LatestReportResponse) + out.Report = new(pb.Report) + out.Report.FeedId = sampleFeedID[:] + out.Report.ObservationsTimestamp = 42 + return out, nil + }, + } + clients[sURL3] = &mocks.MockWSRPCClient{ + LatestReportF: func(ctx context.Context, in *pb.LatestReportRequest) (out *pb.LatestReportResponse, err error) { + out = new(pb.LatestReportResponse) + out.Report = new(pb.Report) + out.Report.FeedId = sampleFeedID[:] + out.Report.ObservationsTimestamp = 41 + return out, nil + }, + } + mt := NewTransmitter(lggr, clients, sampleClientPubKey, jobID, sampleFeedID, orm, codec) + ts, err := mt.LatestTimestamp(testutils.Context(t)) + require.NoError(t, err) + + assert.Equal(t, int64(42), ts) + }) } type mockCodec struct { @@ -157,10 +211,12 @@ func Test_MercuryTransmitter_LatestPrice(t *testing.T) { var jobID int32 codec := new(mockCodec) + orm := NewORM(db, lggr, pgtest.NewQConfig(true)) + clients := map[string]wsrpc.Client{} t.Run("successful query", func(t *testing.T) { originalPrice := big.NewInt(123456789) - c := mocks.MockWSRPCClient{ + c := &mocks.MockWSRPCClient{ LatestReportF: func(ctx context.Context, in *pb.LatestReportRequest) (out *pb.LatestReportResponse, err error) { require.NotNil(t, in) assert.Equal(t, hexutil.Encode(sampleFeedID[:]), hexutil.Encode(in.FeedId)) @@ -171,7 +227,8 @@ func Test_MercuryTransmitter_LatestPrice(t *testing.T) { return out, nil }, } - mt := NewTransmitter(lggr, c, sampleClientPubKey, jobID, sampleFeedID, db, pgtest.NewQConfig(true), codec) + clients[sURL] = c + mt := NewTransmitter(lggr, clients, sampleClientPubKey, jobID, sampleFeedID, orm, codec) t.Run("BenchmarkPriceFromReport succeeds", func(t *testing.T) { codec.val = originalPrice @@ -194,14 +251,15 @@ func Test_MercuryTransmitter_LatestPrice(t *testing.T) { }) t.Run("successful query returning nil report (new feed)", func(t *testing.T) { - c := mocks.MockWSRPCClient{ + c := &mocks.MockWSRPCClient{ LatestReportF: func(ctx context.Context, in *pb.LatestReportRequest) (out *pb.LatestReportResponse, err error) { out = new(pb.LatestReportResponse) out.Report = nil return out, nil }, } - mt := NewTransmitter(lggr, c, sampleClientPubKey, jobID, sampleFeedID, db, pgtest.NewQConfig(true), codec) + clients[sURL] = c + mt := NewTransmitter(lggr, clients, sampleClientPubKey, jobID, sampleFeedID, orm, codec) price, err := mt.LatestPrice(testutils.Context(t), sampleFeedID) require.NoError(t, err) @@ -209,12 +267,13 @@ func Test_MercuryTransmitter_LatestPrice(t *testing.T) { }) t.Run("failing query", func(t *testing.T) { - c := mocks.MockWSRPCClient{ + c := &mocks.MockWSRPCClient{ LatestReportF: func(ctx context.Context, in *pb.LatestReportRequest) (out *pb.LatestReportResponse, err error) { return nil, errors.New("something exploded") }, } - mt := NewTransmitter(lggr, c, sampleClientPubKey, jobID, sampleFeedID, db, pgtest.NewQConfig(true), codec) + clients[sURL] = c + mt := NewTransmitter(lggr, clients, sampleClientPubKey, jobID, sampleFeedID, orm, codec) _, err := mt.LatestPrice(testutils.Context(t), sampleFeedID) require.Error(t, err) assert.Contains(t, err.Error(), "something exploded") @@ -228,9 +287,11 @@ func Test_MercuryTransmitter_FetchInitialMaxFinalizedBlockNumber(t *testing.T) { db := pgtest.NewSqlxDB(t) var jobID int32 codec := new(mockCodec) + orm := NewORM(db, lggr, pgtest.NewQConfig(true)) + clients := map[string]wsrpc.Client{} t.Run("successful query", func(t *testing.T) { - c := mocks.MockWSRPCClient{ + c := &mocks.MockWSRPCClient{ LatestReportF: func(ctx context.Context, in *pb.LatestReportRequest) (out *pb.LatestReportResponse, err error) { require.NotNil(t, in) assert.Equal(t, hexutil.Encode(sampleFeedID[:]), hexutil.Encode(in.FeedId)) @@ -241,7 +302,8 @@ func Test_MercuryTransmitter_FetchInitialMaxFinalizedBlockNumber(t *testing.T) { return out, nil }, } - mt := NewTransmitter(lggr, c, sampleClientPubKey, jobID, sampleFeedID, db, pgtest.NewQConfig(true), codec) + clients[sURL] = c + mt := NewTransmitter(lggr, clients, sampleClientPubKey, jobID, sampleFeedID, orm, codec) bn, err := mt.FetchInitialMaxFinalizedBlockNumber(testutils.Context(t)) require.NoError(t, err) @@ -249,32 +311,34 @@ func Test_MercuryTransmitter_FetchInitialMaxFinalizedBlockNumber(t *testing.T) { assert.Equal(t, 42, int(*bn)) }) t.Run("successful query returning nil report (new feed)", func(t *testing.T) { - c := mocks.MockWSRPCClient{ + c := &mocks.MockWSRPCClient{ LatestReportF: func(ctx context.Context, in *pb.LatestReportRequest) (out *pb.LatestReportResponse, err error) { out = new(pb.LatestReportResponse) out.Report = nil return out, nil }, } - mt := NewTransmitter(lggr, c, sampleClientPubKey, jobID, sampleFeedID, db, pgtest.NewQConfig(true), codec) + clients[sURL] = c + mt := NewTransmitter(lggr, clients, sampleClientPubKey, jobID, sampleFeedID, orm, codec) bn, err := mt.FetchInitialMaxFinalizedBlockNumber(testutils.Context(t)) require.NoError(t, err) assert.Nil(t, bn) }) t.Run("failing query", func(t *testing.T) { - c := mocks.MockWSRPCClient{ + c := &mocks.MockWSRPCClient{ LatestReportF: func(ctx context.Context, in *pb.LatestReportRequest) (out *pb.LatestReportResponse, err error) { return nil, errors.New("something exploded") }, } - mt := NewTransmitter(lggr, c, sampleClientPubKey, 0, sampleFeedID, db, pgtest.NewQConfig(true), codec) + clients[sURL] = c + mt := NewTransmitter(lggr, clients, sampleClientPubKey, jobID, sampleFeedID, orm, codec) _, err := mt.FetchInitialMaxFinalizedBlockNumber(testutils.Context(t)) require.Error(t, err) assert.Contains(t, err.Error(), "something exploded") }) t.Run("return feed ID is wrong", func(t *testing.T) { - c := mocks.MockWSRPCClient{ + c := &mocks.MockWSRPCClient{ LatestReportF: func(ctx context.Context, in *pb.LatestReportRequest) (out *pb.LatestReportResponse, err error) { require.NotNil(t, in) assert.Equal(t, hexutil.Encode(sampleFeedID[:]), hexutil.Encode(in.FeedId)) @@ -285,9 +349,37 @@ func Test_MercuryTransmitter_FetchInitialMaxFinalizedBlockNumber(t *testing.T) { return out, nil }, } - mt := NewTransmitter(lggr, c, sampleClientPubKey, 0, sampleFeedID, db, pgtest.NewQConfig(true), codec) + clients[sURL] = c + mt := NewTransmitter(lggr, clients, sampleClientPubKey, jobID, sampleFeedID, orm, codec) _, err := mt.FetchInitialMaxFinalizedBlockNumber(testutils.Context(t)) require.Error(t, err) assert.Contains(t, err.Error(), "latestReport failed; mismatched feed IDs, expected: 0x1c916b4aa7e57ca7b68ae1bf45653f56b656fd3aa335ef7fae696b663f1b8472, got: 0x") }) } + +func Test_sortReportsLatestFirst(t *testing.T) { + reports := []*pb.Report{ + nil, + {ObservationsTimestamp: 1}, + {ObservationsTimestamp: 1}, + {ObservationsTimestamp: 2}, + {CurrentBlockNumber: 1}, + nil, + {CurrentBlockNumber: 2}, + {}, + } + + sortReportsLatestFirst(reports) + + assert.Equal(t, int64(2), reports[0].ObservationsTimestamp) + assert.Equal(t, int64(1), reports[1].ObservationsTimestamp) + assert.Equal(t, int64(1), reports[2].ObservationsTimestamp) + assert.Equal(t, int64(0), reports[3].ObservationsTimestamp) + assert.Equal(t, int64(2), reports[3].CurrentBlockNumber) + assert.Equal(t, int64(0), reports[4].ObservationsTimestamp) + assert.Equal(t, int64(1), reports[4].CurrentBlockNumber) + assert.Equal(t, int64(0), reports[5].ObservationsTimestamp) + assert.Equal(t, int64(0), reports[5].CurrentBlockNumber) + assert.Nil(t, reports[6]) + assert.Nil(t, reports[7]) +} diff --git a/core/services/relay/evm/mercury/wsrpc/cache/cache.go b/core/services/relay/evm/mercury/wsrpc/cache/cache.go index 712e62e5c0e..adc439e802b 100644 --- a/core/services/relay/evm/mercury/wsrpc/cache/cache.go +++ b/core/services/relay/evm/mercury/wsrpc/cache/cache.go @@ -174,7 +174,7 @@ type memCache struct { func newMemCache(lggr logger.Logger, client Client, cfg Config) *memCache { return &memCache{ services.StateMachine{}, - lggr.Named("MemCache"), + lggr.Named("MemCache").Named(client.ServerURL()), client, cfg, sync.Map{}, diff --git a/core/services/relay/evm/mercury/wsrpc/client.go b/core/services/relay/evm/mercury/wsrpc/client.go index d420a17a1a4..b5d784face0 100644 --- a/core/services/relay/evm/mercury/wsrpc/client.go +++ b/core/services/relay/evm/mercury/wsrpc/client.go @@ -110,7 +110,7 @@ func newClient(lggr logger.Logger, clientPrivKey csakey.KeyV2, serverPubKey []by csaKey: clientPrivKey, serverPubKey: serverPubKey, serverURL: serverURL, - logger: lggr.Named("WSRPC").With("mercuryServerURL", serverURL), + logger: lggr.Named("WSRPC").Named(serverURL).With("serverURL", serverURL), chResetTransport: make(chan struct{}, 1), cacheSet: cacheSet, chStop: make(services.StopChan), @@ -217,7 +217,7 @@ func (w *client) Close() error { } func (w *client) Name() string { - return "EVM.Mercury.WSRPCClient" + return w.logger.Name() } func (w *client) HealthReport() map[string]error { diff --git a/core/services/relay/evm/mercury/wsrpc/mocks/mocks.go b/core/services/relay/evm/mercury/wsrpc/mocks/mocks.go index c0caf0dee12..61912c26b02 100644 --- a/core/services/relay/evm/mercury/wsrpc/mocks/mocks.go +++ b/core/services/relay/evm/mercury/wsrpc/mocks/mocks.go @@ -13,20 +13,20 @@ type MockWSRPCClient struct { LatestReportF func(ctx context.Context, req *pb.LatestReportRequest) (resp *pb.LatestReportResponse, err error) } -func (m MockWSRPCClient) Name() string { return "" } -func (m MockWSRPCClient) Start(context.Context) error { return nil } -func (m MockWSRPCClient) Close() error { return nil } -func (m MockWSRPCClient) HealthReport() map[string]error { return map[string]error{} } -func (m MockWSRPCClient) Ready() error { return nil } -func (m MockWSRPCClient) Transmit(ctx context.Context, in *pb.TransmitRequest) (*pb.TransmitResponse, error) { +func (m *MockWSRPCClient) Name() string { return "" } +func (m *MockWSRPCClient) Start(context.Context) error { return nil } +func (m *MockWSRPCClient) Close() error { return nil } +func (m *MockWSRPCClient) HealthReport() map[string]error { return map[string]error{} } +func (m *MockWSRPCClient) Ready() error { return nil } +func (m *MockWSRPCClient) Transmit(ctx context.Context, in *pb.TransmitRequest) (*pb.TransmitResponse, error) { return m.TransmitF(ctx, in) } -func (m MockWSRPCClient) LatestReport(ctx context.Context, in *pb.LatestReportRequest) (*pb.LatestReportResponse, error) { +func (m *MockWSRPCClient) LatestReport(ctx context.Context, in *pb.LatestReportRequest) (*pb.LatestReportResponse, error) { return m.LatestReportF(ctx, in) } -func (m MockWSRPCClient) ServerURL() string { return "mock server url" } +func (m *MockWSRPCClient) ServerURL() string { return "mock server url" } -func (m MockWSRPCClient) RawClient() pb.MercuryClient { return nil } +func (m *MockWSRPCClient) RawClient() pb.MercuryClient { return nil } type MockConn struct { State connectivity.State diff --git a/core/services/relay/evm/mercury/wsrpc/pool.go b/core/services/relay/evm/mercury/wsrpc/pool.go index dd85381469b..94c48736f5d 100644 --- a/core/services/relay/evm/mercury/wsrpc/pool.go +++ b/core/services/relay/evm/mercury/wsrpc/pool.go @@ -6,10 +6,10 @@ import ( "sync" "github.com/smartcontractkit/wsrpc/credentials" - "golang.org/x/exp/maps" + + "github.com/smartcontractkit/chainlink-common/pkg/services" "github.com/smartcontractkit/chainlink/v2/core/logger" - "github.com/smartcontractkit/chainlink/v2/core/services" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/csakey" "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/mercury/wsrpc/cache" "github.com/smartcontractkit/chainlink/v2/core/utils" @@ -106,7 +106,7 @@ func (conn *connection) forceCloseAll() (err error) { } type Pool interface { - services.ServiceCtx + services.Service // Checkout gets a wsrpc.Client for the given arguments // The same underlying client can be checked out multiple times, the pool // handles lifecycle management. The consumer can treat it as if it were @@ -226,6 +226,6 @@ func (p *pool) Ready() error { func (p *pool) HealthReport() map[string]error { hp := map[string]error{p.Name(): p.Ready()} - maps.Copy(hp, p.cacheSet.HealthReport()) + services.CopyHealth(hp, p.cacheSet.HealthReport()) return hp } diff --git a/core/services/relay/evm/mercury_config_provider.go b/core/services/relay/evm/mercury_config_provider.go index 027a3cfb27c..bd0749e5ae2 100644 --- a/core/services/relay/evm/mercury_config_provider.go +++ b/core/services/relay/evm/mercury_config_provider.go @@ -1,6 +1,7 @@ package evm import ( + "context" "errors" "fmt" @@ -14,7 +15,7 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/types" ) -func newMercuryConfigProvider(lggr logger.Logger, chain legacyevm.Chain, opts *types.RelayOpts) (commontypes.ConfigProvider, error) { +func newMercuryConfigProvider(ctx context.Context, lggr logger.Logger, chain legacyevm.Chain, opts *types.RelayOpts) (commontypes.ConfigProvider, error) { if !common.IsHexAddress(opts.ContractID) { return nil, errors.New("invalid contractID, expected hex address") } @@ -29,6 +30,7 @@ func newMercuryConfigProvider(lggr logger.Logger, chain legacyevm.Chain, opts *t return nil, errors.New("feed ID is required for tracking config on mercury contracts") } cp, err := mercury.NewConfigPoller( + ctx, lggr.Named(relayConfig.FeedID.String()), chain.LogPoller(), aggregatorAddress, diff --git a/core/services/relay/evm/method_binding.go b/core/services/relay/evm/method_binding.go index c5e10cce1c1..154c5b16a18 100644 --- a/core/services/relay/evm/method_binding.go +++ b/core/services/relay/evm/method_binding.go @@ -27,11 +27,11 @@ func (m *methodBinding) SetCodec(codec commontypes.RemoteCodec) { m.codec = codec } -func (m *methodBinding) Register() error { +func (m *methodBinding) Register(ctx context.Context) error { return nil } -func (m *methodBinding) Unregister() error { +func (m *methodBinding) Unregister(ctx context.Context) error { return nil } @@ -59,7 +59,7 @@ func (m *methodBinding) GetLatestValue(ctx context.Context, params, returnValue return m.codec.Decode(ctx, bytes, returnValue, wrapItemType(m.contractName, m.method, false)) } -func (m *methodBinding) Bind(binding commontypes.BoundContract) error { +func (m *methodBinding) Bind(ctx context.Context, binding commontypes.BoundContract) error { m.address = common.HexToAddress(binding.Address) m.bound = true return nil diff --git a/core/services/relay/evm/ocr2keeper.go b/core/services/relay/evm/ocr2keeper.go index 6563604945c..8a62281c9e2 100644 --- a/core/services/relay/evm/ocr2keeper.go +++ b/core/services/relay/evm/ocr2keeper.go @@ -17,11 +17,11 @@ import ( commontypes "github.com/smartcontractkit/chainlink-common/pkg/types" "github.com/smartcontractkit/chainlink-common/pkg/types/automation" + evmtypes "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" "github.com/smartcontractkit/chainlink/v2/core/chains/legacyevm" - iregistry21 "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/i_keeper_registry_master_wrapper_2_1" + ac "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/i_automation_v21_plus_common" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/keystore" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ethkey" evm "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/encoding" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider" @@ -88,7 +88,7 @@ func (r *ocr2keeperRelayer) NewOCR2KeeperProvider(rargs commontypes.RelayArgs, p // TODO https://smartcontract-it.atlassian.net/browse/BCF-2887 ctx := context.Background() - cfgWatcher, err := newOCR2KeeperConfigProvider(r.lggr, r.chain, rargs) + cfgWatcher, err := newOCR2KeeperConfigProvider(ctx, r.lggr, r.chain, rargs) if err != nil { return nil, err } @@ -105,16 +105,16 @@ func (r *ocr2keeperRelayer) NewOCR2KeeperProvider(rargs commontypes.RelayArgs, p services.configWatcher = cfgWatcher services.contractTransmitter = contractTransmitter - addr := ethkey.MustEIP55Address(rargs.ContractID).Address() + addr := evmtypes.MustEIP55Address(rargs.ContractID).Address() - registryContract, err := iregistry21.NewIKeeperRegistryMaster(addr, client.Client()) + registryContract, err := ac.NewIAutomationV21PlusCommon(addr, client.Client()) if err != nil { return nil, fmt.Errorf("%w: failed to create caller for address and backend", ErrInitializationFailure) } // lookback blocks for transmit event is hard coded and should provide ample time for logs // to be detected in most cases var transmitLookbackBlocks int64 = 250 - transmitEventProvider, err := transmit.NewTransmitEventProvider(r.lggr, client.LogPoller(), addr, client.Client(), transmitLookbackBlocks) + transmitEventProvider, err := transmit.NewTransmitEventProvider(ctx, r.lggr, client.LogPoller(), addr, client.Client(), transmitLookbackBlocks) if err != nil { return nil, err } @@ -208,7 +208,7 @@ func (c *ocr2keeperProvider) Codec() commontypes.Codec { return nil } -func newOCR2KeeperConfigProvider(lggr logger.Logger, chain legacyevm.Chain, rargs commontypes.RelayArgs) (*configWatcher, error) { +func newOCR2KeeperConfigProvider(ctx context.Context, lggr logger.Logger, chain legacyevm.Chain, rargs commontypes.RelayArgs) (*configWatcher, error) { var relayConfig types.RelayConfig err := json.Unmarshal(rargs.RelayConfig, &relayConfig) if err != nil { @@ -221,6 +221,7 @@ func newOCR2KeeperConfigProvider(lggr logger.Logger, chain legacyevm.Chain, rarg contractAddress := common.HexToAddress(rargs.ContractID) configPoller, err := NewConfigPoller( + ctx, lggr.With("contractID", rargs.ContractID), CPConfig{ chain.Client(), diff --git a/core/services/relay/evm/ocr2vrf.go b/core/services/relay/evm/ocr2vrf.go index 98753655550..07edd1c5ac6 100644 --- a/core/services/relay/evm/ocr2vrf.go +++ b/core/services/relay/evm/ocr2vrf.go @@ -64,7 +64,7 @@ func (r *ocr2vrfRelayer) NewDKGProvider(rargs commontypes.RelayArgs, pargs commo // TODO https://smartcontract-it.atlassian.net/browse/BCF-2887 ctx := context.Background() - configWatcher, err := newOCR2VRFConfigProvider(r.lggr, r.chain, rargs) + configWatcher, err := newOCR2VRFConfigProvider(ctx, r.lggr, r.chain, rargs) if err != nil { return nil, err } @@ -91,7 +91,7 @@ func (r *ocr2vrfRelayer) NewOCR2VRFProvider(rargs commontypes.RelayArgs, pargs c // TODO https://smartcontract-it.atlassian.net/browse/BCF-2887 ctx := context.Background() - configWatcher, err := newOCR2VRFConfigProvider(r.lggr, r.chain, rargs) + configWatcher, err := newOCR2VRFConfigProvider(ctx, r.lggr, r.chain, rargs) if err != nil { return nil, err } @@ -140,7 +140,7 @@ func (c *ocr2vrfProvider) Codec() commontypes.Codec { return nil } -func newOCR2VRFConfigProvider(lggr logger.Logger, chain legacyevm.Chain, rargs commontypes.RelayArgs) (*configWatcher, error) { +func newOCR2VRFConfigProvider(ctx context.Context, lggr logger.Logger, chain legacyevm.Chain, rargs commontypes.RelayArgs) (*configWatcher, error) { var relayConfig types.RelayConfig err := json.Unmarshal(rargs.RelayConfig, &relayConfig) if err != nil { @@ -152,6 +152,7 @@ func newOCR2VRFConfigProvider(lggr logger.Logger, chain legacyevm.Chain, rargs c contractAddress := common.HexToAddress(rargs.ContractID) configPoller, err := NewConfigPoller( + ctx, lggr.With("contractID", rargs.ContractID), CPConfig{ chain.Client(), diff --git a/core/services/relay/evm/standard_config_provider.go b/core/services/relay/evm/standard_config_provider.go index 0de48240b7d..59f91c52f4a 100644 --- a/core/services/relay/evm/standard_config_provider.go +++ b/core/services/relay/evm/standard_config_provider.go @@ -1,6 +1,7 @@ package evm import ( + "context" "errors" "fmt" @@ -14,7 +15,7 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/types" ) -func newStandardConfigProvider(lggr logger.Logger, chain legacyevm.Chain, opts *types.RelayOpts) (*configWatcher, error) { +func newStandardConfigProvider(ctx context.Context, lggr logger.Logger, chain legacyevm.Chain, opts *types.RelayOpts) (*configWatcher, error) { if !common.IsHexAddress(opts.ContractID) { return nil, errors.New("invalid contractID, expected hex address") } @@ -24,10 +25,10 @@ func newStandardConfigProvider(lggr logger.Logger, chain legacyevm.Chain, opts * ChainID: chain.Config().EVM().ChainID().Uint64(), ContractAddress: aggregatorAddress, } - return newContractConfigProvider(lggr, chain, opts, aggregatorAddress, OCR2AggregatorLogDecoder, offchainConfigDigester) + return newContractConfigProvider(ctx, lggr, chain, opts, aggregatorAddress, OCR2AggregatorLogDecoder, offchainConfigDigester) } -func newContractConfigProvider(lggr logger.Logger, chain legacyevm.Chain, opts *types.RelayOpts, aggregatorAddress common.Address, ld LogDecoder, digester ocrtypes.OffchainConfigDigester) (*configWatcher, error) { +func newContractConfigProvider(ctx context.Context, lggr logger.Logger, chain legacyevm.Chain, opts *types.RelayOpts, aggregatorAddress common.Address, ld LogDecoder, digester ocrtypes.OffchainConfigDigester) (*configWatcher, error) { var cp types.ConfigPoller relayConfig, err := opts.RelayConfig() @@ -35,6 +36,7 @@ func newContractConfigProvider(lggr logger.Logger, chain legacyevm.Chain, opts * return nil, fmt.Errorf("failed to get relay config: %w", err) } cp, err = NewConfigPoller( + ctx, lggr, CPConfig{ chain.Client(), 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 675cf317b14..8017e983e53 100644 --- a/core/services/relay/evm/types/mocks/log_poller_wrapper.go +++ b/core/services/relay/evm/types/mocks/log_poller_wrapper.go @@ -52,9 +52,9 @@ func (_m *LogPollerWrapper) HealthReport() map[string]error { return r0 } -// LatestEvents provides a mock function with given fields: -func (_m *LogPollerWrapper) LatestEvents() ([]types.OracleRequest, []types.OracleResponse, error) { - ret := _m.Called() +// LatestEvents provides a mock function with given fields: ctx +func (_m *LogPollerWrapper) LatestEvents(ctx context.Context) ([]types.OracleRequest, []types.OracleResponse, error) { + ret := _m.Called(ctx) if len(ret) == 0 { panic("no return value specified for LatestEvents") @@ -63,27 +63,27 @@ func (_m *LogPollerWrapper) LatestEvents() ([]types.OracleRequest, []types.Oracl var r0 []types.OracleRequest var r1 []types.OracleResponse var r2 error - if rf, ok := ret.Get(0).(func() ([]types.OracleRequest, []types.OracleResponse, error)); ok { - return rf() + if rf, ok := ret.Get(0).(func(context.Context) ([]types.OracleRequest, []types.OracleResponse, error)); ok { + return rf(ctx) } - if rf, ok := ret.Get(0).(func() []types.OracleRequest); ok { - r0 = rf() + if rf, ok := ret.Get(0).(func(context.Context) []types.OracleRequest); ok { + r0 = rf(ctx) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]types.OracleRequest) } } - if rf, ok := ret.Get(1).(func() []types.OracleResponse); ok { - r1 = rf() + if rf, ok := ret.Get(1).(func(context.Context) []types.OracleResponse); ok { + r1 = rf(ctx) } else { if ret.Get(1) != nil { r1 = ret.Get(1).([]types.OracleResponse) } } - if rf, ok := ret.Get(2).(func() error); ok { - r2 = rf() + if rf, ok := ret.Get(2).(func(context.Context) error); ok { + r2 = rf(ctx) } else { r2 = ret.Error(2) } @@ -145,9 +145,9 @@ func (_m *LogPollerWrapper) Start(_a0 context.Context) error { return r0 } -// SubscribeToUpdates provides a mock function with given fields: name, subscriber -func (_m *LogPollerWrapper) SubscribeToUpdates(name string, subscriber types.RouteUpdateSubscriber) { - _m.Called(name, subscriber) +// SubscribeToUpdates provides a mock function with given fields: ctx, name, subscriber +func (_m *LogPollerWrapper) SubscribeToUpdates(ctx context.Context, name string, subscriber types.RouteUpdateSubscriber) { + _m.Called(ctx, name, subscriber) } // NewLogPollerWrapper creates a new instance of LogPollerWrapper. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. diff --git a/core/services/relay/evm/types/types.go b/core/services/relay/evm/types/types.go index aa6116b64bb..ea794262bd4 100644 --- a/core/services/relay/evm/types/types.go +++ b/core/services/relay/evm/types/types.go @@ -184,7 +184,7 @@ type OracleResponse struct { } type RouteUpdateSubscriber interface { - UpdateRoutes(activeCoordinator common.Address, proposedCoordinator common.Address) error + UpdateRoutes(ctx context.Context, activeCoordinator common.Address, proposedCoordinator common.Address) error } // A LogPoller wrapper that understands router proxy contracts @@ -192,8 +192,8 @@ type RouteUpdateSubscriber interface { //go:generate mockery --quiet --name LogPollerWrapper --output ./mocks/ --case=underscore type LogPollerWrapper interface { services.Service - LatestEvents() ([]OracleRequest, []OracleResponse, error) + LatestEvents(ctx context.Context) ([]OracleRequest, []OracleResponse, error) // TODO (FUN-668): Remove from the LOOP interface and only use internally within the EVM relayer - SubscribeToUpdates(name string, subscriber RouteUpdateSubscriber) + SubscribeToUpdates(ctx context.Context, name string, subscriber RouteUpdateSubscriber) } diff --git a/core/services/relay/relay_test.go b/core/services/relay/relay_test.go index 7b92bab37cd..dc12b769609 100644 --- a/core/services/relay/relay_test.go +++ b/core/services/relay/relay_test.go @@ -1,12 +1,13 @@ package relay import ( + "context" "testing" "github.com/stretchr/testify/assert" "github.com/smartcontractkit/libocr/offchainreporting2/reportingplugin/median" - ocrtypes "github.com/smartcontractkit/libocr/offchainreporting2plus/types" + ocr2types "github.com/smartcontractkit/libocr/offchainreporting2plus/types" "github.com/smartcontractkit/chainlink-common/pkg/loop" "github.com/smartcontractkit/chainlink-common/pkg/types" @@ -62,30 +63,72 @@ func TestNewID(t *testing.T) { } type staticMedianProvider struct { - types.MedianProvider } -func (s staticMedianProvider) OffchainConfigDigester() ocrtypes.OffchainConfigDigester { +var _ types.MedianProvider = staticMedianProvider{} + +// ContractConfigTracker implements types.MedianProvider. +func (s staticMedianProvider) ContractConfigTracker() ocr2types.ContractConfigTracker { return nil } -func (s staticMedianProvider) ContractConfigTracker() ocrtypes.ContractConfigTracker { +// ContractTransmitter implements types.MedianProvider. +func (s staticMedianProvider) ContractTransmitter() ocr2types.ContractTransmitter { return nil } -func (s staticMedianProvider) ContractTransmitter() ocrtypes.ContractTransmitter { +// MedianContract implements types.MedianProvider. +func (s staticMedianProvider) MedianContract() median.MedianContract { return nil } +// OffchainConfigDigester implements types.MedianProvider. +func (s staticMedianProvider) OffchainConfigDigester() ocr2types.OffchainConfigDigester { + return nil +} + +// OnchainConfigCodec implements types.MedianProvider. +func (s staticMedianProvider) OnchainConfigCodec() median.OnchainConfigCodec { + return nil +} + +// ReportCodec implements types.MedianProvider. func (s staticMedianProvider) ReportCodec() median.ReportCodec { return nil } -func (s staticMedianProvider) MedianContract() median.MedianContract { +// ChainReader implements types.MedianProvider. +func (s staticMedianProvider) ChainReader() types.ChainReader { return nil } -func (s staticMedianProvider) OnchainConfigCodec() median.OnchainConfigCodec { +// Close implements types.MedianProvider. +func (s staticMedianProvider) Close() error { + return nil +} + +// Codec implements types.MedianProvider. +func (s staticMedianProvider) Codec() types.Codec { + return nil +} + +// HealthReport implements types.MedianProvider. +func (s staticMedianProvider) HealthReport() map[string]error { + return nil +} + +// Name implements types.MedianProvider. +func (s staticMedianProvider) Name() string { + return "" +} + +// Ready implements types.MedianProvider. +func (s staticMedianProvider) Ready() error { + return nil +} + +// Start implements types.MedianProvider. +func (s staticMedianProvider) Start(context.Context) error { return nil } diff --git a/core/services/s4/cached_orm_wrapper.go b/core/services/s4/cached_orm_wrapper.go new file mode 100644 index 00000000000..38b9ecba1ca --- /dev/null +++ b/core/services/s4/cached_orm_wrapper.go @@ -0,0 +1,119 @@ +package s4 + +import ( + "fmt" + "math/big" + "strings" + "time" + + "github.com/patrickmn/go-cache" + + ubig "github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils/big" + "github.com/smartcontractkit/chainlink/v2/core/logger" + "github.com/smartcontractkit/chainlink/v2/core/services/pg" +) + +const ( + // defaultExpiration decides how long info will be valid for. + defaultExpiration = 10 * time.Minute + // cleanupInterval decides when the expired items in cache will be deleted. + cleanupInterval = 5 * time.Minute + + getSnapshotCachePrefix = "GetSnapshot" +) + +// CachedORM is a cached orm wrapper that implements the ORM interface. +// It adds a cache layer in order to remove unnecessary pressure to the underlaying implementation +type CachedORM struct { + underlayingORM ORM + cache *cache.Cache + lggr logger.Logger +} + +var _ ORM = (*CachedORM)(nil) + +func NewCachedORMWrapper(orm ORM, lggr logger.Logger) *CachedORM { + return &CachedORM{ + underlayingORM: orm, + cache: cache.New(defaultExpiration, cleanupInterval), + lggr: lggr, + } +} + +func (c CachedORM) Get(address *ubig.Big, slotId uint, qopts ...pg.QOpt) (*Row, error) { + return c.underlayingORM.Get(address, slotId, qopts...) +} + +func (c CachedORM) Update(row *Row, qopts ...pg.QOpt) error { + c.deleteRowFromSnapshotCache(row) + + return c.underlayingORM.Update(row, qopts...) +} + +func (c CachedORM) DeleteExpired(limit uint, utcNow time.Time, qopts ...pg.QOpt) (int64, error) { + deletedRows, err := c.underlayingORM.DeleteExpired(limit, utcNow, qopts...) + if err != nil { + return 0, err + } + + if deletedRows > 0 { + c.cache.Flush() + } + + return deletedRows, nil +} + +func (c CachedORM) GetSnapshot(addressRange *AddressRange, qopts ...pg.QOpt) ([]*SnapshotRow, error) { + key := fmt.Sprintf("%s_%s_%s", getSnapshotCachePrefix, addressRange.MinAddress.String(), addressRange.MaxAddress.String()) + + cached, found := c.cache.Get(key) + if found { + return cached.([]*SnapshotRow), nil + } + + c.lggr.Debug("Snapshot not found in cache, fetching it from underlaying implementation") + data, err := c.underlayingORM.GetSnapshot(addressRange, qopts...) + if err != nil { + return nil, err + } + c.cache.Set(key, data, defaultExpiration) + + return data, nil +} + +func (c CachedORM) GetUnconfirmedRows(limit uint, qopts ...pg.QOpt) ([]*Row, error) { + return c.underlayingORM.GetUnconfirmedRows(limit, qopts...) +} + +// deleteRowFromSnapshotCache will clean the cache for every snapshot that would involve a given row +// in case of an error parsing a key it will also delete the key from the cache +func (c CachedORM) deleteRowFromSnapshotCache(row *Row) { + for key := range c.cache.Items() { + keyParts := strings.Split(key, "_") + if len(keyParts) != 3 { + continue + } + + if keyParts[0] != getSnapshotCachePrefix { + continue + } + + minAddress, ok := new(big.Int).SetString(keyParts[1], 10) + if !ok { + c.lggr.Errorf("error while converting minAddress string: %s to big.Int, deleting key %q", keyParts[1], key) + c.cache.Delete(key) + continue + } + + maxAddress, ok := new(big.Int).SetString(keyParts[2], 10) + if !ok { + c.lggr.Errorf("error while converting minAddress string: %s to big.Int, deleting key %q ", keyParts[2], key) + c.cache.Delete(key) + continue + } + + if row.Address.ToInt().Cmp(minAddress) >= 0 && row.Address.ToInt().Cmp(maxAddress) <= 0 { + c.cache.Delete(key) + } + } +} diff --git a/core/services/s4/cached_orm_wrapper_test.go b/core/services/s4/cached_orm_wrapper_test.go new file mode 100644 index 00000000000..6f6ac298557 --- /dev/null +++ b/core/services/s4/cached_orm_wrapper_test.go @@ -0,0 +1,272 @@ +package s4_test + +import ( + "bytes" + "fmt" + "testing" + "time" + + "github.com/ethereum/go-ethereum/common" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils/big" + 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/logger" + "github.com/smartcontractkit/chainlink/v2/core/services/s4" + "github.com/smartcontractkit/chainlink/v2/core/services/s4/mocks" +) + +func TestGetSnapshotEmpty(t *testing.T) { + t.Run("OK-no_rows", func(t *testing.T) { + psqlORM := setupORM(t, "test") + lggr := logger.TestLogger(t) + orm := s4.NewCachedORMWrapper(psqlORM, lggr) + + rows, err := orm.GetSnapshot(s4.NewFullAddressRange()) + assert.NoError(t, err) + assert.Empty(t, rows) + }) +} + +func TestGetSnapshotCacheFilled(t *testing.T) { + t.Run("OK_with_rows_already_cached", func(t *testing.T) { + rows := generateTestSnapshotRows(t, 100) + + fullAddressRange := s4.NewFullAddressRange() + + lggr := logger.TestLogger(t) + underlayingORM := mocks.NewORM(t) + underlayingORM.On("GetSnapshot", fullAddressRange).Return(rows, nil).Once() + + orm := s4.NewCachedORMWrapper(underlayingORM, lggr) + + // first call will go to the underlaying orm implementation to fill the cache + first_snapshot, err := orm.GetSnapshot(fullAddressRange) + assert.NoError(t, err) + assert.Equal(t, len(rows), len(first_snapshot)) + + // on the second call, the results will come from the cache, if not the mock will return an error because of .Once() + cache_snapshot, err := orm.GetSnapshot(fullAddressRange) + assert.NoError(t, err) + assert.Equal(t, len(rows), len(cache_snapshot)) + + snapshotRowMap := make(map[string]*s4.SnapshotRow) + for i, sr := range cache_snapshot { + // assuming unique addresses + snapshotRowMap[sr.Address.String()] = cache_snapshot[i] + } + + for _, sr := range rows { + snapshotRow, ok := snapshotRowMap[sr.Address.String()] + assert.True(t, ok) + assert.NotNil(t, snapshotRow) + assert.Equal(t, snapshotRow.Address, sr.Address) + assert.Equal(t, snapshotRow.SlotId, sr.SlotId) + assert.Equal(t, snapshotRow.Version, sr.Version) + assert.Equal(t, snapshotRow.Expiration, sr.Expiration) + assert.Equal(t, snapshotRow.Confirmed, sr.Confirmed) + assert.Equal(t, snapshotRow.PayloadSize, sr.PayloadSize) + } + }) +} + +func TestUpdateInvalidatesSnapshotCache(t *testing.T) { + t.Run("OK-GetSnapshot_cache_invalidated_after_update", func(t *testing.T) { + rows := generateTestSnapshotRows(t, 100) + + fullAddressRange := s4.NewFullAddressRange() + + lggr := logger.TestLogger(t) + underlayingORM := mocks.NewORM(t) + underlayingORM.On("GetSnapshot", fullAddressRange).Return(rows, nil).Once() + + orm := s4.NewCachedORMWrapper(underlayingORM, lggr) + + // first call will go to the underlaying orm implementation to fill the cache + first_snapshot, err := orm.GetSnapshot(fullAddressRange) + assert.NoError(t, err) + assert.Equal(t, len(rows), len(first_snapshot)) + + // on the second call, the results will come from the cache, if not the mock will return an error because of .Once() + cache_snapshot, err := orm.GetSnapshot(fullAddressRange) + assert.NoError(t, err) + assert.Equal(t, len(rows), len(cache_snapshot)) + + // this update call will invalidate the cache + row := &s4.Row{ + Address: big.New(common.HexToAddress("0x0000000000000000000000000000000000000000000000000000000000000005").Big()), + SlotId: 1, + Payload: cltest.MustRandomBytes(t, 32), + Version: 1, + Expiration: time.Now().Add(time.Hour).UnixMilli(), + Confirmed: true, + Signature: cltest.MustRandomBytes(t, 32), + } + underlayingORM.On("Update", row).Return(nil).Once() + err = orm.Update(row) + assert.NoError(t, err) + + // given the cache was invalidated this request will reach the underlaying orm implementation + underlayingORM.On("GetSnapshot", fullAddressRange).Return(rows, nil).Once() + third_snapshot, err := orm.GetSnapshot(fullAddressRange) + assert.NoError(t, err) + assert.Equal(t, len(rows), len(third_snapshot)) + }) + + t.Run("OK-GetSnapshot_cache_not_invalidated_after_update", func(t *testing.T) { + rows := generateTestSnapshotRows(t, 5) + + addressRange := &s4.AddressRange{ + MinAddress: ubig.New(common.BytesToAddress(bytes.Repeat([]byte{0x00}, common.AddressLength)).Big()), + MaxAddress: ubig.New(common.BytesToAddress(append(bytes.Repeat([]byte{0x00}, common.AddressLength-1), 3)).Big()), + } + + lggr := logger.TestLogger(t) + underlayingORM := mocks.NewORM(t) + underlayingORM.On("GetSnapshot", addressRange).Return(rows, nil).Once() + + orm := s4.NewCachedORMWrapper(underlayingORM, lggr) + + // first call will go to the underlaying orm implementation to fill the cache + first_snapshot, err := orm.GetSnapshot(addressRange) + assert.NoError(t, err) + assert.Equal(t, len(rows), len(first_snapshot)) + + // on the second call, the results will come from the cache, if not the mock will return an error because of .Once() + cache_snapshot, err := orm.GetSnapshot(addressRange) + assert.NoError(t, err) + assert.Equal(t, len(rows), len(cache_snapshot)) + + // this update call wont invalidate the cache because the address is out of the cache address range + outOfCachedRangeAddress := ubig.New(common.BytesToAddress(append(bytes.Repeat([]byte{0x00}, common.AddressLength-1), 5)).Big()) + row := &s4.Row{ + Address: outOfCachedRangeAddress, + SlotId: 1, + Payload: cltest.MustRandomBytes(t, 32), + Version: 1, + Expiration: time.Now().Add(time.Hour).UnixMilli(), + Confirmed: true, + Signature: cltest.MustRandomBytes(t, 32), + } + underlayingORM.On("Update", row).Return(nil).Once() + err = orm.Update(row) + assert.NoError(t, err) + + // given the cache was not invalidated this request wont reach the underlaying orm implementation + third_snapshot, err := orm.GetSnapshot(addressRange) + assert.NoError(t, err) + assert.Equal(t, len(rows), len(third_snapshot)) + }) +} + +func TestGet(t *testing.T) { + address := big.New(testutils.NewAddress().Big()) + var slotID uint = 1 + + lggr := logger.TestLogger(t) + + t.Run("OK-Get_underlaying_ORM_returns_a_row", func(t *testing.T) { + underlayingORM := mocks.NewORM(t) + expectedRow := &s4.Row{ + Address: address, + SlotId: slotID, + } + underlayingORM.On("Get", address, slotID).Return(expectedRow, nil).Once() + orm := s4.NewCachedORMWrapper(underlayingORM, lggr) + + row, err := orm.Get(address, slotID) + require.NoError(t, err) + require.Equal(t, expectedRow, row) + }) + t.Run("NOK-Get_underlaying_ORM_returns_an_error", func(t *testing.T) { + underlayingORM := mocks.NewORM(t) + underlayingORM.On("Get", address, slotID).Return(nil, fmt.Errorf("some_error")).Once() + orm := s4.NewCachedORMWrapper(underlayingORM, lggr) + + row, err := orm.Get(address, slotID) + require.Nil(t, row) + require.EqualError(t, err, "some_error") + }) +} + +func TestDeletedExpired(t *testing.T) { + var limit uint = 1 + now := time.Now() + + lggr := logger.TestLogger(t) + + t.Run("OK-DeletedExpired_underlaying_ORM_returns_a_row", func(t *testing.T) { + var expectedDeleted int64 = 10 + underlayingORM := mocks.NewORM(t) + underlayingORM.On("DeleteExpired", limit, now).Return(expectedDeleted, nil).Once() + orm := s4.NewCachedORMWrapper(underlayingORM, lggr) + + actualDeleted, err := orm.DeleteExpired(limit, now) + require.NoError(t, err) + require.Equal(t, expectedDeleted, actualDeleted) + }) + t.Run("NOK-DeletedExpired_underlaying_ORM_returns_an_error", func(t *testing.T) { + var expectedDeleted int64 + underlayingORM := mocks.NewORM(t) + underlayingORM.On("DeleteExpired", limit, now).Return(expectedDeleted, fmt.Errorf("some_error")).Once() + orm := s4.NewCachedORMWrapper(underlayingORM, lggr) + + actualDeleted, err := orm.DeleteExpired(limit, now) + require.EqualError(t, err, "some_error") + require.Equal(t, expectedDeleted, actualDeleted) + }) +} + +// GetUnconfirmedRows(limit uint, qopts ...pg.QOpt) ([]*Row, error) +func TestGetUnconfirmedRows(t *testing.T) { + var limit uint = 1 + lggr := logger.TestLogger(t) + + t.Run("OK-GetUnconfirmedRows_underlaying_ORM_returns_a_row", func(t *testing.T) { + address := big.New(testutils.NewAddress().Big()) + var slotID uint = 1 + + expectedRow := []*s4.Row{{ + Address: address, + SlotId: slotID, + }} + underlayingORM := mocks.NewORM(t) + underlayingORM.On("GetUnconfirmedRows", limit).Return(expectedRow, nil).Once() + orm := s4.NewCachedORMWrapper(underlayingORM, lggr) + + actualRow, err := orm.GetUnconfirmedRows(limit) + require.NoError(t, err) + require.Equal(t, expectedRow, actualRow) + }) + t.Run("NOK-GetUnconfirmedRows_underlaying_ORM_returns_an_error", func(t *testing.T) { + underlayingORM := mocks.NewORM(t) + underlayingORM.On("GetUnconfirmedRows", limit).Return(nil, fmt.Errorf("some_error")).Once() + orm := s4.NewCachedORMWrapper(underlayingORM, lggr) + + actualRow, err := orm.GetUnconfirmedRows(limit) + require.Nil(t, actualRow) + require.EqualError(t, err, "some_error") + }) +} + +func generateTestSnapshotRows(t *testing.T, n int) []*s4.SnapshotRow { + t.Helper() + + rows := make([]*s4.SnapshotRow, n) + for i := 0; i < n; i++ { + row := &s4.SnapshotRow{ + Address: big.New(testutils.NewAddress().Big()), + SlotId: 1, + PayloadSize: 32, + Version: 1 + uint64(i), + Expiration: time.Now().Add(time.Hour).UnixMilli(), + Confirmed: i%2 == 0, + } + rows[i] = row + } + + return rows +} diff --git a/core/services/streams/delegate.go b/core/services/streams/delegate.go index 5ea0d475d2b..f9e2a64c4a3 100644 --- a/core/services/streams/delegate.go +++ b/core/services/streams/delegate.go @@ -38,10 +38,10 @@ func (d *Delegate) JobType() job.Type { return job.Stream } -func (d *Delegate) BeforeJobCreated(jb job.Job) {} -func (d *Delegate) AfterJobCreated(jb job.Job) {} -func (d *Delegate) BeforeJobDeleted(jb job.Job) {} -func (d *Delegate) OnDeleteJob(jb job.Job, q pg.Queryer) error { return nil } +func (d *Delegate) BeforeJobCreated(jb job.Job) {} +func (d *Delegate) AfterJobCreated(jb job.Job) {} +func (d *Delegate) BeforeJobDeleted(jb job.Job) {} +func (d *Delegate) OnDeleteJob(ctx context.Context, jb job.Job, q pg.Queryer) error { return nil } func (d *Delegate) ServicesForSpec(ctx context.Context, jb job.Job) (services []job.ServiceCtx, err error) { if jb.StreamID == nil { diff --git a/core/services/synchronization/uni_client_integration_test.go b/core/services/synchronization/uni_client_integration_test.go deleted file mode 100644 index fcc0dc23717..00000000000 --- a/core/services/synchronization/uni_client_integration_test.go +++ /dev/null @@ -1,42 +0,0 @@ -package synchronization - -import ( - "context" - "encoding/hex" - "testing" - "time" - - "github.com/stretchr/testify/require" - - "github.com/smartcontractkit/wsrpc" - - "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" - "github.com/smartcontractkit/chainlink/v2/core/logger" - "github.com/smartcontractkit/chainlink/v2/core/services/synchronization/telem" -) - -func TestUniClient(t *testing.T) { - t.Skip("Incomplete", "https://smartcontract-it.atlassian.net/browse/BCF-2729") - privKey, err := hex.DecodeString("TODO") - require.NoError(t, err) - pubKey, err := hex.DecodeString("TODO") - require.NoError(t, err) - t.Log(len(privKey), len(pubKey)) - lggr := logger.TestLogger(t) - c, err := wsrpc.DialUniWithContext(testutils.Context(t), - lggr, - "TODO", - privKey, - pubKey) - require.NoError(t, err) - t.Log(c) - client := telem.NewTelemClient(c) - ctx, cancel := context.WithTimeout(testutils.Context(t), 500*time.Millisecond) - resp, err := client.Telem(ctx, &telem.TelemRequest{ - Telemetry: []byte(`hello world`), - Address: "myaddress", - }) - cancel() - t.Log(resp, err) - require.NoError(t, c.Close()) -} diff --git a/core/services/vrf/delegate.go b/core/services/vrf/delegate.go index 14ba341b1b6..617a28ac4d5 100644 --- a/core/services/vrf/delegate.go +++ b/core/services/vrf/delegate.go @@ -67,10 +67,10 @@ func (d *Delegate) JobType() job.Type { return job.VRF } -func (d *Delegate) BeforeJobCreated(job.Job) {} -func (d *Delegate) AfterJobCreated(job.Job) {} -func (d *Delegate) BeforeJobDeleted(job.Job) {} -func (d *Delegate) OnDeleteJob(job.Job, pg.Queryer) error { return nil } +func (d *Delegate) BeforeJobCreated(job.Job) {} +func (d *Delegate) AfterJobCreated(job.Job) {} +func (d *Delegate) BeforeJobDeleted(job.Job) {} +func (d *Delegate) OnDeleteJob(context.Context, job.Job, pg.Queryer) error { return nil } // ServicesForSpec satisfies the job.Delegate interface. func (d *Delegate) ServicesForSpec(ctx context.Context, jb job.Job) ([]job.ServiceCtx, error) { diff --git a/core/services/vrf/delegate_test.go b/core/services/vrf/delegate_test.go index bbbb2d75dff..29bbe41d288 100644 --- a/core/services/vrf/delegate_test.go +++ b/core/services/vrf/delegate_test.go @@ -82,8 +82,8 @@ func buildVrfUni(t *testing.T, db *sqlx.DB, cfg chainlink.GeneralConfig) vrfUniv btORM := bridges.NewORM(db, lggr, cfg.Database()) ks := keystore.NewInMemory(db, utils.FastScryptParams, lggr, cfg.Database()) _, dbConfig, evmConfig := txmgr.MakeTestConfigs(t) - txm, err := txmgr.NewTxm(db, evmConfig, evmConfig.GasEstimator(), evmConfig.Transactions(), dbConfig, dbConfig.Listener(), ec, logger.TestLogger(t), nil, ks.Eth(), nil) - orm := headtracker.NewORM(db, lggr, cfg.Database(), *testutils.FixtureChainID) + txm, err := txmgr.NewTxm(db, db, evmConfig, evmConfig.GasEstimator(), evmConfig.Transactions(), 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()) t.Cleanup(func() { assert.NoError(t, jrm.Close()) }) diff --git a/core/services/vrf/mocks/fee_config.go b/core/services/vrf/mocks/fee_config.go index 2f33415b338..ee7ea4e9a58 100644 --- a/core/services/vrf/mocks/fee_config.go +++ b/core/services/vrf/mocks/fee_config.go @@ -17,18 +17,18 @@ type FeeConfig struct { } // LimitDefault provides a mock function with given fields: -func (_m *FeeConfig) LimitDefault() uint32 { +func (_m *FeeConfig) LimitDefault() uint64 { ret := _m.Called() if len(ret) == 0 { panic("no return value specified for LimitDefault") } - var r0 uint32 - if rf, ok := ret.Get(0).(func() uint32); ok { + var r0 uint64 + if rf, ok := ret.Get(0).(func() uint64); ok { r0 = rf() } else { - r0 = ret.Get(0).(uint32) + r0 = ret.Get(0).(uint64) } return r0 diff --git a/core/services/vrf/v2/bhs_feeder_test.go b/core/services/vrf/v2/bhs_feeder_test.go index 6f857c80834..b39fd0dec7f 100644 --- a/core/services/vrf/v2/bhs_feeder_test.go +++ b/core/services/vrf/v2/bhs_feeder_test.go @@ -10,11 +10,11 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/chains/evm/assets" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/config/toml" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest/heavyweight" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/services/chainlink" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ethkey" "github.com/smartcontractkit/chainlink/v2/core/services/vrf/vrftesthelpers" ) @@ -39,14 +39,14 @@ func TestStartHeartbeats(t *testing.T) { bhsKeyAddresses = append(bhsKeyAddresses, bhsKey.Address.String()) keys = append(keys, bhsKey) keySpecificOverrides = append(keySpecificOverrides, toml.KeySpecific{ - Key: ptr[ethkey.EIP55Address](bhsKey.EIP55Address), + Key: ptr[types.EIP55Address](bhsKey.EIP55Address), GasEstimator: toml.KeySpecificGasEstimator{PriceMax: gasLanePriceWei}, }) sendEth(t, ownerKey, uni.backend, bhsKey.Address, 10) } keySpecificOverrides = append(keySpecificOverrides, toml.KeySpecific{ // Gas lane. - Key: ptr[ethkey.EIP55Address](vrfKey.EIP55Address), + Key: ptr[types.EIP55Address](vrfKey.EIP55Address), GasEstimator: toml.KeySpecificGasEstimator{PriceMax: gasLanePriceWei}, }) @@ -57,7 +57,7 @@ func TestStartHeartbeats(t *testing.T) { c.EVM[0].MinIncomingConfirmations = ptr[uint32](2) c.Feature.LogPoller = ptr(true) c.EVM[0].FinalityDepth = ptr[uint32](2) - c.EVM[0].GasEstimator.LimitDefault = ptr(uint32(gasLimit)) + c.EVM[0].GasEstimator.LimitDefault = ptr(uint64(gasLimit)) c.EVM[0].LogPollInterval = commonconfig.MustNewDuration(time.Second) }) diff --git a/core/services/vrf/v2/coordinator_v2x_interface.go b/core/services/vrf/v2/coordinator_v2x_interface.go index c99576d7558..9389f12b9f8 100644 --- a/core/services/vrf/v2/coordinator_v2x_interface.go +++ b/core/services/vrf/v2/coordinator_v2x_interface.go @@ -915,7 +915,7 @@ func (s *v2_5Subscription) NativeBalance() *big.Int { } func (s *v2_5Subscription) Owner() common.Address { - return s.event.Owner + return s.event.SubOwner } func (s *v2_5Subscription) Consumers() []common.Address { diff --git a/core/services/vrf/v2/integration_helpers_test.go b/core/services/vrf/v2/integration_helpers_test.go index 6649b5972e0..c67195d25aa 100644 --- a/core/services/vrf/v2/integration_helpers_test.go +++ b/core/services/vrf/v2/integration_helpers_test.go @@ -23,6 +23,7 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/chains/evm/config/toml" v2 "github.com/smartcontractkit/chainlink/v2/core/chains/evm/config/toml" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/txmgr" + "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/gethwrappers/generated/vrf_consumer_v2_upgradeable_example" @@ -67,11 +68,11 @@ func testSingleConsumerHappyPath( config, db := heavyweight.FullTestDBV2(t, func(c *chainlink.Config, s *chainlink.Secrets) { simulatedOverrides(t, assets.GWei(10), toml.KeySpecific{ // Gas lane. - Key: ptr[ethkey.EIP55Address](key1.EIP55Address), + Key: ptr[types.EIP55Address](key1.EIP55Address), GasEstimator: toml.KeySpecificGasEstimator{PriceMax: gasLanePriceWei}, }, toml.KeySpecific{ // Gas lane. - Key: ptr[ethkey.EIP55Address](key2.EIP55Address), + Key: ptr[types.EIP55Address](key2.EIP55Address), GasEstimator: toml.KeySpecificGasEstimator{PriceMax: gasLanePriceWei}, })(c, s) c.EVM[0].MinIncomingConfirmations = ptr[uint32](2) @@ -356,7 +357,7 @@ func testMultipleConsumersNeedTrustedBHS( config, db := heavyweight.FullTestDBV2(t, func(c *chainlink.Config, s *chainlink.Secrets) { simulatedOverrides(t, assets.GWei(10), keySpecificOverrides...)(c, s) c.EVM[0].MinIncomingConfirmations = ptr[uint32](2) - c.EVM[0].GasEstimator.LimitDefault = ptr(uint32(5_000_000)) + c.EVM[0].GasEstimator.LimitDefault = ptr(uint64(5_000_000)) c.Feature.LogPoller = ptr(true) c.EVM[0].LogPollInterval = commonconfig.MustNewDuration(1 * time.Second) c.EVM[0].FinalityDepth = ptr[uint32](2) @@ -541,7 +542,7 @@ func testSingleConsumerHappyPathBatchFulfillment( Key: ptr(key1.EIP55Address), GasEstimator: toml.KeySpecificGasEstimator{PriceMax: gasLanePriceWei}, })(c, s) - c.EVM[0].GasEstimator.LimitDefault = ptr[uint32](5_000_000) + c.EVM[0].GasEstimator.LimitDefault = ptr[uint64](5_000_000) c.EVM[0].MinIncomingConfirmations = ptr[uint32](2) c.EVM[0].ChainID = (*ubig.Big)(testutils.SimulatedChainID) c.Feature.LogPoller = ptr(true) @@ -1074,7 +1075,7 @@ func testSingleConsumerEIP150( Key: ptr(key1.EIP55Address), GasEstimator: v2.KeySpecificGasEstimator{PriceMax: gasLanePriceWei}, })(c, s) - c.EVM[0].GasEstimator.LimitDefault = ptr(uint32(3.5e6)) + c.EVM[0].GasEstimator.LimitDefault = ptr(uint64(3.5e6)) c.EVM[0].MinIncomingConfirmations = ptr[uint32](2) c.Feature.LogPoller = ptr(true) c.EVM[0].LogPollInterval = commonconfig.MustNewDuration(1 * time.Second) @@ -1144,7 +1145,7 @@ func testSingleConsumerEIP150Revert( Key: ptr(key1.EIP55Address), GasEstimator: v2.KeySpecificGasEstimator{PriceMax: gasLanePriceWei}, })(c, s) - c.EVM[0].GasEstimator.LimitDefault = ptr(uint32(gasLimit)) + c.EVM[0].GasEstimator.LimitDefault = ptr(uint64(gasLimit)) c.EVM[0].MinIncomingConfirmations = ptr[uint32](2) c.Feature.LogPoller = ptr(true) c.EVM[0].LogPollInterval = commonconfig.MustNewDuration(1 * time.Second) @@ -1209,7 +1210,7 @@ func testSingleConsumerBigGasCallbackSandwich( Key: ptr(key1.EIP55Address), GasEstimator: v2.KeySpecificGasEstimator{PriceMax: gasLanePriceWei}, })(c, s) - c.EVM[0].GasEstimator.LimitDefault = ptr[uint32](5_000_000) + c.EVM[0].GasEstimator.LimitDefault = ptr[uint64](5_000_000) c.EVM[0].MinIncomingConfirmations = ptr[uint32](2) c.Feature.LogPoller = ptr(true) c.EVM[0].LogPollInterval = commonconfig.MustNewDuration(1 * time.Second) @@ -1332,7 +1333,7 @@ func testSingleConsumerMultipleGasLanes( GasEstimator: v2.KeySpecificGasEstimator{PriceMax: expensiveGasLane}, })(c, s) c.EVM[0].MinIncomingConfirmations = ptr[uint32](2) - c.EVM[0].GasEstimator.LimitDefault = ptr[uint32](5_000_000) + c.EVM[0].GasEstimator.LimitDefault = ptr[uint64](5_000_000) c.Feature.LogPoller = ptr(true) c.EVM[0].LogPollInterval = commonconfig.MustNewDuration(1 * time.Second) }) @@ -1644,7 +1645,7 @@ func testMaliciousConsumer( vrfVersion vrfcommon.Version, ) { config, _ := heavyweight.FullTestDBV2(t, func(c *chainlink.Config, s *chainlink.Secrets) { - c.EVM[0].GasEstimator.LimitDefault = ptr[uint32](2_000_000) + c.EVM[0].GasEstimator.LimitDefault = ptr[uint64](2_000_000) c.EVM[0].GasEstimator.PriceMax = assets.GWei(1) c.EVM[0].GasEstimator.PriceDefault = assets.GWei(1) c.EVM[0].GasEstimator.FeeCapDefault = assets.GWei(1) diff --git a/core/services/vrf/v2/integration_v2_plus_test.go b/core/services/vrf/v2/integration_v2_plus_test.go index 9d89911f0f2..bfec76afec3 100644 --- a/core/services/vrf/v2/integration_v2_plus_test.go +++ b/core/services/vrf/v2/integration_v2_plus_test.go @@ -948,7 +948,7 @@ func TestVRFV2PlusIntegration_MaxConsumersCost(t *testing.T) { uni.rootContractAddress, uni.coordinatorABI, "removeConsumer", subId, carolContractAddress) t.Log(estimate) - assert.Less(t, estimate, uint64(320000)) + assert.Less(t, estimate, uint64(540000)) estimate = estimateGas(t, uni.backend, carolContractAddress, uni.rootContractAddress, uni.coordinatorABI, "addConsumer", subId, testutils.NewAddress()) @@ -1151,7 +1151,7 @@ func TestVRFV2PlusIntegration_Migration(t *testing.T) { Key: ptr(key1.EIP55Address), GasEstimator: toml.KeySpecificGasEstimator{PriceMax: gasLanePriceWei}, })(c, s) - c.EVM[0].GasEstimator.LimitDefault = ptr[uint32](5_000_000) + c.EVM[0].GasEstimator.LimitDefault = ptr[uint64](5_000_000) c.EVM[0].MinIncomingConfirmations = ptr[uint32](2) c.Feature.LogPoller = ptr(true) c.EVM[0].LogPollInterval = commonconfig.MustNewDuration(1 * time.Second) diff --git a/core/services/vrf/v2/integration_v2_test.go b/core/services/vrf/v2/integration_v2_test.go index 18be6d8e408..5812ee675cd 100644 --- a/core/services/vrf/v2/integration_v2_test.go +++ b/core/services/vrf/v2/integration_v2_test.go @@ -144,7 +144,7 @@ func makeTestTxm(t *testing.T, txStore txmgr.TestEvmTxStore, keyStore keystore.M _, _, evmConfig := txmgr.MakeTestConfigs(t) txmConfig := txmgr.NewEvmTxmConfig(evmConfig) txm := txmgr.NewEvmTxm(ec.ConfiguredChainID(), txmConfig, evmConfig.Transactions(), keyStore.Eth(), logger.TestLogger(t), nil, nil, - nil, txStore, nil, nil, nil, nil, nil) + nil, txStore, nil, nil, nil, nil) return txm } @@ -1012,7 +1012,7 @@ func testEoa( Key: ptr(key1.EIP55Address), GasEstimator: toml.KeySpecificGasEstimator{PriceMax: gasLanePriceWei}, })(c, s) - c.EVM[0].GasEstimator.LimitDefault = ptr(uint32(gasLimit)) + c.EVM[0].GasEstimator.LimitDefault = ptr(uint64(gasLimit)) c.EVM[0].MinIncomingConfirmations = ptr[uint32](2) c.EVM[0].FinalityDepth = ptr(finalityDepth) }) @@ -1173,7 +1173,7 @@ func TestVRFV2Integration_SingleConsumer_Wrapper(t *testing.T) { Key: ptr(key1.EIP55Address), GasEstimator: toml.KeySpecificGasEstimator{PriceMax: gasLanePriceWei}, })(c, s) - c.EVM[0].GasEstimator.LimitDefault = ptr[uint32](3_500_000) + c.EVM[0].GasEstimator.LimitDefault = ptr[uint64](3_500_000) c.EVM[0].MinIncomingConfirmations = ptr[uint32](2) }) ownerKey := cltest.MustGenerateRandomKey(t) @@ -1253,7 +1253,7 @@ func TestVRFV2Integration_Wrapper_High_Gas(t *testing.T) { Key: ptr(key1.EIP55Address), GasEstimator: toml.KeySpecificGasEstimator{PriceMax: gasLanePriceWei}, })(c, s) - c.EVM[0].GasEstimator.LimitDefault = ptr[uint32](3_500_000) + c.EVM[0].GasEstimator.LimitDefault = ptr[uint64](3_500_000) c.EVM[0].MinIncomingConfirmations = ptr[uint32](2) c.Feature.LogPoller = ptr(true) c.EVM[0].LogPollInterval = commonconfig.MustNewDuration(1 * time.Second) @@ -1492,7 +1492,7 @@ func simulatedOverrides(t *testing.T, defaultGasPrice *assets.Wei, ks ...toml.Ke if defaultGasPrice != nil { c.EVM[0].GasEstimator.PriceDefault = defaultGasPrice } - c.EVM[0].GasEstimator.LimitDefault = ptr[uint32](3_500_000) + c.EVM[0].GasEstimator.LimitDefault = ptr[uint64](3_500_000) c.Feature.LogPoller = ptr(true) c.EVM[0].LogPollInterval = commonconfig.MustNewDuration(1 * time.Second) @@ -2178,7 +2178,7 @@ func TestStartingCountsV1(t *testing.T) { BroadcastBeforeBlockNum: &broadcastBlock, State: txmgrtypes.TxAttemptBroadcast, CreatedAt: time.Now(), - ChainSpecificFeeLimit: uint32(100), + ChainSpecificFeeLimit: uint64(100), }) } // add tx attempt for unconfirmed @@ -2190,7 +2190,7 @@ func TestStartingCountsV1(t *testing.T) { Hash: evmutils.NewHash(), State: txmgrtypes.TxAttemptInProgress, CreatedAt: time.Now(), - ChainSpecificFeeLimit: uint32(100), + ChainSpecificFeeLimit: uint64(100), }) } for _, txAttempt := range txAttempts { diff --git a/core/services/vrf/v2/listener_v2.go b/core/services/vrf/v2/listener_v2.go index cb87921e86b..71c6e72a06f 100644 --- a/core/services/vrf/v2/listener_v2.go +++ b/core/services/vrf/v2/listener_v2.go @@ -170,11 +170,11 @@ func (lsn *listenerV2) Start(ctx context.Context) error { gasLimit := lsn.feeCfg.LimitDefault() vrfLimit := lsn.feeCfg.LimitJobType().VRF() if vrfLimit != nil { - gasLimit = *vrfLimit + gasLimit = uint64(*vrfLimit) } if err != nil { lsn.l.Criticalw("Error getting coordinator config for gas limit check, starting anyway.", "err", err) - } else if conf.MaxGasLimit()+(GasProofVerification*2) > gasLimit { + } else if uint64(conf.MaxGasLimit()+(GasProofVerification*2)) > gasLimit { lsn.l.Criticalw("Node gas limit setting may not be high enough to fulfill all requests; it should be increased. Starting anyway.", "currentGasLimit", gasLimit, "neededGasLimit", conf.MaxGasLimit()+(GasProofVerification*2), diff --git a/core/services/vrf/v2/listener_v2_log_listener.go b/core/services/vrf/v2/listener_v2_log_listener.go index 07b4c2c3800..e495eac5d8b 100644 --- a/core/services/vrf/v2/listener_v2_log_listener.go +++ b/core/services/vrf/v2/listener_v2_log_listener.go @@ -14,7 +14,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/chains/evm/logpoller" evmtypes "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" "github.com/smartcontractkit/chainlink/v2/core/logger" - "github.com/smartcontractkit/chainlink/v2/core/services/pg" "github.com/smartcontractkit/chainlink/v2/core/services/vrf/vrfcommon" ) @@ -41,7 +40,7 @@ func (lsn *listenerV2) runLogListener( lsn.l.Debugw("log listener loop") // Filter registration is idempotent, so we can just call it every time // and retry on errors using the ticker. - err := lsn.chain.LogPoller().RegisterFilter(logpoller.Filter{ + err := lsn.chain.LogPoller().RegisterFilter(ctx, logpoller.Filter{ Name: logpoller.FilterName( "VRFListener", "version", lsn.coordinator.Version(), @@ -107,7 +106,7 @@ func (lsn *listenerV2) initializeLastProcessedBlock(ctx context.Context) (lastPr start := time.Now() // will retry on error in the runLogListener loop - latestBlock, err := lp.LatestBlock() + latestBlock, err := lp.LatestBlock(ctx) if err != nil { return 0, fmt.Errorf("LogPoller.LatestBlock(): %w", err) } @@ -131,6 +130,7 @@ func (lsn *listenerV2) initializeLastProcessedBlock(ctx context.Context) (lastPr // get randomness requested logs with the appropriate keyhash // keyhash is specified in topic1 requests, err := lp.IndexedLogsCreatedAfter( + ctx, lsn.coordinator.RandomWordsRequestedTopic(), // event sig lsn.coordinator.Address(), // address 1, // topic index @@ -145,6 +145,7 @@ func (lsn *listenerV2) initializeLastProcessedBlock(ctx context.Context) (lastPr // fulfillments don't have keyhash indexed, we'll have to get all of them // TODO: can we instead write a single query that joins on request id's somehow? fulfillments, err := lp.LogsCreatedAfter( + ctx, lsn.coordinator.RandomWordsFulfilledTopic(), // event sig lsn.coordinator.Address(), // address fromTimestamp, // from time @@ -172,7 +173,7 @@ func (lsn *listenerV2) updateLastProcessedBlock(ctx context.Context, currLastPro lp := lsn.chain.LogPoller() start := time.Now() - latestBlock, err := lp.LatestBlock(pg.WithParentCtx(ctx)) + latestBlock, err := lp.LatestBlock(ctx) if err != nil { lsn.l.Errorw("error getting latest block", "err", err) return 0, fmt.Errorf("LogPoller.LatestBlock(): %w", err) @@ -187,11 +188,11 @@ func (lsn *listenerV2) updateLastProcessedBlock(ctx context.Context, currLastPro }() logs, err := lp.LogsWithSigs( + ctx, currLastProcessedBlock, latestBlock.FinalizedBlockNumber, []common.Hash{lsn.coordinator.RandomWordsFulfilledTopic(), lsn.coordinator.RandomWordsRequestedTopic()}, lsn.coordinator.Address(), - pg.WithParentCtx(ctx), ) if err != nil { return currLastProcessedBlock, fmt.Errorf("LogPoller.LogsWithSigs: %w", err) @@ -228,7 +229,7 @@ func (lsn *listenerV2) pollLogs(ctx context.Context, minConfs uint32, lastProces // latest unfinalized block used on purpose to get bleeding edge logs // we don't really have the luxury to wait for finalization on most chains // if we want to fulfill on time. - latestBlock, err := lp.LatestBlock() + latestBlock, err := lp.LatestBlock(ctx) if err != nil { return nil, fmt.Errorf("LogPoller.LatestBlock(): %w", err) } @@ -246,11 +247,11 @@ func (lsn *listenerV2) pollLogs(ctx context.Context, minConfs uint32, lastProces // We don't specify confs because each request can have a different conf above // the minimum. So we do all conf handling in getConfirmedAt. logs, err := lp.LogsWithSigs( + ctx, lastProcessedBlock, latestBlock.BlockNumber, []common.Hash{lsn.coordinator.RandomWordsFulfilledTopic(), lsn.coordinator.RandomWordsRequestedTopic()}, lsn.coordinator.Address(), - pg.WithParentCtx(ctx), ) if err != nil { return nil, fmt.Errorf("LogPoller.LogsWithSigs: %w", err) diff --git a/core/services/vrf/v2/listener_v2_log_listener_test.go b/core/services/vrf/v2/listener_v2_log_listener_test.go index cda172abefd..81ec6473a92 100644 --- a/core/services/vrf/v2/listener_v2_log_listener_test.go +++ b/core/services/vrf/v2/listener_v2_log_listener_test.go @@ -30,7 +30,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/keystore" - "github.com/smartcontractkit/chainlink/v2/core/services/pg" "github.com/smartcontractkit/chainlink/v2/core/services/vrf/vrfcommon" "github.com/smartcontractkit/chainlink/v2/core/testdata/testspecs" "github.com/smartcontractkit/chainlink/v2/core/utils" @@ -44,7 +43,7 @@ var ( type vrfLogPollerListenerTH struct { Lggr logger.Logger ChainID *big.Int - ORM *logpoller.DbORM + ORM logpoller.ORM LogPoller logpoller.LogPollerTest Client *backends.SimulatedBackend Emitter *log_emitter.LogEmitter @@ -68,7 +67,7 @@ func setupVRFLogPollerListenerTH(t *testing.T, chainID := testutils.NewRandomEVMChainID() db := pgtest.NewSqlxDB(t) - o := logpoller.NewORM(chainID, db, lggr, pgtest.NewQConfig(true)) + o := logpoller.NewORM(chainID, db, lggr) owner := testutils.MustNewSimTransactor(t) ethDB := rawdb.NewMemoryDatabase() ec := backends.NewSimulatedBackendWithDatabase(ethDB, map[common.Address]core.GenesisAccount{ @@ -135,7 +134,7 @@ func setupVRFLogPollerListenerTH(t *testing.T, // Filter registration is idempotent, so we can just call it every time // and retry on errors using the ticker. - err = lp.RegisterFilter(logpoller.Filter{ + err = lp.RegisterFilter(ctx, logpoller.Filter{ Name: fmt.Sprintf("vrf_%s_keyhash_%s_job_%d", "v2", listener.job.VRFSpec.PublicKey.MustHash().String(), listener.job.ID), EventSigs: evmtypes.HashArray{ vrf_log_emitter.VRFLogEmitterRandomWordsRequested{}.Topic(), @@ -147,7 +146,7 @@ func setupVRFLogPollerListenerTH(t *testing.T, }, }) require.Nil(t, err) - require.NoError(t, lp.RegisterFilter(logpoller.Filter{ + require.NoError(t, lp.RegisterFilter(ctx, logpoller.Filter{ Name: "Integration test", EventSigs: []common.Hash{emitterABI.Events["Log1"].ID}, Addresses: []common.Address{emitterAddress1}, @@ -220,8 +219,7 @@ func TestInitProcessedBlock_NoVRFReqs(t *testing.T) { require.NoError(t, th.LogPoller.Replay(testutils.Context(t), 4)) // Should return logs from block 5 to 7 (inclusive) - logs, err := th.LogPoller.Logs(4, 7, emitterABI.Events["Log1"].ID, th.EmitterAddress, - pg.WithParentCtx(testutils.Context(t))) + logs, err := th.LogPoller.Logs(testutils.Context(t), 4, 7, emitterABI.Events["Log1"].ID, th.EmitterAddress) require.NoError(t, err) require.Equal(t, 3, len(logs)) diff --git a/core/services/vrf/v2/listener_v2_log_processor.go b/core/services/vrf/v2/listener_v2_log_processor.go index 7f61dd4cf3e..db84fb47e3e 100644 --- a/core/services/vrf/v2/listener_v2_log_processor.go +++ b/core/services/vrf/v2/listener_v2_log_processor.go @@ -591,8 +591,8 @@ func (lsn *listenerV2) enqueueForceFulfillment( lsn.l.Infow("Estimated gas limit on force fulfillment", "estimateGasLimit", estimateGasLimit, "pipelineGasLimit", p.gasLimit) - if estimateGasLimit < uint64(p.gasLimit) { - estimateGasLimit = uint64(p.gasLimit) + if estimateGasLimit < p.gasLimit { + estimateGasLimit = p.gasLimit } requestID := common.BytesToHash(p.req.req.RequestID().Bytes()) @@ -602,7 +602,7 @@ func (lsn *listenerV2) enqueueForceFulfillment( FromAddress: fromAddress, ToAddress: lsn.vrfOwner.Address(), EncodedPayload: txData, - FeeLimit: uint32(estimateGasLimit), + FeeLimit: estimateGasLimit, Strategy: txmgrcommon.NewSendEveryStrategy(), Meta: &txmgr.TxMeta{ RequestID: &requestID, @@ -1205,7 +1205,7 @@ func (lsn *listenerV2) simulateFulfillment( } if trr.Task.Type() == pipeline.TaskTypeEstimateGasLimit { - res.gasLimit = trr.Result.Value.(uint32) + res.gasLimit = trr.Result.Value.(uint64) } } return res diff --git a/core/services/vrf/v2/listener_v2_test.go b/core/services/vrf/v2/listener_v2_test.go index 465e3dcaca9..661772a823b 100644 --- a/core/services/vrf/v2/listener_v2_test.go +++ b/core/services/vrf/v2/listener_v2_test.go @@ -40,7 +40,7 @@ func makeTestTxm(t *testing.T, txStore txmgr.TestEvmTxStore, keyStore keystore.M ec := evmtest.NewEthClientMockWithDefaultChain(t) txmConfig := txmgr.NewEvmTxmConfig(evmConfig) txm := txmgr.NewEvmTxm(ec.ConfiguredChainID(), txmConfig, evmConfig.Transactions(), keyStore.Eth(), logger.TestLogger(t), nil, nil, - nil, txStore, nil, nil, nil, nil, nil) + nil, txStore, nil, nil, nil, nil) return txm } diff --git a/core/services/vrf/v2/listener_v2_types.go b/core/services/vrf/v2/listener_v2_types.go index b3cbbff4713..f10297f31a9 100644 --- a/core/services/vrf/v2/listener_v2_types.go +++ b/core/services/vrf/v2/listener_v2_types.go @@ -72,7 +72,7 @@ type vrfPipelineResult struct { fundsNeeded *big.Int run *pipeline.Run payload string - gasLimit uint32 + gasLimit uint64 req pendingRequest proof VRFProof reqCommitment RequestCommitment @@ -83,7 +83,7 @@ type vrfPipelineResult struct { type batchFulfillment struct { proofs []VRFProof commitments []RequestCommitment - totalGasLimit uint32 + totalGasLimit uint64 runs []*pipeline.Run reqIDs []*big.Int maxFees []*big.Int @@ -144,7 +144,7 @@ func (b *batchFulfillments) addRun(result vrfPipelineResult, fromAddress common. b.fulfillments = append(b.fulfillments, newBatchFulfillment(result, fromAddress, b.version)) } else { currBatch := b.fulfillments[b.currIndex] - if (currBatch.totalGasLimit + result.gasLimit) >= b.batchGasLimit { + if (currBatch.totalGasLimit + result.gasLimit) >= uint64(b.batchGasLimit) { // don't add to curr batch, add new batch and increment index b.fulfillments = append(b.fulfillments, newBatchFulfillment(result, fromAddress, b.version)) b.currIndex++ @@ -240,7 +240,7 @@ func (lsn *listenerV2) processBatch( FromAddress: fromAddress, ToAddress: lsn.batchCoordinator.Address(), EncodedPayload: payload, - FeeLimit: totalGasLimitBumped, + FeeLimit: uint64(totalGasLimitBumped), Strategy: txmgrcommon.NewSendEveryStrategy(), Meta: &txmgr.TxMeta{ RequestIDs: reqIDHashes, diff --git a/core/services/vrf/v2/listener_v2_types_test.go b/core/services/vrf/v2/listener_v2_types_test.go index c66270210b9..3ca76fb70d2 100644 --- a/core/services/vrf/v2/listener_v2_types_test.go +++ b/core/services/vrf/v2/listener_v2_types_test.go @@ -35,7 +35,7 @@ func Test_BatchFulfillments_AddRun(t *testing.T) { require.Len(t, bfs.fulfillments, 1) } - require.Equal(t, uint32(2000), bfs.fulfillments[0].totalGasLimit) + require.Equal(t, uint64(2000), bfs.fulfillments[0].totalGasLimit) // This addition should create and add a new batch bfs.addRun(vrfPipelineResult{ @@ -73,7 +73,7 @@ func Test_BatchFulfillments_AddRun_V2Plus(t *testing.T) { require.Len(t, bfs.fulfillments, 1) } - require.Equal(t, uint32(2000), bfs.fulfillments[0].totalGasLimit) + require.Equal(t, uint64(2000), bfs.fulfillments[0].totalGasLimit) // This addition should create and add a new batch bfs.addRun(vrfPipelineResult{ diff --git a/core/services/vrf/v2/reverted_txns.go b/core/services/vrf/v2/reverted_txns.go index be20738a8f5..d2f62fbf271 100644 --- a/core/services/vrf/v2/reverted_txns.go +++ b/core/services/vrf/v2/reverted_txns.go @@ -707,7 +707,7 @@ func (lsn *listenerV2) enqueueForceFulfillmentForRevertedTxn( FromAddress: fromAddress, ToAddress: lsn.vrfOwner.Address(), EncodedPayload: txData, - FeeLimit: uint32(estimateGasLimit), + FeeLimit: estimateGasLimit, Strategy: txmgrcommon.NewSendEveryStrategy(), Meta: &txmgr.TxMeta{ RequestID: &reqID, diff --git a/core/services/vrf/vrfcommon/types.go b/core/services/vrf/vrfcommon/types.go index 06988633e8e..a27fcd5beb8 100644 --- a/core/services/vrf/vrfcommon/types.go +++ b/core/services/vrf/vrfcommon/types.go @@ -22,7 +22,7 @@ type Config interface { //go:generate mockery --quiet --name FeeConfig --output ../mocks/ --case=underscore type FeeConfig interface { - LimitDefault() uint32 + LimitDefault() uint64 LimitJobType() config.LimitJobType PriceMaxKey(addr common.Address) *assets.Wei } diff --git a/core/services/webhook/authorizer.go b/core/services/webhook/authorizer.go index 91aac9cc5fb..c745c5d0b09 100644 --- a/core/services/webhook/authorizer.go +++ b/core/services/webhook/authorizer.go @@ -2,10 +2,10 @@ package webhook import ( "context" - "database/sql" "github.com/google/uuid" + "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" "github.com/smartcontractkit/chainlink/v2/core/bridges" "github.com/smartcontractkit/chainlink/v2/core/sessions" ) @@ -24,7 +24,7 @@ var ( _ Authorizer = &neverAuthorizer{} ) -func NewAuthorizer(db *sql.DB, user *sessions.User, ei *bridges.ExternalInitiator) Authorizer { +func NewAuthorizer(db sqlutil.DataSource, user *sessions.User, ei *bridges.ExternalInitiator) Authorizer { if user != nil { return &alwaysAuthorizer{} } else if ei != nil { @@ -34,11 +34,11 @@ func NewAuthorizer(db *sql.DB, user *sessions.User, ei *bridges.ExternalInitiato } type eiAuthorizer struct { - db *sql.DB + db sqlutil.DataSource ei bridges.ExternalInitiator } -func NewEIAuthorizer(db *sql.DB, ei bridges.ExternalInitiator) *eiAuthorizer { +func NewEIAuthorizer(db sqlutil.DataSource, ei bridges.ExternalInitiator) *eiAuthorizer { return &eiAuthorizer{db, ei} } @@ -46,7 +46,7 @@ func (ea *eiAuthorizer) CanRun(ctx context.Context, config AuthorizerConfig, job if !config.ExternalInitiatorsEnabled() { return false, nil } - row := ea.db.QueryRowContext(ctx, ` + row := ea.db.QueryRowxContext(ctx, ` SELECT EXISTS ( SELECT 1 FROM external_initiator_webhook_specs JOIN jobs ON external_initiator_webhook_specs.webhook_spec_id = jobs.webhook_spec_id diff --git a/core/services/webhook/authorizer_test.go b/core/services/webhook/authorizer_test.go index b6eb2feaccb..35292c6bbb9 100644 --- a/core/services/webhook/authorizer_test.go +++ b/core/services/webhook/authorizer_test.go @@ -51,7 +51,7 @@ func Test_Authorizer(t *testing.T) { require.NoError(t, err) t.Run("no user no ei never authorizes", func(t *testing.T) { - a := webhook.NewAuthorizer(db.DB, nil, nil) + a := webhook.NewAuthorizer(db, nil, nil) can, err := a.CanRun(testutils.Context(t), nil, jobWithFooAndBarEI.ExternalJobID) require.NoError(t, err) @@ -65,7 +65,7 @@ func Test_Authorizer(t *testing.T) { }) t.Run("with user no ei always authorizes", func(t *testing.T) { - a := webhook.NewAuthorizer(db.DB, &sessions.User{}, nil) + a := webhook.NewAuthorizer(db, &sessions.User{}, nil) can, err := a.CanRun(testutils.Context(t), nil, jobWithFooAndBarEI.ExternalJobID) require.NoError(t, err) @@ -79,7 +79,7 @@ func Test_Authorizer(t *testing.T) { }) t.Run("no user with ei authorizes conditionally", func(t *testing.T) { - a := webhook.NewAuthorizer(db.DB, nil, &eiFoo) + a := webhook.NewAuthorizer(db, nil, &eiFoo) can, err := a.CanRun(testutils.Context(t), eiEnabledCfg{}, jobWithFooAndBarEI.ExternalJobID) require.NoError(t, err) diff --git a/core/services/webhook/delegate.go b/core/services/webhook/delegate.go index 3211018d48d..999b041f308 100644 --- a/core/services/webhook/delegate.go +++ b/core/services/webhook/delegate.go @@ -73,7 +73,7 @@ func (d *Delegate) BeforeJobDeleted(spec job.Job) { ) } } -func (d *Delegate) OnDeleteJob(jb job.Job, q pg.Queryer) error { return nil } +func (d *Delegate) OnDeleteJob(ctx context.Context, jb job.Job, q pg.Queryer) error { return nil } // ServicesForSpec satisfies the job.Delegate interface. func (d *Delegate) ServicesForSpec(ctx context.Context, spec job.Job) ([]job.ServiceCtx, error) { diff --git a/core/services/workflows/delegate.go b/core/services/workflows/delegate.go index 2951c2b4aa3..a54a33e9f0d 100644 --- a/core/services/workflows/delegate.go +++ b/core/services/workflows/delegate.go @@ -32,7 +32,7 @@ func (d *Delegate) AfterJobCreated(jb job.Job) {} func (d *Delegate) BeforeJobDeleted(spec job.Job) {} -func (d *Delegate) OnDeleteJob(jb job.Job, q pg.Queryer) error { return nil } +func (d *Delegate) OnDeleteJob(ctx context.Context, jb job.Job, q pg.Queryer) error { return nil } // ServicesForSpec satisfies the job.Delegate interface. func (d *Delegate) ServicesForSpec(ctx context.Context, spec job.Job) ([]job.ServiceCtx, error) { diff --git a/core/services/workflows/engine.go b/core/services/workflows/engine.go index 8985f9d1599..3261bdd3fce 100644 --- a/core/services/workflows/engine.go +++ b/core/services/workflows/engine.go @@ -2,12 +2,9 @@ package workflows import ( "context" - "errors" "fmt" "time" - "github.com/shopspring/decimal" - "github.com/smartcontractkit/chainlink-common/pkg/capabilities" "github.com/smartcontractkit/chainlink-common/pkg/services" "github.com/smartcontractkit/chainlink-common/pkg/types" @@ -24,23 +21,14 @@ const ( type Engine struct { services.StateMachine - logger logger.Logger - registry types.CapabilitiesRegistry - triggerType string - triggerConfig *values.Map - trigger capabilities.TriggerCapability - consensusType string - consensusConfig *values.Map - consensus capabilities.ConsensusCapability - targets []target - callbackCh chan capabilities.CapabilityResponse - cancel func() -} - -type target struct { - typeStr string - config *values.Map - capability capabilities.TargetCapability + logger logger.Logger + registry types.CapabilitiesRegistry + trigger capabilities.TriggerCapability + consensus capabilities.ConsensusCapability + targets []capabilities.TargetCapability + workflow *Workflow + callbackCh chan capabilities.CapabilityResponse + cancel func() } func (e *Engine) Start(ctx context.Context) error { @@ -58,6 +46,12 @@ func (e *Engine) init(ctx context.Context) { retrySec := 5 ticker := time.NewTicker(time.Duration(retrySec) * time.Second) defer ticker.Stop() + + // Note: in our hardcoded workflow, there is only one trigger, + // and one consensus step. + trigger := e.workflow.Triggers[0] + consensus := e.workflow.Consensus[0] + var err error LOOP: for { @@ -65,19 +59,21 @@ LOOP: case <-ctx.Done(): return case <-ticker.C: - e.trigger, err = e.registry.GetTrigger(ctx, e.triggerType) + e.trigger, err = e.registry.GetTrigger(ctx, trigger.Type) if err != nil { e.logger.Errorf("failed to get trigger capability: %s, retrying in %d seconds", err, retrySec) break } - e.consensus, err = e.registry.GetConsensus(ctx, e.consensusType) + + e.consensus, err = e.registry.GetConsensus(ctx, consensus.Type) if err != nil { e.logger.Errorf("failed to get consensus capability: %s, retrying in %d seconds", err, retrySec) break } failed := false - for i := range e.targets { - e.targets[i].capability, err = e.registry.GetTarget(ctx, e.targets[i].typeStr) + e.targets = make([]capabilities.TargetCapability, len(e.workflow.Targets)) + for i, target := range e.workflow.Targets { + e.targets[i], err = e.registry.GetTarget(ctx, target.Type) if err != nil { e.logger.Errorf("failed to get target capability: %s, retrying in %d seconds", err, retrySec) failed = true @@ -97,11 +93,15 @@ LOOP: } // also register for consensus + cm, err := values.NewMap(consensus.Config) + if err != nil { + e.logger.Errorf("failed to convert config to values.Map: %s", err) + } reg := capabilities.RegisterToWorkflowRequest{ Metadata: capabilities.RegistrationMetadata{ WorkflowID: mockedWorkflowID, }, - Config: e.consensusConfig, + Config: cm, } err = e.consensus.RegisterToWorkflow(ctx, reg) if err != nil { @@ -112,6 +112,7 @@ LOOP: } func (e *Engine) registerTrigger(ctx context.Context) error { + trigger := e.workflow.Triggers[0] triggerInputs, err := values.NewMap( map[string]any{ "triggerId": mockedTriggerID, @@ -121,11 +122,16 @@ func (e *Engine) registerTrigger(ctx context.Context) error { return err } + tc, err := values.NewMap(trigger.Config) + if err != nil { + return err + } + triggerRegRequest := capabilities.CapabilityRequest{ Metadata: capabilities.RequestMetadata{ WorkflowID: mockedWorkflowID, }, - Config: e.triggerConfig, + Config: tc, Inputs: triggerInputs, } err = e.trigger.RegisterTrigger(ctx, e.callbackCh, triggerRegRequest) @@ -148,73 +154,99 @@ func (e *Engine) triggerHandlerLoop(ctx context.Context) { func (e *Engine) handleExecution(ctx context.Context, event capabilities.CapabilityResponse) { e.logger.Debugw("executing on a trigger event", "event", event) - result, err := e.handleConsensus(ctx, event) - if err != nil { - e.logger.Errorf("error in handleConsensus %v", err) + trigger := e.workflow.Triggers[0] + if event.Err != nil { + e.logger.Errorf("trigger event was an error; not executing", event.Err) return } - err = e.handleTargets(ctx, result) - if err != nil { - e.logger.Error("error in handleTargets %v", err) - } -} -func (e *Engine) handleConsensus(ctx context.Context, event capabilities.CapabilityResponse) (values.Value, error) { - e.logger.Debugw("running consensus", "event", event) - cr := capabilities.CapabilityRequest{ - Metadata: capabilities.RequestMetadata{ - WorkflowID: mockedWorkflowID, - WorkflowExecutionID: mockedExecutionID, - }, - Inputs: &values.Map{ - Underlying: map[string]values.Value{ - // each node provides a single observation - outputs of mercury trigger - "observations": &values.List{ - Underlying: []values.Value{event.Value}, + ec := &executionState{ + steps: map[string]*stepState{ + trigger.Ref: { + outputs: &stepOutput{ + value: event.Value, }, }, }, - Config: e.consensusConfig, + workflowID: mockedWorkflowID, + executionID: mockedExecutionID, } - chReports := make(chan capabilities.CapabilityResponse, 10) - newCtx, cancel := context.WithCancel(ctx) - defer cancel() - err := e.consensus.Execute(newCtx, chReports, cr) + + consensus := e.workflow.Consensus[0] + err := e.handleStep(ctx, ec, consensus) if err != nil { - return nil, err + e.logger.Errorf("error in handleConsensus %v", err) + return } - select { - case resp := <-chReports: - if resp.Err != nil { - return nil, resp.Err + + for _, trg := range e.workflow.Targets { + err := e.handleStep(ctx, ec, trg) + if err != nil { + e.logger.Errorf("error in handleTargets %v", err) + return } - return resp.Value, nil - case <-ctx.Done(): - return nil, ctx.Err() } } -func (e *Engine) handleTargets(ctx context.Context, resp values.Value) error { - e.logger.Debugw("handle targets") - inputs := map[string]values.Value{ - "report": resp, +func (e *Engine) handleStep(ctx context.Context, es *executionState, node Capability) error { + stepState := &stepState{ + outputs: &stepOutput{}, } + es.steps[node.Ref] = stepState - var combinedErr error - for _, t := range e.targets { - e.logger.Debugw("sending to target", "target", t.typeStr, "inputs", inputs) - tr := capabilities.CapabilityRequest{ - Inputs: &values.Map{Underlying: inputs}, - Config: t.config, - Metadata: capabilities.RequestMetadata{ - WorkflowID: mockedWorkflowID, - WorkflowExecutionID: mockedExecutionID, - }, - } - _, err := capabilities.ExecuteSync(ctx, t.capability, tr) - combinedErr = errors.Join(combinedErr, err) + // Let's get the capability. If we fail here, we'll bail out + // and try to handle it at the next execution. + cp, err := e.registry.Get(ctx, node.Type) + if err != nil { + return err + } + + api, ok := cp.(capabilities.CallbackExecutable) + if !ok { + return fmt.Errorf("capability %s must be an action, consensus or target", node.Type) } - return combinedErr + + i, err := findAndInterpolateAllKeys(node.Inputs, es) + if err != nil { + return err + } + + inputs, err := values.NewMap(i.(map[string]any)) + if err != nil { + return err + } + + stepState.inputs = inputs + + config, err := values.NewMap(node.Config) + if err != nil { + return err + } + + tr := capabilities.CapabilityRequest{ + Inputs: inputs, + Config: config, + Metadata: capabilities.RequestMetadata{ + WorkflowID: es.workflowID, + WorkflowExecutionID: es.executionID, + }, + } + + resp, err := capabilities.ExecuteSync(ctx, api, tr) + if err != nil { + stepState.outputs.err = err + return err + } + + // `ExecuteSync` returns a `values.List` even if there was + // just one return value. If that is the case, let's unwrap the + // single value to make it easier to use in -- for example -- variable interpolation. + if len(resp.Underlying) > 1 { + stepState.outputs.value = resp + } else { + stepState.outputs.value = resp.Underlying[0] + } + return nil } func (e *Engine) Close() error { @@ -240,76 +272,66 @@ func (e *Engine) Close() error { } func NewEngine(lggr logger.Logger, registry types.CapabilitiesRegistry) (engine *Engine, err error) { - engine = &Engine{ - logger: lggr.Named("WorkflowEngine"), - registry: registry, - callbackCh: make(chan capabilities.CapabilityResponse), - } + yamlWorkflowSpec := ` +triggers: + - type: "on_mercury_report" + ref: report_data + config: + feedlist: + - "0x1111111111111111111100000000000000000000000000000000000000000000" # ETHUSD + - "0x2222222222222222222200000000000000000000000000000000000000000000" # LINKUSD + - "0x3333333333333333333300000000000000000000000000000000000000000000" # BTCUSD + +consensus: + - type: "offchain_reporting" + ref: evm_median + inputs: + observations: + - $(report_data.outputs) + config: + aggregation_method: data_feeds_2_0 + aggregation_config: + 0x1111111111111111111100000000000000000000000000000000000000000000: + deviation: "0.001" + heartbeat: "30m" + 0x2222222222222222222200000000000000000000000000000000000000000000: + deviation: "0.001" + heartbeat: "30m" + 0x3333333333333333333300000000000000000000000000000000000000000000: + deviation: "0.001" + heartbeat: "30m" + encoder: EVM + encoder_config: + abi: "mercury_reports bytes[]" - // Trigger - engine.triggerType = "on_mercury_report" - engine.triggerConfig, err = values.NewMap( - map[string]any{ - "feedlist": []any{ - "0x1111111111111111111100000000000000000000000000000000000000000000", // ETHUSD - "0x2222222222222222222200000000000000000000000000000000000000000000", // LINKUSD - "0x3333333333333333333300000000000000000000000000000000000000000000", // BTCUSD - }, - }, - ) - if err != nil { - return nil, err - } +targets: + - type: write_polygon-testnet-mumbai + inputs: + report: + - $(evm_median.outputs.reports) + config: + address: "0x3F3554832c636721F1fD1822Ccca0354576741Ef" + params: [($inputs.report)] + abi: "receive(report bytes)" + - type: write_ethereum-testnet-sepolia + inputs: + report: + - $(evm_median.outputs.reports) + config: + address: "0x54e220867af6683aE6DcBF535B4f952cB5116510" + params: ["$(inputs.report)"] + abi: "receive(report bytes)" +` - // Consensus - engine.consensusType = "offchain_reporting" - engine.consensusConfig, err = values.NewMap(map[string]any{ - "aggregation_method": "data_feeds_2_0", - "aggregation_config": map[string]any{ - // ETHUSD - "0x1111111111111111111100000000000000000000000000000000000000000000": map[string]any{ - "deviation": decimal.NewFromFloat(0.001), - "heartbeat": 1800, - }, - // LINKUSD - "0x2222222222222222222200000000000000000000000000000000000000000000": map[string]any{ - "deviation": decimal.NewFromFloat(0.001), - "heartbeat": 1800, - }, - // BTCUSD - "0x3333333333333333333300000000000000000000000000000000000000000000": map[string]any{ - "deviation": decimal.NewFromFloat(0.001), - "heartbeat": 1800, - }, - }, - "encoder": "EVM", - "encoder_config": map[string]any{ - "abi": "mercury_reports bytes[]", - }, - }) + workflow, err := Parse(yamlWorkflowSpec) if err != nil { return nil, err } - - // Targets - engine.targets = make([]target, 2) - engine.targets[0].typeStr = "write_polygon-testnet-mumbai" - engine.targets[0].config, err = values.NewMap(map[string]any{ - "address": "0x3F3554832c636721F1fD1822Ccca0354576741Ef", - "params": []any{"$(report)"}, - "abi": "receive(report bytes)", - }) - if err != nil { - return nil, err - } - engine.targets[1].typeStr = "write_ethereum-testnet-sepolia" - engine.targets[1].config, err = values.NewMap(map[string]any{ - "address": "0x54e220867af6683aE6DcBF535B4f952cB5116510", - "params": []any{"$(report)"}, - "abi": "receive(report bytes)", - }) - if err != nil { - return nil, err + engine = &Engine{ + logger: lggr.Named("WorkflowEngine"), + registry: registry, + workflow: workflow, + callbackCh: make(chan capabilities.CapabilityResponse), } - return + return engine, nil } diff --git a/core/services/workflows/engine_test.go b/core/services/workflows/engine_test.go index e63264c789f..74a2093c0d2 100644 --- a/core/services/workflows/engine_test.go +++ b/core/services/workflows/engine_test.go @@ -88,8 +88,18 @@ func TestEngineWithHardcodedWorkflow(t *testing.T) { "v3.0.0", ), func(req capabilities.CapabilityRequest) (capabilities.CapabilityResponse, error) { + obs := req.Inputs.Underlying["observations"] + reports := obs.(*values.List) + rm := map[string]any{ + "reports": reports.Underlying[0], + } + rv, err := values.NewMap(rm) + if err != nil { + return capabilities.CapabilityResponse{}, err + } + return capabilities.CapabilityResponse{ - Value: req.Inputs.Underlying["observations"], + Value: rv, }, nil }, ) diff --git a/core/services/workflows/state.go b/core/services/workflows/state.go new file mode 100644 index 00000000000..e002fa90501 --- /dev/null +++ b/core/services/workflows/state.go @@ -0,0 +1,144 @@ +package workflows + +import ( + "fmt" + "regexp" + "strconv" + "strings" + + "github.com/smartcontractkit/chainlink-common/pkg/values" +) + +type stepOutput struct { + err error + value values.Value +} + +type stepState struct { + inputs *values.Map + outputs *stepOutput +} + +type executionState struct { + steps map[string]*stepState + executionID string + workflowID string +} + +// interpolateKey takes a multi-part, dot-separated key and attempts to replace +// it with its corresponding value in `state`. +// A key is valid if: +// - it contains at least two parts, with the first part being the workflow step's `ref` variable, and the second being one of `inputs` or `outputs` +// - any subsequent parts will be processed as a list index (if the current element is a list) or a map key (if it's a map) +func interpolateKey(key string, state *executionState) (any, error) { + parts := strings.Split(key, ".") + + if len(parts) < 2 { + return "", fmt.Errorf("cannot interpolate %s: must have at least two parts", key) + } + + sc, ok := state.steps[parts[0]] + if !ok { + return "", fmt.Errorf("could not find ref `%s`", parts[0]) + } + + var value values.Value + switch parts[1] { + case "inputs": + value = sc.inputs + case "outputs": + if sc.outputs.err != nil { + return "", fmt.Errorf("cannot interpolate ref part `%s` in `%+v`: step has errored", parts[1], sc) + } + + value = sc.outputs.value + default: + return "", fmt.Errorf("cannot interpolate ref part `%s` in `%+v`: second part must be `inputs` or `outputs`", parts[1], sc) + } + + val, err := values.Unwrap(value) + if err != nil { + return "", err + } + + remainingParts := parts[2:] + for _, r := range remainingParts { + switch v := val.(type) { + case map[string]any: + inner, ok := v[r] + if !ok { + return "", fmt.Errorf("could not find ref part `%s` in `%+v`", r, v) + } + + val = inner + case []any: + d, err := strconv.Atoi(r) + if err != nil { + return "", fmt.Errorf("could not interpolate ref part `%s` in `%+v`: `%s` is not convertible to an int", r, v, r) + } + + if d > len(v)-1 { + return "", fmt.Errorf("could not interpolate ref part `%s` in `%+v`: cannot fetch index %d", r, v, d) + } + + if d < 0 { + return "", fmt.Errorf("could not interpolate ref part `%s` in `%+v`: index %d must be a positive number", r, v, d) + } + + val = v[d] + default: + return "", fmt.Errorf("could not interpolate ref part `%s` in `%+v`", r, val) + } + } + + return val, nil +} + +var ( + interpolationTokenRe = regexp.MustCompile(`^\$\((\S+)\)$`) +) + +// findAndInterpolateAllKeys takes an `input` any value, and recursively +// identifies any values that should be replaced from `state`. +// A value `v` should be replaced if it is wrapped as follows `$(v)`. +func findAndInterpolateAllKeys(input any, state *executionState) (any, error) { + switch tv := input.(type) { + case string: + matches := interpolationTokenRe.FindStringSubmatch(tv) + if len(matches) < 2 { + return tv, nil + } + + interpolatedVar := matches[1] + nv, err := interpolateKey(interpolatedVar, state) + if err != nil { + return nil, err + } + + return nv, nil + case map[string]any: + nm := map[string]any{} + for k, v := range tv { + nv, err := findAndInterpolateAllKeys(v, state) + if err != nil { + return nil, err + } + + nm[k] = nv + } + return nm, nil + case []any: + a := []any{} + for _, el := range tv { + ne, err := findAndInterpolateAllKeys(el, state) + if err != nil { + return nil, err + } + + a = append(a, ne) + } + return a, nil + } + + return nil, fmt.Errorf("cannot interpolate item %+v of type %T", input, input) +} diff --git a/core/services/workflows/state_test.go b/core/services/workflows/state_test.go new file mode 100644 index 00000000000..9a0fadd02bd --- /dev/null +++ b/core/services/workflows/state_test.go @@ -0,0 +1,265 @@ +package workflows + +import ( + "errors" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/values" +) + +func TestInterpolateKey(t *testing.T) { + val, err := values.NewMap( + map[string]any{ + "reports": map[string]any{ + "inner": "key", + }, + "reportsList": []any{ + "listElement", + }, + }, + ) + require.NoError(t, err) + + testCases := []struct { + name string + key string + state *executionState + expected any + errMsg string + }{ + { + name: "digging into a string", + key: "evm_median.outputs.reports", + state: &executionState{ + steps: map[string]*stepState{ + "evm_median": { + outputs: &stepOutput{ + value: values.NewString(""), + }, + }, + }, + }, + errMsg: "could not interpolate ref part `reports` in ``", + }, + { + name: "ref doesn't exist", + key: "evm_median.outputs.reports", + state: &executionState{ + steps: map[string]*stepState{}, + }, + errMsg: "could not find ref `evm_median`", + }, + { + name: "less than 2 parts", + key: "evm_median", + state: &executionState{ + steps: map[string]*stepState{}, + }, + errMsg: "must have at least two parts", + }, + { + name: "second part isn't `inputs` or `outputs`", + key: "evm_median.foo", + state: &executionState{ + steps: map[string]*stepState{ + "evm_median": { + outputs: &stepOutput{ + value: values.NewString(""), + }, + }, + }, + }, + errMsg: "second part must be `inputs` or `outputs`", + }, + { + name: "outputs has errored", + key: "evm_median.outputs", + state: &executionState{ + steps: map[string]*stepState{ + "evm_median": { + outputs: &stepOutput{ + err: errors.New("catastrophic error"), + }, + }, + }, + }, + errMsg: "step has errored", + }, + { + name: "digging into a recursive map", + key: "evm_median.outputs.reports.inner", + state: &executionState{ + steps: map[string]*stepState{ + "evm_median": { + outputs: &stepOutput{ + value: val, + }, + }, + }, + }, + expected: "key", + }, + { + name: "missing key in map", + key: "evm_median.outputs.reports.missing", + state: &executionState{ + steps: map[string]*stepState{ + "evm_median": { + outputs: &stepOutput{ + value: val, + }, + }, + }, + }, + errMsg: "could not find ref part `missing` in", + }, + { + name: "digging into an array", + key: "evm_median.outputs.reportsList.0", + state: &executionState{ + steps: map[string]*stepState{ + "evm_median": { + outputs: &stepOutput{ + value: val, + }, + }, + }, + }, + expected: "listElement", + }, + { + name: "digging into an array that's too small", + key: "evm_median.outputs.reportsList.2", + state: &executionState{ + steps: map[string]*stepState{ + "evm_median": { + outputs: &stepOutput{ + value: val, + }, + }, + }, + }, + errMsg: "cannot fetch index 2", + }, + { + name: "digging into an array with a string key", + key: "evm_median.outputs.reportsList.notAString", + state: &executionState{ + steps: map[string]*stepState{ + "evm_median": { + outputs: &stepOutput{ + value: val, + }, + }, + }, + }, + errMsg: "could not interpolate ref part `notAString` in `[listElement]`: `notAString` is not convertible to an int", + }, + { + name: "digging into an array with a negative index", + key: "evm_median.outputs.reportsList.-1", + state: &executionState{ + steps: map[string]*stepState{ + "evm_median": { + outputs: &stepOutput{ + value: val, + }, + }, + }, + }, + errMsg: "could not interpolate ref part `-1` in `[listElement]`: index -1 must be a positive number", + }, + { + name: "empty element", + key: "evm_median.outputs..notAString", + state: &executionState{ + steps: map[string]*stepState{ + "evm_median": { + outputs: &stepOutput{ + value: val, + }, + }, + }, + }, + errMsg: "could not find ref part `` in", + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(st *testing.T) { + got, err := interpolateKey(tc.key, tc.state) + if tc.errMsg != "" { + require.ErrorContains(st, err, tc.errMsg) + } else { + require.NoError(t, err) + assert.Equal(t, tc.expected, got) + } + }) + } +} + +func TestInterpolateInputsFromState(t *testing.T) { + testCases := []struct { + name string + inputs map[string]any + state *executionState + expected any + errMsg string + }{ + { + name: "substituting with a variable that exists", + inputs: map[string]any{ + "shouldnotinterpolate": map[string]any{ + "shouldinterpolate": "$(evm_median.outputs)", + }, + }, + state: &executionState{ + steps: map[string]*stepState{ + "evm_median": { + outputs: &stepOutput{ + value: values.NewString(""), + }, + }, + }, + }, + expected: map[string]any{ + "shouldnotinterpolate": map[string]any{ + "shouldinterpolate": "", + }, + }, + }, + { + name: "no substitution required", + inputs: map[string]any{ + "foo": "bar", + }, + state: &executionState{ + steps: map[string]*stepState{ + "evm_median": { + outputs: &stepOutput{ + value: values.NewString(""), + }, + }, + }, + }, + expected: map[string]any{ + "foo": "bar", + }, + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(st *testing.T) { + got, err := findAndInterpolateAllKeys(tc.inputs, tc.state) + if tc.errMsg != "" { + require.ErrorContains(st, err, tc.errMsg) + } else { + require.NoError(t, err) + assert.Equal(t, tc.expected, got) + } + }) + } +} diff --git a/core/services/workflows/workflow.go b/core/services/workflows/workflow.go new file mode 100644 index 00000000000..bf8394af610 --- /dev/null +++ b/core/services/workflows/workflow.go @@ -0,0 +1,23 @@ +package workflows + +import "gopkg.in/yaml.v3" + +type Capability struct { + Type string `yaml:"type"` + Ref string `yaml:"ref"` + Inputs map[string]any `yaml:"inputs"` + Config map[string]any `yaml:"config"` +} + +type Workflow struct { + Triggers []Capability `yaml:"triggers"` + Actions []Capability `yaml:"actions"` + Consensus []Capability `yaml:"consensus"` + Targets []Capability `yaml:"targets"` +} + +func Parse(yamlWorkflow string) (*Workflow, error) { + wf := &Workflow{} + err := yaml.Unmarshal([]byte(yamlWorkflow), wf) + return wf, err +} diff --git a/core/store/migrate/migrate_test.go b/core/store/migrate/migrate_test.go index 56d1fe41eb5..286e1b3a295 100644 --- a/core/store/migrate/migrate_test.go +++ b/core/store/migrate/migrate_test.go @@ -445,21 +445,22 @@ func TestSetMigrationENVVars(t *testing.T) { func TestDatabaseBackFillWithMigration202(t *testing.T) { _, db := heavyweight.FullTestDBEmptyV2(t, nil) + ctx := testutils.Context(t) err := goose.UpTo(db.DB, migrationDir, 201) require.NoError(t, err) - simulatedOrm := logpoller.NewORM(testutils.SimulatedChainID, db, logger.TestLogger(t), pgtest.NewQConfig(true)) - require.NoError(t, simulatedOrm.InsertBlock(testutils.Random32Byte(), 10, time.Now(), 0), err) - require.NoError(t, simulatedOrm.InsertBlock(testutils.Random32Byte(), 51, time.Now(), 0), err) - require.NoError(t, simulatedOrm.InsertBlock(testutils.Random32Byte(), 90, time.Now(), 0), err) - require.NoError(t, simulatedOrm.InsertBlock(testutils.Random32Byte(), 120, time.Now(), 23), err) + simulatedOrm := logpoller.NewORM(testutils.SimulatedChainID, db, logger.TestLogger(t)) + require.NoError(t, simulatedOrm.InsertBlock(ctx, testutils.Random32Byte(), 10, time.Now(), 0), err) + require.NoError(t, simulatedOrm.InsertBlock(ctx, testutils.Random32Byte(), 51, time.Now(), 0), err) + require.NoError(t, simulatedOrm.InsertBlock(ctx, testutils.Random32Byte(), 90, time.Now(), 0), err) + require.NoError(t, simulatedOrm.InsertBlock(ctx, testutils.Random32Byte(), 120, time.Now(), 23), err) - baseOrm := logpoller.NewORM(big.NewInt(int64(84531)), db, logger.TestLogger(t), pgtest.NewQConfig(true)) - require.NoError(t, baseOrm.InsertBlock(testutils.Random32Byte(), 400, time.Now(), 0), err) + baseOrm := logpoller.NewORM(big.NewInt(int64(84531)), db, logger.TestLogger(t)) + require.NoError(t, baseOrm.InsertBlock(ctx, testutils.Random32Byte(), 400, time.Now(), 0), err) - klaytnOrm := logpoller.NewORM(big.NewInt(int64(1001)), db, logger.TestLogger(t), pgtest.NewQConfig(true)) - require.NoError(t, klaytnOrm.InsertBlock(testutils.Random32Byte(), 100, time.Now(), 0), err) + klaytnOrm := logpoller.NewORM(big.NewInt(int64(1001)), db, logger.TestLogger(t)) + require.NoError(t, klaytnOrm.InsertBlock(ctx, testutils.Random32Byte(), 100, time.Now(), 0), err) err = goose.UpTo(db.DB, migrationDir, 202) require.NoError(t, err) @@ -468,7 +469,7 @@ func TestDatabaseBackFillWithMigration202(t *testing.T) { name string blockNumber int64 expectedFinalizedBlock int64 - orm *logpoller.DbORM + orm logpoller.ORM }{ { name: "last finalized block not changed if finality is too deep", @@ -509,7 +510,7 @@ func TestDatabaseBackFillWithMigration202(t *testing.T) { } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - block, err := tt.orm.SelectBlockByNumber(tt.blockNumber) + block, err := tt.orm.SelectBlockByNumber(ctx, tt.blockNumber) require.NoError(t, err) require.Equal(t, tt.expectedFinalizedBlock, block.FinalizedBlockNumber) }) diff --git a/core/store/migrate/migrations/0227_kv_store_table.sql b/core/store/migrate/migrations/0227_kv_store_table.sql new file mode 100644 index 00000000000..403e157af44 --- /dev/null +++ b/core/store/migrate/migrations/0227_kv_store_table.sql @@ -0,0 +1,13 @@ +-- +goose Up + +CREATE TABLE job_kv_store ( + job_id INTEGER NOT NULL REFERENCES jobs(id), + key TEXT NOT NULL, + val JSONB NOT NULL, + created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(), + updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW(), + PRIMARY KEY (job_id, key) +); + +-- +goose Down +DROP TABLE job_kv_store; diff --git a/core/store/migrate/migrations/0228_add_server_url_to_transmit_requests.sql b/core/store/migrate/migrations/0228_add_server_url_to_transmit_requests.sql new file mode 100644 index 00000000000..32608b47163 --- /dev/null +++ b/core/store/migrate/migrations/0228_add_server_url_to_transmit_requests.sql @@ -0,0 +1,9 @@ +-- +goose Up +ALTER TABLE mercury_transmit_requests DROP CONSTRAINT mercury_transmit_requests_pkey; +DELETE FROM mercury_transmit_requests; +ALTER TABLE mercury_transmit_requests ADD COLUMN server_url TEXT NOT NULL; +ALTER TABLE mercury_transmit_requests ADD PRIMARY KEY (server_url, payload_hash); + +-- +goose Down +ALTER TABLE mercury_transmit_requests DROP COLUMN server_url; +ALTER TABLE mercury_transmit_requests ADD PRIMARY KEY (payload_hash); diff --git a/core/web/eth_keys_controller_test.go b/core/web/eth_keys_controller_test.go index 545abefcd3e..94d92849887 100644 --- a/core/web/eth_keys_controller_test.go +++ b/core/web/eth_keys_controller_test.go @@ -409,7 +409,7 @@ func TestETHKeysController_ChainSuccess_ResetWithAbandon(t *testing.T) { FromAddress: addr, ToAddress: testutils.NewAddress(), EncodedPayload: []byte{1, 2, 3}, - FeeLimit: uint32(1000), + FeeLimit: uint64(1000), Meta: nil, Strategy: strategy, }) diff --git a/core/web/evm_chains_controller_test.go b/core/web/evm_chains_controller_test.go index ea3d5476cec..5d31374cfb7 100644 --- a/core/web/evm_chains_controller_test.go +++ b/core/web/evm_chains_controller_test.go @@ -12,12 +12,12 @@ import ( "github.com/stretchr/testify/require" evmcfg "github.com/smartcontractkit/chainlink/v2/core/chains/evm/config/toml" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" 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/services/chainlink" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ethkey" "github.com/smartcontractkit/chainlink/v2/core/web" "github.com/smartcontractkit/chainlink/v2/core/web/presenters" ) @@ -48,7 +48,7 @@ func Test_EVMChainsController_Show(t *testing.T) { }, RPCBlockQueryDelay: ptr[uint16](23), MinIncomingConfirmations: ptr[uint32](12), - LinkContractAddress: ptr(ethkey.EIP55AddressFromAddress(testutils.NewAddress())), + LinkContractAddress: ptr(types.EIP55AddressFromAddress(testutils.NewAddress())), }), }, wantStatusCode: http.StatusOK, diff --git a/core/web/evm_forwarders_controller.go b/core/web/evm_forwarders_controller.go index 56d1285c88e..8fa6b56de7a 100644 --- a/core/web/evm_forwarders_controller.go +++ b/core/web/evm_forwarders_controller.go @@ -6,12 +6,13 @@ import ( "github.com/ethereum/go-ethereum/common" + "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/forwarders" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/logpoller" ubig "github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils/big" "github.com/smartcontractkit/chainlink/v2/core/logger/audit" "github.com/smartcontractkit/chainlink/v2/core/services/chainlink" - "github.com/smartcontractkit/chainlink/v2/core/services/pg" "github.com/smartcontractkit/chainlink/v2/core/utils/stringutils" "github.com/smartcontractkit/chainlink/v2/core/web/presenters" @@ -25,8 +26,8 @@ type EVMForwardersController struct { // Index lists EVM forwarders. func (cc *EVMForwardersController) Index(c *gin.Context, size, page, offset int) { - orm := forwarders.NewORM(cc.App.GetSqlxDB(), cc.App.GetLogger(), cc.App.GetConfig().Database()) - fwds, count, err := orm.FindForwarders(0, size) + orm := forwarders.NewORM(cc.App.GetDB()) + fwds, count, err := orm.FindForwarders(c.Request.Context(), 0, size) if err != nil { jsonAPIError(c, http.StatusBadRequest, err) @@ -55,8 +56,8 @@ func (cc *EVMForwardersController) Track(c *gin.Context) { jsonAPIError(c, http.StatusUnprocessableEntity, err) return } - orm := forwarders.NewORM(cc.App.GetSqlxDB(), cc.App.GetLogger(), cc.App.GetConfig().Database()) - fwd, err := orm.CreateForwarder(request.Address, *request.EVMChainID) + orm := forwarders.NewORM(cc.App.GetDB()) + fwd, err := orm.CreateForwarder(c.Request.Context(), request.Address, *request.EVMChainID) if err != nil { jsonAPIError(c, http.StatusBadRequest, err) @@ -79,7 +80,7 @@ func (cc *EVMForwardersController) Delete(c *gin.Context) { return } - filterCleanup := func(tx pg.Queryer, evmChainID int64, addr common.Address) error { + filterCleanup := func(tx sqlutil.DataSource, evmChainID int64, addr common.Address) error { chain, err2 := cc.App.GetRelayers().LegacyEVMChains().Get(big.NewInt(evmChainID).String()) if err2 != nil { // If the chain id doesn't even exist, or logpoller is disabled, then there isn't any filter to clean up. Returning an error @@ -91,11 +92,11 @@ func (cc *EVMForwardersController) Delete(c *gin.Context) { // handle same as non-existent chain id return nil } - return chain.LogPoller().UnregisterFilter(forwarders.FilterName(addr), pg.WithQueryer(tx)) + return chain.LogPoller().UnregisterFilter(c.Request.Context(), forwarders.FilterName(addr)) } - orm := forwarders.NewORM(cc.App.GetSqlxDB(), cc.App.GetLogger(), cc.App.GetConfig().Database()) - err = orm.DeleteForwarder(id, filterCleanup) + orm := forwarders.NewORM(cc.App.GetDB()) + err = orm.DeleteForwarder(c.Request.Context(), id, filterCleanup) if err != nil { jsonAPIError(c, http.StatusInternalServerError, err) diff --git a/core/web/evm_transfer_controller.go b/core/web/evm_transfer_controller.go index 4a1bf46feea..26f199ed961 100644 --- a/core/web/evm_transfer_controller.go +++ b/core/web/evm_transfer_controller.go @@ -113,7 +113,7 @@ func ValidateEthBalanceForTransfer(c *gin.Context, chain legacyevm.Chain, fromAd return errors.Errorf("balance is too low for this transaction to be executed: %v", balance) } - gasLimit := chain.Config().EVM().GasEstimator().LimitTransfer() + gasLimit := uint64(chain.Config().EVM().GasEstimator().LimitTransfer()) estimator := chain.GasEstimator() amountWithFees, err := estimator.GetMaxCost(c, amount, nil, gasLimit, chain.Config().EVM().GasEstimator().PriceMaxKey(fromAddr)) diff --git a/core/web/jobs_controller_test.go b/core/web/jobs_controller_test.go index 0dc04ff34e8..1e83d60cb7e 100644 --- a/core/web/jobs_controller_test.go +++ b/core/web/jobs_controller_test.go @@ -28,13 +28,13 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/utils" evmclimocks "github.com/smartcontractkit/chainlink/v2/core/chains/evm/client/mocks" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" "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/services/chainlink" "github.com/smartcontractkit/chainlink/v2/core/services/directrequest" "github.com/smartcontractkit/chainlink/v2/core/services/job" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ethkey" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/p2pkey" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/vrfkey" "github.com/smartcontractkit/chainlink/v2/core/services/pg" @@ -79,7 +79,7 @@ func TestJobsController_Create_ValidationFailure_OffchainReportingSpec(t *testin t.Run(tc.name, func(t *testing.T) { ta, client := setupJobsControllerTests(t) - var address ethkey.EIP55Address + var address types.EIP55Address if tc.taExists { key, _ := cltest.MustInsertRandomKey(t, ta.KeyStore.Eth()) address = key.EIP55Address @@ -191,7 +191,7 @@ func TestJobController_Create_HappyPath(t *testing.T) { assert.Equal(t, jb.OCROracleSpec.ContractConfigConfirmations, resource.OffChainReportingSpec.ContractConfigConfirmations) assert.NotNil(t, resource.PipelineSpec.DotDAGSource) // Sanity check to make sure it inserted correctly - require.Equal(t, ethkey.EIP55Address("0x613a38AC1659769640aaE063C651F48E0250454C"), jb.OCROracleSpec.ContractAddress) + require.Equal(t, types.EIP55Address("0x613a38AC1659769640aaE063C651F48E0250454C"), jb.OCROracleSpec.ContractAddress) }, }, { @@ -221,13 +221,13 @@ func TestJobController_Create_HappyPath(t *testing.T) { require.NoError(t, err) require.NotNil(t, jb.KeeperSpec) - require.Equal(t, ethkey.EIP55Address("0x9E40733cC9df84636505f4e6Db28DCa0dC5D1bba"), jb.KeeperSpec.ContractAddress) - require.Equal(t, ethkey.EIP55Address("0xa8037A20989AFcBC51798de9762b351D63ff462e"), jb.KeeperSpec.FromAddress) + require.Equal(t, types.EIP55Address("0x9E40733cC9df84636505f4e6Db28DCa0dC5D1bba"), jb.KeeperSpec.ContractAddress) + require.Equal(t, types.EIP55Address("0xa8037A20989AFcBC51798de9762b351D63ff462e"), jb.KeeperSpec.FromAddress) assert.Equal(t, nameAndExternalJobID, jb.Name.ValueOrZero()) // Sanity check to make sure it inserted correctly - require.Equal(t, ethkey.EIP55Address("0x9E40733cC9df84636505f4e6Db28DCa0dC5D1bba"), jb.KeeperSpec.ContractAddress) - require.Equal(t, ethkey.EIP55Address("0xa8037A20989AFcBC51798de9762b351D63ff462e"), jb.KeeperSpec.FromAddress) + require.Equal(t, types.EIP55Address("0x9E40733cC9df84636505f4e6Db28DCa0dC5D1bba"), jb.KeeperSpec.ContractAddress) + require.Equal(t, types.EIP55Address("0xa8037A20989AFcBC51798de9762b351D63ff462e"), jb.KeeperSpec.FromAddress) }, }, { @@ -286,7 +286,7 @@ func TestJobController_Create_HappyPath(t *testing.T) { assert.Equal(t, nameAndExternalJobID, jb.Name.ValueOrZero()) assert.NotNil(t, resource.PipelineSpec.DotDAGSource) // Sanity check to make sure it inserted correctly - require.Equal(t, ethkey.EIP55Address("0x613a38AC1659769640aaE063C651F48E0250454C"), jb.DirectRequestSpec.ContractAddress) + require.Equal(t, types.EIP55Address("0x613a38AC1659769640aaE063C651F48E0250454C"), jb.DirectRequestSpec.ContractAddress) require.Equal(t, jb.ExternalJobID.String(), nameAndExternalJobID) }, }, @@ -336,7 +336,7 @@ func TestJobController_Create_HappyPath(t *testing.T) { assert.Equal(t, nameAndExternalJobID, jb.Name.ValueOrZero()) assert.NotNil(t, jb.PipelineSpec.DotDagSource) - assert.Equal(t, ethkey.EIP55Address("0x3cCad4715152693fE3BC4460591e3D3Fbd071b42"), jb.FluxMonitorSpec.ContractAddress) + assert.Equal(t, types.EIP55Address("0x3cCad4715152693fE3BC4460591e3D3Fbd071b42"), jb.FluxMonitorSpec.ContractAddress) assert.Equal(t, time.Second, jb.FluxMonitorSpec.IdleTimerPeriod) assert.Equal(t, false, jb.FluxMonitorSpec.IdleTimerDisabled) assert.Equal(t, tomlutils.Float32(0.5), jb.FluxMonitorSpec.Threshold) diff --git a/core/web/pipeline_runs_controller.go b/core/web/pipeline_runs_controller.go index a1c8da6f748..3892da749ea 100644 --- a/core/web/pipeline_runs_controller.go +++ b/core/web/pipeline_runs_controller.go @@ -105,7 +105,7 @@ func (prc *PipelineRunsController) Create(c *gin.Context) { user, isUser := auth.GetAuthenticatedUser(c) ei, _ := auth.GetAuthenticatedExternalInitiator(c) - authorizer := webhook.NewAuthorizer(prc.App.GetSqlxDB().DB, user, ei) + authorizer := webhook.NewAuthorizer(prc.App.GetDB(), user, ei) // Is it a UUID? Then process it as a webhook job jobUUID, err := uuid.Parse(idStr) diff --git a/core/web/presenters/eth_key_test.go b/core/web/presenters/eth_key_test.go index 46402141a4c..9ba7c432e6a 100644 --- a/core/web/presenters/eth_key_test.go +++ b/core/web/presenters/eth_key_test.go @@ -7,6 +7,7 @@ import ( commonassets "github.com/smartcontractkit/chainlink-common/pkg/assets" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/assets" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils/big" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ethkey" @@ -22,7 +23,7 @@ func TestETHKeyResource(t *testing.T) { addressStr = "0x2aCFF2ec69aa9945Ed84f4F281eCCF6911A3B0eD" address = common.HexToAddress(addressStr) ) - eip55address, err := ethkey.NewEIP55Address(addressStr) + eip55address, err := types.NewEIP55Address(addressStr) require.NoError(t, err) key := ethkey.KeyV2{ Address: address, diff --git a/core/web/presenters/eth_tx.go b/core/web/presenters/eth_tx.go index 65df01ef095..e1ba3664a8f 100644 --- a/core/web/presenters/eth_tx.go +++ b/core/web/presenters/eth_tx.go @@ -43,7 +43,7 @@ func NewEthTxResource(tx txmgr.Tx) EthTxResource { r := EthTxResource{ Data: hexutil.Bytes(tx.EncodedPayload), From: &tx.FromAddress, - GasLimit: strconv.FormatUint(uint64(tx.FeeLimit), 10), + GasLimit: strconv.FormatUint(tx.FeeLimit, 10), State: string(tx.State), To: &tx.ToAddress, Value: v.String(), diff --git a/core/web/presenters/eth_tx_test.go b/core/web/presenters/eth_tx_test.go index 193fa774ce9..3bcdab5edfb 100644 --- a/core/web/presenters/eth_tx_test.go +++ b/core/web/presenters/eth_tx_test.go @@ -26,7 +26,7 @@ func TestEthTxResource(t *testing.T) { EncodedPayload: []byte(`{"data": "is wilding out"}`), FromAddress: common.HexToAddress("0x1"), ToAddress: common.HexToAddress("0x2"), - FeeLimit: uint32(5000), + FeeLimit: uint64(5000), ChainID: chainID, State: txmgrcommon.TxConfirmed, Value: big.Int(assets.NewEthValue(1)), diff --git a/core/web/presenters/job.go b/core/web/presenters/job.go index 5c537d19b3e..3e3d0335afb 100644 --- a/core/web/presenters/job.go +++ b/core/web/presenters/job.go @@ -10,10 +10,10 @@ import ( commonassets "github.com/smartcontractkit/chainlink-common/pkg/assets" commonconfig "github.com/smartcontractkit/chainlink-common/pkg/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/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/keystore/keys/ethkey" "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" @@ -43,7 +43,7 @@ const ( // DirectRequestSpec defines the spec details of a DirectRequest Job type DirectRequestSpec struct { - ContractAddress ethkey.EIP55Address `json:"contractAddress"` + ContractAddress types.EIP55Address `json:"contractAddress"` MinIncomingConfirmations clnull.Uint32 `json:"minIncomingConfirmations"` MinContractPayment *commonassets.Link `json:"minContractPaymentLinkJuels"` Requesters models.AddressCollection `json:"requesters"` @@ -72,20 +72,20 @@ func NewDirectRequestSpec(spec *job.DirectRequestSpec) *DirectRequestSpec { // FluxMonitorSpec defines the spec details of a FluxMonitor Job type FluxMonitorSpec struct { - ContractAddress ethkey.EIP55Address `json:"contractAddress"` - Threshold float32 `json:"threshold"` - AbsoluteThreshold float32 `json:"absoluteThreshold"` - PollTimerPeriod string `json:"pollTimerPeriod"` - PollTimerDisabled bool `json:"pollTimerDisabled"` - IdleTimerPeriod string `json:"idleTimerPeriod"` - IdleTimerDisabled bool `json:"idleTimerDisabled"` - DrumbeatEnabled bool `json:"drumbeatEnabled"` - DrumbeatSchedule *string `json:"drumbeatSchedule"` - DrumbeatRandomDelay *string `json:"drumbeatRandomDelay"` - MinPayment *commonassets.Link `json:"minPayment"` - CreatedAt time.Time `json:"createdAt"` - UpdatedAt time.Time `json:"updatedAt"` - EVMChainID *big.Big `json:"evmChainID"` + ContractAddress types.EIP55Address `json:"contractAddress"` + Threshold float32 `json:"threshold"` + AbsoluteThreshold float32 `json:"absoluteThreshold"` + PollTimerPeriod string `json:"pollTimerPeriod"` + PollTimerDisabled bool `json:"pollTimerDisabled"` + IdleTimerPeriod string `json:"idleTimerPeriod"` + IdleTimerDisabled bool `json:"idleTimerDisabled"` + DrumbeatEnabled bool `json:"drumbeatEnabled"` + DrumbeatSchedule *string `json:"drumbeatSchedule"` + DrumbeatRandomDelay *string `json:"drumbeatRandomDelay"` + MinPayment *commonassets.Link `json:"minPayment"` + CreatedAt time.Time `json:"createdAt"` + UpdatedAt time.Time `json:"updatedAt"` + EVMChainID *big.Big `json:"evmChainID"` } // NewFluxMonitorSpec initializes a new DirectFluxMonitorSpec from a @@ -120,23 +120,23 @@ func NewFluxMonitorSpec(spec *job.FluxMonitorSpec) *FluxMonitorSpec { // OffChainReportingSpec defines the spec details of a OffChainReporting Job type OffChainReportingSpec struct { - ContractAddress ethkey.EIP55Address `json:"contractAddress"` - P2PV2Bootstrappers pq.StringArray `json:"p2pv2Bootstrappers"` - IsBootstrapPeer bool `json:"isBootstrapPeer"` - EncryptedOCRKeyBundleID *models.Sha256Hash `json:"keyBundleID"` - TransmitterAddress *ethkey.EIP55Address `json:"transmitterAddress"` - ObservationTimeout models.Interval `json:"observationTimeout"` - BlockchainTimeout models.Interval `json:"blockchainTimeout"` - ContractConfigTrackerSubscribeInterval models.Interval `json:"contractConfigTrackerSubscribeInterval"` - ContractConfigTrackerPollInterval models.Interval `json:"contractConfigTrackerPollInterval"` - ContractConfigConfirmations uint16 `json:"contractConfigConfirmations"` - CreatedAt time.Time `json:"createdAt"` - UpdatedAt time.Time `json:"updatedAt"` - EVMChainID *big.Big `json:"evmChainID"` - DatabaseTimeout *models.Interval `json:"databaseTimeout"` - ObservationGracePeriod *models.Interval `json:"observationGracePeriod"` - ContractTransmitterTransmitTimeout *models.Interval `json:"contractTransmitterTransmitTimeout"` - CollectTelemetry bool `json:"collectTelemetry,omitempty"` + ContractAddress types.EIP55Address `json:"contractAddress"` + P2PV2Bootstrappers pq.StringArray `json:"p2pv2Bootstrappers"` + IsBootstrapPeer bool `json:"isBootstrapPeer"` + EncryptedOCRKeyBundleID *models.Sha256Hash `json:"keyBundleID"` + TransmitterAddress *types.EIP55Address `json:"transmitterAddress"` + ObservationTimeout models.Interval `json:"observationTimeout"` + BlockchainTimeout models.Interval `json:"blockchainTimeout"` + ContractConfigTrackerSubscribeInterval models.Interval `json:"contractConfigTrackerSubscribeInterval"` + ContractConfigTrackerPollInterval models.Interval `json:"contractConfigTrackerPollInterval"` + ContractConfigConfirmations uint16 `json:"contractConfigConfirmations"` + CreatedAt time.Time `json:"createdAt"` + UpdatedAt time.Time `json:"updatedAt"` + EVMChainID *big.Big `json:"evmChainID"` + DatabaseTimeout *models.Interval `json:"databaseTimeout"` + ObservationGracePeriod *models.Interval `json:"observationGracePeriod"` + ContractTransmitterTransmitTimeout *models.Interval `json:"contractTransmitterTransmitTimeout"` + CollectTelemetry bool `json:"collectTelemetry,omitempty"` } // NewOffChainReportingSpec initializes a new OffChainReportingSpec from a @@ -217,11 +217,11 @@ func NewPipelineSpec(spec *pipeline.Spec) PipelineSpec { // KeeperSpec defines the spec details of a Keeper Job type KeeperSpec struct { - ContractAddress ethkey.EIP55Address `json:"contractAddress"` - FromAddress ethkey.EIP55Address `json:"fromAddress"` - CreatedAt time.Time `json:"createdAt"` - UpdatedAt time.Time `json:"updatedAt"` - EVMChainID *big.Big `json:"evmChainID"` + ContractAddress types.EIP55Address `json:"contractAddress"` + FromAddress types.EIP55Address `json:"fromAddress"` + CreatedAt time.Time `json:"createdAt"` + UpdatedAt time.Time `json:"updatedAt"` + EVMChainID *big.Big `json:"evmChainID"` } // NewKeeperSpec generates a new KeeperSpec from a job.KeeperSpec @@ -266,13 +266,13 @@ func NewCronSpec(spec *job.CronSpec) *CronSpec { } type VRFSpec struct { - BatchCoordinatorAddress *ethkey.EIP55Address `json:"batchCoordinatorAddress"` + BatchCoordinatorAddress *types.EIP55Address `json:"batchCoordinatorAddress"` BatchFulfillmentEnabled bool `json:"batchFulfillmentEnabled"` CustomRevertsPipelineEnabled *bool `json:"customRevertsPipelineEnabled,omitempty"` BatchFulfillmentGasMultiplier float64 `json:"batchFulfillmentGasMultiplier"` - CoordinatorAddress ethkey.EIP55Address `json:"coordinatorAddress"` + CoordinatorAddress types.EIP55Address `json:"coordinatorAddress"` PublicKey secp256k1.PublicKey `json:"publicKey"` - FromAddresses []ethkey.EIP55Address `json:"fromAddresses"` + FromAddresses []types.EIP55Address `json:"fromAddresses"` PollPeriod commonconfig.Duration `json:"pollPeriod"` MinIncomingConfirmations uint32 `json:"confirmations"` CreatedAt time.Time `json:"createdAt"` @@ -284,7 +284,7 @@ type VRFSpec struct { BackoffMaxDelay commonconfig.Duration `json:"backoffMaxDelay"` GasLanePrice *assets.Wei `json:"gasLanePrice"` RequestedConfsDelay int64 `json:"requestedConfsDelay"` - VRFOwnerAddress *ethkey.EIP55Address `json:"vrfOwnerAddress,omitempty"` + VRFOwnerAddress *types.EIP55Address `json:"vrfOwnerAddress,omitempty"` } func NewVRFSpec(spec *job.VRFSpec) *VRFSpec { @@ -313,21 +313,21 @@ func NewVRFSpec(spec *job.VRFSpec) *VRFSpec { // BlockhashStoreSpec defines the job parameters for a blockhash store feeder job. type BlockhashStoreSpec struct { - CoordinatorV1Address *ethkey.EIP55Address `json:"coordinatorV1Address"` - CoordinatorV2Address *ethkey.EIP55Address `json:"coordinatorV2Address"` - CoordinatorV2PlusAddress *ethkey.EIP55Address `json:"coordinatorV2PlusAddress"` - WaitBlocks int32 `json:"waitBlocks"` - LookbackBlocks int32 `json:"lookbackBlocks"` - HeartbeatPeriod time.Duration `json:"heartbeatPeriod"` - BlockhashStoreAddress ethkey.EIP55Address `json:"blockhashStoreAddress"` - TrustedBlockhashStoreAddress *ethkey.EIP55Address `json:"trustedBlockhashStoreAddress"` - TrustedBlockhashStoreBatchSize int32 `json:"trustedBlockhashStoreBatchSize"` - PollPeriod time.Duration `json:"pollPeriod"` - RunTimeout time.Duration `json:"runTimeout"` - EVMChainID *big.Big `json:"evmChainID"` - FromAddresses []ethkey.EIP55Address `json:"fromAddresses"` - CreatedAt time.Time `json:"createdAt"` - UpdatedAt time.Time `json:"updatedAt"` + CoordinatorV1Address *types.EIP55Address `json:"coordinatorV1Address"` + CoordinatorV2Address *types.EIP55Address `json:"coordinatorV2Address"` + CoordinatorV2PlusAddress *types.EIP55Address `json:"coordinatorV2PlusAddress"` + WaitBlocks int32 `json:"waitBlocks"` + LookbackBlocks int32 `json:"lookbackBlocks"` + HeartbeatPeriod time.Duration `json:"heartbeatPeriod"` + BlockhashStoreAddress types.EIP55Address `json:"blockhashStoreAddress"` + TrustedBlockhashStoreAddress *types.EIP55Address `json:"trustedBlockhashStoreAddress"` + TrustedBlockhashStoreBatchSize int32 `json:"trustedBlockhashStoreBatchSize"` + PollPeriod time.Duration `json:"pollPeriod"` + RunTimeout time.Duration `json:"runTimeout"` + EVMChainID *big.Big `json:"evmChainID"` + FromAddresses []types.EIP55Address `json:"fromAddresses"` + CreatedAt time.Time `json:"createdAt"` + UpdatedAt time.Time `json:"updatedAt"` } // NewBlockhashStoreSpec creates a new BlockhashStoreSpec for the given parameters. @@ -351,19 +351,19 @@ func NewBlockhashStoreSpec(spec *job.BlockhashStoreSpec) *BlockhashStoreSpec { // BlockHeaderFeederSpec defines the job parameters for a blcok header feeder job. type BlockHeaderFeederSpec struct { - CoordinatorV1Address *ethkey.EIP55Address `json:"coordinatorV1Address"` - CoordinatorV2Address *ethkey.EIP55Address `json:"coordinatorV2Address"` - CoordinatorV2PlusAddress *ethkey.EIP55Address `json:"coordinatorV2PlusAddress"` - WaitBlocks int32 `json:"waitBlocks"` - LookbackBlocks int32 `json:"lookbackBlocks"` - BlockhashStoreAddress ethkey.EIP55Address `json:"blockhashStoreAddress"` - BatchBlockhashStoreAddress ethkey.EIP55Address `json:"batchBlockhashStoreAddress"` - PollPeriod time.Duration `json:"pollPeriod"` - RunTimeout time.Duration `json:"runTimeout"` - EVMChainID *big.Big `json:"evmChainID"` - FromAddresses []ethkey.EIP55Address `json:"fromAddresses"` - GetBlockhashesBatchSize uint16 `json:"getBlockhashesBatchSize"` - StoreBlockhashesBatchSize uint16 `json:"storeBlockhashesBatchSize"` + CoordinatorV1Address *types.EIP55Address `json:"coordinatorV1Address"` + CoordinatorV2Address *types.EIP55Address `json:"coordinatorV2Address"` + CoordinatorV2PlusAddress *types.EIP55Address `json:"coordinatorV2PlusAddress"` + WaitBlocks int32 `json:"waitBlocks"` + LookbackBlocks int32 `json:"lookbackBlocks"` + BlockhashStoreAddress types.EIP55Address `json:"blockhashStoreAddress"` + BatchBlockhashStoreAddress types.EIP55Address `json:"batchBlockhashStoreAddress"` + PollPeriod time.Duration `json:"pollPeriod"` + RunTimeout time.Duration `json:"runTimeout"` + EVMChainID *big.Big `json:"evmChainID"` + FromAddresses []types.EIP55Address `json:"fromAddresses"` + GetBlockhashesBatchSize uint16 `json:"getBlockhashesBatchSize"` + StoreBlockhashesBatchSize uint16 `json:"storeBlockhashesBatchSize"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` diff --git a/core/web/presenters/job_test.go b/core/web/presenters/job_test.go index b782452948b..963e5790110 100644 --- a/core/web/presenters/job_test.go +++ b/core/web/presenters/job_test.go @@ -15,10 +15,10 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/assets" evmassets "github.com/smartcontractkit/chainlink/v2/core/chains/evm/assets" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" "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/keystore/keys/ethkey" "github.com/smartcontractkit/chainlink/v2/core/services/pipeline" "github.com/smartcontractkit/chainlink/v2/core/services/signatures/secp256k1" "github.com/smartcontractkit/chainlink/v2/core/store/models" @@ -28,34 +28,34 @@ import ( func TestJob(t *testing.T) { // Used in multiple tests timestamp := time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC) - contractAddress, err := ethkey.NewEIP55Address("0x9E40733cC9df84636505f4e6Db28DCa0dC5D1bba") + contractAddress, err := types.NewEIP55Address("0x9E40733cC9df84636505f4e6Db28DCa0dC5D1bba") require.NoError(t, err) cronSchedule := "0 0 0 1 1 *" evmChainID := big.NewI(42) - fromAddress, err := ethkey.NewEIP55Address("0xa8037A20989AFcBC51798de9762b351D63ff462e") + fromAddress, err := types.NewEIP55Address("0xa8037A20989AFcBC51798de9762b351D63ff462e") require.NoError(t, err) // Used in OCR tests var ocrKeyBundleID = "f5bf259689b26f1374efb3c9a9868796953a0f814bb2d39b968d0e61b58620a5" ocrKeyID := models.MustSha256HashFromHex(ocrKeyBundleID) - transmitterAddress, err := ethkey.NewEIP55Address("0x27548a32b9aD5D64c5945EaE9Da5337bc3169D15") + transmitterAddress, err := types.NewEIP55Address("0x27548a32b9aD5D64c5945EaE9Da5337bc3169D15") require.NoError(t, err) // Used in blockhashstore test - v1CoordAddress, err := ethkey.NewEIP55Address("0x16988483b46e695f6c8D58e6e1461DC703e008e1") + v1CoordAddress, err := types.NewEIP55Address("0x16988483b46e695f6c8D58e6e1461DC703e008e1") require.NoError(t, err) - v2CoordAddress, err := ethkey.NewEIP55Address("0x2C409DD6D4eBDdA190B5174Cc19616DD13884262") + v2CoordAddress, err := types.NewEIP55Address("0x2C409DD6D4eBDdA190B5174Cc19616DD13884262") require.NoError(t, err) - v2PlusCoordAddress, err := ethkey.NewEIP55Address("0x92B5e28Ac583812874e4271380c7d070C5FB6E6b") + v2PlusCoordAddress, err := types.NewEIP55Address("0x92B5e28Ac583812874e4271380c7d070C5FB6E6b") require.NoError(t, err) // Used in blockheaderfeeder test - batchBHSAddress, err := ethkey.NewEIP55Address("0xF6bB415b033D19EFf24A872a4785c6e1C4426103") + batchBHSAddress, err := types.NewEIP55Address("0xF6bB415b033D19EFf24A872a4785c6e1C4426103") require.NoError(t, err) - trustedBlockhashStoreAddress, err := ethkey.NewEIP55Address("0x0ad9FE7a58216242a8475ca92F222b0640E26B63") + trustedBlockhashStoreAddress, err := types.NewEIP55Address("0x0ad9FE7a58216242a8475ca92F222b0640E26B63") require.NoError(t, err) trustedBlockhashStoreBatchSize := int32(20) @@ -489,7 +489,7 @@ func TestJob(t *testing.T) { CreatedAt: timestamp, UpdatedAt: timestamp, EVMChainID: evmChainID, - FromAddresses: []ethkey.EIP55Address{fromAddress}, + FromAddresses: []types.EIP55Address{fromAddress}, PublicKey: vrfPubKey, RequestedConfsDelay: 10, ChunkSize: 25, @@ -572,7 +572,7 @@ func TestJob(t *testing.T) { PollPeriod: 25 * time.Second, RunTimeout: 10 * time.Second, EVMChainID: big.NewI(4), - FromAddresses: []ethkey.EIP55Address{fromAddress}, + FromAddresses: []types.EIP55Address{fromAddress}, TrustedBlockhashStoreAddress: &trustedBlockhashStoreAddress, TrustedBlockhashStoreBatchSize: trustedBlockhashStoreBatchSize, }, @@ -652,7 +652,7 @@ func TestJob(t *testing.T) { PollPeriod: 25 * time.Second, RunTimeout: 10 * time.Second, EVMChainID: big.NewI(4), - FromAddresses: []ethkey.EIP55Address{fromAddress}, + FromAddresses: []types.EIP55Address{fromAddress}, GetBlockhashesBatchSize: 5, StoreBlockhashesBatchSize: 10, }, diff --git a/core/web/resolver/eth_key.go b/core/web/resolver/eth_key.go index a9c060ef0c1..d986374ec21 100644 --- a/core/web/resolver/eth_key.go +++ b/core/web/resolver/eth_key.go @@ -6,6 +6,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/graph-gophers/graphql-go" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" "github.com/smartcontractkit/chainlink/v2/core/chains/legacyevm" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ethkey" "github.com/smartcontractkit/chainlink/v2/core/web/loader" @@ -13,7 +14,7 @@ import ( type ETHKey struct { state ethkey.State - addr ethkey.EIP55Address + addr types.EIP55Address chain legacyevm.Chain } diff --git a/core/web/resolver/eth_key_test.go b/core/web/resolver/eth_key_test.go index 7d1e3ff5025..40a60263f06 100644 --- a/core/web/resolver/eth_key_test.go +++ b/core/web/resolver/eth_key_test.go @@ -16,6 +16,7 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/chains/evm/config" mocks2 "github.com/smartcontractkit/chainlink/v2/core/chains/evm/config/mocks" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/config/toml" + evmtypes "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils/big" "github.com/smartcontractkit/chainlink/v2/core/chains/legacyevm" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/configtest" @@ -60,11 +61,11 @@ func TestResolver_ETHKeys(t *testing.T) { keys := []ethkey.KeyV2{ { Address: address, - EIP55Address: ethkey.EIP55AddressFromAddress(address), + EIP55Address: evmtypes.EIP55AddressFromAddress(address), }, { Address: secondAddress, - EIP55Address: ethkey.EIP55AddressFromAddress(secondAddress), + EIP55Address: evmtypes.EIP55AddressFromAddress(secondAddress), }, } gError := errors.New("error") @@ -82,7 +83,7 @@ func TestResolver_ETHKeys(t *testing.T) { before: func(f *gqlTestFramework) { states := []ethkey.State{ { - Address: ethkey.MustEIP55Address(address.Hex()), + Address: evmtypes.MustEIP55Address(address.Hex()), EVMChainID: *big.NewI(12), Disabled: false, CreatedAt: f.Timestamp(), @@ -149,7 +150,7 @@ func TestResolver_ETHKeys(t *testing.T) { before: func(f *gqlTestFramework) { states := []ethkey.State{ { - Address: ethkey.MustEIP55Address(address.Hex()), + Address: evmtypes.MustEIP55Address(address.Hex()), EVMChainID: *big.NewI(12), Disabled: false, CreatedAt: f.Timestamp(), @@ -243,7 +244,7 @@ func TestResolver_ETHKeys(t *testing.T) { before: func(f *gqlTestFramework) { states := []ethkey.State{ { - Address: ethkey.MustEIP55Address(address.Hex()), + Address: evmtypes.MustEIP55Address(address.Hex()), EVMChainID: *big.NewI(12), Disabled: false, CreatedAt: f.Timestamp(), @@ -275,7 +276,7 @@ func TestResolver_ETHKeys(t *testing.T) { before: func(f *gqlTestFramework) { states := []ethkey.State{ { - Address: ethkey.MustEIP55Address(address.Hex()), + Address: evmtypes.MustEIP55Address(address.Hex()), EVMChainID: *big.NewI(12), Disabled: false, CreatedAt: f.Timestamp(), @@ -306,7 +307,7 @@ func TestResolver_ETHKeys(t *testing.T) { before: func(f *gqlTestFramework) { states := []ethkey.State{ { - Address: ethkey.MustEIP55Address(address.Hex()), + Address: evmtypes.MustEIP55Address(address.Hex()), EVMChainID: *big.NewI(12), Disabled: false, CreatedAt: f.Timestamp(), @@ -368,7 +369,7 @@ func TestResolver_ETHKeys(t *testing.T) { before: func(f *gqlTestFramework) { states := []ethkey.State{ { - Address: ethkey.EIP55AddressFromAddress(address), + Address: evmtypes.EIP55AddressFromAddress(address), EVMChainID: *big.NewI(12), Disabled: false, CreatedAt: f.Timestamp(), diff --git a/core/web/resolver/feeds_manager_chain_config_test.go b/core/web/resolver/feeds_manager_chain_config_test.go index 24730a01648..ae869b50874 100644 --- a/core/web/resolver/feeds_manager_chain_config_test.go +++ b/core/web/resolver/feeds_manager_chain_config_test.go @@ -60,7 +60,7 @@ func Test_CreateFeedsManagerChainConfig(t *testing.T) { "ocr2IsBootstrap": false, "ocr2P2PPeerID": peerID.String, "ocr2KeyBundleID": keyBundleID.String, - "ocr2Plugins": `{"commit":true,"execute":true,"median":false,"mercury":true}`, + "ocr2Plugins": `{"commit":true,"execute":true,"median":false,"mercury":true,"rebalancer":true}`, "ocr2ForwarderAddress": forwarderAddr, }, } @@ -93,10 +93,11 @@ func Test_CreateFeedsManagerChainConfig(t *testing.T) { KeyBundleID: keyBundleID, ForwarderAddress: null.StringFrom(forwarderAddr), Plugins: feeds.Plugins{ - Commit: true, - Execute: true, - Median: false, - Mercury: true, + Commit: true, + Execute: true, + Median: false, + Mercury: true, + Rebalancer: true, }, }, }).Return(cfgID, nil) @@ -120,10 +121,11 @@ func Test_CreateFeedsManagerChainConfig(t *testing.T) { KeyBundleID: keyBundleID, ForwarderAddress: null.StringFrom(forwarderAddr), Plugins: feeds.Plugins{ - Commit: true, - Execute: true, - Median: false, - Mercury: true, + Commit: true, + Execute: true, + Median: false, + Mercury: true, + Rebalancer: true, }, }, }, nil) @@ -311,7 +313,7 @@ func Test_UpdateFeedsManagerChainConfig(t *testing.T) { "ocr2IsBootstrap": false, "ocr2P2PPeerID": peerID.String, "ocr2KeyBundleID": keyBundleID.String, - "ocr2Plugins": `{"commit":true,"execute":true,"median":false,"mercury":true}`, + "ocr2Plugins": `{"commit":true,"execute":true,"median":false,"mercury":true,"rebalancer":true}`, "ocr2ForwarderAddress": forwarderAddr, }, } @@ -342,10 +344,11 @@ func Test_UpdateFeedsManagerChainConfig(t *testing.T) { KeyBundleID: keyBundleID, ForwarderAddress: null.StringFrom(forwarderAddr), Plugins: feeds.Plugins{ - Commit: true, - Execute: true, - Median: false, - Mercury: true, + Commit: true, + Execute: true, + Median: false, + Mercury: true, + Rebalancer: true, }, }, }).Return(cfgID, nil) @@ -367,10 +370,11 @@ func Test_UpdateFeedsManagerChainConfig(t *testing.T) { KeyBundleID: keyBundleID, ForwarderAddress: null.StringFrom(forwarderAddr), Plugins: feeds.Plugins{ - Commit: true, - Execute: true, - Median: false, - Mercury: true, + Commit: true, + Execute: true, + Median: false, + Mercury: true, + Rebalancer: true, }, }, }, nil) diff --git a/core/web/resolver/plugins.go b/core/web/resolver/plugins.go index bae9133280a..187bd7977b7 100644 --- a/core/web/resolver/plugins.go +++ b/core/web/resolver/plugins.go @@ -27,3 +27,8 @@ func (r PluginsResolver) Median() bool { func (r PluginsResolver) Mercury() bool { return r.plugins.Mercury } + +// Rebalancer returns the the status of the rebalancer plugin. +func (r PluginsResolver) Rebalancer() bool { + return r.plugins.Rebalancer +} diff --git a/core/web/resolver/spec_test.go b/core/web/resolver/spec_test.go index 828e8538071..2fa8281e3c7 100644 --- a/core/web/resolver/spec_test.go +++ b/core/web/resolver/spec_test.go @@ -13,10 +13,10 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/types" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/assets" + evmtypes "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" 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/keystore/keys/ethkey" "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" @@ -81,7 +81,7 @@ func TestResolver_DirectRequestSpec(t *testing.T) { id = int32(1) requesterAddress = common.HexToAddress("0x3cCad4715152693fE3BC4460591e3D3Fbd071b42") ) - contractAddress, err := ethkey.NewEIP55Address("0x613a38AC1659769640aaE063C651F48E0250454C") + contractAddress, err := evmtypes.NewEIP55Address("0x613a38AC1659769640aaE063C651F48E0250454C") require.NoError(t, err) testCases := []GQLTestCase{ @@ -146,7 +146,7 @@ func TestResolver_FluxMonitorSpec(t *testing.T) { var ( id = int32(1) ) - contractAddress, err := ethkey.NewEIP55Address("0x613a38AC1659769640aaE063C651F48E0250454C") + contractAddress, err := evmtypes.NewEIP55Address("0x613a38AC1659769640aaE063C651F48E0250454C") require.NoError(t, err) testCases := []GQLTestCase{ @@ -296,7 +296,7 @@ func TestResolver_KeeperSpec(t *testing.T) { id = int32(1) fromAddress = common.HexToAddress("0x3cCad4715152693fE3BC4460591e3D3Fbd071b42") ) - contractAddress, err := ethkey.NewEIP55Address("0x613a38AC1659769640aaE063C651F48E0250454C") + contractAddress, err := evmtypes.NewEIP55Address("0x613a38AC1659769640aaE063C651F48E0250454C") require.NoError(t, err) testCases := []GQLTestCase{ @@ -311,7 +311,7 @@ func TestResolver_KeeperSpec(t *testing.T) { ContractAddress: contractAddress, CreatedAt: f.Timestamp(), EVMChainID: ubig.NewI(42), - FromAddress: ethkey.EIP55AddressFromAddress(fromAddress), + FromAddress: evmtypes.EIP55AddressFromAddress(fromAddress), }, }, nil) }, @@ -355,10 +355,10 @@ func TestResolver_OCRSpec(t *testing.T) { var ( id = int32(1) ) - contractAddress, err := ethkey.NewEIP55Address("0x613a38AC1659769640aaE063C651F48E0250454C") + contractAddress, err := evmtypes.NewEIP55Address("0x613a38AC1659769640aaE063C651F48E0250454C") require.NoError(t, err) - transmitterAddress, err := ethkey.NewEIP55Address("0x3cCad4715152693fE3BC4460591e3D3Fbd071b42") + transmitterAddress, err := evmtypes.NewEIP55Address("0x3cCad4715152693fE3BC4460591e3D3Fbd071b42") require.NoError(t, err) keyBundleID := models.MustSha256HashFromHex("f5bf259689b26f1374efb3c9a9868796953a0f814bb2d39b968d0e61b58620a5") @@ -452,10 +452,10 @@ func TestResolver_OCR2Spec(t *testing.T) { var ( id = int32(1) ) - contractAddress, err := ethkey.NewEIP55Address("0x613a38AC1659769640aaE063C651F48E0250454C") + contractAddress, err := evmtypes.NewEIP55Address("0x613a38AC1659769640aaE063C651F48E0250454C") require.NoError(t, err) - transmitterAddress, err := ethkey.NewEIP55Address("0x3cCad4715152693fE3BC4460591e3D3Fbd071b42") + transmitterAddress, err := evmtypes.NewEIP55Address("0x3cCad4715152693fE3BC4460591e3D3Fbd071b42") require.NoError(t, err) keyBundleID := models.MustSha256HashFromHex("f5bf259689b26f1374efb3c9a9868796953a0f814bb2d39b968d0e61b58620a5") @@ -555,16 +555,16 @@ func TestResolver_VRFSpec(t *testing.T) { var ( id = int32(1) ) - coordinatorAddress, err := ethkey.NewEIP55Address("0x613a38AC1659769640aaE063C651F48E0250454C") + coordinatorAddress, err := evmtypes.NewEIP55Address("0x613a38AC1659769640aaE063C651F48E0250454C") require.NoError(t, err) - batchCoordinatorAddress, err := ethkey.NewEIP55Address("0x0ad9FE7a58216242a8475ca92F222b0640E26B63") + batchCoordinatorAddress, err := evmtypes.NewEIP55Address("0x0ad9FE7a58216242a8475ca92F222b0640E26B63") require.NoError(t, err) - fromAddress1, err := ethkey.NewEIP55Address("0x3cCad4715152693fE3BC4460591e3D3Fbd071b42") + fromAddress1, err := evmtypes.NewEIP55Address("0x3cCad4715152693fE3BC4460591e3D3Fbd071b42") require.NoError(t, err) - fromAddress2, err := ethkey.NewEIP55Address("0x2301958F1BFbC9A068C2aC9c6166Bf483b95864C") + fromAddress2, err := evmtypes.NewEIP55Address("0x2301958F1BFbC9A068C2aC9c6166Bf483b95864C") require.NoError(t, err) pubKey, err := secp256k1.NewPublicKeyFromHex("0x9dc09a0f898f3b5e8047204e7ce7e44b587920932f08431e29c9bf6923b8450a01") @@ -586,7 +586,7 @@ func TestResolver_VRFSpec(t *testing.T) { CoordinatorAddress: coordinatorAddress, CreatedAt: f.Timestamp(), EVMChainID: ubig.NewI(42), - FromAddresses: []ethkey.EIP55Address{fromAddress1, fromAddress2}, + FromAddresses: []evmtypes.EIP55Address{fromAddress1, fromAddress2}, PollPeriod: 1 * time.Minute, PublicKey: pubKey, RequestedConfsDelay: 10, @@ -713,25 +713,25 @@ func TestResolver_BlockhashStoreSpec(t *testing.T) { var ( id = int32(1) ) - coordinatorV1Address, err := ethkey.NewEIP55Address("0x613a38AC1659769640aaE063C651F48E0250454C") + coordinatorV1Address, err := evmtypes.NewEIP55Address("0x613a38AC1659769640aaE063C651F48E0250454C") require.NoError(t, err) - coordinatorV2Address, err := ethkey.NewEIP55Address("0x2fcA960AF066cAc46085588a66dA2D614c7Cd337") + coordinatorV2Address, err := evmtypes.NewEIP55Address("0x2fcA960AF066cAc46085588a66dA2D614c7Cd337") require.NoError(t, err) - coordinatorV2PlusAddress, err := ethkey.NewEIP55Address("0x92B5e28Ac583812874e4271380c7d070C5FB6E6b") + coordinatorV2PlusAddress, err := evmtypes.NewEIP55Address("0x92B5e28Ac583812874e4271380c7d070C5FB6E6b") require.NoError(t, err) - fromAddress1, err := ethkey.NewEIP55Address("0x3cCad4715152693fE3BC4460591e3D3Fbd071b42") + fromAddress1, err := evmtypes.NewEIP55Address("0x3cCad4715152693fE3BC4460591e3D3Fbd071b42") require.NoError(t, err) - fromAddress2, err := ethkey.NewEIP55Address("0xD479d7c994D298cA05bF270136ED9627b7E684D3") + fromAddress2, err := evmtypes.NewEIP55Address("0xD479d7c994D298cA05bF270136ED9627b7E684D3") require.NoError(t, err) - blockhashStoreAddress, err := ethkey.NewEIP55Address("0xb26A6829D454336818477B946f03Fb21c9706f3A") + blockhashStoreAddress, err := evmtypes.NewEIP55Address("0xb26A6829D454336818477B946f03Fb21c9706f3A") require.NoError(t, err) - trustedBlockhashStoreAddress, err := ethkey.NewEIP55Address("0x0ad9FE7a58216242a8475ca92F222b0640E26B63") + trustedBlockhashStoreAddress, err := evmtypes.NewEIP55Address("0x0ad9FE7a58216242a8475ca92F222b0640E26B63") require.NoError(t, err) trustedBlockhashStoreBatchSize := int32(20) @@ -749,7 +749,7 @@ func TestResolver_BlockhashStoreSpec(t *testing.T) { CoordinatorV2PlusAddress: &coordinatorV2PlusAddress, CreatedAt: f.Timestamp(), EVMChainID: ubig.NewI(42), - FromAddresses: []ethkey.EIP55Address{fromAddress1, fromAddress2}, + FromAddresses: []evmtypes.EIP55Address{fromAddress1, fromAddress2}, PollPeriod: 1 * time.Minute, RunTimeout: 37 * time.Second, WaitBlocks: 100, @@ -821,22 +821,22 @@ func TestResolver_BlockHeaderFeederSpec(t *testing.T) { var ( id = int32(1) ) - coordinatorV1Address, err := ethkey.NewEIP55Address("0x613a38AC1659769640aaE063C651F48E0250454C") + coordinatorV1Address, err := evmtypes.NewEIP55Address("0x613a38AC1659769640aaE063C651F48E0250454C") require.NoError(t, err) - coordinatorV2Address, err := ethkey.NewEIP55Address("0x2fcA960AF066cAc46085588a66dA2D614c7Cd337") + coordinatorV2Address, err := evmtypes.NewEIP55Address("0x2fcA960AF066cAc46085588a66dA2D614c7Cd337") require.NoError(t, err) - coordinatorV2PlusAddress, err := ethkey.NewEIP55Address("0x92B5e28Ac583812874e4271380c7d070C5FB6E6b") + coordinatorV2PlusAddress, err := evmtypes.NewEIP55Address("0x92B5e28Ac583812874e4271380c7d070C5FB6E6b") require.NoError(t, err) - fromAddress, err := ethkey.NewEIP55Address("0x3cCad4715152693fE3BC4460591e3D3Fbd071b42") + fromAddress, err := evmtypes.NewEIP55Address("0x3cCad4715152693fE3BC4460591e3D3Fbd071b42") require.NoError(t, err) - blockhashStoreAddress, err := ethkey.NewEIP55Address("0xb26A6829D454336818477B946f03Fb21c9706f3A") + blockhashStoreAddress, err := evmtypes.NewEIP55Address("0xb26A6829D454336818477B946f03Fb21c9706f3A") require.NoError(t, err) - batchBHSAddress, err := ethkey.NewEIP55Address("0xd23BAE30019853Caf1D08b4C03291b10AD7743Df") + batchBHSAddress, err := evmtypes.NewEIP55Address("0xd23BAE30019853Caf1D08b4C03291b10AD7743Df") require.NoError(t, err) testCases := []GQLTestCase{ @@ -853,7 +853,7 @@ func TestResolver_BlockHeaderFeederSpec(t *testing.T) { CoordinatorV2PlusAddress: &coordinatorV2PlusAddress, CreatedAt: f.Timestamp(), EVMChainID: ubig.NewI(42), - FromAddresses: []ethkey.EIP55Address{fromAddress}, + FromAddresses: []evmtypes.EIP55Address{fromAddress}, PollPeriod: 1 * time.Minute, RunTimeout: 37 * time.Second, WaitBlocks: 100, diff --git a/core/web/resolver/testdata/config-empty-effective.toml b/core/web/resolver/testdata/config-empty-effective.toml index 148f6b24ff5..ff9a28176bd 100644 --- a/core/web/resolver/testdata/config-empty-effective.toml +++ b/core/web/resolver/testdata/config-empty-effective.toml @@ -116,6 +116,7 @@ MaxSuccessfulRuns = 10000 ReaperInterval = '1h0m0s' ReaperThreshold = '24h0m0s' ResultWriteQueueDepth = 100 +VerboseLogging = false [JobPipeline.HTTPRequest] DefaultTimeout = '15s' @@ -228,3 +229,18 @@ LatestReportDeadline = '5s' [Mercury.TLS] CertFile = '' + +[Capabilities] +[Capabilities.Peering] +IncomingMessageBufferSize = 10 +OutgoingMessageBufferSize = 10 +PeerID = '' +TraceLogging = false + +[Capabilities.Peering.V2] +Enabled = false +AnnounceAddresses = [] +DefaultBootstrappers = [] +DeltaDial = '15s' +DeltaReconcile = '1m0s' +ListenAddresses = [] diff --git a/core/web/resolver/testdata/config-full.toml b/core/web/resolver/testdata/config-full.toml index cdfb85a6f5c..f3b3b63bde6 100644 --- a/core/web/resolver/testdata/config-full.toml +++ b/core/web/resolver/testdata/config-full.toml @@ -122,6 +122,7 @@ MaxSuccessfulRuns = 123456 ReaperInterval = '4h0m0s' ReaperThreshold = '168h0m0s' ResultWriteQueueDepth = 10 +VerboseLogging = true [JobPipeline.HTTPRequest] DefaultTimeout = '1m0s' @@ -239,6 +240,21 @@ LatestReportDeadline = '1m42s' [Mercury.TLS] CertFile = '' +[Capabilities] +[Capabilities.Peering] +IncomingMessageBufferSize = 13 +OutgoingMessageBufferSize = 17 +PeerID = '12D3KooWMoejJznyDuEk5aX6GvbjaG12UzeornPCBNzMRqdwrFJw' +TraceLogging = true + +[Capabilities.Peering.V2] +Enabled = false +AnnounceAddresses = ['a', 'b', 'c'] +DefaultBootstrappers = ['12D3KooWMoejJznyDuEk5aX6GvbjaG12UzeornPCBNzMRqdwrFJw@foo:42/bar:10', '12D3KooWMoejJznyDuEk5aX6GvbjaG12UzeornPCBNzMRqdwrFJw@test:99'] +DeltaDial = '1m0s' +DeltaReconcile = '2s' +ListenAddresses = ['foo', 'bar'] + [[EVM]] ChainID = '1' Enabled = false diff --git a/core/web/resolver/testdata/config-multi-chain-effective.toml b/core/web/resolver/testdata/config-multi-chain-effective.toml index 9f69d4aa909..ef77c141328 100644 --- a/core/web/resolver/testdata/config-multi-chain-effective.toml +++ b/core/web/resolver/testdata/config-multi-chain-effective.toml @@ -116,6 +116,7 @@ MaxSuccessfulRuns = 10000 ReaperInterval = '1h0m0s' ReaperThreshold = '24h0m0s' ResultWriteQueueDepth = 100 +VerboseLogging = false [JobPipeline.HTTPRequest] DefaultTimeout = '30s' @@ -229,6 +230,21 @@ LatestReportDeadline = '5s' [Mercury.TLS] CertFile = '' +[Capabilities] +[Capabilities.Peering] +IncomingMessageBufferSize = 10 +OutgoingMessageBufferSize = 10 +PeerID = '' +TraceLogging = false + +[Capabilities.Peering.V2] +Enabled = false +AnnounceAddresses = [] +DefaultBootstrappers = [] +DeltaDial = '15s' +DeltaReconcile = '1m0s' +ListenAddresses = [] + [[EVM]] ChainID = '1' AutoCreateKey = true diff --git a/core/web/schema/type/feeds_manager.graphql b/core/web/schema/type/feeds_manager.graphql index 0d6d5f61788..a6301c9ef6b 100644 --- a/core/web/schema/type/feeds_manager.graphql +++ b/core/web/schema/type/feeds_manager.graphql @@ -9,6 +9,7 @@ type Plugins { execute: Boolean! median: Boolean! mercury: Boolean! + rebalancer: Boolean! } type FeedsManager { diff --git a/dashboard-lib/README.md b/dashboard-lib/README.md new file mode 100644 index 00000000000..44fd655c72a --- /dev/null +++ b/dashboard-lib/README.md @@ -0,0 +1,24 @@ +# Chainlink Grafana Dashboards Library + +This library offers dashboard components and tools for constructing and testing Grafana dashboards at Chainlink. + +Components structure is as follows: +``` +dashboard + |- lib + |- component_1 + |- component.go + |- component_2 + |- component.go +|- go.mod +|- go.sum +``` + +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) + +## How to convert from JSON using Grabana codegen utility +1. Download Grabana binary [here](https://github.com/K-Phoen/grabana/releases) +2. ./bin/grabana convert-go -i dashboard.json > lib/my_new_component/rows.go +3. Create a [component](k8s-pods/component.go) \ No newline at end of file diff --git a/dashboard-lib/ccip-load-test-view/component.go b/dashboard-lib/ccip-load-test-view/component.go new file mode 100644 index 00000000000..9f58438410e --- /dev/null +++ b/dashboard-lib/ccip-load-test-view/component.go @@ -0,0 +1,497 @@ +package ccip_load_test_view + +import ( + "encoding/json" + "fmt" + "github.com/K-Phoen/grabana/dashboard" + "github.com/K-Phoen/grabana/logs" + "github.com/K-Phoen/grabana/row" + "github.com/K-Phoen/grabana/stat" + "github.com/K-Phoen/grabana/target/loki" + "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/query" + cLoki "github.com/grafana/grafana-foundation-sdk/go/loki" + cXYChart "github.com/grafana/grafana-foundation-sdk/go/xychart" +) + +type Props struct { + LokiDataSource string +} + +func vars(p Props) []dashboard.Option { + return []dashboard.Option{ + dashboard.VariableAsQuery( + "Test Run Name", + query.DataSource(p.LokiDataSource), + query.Multiple(), + query.IncludeAll(), + query.Request("label_values(namespace)"), + ), + dashboard.VariableAsQuery( + "cluster", + query.DataSource(p.LokiDataSource), + query.Multiple(), + query.IncludeAll(), + query.Request("label_values(cluster)"), + ), + dashboard.VariableAsQuery( + "test_group", + query.DataSource(p.LokiDataSource), + query.Multiple(), + query.IncludeAll(), + query.Request("label_values(test_group)"), + ), + dashboard.VariableAsQuery( + "test_id", + query.DataSource(p.LokiDataSource), + query.Multiple(), + query.IncludeAll(), + query.Request("label_values(test_id)"), + ), + dashboard.VariableAsQuery( + "source_chain", + query.DataSource(p.LokiDataSource), + query.Multiple(), + query.IncludeAll(), + query.Request("label_values(source_chain)"), + ), + dashboard.VariableAsQuery( + "dest_chain", + query.DataSource(p.LokiDataSource), + query.Multiple(), + query.IncludeAll(), + query.Request("label_values(dest_chain)"), + ), + dashboard.VariableAsQuery( + "geth_node", + query.DataSource(p.LokiDataSource), + query.Multiple(), + query.IncludeAll(), + query.Request("label_values(geth_node)"), + ), + dashboard.VariableAsQuery( + "remote_runner", + query.DataSource(p.LokiDataSource), + query.Multiple(), + query.IncludeAll(), + query.Request("namespace"), + ), + } +} + +func XYChartSeqNum() map[string]interface{} { + // TODO: https://github.com/grafana/grafana-foundation-sdk/tree/v10.4.x%2Bcog-v0.0.x/go has a lot of useful components + // TODO: need to change upload API and use combined upload in lib/dashboard.go + xAxisName := "seq_num" + builder := cXYChart.NewPanelBuilder(). + Title("XYChart"). + Dims(cXYChart.XYDimensionConfig{ + X: &xAxisName, + }). + WithTarget( + cLoki.NewDataqueryBuilder(). + Expr(`{namespace="${namespace}", go_test_name=~"${go_test_name:pipe}", test_data_type="responses", test_group="${test_group}", test_id=~"${test_id:pipe}",source_chain="${source_chain}",dest_chain="${dest_chain}"} | json | data_Commit_ReportAccepted_duration!= "" | data_Commit_ReportAccepted_success="✅"`). + LegendFormat("Commit Report Accepted"), + ) + sampleDashboard, err := builder.Build() + if err != nil { + panic(err) + } + dashboardJson, err := json.MarshalIndent(sampleDashboard, "", " ") + if err != nil { + panic(err) + } + var data map[string]interface{} + if err := json.Unmarshal(dashboardJson, &data); err != nil { + panic(err) + } + fmt.Println(string(dashboardJson)) + return data +} + +func statsRow(p Props) []dashboard.Option { + return []dashboard.Option{ + dashboard.Row( + "CCIP Duration Stats", + row.Collapse(), + row.WithTimeSeries( + "Sequence numbers", + timeseries.Transparent(), + timeseries.Description("Sequence Numbers triggered by Test"), + timeseries.Span(6), + timeseries.Height("200px"), + timeseries.DataSource(p.LokiDataSource), + timeseries.WithLokiTarget( + `min_over_time({namespace="${namespace}", go_test_name=~"${go_test_name:pipe}", test_data_type="responses", source_chain="${source_chain}", dest_chain="${dest_chain}"} | json | data_CCIPSendRequested_success="✅" | unwrap data_CCIPSendRequested_seq_num [$__range]) by (test_id)`, + loki.Legend("Starts"), + ), + timeseries.WithLokiTarget( + `max_over_time({namespace="${namespace}", go_test_name=~"${go_test_name:pipe}", test_data_type="responses", test_group="${test_group}", test_id=~"${test_id:pipe}", source_chain="${source_chain}", dest_chain="${dest_chain}"} | json | data_CCIPSendRequested_success="✅" | unwrap data_CCIPSendRequested_seq_num [$__range]) by (test_id)`, + loki.Legend("Ends"), + ), + ), + row.WithTimeSeries( + "Source Router Fees ( /1e18)", + timeseries.Transparent(), + timeseries.Description("Router.GetFee"), + timeseries.Span(6), + timeseries.Height("200px"), + timeseries.DataSource(p.LokiDataSource), + timeseries.WithLokiTarget( + `avg_over_time({namespace="${namespace}", go_test_name=~"${go_test_name:pipe}", test_data_type="responses", test_group="${test_group}", test_id=~"${test_id:pipe}",source_chain="${source_chain}",dest_chain="${dest_chain}"} | json | data_CCIP_Send_Transaction_success="✅"| unwrap data_CCIP_Send_Transaction_ccip_send_data_fee [$__range]) by (test_id) /1e18`, + loki.Legend("Avg"), + ), + timeseries.WithLokiTarget( + `min_over_time({namespace="${namespace}", go_test_name=~"${go_test_name:pipe}", test_data_type="responses", test_group="${test_group}", test_id=~"${test_id:pipe}",source_chain="${source_chain}",dest_chain="${dest_chain}"} | json | data_CCIP_Send_Transaction_success="✅"| unwrap data_CCIP_Send_Transaction_ccip_send_data_fee [$__range]) by (test_id) /1e18`, + loki.Legend("Min"), + ), + timeseries.WithLokiTarget( + `max_over_time({namespace="${namespace}", go_test_name=~"${go_test_name:pipe}", test_data_type="responses", test_group="${test_group}", test_id=~"${test_id:pipe}",source_chain="${source_chain}",dest_chain="${dest_chain}"} | json | data_CCIP_Send_Transaction_success="✅"| unwrap data_CCIP_Send_Transaction_ccip_send_data_fee [$__range]) by (test_id) /1e18 `, + loki.Legend("Max"), + ), + ), + row.WithTimeSeries( + "Commit Duration Summary", + timeseries.Transparent(), + timeseries.Description(""), + timeseries.Span(6), + timeseries.Height("200px"), + timeseries.DataSource(p.LokiDataSource), + timeseries.Axis( + axis.Unit("seconds"), + ), + timeseries.WithLokiTarget( + `avg_over_time({namespace="${namespace}", go_test_name=~"${go_test_name:pipe}", test_data_type="responses", test_group="${test_group}", test_id=~"${test_id:pipe}",source_chain="${source_chain}",dest_chain="${dest_chain}"} | json | data_Commit_ReportAccepted_success="✅"| unwrap data_Commit_ReportAccepted_duration [$__range]) by (data_Commit_ReportAccepted_seqNum)`, + loki.Legend("Avg"), + ), + timeseries.WithLokiTarget( + `min_over_time({namespace="${namespace}", go_test_name=~"${go_test_name:pipe}", test_data_type="responses", test_group="${test_group}", test_id=~"${test_id:pipe}",source_chain="${source_chain}",dest_chain="${dest_chain}"} | json | data_Commit_ReportAccepted_success="✅"| unwrap data_Commit_ReportAccepted_duration [$__range]) by (data_Commit_ReportAccepted_seqNum)`, + loki.Legend("Min"), + ), + timeseries.WithLokiTarget( + `max_over_time({namespace="${namespace}", go_test_name=~"${go_test_name:pipe}", test_data_type="responses", test_group="${test_group}", test_id=~"${test_id:pipe}",source_chain="${source_chain}",dest_chain="${dest_chain}"} | json | data_Commit_ReportAccepted_success="✅"| unwrap data_Commit_ReportAccepted_duration [$__range]) by (data_Commit_ReportAccepted_seqNum)`, + loki.Legend("Max"), + ), + ), + row.WithTimeSeries( + "Report Blessing Summary", + timeseries.Transparent(), + timeseries.Description(""), + timeseries.Span(6), + timeseries.Height("200px"), + timeseries.DataSource(p.LokiDataSource), + timeseries.Axis( + axis.Unit("seconds"), + ), + timeseries.WithLokiTarget( + `avg_over_time({namespace="${namespace}", go_test_name=~"${go_test_name:pipe}", test_data_type="responses", test_group="${test_group}", test_id=~"${test_id:pipe}",source_chain="${source_chain}",dest_chain="${dest_chain}"} | json | data_ReportBlessedByARM_success="✅"| unwrap data_ReportBlessedByARM_duration [$__range]) by (data_ReportBlessedByARM_seqNum)`, + loki.Legend("Avg"), + ), + timeseries.WithLokiTarget( + `min_over_time({ namespace="${namespace}", go_test_name=~"${go_test_name:pipe}", test_data_type="responses", test_group="${test_group}", test_id=~"${test_id:pipe}",source_chain="${source_chain}",dest_chain="${dest_chain}"} | json | data_ReportBlessedByARM_success="✅"| unwrap data_ReportBlessedByARM_duration [$__range]) by (data_ReportBlessedByARM_seqNum)`, + loki.Legend("Min"), + ), + timeseries.WithLokiTarget( + `max_over_time({namespace="${namespace}", go_test_name=~"${go_test_name:pipe}", test_data_type="responses", test_group="${test_group}", test_id=~"${test_id:pipe}",source_chain="${source_chain}",dest_chain="${dest_chain}"} | json | data_ReportBlessedByARM_success="✅"| unwrap data_ReportBlessedByARM_duration [$__range]) by (data_ReportBlessedByARM_seqNum)`, + loki.Legend("Max"), + ), + ), + row.WithTimeSeries( + "Execution Duration Summary", + timeseries.Transparent(), + timeseries.Description(""), + timeseries.Span(6), + timeseries.Height("200px"), + timeseries.DataSource(p.LokiDataSource), + timeseries.Axis( + axis.Unit("seconds"), + ), + timeseries.WithLokiTarget( + `avg_over_time({namespace="${namespace}", go_test_name=~"${go_test_name:pipe}", test_data_type="responses", test_group="${test_group}", test_id=~"${test_id:pipe}",source_chain="${source_chain}",dest_chain="${dest_chain}"} | json | data_ExecutionStateChanged_success="✅"| unwrap data_ExecutionStateChanged_duration [$__range]) by (data_ExecutionStateChanged_seqNum)`, + loki.Legend("Avg"), + ), + timeseries.WithLokiTarget( + `min_over_time({namespace="${namespace}", go_test_name=~"${go_test_name:pipe}", test_data_type="responses", test_group="${test_group}", test_id=~"${test_id:pipe}",source_chain="${source_chain}",dest_chain="${dest_chain}"} | json | data_ExecutionStateChanged_success="✅"| unwrap data_ExecutionStateChanged_duration [$__range]) by (data_ExecutionStateChanged_seqNum)`, + loki.Legend("Min"), + ), + timeseries.WithLokiTarget( + `max_over_time({namespace="${namespace}", go_test_name=~"${go_test_name:pipe}", test_data_type="responses", test_group="${test_group}", test_id=~"${test_id:pipe}",source_chain="${source_chain}",dest_chain="${dest_chain}"} | json | data_ExecutionStateChanged_success="✅"| unwrap data_ExecutionStateChanged_duration [$__range]) by (data_ExecutionStateChanged_seqNum)`, + loki.Legend("Max"), + ), + ), + row.WithTimeSeries( + "E2E (Commit, ARM, Execution)", + timeseries.Transparent(), + timeseries.Description(""), + timeseries.Span(6), + timeseries.Height("200px"), + timeseries.DataSource(p.LokiDataSource), + timeseries.Axis( + axis.Unit("seconds"), + ), + timeseries.WithLokiTarget( + `avg_over_time({namespace="${namespace}", go_test_name=~"${go_test_name:pipe}", test_data_type="responses", test_group="${test_group}", test_id=~"${test_id:pipe}",source_chain="${source_chain}",dest_chain="${dest_chain}"} | json | data_CommitAndExecute_success="✅"| unwrap data_CommitAndExecute_duration [$__range]) by (data_CommitAndExecute_seqNum)`, + loki.Legend("Avg"), + ), + timeseries.WithLokiTarget( + `min_over_time({namespace="${namespace}", go_test_name=~"${go_test_name:pipe}", test_data_type="responses", test_group="${test_group}", test_id=~"${test_id:pipe}",source_chain="${source_chain}",dest_chain="${dest_chain}"} | json | data_CommitAndExecute_success="✅"| unwrap data_CommitAndExecute_duration [$__range]) by (data_CommitAndExecute_seqNum)`, + loki.Legend("Min"), + ), + timeseries.WithLokiTarget( + `max_over_time({namespace="${namespace}", go_test_name=~"${go_test_name:pipe}", test_data_type="responses", test_group="${test_group}", test_id=~"${test_id:pipe}",source_chain="${source_chain}",dest_chain="${dest_chain}"} | json | data_CommitAndExecute_success="✅"| unwrap data_CommitAndExecute_duration [$__range]) by (data_CommitAndExecute_seqNum)`, + loki.Legend("Max"), + ), + ), + ), + } +} + +func failedMessagesRow(p Props) []dashboard.Option { + return []dashboard.Option{ + dashboard.Row( + "Failed Messages", + row.Collapse(), + row.WithTimeSeries( + "Failed Commit", + timeseries.Transparent(), + timeseries.Description(""), + timeseries.Span(6), + timeseries.Height("200px"), + timeseries.DataSource(p.LokiDataSource), + timeseries.WithLokiTarget( + `count_over_time({ namespace="${namespace}", go_test_name=~"${go_test_name:pipe}", test_data_type="responses", test_group="${test_group}", test_id=~"${test_id:pipe}",source_chain="${source_chain}",dest_chain="${dest_chain}"} | json | data_Commit_ReportAccepted_success="❌" [$__range])`, + loki.Legend("{{error}}"), + ), + ), + row.WithTimeSeries( + "Failed Bless", + timeseries.Transparent(), + timeseries.Description(""), + timeseries.Span(6), + timeseries.Height("200px"), + timeseries.DataSource(p.LokiDataSource), + timeseries.WithLokiTarget( + `count_over_time({namespace="${namespace}", go_test_name=~"${go_test_name:pipe}", test_data_type="responses", test_group="${test_group}", test_id=~"${test_id:pipe}",source_chain="${source_chain}",dest_chain="${dest_chain}"} | json | data_ReportBlessedByARM_success="❌" [$__range])`, + loki.Legend("{{error}}"), + ), + ), + row.WithTimeSeries( + "Failed Execution", + timeseries.Transparent(), + timeseries.Description(""), + timeseries.Span(6), + timeseries.Height("200px"), + timeseries.DataSource(p.LokiDataSource), + timeseries.WithLokiTarget( + `count_over_time({namespace="${namespace}", go_test_name=~"${go_test_name:pipe}", test_data_type="responses", test_group="${test_group}", test_id=~"${test_id:pipe}",source_chain="${source_chain}",dest_chain="${dest_chain}"} | json | data_ExecutionStateChanged_success="❌" [$__range])`, + loki.Legend("{{error}}"), + ), + ), + row.WithTimeSeries( + "Failed Commit and Execution", + timeseries.Transparent(), + timeseries.Description(""), + timeseries.Span(6), + timeseries.Height("200px"), + timeseries.DataSource(p.LokiDataSource), + timeseries.WithLokiTarget( + `count_over_time({namespace="${namespace}", go_test_name=~"${go_test_name:pipe}", test_data_type="responses", test_group="${test_group}", test_id=~"${test_id:pipe}",source_chain="${source_chain}",dest_chain="${dest_chain}"} | json | data_CommitAndExecute_success="❌" [$__range])`, + loki.Legend("{{error}}"), + ), + ), + ), + } +} + +func reqRespRow(p Props) []dashboard.Option { + return []dashboard.Option{ + dashboard.Row( + "Requests/Responses", + row.WithStat( + "Stats", + stat.DataSource(p.LokiDataSource), + stat.Transparent(), + stat.Text(stat.TextValueAndName), + stat.Height("100px"), + stat.TitleFontSize(20), + stat.ValueFontSize(20), + stat.Span(12), + stat.WithPrometheusTarget( + `max_over_time({namespace="${namespace}", go_test_name="${go_test_name:pipe}", test_data_type="stats", test_group="$test_group", test_id=~"${test_id:pipe}", source_chain="${source_chain}", dest_chain="${dest_chain}"} +| json +| unwrap current_time_unit [$__range]) by (test_id)`, + prometheus.Legend("Time Unit"), + ), + stat.WithPrometheusTarget( + `max_over_time({namespace="${namespace}", go_test_name="${go_test_name:pipe}", test_data_type="stats", test_group="$test_group", test_id=~"${test_id:pipe}", source_chain="${source_chain}", dest_chain="${dest_chain}"} +| json +| unwrap load_duration [$__range]) by (test_id)/ 1e9 `, + prometheus.Legend("Total Duration"), + ), + stat.WithPrometheusTarget( + `max_over_time({namespace="${namespace}", go_test_name=~"${go_test_name:pipe}", test_data_type="responses", test_group="${test_group}", test_id=~"${test_id:pipe}",source_chain="${source_chain}",dest_chain="${dest_chain}"} | json | data_CCIP_Send_Transaction_success="✅"| unwrap data_CCIP_Send_Transaction_ccip_send_data_message_bytes_length [$__range]) by (test_id)`, + prometheus.Legend("Max Byte Len Sent"), + ), + stat.WithPrometheusTarget( + `max_over_time({namespace="${namespace}", go_test_name=~"${go_test_name:pipe}", test_data_type="responses", test_group="${test_group}", test_id=~"${test_id:pipe}",source_chain="${source_chain}",dest_chain="${dest_chain}"} | json | data_CCIP_Send_Transaction_success="✅"| unwrap data_CCIP_Send_Transaction_ccip_send_data_no_of_tokens_sent [$__range]) by (test_id)`, + prometheus.Legend("Max No Of Tokens Sent"), + ), + ), + row.WithTimeSeries( + "Request Rate", + timeseries.Transparent(), + timeseries.Description("Requests triggered over test duration"), + timeseries.Span(6), + timeseries.Height("200px"), + timeseries.DataSource(p.LokiDataSource), + timeseries.WithLokiTarget( + `last_over_time({namespace="${namespace}", go_test_name="${go_test_name:pipe}", test_data_type="stats", test_group="$test_group", test_id="${test_id:pipe}", source_chain="${source_chain}", dest_chain="${dest_chain}"}| json | unwrap current_rps [$__interval]) by (test_id,gen_name)`, + loki.Legend("Request Triggered/TimeUnit"), + ), + ), + row.WithTimeSeries( + "Trigger Summary", + timeseries.Transparent(), + timeseries.Points(), + timeseries.Description("Latest Stage Stats"), + timeseries.Span(6), + timeseries.Height("200px"), + timeseries.DataSource(p.LokiDataSource), + timeseries.WithLokiTarget( + `max_over_time({namespace="${namespace}", go_test_name="${go_test_name:pipe}", test_data_type="stats", test_group="$test_group", test_id=~"${test_id:pipe}", source_chain="${source_chain}", dest_chain="${dest_chain}"} +| json +| unwrap success [$__range]) by (test_id)`, + loki.Legend("Successful Requests"), + ), + timeseries.WithLokiTarget( + `max_over_time({namespace="${namespace}", go_test_name="${go_test_name:pipe}", test_data_type="stats", test_group="$test_group", test_id=~"${test_id:pipe}", source_chain="${source_chain}", dest_chain="${dest_chain}"} +| json +| unwrap failed [$__range]) by (test_id)`, + loki.Legend("Failed Requests"), + ), + ), + row.WithLogs( + "All CCIP Phases Stats", + logs.DataSource(p.LokiDataSource), + logs.Span(12), + logs.Height("300px"), + logs.Transparent(), + logs.WithLokiTarget( + `{namespace="${namespace}", go_test_name="${go_test_name:pipe}", test_data_type="responses", test_group="${test_group}", test_id=~"${test_id}",source_chain="${source_chain}",dest_chain="${dest_chain}"} | json `, + ), + ), + ), + } +} + +func gasStatsRow(p Props) []dashboard.Option { + return []dashboard.Option{ + dashboard.Row( + "CCIP Gas Stats", + row.Collapse(), + row.WithTimeSeries( + "Gas Used in CCIP-Send⛽️", + timeseries.Transparent(), + timeseries.Description(""), + timeseries.Span(6), + timeseries.Height("200px"), + timeseries.DataSource(p.LokiDataSource), + timeseries.Axis( + axis.Unit("wei"), + ), + timeseries.WithLokiTarget( + `avg_over_time({namespace="${namespace}", go_test_name=~"${go_test_name:pipe}", test_data_type="responses", test_group="${test_group}", test_id=~"${test_id:pipe}",source_chain="${source_chain}",dest_chain="${dest_chain}"} | json | data_CCIP_Send_Transaction_success="✅"| unwrap data_CCIP_Send_Transaction_ccip_send_data_gas_used [$__range]) by (test_id)`, + loki.Legend("Avg"), + ), + timeseries.WithLokiTarget( + `min_over_time({namespace="${namespace}", go_test_name=~"${go_test_name:pipe}", test_data_type="responses", test_group="${test_group}", test_id=~"${test_id:pipe}",source_chain="${source_chain}",dest_chain="${dest_chain}"} | json | data_CCIP_Send_Transaction_success="✅"| unwrap data_CCIP_Send_Transaction_ccip_send_data_gas_used [$__range]) by (test_id)`, + loki.Legend("Min"), + ), + timeseries.WithLokiTarget( + `max_over_time({ namespace="${namespace}", go_test_name=~"${go_test_name:pipe}", test_data_type="responses", test_group="${test_group}", test_id=~"${test_id:pipe}",source_chain="${source_chain}",dest_chain="${dest_chain}"} | json | data_CCIP_Send_Transaction_success="✅"| unwrap data_CCIP_Send_Transaction_ccip_send_data_gas_used [$__range]) by (test_id) `, + loki.Legend("Max"), + ), + ), + row.WithTimeSeries( + "Gas Used in Commit⛽️", + timeseries.Transparent(), + timeseries.Description(""), + timeseries.Span(6), + timeseries.Height("200px"), + timeseries.DataSource(p.LokiDataSource), + timeseries.Axis( + axis.Unit("wei"), + ), + timeseries.WithLokiTarget( + `avg_over_time({namespace="${namespace}", go_test_name=~"${go_test_name:pipe}", test_data_type="responses", test_group="${test_group}", test_id=~"${test_id:pipe}",source_chain="${source_chain}",dest_chain="${dest_chain}"} | json | data_Commit_ReportAccepted_success="✅"| unwrap data_Commit_ReportAccepted_ccip_send_data_gas_used [$__range]) by (test_id)`, + loki.Legend("Avg"), + ), + timeseries.WithLokiTarget( + `min_over_time({namespace="${namespace}", go_test_name=~"${go_test_name:pipe}", test_data_type="responses", test_group="${test_group}", test_id=~"${test_id:pipe}",source_chain="${source_chain}",dest_chain="${dest_chain}"} | json | data_Commit_ReportAccepted_success="✅"| unwrap data_Commit_ReportAccepted_ccip_send_data_gas_used [$__range]) by (test_id)`, + loki.Legend("Min"), + ), + timeseries.WithLokiTarget( + `max_over_time({namespace="${namespace}", go_test_name=~"${go_test_name:pipe}", test_data_type="responses", test_group="${test_group}", test_id=~"${test_id:pipe}",source_chain="${source_chain}",dest_chain="${dest_chain}"} | json | data_Commit_ReportAccepted_success="✅"| unwrap data_Commit_ReportAccepted_ccip_send_data_gas_used [$__range]) by (test_id) `, + loki.Legend("Max"), + ), + ), + row.WithTimeSeries( + "Gas Used in ARM Blessing⛽️", + timeseries.Transparent(), + timeseries.Description(""), + timeseries.Span(6), + timeseries.Height("200px"), + timeseries.DataSource(p.LokiDataSource), + timeseries.Axis( + axis.Unit("wei"), + ), + timeseries.WithLokiTarget( + `avg_over_time({namespace="${namespace}", go_test_name=~"${go_test_name:pipe}", test_data_type="responses", test_group="${test_group}", test_id=~"${test_id:pipe}",source_chain="${source_chain}",dest_chain="${dest_chain}"} | json | data_ReportBlessedByARM_success="✅"| unwrap data_ReportBlessedByARM_ccip_send_data_gas_used [$__range]) by (test_id)`, + loki.Legend("Avg"), + ), + timeseries.WithLokiTarget( + `min_over_time({namespace="${namespace}", go_test_name=~"${go_test_name:pipe}", test_data_type="responses", test_group="${test_group}", test_id=~"${test_id:pipe}",source_chain="${source_chain}",dest_chain="${dest_chain}"} | json | data_ReportBlessedByARM_success="✅"| unwrap data_ReportBlessedByARM_ccip_send_data_gas_used [$__range]) by (test_id)`, + loki.Legend("Min"), + ), + timeseries.WithLokiTarget( + `max_over_time({namespace="${namespace}", go_test_name=~"${go_test_name:pipe}", test_data_type="responses", test_group="${test_group}", test_id=~"${test_id:pipe}",source_chain="${source_chain}",dest_chain="${dest_chain}"} | json | data_ReportBlessedByARM_success="✅"| unwrap data_ReportBlessedByARM_ccip_send_data_gas_used [$__range]) by (test_id) `, + loki.Legend("Max"), + ), + ), + row.WithTimeSeries( + "Gas Used in Execution⛽️", + timeseries.Transparent(), + timeseries.Description(""), + timeseries.Span(6), + timeseries.Height("200px"), + timeseries.DataSource(p.LokiDataSource), + timeseries.Axis( + axis.Unit("wei"), + ), + timeseries.WithLokiTarget( + `avg_over_time({namespace="${namespace}", go_test_name=~"${go_test_name:pipe}", test_data_type="responses", test_group="${test_group}", test_id=~"${test_id:pipe}",source_chain="${source_chain}",dest_chain="${dest_chain}"} | json | data_ExecutionStateChanged_success="✅"| unwrap data_ExecutionStateChanged_ccip_send_data_gas_used [$__range]) by (test_id)`, + loki.Legend("Avg"), + ), + timeseries.WithLokiTarget( + `min_over_time({namespace="${namespace}", go_test_name=~"${go_test_name:pipe}", test_data_type="responses", test_group="${test_group}", test_id=~"${test_id:pipe}",source_chain="${source_chain}",dest_chain="${dest_chain}"} | json | data_ExecutionStateChanged_success="✅"| unwrap data_ExecutionStateChanged_ccip_send_data_gas_used [$__range]) by (test_id)`, + loki.Legend("Min"), + ), + timeseries.WithLokiTarget( + `max_over_time({namespace="${namespace}", go_test_name=~"${go_test_name:pipe}", test_data_type="responses", test_group="${test_group}", test_id=~"${test_id:pipe}",source_chain="${source_chain}",dest_chain="${dest_chain}"} | json | data_ExecutionStateChanged_success="✅"| unwrap data_ExecutionStateChanged_ccip_send_data_gas_used [$__range]) by (test_id) `, + loki.Legend("Max"), + ), + ), + ), + } +} + +func New(p Props) []dashboard.Option { + opts := vars(p) + opts = append(opts, statsRow(p)...) + opts = append(opts, gasStatsRow(p)...) + opts = append(opts, failedMessagesRow(p)...) + opts = append(opts, reqRespRow(p)...) + return opts +} diff --git a/dashboard-lib/config.go b/dashboard-lib/config.go new file mode 100644 index 00000000000..7d2db0878d8 --- /dev/null +++ b/dashboard-lib/config.go @@ -0,0 +1,70 @@ +package dashboard_lib + +import "os" + +type EnvConfig struct { + Platform string + GrafanaURL string + GrafanaToken string + GrafanaFolder string + DataSources DataSources +} + +type DataSources struct { + Loki string + Prometheus string +} + +type DashboardOpts struct { + Tags []string + AutoRefresh string +} + +func ReadEnvDeployOpts() EnvConfig { + name := os.Getenv("DASHBOARD_NAME") + if name == "" { + L.Fatal().Msg("DASHBOARD_NAME must be provided") + } + lokiDataSourceName := os.Getenv("LOKI_DATA_SOURCE_NAME") + if lokiDataSourceName == "" { + L.Fatal().Msg("LOKI_DATA_SOURCE_NAME is empty, panels with logs will be disabled") + } + prometheusDataSourceName := os.Getenv("PROMETHEUS_DATA_SOURCE_NAME") + if prometheusDataSourceName == "" { + L.Fatal().Msg("PROMETHEUS_DATA_SOURCE_NAME must be provided") + } + grafanaURL := os.Getenv("GRAFANA_URL") + if grafanaURL == "" { + L.Fatal().Msg("GRAFANA_URL must be provided") + } + grafanaToken := os.Getenv("GRAFANA_TOKEN") + if grafanaToken == "" { + L.Fatal().Msg("GRAFANA_TOKEN must be provided") + } + grafanaFolder := os.Getenv("GRAFANA_FOLDER") + if grafanaFolder == "" { + L.Fatal().Msg("GRAFANA_FOLDER must be provided") + } + platform := os.Getenv("INFRA_PLATFORM") + if platform == "" { + L.Fatal().Msg("INFRA_PLATFORM must be provided, can be either docker|kubernetes") + } + loki := os.Getenv("LOKI_DATA_SOURCE_NAME") + if lokiDataSourceName == "" { + L.Fatal().Msg("LOKI_DATA_SOURCE_NAME is empty, panels with logs will be disabled") + } + prom := os.Getenv("PROMETHEUS_DATA_SOURCE_NAME") + if prometheusDataSourceName == "" { + L.Fatal().Msg("PROMETHEUS_DATA_SOURCE_NAME must be provided") + } + return EnvConfig{ + GrafanaURL: grafanaURL, + GrafanaToken: grafanaToken, + GrafanaFolder: grafanaFolder, + Platform: platform, + DataSources: DataSources{ + Loki: loki, + Prometheus: prom, + }, + } +} diff --git a/dashboard-lib/core-don/component.go b/dashboard-lib/core-don/component.go new file mode 100644 index 00000000000..24173fb6cc9 --- /dev/null +++ b/dashboard-lib/core-don/component.go @@ -0,0 +1,1806 @@ +package core_don + +import ( + "fmt" + "github.com/K-Phoen/grabana/dashboard" + "github.com/K-Phoen/grabana/gauge" + "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/query" +) + +type Props struct { + PrometheusDataSource string + PlatformOpts PlatformOpts +} + +func vars(p Props) []dashboard.Option { + return []dashboard.Option{ + dashboard.VariableAsQuery( + "instance", + query.DataSource(p.PrometheusDataSource), + query.Multiple(), + query.IncludeAll(), + query.Request(fmt.Sprintf("label_values(%s)", p.PlatformOpts.LabelFilter)), + query.Sort(query.NumericalAsc), + ), + dashboard.VariableAsQuery( + "evmChainID", + query.DataSource(p.PrometheusDataSource), + query.Multiple(), + query.IncludeAll(), + query.Request(fmt.Sprintf("label_values(%s)", "evmChainID")), + query.Sort(query.NumericalAsc), + ), + } +} + +func generalInfoRow(p Props) []dashboard.Option { + return []dashboard.Option{ + dashboard.Row( + "General CL Cluster Info", + row.Collapse(), + row.WithStat( + "App Version", + stat.DataSource(p.PrometheusDataSource), + stat.Text(stat.TextValueAndName), + stat.Orientation(stat.OrientationAuto), + stat.TitleFontSize(12), + stat.ValueFontSize(20), + stat.Span(2), + stat.Text("name"), + stat.WithPrometheusTarget( + `version{`+p.PlatformOpts.LabelQuery+`}`, + prometheus.Legend("{{version}}"), + ), + ), + row.WithStat( + "Go Version", + stat.DataSource(p.PrometheusDataSource), + stat.Text(stat.TextValueAndName), + stat.Orientation(stat.OrientationAuto), + stat.TitleFontSize(12), + stat.ValueFontSize(20), + stat.Span(2), + stat.Text("name"), + stat.WithPrometheusTarget( + `go_info{`+p.PlatformOpts.LabelQuery+`}`, + prometheus.Legend("{{version}}"), + ), + ), + row.WithStat( + "Uptime in days", + stat.DataSource(p.PrometheusDataSource), + stat.Text(stat.TextValueAndName), + stat.Orientation(stat.OrientationHorizontal), + stat.TitleFontSize(12), + stat.ValueFontSize(20), + stat.Span(8), + stat.WithPrometheusTarget( + `uptime_seconds{`+p.PlatformOpts.LabelQuery+`} / 86400`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}}"), + ), + ), + row.WithStat( + "ETH Balance", + stat.DataSource(p.PrometheusDataSource), + stat.Text(stat.TextValueAndName), + stat.Orientation(stat.OrientationHorizontal), + stat.TitleFontSize(12), + stat.ValueFontSize(20), + stat.Span(6), + stat.Decimals(2), + stat.WithPrometheusTarget( + `eth_balance{`+p.PlatformOpts.LabelQuery+`}`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}} - {{account}}"), + ), + ), + row.WithStat( + "Solana Balance", + stat.DataSource(p.PrometheusDataSource), + stat.Text(stat.TextValueAndName), + stat.Orientation(stat.OrientationHorizontal), + stat.TitleFontSize(12), + stat.ValueFontSize(20), + stat.Span(6), + stat.Decimals(2), + stat.WithPrometheusTarget( + `solana_balance{`+p.PlatformOpts.LabelQuery+`}`, + prometheus.Legend("{{"+p.PlatformOpts.LabelFilter+"}} - {{account}}"), + ), + ), + row.WithTimeSeries( + "Service Components Health", + timeseries.Span(12), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.WithPrometheusTarget( + `health{`+p.PlatformOpts.LabelQuery+`}`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}} - {{service_id}}"), + ), + ), + row.WithTimeSeries( + "ETH Balance", + timeseries.Span(6), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.Axis( + axis.Unit(""), + axis.Decimals(2), + ), + timeseries.WithPrometheusTarget( + `eth_balance{`+p.PlatformOpts.LabelQuery+`}`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}} - {{account}}"), + ), + ), + row.WithTimeSeries( + "SOL Balance", + timeseries.Span(6), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.Axis( + axis.Unit(""), + axis.Decimals(2), + ), + timeseries.WithPrometheusTarget( + `solana_balance{`+p.PlatformOpts.LabelQuery+`}`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}} - {{account}}"), + ), + ), + ), + } +} + +func logPollerRow(p Props) []dashboard.Option { + return []dashboard.Option{ + dashboard.Row("LogPoller", + row.Collapse(), + row.WithStat( + "Goroutines", + stat.DataSource(p.PrometheusDataSource), + stat.Text(stat.TextValueAndName), + stat.Orientation(stat.OrientationAuto), + stat.Height("200px"), + stat.TitleFontSize(30), + stat.ValueFontSize(30), + stat.Span(6), + stat.Text("Goroutines"), + stat.WithPrometheusTarget( + `count(count by (evmChainID) (log_poller_query_duration_sum{job=~"$instance"}))`, + prometheus.Legend("Goroutines"), + ), + ), + row.WithTimeSeries( + "RPS", + timeseries.Span(6), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.Axis( + axis.Unit("requests"), + ), + timeseries.WithPrometheusTarget( + `avg by (query) (sum by (query, job) (rate(log_poller_query_duration_count{job=~"$instance", evmChainID=~"$evmChainID"}[$__rate_interval])))`, + prometheus.Legend("{{query}} - {{job}}"), + ), + timeseries.WithPrometheusTarget( + `avg (sum by(job) (rate(log_poller_query_duration_count{job=~"$instance", evmChainID=~"$evmChainID"}[$__rate_interval])))`, + prometheus.Legend("Total"), + ), + ), + row.WithTimeSeries( + "RPS by type", + timeseries.Span(6), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.Axis( + axis.Unit("requests"), + ), + timeseries.WithPrometheusTarget( + `avg by (type) (sum by (type, job) (rate(log_poller_query_duration_count{job=~"$instance", evmChainID=~"$evmChainID"}[$__rate_interval])))`, + ), + ), + row.WithTimeSeries( + "Avg number of logs returned", + timeseries.Span(6), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.Axis( + axis.Unit("logs"), + ), + timeseries.WithPrometheusTarget( + `avg by (query) (log_poller_query_dataset_size{job=~"$instance", evmChainID=~"$evmChainID"})`, + prometheus.Legend("{{query}} - {{job}}"), + ), + ), + row.WithTimeSeries( + "Max number of logs returned", + timeseries.Span(6), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.Axis( + axis.Unit("logs"), + ), + timeseries.WithPrometheusTarget( + `max by (query) (log_poller_query_dataset_size{job=~"$instance", evmChainID=~"$evmChainID"})`, + prometheus.Legend("{{query}} - {{job}}"), + ), + ), + row.WithTimeSeries( + "Logs returned by chain", + timeseries.Span(6), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.Axis( + axis.Unit("logs"), + ), + timeseries.WithPrometheusTarget( + `max by (evmChainID) (log_poller_query_dataset_size{job=~"$instance", evmChainID=~"$evmChainID"})`, + prometheus.Legend("{{evmChainID}}"), + ), + ), + row.WithTimeSeries( + "Queries duration by type (0.5 perc)", + timeseries.Span(6), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.Axis( + axis.Unit("ms"), + ), + timeseries.WithPrometheusTarget( + `histogram_quantile(0.5, sum(rate(log_poller_query_duration_bucket{job=~"$instance", evmChainID=~"$evmChainID"}[$__rate_interval])) by (le, query)) / 1e6`, + prometheus.Legend("{{query}}"), + ), + ), + row.WithTimeSeries( + "queries duration by type (0.9 perc)", + timeseries.Span(6), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.Axis( + axis.Unit("ms"), + ), + timeseries.WithPrometheusTarget( + `histogram_quantile(0.9, sum(rate(log_poller_query_duration_bucket{job=~"$instance", evmChainID=~"$evmChainID"}[$__rate_interval])) by (le, query)) / 1e6`, + prometheus.Legend("{{query}}"), + ), + ), + row.WithTimeSeries( + "Queries duration by type (0.99 perc)", + timeseries.Span(6), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.Axis( + axis.Unit("ms"), + ), + timeseries.WithPrometheusTarget( + `histogram_quantile(0.99, sum(rate(log_poller_query_duration_bucket{job=~"$instance", evmChainID=~"$evmChainID"}[$__rate_interval])) by (le, query)) / 1e6`, + prometheus.Legend("{{query}}"), + ), + ), + row.WithTimeSeries( + "Queries duration by chain (0.99 perc)", + timeseries.Span(6), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.Axis( + axis.Unit("ms"), + ), + timeseries.WithPrometheusTarget( + `histogram_quantile(0.99, sum(rate(log_poller_query_duration_bucket{job=~"$instance", evmChainID=~"$evmChainID"}[$__rate_interval])) by (le, evmChainID)) / 1e6`, + prometheus.Legend("{{query}}"), + ), + ), + row.WithTimeSeries( + "Number of logs inserted", + timeseries.Span(6), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.Axis( + axis.Unit("logs"), + ), + timeseries.WithPrometheusTarget( + `avg by (evmChainID) (log_poller_logs_inserted{job=~"$instance", evmChainID=~"$evmChainID"})`, + prometheus.Legend("{{evmChainID}}"), + ), + ), + row.WithTimeSeries( + "Logs insertion rate", + timeseries.Span(6), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.WithPrometheusTarget( + `avg by (evmChainID) (rate(log_poller_logs_inserted{job=~"$instance", evmChainID=~"$evmChainID"}[$__rate_interval]))`, + prometheus.Legend("{{evmChainID}}"), + ), + ), + row.WithTimeSeries( + "Number of blocks inserted", + timeseries.Span(6), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.Axis( + axis.Unit("blocks"), + ), + timeseries.WithPrometheusTarget( + `avg by (evmChainID) (log_poller_blocks_inserted{job=~"$instance", evmChainID=~"$evmChainID"})`, + prometheus.Legend("{{evmChainID}}"), + ), + ), + row.WithTimeSeries( + "Blocks insertion rate", + timeseries.Span(6), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.WithPrometheusTarget( + `avg by (evmChainID) (rate(log_poller_blocks_inserted{job=~"$instance", evmChainID=~"$evmChainID"}[$__rate_interval]))`, + prometheus.Legend("{{evmChainID}}"), + ), + ), + ), + } +} + +func feedJobsRow(p Props) []dashboard.Option { + return []dashboard.Option{ + dashboard.Row("Feeds Jobs", + row.Collapse(), + row.WithTimeSeries( + "Feeds Job Proposal Requests", + timeseries.Span(6), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.Axis( + axis.Unit(""), + ), + timeseries.WithPrometheusTarget( + `feeds_job_proposal_requests{`+p.PlatformOpts.LabelQuery+`}`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}}"), + ), + ), + row.WithTimeSeries( + "Feeds Job Proposal Count", + timeseries.Span(6), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.Axis( + axis.Unit(""), + ), + timeseries.WithPrometheusTarget( + `feeds_job_proposal_count{`+p.PlatformOpts.LabelQuery+`}`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}}"), + ), + ), + ), + } +} + +func mailBoxRow(p Props) []dashboard.Option { + return []dashboard.Option{ + dashboard.Row("Mailbox", + row.Collapse(), + row.WithTimeSeries( + "Mailbox Load Percent", + timeseries.Span(12), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.Axis( + axis.Unit(""), + ), + timeseries.WithPrometheusTarget( + `mailbox_load_percent{`+p.PlatformOpts.LabelQuery+`}`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}} - {{ name }}"), + ), + ), + ), + } +} + +func promReporterRow(p Props) []dashboard.Option { + return []dashboard.Option{ + dashboard.Row("Prom Reporter", + row.Collapse(), + row.WithTimeSeries( + "Unconfirmed Transactions", + timeseries.Span(4), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.Axis( + axis.Unit("Tx"), + ), + timeseries.WithPrometheusTarget( + `unconfirmed_transactions{`+p.PlatformOpts.LabelQuery+`}`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}}"), + ), + ), + row.WithTimeSeries( + "Unconfirmed TX Age", + timeseries.Span(4), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.Axis( + axis.Unit("Sec"), + ), + timeseries.WithPrometheusTarget( + `max_unconfirmed_tx_age{`+p.PlatformOpts.LabelQuery+`}`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}}"), + ), + ), + row.WithTimeSeries( + "Unconfirmed TX Blocks", + timeseries.Span(4), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.Axis( + axis.Unit("Blocks"), + ), + timeseries.WithPrometheusTarget( + `max_unconfirmed_blocks{`+p.PlatformOpts.LabelQuery+`}`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}}"), + ), + ), + ), + } +} + +func txManagerRow(p Props) []dashboard.Option { + return []dashboard.Option{ + dashboard.Row("TX Manager", + row.Collapse(), + row.WithTimeSeries( + "TX Manager Time Until TX Broadcast", + timeseries.Span(12), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.Axis( + axis.Unit(""), + ), + timeseries.WithPrometheusTarget( + `tx_manager_time_until_tx_broadcast{`+p.PlatformOpts.LabelQuery+`}`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}}"), + ), + ), + row.WithTimeSeries( + "TX Manager Num Gas Bumps", + timeseries.Span(6), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.Axis( + axis.Unit(""), + ), + timeseries.WithPrometheusTarget( + `tx_manager_num_gas_bumps{`+p.PlatformOpts.LabelQuery+`}`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}}"), + ), + ), + row.WithTimeSeries( + "TX Manager Num Gas Bumps Exceeds Limit", + timeseries.Span(6), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.Axis( + axis.Unit(""), + ), + timeseries.WithPrometheusTarget( + `tx_manager_gas_bump_exceeds_limit{`+p.PlatformOpts.LabelQuery+`}`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}}"), + ), + ), + row.WithTimeSeries( + "TX Manager Num Confirmed Transactions", + timeseries.Span(3), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.Axis( + axis.Unit(""), + ), + timeseries.WithPrometheusTarget( + `tx_manager_num_confirmed_transactions{`+p.PlatformOpts.LabelQuery+`}`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}}"), + ), + ), + row.WithTimeSeries( + "TX Manager Num Successful Transactions", + timeseries.Span(3), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.Axis( + axis.Unit(""), + ), + timeseries.WithPrometheusTarget( + `tx_manager_num_successful_transactions{`+p.PlatformOpts.LabelQuery+`}`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}}"), + ), + ), + row.WithTimeSeries( + "TX Manager Num Reverted Transactions", + timeseries.Span(3), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.Axis( + axis.Unit(""), + ), + timeseries.WithPrometheusTarget( + `tx_manager_num_tx_reverted{`+p.PlatformOpts.LabelQuery+`}`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}}"), + ), + ), + row.WithTimeSeries( + "TX Manager Num Fwd Transactions", + timeseries.Span(3), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.Axis( + axis.Unit(""), + ), + timeseries.WithPrometheusTarget( + `tx_manager_fwd_tx_count{`+p.PlatformOpts.LabelQuery+`}`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}}"), + ), + ), + row.WithTimeSeries( + "TX Manager Num Transactions Attempts", + timeseries.Span(12), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.Axis( + axis.Unit(""), + ), + timeseries.WithPrometheusTarget( + `tx_manager_tx_attempt_count{`+p.PlatformOpts.LabelQuery+`}`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}}"), + ), + ), + row.WithTimeSeries( + "TX Manager Time Until TX Confirmed", + timeseries.Span(12), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.Axis( + axis.Unit(""), + ), + timeseries.WithPrometheusTarget( + `tx_manager_time_until_tx_confirmed{`+p.PlatformOpts.LabelQuery+`}`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}}"), + ), + ), + row.WithTimeSeries( + "TX Manager Block Until TX Confirmed", + timeseries.Span(12), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.Axis( + axis.Unit(""), + ), + timeseries.WithPrometheusTarget( + `tx_manager_blocks_until_tx_confirmed{`+p.PlatformOpts.LabelQuery+`}`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}}"), + ), + ), + ), + } +} + +func headTrackerRow(p Props) []dashboard.Option { + return []dashboard.Option{ + dashboard.Row("Head tracker", + row.Collapse(), + row.WithTimeSeries( + "Head tracker current head", + timeseries.Span(6), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.Axis( + axis.Unit("Block"), + ), + timeseries.WithPrometheusTarget( + `head_tracker_current_head{`+p.PlatformOpts.LabelQuery+`}`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}}"), + ), + ), + row.WithTimeSeries( + "Head tracker very old head", + timeseries.Span(6), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.Axis( + axis.Unit("Block"), + ), + timeseries.WithPrometheusTarget( + `head_tracker_very_old_head{`+p.PlatformOpts.LabelQuery+`}`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}}"), + ), + ), + row.WithTimeSeries( + "Head tracker heads received", + timeseries.Span(6), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.Axis( + axis.Unit("Block"), + ), + timeseries.WithPrometheusTarget( + `head_tracker_heads_received{`+p.PlatformOpts.LabelQuery+`}`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}}"), + ), + ), + row.WithTimeSeries( + "Head tracker connection errors", + timeseries.Span(6), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.Axis( + axis.Unit("Block"), + ), + timeseries.WithPrometheusTarget( + `head_tracker_connection_errors{`+p.PlatformOpts.LabelQuery+`}`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}}"), + ), + ), + ), + } +} + +func appDBConnectionsRow(p Props) []dashboard.Option { + return []dashboard.Option{ + dashboard.Row("DB Connection Metrics (App)", + row.Collapse(), + row.WithTimeSeries( + "DB Connections", + timeseries.Span(12), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.Axis( + axis.Unit("Conn"), + ), + timeseries.WithPrometheusTarget( + `db_conns_max{`+p.PlatformOpts.LabelQuery+`}`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}} - Max"), + ), + timeseries.WithPrometheusTarget( + `db_conns_open{`+p.PlatformOpts.LabelQuery+`}`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}} - Open"), + ), + timeseries.WithPrometheusTarget( + `db_conns_used{`+p.PlatformOpts.LabelQuery+`}`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}} - Used"), + ), + timeseries.WithPrometheusTarget( + `db_conns_wait{`+p.PlatformOpts.LabelQuery+`}`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}} - Wait"), + ), + ), + row.WithTimeSeries( + "DB Wait Count", + timeseries.Span(6), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.Axis( + axis.Unit(""), + ), + timeseries.WithPrometheusTarget( + `db_wait_count{`+p.PlatformOpts.LabelQuery+`}`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}}"), + ), + ), + row.WithTimeSeries( + "DB Wait Time", + timeseries.Span(6), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.Axis( + axis.Unit("Sec"), + ), + timeseries.WithPrometheusTarget( + `db_wait_time_seconds{`+p.PlatformOpts.LabelQuery+`}`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}}"), + ), + ), + ), + } +} + +func sqlQueriesRow(p Props) []dashboard.Option { + return []dashboard.Option{ + dashboard.Row( + "SQL Query", + row.Collapse(), + row.WithTimeSeries( + "SQL Query Timeout Percent", + timeseries.Span(12), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.Axis( + axis.Unit("percent"), + ), + timeseries.WithPrometheusTarget( + `histogram_quantile(0.9, sum(rate(sql_query_timeout_percent_bucket{`+p.PlatformOpts.LabelQuery+`}[$__rate_interval])) by (le))`, + prometheus.Legend("p90"), + ), + timeseries.WithPrometheusTarget( + `histogram_quantile(0.95, sum(rate(sql_query_timeout_percent_bucket{`+p.PlatformOpts.LabelQuery+`}[$__rate_interval])) by (le))`, + prometheus.Legend("p95"), + ), + timeseries.WithPrometheusTarget( + `histogram_quantile(0.99, sum(rate(sql_query_timeout_percent_bucket{`+p.PlatformOpts.LabelQuery+`}[$__rate_interval])) by (le))`, + prometheus.Legend("p99"), + ), + ), + ), + } +} + +func logsCountersRow(p Props) []dashboard.Option { + return []dashboard.Option{ + dashboard.Row("Logs Metrics", + row.Collapse(), + row.WithTimeSeries( + "Logs Counters", + timeseries.Span(12), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.WithPrometheusTarget( + `log_panic_count{`+p.PlatformOpts.LabelQuery+`}`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}} - panic"), + ), + timeseries.WithPrometheusTarget( + `log_fatal_count{`+p.PlatformOpts.LabelQuery+`}`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}} - fatal"), + ), + timeseries.WithPrometheusTarget( + `log_critical_count{`+p.PlatformOpts.LabelQuery+`}`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}} - critical"), + ), + timeseries.WithPrometheusTarget( + `log_warn_count{`+p.PlatformOpts.LabelQuery+`}`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}} - warn"), + ), + timeseries.WithPrometheusTarget( + `log_error_count{`+p.PlatformOpts.LabelQuery+`}`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}} - error"), + ), + ), + row.WithTimeSeries( + "Logs Rate", + timeseries.Span(12), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.WithPrometheusTarget( + `sum(rate(log_panic_count{`+p.PlatformOpts.LabelQuery+`}[$__rate_interval])) by (`+p.PlatformOpts.LegendString+`)`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}} - panic"), + ), + timeseries.WithPrometheusTarget( + `sum(rate(log_fatal_count{`+p.PlatformOpts.LabelQuery+`}[$__rate_interval])) by (`+p.PlatformOpts.LegendString+`)`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}} - fatal"), + ), + timeseries.WithPrometheusTarget( + `sum(rate(log_critical_count{`+p.PlatformOpts.LabelQuery+`}[$__rate_interval])) by (`+p.PlatformOpts.LegendString+`)`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}} - critical"), + ), + timeseries.WithPrometheusTarget( + `sum(rate(log_warn_count{`+p.PlatformOpts.LabelQuery+`}[$__rate_interval])) by (`+p.PlatformOpts.LegendString+`)`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}} - warn"), + ), + timeseries.WithPrometheusTarget( + `sum(rate(log_error_count{`+p.PlatformOpts.LabelQuery+`}[$__rate_interval])) by (`+p.PlatformOpts.LegendString+`)`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}} - error"), + ), + ), + ), + } +} + +// TODO: fix, no data points for OCRv1 +func evmPoolLifecycleRow(p Props) []dashboard.Option { + return []dashboard.Option{ + dashboard.Row( + "EVM Pool Lifecycle", + row.Collapse(), + row.WithTimeSeries( + "EVM Pool Highest Seen Block", + timeseries.Span(6), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.Axis( + axis.Unit("Block"), + ), + timeseries.WithPrometheusTarget( + `evm_pool_rpc_node_highest_seen_block{`+p.PlatformOpts.LabelQuery+`evmChainID="${evmChainID}"}`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}}"), + ), + ), + row.WithTimeSeries( + "EVM Pool Num Seen Blocks", + timeseries.Span(6), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.Axis( + axis.Unit("Block"), + ), + timeseries.WithPrometheusTarget( + `evm_pool_rpc_node_num_seen_blocks{`+p.PlatformOpts.LabelQuery+`}`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}}"), + ), + ), + row.WithTimeSeries( + "EVM Pool Node Polls Total", + timeseries.Span(6), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.Axis( + axis.Unit("Block"), + ), + timeseries.WithPrometheusTarget( + `evm_pool_rpc_node_polls_total{`+p.PlatformOpts.LabelQuery+`}`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}}"), + ), + ), + row.WithTimeSeries( + "EVM Pool Node Polls Failed", + timeseries.Span(6), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.Axis( + axis.Unit("Block"), + ), + timeseries.WithPrometheusTarget( + `evm_pool_rpc_node_polls_failed{`+p.PlatformOpts.LabelQuery+`}`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}}"), + ), + ), + row.WithTimeSeries( + "EVM Pool Node Polls Success", + timeseries.Span(6), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.Axis( + axis.Unit("Block"), + ), + timeseries.WithPrometheusTarget( + `evm_pool_rpc_node_polls_success{`+p.PlatformOpts.LabelQuery+`}`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}}"), + ), + ), + ), + } +} + +func nodesRPCRow(p Props) []dashboard.Option { + return []dashboard.Option{ + dashboard.Row( + "Node RPC State", + row.Collapse(), + row.WithStat( + "Node RPC Alive", + stat.DataSource(p.PrometheusDataSource), + stat.Text(stat.TextValueAndName), + stat.Orientation(stat.OrientationHorizontal), + stat.TitleFontSize(12), + stat.ValueFontSize(20), + stat.Span(3), + stat.WithPrometheusTarget( + `sum(multi_node_states{`+p.PlatformOpts.LabelQuery+`chainId=~"$evmChainID", state="Alive"}) by (`+p.PlatformOpts.LegendString+`, chainId)`, + prometheus.Legend("{{pod}} - {{chainId}}"), + ), + ), + row.WithStat( + "Node RPC Closed", + stat.DataSource(p.PrometheusDataSource), + stat.Text(stat.TextValueAndName), + stat.Orientation(stat.OrientationHorizontal), + stat.TitleFontSize(12), + stat.ValueFontSize(20), + stat.Span(3), + stat.WithPrometheusTarget( + `sum(multi_node_states{`+p.PlatformOpts.LabelQuery+`chainId=~"$evmChainID", state="Closed"}) by (`+p.PlatformOpts.LegendString+`, chainId)`, + prometheus.Legend("{{pod}} - {{chainId}}"), + ), + ), + row.WithStat( + "Node RPC Dialed", + stat.DataSource(p.PrometheusDataSource), + stat.Text(stat.TextValueAndName), + stat.Orientation(stat.OrientationHorizontal), + stat.TitleFontSize(12), + stat.ValueFontSize(20), + stat.Span(3), + stat.WithPrometheusTarget( + `sum(multi_node_states{`+p.PlatformOpts.LabelQuery+`chainId=~"$evmChainID", state="Dialed"}) by (`+p.PlatformOpts.LegendString+`, chainId)`, + prometheus.Legend("{{pod}} - {{chainId}}"), + ), + ), + row.WithStat( + "Node RPC InvalidChainID", + stat.DataSource(p.PrometheusDataSource), + stat.Text(stat.TextValueAndName), + stat.Orientation(stat.OrientationHorizontal), + stat.TitleFontSize(12), + stat.ValueFontSize(20), + stat.Span(3), + stat.WithPrometheusTarget( + `sum(multi_node_states{`+p.PlatformOpts.LabelQuery+`chainId=~"$evmChainID", state="InvalidChainID"}) by (`+p.PlatformOpts.LegendString+`, chainId)`, + prometheus.Legend("{{pod}} - {{chainId}}"), + ), + ), + row.WithStat( + "Node RPC OutOfSync", + stat.DataSource(p.PrometheusDataSource), + stat.Text(stat.TextValueAndName), + stat.Orientation(stat.OrientationHorizontal), + stat.TitleFontSize(12), + stat.ValueFontSize(20), + stat.Span(3), + stat.WithPrometheusTarget( + `sum(multi_node_states{`+p.PlatformOpts.LabelQuery+`chainId=~"$evmChainID", state="OutOfSync"}) by (`+p.PlatformOpts.LegendString+`, chainId)`, + prometheus.Legend("{{pod}} - {{chainId}}"), + ), + ), + row.WithStat( + "Node RPC UnDialed", + stat.DataSource(p.PrometheusDataSource), + stat.Text(stat.TextValueAndName), + stat.Orientation(stat.OrientationHorizontal), + stat.TitleFontSize(12), + stat.ValueFontSize(20), + stat.Span(3), + stat.WithPrometheusTarget( + `sum(multi_node_states{`+p.PlatformOpts.LabelQuery+`chainId=~"$evmChainID", state="Undialed"}) by (`+p.PlatformOpts.LegendString+`, chainId)`, + prometheus.Legend("{{pod}} - {{chainId}}"), + ), + ), + row.WithStat( + "Node RPC Unreachable", + stat.DataSource(p.PrometheusDataSource), + stat.Text(stat.TextValueAndName), + stat.Orientation(stat.OrientationHorizontal), + stat.TitleFontSize(12), + stat.ValueFontSize(20), + stat.Span(3), + stat.WithPrometheusTarget( + `sum(multi_node_states{`+p.PlatformOpts.LabelQuery+`chainId=~"$evmChainID", state="Unreachable"}) by (`+p.PlatformOpts.LegendString+`, chainId)`, + prometheus.Legend("{{pod}} - {{chainId}}"), + ), + ), + row.WithStat( + "Node RPC Unusable", + stat.DataSource(p.PrometheusDataSource), + stat.Text(stat.TextValueAndName), + stat.Orientation(stat.OrientationHorizontal), + stat.TitleFontSize(12), + stat.ValueFontSize(20), + stat.Span(3), + stat.WithPrometheusTarget( + `sum(multi_node_states{`+p.PlatformOpts.LabelQuery+`chainId=~"$evmChainID", state="Unusable"}) by (`+p.PlatformOpts.LegendString+`, chainId)`, + prometheus.Legend("{{pod}} - {{chainId}}"), + ), + ), + ), + } +} + +func evmNodeRPCRow(p Props) []dashboard.Option { + return []dashboard.Option{ + dashboard.Row( + "EVM Pool RPC Node Metrics (App)", + row.Collapse(), + row.WithTimeSeries( + "EVM Pool RPC Node Calls Success Rate", + timeseries.Span(12), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.Axis( + axis.Unit(""), + axis.Label("%"), + axis.SoftMin(0), + axis.SoftMax(100), + ), + timeseries.WithPrometheusTarget( + `sum(increase(evm_pool_rpc_node_calls_success{`+p.PlatformOpts.LabelQuery+`}[$__rate_interval])) by (`+p.PlatformOpts.LegendString+`, evmChainID, nodeName) / sum(increase(evm_pool_rpc_node_calls_total{`+p.PlatformOpts.LabelQuery+`}[$__rate_interval])) by (`+p.PlatformOpts.LegendString+`, evmChainID, nodeName) * 100`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}} - {{evmChainID}} - {{nodeName}}"), + ), + ), + row.WithGauge( + "EVM Pool RPC Node Calls Success Rate", + gauge.Span(12), + gauge.Orientation(gauge.OrientationVertical), + gauge.DataSource(p.PrometheusDataSource), + gauge.Unit("percentunit"), + gauge.WithPrometheusTarget( + `sum(increase(evm_pool_rpc_node_calls_success{`+p.PlatformOpts.LabelQuery+`}[$__rate_interval])) by (`+p.PlatformOpts.LegendString+`, evmChainID, nodeName) / sum(increase(evm_pool_rpc_node_calls_total{`+p.PlatformOpts.LabelQuery+`}[$__rate_interval])) by (`+p.PlatformOpts.LegendString+`, evmChainID, nodeName)`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}} - {{evmChainID}} - {{nodeName}}"), + ), + gauge.AbsoluteThresholds([]gauge.ThresholdStep{ + {Color: "#ff0000"}, + {Color: "#ffa500", Value: float64Ptr(0.8)}, + {Color: "#00ff00", Value: float64Ptr(0.9)}, + }), + ), + // issue when value is 0 + row.WithTimeSeries( + "EVM Pool RPC Node Dials Success Rate", + timeseries.Span(12), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.Axis( + axis.Unit(""), + axis.Label("%"), + axis.SoftMin(0), + axis.SoftMax(100), + ), + timeseries.WithPrometheusTarget( + `sum(increase(evm_pool_rpc_node_dials_success{`+p.PlatformOpts.LabelQuery+`}[$__rate_interval])) by (`+p.PlatformOpts.LegendString+`, evmChainID, nodeName) / sum(increase(evm_pool_rpc_node_dials_total{`+p.PlatformOpts.LabelQuery+`}[$__rate_interval])) by (`+p.PlatformOpts.LegendString+`, evmChainID, nodeName) * 100`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}} - {{evmChainID}} - {{nodeName}}"), + ), + ), + // issue when value is 0 + row.WithTimeSeries( + "EVM Pool RPC Node Dials Failure Rate", + timeseries.Span(12), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.Axis( + axis.Unit(""), + axis.Label("%"), + axis.SoftMin(0), + axis.SoftMax(100), + ), + timeseries.WithPrometheusTarget( + `sum(increase(evm_pool_rpc_node_dials_failed{`+p.PlatformOpts.LabelQuery+`}[$__rate_interval])) by (`+p.PlatformOpts.LegendString+`, evmChainID, nodeName) / sum(increase(evm_pool_rpc_node_dials_total{`+p.PlatformOpts.LabelQuery+`}[$__rate_interval])) by (`+p.PlatformOpts.LegendString+`, evmChainID, nodeName) * 100`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}} - {{evmChainID}} - {{nodeName}}"), + ), + ), + row.WithTimeSeries( + "EVM Pool RPC Node Transitions", + timeseries.Span(6), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.Axis( + axis.Unit(""), + ), + timeseries.WithPrometheusTarget( + `evm_pool_rpc_node_num_transitions_to_alive{`+p.PlatformOpts.LabelQuery+`}`, + prometheus.Legend(""), + ), + timeseries.WithPrometheusTarget( + `evm_pool_rpc_node_num_transitions_to_in_sync{`+p.PlatformOpts.LabelQuery+`}`, + prometheus.Legend(""), + ), + timeseries.WithPrometheusTarget( + `evm_pool_rpc_node_num_transitions_to_out_of_sync{`+p.PlatformOpts.LabelQuery+`}`, + prometheus.Legend(""), + ), + timeseries.WithPrometheusTarget( + `evm_pool_rpc_node_num_transitions_to_unreachable{`+p.PlatformOpts.LabelQuery+`}`, + prometheus.Legend(""), + ), + timeseries.WithPrometheusTarget( + `evm_pool_rpc_node_num_transitions_to_invalid_chain_id{`+p.PlatformOpts.LabelQuery+`}`, + prometheus.Legend(""), + ), + timeseries.WithPrometheusTarget( + `evm_pool_rpc_node_num_transitions_to_unusable{`+p.PlatformOpts.LabelQuery+`}`, + prometheus.Legend(""), + ), + ), + row.WithTimeSeries( + "EVM Pool RPC Node States", + timeseries.Span(6), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.Axis( + axis.Unit(""), + ), + timeseries.WithPrometheusTarget( + `evm_pool_rpc_node_states{`+p.PlatformOpts.LabelQuery+`}`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}} - {{evmChainID}} - {{state}}"), + ), + ), + row.WithTimeSeries( + "EVM Pool RPC Node Verifies Success Rate", + timeseries.Span(6), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.Axis( + axis.Unit(""), + axis.Label("%"), + axis.SoftMin(0), + axis.SoftMax(100), + ), + timeseries.WithPrometheusTarget( + `sum(increase(evm_pool_rpc_node_verifies_success{`+p.PlatformOpts.LabelQuery+`}[$__rate_interval])) by (`+p.PlatformOpts.LegendString+`, evmChainID, nodeName) / sum(increase(evm_pool_rpc_node_verifies{`+p.PlatformOpts.LabelQuery+`}[$__rate_interval])) by (`+p.PlatformOpts.LegendString+`, evmChainID, nodeName) * 100`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}} - {{evmChainID}} - {{nodeName}}"), + ), + ), + row.WithTimeSeries( + "EVM Pool RPC Node Verifies Failure Rate", + timeseries.Span(6), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.Axis( + axis.Unit(""), + axis.Label("%"), + axis.SoftMin(0), + axis.SoftMax(100), + ), + timeseries.WithPrometheusTarget( + `sum(increase(evm_pool_rpc_node_verifies_failed{`+p.PlatformOpts.LabelQuery+`}[$__rate_interval])) by (`+p.PlatformOpts.LegendString+`, evmChainID, nodeName) / sum(increase(evm_pool_rpc_node_verifies{`+p.PlatformOpts.LabelQuery+`}[$__rate_interval])) by (`+p.PlatformOpts.LegendString+`, evmChainID, nodeName) * 100`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}} - {{evmChainID}} - {{nodeName}}"), + ), + ), + ), + } +} + +func evmRPCNodeLatenciesRow(p Props) []dashboard.Option { + return []dashboard.Option{ + dashboard.Row( + "EVM Pool RPC Node Latencies (App)", + row.Collapse(), + row.WithTimeSeries( + "EVM Pool RPC Node Calls Latency 0.90 quantile", + timeseries.Span(12), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.Axis( + axis.Unit("ms"), + ), + timeseries.WithPrometheusTarget( + `histogram_quantile(0.90, sum(rate(evm_pool_rpc_node_rpc_call_time_bucket{`+p.PlatformOpts.LabelQuery+`}[$__rate_interval])) by (`+p.PlatformOpts.LegendString+`, le, rpcCallName)) / 1e6`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}} - {{rpcCallName}}"), + ), + ), + row.WithTimeSeries( + "EVM Pool RPC Node Calls Latency 0.95 quantile", + timeseries.Span(12), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.Axis( + axis.Unit("ms"), + ), + timeseries.WithPrometheusTarget( + `histogram_quantile(0.95, sum(rate(evm_pool_rpc_node_rpc_call_time_bucket{`+p.PlatformOpts.LabelQuery+`}[$__rate_interval])) by (`+p.PlatformOpts.LegendString+`, le, rpcCallName)) / 1e6`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}} - {{rpcCallName}}"), + ), + ), + row.WithTimeSeries( + "EVM Pool RPC Node Calls Latency 0.99 quantile", + timeseries.Span(12), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.Axis( + axis.Unit("ms"), + ), + timeseries.WithPrometheusTarget( + `histogram_quantile(0.99, sum(rate(evm_pool_rpc_node_rpc_call_time_bucket{`+p.PlatformOpts.LabelQuery+`}[$__rate_interval])) by (`+p.PlatformOpts.LegendString+`, le, rpcCallName)) / 1e6`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}} - {{rpcCallName}}"), + ), + ), + ), + } +} + +func evmBlockHistoryEstimatorRow(p Props) []dashboard.Option { + return []dashboard.Option{ + dashboard.Row("Block History Estimator", + row.Collapse(), + row.WithTimeSeries( + "Gas Updater All Gas Price Percentiles", + timeseries.Span(6), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.Axis( + axis.Unit(""), + ), + timeseries.WithPrometheusTarget( + `gas_updater_all_gas_price_percentiles{`+p.PlatformOpts.LabelQuery+`}`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}} - {{ percentile }}"), + ), + ), + row.WithTimeSeries( + "Gas Updater All Tip Cap Percentiles", + timeseries.Span(6), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.Axis( + axis.Unit(""), + ), + timeseries.WithPrometheusTarget( + `gas_updater_all_tip_cap_percentiles{`+p.PlatformOpts.LabelQuery+`}`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}} - {{ percentile }}"), + ), + ), + row.WithTimeSeries( + "Gas Updater Set Gas Price", + timeseries.Span(6), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.Axis( + axis.Unit(""), + ), + timeseries.WithPrometheusTarget( + `gas_updater_set_gas_price{`+p.PlatformOpts.LabelQuery+`}`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}}"), + ), + ), + row.WithTimeSeries( + "Gas Updater Set Tip Cap", + timeseries.Span(6), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.Axis( + axis.Unit(""), + ), + timeseries.WithPrometheusTarget( + `gas_updater_set_tip_cap{`+p.PlatformOpts.LabelQuery+`}`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}}"), + ), + ), + row.WithTimeSeries( + "Gas Updater Current Base Fee", + timeseries.Span(6), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.Axis( + axis.Unit(""), + ), + timeseries.WithPrometheusTarget( + `gas_updater_current_base_fee{`+p.PlatformOpts.LabelQuery+`}`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}}"), + ), + ), + row.WithTimeSeries( + "Block History Estimator Connectivity Failure Count", + timeseries.Span(6), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.Axis( + axis.Unit(""), + ), + timeseries.WithPrometheusTarget( + `block_history_estimator_connectivity_failure_count{`+p.PlatformOpts.LabelQuery+`}`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}}"), + ), + ), + ), + } +} + +func pipelinesRow(p Props) []dashboard.Option { + return []dashboard.Option{ + dashboard.Row("Pipeline Metrics (Runner)", + row.Collapse(), + row.WithTimeSeries( + "Pipeline Task Execution Time", + timeseries.Span(12), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.Axis( + axis.Unit("Sec"), + ), + timeseries.WithPrometheusTarget( + `pipeline_task_execution_time{`+p.PlatformOpts.LabelQuery+`} / 1e6`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}} JobID: {{ job_id }}"), + ), + ), + row.WithTimeSeries( + "Pipeline Run Errors", + timeseries.Span(12), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.Axis( + axis.Unit(""), + ), + timeseries.WithPrometheusTarget( + `pipeline_run_errors{`+p.PlatformOpts.LabelQuery+`}`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}} JobID: {{ job_id }}"), + ), + ), + row.WithTimeSeries( + "Pipeline Run Total Time to Completion", + timeseries.Span(12), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.Axis( + axis.Unit("Sec"), + ), + timeseries.WithPrometheusTarget( + `pipeline_run_total_time_to_completion{`+p.PlatformOpts.LabelQuery+`} / 1e6`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}} JobID: {{ job_id }}"), + ), + ), + row.WithTimeSeries( + "Pipeline Tasks Total Finished", + timeseries.Span(12), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.Axis( + axis.Unit(""), + ), + timeseries.WithPrometheusTarget( + `pipeline_tasks_total_finished{`+p.PlatformOpts.LabelQuery+`}`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}} JobID: {{ job_id }}"), + ), + ), + ), + dashboard.Row( + "Pipeline Metrics (ETHCall)", + row.Collapse(), + row.WithTimeSeries( + "Pipeline Task ETH Call Execution Time", + timeseries.Span(12), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.Axis( + axis.Unit("Sec"), + ), + timeseries.WithPrometheusTarget( + `pipeline_task_eth_call_execution_time{`+p.PlatformOpts.LabelQuery+`}`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}}"), + ), + ), + ), + dashboard.Row( + "Pipeline Metrics (HTTP)", + row.Collapse(), + row.WithTimeSeries( + "Pipeline Task HTTP Fetch Time", + timeseries.Span(6), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.Axis( + axis.Unit("Sec"), + ), + timeseries.WithPrometheusTarget( + `pipeline_task_http_fetch_time{`+p.PlatformOpts.LabelQuery+`} / 1e6`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}}"), + ), + ), + row.WithTimeSeries( + "Pipeline Task HTTP Response Body Size", + timeseries.Span(6), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.Axis( + axis.Unit("Bytes"), + ), + timeseries.WithPrometheusTarget( + `pipeline_task_http_response_body_size{`+p.PlatformOpts.LabelQuery+`}`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}}"), + ), + ), + ), + dashboard.Row( + "Pipeline Metrics (Bridge)", + row.Collapse(), + row.WithTimeSeries( + "Pipeline Bridge Latency", + timeseries.Span(6), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.Axis( + axis.Unit("Sec"), + ), + timeseries.WithPrometheusTarget( + `bridge_latency_seconds{`+p.PlatformOpts.LabelQuery+`}`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}}"), + ), + ), + row.WithTimeSeries( + "Pipeline Bridge Errors Total", + timeseries.Span(6), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.Axis( + axis.Unit(""), + ), + timeseries.WithPrometheusTarget( + `bridge_errors_total{`+p.PlatformOpts.LabelQuery+`}`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}}"), + ), + ), + row.WithTimeSeries( + "Pipeline Bridge Cache Hits Total", + timeseries.Span(6), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.Axis( + axis.Unit(""), + ), + timeseries.WithPrometheusTarget( + `bridge_cache_hits_total{`+p.PlatformOpts.LabelQuery+`}`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}}"), + ), + ), + row.WithTimeSeries( + "Pipeline Bridge Cache Errors Total", + timeseries.Span(6), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.Axis( + axis.Unit(""), + ), + timeseries.WithPrometheusTarget( + `bridge_cache_errors_total{`+p.PlatformOpts.LabelQuery+`}`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}}"), + ), + ), + ), + dashboard.Row( + "Pipeline Metrics", + row.Collapse(), + row.WithTimeSeries( + "Pipeline Runs Queued", + timeseries.Span(6), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.Axis( + axis.Unit(""), + ), + timeseries.WithPrometheusTarget( + `pipeline_runs_queued{`+p.PlatformOpts.LabelQuery+`}`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}}"), + ), + ), + row.WithTimeSeries( + "Pipeline Runs Tasks Queued", + timeseries.Span(6), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.Axis( + axis.Unit(""), + ), + timeseries.WithPrometheusTarget( + `pipeline_task_runs_queued{`+p.PlatformOpts.LabelQuery+`}`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}}"), + ), + ), + ), + } +} + +func httpAPIRow(p Props) []dashboard.Option { + return []dashboard.Option{ + + dashboard.Row( + "HTTP API Metrics", + row.Collapse(), + row.WithTimeSeries( + "Request Duration p95", + timeseries.Span(12), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.Axis( + axis.Unit("Sec"), + ), + timeseries.WithPrometheusTarget( + `histogram_quantile(0.95, sum(rate(service_gonic_request_duration_bucket{`+p.PlatformOpts.LabelQuery+`}[$__rate_interval])) by (`+p.PlatformOpts.LegendString+`, le, path, method))`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}} - {{ method }} - {{ path }}"), + ), + ), + row.WithTimeSeries( + "Request Total Rate over interval", + timeseries.Span(12), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.Axis( + axis.Unit(""), + ), + timeseries.WithPrometheusTarget( + `sum(rate(service_gonic_requests_total{`+p.PlatformOpts.LabelQuery+`}[$__rate_interval])) by (`+p.PlatformOpts.LegendString+`, path, method, code)`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}} - {{ method }} - {{ path }} - {{ code }}"), + ), + ), + row.WithTimeSeries( + "Average Request Size", + timeseries.Span(6), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.Axis( + axis.Unit("Bytes"), + ), + timeseries.WithPrometheusTarget( + `avg(rate(service_gonic_request_size_bytes_sum{`+p.PlatformOpts.LabelQuery+`}[$__rate_interval])) by (`+p.PlatformOpts.LegendString+`)/avg(rate(service_gonic_request_size_bytes_count{`+p.PlatformOpts.LabelQuery+`}[$__rate_interval])) by (`+p.PlatformOpts.LegendString+`)`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}}"), + ), + ), + row.WithTimeSeries( + "Response Size", + timeseries.Span(6), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.Axis( + axis.Unit("Bytes"), + ), + timeseries.WithPrometheusTarget( + `avg(rate(service_gonic_response_size_bytes_sum{`+p.PlatformOpts.LabelQuery+`}[$__rate_interval])) by (`+p.PlatformOpts.LegendString+`)/avg(rate(service_gonic_response_size_bytes_count{`+p.PlatformOpts.LabelQuery+`}[$__rate_interval])) by (`+p.PlatformOpts.LegendString+`)`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}}"), + ), + ), + ), + } +} + +func promHTTPRow(p Props) []dashboard.Option { + return []dashboard.Option{ + dashboard.Row( + "PromHTTP Metrics", + row.Collapse(), + row.WithGauge("HTTP Request in flight", + gauge.Span(12), + gauge.Orientation(gauge.OrientationVertical), + gauge.DataSource(p.PrometheusDataSource), + gauge.WithPrometheusTarget( + `promhttp_metric_handler_requests_in_flight{`+p.PlatformOpts.LabelQuery+`}`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}}"), + ), + ), + row.WithTimeSeries( + "HTTP rate", + timeseries.Span(12), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.Axis( + axis.Unit(""), + ), + timeseries.WithPrometheusTarget( + `sum(rate(promhttp_metric_handler_requests_total{`+p.PlatformOpts.LabelQuery+`}[$__rate_interval])) by (`+p.PlatformOpts.LegendString+`, code)`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}}"), + ), + ), + ), + } +} + +func goMetricsRow(p Props) []dashboard.Option { + return []dashboard.Option{ + dashboard.Row( + "Go Metrics", + row.Collapse(), + row.WithTable( + "Threads", + table.Span(3), + table.Height("200px"), + table.DataSource(p.PrometheusDataSource), + table.WithPrometheusTarget( + `sum(go_threads{`+p.PlatformOpts.LabelQuery+`}) by (`+p.PlatformOpts.LegendString+`)`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}}")), + table.HideColumn("Time"), + table.AsTimeSeriesAggregations([]table.Aggregation{ + {Label: "AVG", Type: table.AVG}, + {Label: "Current", Type: table.Current}, + }), + ), + row.WithTimeSeries( + "Threads", + timeseries.Span(9), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.Axis( + axis.Unit(""), + ), + timeseries.WithPrometheusTarget( + `sum(go_threads{`+p.PlatformOpts.LabelQuery+`}) by (`+p.PlatformOpts.LegendString+`)`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}}"), + ), + ), + row.WithStat( + "Heap Allocations", + stat.Span(12), + stat.Orientation(stat.OrientationVertical), + stat.DataSource(p.PrometheusDataSource), + stat.Unit("bytes"), + stat.ColorValue(), + stat.WithPrometheusTarget( + `sum(go_memstats_heap_alloc_bytes{`+p.PlatformOpts.LabelQuery+`}) by (`+p.PlatformOpts.LegendString+`)`, + ), + ), + row.WithTimeSeries( + "Heap allocations", + timeseries.Span(12), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.WithPrometheusTarget( + `sum(go_memstats_heap_alloc_bytes{`+p.PlatformOpts.LabelQuery+`}) by (`+p.PlatformOpts.LegendString+`)`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}}"), + ), + timeseries.Axis( + axis.Unit("bytes"), + axis.Label("Memory"), + axis.SoftMin(0), + ), + ), + row.WithTimeSeries( + "Memory in Heap", + timeseries.Span(6), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.Axis( + axis.Unit("bytes"), + axis.Label("Memory"), + axis.SoftMin(0), + ), + timeseries.WithPrometheusTarget( + `go_memstats_heap_alloc_bytes{`+p.PlatformOpts.LabelQuery+`}`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}} - Alloc"), + ), + timeseries.WithPrometheusTarget( + `go_memstats_heap_sys_bytes{`+p.PlatformOpts.LabelQuery+`}`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}} - Sys"), + ), + timeseries.WithPrometheusTarget( + `go_memstats_heap_idle_bytes{`+p.PlatformOpts.LabelQuery+`}`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}} - Idle"), + ), + timeseries.WithPrometheusTarget( + `go_memstats_heap_inuse_bytes{`+p.PlatformOpts.LabelQuery+`}`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}} - InUse"), + ), + timeseries.WithPrometheusTarget( + `go_memstats_heap_released_bytes{`+p.PlatformOpts.LabelQuery+`}`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}} - Released"), + ), + ), + row.WithTimeSeries( + "Memory in Off-Heap", + timeseries.Span(6), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.Axis( + axis.Unit("bytes"), + axis.Label("Memory"), + axis.SoftMin(0), + ), + timeseries.WithPrometheusTarget( + `go_memstats_mspan_inuse_bytes{`+p.PlatformOpts.LabelQuery+`}`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}} - Total InUse"), + ), + timeseries.WithPrometheusTarget( + `go_memstats_mspan_sys_bytes{`+p.PlatformOpts.LabelQuery+`}`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}} - Total Sys"), + ), + timeseries.WithPrometheusTarget( + `go_memstats_mcache_inuse_bytes{`+p.PlatformOpts.LabelQuery+`}`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}} - Cache InUse"), + ), + timeseries.WithPrometheusTarget( + `go_memstats_mcache_sys_bytes{`+p.PlatformOpts.LabelQuery+`}`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}} - Cache Sys"), + ), + timeseries.WithPrometheusTarget( + `go_memstats_buck_hash_sys_bytes{`+p.PlatformOpts.LabelQuery+`}`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}} - Hash Sys"), + ), + timeseries.WithPrometheusTarget( + `go_memstats_gc_sys_bytes{`+p.PlatformOpts.LabelQuery+`}`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}} - GC Sys"), + ), + timeseries.WithPrometheusTarget( + `go_memstats_other_sys_bytes{`+p.PlatformOpts.LabelQuery+`}`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}} - bytes of memory are used for other runtime allocations"), + ), + timeseries.WithPrometheusTarget( + `go_memstats_next_gc_bytes{`+p.PlatformOpts.LabelQuery+`}`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}} - Next GC"), + ), + ), + row.WithTimeSeries( + "Memory in Stack", + timeseries.Span(6), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.WithPrometheusTarget( + `go_memstats_stack_inuse_bytes{`+p.PlatformOpts.LabelQuery+`}`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}} - InUse"), + ), + timeseries.WithPrometheusTarget( + `go_memstats_stack_sys_bytes{`+p.PlatformOpts.LabelQuery+`}`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}} - Sys"), + ), + timeseries.Axis( + axis.Unit("bytes"), + axis.Label("Memory"), + axis.SoftMin(0), + ), + ), + row.WithTimeSeries( + "Total Used Memory", + timeseries.Span(6), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.WithPrometheusTarget( + `go_memstats_sys_bytes{`+p.PlatformOpts.LabelQuery+`}`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}}"), + ), + timeseries.Axis( + axis.Unit("bytes"), + axis.Label("Memory"), + axis.SoftMin(0), + ), + ), + row.WithTimeSeries( + "Number of Live Objects", + timeseries.Span(6), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.WithPrometheusTarget( + `go_memstats_mallocs_total{`+p.PlatformOpts.LabelQuery+`} - go_memstats_frees_total{`+p.PlatformOpts.LabelQuery+`}`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}}"), + ), + timeseries.Axis( + axis.SoftMin(0), + ), + ), + row.WithTimeSeries( + "Rate of Objects Allocated", + timeseries.Span(6), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.WithPrometheusTarget( + `rate(go_memstats_mallocs_total{`+p.PlatformOpts.LabelQuery+`}[1m])`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}}"), + ), + timeseries.Axis( + axis.SoftMin(0), + ), + ), + row.WithTimeSeries( + "Rate of a Pointer Dereferences", + timeseries.Span(6), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.WithPrometheusTarget( + `rate(go_memstats_lookups_total{`+p.PlatformOpts.LabelQuery+`}[1m])`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}}"), + ), + timeseries.Axis( + axis.Unit("ops"), + axis.SoftMin(0), + ), + ), + row.WithTimeSeries( + "Goroutines", + timeseries.Span(6), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.WithPrometheusTarget( + `go_goroutines{`+p.PlatformOpts.LabelQuery+`}`, + prometheus.Legend("{{"+p.PlatformOpts.LegendString+"}}"), + ), + timeseries.Axis( + axis.SoftMin(0), + ), + ), + ), + } +} + +func float64Ptr(input float64) *float64 { + return &input +} + +func New(p Props) []dashboard.Option { + opts := vars(p) + opts = append(opts, generalInfoRow(p)...) + opts = append(opts, logPollerRow(p)...) + opts = append(opts, feedJobsRow(p)...) + opts = append(opts, mailBoxRow(p)...) + opts = append(opts, promReporterRow(p)...) + opts = append(opts, txManagerRow(p)...) + opts = append(opts, headTrackerRow(p)...) + opts = append(opts, appDBConnectionsRow(p)...) + opts = append(opts, sqlQueriesRow(p)...) + opts = append(opts, logsCountersRow(p)...) + opts = append(opts, evmPoolLifecycleRow(p)...) + opts = append(opts, nodesRPCRow(p)...) + opts = append(opts, evmNodeRPCRow(p)...) + opts = append(opts, evmRPCNodeLatenciesRow(p)...) + opts = append(opts, evmBlockHistoryEstimatorRow(p)...) + opts = append(opts, pipelinesRow(p)...) + opts = append(opts, httpAPIRow(p)...) + opts = append(opts, promHTTPRow(p)...) + opts = append(opts, goMetricsRow(p)...) + return opts +} diff --git a/dashboard-lib/core-don/platform.go b/dashboard-lib/core-don/platform.go new file mode 100644 index 00000000000..fbfed548146 --- /dev/null +++ b/dashboard-lib/core-don/platform.go @@ -0,0 +1,45 @@ +package core_don + +import "fmt" + +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(platform string) PlatformOpts { + po := PlatformOpts{ + LabelFilters: map[string]string{ + "instance": `=~"${instance}"`, + "commit": `=~"${commit:pipe}"`, + }, + } + switch platform { + case "kubernetes": + po.LabelFilters = map[string]string{ + "namespace": `=~"${namespace}"`, + "pod": `=~"${pod}"`, + } + po.LabelFilter = "job" + po.LegendString = "pod" + break + case "docker": + po.LabelFilters = map[string]string{ + "instance": `=~"${instance}"`, + } + po.LabelFilter = "instance" + po.LegendString = "instance" + break + default: + panic(fmt.Sprintf("failed to generate Platform dependent queries, unknown platform: %s", platform)) + } + for key, value := range po.LabelFilters { + po.LabelQuery += key + value + ", " + } + return po +} diff --git a/dashboard-lib/core-ocrv2-ccip/component.go b/dashboard-lib/core-ocrv2-ccip/component.go new file mode 100644 index 00000000000..837f693fcc7 --- /dev/null +++ b/dashboard-lib/core-ocrv2-ccip/component.go @@ -0,0 +1,83 @@ +package core_ocrv2_ccip + +import ( + "fmt" + "github.com/K-Phoen/grabana/dashboard" + "github.com/K-Phoen/grabana/row" + "github.com/K-Phoen/grabana/target/prometheus" + "github.com/K-Phoen/grabana/timeseries" +) + +type Props struct { + PrometheusDataSource string + PluginName string +} + +func quantileRowOpts(ds string, pluginName string, perc string) row.Option { + return row.WithTimeSeries( + fmt.Sprintf("(%s) OCR2 duration (%s)", pluginName, perc), + timeseries.Span(6), + timeseries.Height("200px"), + timeseries.DataSource(ds), + timeseries.WithPrometheusTarget( + fmt.Sprintf(`histogram_quantile(%s, sum(rate(ocr2_reporting_plugin_observation_time_bucket{plugin="%s", job=~"$instance", chainID=~"$evmChainID"}[$__rate_interval])) by (le)) / 1e9`, perc, pluginName), + prometheus.Legend("Observation"), + ), + timeseries.WithPrometheusTarget( + fmt.Sprintf(`histogram_quantile(%s, sum(rate(ocr2_reporting_plugin_report_time_bucket{plugin="%s", job=~"$instance", chainID=~"$evmChainID"}[$__rate_interval])) by (le)) / 1e9`, perc, pluginName), + prometheus.Legend("Report"), + ), + timeseries.WithPrometheusTarget( + fmt.Sprintf(`histogram_quantile(%s, sum(rate(ocr2_reporting_plugin_should_accept_finalized_report_time_bucket{plugin="%s", job=~"$instance", chainID=~"$evmChainID"}[$__rate_interval])) by (le)) / 1e9`, perc, pluginName), + prometheus.Legend("ShouldAcceptFinalizedReport"), + ), + timeseries.WithPrometheusTarget( + fmt.Sprintf(`histogram_quantile(%s, sum(rate(ocr2_reporting_plugin_should_transmit_accepted_report_time_bucket{plugin="%s", job=~"$instance", chainID=~"$evmChainID"}[$__rate_interval])) by (le)) / 1e9`, perc, pluginName), + prometheus.Legend("ShouldTransmitAcceptedReport"), + ), + ) +} + +func ocrv2PluginObservationStageQuantiles(p Props) []dashboard.Option { + opts := make([]row.Option, 0) + opts = append(opts, + row.Collapse(), + row.WithTimeSeries( + fmt.Sprintf("(%s) OCR2 RPS by phase", p.PluginName), + timeseries.Span(6), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.WithPrometheusTarget( + fmt.Sprintf(`sum(rate(ocr2_reporting_plugin_observation_time_count{plugin="%s", job=~"$instance", chainID=~"$evmChainID"}[$__range]))`, p.PluginName), + prometheus.Legend("Observation"), + ), + timeseries.WithPrometheusTarget( + fmt.Sprintf(`sum(rate(ocr2_reporting_plugin_report_time_count{plugin="%s", job=~"$instance", chainID=~"$evmChainID"}[$__range]))`, p.PluginName), + prometheus.Legend("Report"), + ), + timeseries.WithPrometheusTarget( + fmt.Sprintf(`sum(rate(ocr2_reporting_plugin_should_accept_finalized_report_time_count{plugin="%s", job=~"$instance", chainID=~"$evmChainID"}[$__range]))`, p.PluginName), + prometheus.Legend("ShouldAcceptFinalizedReport"), + ), + timeseries.WithPrometheusTarget( + fmt.Sprintf(`sum(rate(ocr2_reporting_plugin_should_transmit_accepted_report_time_count{plugin="%s", job=~"$instance", chainID=~"$evmChainID"}[$__range]))`, p.PluginName), + prometheus.Legend("ShouldTransmitAcceptedReport"), + ), + ), + quantileRowOpts(p.PrometheusDataSource, p.PluginName, "0.5"), + quantileRowOpts(p.PrometheusDataSource, p.PluginName, "0.9"), + quantileRowOpts(p.PrometheusDataSource, p.PluginName, "0.99"), + ) + return []dashboard.Option{ + dashboard.Row( + fmt.Sprintf("OCRv2 Metrics - Plugin: %s", p.PluginName), + opts..., + ), + } +} + +func New(p Props) []dashboard.Option { + opts := make([]dashboard.Option, 0) + opts = append(opts, ocrv2PluginObservationStageQuantiles(p)...) + return opts +} diff --git a/dashboard-lib/dashboard.go b/dashboard-lib/dashboard.go new file mode 100644 index 00000000000..73dde5704f0 --- /dev/null +++ b/dashboard-lib/dashboard.go @@ -0,0 +1,90 @@ +package dashboard_lib + +import ( + "context" + "encoding/json" + "github.com/K-Phoen/grabana" + "github.com/K-Phoen/grabana/dashboard" + "github.com/pkg/errors" + "net/http" + "os" +) + +type Dashboard struct { + Name string + DeployOpts EnvConfig + /* SDK panels that are missing in Grabana */ + SDKPanels []map[string]interface{} + /* generated dashboard opts and builder */ + builder dashboard.Builder + Opts []dashboard.Option +} + +func NewDashboard( + name string, + deployOpts EnvConfig, + opts []dashboard.Option, +) *Dashboard { + return &Dashboard{ + Name: name, + DeployOpts: deployOpts, + Opts: opts, + } +} + +func (m *Dashboard) Deploy() error { + ctx := context.Background() + b, err := m.build() + if err != nil { + return err + } + client := grabana.NewClient(&http.Client{}, m.DeployOpts.GrafanaURL, grabana.WithAPIToken(m.DeployOpts.GrafanaToken)) + fo, folderErr := client.FindOrCreateFolder(ctx, m.DeployOpts.GrafanaFolder) + if folderErr != nil { + return errors.Wrap(err, "could not find or create Grafana folder") + } + if _, err := client.UpsertDashboard(ctx, fo, b); err != nil { + return errors.Wrap(err, "failed to upsert the dashboard") + } + return nil +} + +func (m *Dashboard) Add(opts []dashboard.Option) { + m.Opts = append(m.Opts, opts...) +} + +func (m *Dashboard) AddSDKPanel(panel map[string]interface{}) { + m.SDKPanels = append(m.SDKPanels, panel) +} + +func (m *Dashboard) build() (dashboard.Builder, error) { + b, err := dashboard.New( + m.Name, + m.Opts..., + ) + if err != nil { + return dashboard.Builder{}, errors.Wrap(err, "failed to build the dashboard") + } + return b, nil +} + +// TODO: re-write after forking Grabana, inject foundation SDK components from official schema +func (m *Dashboard) injectSDKPanels(b dashboard.Builder) (dashboard.Builder, error) { + data, err := b.MarshalIndentJSON() + if err != nil { + return dashboard.Builder{}, err + } + var asMap map[string]interface{} + if err := json.Unmarshal(data, &asMap); err != nil { + return dashboard.Builder{}, err + } + asMap["rows"].([]interface{})[0].(map[string]interface{})["panels"] = append(asMap["rows"].([]interface{})[0].(map[string]interface{})["panels"].([]interface{}), m.SDKPanels[0]) + d, err := json.Marshal(asMap) + if err != nil { + return dashboard.Builder{}, err + } + if err := os.WriteFile("generated_ccip_dashboard.json", d, os.ModePerm); err != nil { + return dashboard.Builder{}, err + } + return b, nil +} diff --git a/dashboard-lib/go.mod b/dashboard-lib/go.mod new file mode 100644 index 00000000000..eef60129771 --- /dev/null +++ b/dashboard-lib/go.mod @@ -0,0 +1,22 @@ +module github.com/smartcontractkit/chainlink/dashboard-lib + +go 1.21.7 + +require ( + github.com/K-Phoen/grabana v0.22.1 + github.com/grafana/grafana-foundation-sdk/go v0.0.0-00010101000000-000000000000 + github.com/pkg/errors v0.9.1 + github.com/rs/zerolog v1.32.0 +) + +replace github.com/grafana/grafana-foundation-sdk/go => github.com/grafana/grafana-foundation-sdk/go v0.0.0-20240314112857-a7c9c6d0044c + +require ( + github.com/K-Phoen/sdk v0.12.4 // indirect + github.com/gosimple/slug v1.13.1 // indirect + github.com/gosimple/unidecode v1.0.1 // indirect + github.com/mattn/go-colorable v0.1.13 // indirect + github.com/mattn/go-isatty v0.0.19 // indirect + github.com/prometheus/common v0.45.0 // indirect + golang.org/x/sys v0.13.0 // indirect +) diff --git a/dashboard-lib/go.sum b/dashboard-lib/go.sum new file mode 100644 index 00000000000..0af3f10f4fe --- /dev/null +++ b/dashboard-lib/go.sum @@ -0,0 +1,37 @@ +github.com/K-Phoen/grabana v0.22.1 h1:b/O+C3H2H6VNYSeMCYUO4X4wYuwFXgBcRkvYa+fjpQA= +github.com/K-Phoen/grabana v0.22.1/go.mod h1:3LTXrTzQzTKTgvKSXdRjlsJbizSOW/V23Q3iX00R5bU= +github.com/K-Phoen/sdk v0.12.4 h1:j2EYuBJm3zDTD0fGKACVFWxAXtkR0q5QzfVqxmHSeGQ= +github.com/K-Phoen/sdk v0.12.4/go.mod h1:qmM0wO23CtoDux528MXPpYvS4XkRWkWX6rvX9Za8EVU= +github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/gosimple/slug v1.13.1 h1:bQ+kpX9Qa6tHRaK+fZR0A0M2Kd7Pa5eHPPsb1JpHD+Q= +github.com/gosimple/slug v1.13.1/go.mod h1:UiRaFH+GEilHstLUmcBgWcI42viBN7mAb818JrYOeFQ= +github.com/gosimple/unidecode v1.0.1 h1:hZzFTMMqSswvf0LBJZCZgThIZrpDHFXux9KeGmn6T/o= +github.com/gosimple/unidecode v1.0.1/go.mod h1:CP0Cr1Y1kogOtx0bJblKzsVWrqYaqfNOnHzpgWw4Awc= +github.com/grafana/grafana-foundation-sdk/go v0.0.0-20240314112857-a7c9c6d0044c h1:0vdGmlvHPzjNHx9Tx8soQEKe1ci0WVtA82s00sZDYUs= +github.com/grafana/grafana-foundation-sdk/go v0.0.0-20240314112857-a7c9c6d0044c/go.mod h1:WtWosval1KCZP9BGa42b8aVoJmVXSg0EvQXi9LDSVZQ= +github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= +github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= +github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= +github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= +github.com/prometheus/common v0.45.0/go.mod h1:YJmSTw9BoKxJplESWWxlbyttQR4uaEcGyv9MZjVOJsY= +github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= +github.com/rs/zerolog v1.32.0 h1:keLypqrlIjaFsbmJOBdB/qvyF8KEtCWHwobLp5l/mQ0= +github.com/rs/zerolog v1.32.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.6.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 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= +golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/dashboard-lib/k8s-pods/component.go b/dashboard-lib/k8s-pods/component.go new file mode 100644 index 00000000000..4ef90c3012f --- /dev/null +++ b/dashboard-lib/k8s-pods/component.go @@ -0,0 +1,198 @@ +package k8spods + +import ( + "github.com/K-Phoen/grabana/dashboard" + "github.com/K-Phoen/grabana/logs" + "github.com/K-Phoen/grabana/row" + "github.com/K-Phoen/grabana/stat" + "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/query" +) + +type Props struct { + LokiDataSource string + PrometheusDataSource string +} + +func vars(p Props) []dashboard.Option { + return []dashboard.Option{ + dashboard.VariableAsQuery( + "namespace", + query.DataSource(p.PrometheusDataSource), + query.Multiple(), + query.IncludeAll(), + query.Request("label_values(namespace)"), + query.Sort(query.NumericalAsc), + ), + dashboard.VariableAsQuery( + "pod", + query.DataSource(p.PrometheusDataSource), + query.Multiple(), + query.IncludeAll(), + query.Request("label_values(kube_pod_container_info{namespace=\"$namespace\"}, pod)"), + query.Sort(query.NumericalAsc), + ), + } +} + +func logsRow(p Props) []dashboard.Option { + return []dashboard.Option{ + dashboard.Row( + "K8s Logs", + row.Collapse(), + row.WithLogs( + "All Logs", + logs.DataSource(p.LokiDataSource), + logs.Span(12), + logs.Height("300px"), + logs.Transparent(), + logs.WithLokiTarget(`{namespace="$namespace", pod=~"${pod:pipe}"}`), + ), + row.WithLogs( + "All Errors", + logs.DataSource(p.LokiDataSource), + logs.Span(12), + logs.Height("300px"), + logs.Transparent(), + logs.WithLokiTarget(`{namespace="$namespace", pod=~"${pod:pipe}"} | json | level=~"error|warn|fatal|panic"`), + ), + ), + } + +} + +func New(p Props) []dashboard.Option { + opts := vars(p) + opts = append(opts, + []dashboard.Option{ + dashboard.Row( + "K8s Pods", + row.Collapse(), + row.WithStat( + "Pod Restarts", + stat.Span(4), + stat.Text(stat.TextValueAndName), + stat.Orientation(stat.OrientationHorizontal), + stat.DataSource(p.PrometheusDataSource), + stat.SparkLine(), + stat.SparkLineYMin(0), + stat.WithPrometheusTarget( + `sum(increase(kube_pod_container_status_restarts_total{pod=~"$pod", namespace=~"${namespace}"}[$__rate_interval])) by (pod)`, + prometheus.Legend("{{pod}}"), + ), + ), + row.WithStat( + "OOM Events", + stat.Span(4), + stat.Text(stat.TextValueAndName), + stat.Orientation(stat.OrientationHorizontal), + stat.DataSource(p.PrometheusDataSource), + stat.SparkLine(), + stat.SparkLineYMin(0), + stat.WithPrometheusTarget( + `sum(container_oom_events_total{pod=~"$pod", namespace=~"${namespace}"}) by (pod)`, + prometheus.Legend("{{pod}}"), + ), + ), + row.WithStat( + "OOM Killed", + stat.Span(4), + stat.Text(stat.TextValueAndName), + stat.Orientation(stat.OrientationHorizontal), + stat.DataSource(p.PrometheusDataSource), + stat.SparkLine(), + stat.SparkLineYMin(0), + stat.WithPrometheusTarget( + `kube_pod_container_status_last_terminated_reason{reason="OOMKilled", pod=~"$pod", namespace=~"${namespace}"}`, + prometheus.Legend("{{pod}}"), + ), + ), + row.WithTimeSeries( + "CPU Usage", + timeseries.Span(6), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.WithPrometheusTarget( + `sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{pod=~"$pod", namespace=~"${namespace}"}) by (pod)`, + prometheus.Legend("{{pod}}"), + ), + ), + row.WithTimeSeries( + "Memory Usage", + timeseries.Span(6), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.Axis( + axis.Unit("bytes"), + axis.Label("Memory"), + axis.SoftMin(0), + ), + timeseries.WithPrometheusTarget( + `sum(container_memory_rss{pod=~"$pod", namespace=~"${namespace}", container!=""}) by (pod)`, + prometheus.Legend("{{pod}}"), + ), + ), + row.WithTimeSeries( + "Receive Bandwidth", + timeseries.Span(6), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.Axis( + axis.Unit("Bps"), + axis.SoftMin(0), + ), + timeseries.WithPrometheusTarget( + `sum(irate(container_network_receive_bytes_total{pod=~"$pod", namespace=~"${namespace}"}[$__rate_interval])) by (pod)`, + prometheus.Legend("{{pod}}"), + ), + ), + row.WithTimeSeries( + "Transmit Bandwidth", + timeseries.Span(6), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.Axis( + axis.Unit("Bps"), + axis.SoftMin(0), + ), + timeseries.WithPrometheusTarget( + `sum(irate(container_network_transmit_bytes_total{pod=~"$pod", namespace=~"${namespace}"}[$__rate_interval])) by (pod)`, + prometheus.Legend("{{pod}}"), + ), + ), + row.WithTimeSeries( + "Average Container Bandwidth by Namespace: Received", + timeseries.Span(6), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.Axis( + axis.Unit("Bps"), + axis.SoftMin(0), + ), + timeseries.WithPrometheusTarget( + `avg(irate(container_network_receive_bytes_total{pod=~"$pod", namespace=~"${namespace}"}[$__rate_interval])) by (pod)`, + prometheus.Legend("{{pod}}"), + ), + ), + row.WithTimeSeries( + "Average Container Bandwidth by Namespace: Transmitted", + timeseries.Span(6), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.Axis( + axis.Unit("Bps"), + axis.SoftMin(0), + ), + timeseries.WithPrometheusTarget( + `avg(irate(container_network_transmit_bytes_total{pod=~"$pod", namespace=~"${namespace}"}[$__rate_interval])) by (pod)`, + prometheus.Legend("{{pod}}"), + ), + ), + ), + }..., + ) + opts = append(opts, logsRow(p)...) + return opts +} diff --git a/dashboard-lib/log.go b/dashboard-lib/log.go new file mode 100644 index 00000000000..edb4607a0ba --- /dev/null +++ b/dashboard-lib/log.go @@ -0,0 +1,28 @@ +package dashboard_lib + +import ( + "os" + + "github.com/rs/zerolog" + "github.com/rs/zerolog/log" +) + +const ( + LogLevelEnvVar = "DASHBOARD_LOG_LEVEL" +) + +var ( + L zerolog.Logger +) + +func init() { + lvlStr := os.Getenv(LogLevelEnvVar) + if lvlStr == "" { + lvlStr = "info" + } + lvl, err := zerolog.ParseLevel(lvlStr) + if err != nil { + panic(err) + } + L = log.Output(zerolog.ConsoleWriter{Out: os.Stderr}).Level(lvl) +} diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index ad7903a33f8..edbad91c9f7 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -9,6 +9,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [dev] +### Changed + +- HeadTracker now respects the `FinalityTagEnabled` config option. If the flag is enabled, HeadTracker backfills blocks up to the latest finalized block provided by the corresponding RPC call. To address potential misconfigurations, `HistoryDepth` is now calculated from the latest finalized block instead of the head. NOTE: Consumers (e.g. TXM and LogPoller) do not fully utilize Finality Tag yet. + +... + +## 2.10.0 - UNRELEASED + ### Added - Gas bumping logic to the `SuggestedPriceEstimator`. The bumping mechanism for this estimator refetches the price from the RPC and adds a buffer on top using the greater of `BumpPercent` and `BumpMin`. @@ -20,13 +28,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - `P2P.V2` is required in configuration when either `OCR` or `OCR2` are enabled. The node will fail to boot if `P2P.V2` is not enabled. +- Removed unnecessary gas price warnings in gas estimators when EIP-1559 mode is enabled. ### Changed - Minimum required version of Postgres is now >= 12. Postgres 11 was EOL'd in November 2023. Added a new version check that will prevent Chainlink from running on EOL'd Postgres. If you are running Postgres <= 11 you should upgrade to the latest version. The check can be forcibly overridden by setting SKIP_PG_VERSION_CHECK=true. +- Updated the `LimitDefault` and `LimitMax` configs types to `uint64` +## 2.9.1 - 2024-03-07 + +### Changed + +- `eth_call` RPC requests are now sent with both `input` and `data` fields to increase compatibility with servers that recognize only one. +- GasEstimator will now include Type `0x3` (Blob) transactions in the gas calculations to estimate it more accurately. + ## 2.9.0 - 2024-02-22 ### Added diff --git a/docs/CONFIG.md b/docs/CONFIG.md index 938c3de66b1..4bcba633bcc 100644 --- a/docs/CONFIG.md +++ b/docs/CONFIG.md @@ -776,6 +776,7 @@ MaxSuccessfulRuns = 10000 # Default ReaperInterval = '1h' # Default ReaperThreshold = '24h' # Default ResultWriteQueueDepth = 100 # Default +VerboseLogging = false # Default ``` @@ -823,6 +824,16 @@ ResultWriteQueueDepth = 100 # Default ``` ResultWriteQueueDepth controls how many writes will be buffered before subsequent writes are dropped, for jobs that write results asynchronously for performance reasons, such as OCR. +### VerboseLogging +```toml +VerboseLogging = false # Default +``` +VerboseLogging enables detailed logging of pipeline execution steps. +This is disabled by default because it increases log volume for pipeline +runs, but can be useful for debugging failed runs without relying on the UI +or database. Consider enabling this if you disabled run saving by setting +MaxSuccessfulRuns to zero. + ## JobPipeline.HTTPRequest ```toml [JobPipeline.HTTPRequest] @@ -1188,6 +1199,105 @@ ListenAddresses = ['1.2.3.4:9999', '[a52d:0:a88:1274::abcd]:1337'] # Example ListenAddresses is the addresses the peer will listen to on the network in `host:port` form as accepted by `net.Listen()`, but the host and port must be fully specified and cannot be empty. You can specify `0.0.0.0` (IPv4) or `::` (IPv6) to listen on all interfaces, but that is not recommended. +## Capabilities.Peering +```toml +[Capabilities.Peering] +IncomingMessageBufferSize = 10 # Default +OutgoingMessageBufferSize = 10 # Default +PeerID = '12D3KooWMoejJznyDuEk5aX6GvbjaG12UzeornPCBNzMRqdwrFJw' # Example +TraceLogging = false # Default +``` + + +### IncomingMessageBufferSize +```toml +IncomingMessageBufferSize = 10 # Default +``` +IncomingMessageBufferSize is the per-remote number of incoming +messages to buffer. Any additional messages received on top of those +already in the queue will be dropped. + +### OutgoingMessageBufferSize +```toml +OutgoingMessageBufferSize = 10 # Default +``` +OutgoingMessageBufferSize is the per-remote number of outgoing +messages to buffer. Any additional messages send on top of those +already in the queue will displace the oldest. +NOTE: OutgoingMessageBufferSize should be comfortably smaller than remote's +IncomingMessageBufferSize to give the remote enough space to process +them all in case we regained connection and now send a bunch at once + +### PeerID +```toml +PeerID = '12D3KooWMoejJznyDuEk5aX6GvbjaG12UzeornPCBNzMRqdwrFJw' # Example +``` +PeerID is the default peer ID to use for OCR jobs. If unspecified, uses the first available peer ID. + +### TraceLogging +```toml +TraceLogging = false # Default +``` +TraceLogging enables trace level logging. + +## Capabilities.Peering.V2 +```toml +[Capabilities.Peering.V2] +Enabled = false # Default +AnnounceAddresses = ['1.2.3.4:9999', '[a52d:0:a88:1274::abcd]:1337'] # Example +DefaultBootstrappers = ['12D3KooWMHMRLQkgPbFSYHwD3NBuwtS1AmxhvKVUrcfyaGDASR4U@1.2.3.4:9999', '12D3KooWM55u5Swtpw9r8aFLQHEtw7HR4t44GdNs654ej5gRs2Dh@example.com:1234'] # Example +DeltaDial = '15s' # Default +DeltaReconcile = '1m' # Default +ListenAddresses = ['1.2.3.4:9999', '[a52d:0:a88:1274::abcd]:1337'] # Example +``` + + +### Enabled +```toml +Enabled = false # Default +``` +Enabled enables P2P V2. + +### AnnounceAddresses +```toml +AnnounceAddresses = ['1.2.3.4:9999', '[a52d:0:a88:1274::abcd]:1337'] # Example +``` +AnnounceAddresses is the addresses the peer will advertise on the network in `host:port` form as accepted by the TCP version of Go’s `net.Dial`. +The addresses should be reachable by other nodes on the network. When attempting to connect to another node, +a node will attempt to dial all of the other node’s AnnounceAddresses in round-robin fashion. + +### DefaultBootstrappers +```toml +DefaultBootstrappers = ['12D3KooWMHMRLQkgPbFSYHwD3NBuwtS1AmxhvKVUrcfyaGDASR4U@1.2.3.4:9999', '12D3KooWM55u5Swtpw9r8aFLQHEtw7HR4t44GdNs654ej5gRs2Dh@example.com:1234'] # Example +``` +DefaultBootstrappers is the default bootstrapper peers for libocr's v2 networking stack. + +Oracle nodes typically only know each other’s PeerIDs, but not their hostnames, IP addresses, or ports. +DefaultBootstrappers are special nodes that help other nodes discover each other’s `AnnounceAddresses` so they can communicate. +Nodes continuously attempt to connect to bootstrappers configured in here. When a node wants to connect to another node +(which it knows only by PeerID, but not by address), it discovers the other node’s AnnounceAddresses from communications +received from its DefaultBootstrappers or other discovered nodes. To facilitate discovery, +nodes will regularly broadcast signed announcements containing their PeerID and AnnounceAddresses. + +### DeltaDial +```toml +DeltaDial = '15s' # Default +``` +DeltaDial controls how far apart Dial attempts are + +### DeltaReconcile +```toml +DeltaReconcile = '1m' # Default +``` +DeltaReconcile controls how often a Reconcile message is sent to every peer. + +### ListenAddresses +```toml +ListenAddresses = ['1.2.3.4:9999', '[a52d:0:a88:1274::abcd]:1337'] # Example +``` +ListenAddresses is the addresses the peer will listen to on the network in `host:port` form as accepted by `net.Listen()`, +but the host and port must be fully specified and cannot be empty. You can specify `0.0.0.0` (IPv4) or `::` (IPv6) to listen on all interfaces, but that is not recommended. + ## Keeper ```toml [Keeper] @@ -2606,7 +2716,7 @@ GasLimit = 5400000 AutoCreateKey = true BlockBackfillDepth = 10 BlockBackfillSkip = false -ChainType = 'xdai' +ChainType = 'gnosis' FinalityDepth = 50 FinalityTagEnabled = false LinkContractAddress = '0xE2e73A1c69ecF83F464EFCE6A5be353a37cA09b2' @@ -3058,7 +3168,91 @@ Mode = 'BlockHistory' PriceDefault = '20 gwei' PriceMax = '18.446744073709551615 ether' PriceMin = '0' -LimitDefault = 3500000 +LimitDefault = 100000000 +LimitMax = 500000 +LimitMultiplier = '1' +LimitTransfer = 21000 +BumpMin = '5 gwei' +BumpPercent = 20 +BumpThreshold = 3 +EIP1559DynamicFees = false +FeeCapDefault = '100 gwei' +TipCapDefault = '1 wei' +TipCapMin = '1 wei' + +[GasEstimator.BlockHistory] +BatchSize = 25 +BlockHistorySize = 8 +CheckInclusionBlocks = 12 +CheckInclusionPercentile = 90 +TransactionPercentile = 60 + +[HeadTracker] +HistoryDepth = 5 +MaxBufferSize = 3 +SamplingInterval = '1s' + +[NodePool] +PollFailureThreshold = 5 +PollInterval = '10s' +SelectionMode = 'HighestHead' +SyncThreshold = 5 +LeaseDuration = '0s' +NodeIsSyncingEnabled = false + +[OCR] +ContractConfirmations = 4 +ContractTransmitterTransmitTimeout = '10s' +DatabaseTimeout = '10s' +DeltaCOverride = '168h0m0s' +DeltaCJitterOverride = '1h0m0s' +ObservationGracePeriod = '1s' + +[OCR2] +[OCR2.Automation] +GasLimit = 5400000 +``` + +

+ +
zkSync Sepolia (300)

+ +```toml +AutoCreateKey = true +BlockBackfillDepth = 10 +BlockBackfillSkip = false +ChainType = 'zksync' +FinalityDepth = 1 +FinalityTagEnabled = false +LogBackfillBatchSize = 1000 +LogPollInterval = '5s' +LogKeepBlocksDepth = 100000 +LogPrunePageSize = 0 +BackupLogPollerBlockDelay = 100 +MinIncomingConfirmations = 1 +MinContractPayment = '0.00001 link' +NonceAutoSync = true +NoNewHeadsThreshold = '1m0s' +RPCDefaultBatchSize = 250 +RPCBlockQueryDelay = 1 + +[Transactions] +ForwardersEnabled = false +MaxInFlight = 16 +MaxQueued = 250 +ReaperInterval = '1h0m0s' +ReaperThreshold = '168h0m0s' +ResendAfterThreshold = '1m0s' + +[BalanceMonitor] +Enabled = true + +[GasEstimator] +Mode = 'BlockHistory' +PriceDefault = '20 gwei' +PriceMax = '18.446744073709551615 ether' +PriceMin = '0' +LimitDefault = 100000000 LimitMax = 500000 LimitMultiplier = '1' LimitTransfer = 21000 @@ -3142,7 +3336,7 @@ Mode = 'BlockHistory' PriceDefault = '20 gwei' PriceMax = '18.446744073709551615 ether' PriceMin = '0' -LimitDefault = 3500000 +LimitDefault = 100000000 LimitMax = 500000 LimitMultiplier = '1' LimitTransfer = 21000 @@ -3531,7 +3725,7 @@ GasLimit = 5400000 AutoCreateKey = true BlockBackfillDepth = 10 BlockBackfillSkip = false -FinalityDepth = 1 +FinalityDepth = 500 FinalityTagEnabled = false LogBackfillBatchSize = 1000 LogPollInterval = '30s' @@ -3581,7 +3775,7 @@ CheckInclusionPercentile = 90 TransactionPercentile = 60 [HeadTracker] -HistoryDepth = 50 +HistoryDepth = 2000 MaxBufferSize = 3 SamplingInterval = '1s' @@ -3865,7 +4059,7 @@ GasLimit = 5400000 AutoCreateKey = true BlockBackfillDepth = 10 BlockBackfillSkip = false -FinalityDepth = 1 +FinalityDepth = 500 FinalityTagEnabled = false LogBackfillBatchSize = 1000 LogPollInterval = '30s' @@ -3915,7 +4109,7 @@ CheckInclusionPercentile = 90 TransactionPercentile = 60 [HeadTracker] -HistoryDepth = 50 +HistoryDepth = 2000 MaxBufferSize = 3 SamplingInterval = '1s' @@ -4026,6 +4220,89 @@ GasLimit = 5400000

+
Polygon Zkevm Cardona (2442)

+ +```toml +AutoCreateKey = true +BlockBackfillDepth = 10 +BlockBackfillSkip = false +FinalityDepth = 500 +FinalityTagEnabled = false +LogBackfillBatchSize = 1000 +LogPollInterval = '30s' +LogKeepBlocksDepth = 100000 +LogPrunePageSize = 0 +BackupLogPollerBlockDelay = 100 +MinIncomingConfirmations = 1 +MinContractPayment = '0.00001 link' +NonceAutoSync = true +NoNewHeadsThreshold = '12m0s' +RPCDefaultBatchSize = 100 +RPCBlockQueryDelay = 1 + +[Transactions] +ForwardersEnabled = false +MaxInFlight = 16 +MaxQueued = 250 +ReaperInterval = '1h0m0s' +ReaperThreshold = '168h0m0s' +ResendAfterThreshold = '3m0s' + +[BalanceMonitor] +Enabled = true + +[GasEstimator] +Mode = 'BlockHistory' +PriceDefault = '20 gwei' +PriceMax = '115792089237316195423570985008687907853269984665.640564039457584007913129639935 tether' +PriceMin = '50 mwei' +LimitDefault = 500000 +LimitMax = 500000 +LimitMultiplier = '1' +LimitTransfer = 21000 +BumpMin = '20 mwei' +BumpPercent = 40 +BumpThreshold = 3 +EIP1559DynamicFees = false +FeeCapDefault = '100 gwei' +TipCapDefault = '1 wei' +TipCapMin = '1 wei' + +[GasEstimator.BlockHistory] +BatchSize = 25 +BlockHistorySize = 12 +CheckInclusionBlocks = 12 +CheckInclusionPercentile = 90 +TransactionPercentile = 60 + +[HeadTracker] +HistoryDepth = 2000 +MaxBufferSize = 3 +SamplingInterval = '1s' + +[NodePool] +PollFailureThreshold = 5 +PollInterval = '10s' +SelectionMode = 'HighestHead' +SyncThreshold = 5 +LeaseDuration = '0s' +NodeIsSyncingEnabled = false + +[OCR] +ContractConfirmations = 1 +ContractTransmitterTransmitTimeout = '10s' +DatabaseTimeout = '10s' +DeltaCOverride = '168h0m0s' +DeltaCJitterOverride = '1h0m0s' +ObservationGracePeriod = '1s' + +[OCR2] +[OCR2.Automation] +GasLimit = 5400000 +``` + +

+
Fantom Testnet (4002)

```toml @@ -4283,7 +4560,7 @@ GasLimit = 6500000 AutoCreateKey = true BlockBackfillDepth = 10 BlockBackfillSkip = false -ChainType = 'xdai' +ChainType = 'gnosis' FinalityDepth = 100 FinalityTagEnabled = false LogBackfillBatchSize = 1000 @@ -5706,6 +5983,90 @@ GasLimit = 5400000

+
Optimism Sepolia (11155420)

+ +```toml +AutoCreateKey = true +BlockBackfillDepth = 10 +BlockBackfillSkip = false +ChainType = 'optimismBedrock' +FinalityDepth = 200 +FinalityTagEnabled = false +LogBackfillBatchSize = 1000 +LogPollInterval = '2s' +LogKeepBlocksDepth = 100000 +LogPrunePageSize = 0 +BackupLogPollerBlockDelay = 100 +MinIncomingConfirmations = 1 +MinContractPayment = '0.00001 link' +NonceAutoSync = true +NoNewHeadsThreshold = '40s' +RPCDefaultBatchSize = 250 +RPCBlockQueryDelay = 1 + +[Transactions] +ForwardersEnabled = false +MaxInFlight = 16 +MaxQueued = 250 +ReaperInterval = '1h0m0s' +ReaperThreshold = '168h0m0s' +ResendAfterThreshold = '30s' + +[BalanceMonitor] +Enabled = true + +[GasEstimator] +Mode = 'BlockHistory' +PriceDefault = '20 gwei' +PriceMax = '115792089237316195423570985008687907853269984665.640564039457584007913129639935 tether' +PriceMin = '1 wei' +LimitDefault = 500000 +LimitMax = 500000 +LimitMultiplier = '1' +LimitTransfer = 21000 +BumpMin = '100 wei' +BumpPercent = 20 +BumpThreshold = 3 +EIP1559DynamicFees = true +FeeCapDefault = '100 gwei' +TipCapDefault = '1 wei' +TipCapMin = '1 wei' + +[GasEstimator.BlockHistory] +BatchSize = 25 +BlockHistorySize = 60 +CheckInclusionBlocks = 12 +CheckInclusionPercentile = 90 +TransactionPercentile = 60 + +[HeadTracker] +HistoryDepth = 300 +MaxBufferSize = 3 +SamplingInterval = '1s' + +[NodePool] +PollFailureThreshold = 5 +PollInterval = '10s' +SelectionMode = 'HighestHead' +SyncThreshold = 10 +LeaseDuration = '0s' +NodeIsSyncingEnabled = false + +[OCR] +ContractConfirmations = 1 +ContractTransmitterTransmitTimeout = '10s' +DatabaseTimeout = '10s' +DeltaCOverride = '168h0m0s' +DeltaCJitterOverride = '1h0m0s' +ObservationGracePeriod = '1s' + +[OCR2] +[OCR2.Automation] +GasLimit = 6500000 +``` + +

+
Harmony Mainnet (1666600000)

```toml @@ -5911,18 +6272,20 @@ BlockBackfillSkip enables skipping of very long backfills. ChainType = 'arbitrum' # Example ``` ChainType is automatically detected from chain ID. Set this to force a certain chain type regardless of chain ID. -Available types: arbitrum, metis, optimismBedrock, xdai, celo, kroma, wemix, zksync, scroll +Available types: `arbitrum`, `celo`, `gnosis`, `kroma`, `metis`, `optimismBedrock`, `scroll`, `wemix`, `zksync` + +`xdai` has been deprecated and will be removed in v2.13.0, use `gnosis` instead. ### FinalityDepth ```toml FinalityDepth = 50 # Default ``` -FinalityDepth is the number of blocks after which an ethereum transaction is considered "final". Note that the default is automatically set based on chain ID so it should not be necessary to change this under normal operation. +FinalityDepth is the number of blocks after which an ethereum transaction is considered "final". Note that the default is automatically set based on chain ID, so it should not be necessary to change this under normal operation. BlocksConsideredFinal determines how deeply we look back to ensure that transactions are confirmed onto the longest chain There is not a large performance penalty to setting this relatively high (on the order of hundreds) It is practically limited by the number of heads we store in the database and should be less than this with a comfortable margin. If a transaction is mined in a block more than this many blocks ago, and is reorged out, we will NOT retransmit this transaction and undefined behaviour can occur including gaps in the nonce sequence that require manual intervention to fix. -Therefore this number represents a number of blocks we consider large enough that no re-org this deep will ever feasibly happen. +Therefore, this number represents a number of blocks we consider large enough that no re-org this deep will ever feasibly happen. Special cases: `FinalityDepth`=0 would imply that transactions can be final even before they were mined into a block. This is not supported. @@ -6317,7 +6680,7 @@ TipCapMin = '1 wei' # Default ``` TipCapMinimum is the minimum gas tip to use when submitting transactions to the blockchain. -Only applies to EIP-1559 transactions) +(Only applies to EIP-1559 transactions) ## EVM.GasEstimator.LimitJobType ```toml @@ -6417,7 +6780,7 @@ EIP1559FeeCapBufferBlocks = 13 # Example ``` EIP1559FeeCapBufferBlocks controls the buffer blocks to add to the current base fee when sending a transaction. By default, the gas bumping threshold + 1 block is used. -Only applies to EIP-1559 transactions) +(Only applies to EIP-1559 transactions) ### TransactionPercentile ```toml @@ -6450,8 +6813,8 @@ In addition to these settings, it log warnings if `EVM.NoNewHeadsThreshold` is e ```toml HistoryDepth = 100 # Default ``` -HistoryDepth tracks the top N block numbers to keep in the `heads` database table. -Note that this can easily result in MORE than N records since in the case of re-orgs we keep multiple heads for a particular block height. +HistoryDepth tracks the top N blocks on top of the latest finalized block to keep in the `heads` database table. +Note that this can easily result in MORE than `N + finality depth` records since in the case of re-orgs we keep multiple heads for a particular block height. This number should be at least as large as `FinalityDepth`. There may be a small performance penalty to setting this to something very large (10,000+) diff --git a/go.mod b/go.mod index 5cb8673e314..fc5dc5f00cf 100644 --- a/go.mod +++ b/go.mod @@ -30,12 +30,13 @@ require ( github.com/gorilla/securecookie v1.1.2 github.com/gorilla/sessions v1.2.2 github.com/gorilla/websocket v1.5.1 - github.com/grafana/pyroscope-go v1.0.4 + github.com/grafana/pyroscope-go v1.1.1 github.com/graph-gophers/dataloader v5.0.0+incompatible github.com/graph-gophers/graphql-go v1.3.0 github.com/hashicorp/consul/sdk v0.14.1 github.com/hashicorp/go-envparse v0.1.0 github.com/hashicorp/go-plugin v1.6.0 + github.com/hashicorp/go-retryablehttp v0.7.5 github.com/hdevalence/ed25519consensus v0.1.0 github.com/jackc/pgconn v1.14.1 github.com/jackc/pgtype v1.14.0 @@ -68,8 +69,8 @@ require ( github.com/shopspring/decimal v1.3.1 github.com/smartcontractkit/caigo v0.0.0-20230621050857-b29a4ca8c704 github.com/smartcontractkit/chain-selectors v1.0.10 - github.com/smartcontractkit/chainlink-automation v1.0.2-0.20240118014648-1ab6a88c9429 - github.com/smartcontractkit/chainlink-common v0.1.7-0.20240227191958-d13aad8b4d61 + github.com/smartcontractkit/chainlink-automation v1.0.2-0.20240311111125-22812a072c35 + github.com/smartcontractkit/chainlink-common v0.1.7-0.20240314172156-049609b8e1f9 github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240213120401-01a23955f9f8 github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540 github.com/smartcontractkit/chainlink-feeds v0.0.0-20240119021347-3c541a78cdb8 @@ -81,7 +82,7 @@ require ( github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20230906073235-9e478e5e19f1 github.com/smartcontractkit/wsrpc v0.7.2 github.com/spf13/cast v1.6.0 - github.com/stretchr/testify v1.8.4 + github.com/stretchr/testify v1.9.0 github.com/theodesp/go-heaps v0.0.0-20190520121037-88e35354fe0a github.com/tidwall/gjson v1.17.0 github.com/ugorji/go/codec v1.2.12 @@ -91,8 +92,8 @@ require ( github.com/urfave/cli v1.22.14 go.dedis.ch/fixbuf v1.0.3 go.dedis.ch/kyber/v3 v3.1.0 - go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin v0.46.1 - go.opentelemetry.io/otel v1.21.0 + go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin v0.49.0 + 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.19.0 @@ -108,6 +109,7 @@ require ( google.golang.org/protobuf v1.32.0 gopkg.in/guregu/null.v4 v4.0.0 gopkg.in/natefinch/lumberjack.v2 v2.2.1 + gopkg.in/yaml.v3 v3.0.1 ) require ( @@ -187,7 +189,7 @@ require ( github.com/go-kit/kit v0.12.0 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.6.0 // indirect - github.com/go-logr/logr v1.3.0 // indirect + github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.2.6 // indirect github.com/go-playground/locales v0.14.1 // indirect @@ -210,7 +212,7 @@ require ( github.com/google/go-tpm v0.9.0 // indirect github.com/google/gofuzz v1.2.0 // indirect github.com/gorilla/context v1.1.1 // indirect - github.com/grafana/pyroscope-go/godeltaprof v0.1.4 // indirect + github.com/grafana/pyroscope-go/godeltaprof v0.1.6 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus v1.0.0 // indirect github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.0-rc.3 // indirect @@ -219,6 +221,7 @@ require ( github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect github.com/gtank/merlin v0.1.1 // indirect github.com/gtank/ristretto255 v0.1.2 // indirect + github.com/hashicorp/go-cleanhttp v0.5.2 // indirect github.com/hashicorp/go-hclog v1.5.0 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect github.com/hashicorp/golang-lru v0.6.0 // indirect @@ -240,7 +243,7 @@ require ( github.com/jackpal/go-nat-pmp v1.0.2 // indirect github.com/jmhodges/levigo v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/klauspost/compress v1.17.2 // indirect + github.com/klauspost/compress v1.17.3 // indirect github.com/klauspost/cpuid/v2 v2.2.5 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect @@ -283,7 +286,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/stretchr/objx v0.5.0 // 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 github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect @@ -309,9 +312,9 @@ require ( 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 go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0 // indirect - go.opentelemetry.io/otel/metric v1.21.0 // indirect + go.opentelemetry.io/otel/metric v1.24.0 // indirect go.opentelemetry.io/otel/sdk v1.21.0 // indirect - go.opentelemetry.io/otel/trace v1.21.0 // indirect + go.opentelemetry.io/otel/trace v1.24.0 // indirect 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 @@ -326,7 +329,6 @@ require ( gopkg.in/guregu/null.v2 v2.1.2 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect nhooyr.io/websocket v1.8.7 // indirect pgregory.net/rapid v0.5.5 // indirect rsc.io/tmplfunc v0.0.3 // indirect diff --git a/go.sum b/go.sum index 43eb172d22c..fd67787aa34 100644 --- a/go.sum +++ b/go.sum @@ -468,8 +468,8 @@ github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4= github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= -github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= +github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= @@ -649,10 +649,10 @@ github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/ad github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.1 h1:gmztn0JnHVt9JZquRuzLw3g4wouNVzKL15iLr/zn/QY= github.com/gorilla/websocket v1.5.1/go.mod h1:x3kM2JMyaluk02fnUJpQuwD2dCS5NDG2ZHL0uE0tcaY= -github.com/grafana/pyroscope-go v1.0.4 h1:oyQX0BOkL+iARXzHuCdIF5TQ7/sRSel1YFViMHC7Bm0= -github.com/grafana/pyroscope-go v1.0.4/go.mod h1:0d7ftwSMBV/Awm7CCiYmHQEG8Y44Ma3YSjt+nWcWztY= -github.com/grafana/pyroscope-go/godeltaprof v0.1.4 h1:mDsJ3ngul7UfrHibGQpV66PbZ3q1T8glz/tK3bQKKEk= -github.com/grafana/pyroscope-go/godeltaprof v0.1.4/go.mod h1:1HSPtjU8vLG0jE9JrTdzjgFqdJ/VgN7fvxBNq3luJko= +github.com/grafana/pyroscope-go v1.1.1 h1:PQoUU9oWtO3ve/fgIiklYuGilvsm8qaGhlY4Vw6MAcQ= +github.com/grafana/pyroscope-go v1.1.1/go.mod h1:Mw26jU7jsL/KStNSGGuuVYdUq7Qghem5P8aXYXSXG88= +github.com/grafana/pyroscope-go/godeltaprof v0.1.6 h1:nEdZ8louGAplSvIJi1HVp7kWvFvdiiYg3COLlTwJiFo= +github.com/grafana/pyroscope-go/godeltaprof v0.1.6/go.mod h1:Tk376Nbldo4Cha9RgiU7ik8WKFkNpfds98aUzS8omLE= github.com/graph-gophers/dataloader v5.0.0+incompatible h1:R+yjsbrNq1Mo3aPG+Z/EKYrXrXXUNJHOgbRt+U6jOug= github.com/graph-gophers/dataloader v5.0.0+incompatible/go.mod h1:jk4jk0c5ZISbKaMe8WsVopGB5/15GvGHMdMdPtwlRp4= github.com/graph-gophers/graphql-go v1.3.0 h1:Eb9x/q6MFpCLz7jBCiP/WTxjSDrYLR1QY41SORZyNJ0= @@ -692,6 +692,7 @@ github.com/hashicorp/go-envparse v0.1.0 h1:bE++6bhIsNCPLvgDZkYqo3nA+/PFI51pkrHdm github.com/hashicorp/go-envparse v0.1.0/go.mod h1:OHheN1GoygLlAkTlXLXvAdnXdZxy8JUweQ1rAXx1xnc= github.com/hashicorp/go-getter v1.7.1 h1:SWiSWN/42qdpR0MdhaOc/bLR48PLuP1ZQtYLRlM69uY= github.com/hashicorp/go-getter v1.7.1/go.mod h1:W7TalhMmbPmsSMdNjD0ZskARur/9GJ17cfHTRtXV744= +github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= github.com/hashicorp/go-hclog v1.5.0 h1:bI2ocEMgcVlz55Oj1xZNBsVi900c7II+fWDyV9o+13c= github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= @@ -700,6 +701,8 @@ github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjh github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= +github.com/hashicorp/go-retryablehttp v0.7.5 h1:bJj+Pj19UZMIweq/iie+1u5YCdGrnxCT9yvm0e+Nd5M= +github.com/hashicorp/go-retryablehttp v0.7.5/go.mod h1:Jy/gPYAdjqffZ/yFGCFV2doI5wjtH1ewM9u8iYVjtX8= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= github.com/hashicorp/go-safetemp v1.0.0 h1:2HR189eFNrjHQyENnQMMpCiBAsRxzbTMIgBhEyExpmo= github.com/hashicorp/go-safetemp v1.0.0/go.mod h1:oaerMy3BhqiTbVye6QuFhFtIceqFoDHxNAB65b+Rj1I= @@ -861,8 +864,8 @@ github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYs github.com/klauspost/compress v1.11.4/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= -github.com/klauspost/compress v1.17.2 h1:RlWWUY/Dr4fL8qk9YG7DTZ7PDgME2V4csBXA8L/ixi4= -github.com/klauspost/compress v1.17.2/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/compress v1.17.3 h1:qkRjuerhUU1EmXLYGkSH6EZL+vPSxIrYjLNAK4slzwA= +github.com/klauspost/compress v1.17.3/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM= github.com/klauspost/cpuid v1.2.1/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.2.5 h1:0E5MSMDEoAulmXNFquVs//DdoomxaoTY1kUhbc/qbZg= @@ -1167,10 +1170,10 @@ github.com/smartcontractkit/caigo v0.0.0-20230621050857-b29a4ca8c704 h1:T3lFWumv github.com/smartcontractkit/caigo v0.0.0-20230621050857-b29a4ca8c704/go.mod h1:2QuJdEouTWjh5BDy5o/vgGXQtR4Gz8yH1IYB5eT7u4M= github.com/smartcontractkit/chain-selectors v1.0.10 h1:t9kJeE6B6G+hKD0GYR4kGJSCqR1LNS7aI3jT0V+xGrg= github.com/smartcontractkit/chain-selectors v1.0.10/go.mod h1:d4Hi+E1zqjy9HqMkjBE5q1vcG9VGgxf5VxiRHfzi2kE= -github.com/smartcontractkit/chainlink-automation v1.0.2-0.20240118014648-1ab6a88c9429 h1:xkejUBZhcBpBrTSfxc91Iwzadrb6SXw8ks69bHIQ9Ww= -github.com/smartcontractkit/chainlink-automation v1.0.2-0.20240118014648-1ab6a88c9429/go.mod h1:wJmVvDf4XSjsahWtfUq3wvIAYEAuhr7oxmxYnEL/LGQ= -github.com/smartcontractkit/chainlink-common v0.1.7-0.20240227191958-d13aad8b4d61 h1:5aer8Pkw3XlXLjcPzWozy3RAbYQjVjpruxDeQENcVMw= -github.com/smartcontractkit/chainlink-common v0.1.7-0.20240227191958-d13aad8b4d61/go.mod h1:6aXWSEQawX2oZXcPPOdxnEGufAhj7PqPKolXf6ijRGA= +github.com/smartcontractkit/chainlink-automation v1.0.2-0.20240311111125-22812a072c35 h1:GNhRKD3izyzAoGMXDvVUAwEuzz4Atdj3U3RH7eak5Is= +github.com/smartcontractkit/chainlink-automation v1.0.2-0.20240311111125-22812a072c35/go.mod h1:2I0dWdYdK6jHPnSYYy7Y7Xp7L0YTnJ3KZtkhLQflsTU= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20240314172156-049609b8e1f9 h1:rlvE17wHiSnrl2d42TWQ2VVx8ho8c9vgznysXj68sRU= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20240314172156-049609b8e1f9/go.mod h1:/bJGelrpXvCcDCuaIgt91UN4B9YxZdK1O7VX5lzbysI= github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240213120401-01a23955f9f8 h1:I326nw5GwHQHsLKHwtu5Sb9EBLylC8CfUd7BFAS0jtg= github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240213120401-01a23955f9f8/go.mod h1:a65NtrK4xZb01mf0dDNghPkN2wXgcqFQ55ADthVBgMc= github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540 h1:xFSv8561jsLtF6gYZr/zW2z5qUUAkcFkApin2mnbYTo= @@ -1229,8 +1232,9 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= @@ -1242,8 +1246,9 @@ github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1F github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8= github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= @@ -1369,26 +1374,26 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin v0.46.1 h1:mMv2jG58h6ZI5t5S9QCVGdzCmAsTakMa3oxVgpSD44g= -go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin v0.46.1/go.mod h1:oqRuNKG0upTaDPbLVCG8AD0G2ETrfDtmh7jViy7ox6M= +go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin v0.49.0 h1:1f31+6grJmV3X4lxcEvUy13i5/kfDw1nJZwhd8mA4tg= +go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin v0.49.0/go.mod h1:1P/02zM3OwkX9uki+Wmxw3a5GVb6KUXRsa7m7bOC9Fg= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.1 h1:SpGay3w+nEwMpfVnbqOLH5gY52/foP8RE8UzTZ1pdSE= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.1/go.mod h1:4UoMYEZOC0yN/sPGH76KPkkU7zgiEWYWL9vwmbnTJPE= -go.opentelemetry.io/contrib/propagators/b3 v1.21.1 h1:WPYiUgmw3+b7b3sQ1bFBFAf0q+Di9dvNc3AtYfnT4RQ= -go.opentelemetry.io/contrib/propagators/b3 v1.21.1/go.mod h1:EmzokPoSqsYMBVK4nRnhsfm5mbn8J1eDuz/U1UaQaWg= -go.opentelemetry.io/otel v1.21.0 h1:hzLeKBZEL7Okw2mGzZ0cc4k/A7Fta0uoPgaJCr8fsFc= -go.opentelemetry.io/otel v1.21.0/go.mod h1:QZzNPQPm1zLX4gZK4cMi+71eaorMSGT3A4znnUvNNEo= +go.opentelemetry.io/contrib/propagators/b3 v1.24.0 h1:n4xwCdTx3pZqZs2CjS/CUZAs03y3dZcGhC/FepKtEUY= +go.opentelemetry.io/contrib/propagators/b3 v1.24.0/go.mod h1:k5wRxKRU2uXx2F8uNJ4TaonuEO/V7/5xoz7kdsDACT8= +go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= +go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0 h1:cl5P5/GIfFh4t6xyruOgJP5QiA1pw4fYYdv6nc6CBWw= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0/go.mod h1:zgBdWWAu7oEEMC06MMKc5NLbA/1YDXV1sMpSqEeLQLg= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0 h1:tIqheXEFWAZ7O8A7m+J0aPTmpJN3YQ7qetUAdkkkKpk= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0/go.mod h1:nUeKExfxAQVbiVFn32YXpXZZHZ61Cc3s3Rn1pDBGAb0= -go.opentelemetry.io/otel/metric v1.21.0 h1:tlYWfeo+Bocx5kLEloTjbcDwBuELRrIFxwdQ36PlJu4= -go.opentelemetry.io/otel/metric v1.21.0/go.mod h1:o1p3CA8nNHW8j5yuQLdc1eeqEaPfzug24uvsyIEJRWM= +go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= +go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= go.opentelemetry.io/otel/sdk v1.21.0 h1:FTt8qirL1EysG6sTQRZ5TokkU8d0ugCj8htOgThZXQ8= go.opentelemetry.io/otel/sdk v1.21.0/go.mod h1:Nna6Yv7PWTdgJHVRD9hIYywQBRx7pbox6nwBnZIxl/E= go.opentelemetry.io/otel/sdk/metric v1.21.0 h1:smhI5oD714d6jHE6Tie36fPx4WDFIg+Y6RfAY4ICcR0= go.opentelemetry.io/otel/sdk/metric v1.21.0/go.mod h1:FJ8RAsoPGv/wYMgBdUJXOm+6pzFY3YdljnXtv1SBE8Q= -go.opentelemetry.io/otel/trace v1.21.0 h1:WD9i5gzvoUPuXIXH24ZNBudiarZDKuekPqi/E8fpfLc= -go.opentelemetry.io/otel/trace v1.21.0/go.mod h1:LGbsEB0f9LGjN+OZaQQ26sohbOmiMR+BaslueVtS/qQ= +go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= +go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I= go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= diff --git a/integration-tests/README.md b/integration-tests/README.md index 1ea3609f11e..80154a6dd13 100644 --- a/integration-tests/README.md +++ b/integration-tests/README.md @@ -14,9 +14,9 @@ If you have previously run these smoke tests using GitHub Actions or some sort o ## Configure -We have finished first pass at moving the configuration from env vars to TOML files. Currently all product-related configuration is already in TOML files, but env vars still are used to control things like log level, Slack notifications and Kubernetes-related settings. See the [example.env](./example.env) file for environment variables. +We have finished the first pass at moving all test configuration from env vars to TOML files. All product-related configuration is already in TOML files, but env vars are still used to control the log level, Slack notifications, and Kubernetes-related settings. See the [example.env](./example.env) file for how to set these environment variables. -We have added what we think are sensible defaults for all products, you can find them in `./testconfig//.toml` files. Each product folder contains also an `example.toml` file with all possible TOML keys and some description. Detailed description of TOML configuration can be found in [README.md](./testconfig/README.md), but if you want to run some tests using default value all you need to do is provide Chainlink image and version: +We have defined some sensible defaults for all products, you can find them in `./testconfig//.toml` files. Each product folder contains an `example.toml` file that describes all options. If you wish to override these values, you can do so by creating a `./testconfig/overrides.toml`. A detailed description of TOML configuration can be found in the [testconfig README](./testconfig/README.md), but if you want to run some tests using default values all you need to do is provide the Chainlink image and version you want to run tests on: ```toml # ./testconfig/overrides.toml @@ -25,15 +25,7 @@ image = "your image name" version = "your tag" ``` -You could also think about that config this way: -```toml -# ./testconfig/overrides.toml -[ChainlinkImage] -image = "${CHAINLINK_IMAGE}" -version = "${CHAINLINK_VERSION}" -``` - -Of course above just and example, in real world no substitution will take place unless you use some templating tool, but it should give you an idea on how to move from env vars to TOML files. **Remember** your runtime configuration needs to be placed in `./testconfig/overrides.toml` file **that should never be committed**. +The `./testconfig/overrides.toml` file **should never be committed** and has been added to the [.gitignore](../.gitignore) file as it can often contain secrets like private keys and RPC URLs. ## Build @@ -47,7 +39,7 @@ e.g. ## Run -Make sure you have `./testconfig/overrides.toml` file with your Chainlink image and version. +Ensure you have created a `./testconfig/overrides.toml` file with your desired Chainlink image and version. `go test ./smoke/_test.go` diff --git a/integration-tests/actions/automation_ocr_helpers.go b/integration-tests/actions/automation_ocr_helpers.go index 3f8871d9d65..53fb92499eb 100644 --- a/integration-tests/actions/automation_ocr_helpers.go +++ b/integration-tests/actions/automation_ocr_helpers.go @@ -153,20 +153,24 @@ func BuildAutoOCR2ConfigVarsWithKeyIndex( transmitters = append(transmitters, common.HexToAddress(string(transmitter))) } - onchainConfig, err := registryConfig.EncodeOnChainConfig(registrar, registryOwnerAddress, chainModuleAddress, reorgProtectionEnabled) - if err != nil { - return contracts.OCRv2Config{}, err - } - - l.Info().Msg("Done building OCR config") - return contracts.OCRv2Config{ + ocrConfig := contracts.OCRv2Config{ Signers: signers, Transmitters: transmitters, F: f, - OnchainConfig: onchainConfig, OffchainConfigVersion: offchainConfigVersion, OffchainConfig: offchainConfig, - }, nil + } + + if registryConfig.RegistryVersion == ethereum.RegistryVersion_2_0 { + ocrConfig.OnchainConfig = registryConfig.Encode20OnchainConfig(registrar) + } else if registryConfig.RegistryVersion == ethereum.RegistryVersion_2_1 { + ocrConfig.TypedOnchainConfig21 = registryConfig.Create21OnchainConfig(registrar, registryOwnerAddress) + } else if registryConfig.RegistryVersion == ethereum.RegistryVersion_2_2 { + ocrConfig.TypedOnchainConfig22 = registryConfig.Create22OnchainConfig(registrar, registryOwnerAddress, chainModuleAddress, reorgProtectionEnabled) + } + + l.Info().Msg("Done building OCR config") + return ocrConfig, nil } // CreateOCRKeeperJobs bootstraps the first node and to the other nodes sends ocr jobs diff --git a/integration-tests/actions/automation_ocr_helpers_local.go b/integration-tests/actions/automation_ocr_helpers_local.go index 1c563c5605a..ec6f8ba2684 100644 --- a/integration-tests/actions/automation_ocr_helpers_local.go +++ b/integration-tests/actions/automation_ocr_helpers_local.go @@ -152,20 +152,24 @@ func BuildAutoOCR2ConfigVarsWithKeyIndexLocal( transmitters = append(transmitters, common.HexToAddress(string(transmitter))) } - onchainConfig, err := registryConfig.EncodeOnChainConfig(registrar, registryOwnerAddress, chainModuleAddress, reorgProtectionEnabled) - if err != nil { - return contracts.OCRv2Config{}, err - } - - l.Info().Msg("Done building OCR config") - return contracts.OCRv2Config{ + ocrConfig := contracts.OCRv2Config{ Signers: signers, Transmitters: transmitters, F: f, - OnchainConfig: onchainConfig, OffchainConfigVersion: offchainConfigVersion, OffchainConfig: offchainConfig, - }, nil + } + + if registryConfig.RegistryVersion == ethereum.RegistryVersion_2_0 { + ocrConfig.OnchainConfig = registryConfig.Encode20OnchainConfig(registrar) + } else if registryConfig.RegistryVersion == ethereum.RegistryVersion_2_1 { + ocrConfig.TypedOnchainConfig21 = registryConfig.Create21OnchainConfig(registrar, registryOwnerAddress) + } else if registryConfig.RegistryVersion == ethereum.RegistryVersion_2_2 { + ocrConfig.TypedOnchainConfig22 = registryConfig.Create22OnchainConfig(registrar, registryOwnerAddress, chainModuleAddress, reorgProtectionEnabled) + } + + l.Info().Msg("Done building OCR config") + return ocrConfig, nil } // CreateOCRKeeperJobs bootstraps the first node and to the other nodes sends ocr jobs diff --git a/integration-tests/actions/automationv2/actions.go b/integration-tests/actions/automationv2/actions.go index a42fb297e6d..33caf6fbc0f 100644 --- a/integration-tests/actions/automationv2/actions.go +++ b/integration-tests/actions/automationv2/actions.go @@ -22,15 +22,15 @@ import ( "golang.org/x/sync/errgroup" "gopkg.in/guregu/null.v4" - "github.com/smartcontractkit/chainlink/integration-tests/docker/test_env" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/automation_registrar_wrapper2_1" - ocr2keepers20config "github.com/smartcontractkit/chainlink-automation/pkg/v2/config" ocr2keepers30config "github.com/smartcontractkit/chainlink-automation/pkg/v3/config" "github.com/smartcontractkit/chainlink-testing-framework/blockchain" "github.com/smartcontractkit/chainlink-testing-framework/logging" + "github.com/smartcontractkit/chainlink/integration-tests/docker/test_env" + "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/automation_registrar_wrapper2_1" + "github.com/smartcontractkit/chainlink/integration-tests/client" "github.com/smartcontractkit/chainlink/integration-tests/contracts" "github.com/smartcontractkit/chainlink/integration-tests/contracts/ethereum" @@ -501,23 +501,30 @@ func (a *AutomationTest) SetConfigOnRegistry() error { transmitters = append(transmitters, common.HexToAddress(string(transmitter))) } - onchainConfig, err := a.RegistrySettings.EncodeOnChainConfig(a.Registrar.Address(), a.UpkeepPrivilegeManager, a.Registry.ChainModuleAddress(), a.Registry.ReorgProtectionEnabled()) - if err != nil { - return errors.Join(err, fmt.Errorf("failed to encode onchain config")) - } - ocrConfig := contracts.OCRv2Config{ Signers: signers, Transmitters: transmitters, F: f, - OnchainConfig: onchainConfig, OffchainConfigVersion: offchainConfigVersion, OffchainConfig: offchainConfig, } - err = a.Registry.SetConfig(a.RegistrySettings, ocrConfig) - if err != nil { - return errors.Join(err, fmt.Errorf("failed to set config on registry")) + if a.RegistrySettings.RegistryVersion == ethereum.RegistryVersion_2_0 { + ocrConfig.OnchainConfig = a.RegistrySettings.Encode20OnchainConfig(a.Registrar.Address()) + err = a.Registry.SetConfig(a.RegistrySettings, ocrConfig) + if err != nil { + return errors.Join(err, fmt.Errorf("failed to set config on registry")) + } + } else { + if a.RegistrySettings.RegistryVersion == ethereum.RegistryVersion_2_1 { + ocrConfig.TypedOnchainConfig21 = a.RegistrySettings.Create21OnchainConfig(a.Registrar.Address(), a.UpkeepPrivilegeManager) + } else if a.RegistrySettings.RegistryVersion == ethereum.RegistryVersion_2_2 { + ocrConfig.TypedOnchainConfig22 = a.RegistrySettings.Create22OnchainConfig(a.Registrar.Address(), a.UpkeepPrivilegeManager, a.Registry.ChainModuleAddress(), a.Registry.ReorgProtectionEnabled()) + } + err = a.Registry.SetConfigTypeSafe(ocrConfig) + if err != nil { + return errors.Join(err, fmt.Errorf("failed to set config on registry")) + } } return nil } diff --git a/integration-tests/actions/keeper_helpers.go b/integration-tests/actions/keeper_helpers.go index edd0dc5f735..950d14ac8ea 100644 --- a/integration-tests/actions/keeper_helpers.go +++ b/integration-tests/actions/keeper_helpers.go @@ -418,7 +418,7 @@ func DeployKeeperConsumers(t *testing.T, contractDeployer contracts.ContractDepl keeperConsumerInstance, err = contractDeployer.DeployAutomationLogTriggerConsumer(big.NewInt(1000)) // 1000 block test range } else { // v2.0 and v2.1: Conditional based contract without Mercury - keeperConsumerInstance, err = contractDeployer.DeployKeeperConsumer(big.NewInt(5)) + keeperConsumerInstance, err = contractDeployer.DeployUpkeepCounter(big.NewInt(999999), big.NewInt(5)) } require.NoError(t, err, "Deploying Consumer instance %d shouldn't fail", contractCount+1) diff --git a/integration-tests/actions/private_network.go b/integration-tests/actions/private_network.go index 7f8bfe8bb2c..01a084b66d8 100644 --- a/integration-tests/actions/private_network.go +++ b/integration-tests/actions/private_network.go @@ -12,7 +12,7 @@ func EthereumNetworkConfigFromConfig(l zerolog.Logger, config tc.GlobalTestConfi l.Warn().Msg("No TOML private ethereum network config found, will use old geth") ethBuilder := ctf_test_env.NewEthereumNetworkBuilder() network, err = ethBuilder. - WithConsensusType(ctf_test_env.ConsensusType_PoW). + WithEthereumVersion(ctf_test_env.EthereumVersion_Eth1). WithExecutionLayer(ctf_test_env.ExecutionLayer_Geth). Build() diff --git a/integration-tests/actions/seth/actions.go b/integration-tests/actions/seth/actions.go index 02cc2802517..79ef6edb357 100644 --- a/integration-tests/actions/seth/actions.go +++ b/integration-tests/actions/seth/actions.go @@ -52,29 +52,42 @@ func FundChainlinkNodes( privateKey *ecdsa.PrivateKey, amount *big.Float, ) error { - refundErrors := []error{} for _, cl := range nodes { toAddress, err := cl.PrimaryEthAddress() if err != nil { return err } - err = SendFunds(logger, client, FundsToSendPayload{ + fromAddress, err := privateKeyToAddress(privateKey) + if err != nil { + return err + } + + receipt, err := SendFunds(logger, client, FundsToSendPayload{ ToAddress: common.HexToAddress(toAddress), Amount: conversions.EtherToWei(amount), PrivateKey: privateKey, }) if err != nil { - refundErrors = append(refundErrors, err) + logger.Err(err). + Str("From", fromAddress.Hex()). + Str("To", toAddress). + Msg("Failed to fund Chainlink node") + + return err } - } - if len(refundErrors) > 0 { - var wrapped error - for _, e := range refundErrors { - wrapped = errors.Wrapf(e, ", ") + txHash := "(none)" + if receipt != nil { + txHash = receipt.TxHash.String() } - return fmt.Errorf("failed to fund chainlink nodes due to following errors: %w", wrapped) + + logger.Info(). + Str("From", fromAddress.Hex()). + Str("To", toAddress). + Str("TxHash", txHash). + Str("Amount", amount.String()). + Msg("Funded Chainlink node") } return nil @@ -90,46 +103,72 @@ type FundsToSendPayload struct { // TODO: move to CTF? // SendFunds sends native token amount (expressed in human-scale) from address controlled by private key // to given address. If no gas limit is set, then network's default will be used. -func SendFunds(logger zerolog.Logger, client *seth.Client, payload FundsToSendPayload) error { - ctx, cancel := context.WithTimeout(context.Background(), client.Cfg.Network.TxnTimeout.Duration()) - - publicKey := payload.PrivateKey.Public() - publicKeyECDSA, ok := publicKey.(*ecdsa.PublicKey) - if !ok { - return errors.New("error casting public key to ECDSA") +func SendFunds(logger zerolog.Logger, client *seth.Client, payload FundsToSendPayload) (*types.Receipt, error) { + fromAddress, err := privateKeyToAddress(payload.PrivateKey) + if err != nil { + return nil, err } - fromAddress := crypto.PubkeyToAddress(*publicKeyECDSA) + + ctx, cancel := context.WithTimeout(context.Background(), client.Cfg.Network.TxnTimeout.Duration()) nonce, err := client.Client.PendingNonceAt(ctx, fromAddress) defer cancel() if err != nil { - return err + return nil, err } - gasLimit := uint64(client.Cfg.Network.GasLimit) + gasLimit := uint64(client.Cfg.Network.TransferGasFee) if payload.GasLimit != nil { gasLimit = *payload.GasLimit } - rawTx := &types.LegacyTx{ - Nonce: nonce, - To: &payload.ToAddress, - Value: payload.Amount, - Gas: gasLimit, - GasPrice: big.NewInt(client.Cfg.Network.GasPrice), + var signedTx *types.Transaction + + if client.Cfg.Network.EIP1559DynamicFees { + rawTx := &types.DynamicFeeTx{ + Nonce: nonce, + To: &payload.ToAddress, + Value: payload.Amount, + Gas: gasLimit, + GasFeeCap: big.NewInt(client.Cfg.Network.GasFeeCap), + GasTipCap: big.NewInt(client.Cfg.Network.GasTipCap), + } + signedTx, err = types.SignNewTx(payload.PrivateKey, types.NewLondonSigner(big.NewInt(client.ChainID)), rawTx) + } else { + rawTx := &types.LegacyTx{ + Nonce: nonce, + To: &payload.ToAddress, + Value: payload.Amount, + Gas: gasLimit, + GasPrice: big.NewInt(client.Cfg.Network.GasPrice), + } + signedTx, err = types.SignNewTx(payload.PrivateKey, types.NewEIP155Signer(big.NewInt(client.ChainID)), rawTx) } - signedTx, err := types.SignNewTx(payload.PrivateKey, types.NewEIP155Signer(big.NewInt(client.ChainID)), rawTx) + if err != nil { - return errors.Wrap(err, "failed to sign tx") + return nil, errors.Wrap(err, "failed to sign tx") } ctx, cancel = context.WithTimeout(ctx, client.Cfg.Network.TxnTimeout.Duration()) defer cancel() err = client.Client.SendTransaction(ctx, signedTx) if err != nil { - return errors.Wrap(err, "failed to send transaction") + return nil, errors.Wrap(err, "failed to send transaction") } - _, err = client.WaitMined(ctx, logger, client.Client, signedTx) - return err + + logger.Debug(). + Str("From", fromAddress.Hex()). + Str("To", payload.ToAddress.Hex()). + Str("TxHash", signedTx.Hash().String()). + Str("Amount", conversions.WeiToEther(payload.Amount).String()). + Uint64("Nonce", nonce). + Uint64("Gas Limit", gasLimit). + Int64("Gas Price", client.Cfg.Network.GasPrice). + Int64("Gas Fee Cap", client.Cfg.Network.GasFeeCap). + Int64("Gas Tip Cap", client.Cfg.Network.GasTipCap). + Bool("Dynamic fees", client.Cfg.Network.EIP1559DynamicFees). + Msg("Sent funds") + + return client.WaitMined(ctx, logger, client.Client, signedTx) } // DeployForwarderContracts first deploys Operator Factory and then uses it to deploy given number of @@ -526,3 +565,12 @@ func deployAnyOCRv1Contracts( return ocrInstances, nil } + +func privateKeyToAddress(privateKey *ecdsa.PrivateKey) (common.Address, error) { + publicKey := privateKey.Public() + publicKeyECDSA, ok := publicKey.(*ecdsa.PublicKey) + if !ok { + return common.Address{}, errors.New("error casting public key to ECDSA") + } + return crypto.PubkeyToAddress(*publicKeyECDSA), nil +} diff --git a/integration-tests/actions/seth/refund.go b/integration-tests/actions/seth/refund.go index e2bfcc143c8..4b267ffeeb9 100644 --- a/integration-tests/actions/seth/refund.go +++ b/integration-tests/actions/seth/refund.go @@ -11,6 +11,7 @@ import ( "strings" "github.com/ethereum/go-ethereum/accounts/keystore" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" "github.com/pkg/errors" "github.com/rs/zerolog" @@ -50,7 +51,7 @@ func (r *InsufficientFundTransferRetrier) Retry(ctx context.Context, logger zero if r.nextRetrier != nil { logger.Debug(). Str("retier", "InsufficientFundTransferRetrier"). - Msg("Max gas limit reached. Passing to next retrier") + Msg("Max retries reached. Passing to next retrier") return r.nextRetrier.Retry(ctx, logger, client, txErr, payload, 0) } return txErr @@ -71,7 +72,7 @@ func (r *InsufficientFundTransferRetrier) Retry(ctx context.Context, logger zero payload.Amount = newAmount - retryErr := SendFunds(logger, client, payload) + _, retryErr := SendFunds(logger, client, payload) if retryErr == nil { logger.Info(). Str("retier", "InsufficientFundTransferRetrier"). @@ -135,7 +136,7 @@ func (r *GasTooLowTransferRetrier) Retry(ctx context.Context, logger zerolog.Log payload.GasLimit = &newGasLimit - retryErr := SendFunds(logger, client, payload) + _, retryErr := SendFunds(logger, client, payload) if retryErr == nil { logger.Info(). Str("retier", "GasTooLowTransferRetrier"). @@ -204,7 +205,7 @@ func (r *OvershotTransferRetrier) Retry(ctx context.Context, logger zerolog.Logg payload.Amount = newAmount - retryErr := SendFunds(logger, client, payload) + _, retryErr := SendFunds(logger, client, payload) if retryErr == nil { logger.Info(). Str("retier", "OvershotTransferRetrier"). @@ -241,6 +242,8 @@ func ReturnFunds(log zerolog.Logger, seth *seth.Client, chainlinkNodes []contrac return nil } + failedReturns := []common.Address{} + for _, chainlinkNode := range chainlinkNodes { fundedKeys, err := chainlinkNode.ExportEVMKeysForChain(fmt.Sprint(seth.ChainID)) if err != nil { @@ -270,18 +273,49 @@ func ReturnFunds(log zerolog.Logger, seth *seth.Client, chainlinkNodes []contrac return err } - totalGasCost := new(big.Int).Mul(big.NewInt(0).SetUint64(seth.Cfg.Network.GasLimit), big.NewInt(0).SetInt64(seth.Cfg.Network.GasPrice)) + var totalGasCost *big.Int + if seth.Cfg.Network.EIP1559DynamicFees { + totalGasCost = new(big.Int).Mul(big.NewInt(0).SetInt64(seth.Cfg.Network.TransferGasFee), big.NewInt(0).SetInt64(seth.Cfg.Network.GasFeeCap)) + } else { + totalGasCost = new(big.Int).Mul(big.NewInt(0).SetInt64(seth.Cfg.Network.TransferGasFee), big.NewInt(0).SetInt64(seth.Cfg.Network.GasPrice)) + } + toSend := new(big.Int).Sub(balance, totalGasCost) + if toSend.Cmp(big.NewInt(0)) <= 0 { + log.Warn(). + Str("Address", fromAddress.String()). + Str("Estimated total cost", totalGasCost.String()). + Str("Balance", balance.String()). + Str("To send", toSend.String()). + Msg("Not enough balance to cover gas cost. Skipping return.") + + failedReturns = append(failedReturns, fromAddress) + continue + } + payload := FundsToSendPayload{ToAddress: seth.Addresses[0], Amount: toSend, PrivateKey: decryptedKey.PrivateKey} - err = SendFunds(log, seth, payload) + _, err = SendFunds(log, seth, payload) if err != nil { - handler := OvershotTransferRetrier{maxRetries: 3, nextRetrier: &InsufficientFundTransferRetrier{maxRetries: 3, nextRetrier: &GasTooLowTransferRetrier{maxGasLimit: seth.Cfg.Network.GasLimit * 3}}} - return handler.Retry(context.Background(), log, seth, err, payload, 0) + handler := OvershotTransferRetrier{maxRetries: 10, nextRetrier: &InsufficientFundTransferRetrier{maxRetries: 10, nextRetrier: &GasTooLowTransferRetrier{maxGasLimit: uint64(seth.Cfg.Network.TransferGasFee * 10)}}} + err = handler.Retry(context.Background(), log, seth, err, payload, 0) + if err != nil { + log.Error(). + Err(err). + Str("Address", fromAddress.String()). + Msg("Failed to return funds from Chainlink node to default network wallet") + failedReturns = append(failedReturns, fromAddress) + } } } } + if len(failedReturns) > 0 { + return fmt.Errorf("failed to return funds from Chainlink nodes to default network wallet for addresses: %v", failedReturns) + } + + log.Info().Msg("Successfully returned funds from all Chainlink nodes to default network wallets") + return nil } diff --git a/integration-tests/actions/vrf/common/models.go b/integration-tests/actions/vrf/common/models.go index 08a004da484..177410d9606 100644 --- a/integration-tests/actions/vrf/common/models.go +++ b/integration-tests/actions/vrf/common/models.go @@ -17,6 +17,7 @@ type VRFKeyData struct { VRFKey *client.VRFKey EncodedProvingKey VRFEncodedProvingKey KeyHash [32]byte + PubKeyCompressed string } type VRFNodeType int diff --git a/integration-tests/actions/vrf/vrfv2plus/vrfv2plus_steps.go b/integration-tests/actions/vrf/vrfv2plus/vrfv2plus_steps.go index e7ec2d15c43..c9a19c7268c 100644 --- a/integration-tests/actions/vrf/vrfv2plus/vrfv2plus_steps.go +++ b/integration-tests/actions/vrf/vrfv2plus/vrfv2plus_steps.go @@ -234,7 +234,7 @@ func SetupVRFV2_5Environment( g := errgroup.Group{} if vrfNode, exists := nodeTypeToNodeMap[vrfcommon.VRF]; exists { g.Go(func() error { - err := setupVRFNode(vrfContracts, chainID, configGeneral, pubKeyCompressed, l, vrfNode) + err := SetupVRFNode(vrfContracts, chainID, configGeneral, pubKeyCompressed, l, vrfNode) if err != nil { return err } @@ -270,6 +270,7 @@ func SetupVRFV2_5Environment( VRFKey: vrfKey, EncodedProvingKey: provingKey, KeyHash: keyHash, + PubKeyCompressed: pubKeyCompressed, } l.Info().Msg("VRFV2 Plus environment setup is finished") @@ -334,7 +335,7 @@ func SetupVRFV2PlusContracts( return vrfContracts, subIDs, nil } -func setupVRFNode(contracts *vrfcommon.VRFContracts, chainID *big.Int, config *vrfv2plus_config.General, pubKeyCompressed string, l zerolog.Logger, vrfNode *vrfcommon.VRFNode) error { +func SetupVRFNode(contracts *vrfcommon.VRFContracts, chainID *big.Int, config *vrfv2plus_config.General, pubKeyCompressed string, l zerolog.Logger, vrfNode *vrfcommon.VRFNode) error { vrfJobSpecConfig := vrfcommon.VRFJobSpecConfig{ ForwardingAllowed: *config.VRFJobForwardingAllowed, CoordinatorAddress: contracts.CoordinatorV2Plus.Address(), @@ -563,35 +564,26 @@ func RequestRandomnessAndWaitForFulfillment( vrfKeyData *vrfcommon.VRFKeyData, subID *big.Int, isNativeBilling bool, - minimumConfirmations uint16, - callbackGasLimit uint32, - numberOfWords uint32, - randomnessRequestCountPerRequest uint16, - randomnessRequestCountPerRequestDeviation uint16, - randomWordsFulfilledEventTimeout time.Duration, + config *vrfv2plus_config.General, l zerolog.Logger, ) (*vrf_coordinator_v2_5.VRFCoordinatorV25RandomWordsFulfilled, error) { - logRandRequest( + LogRandRequest( l, consumer.Address(), coordinator.Address(), subID, isNativeBilling, - minimumConfirmations, - callbackGasLimit, - numberOfWords, vrfKeyData.KeyHash, - randomnessRequestCountPerRequest, - randomnessRequestCountPerRequestDeviation, + config, ) _, err := consumer.RequestRandomness( vrfKeyData.KeyHash, subID, - minimumConfirmations, - callbackGasLimit, + *config.MinimumConfirmations, + *config.CallbackGasLimit, isNativeBilling, - numberOfWords, - randomnessRequestCountPerRequest, + *config.NumberOfWords, + *config.RandomnessRequestCountPerRequest, ) if err != nil { return nil, fmt.Errorf("%s, err %w", vrfcommon.ErrRequestRandomness, err) @@ -603,7 +595,7 @@ func RequestRandomnessAndWaitForFulfillment( vrfKeyData, subID, isNativeBilling, - randomWordsFulfilledEventTimeout, + config.RandomWordsFulfilledEventTimeout.Duration, l, ) } @@ -614,35 +606,26 @@ func RequestRandomnessAndWaitForFulfillmentUpgraded( vrfKeyData *vrfcommon.VRFKeyData, subID *big.Int, isNativeBilling bool, - minimumConfirmations uint16, - callbackGasLimit uint32, - numberOfWords uint32, - randomnessRequestCountPerRequest uint16, - randomnessRequestCountPerRequestDeviation uint16, - randomWordsFulfilledEventTimeout time.Duration, + config *vrfv2plus_config.General, l zerolog.Logger, ) (*vrf_v2plus_upgraded_version.VRFCoordinatorV2PlusUpgradedVersionRandomWordsFulfilled, error) { - logRandRequest( + LogRandRequest( l, consumer.Address(), coordinator.Address(), subID, isNativeBilling, - minimumConfirmations, - callbackGasLimit, - numberOfWords, vrfKeyData.KeyHash, - randomnessRequestCountPerRequest, - randomnessRequestCountPerRequestDeviation, + config, ) _, err := consumer.RequestRandomness( vrfKeyData.KeyHash, subID, - minimumConfirmations, - callbackGasLimit, + *config.MinimumConfirmations, + *config.CallbackGasLimit, isNativeBilling, - numberOfWords, - randomnessRequestCountPerRequest, + *config.NumberOfWords, + *config.RandomnessRequestCountPerRequest, ) if err != nil { return nil, fmt.Errorf("%s, err %w", vrfcommon.ErrRequestRandomness, err) @@ -654,7 +637,7 @@ func RequestRandomnessAndWaitForFulfillmentUpgraded( vrfKeyData, subID, isNativeBilling, - randomWordsFulfilledEventTimeout, + config.RandomWordsFulfilledEventTimeout.Duration, l, ) } @@ -689,13 +672,14 @@ func SetupVRFV2PlusWrapperEnvironment( err = wrapperContracts.VRFV2PlusWrapper.SetConfig( *vrfv2PlusConfig.WrapperGasOverhead, *vrfv2PlusConfig.CoordinatorGasOverhead, - *vrfv2PlusConfig.WrapperPremiumPercentage, + *vrfv2PlusConfig.NativePremiumPercentage, + *vrfv2PlusConfig.LinkPremiumPercentage, keyHash, *vrfv2PlusConfig.WrapperMaxNumberOfWords, *vrfv2PlusConfig.StalenessSeconds, big.NewInt(*vrfv2PlusConfig.FallbackWeiPerUnitLink), - *vrfv2PlusConfig.FulfillmentFlatFeeLinkPPM, *vrfv2PlusConfig.FulfillmentFlatFeeNativePPM, + *vrfv2PlusConfig.FulfillmentFlatFeeLinkDiscountPPM, ) if err != nil { return nil, nil, err @@ -754,10 +738,10 @@ func SetupVRFV2PlusWrapperEnvironment( return wrapperContracts, wrapperSubID, nil } -func DeployVRFV2PlusWrapperConsumers(contractDeployer contracts.ContractDeployer, linkTokenAddress string, vrfV2PlusWrapper contracts.VRFV2PlusWrapper, consumerContractsAmount int) ([]contracts.VRFv2PlusWrapperLoadTestConsumer, error) { +func DeployVRFV2PlusWrapperConsumers(contractDeployer contracts.ContractDeployer, vrfV2PlusWrapper contracts.VRFV2PlusWrapper, consumerContractsAmount int) ([]contracts.VRFv2PlusWrapperLoadTestConsumer, error) { var consumers []contracts.VRFv2PlusWrapperLoadTestConsumer for i := 1; i <= consumerContractsAmount; i++ { - loadTestConsumer, err := contractDeployer.DeployVRFV2PlusWrapperLoadTestConsumer(linkTokenAddress, vrfV2PlusWrapper.Address()) + loadTestConsumer, err := contractDeployer.DeployVRFV2PlusWrapperLoadTestConsumer(vrfV2PlusWrapper.Address()) if err != nil { return nil, fmt.Errorf("%s, err %w", ErrAdvancedConsumer, err) } @@ -784,7 +768,7 @@ func DeployVRFV2PlusDirectFundingContracts( return nil, fmt.Errorf("%s, err %w", vrfcommon.ErrWaitTXsComplete, err) } - consumers, err := DeployVRFV2PlusWrapperConsumers(contractDeployer, linkTokenAddress, vrfv2PlusWrapper, consumerContractsAmount) + consumers, err := DeployVRFV2PlusWrapperConsumers(contractDeployer, vrfv2PlusWrapper, consumerContractsAmount) if err != nil { return nil, err } @@ -801,41 +785,33 @@ func WrapperRequestRandomness( vrfKeyData *vrfcommon.VRFKeyData, subID *big.Int, isNativeBilling bool, - minimumConfirmations uint16, - callbackGasLimit uint32, - numberOfWords uint32, - randomnessRequestCountPerRequest uint16, - randomnessRequestCountPerRequestDeviation uint16, + config *vrfv2plus_config.General, l zerolog.Logger) (string, error) { - logRandRequest( + LogRandRequest( l, consumer.Address(), coordinatorAddress, subID, isNativeBilling, - minimumConfirmations, - callbackGasLimit, - numberOfWords, vrfKeyData.KeyHash, - randomnessRequestCountPerRequest, - randomnessRequestCountPerRequestDeviation, + config, ) if isNativeBilling { _, err := consumer.RequestRandomnessNative( - minimumConfirmations, - callbackGasLimit, - numberOfWords, - randomnessRequestCountPerRequest, + *config.MinimumConfirmations, + *config.CallbackGasLimit, + *config.NumberOfWords, + *config.RandomnessRequestCountPerRequest, ) if err != nil { return "", fmt.Errorf("%s, err %w", ErrRequestRandomnessDirectFundingNativePayment, err) } } else { _, err := consumer.RequestRandomness( - minimumConfirmations, - callbackGasLimit, - numberOfWords, - randomnessRequestCountPerRequest, + *config.MinimumConfirmations, + *config.CallbackGasLimit, + *config.NumberOfWords, + *config.RandomnessRequestCountPerRequest, ) if err != nil { return "", fmt.Errorf("%s, err %w", ErrRequestRandomnessDirectFundingLinkPayment, err) @@ -854,18 +830,11 @@ func DirectFundingRequestRandomnessAndWaitForFulfillment( vrfKeyData *vrfcommon.VRFKeyData, subID *big.Int, isNativeBilling bool, - minimumConfirmations uint16, - callbackGasLimit uint32, - numberOfWords uint32, - randomnessRequestCountPerRequest uint16, - randomnessRequestCountPerRequestDeviation uint16, - randomWordsFulfilledEventTimeout time.Duration, + config *vrfv2plus_config.General, l zerolog.Logger, ) (*vrf_coordinator_v2_5.VRFCoordinatorV25RandomWordsFulfilled, error) { wrapperAddress, err := WrapperRequestRandomness(consumer, coordinator.Address(), vrfKeyData, subID, - isNativeBilling, minimumConfirmations, callbackGasLimit, numberOfWords, - randomnessRequestCountPerRequest, randomnessRequestCountPerRequestDeviation, - l) + isNativeBilling, config, l) if err != nil { return nil, fmt.Errorf("error getting wrapper address, err: %w", err) } @@ -875,7 +844,7 @@ func DirectFundingRequestRandomnessAndWaitForFulfillment( vrfKeyData, subID, isNativeBilling, - randomWordsFulfilledEventTimeout, + config.RandomWordsFulfilledEventTimeout.Duration, l, ) } @@ -886,18 +855,11 @@ func DirectFundingRequestRandomnessAndWaitForFulfillmentUpgraded( vrfKeyData *vrfcommon.VRFKeyData, subID *big.Int, isNativeBilling bool, - minimumConfirmations uint16, - callbackGasLimit uint32, - numberOfWords uint32, - randomnessRequestCountPerRequest uint16, - randomnessRequestCountPerRequestDeviation uint16, - randomWordsFulfilledEventTimeout time.Duration, + config *vrfv2plus_config.General, l zerolog.Logger, ) (*vrf_v2plus_upgraded_version.VRFCoordinatorV2PlusUpgradedVersionRandomWordsFulfilled, error) { wrapperAddress, err := WrapperRequestRandomness(consumer, coordinator.Address(), vrfKeyData, subID, - isNativeBilling, minimumConfirmations, callbackGasLimit, numberOfWords, - randomnessRequestCountPerRequest, randomnessRequestCountPerRequestDeviation, - l) + isNativeBilling, config, l) if err != nil { return nil, fmt.Errorf("error getting wrapper address, err: %w", err) } @@ -907,7 +869,7 @@ func DirectFundingRequestRandomnessAndWaitForFulfillmentUpgraded( vrfKeyData, subID, isNativeBilling, - randomWordsFulfilledEventTimeout, + config.RandomWordsFulfilledEventTimeout.Duration, l, ) } @@ -1018,7 +980,7 @@ func LogSubDetails(l zerolog.Logger, subscription vrf_coordinator_v2_5.GetSubscr Str("Link Balance", (*commonassets.Link)(subscription.Balance).Link()). Str("Native Token Balance", assets.FormatWei(subscription.NativeBalance)). Str("Subscription ID", subID.String()). - Str("Subscription Owner", subscription.Owner.String()). + Str("Subscription Owner", subscription.SubOwner.String()). Interface("Subscription Consumers", subscription.Consumers). Msg("Subscription Data") } @@ -1114,7 +1076,7 @@ func LogSubDetailsAfterMigration(l zerolog.Logger, newCoordinator contracts.VRFC Str("Subscription ID", subID.String()). Str("Juels Balance", migratedSubscription.Balance.String()). Str("Native Token Balance", migratedSubscription.NativeBalance.String()). - Str("Subscription Owner", migratedSubscription.Owner.String()). + Str("Subscription Owner", migratedSubscription.SubOwner.String()). Interface("Subscription Consumers", migratedSubscription.Consumers). Msg("Subscription Data After Migration to New Coordinator") } @@ -1161,28 +1123,24 @@ func LogFulfillmentDetailsNativeBilling( Msg("Random Words Request Fulfilment Details For Native Billing") } -func logRandRequest( +func LogRandRequest( l zerolog.Logger, consumer string, coordinator string, subID *big.Int, isNativeBilling bool, - minimumConfirmations uint16, - callbackGasLimit uint32, - numberOfWords uint32, keyHash [32]byte, - randomnessRequestCountPerRequest uint16, - randomnessRequestCountPerRequestDeviation uint16) { + config *vrfv2plus_config.General) { l.Info(). Str("Consumer", consumer). Str("Coordinator", coordinator). Str("SubID", subID.String()). Bool("IsNativePayment", isNativeBilling). - Uint16("MinimumConfirmations", minimumConfirmations). - Uint32("CallbackGasLimit", callbackGasLimit). - Uint32("NumberOfWords", numberOfWords). + Uint16("MinimumConfirmations", *config.MinimumConfirmations). + Uint32("CallbackGasLimit", *config.CallbackGasLimit). + Uint32("NumberOfWords", *config.NumberOfWords). Str("KeyHash", fmt.Sprintf("0x%x", keyHash)). - Uint16("RandomnessRequestCountPerRequest", randomnessRequestCountPerRequest). - Uint16("RandomnessRequestCountPerRequestDeviation", randomnessRequestCountPerRequestDeviation). + Uint16("RandomnessRequestCountPerRequest", *config.RandomnessRequestCountPerRequest). + Uint16("RandomnessRequestCountPerRequestDeviation", *config.RandomnessRequestCountPerRequestDeviation). Msg("Requesting randomness") } diff --git a/integration-tests/benchmark/keeper_test.go b/integration-tests/benchmark/keeper_test.go index d6c4c6b2587..e6cda6d7f27 100644 --- a/integration-tests/benchmark/keeper_test.go +++ b/integration-tests/benchmark/keeper_test.go @@ -141,7 +141,7 @@ func TestAutomationBenchmark(t *testing.T) { networkName := strings.ReplaceAll(benchmarkNetwork.Name, " ", "") testName := fmt.Sprintf("%s%s", networkName, *config.Keeper.Common.RegistryToTest) l.Info().Str("Test Name", testName).Msg("Running Benchmark Test") - benchmarkTestNetwork := getNetworkConfig(networkName, &config) + benchmarkTestNetwork := getNetworkConfig(&config) l.Info().Str("Namespace", testEnvironment.Cfg.Namespace).Msg("Connected to Keepers Benchmark Environment") @@ -239,14 +239,15 @@ func repeatRegistries(registryVersion eth_contracts.KeeperRegistryVersion, numbe return repeatedRegistries } -func getNetworkConfig(networkName string, config *tc.TestConfig) NetworkConfig { +func getNetworkConfig(config *tc.TestConfig) NetworkConfig { + evmNetwork := networks.MustGetSelectedNetworkConfig(config.GetNetworkConfig())[0] var nc NetworkConfig var ok bool - if nc, ok = networkConfig[networkName]; !ok { + if nc, ok = networkConfig[evmNetwork.Name]; !ok { return defaultNetworkConfig } - if networkName == "SimulatedGeth" || networkName == "geth" { + if evmNetwork.Name == networks.SimulatedEVM.Name || evmNetwork.Name == networks.SimulatedEVMNonDev.Name { return nc } @@ -256,63 +257,63 @@ func getNetworkConfig(networkName string, config *tc.TestConfig) NetworkConfig { } var networkConfig = map[string]NetworkConfig{ - "SimulatedGeth": { + networks.SimulatedEVM.Name: { upkeepSLA: int64(120), //2 minutes blockTime: time.Second, deltaStage: 30 * time.Second, funding: big.NewFloat(100_000), }, - "geth": { + networks.SimulatedEVMNonDev.Name: { upkeepSLA: int64(120), //2 minutes blockTime: time.Second, deltaStage: 30 * time.Second, funding: big.NewFloat(100_000), }, - "GoerliTestnet": { + networks.GoerliTestnet.Name: { upkeepSLA: int64(4), blockTime: 12 * time.Second, deltaStage: time.Duration(0), }, - "ArbitrumGoerli": { - upkeepSLA: int64(20), - blockTime: time.Second, - deltaStage: time.Duration(0), - }, - "OptimismGoerli": { - upkeepSLA: int64(20), - blockTime: time.Second, - deltaStage: time.Duration(0), - }, - "SepoliaTestnet": { + networks.SepoliaTestnet.Name: { upkeepSLA: int64(4), blockTime: 12 * time.Second, deltaStage: time.Duration(0), }, - "PolygonMumbai": { + networks.PolygonMumbai.Name: { upkeepSLA: int64(4), blockTime: 12 * time.Second, deltaStage: time.Duration(0), }, - "BaseGoerli": { + networks.BaseGoerli.Name: { upkeepSLA: int64(60), blockTime: 2 * time.Second, deltaStage: 20 * time.Second, }, - "ArbitrumSepolia": { + networks.ArbitrumSepolia.Name: { + upkeepSLA: int64(120), + blockTime: time.Second, + deltaStage: 20 * time.Second, + }, + networks.OptimismSepolia.Name: { upkeepSLA: int64(120), blockTime: time.Second, deltaStage: 20 * time.Second, }, - "LineaGoerli": { + networks.LineaGoerli.Name: { upkeepSLA: int64(120), blockTime: time.Second, deltaStage: 20 * time.Second, }, - "GnosisChiado": { + networks.GnosisChiado.Name: { upkeepSLA: int64(120), blockTime: 6 * time.Second, deltaStage: 20 * time.Second, }, + networks.PolygonZkEvmCardona.Name: { + upkeepSLA: int64(120), + blockTime: time.Second, + deltaStage: 20 * time.Second, + }, } func SetupAutomationBenchmarkEnv(t *testing.T, keeperTestConfig types.KeeperBenchmarkTestConfig) (*environment.Environment, blockchain.EVMNetwork) { diff --git a/integration-tests/chaos/automation_chaos_test.go b/integration-tests/chaos/automation_chaos_test.go index abfc026efc9..fac9f83ba79 100644 --- a/integration-tests/chaos/automation_chaos_test.go +++ b/integration-tests/chaos/automation_chaos_test.go @@ -130,7 +130,7 @@ func TestAutomationChaos(t *testing.T) { } for name, registryVersion := range registryVersions { - registryVersion := registryVersion + rv := registryVersion t.Run(name, func(t *testing.T) { t.Parallel() @@ -223,7 +223,7 @@ func TestAutomationChaos(t *testing.T) { WsURL: network.URL, HttpURL: network.HTTPURLs[0], })) - err := testEnvironment.Run() + err = testEnvironment.Run() require.NoError(t, err, "Error setting up test environment") if testEnvironment.WillUseRemoteRunner() { return @@ -264,7 +264,7 @@ func TestAutomationChaos(t *testing.T) { registry, registrar := actions.DeployAutoOCRRegistryAndRegistrar( t, - registryVersion, + rv, defaultOCRRegistryConfig, linkToken, contractDeployer, @@ -275,12 +275,17 @@ func TestAutomationChaos(t *testing.T) { err = linkToken.Transfer(registry.Address(), big.NewInt(0).Mul(big.NewInt(1e18), big.NewInt(int64(numberOfUpkeeps)))) require.NoError(t, err, "Funding keeper registry contract shouldn't fail") - actions.CreateOCRKeeperJobs(t, chainlinkNodes, registry.Address(), network.ChainID, 0, registryVersion) + actions.CreateOCRKeeperJobs(t, chainlinkNodes, registry.Address(), network.ChainID, 0, rv) nodesWithoutBootstrap := chainlinkNodes[1:] - defaultOCRRegistryConfig.RegistryVersion = registryVersion + defaultOCRRegistryConfig.RegistryVersion = rv ocrConfig, err := actions.BuildAutoOCR2ConfigVars(t, nodesWithoutBootstrap, defaultOCRRegistryConfig, registrar.Address(), 30*time.Second, registry.ChainModuleAddress(), registry.ReorgProtectionEnabled()) require.NoError(t, err, "Error building OCR config vars") - err = registry.SetConfig(defaultOCRRegistryConfig, ocrConfig) + + if rv == eth_contracts.RegistryVersion_2_0 { + err = registry.SetConfig(defaultOCRRegistryConfig, ocrConfig) + } else { + err = registry.SetConfigTypeSafe(ocrConfig) + } require.NoError(t, err, "Registry config should be be set successfully") require.NoError(t, chainClient.WaitForEvents(), "Waiting for config to be set") diff --git a/integration-tests/chaos/ocr_chaos_test.go b/integration-tests/chaos/ocr_chaos_test.go index b2adec04117..c99318d51dd 100644 --- a/integration-tests/chaos/ocr_chaos_test.go +++ b/integration-tests/chaos/ocr_chaos_test.go @@ -171,6 +171,8 @@ func TestOCRChaos(t *testing.T) { network = utils.MustReplaceSimulatedNetworkUrlWithK8(l, network, *testEnvironment) sethCfg := utils.MergeSethAndEvmNetworkConfigs(l, network, *readSethCfg) + err = utils.ValidateSethNetworkConfig(sethCfg.Network) + require.NoError(t, err, "Error validating seth network config") seth, err := seth.NewClientWithConfig(&sethCfg) require.NoError(t, err, "Error creating seth client") diff --git a/integration-tests/contracts/contract_deployer.go b/integration-tests/contracts/contract_deployer.go index 8bf720cdb10..c7407b79e54 100644 --- a/integration-tests/contracts/contract_deployer.go +++ b/integration-tests/contracts/contract_deployer.go @@ -24,6 +24,7 @@ import ( "github.com/smartcontractkit/chainlink-testing-framework/blockchain" eth_contracts "github.com/smartcontractkit/chainlink/integration-tests/contracts/ethereum" + "github.com/smartcontractkit/chainlink/integration-tests/wrappers" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/functions/generated/functions_load_test_client" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/functions/generated/functions_v1_events_mock" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/arbitrum_module" @@ -41,6 +42,7 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/gas_wrapper" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/gas_wrapper_mock" iregistry22 "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/i_automation_registry_master_wrapper_2_2" + ac "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/i_automation_v21_plus_common" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/i_chain_module" iregistry21 "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/i_keeper_registry_master_wrapper_2_1" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/keeper_consumer_performance_wrapper" @@ -131,7 +133,7 @@ type ContractDeployer interface { DeployVRFv2LoadTestConsumer(coordinatorAddr string) (VRFv2LoadTestConsumer, error) DeployVRFV2WrapperLoadTestConsumer(linkAddr string, vrfV2WrapperAddr string) (VRFv2WrapperLoadTestConsumer, error) DeployVRFv2PlusLoadTestConsumer(coordinatorAddr string) (VRFv2PlusLoadTestConsumer, error) - DeployVRFV2PlusWrapperLoadTestConsumer(linkAddr string, vrfV2PlusWrapperAddr string) (VRFv2PlusWrapperLoadTestConsumer, error) + DeployVRFV2PlusWrapperLoadTestConsumer(vrfV2PlusWrapperAddr string) (VRFv2PlusWrapperLoadTestConsumer, error) DeployVRFCoordinator(linkAddr string, bhsAddr string) (VRFCoordinator, error) DeployVRFCoordinatorV2(linkAddr string, bhsAddr string, linkEthFeedAddr string) (VRFCoordinatorV2, error) DeployVRFCoordinatorV2_5(bhsAddr string) (VRFCoordinatorV2_5, error) @@ -531,7 +533,7 @@ func (e *EthereumContractDeployer) DeployLinkTokenContract() (LinkToken, error) auth *bind.TransactOpts, backend bind.ContractBackend, ) (common.Address, *types.Transaction, interface{}, error) { - return link_token_interface.DeployLinkToken(auth, backend) + return link_token_interface.DeployLinkToken(auth, wrappers.MustNewWrappedContractBackend(e.client, nil)) }) if err != nil { return nil, err @@ -707,7 +709,7 @@ func (e *EthereumContractDeployer) DeployMockETHLINKFeed(answer *big.Int) (MockE auth *bind.TransactOpts, backend bind.ContractBackend, ) (common.Address, *types.Transaction, interface{}, error) { - return mock_ethlink_aggregator_wrapper.DeployMockETHLINKAggregator(auth, backend, answer) + return mock_ethlink_aggregator_wrapper.DeployMockETHLINKAggregator(auth, wrappers.MustNewWrappedContractBackend(e.client, nil), answer) }) if err != nil { return nil, err @@ -759,7 +761,7 @@ func (e *EthereumContractDeployer) DeployMockGasFeed(answer *big.Int) (MockGasFe auth *bind.TransactOpts, backend bind.ContractBackend, ) (common.Address, *types.Transaction, interface{}, error) { - return mock_gas_aggregator_wrapper.DeployMockGASAggregator(auth, backend, answer) + return mock_gas_aggregator_wrapper.DeployMockGASAggregator(auth, wrappers.MustNewWrappedContractBackend(e.client, nil), answer) }) if err != nil { return nil, err @@ -794,7 +796,7 @@ func (e *EthereumContractDeployer) DeployUpkeepTranscoder() (UpkeepTranscoder, e opts *bind.TransactOpts, backend bind.ContractBackend, ) (common.Address, *types.Transaction, interface{}, error) { - return upkeep_transcoder.DeployUpkeepTranscoder(opts, backend) + return upkeep_transcoder.DeployUpkeepTranscoder(opts, wrappers.MustNewWrappedContractBackend(e.client, nil)) }) if err != nil { @@ -836,7 +838,7 @@ func (e *EthereumContractDeployer) DeployKeeperRegistrar(registryVersion eth_con opts *bind.TransactOpts, backend bind.ContractBackend, ) (common.Address, *types.Transaction, interface{}, error) { - return keeper_registrar_wrapper2_0.DeployKeeperRegistrar(opts, backend, common.HexToAddress(linkAddr), registrarSettings.AutoApproveConfigType, + return keeper_registrar_wrapper2_0.DeployKeeperRegistrar(opts, wrappers.MustNewWrappedContractBackend(e.client, nil), common.HexToAddress(linkAddr), registrarSettings.AutoApproveConfigType, registrarSettings.AutoApproveMaxAllowed, common.HexToAddress(registrarSettings.RegistryAddr), registrarSettings.MinLinkJuels) }) @@ -865,7 +867,7 @@ func (e *EthereumContractDeployer) DeployKeeperRegistrar(registryVersion eth_con return registrar21.DeployAutomationRegistrar( opts, - backend, + wrappers.MustNewWrappedContractBackend(e.client, nil), common.HexToAddress(linkAddr), common.HexToAddress(registrarSettings.RegistryAddr), registrarSettings.MinLinkJuels, @@ -978,7 +980,7 @@ func (e *EthereumContractDeployer) DeployKeeperRegistry( ) (common.Address, *types.Transaction, interface{}, error) { return keeper_registry_wrapper1_1.DeployKeeperRegistry( auth, - backend, + wrappers.MustNewWrappedContractBackend(e.client, nil), common.HexToAddress(opts.LinkAddr), common.HexToAddress(opts.ETHFeedAddr), common.HexToAddress(opts.GasFeedAddr), @@ -1010,7 +1012,7 @@ func (e *EthereumContractDeployer) DeployKeeperRegistry( ) (common.Address, *types.Transaction, interface{}, error) { return keeper_registry_wrapper1_2.DeployKeeperRegistry( auth, - backend, + wrappers.MustNewWrappedContractBackend(e.client, nil), common.HexToAddress(opts.LinkAddr), common.HexToAddress(opts.ETHFeedAddr), common.HexToAddress(opts.GasFeedAddr), @@ -1048,7 +1050,7 @@ func (e *EthereumContractDeployer) DeployKeeperRegistry( ) (common.Address, *types.Transaction, interface{}, error) { return keeper_registry_logic1_3.DeployKeeperRegistryLogic( auth, - backend, + wrappers.MustNewWrappedContractBackend(e.client, nil), mode, // Default payment model registryGasOverhead, // Registry gas overhead common.HexToAddress(opts.LinkAddr), @@ -1070,7 +1072,7 @@ func (e *EthereumContractDeployer) DeployKeeperRegistry( ) (common.Address, *types.Transaction, interface{}, error) { return keeper_registry_wrapper1_3.DeployKeeperRegistry( auth, - backend, + wrappers.MustNewWrappedContractBackend(e.client, nil), *logicAddress, keeper_registry_wrapper1_3.Config{ PaymentPremiumPPB: opts.Settings.PaymentPremiumPPB, @@ -1106,7 +1108,7 @@ func (e *EthereumContractDeployer) DeployKeeperRegistry( ) (common.Address, *types.Transaction, interface{}, error) { return keeper_registry_logic2_0.DeployKeeperRegistryLogic( auth, - backend, + wrappers.MustNewWrappedContractBackend(e.client, nil), mode, // Default payment model common.HexToAddress(opts.LinkAddr), common.HexToAddress(opts.ETHFeedAddr), @@ -1128,7 +1130,7 @@ func (e *EthereumContractDeployer) DeployKeeperRegistry( return keeper_registry_wrapper2_0.DeployKeeperRegistry( auth, - backend, + wrappers.MustNewWrappedContractBackend(e.client, nil), *logicAddress, ) }) @@ -1155,7 +1157,7 @@ func (e *EthereumContractDeployer) DeployKeeperRegistry( return registrylogicb21.DeployKeeperRegistryLogicB( auth, - backend, + wrappers.MustNewWrappedContractBackend(e.client, nil), mode, common.HexToAddress(opts.LinkAddr), common.HexToAddress(opts.ETHFeedAddr), @@ -1178,7 +1180,7 @@ func (e *EthereumContractDeployer) DeployKeeperRegistry( return registrylogica21.DeployKeeperRegistryLogicA( auth, - backend, + wrappers.MustNewWrappedContractBackend(e.client, nil), *registryLogicBAddr, ) }) @@ -1195,7 +1197,7 @@ func (e *EthereumContractDeployer) DeployKeeperRegistry( ) (common.Address, *types.Transaction, interface{}, error) { return registry21.DeployKeeperRegistry( auth, - backend, + wrappers.MustNewWrappedContractBackend(e.client, nil), *registryLogicAAddr, ) }) @@ -1208,7 +1210,7 @@ func (e *EthereumContractDeployer) DeployKeeperRegistry( registryMaster, err := iregistry21.NewIKeeperRegistryMaster( *address, - e.client.Backend(), + wrappers.MustNewWrappedContractBackend(e.client, nil), ) if err != nil { return nil, err @@ -1229,28 +1231,28 @@ func (e *EthereumContractDeployer) DeployKeeperRegistry( auth *bind.TransactOpts, backend bind.ContractBackend, ) (common.Address, *types.Transaction, interface{}, error) { - return scroll_module.DeployScrollModule(auth, backend) + return scroll_module.DeployScrollModule(auth, wrappers.MustNewWrappedContractBackend(e.client, nil)) }) } else if chainId == networks.ArbitrumMainnet.ChainID || chainId == networks.ArbitrumSepolia.ChainID { chainModuleAddr, _, _, err = e.client.DeployContract("ArbitrumModule", func( auth *bind.TransactOpts, backend bind.ContractBackend, ) (common.Address, *types.Transaction, interface{}, error) { - return arbitrum_module.DeployArbitrumModule(auth, backend) + return arbitrum_module.DeployArbitrumModule(auth, wrappers.MustNewWrappedContractBackend(e.client, nil)) }) } else if chainId == networks.OptimismMainnet.ChainID || chainId == networks.OptimismSepolia.ChainID { chainModuleAddr, _, _, err = e.client.DeployContract("OptimismModule", func( auth *bind.TransactOpts, backend bind.ContractBackend, ) (common.Address, *types.Transaction, interface{}, error) { - return optimism_module.DeployOptimismModule(auth, backend) + return optimism_module.DeployOptimismModule(auth, wrappers.MustNewWrappedContractBackend(e.client, nil)) }) } else { chainModuleAddr, _, _, err = e.client.DeployContract("ChainModuleBase", func( auth *bind.TransactOpts, backend bind.ContractBackend, ) (common.Address, *types.Transaction, interface{}, error) { - return chain_module_base.DeployChainModuleBase(auth, backend) + return chain_module_base.DeployChainModuleBase(auth, wrappers.MustNewWrappedContractBackend(e.client, nil)) }) } if err != nil { @@ -1278,7 +1280,7 @@ func (e *EthereumContractDeployer) DeployKeeperRegistry( return registrylogicb22.DeployAutomationRegistryLogicB( auth, - backend, + wrappers.MustNewWrappedContractBackend(e.client, nil), common.HexToAddress(opts.LinkAddr), common.HexToAddress(opts.ETHFeedAddr), common.HexToAddress(opts.GasFeedAddr), @@ -1301,7 +1303,7 @@ func (e *EthereumContractDeployer) DeployKeeperRegistry( return registrylogica22.DeployAutomationRegistryLogicA( auth, - backend, + wrappers.MustNewWrappedContractBackend(e.client, nil), *registryLogicBAddr, ) }) @@ -1318,7 +1320,7 @@ func (e *EthereumContractDeployer) DeployKeeperRegistry( ) (common.Address, *types.Transaction, interface{}, error) { return registry22.DeployAutomationRegistry( auth, - backend, + wrappers.MustNewWrappedContractBackend(e.client, nil), *registryLogicAAddr, ) }) @@ -1331,7 +1333,7 @@ func (e *EthereumContractDeployer) DeployKeeperRegistry( registryMaster, err := iregistry22.NewIAutomationRegistryMaster( *address, - e.client.Backend(), + wrappers.MustNewWrappedContractBackend(e.client, nil), ) if err != nil { return nil, err @@ -1339,7 +1341,7 @@ func (e *EthereumContractDeployer) DeployKeeperRegistry( chainModule, err := i_chain_module.NewIChainModule( *chainModuleAddr, - e.client.Backend(), + wrappers.MustNewWrappedContractBackend(e.client, nil), ) if err != nil { return nil, err @@ -1447,7 +1449,7 @@ func (e *EthereumContractDeployer) LoadKeeperRegistry(address common.Address, re address common.Address, backend bind.ContractBackend, ) (interface{}, error) { - return iregistry21.NewIKeeperRegistryMaster(address, backend) + return ac.NewIAutomationV21PlusCommon(address, backend) }) if err != nil { return nil, err @@ -1502,7 +1504,7 @@ func (e *EthereumContractDeployer) DeployAutomationLogTriggerConsumer(testInterv backend bind.ContractBackend, ) (common.Address, *types.Transaction, interface{}, error) { return log_upkeep_counter_wrapper.DeployLogUpkeepCounter( - auth, backend, testInterval, + auth, wrappers.MustNewWrappedContractBackend(e.client, nil), testInterval, ) }) if err != nil { @@ -1540,7 +1542,7 @@ func (e *EthereumContractDeployer) DeployAutomationStreamsLookupUpkeepConsumer(t backend bind.ContractBackend, ) (common.Address, *types.Transaction, interface{}, error) { return streams_lookup_upkeep_wrapper.DeployStreamsLookupUpkeep( - auth, backend, testRange, interval, useArbBlock, staging, verify, + auth, wrappers.MustNewWrappedContractBackend(e.client, nil), testRange, interval, useArbBlock, staging, verify, ) }) if err != nil { @@ -1559,7 +1561,7 @@ func (e *EthereumContractDeployer) DeployAutomationLogTriggeredStreamsLookupUpke backend bind.ContractBackend, ) (common.Address, *types.Transaction, interface{}, error) { return log_triggered_streams_lookup_wrapper.DeployLogTriggeredStreamsLookup( - auth, backend, false, false, false, + auth, wrappers.MustNewWrappedContractBackend(e.client, nil), false, false, false, ) }) if err != nil { @@ -1577,7 +1579,7 @@ func (e *EthereumContractDeployer) DeployUpkeepCounter(testRange *big.Int, inter auth *bind.TransactOpts, backend bind.ContractBackend, ) (common.Address, *types.Transaction, interface{}, error) { - return upkeep_counter_wrapper.DeployUpkeepCounter(auth, backend, testRange, interval) + return upkeep_counter_wrapper.DeployUpkeepCounter(auth, wrappers.MustNewWrappedContractBackend(e.client, nil), testRange, interval) }) if err != nil { return nil, err diff --git a/integration-tests/contracts/contract_loader.go b/integration-tests/contracts/contract_loader.go index a2a4fb60be5..9c26a671194 100644 --- a/integration-tests/contracts/contract_loader.go +++ b/integration-tests/contracts/contract_loader.go @@ -3,6 +3,7 @@ package contracts import ( "errors" + "github.com/smartcontractkit/chainlink/integration-tests/wrappers" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/vrf_coordinator_v2_5" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/vrf_v2plus_load_test_with_metrics" @@ -409,7 +410,7 @@ func (e *EthereumContractLoader) LoadVRFCoordinatorV2(addr string) (VRFCoordinat address common.Address, backend bind.ContractBackend, ) (interface{}, error) { - return vrf_coordinator_v2.NewVRFCoordinatorV2(address, backend) + return vrf_coordinator_v2.NewVRFCoordinatorV2(address, wrappers.MustNewWrappedContractBackend(e.client, nil)) }) if err != nil { return nil, err diff --git a/integration-tests/contracts/contract_vrf_models.go b/integration-tests/contracts/contract_vrf_models.go index 0fa171fb243..fc4863c935c 100644 --- a/integration-tests/contracts/contract_vrf_models.go +++ b/integration-tests/contracts/contract_vrf_models.go @@ -164,7 +164,7 @@ type VRFV2Wrapper interface { type VRFV2PlusWrapper interface { Address() string - SetConfig(wrapperGasOverhead uint32, coordinatorGasOverhead uint32, wrapperPremiumPercentage uint8, keyHash [32]byte, maxNumWords uint8, stalenessSeconds uint32, fallbackWeiPerUnitLink *big.Int, fulfillmentFlatFeeLinkPPM uint32, fulfillmentFlatFeeNativePPM uint32) error + SetConfig(wrapperGasOverhead uint32, coordinatorGasOverhead uint32, 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) Migrate(newCoordinator common.Address) error Coordinator(ctx context.Context) (common.Address, error) diff --git a/integration-tests/contracts/ethereum_contracts.go b/integration-tests/contracts/ethereum_contracts.go index f78e64d82be..1035a073f51 100644 --- a/integration-tests/contracts/ethereum_contracts.go +++ b/integration-tests/contracts/ethereum_contracts.go @@ -15,13 +15,13 @@ import ( "github.com/ethereum/go-ethereum/core/types" "github.com/rs/zerolog" "github.com/rs/zerolog/log" - "github.com/smartcontractkit/libocr/gethwrappers/offchainaggregator" "github.com/smartcontractkit/libocr/gethwrappers2/ocr2aggregator" ocrConfigHelper "github.com/smartcontractkit/libocr/offchainreporting/confighelper" ocrTypes "github.com/smartcontractkit/libocr/offchainreporting/types" "github.com/smartcontractkit/chainlink-testing-framework/blockchain" + "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/functions/generated/functions_coordinator" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/functions/generated/functions_load_test_client" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/functions/generated/functions_router" @@ -33,6 +33,8 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/functions_oracle_events_mock" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/gas_wrapper" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/gas_wrapper_mock" + "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/i_automation_registry_master_wrapper_2_2" + "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/i_keeper_registry_master_wrapper_2_1" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/keeper_registrar_wrapper1_2_mock" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/keeper_registry_wrapper1_1_mock" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/link_token_interface" @@ -1938,6 +1940,8 @@ type OCRv2Config struct { Transmitters []common.Address F uint8 OnchainConfig []byte + TypedOnchainConfig21 i_keeper_registry_master_wrapper_2_1.IAutomationV21PlusCommonOnchainConfigLegacy + TypedOnchainConfig22 i_automation_registry_master_wrapper_2_2.AutomationRegistryBase22OnchainConfig OffchainConfigVersion uint64 OffchainConfig []byte } diff --git a/integration-tests/contracts/ethereum_contracts_seth.go b/integration-tests/contracts/ethereum_contracts_seth.go index 237d6896234..a2703a0e019 100644 --- a/integration-tests/contracts/ethereum_contracts_seth.go +++ b/integration-tests/contracts/ethereum_contracts_seth.go @@ -18,6 +18,7 @@ import ( ocrConfigHelper "github.com/smartcontractkit/libocr/offchainreporting/confighelper" ocrTypes "github.com/smartcontractkit/libocr/offchainreporting/types" + "github.com/smartcontractkit/chainlink/integration-tests/wrappers" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/authorized_forwarder" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/operator_factory" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/operator_wrapper" @@ -80,7 +81,7 @@ func DeployOffchainAggregator(l zerolog.Logger, seth *seth.Client, linkTokenAddr return EthereumOffchainAggregator{}, fmt.Errorf("OCR instance deployment have failed: %w", err) } - ocr, err := offchainaggregator.NewOffchainAggregator(ocrDeploymentData.Address, seth.Client) + ocr, err := offchainaggregator.NewOffchainAggregator(ocrDeploymentData.Address, wrappers.MustNewWrappedContractBackend(nil, seth)) if err != nil { return EthereumOffchainAggregator{}, fmt.Errorf("failed to instantiate OCR instance: %w", err) } @@ -458,7 +459,7 @@ func DeployOffchainAggregatorV2(l zerolog.Logger, seth *seth.Client, linkTokenAd return EthereumOffchainAggregatorV2{}, fmt.Errorf("OCR instance deployment have failed: %w", err) } - ocr2, err := ocr2aggregator.NewOCR2Aggregator(ocrDeploymentData2.Address, seth.Client) + ocr2, err := ocr2aggregator.NewOCR2Aggregator(ocrDeploymentData2.Address, wrappers.MustNewWrappedContractBackend(nil, seth)) if err != nil { return EthereumOffchainAggregatorV2{}, fmt.Errorf("failed to instantiate OCR instance: %w", err) } diff --git a/integration-tests/contracts/ethereum_keeper_contracts.go b/integration-tests/contracts/ethereum_keeper_contracts.go index 3622edcef5f..0a516d5029b 100644 --- a/integration-tests/contracts/ethereum_keeper_contracts.go +++ b/integration-tests/contracts/ethereum_keeper_contracts.go @@ -23,11 +23,9 @@ import ( "github.com/smartcontractkit/chainlink/integration-tests/testreporters" cltypes "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils" + ac "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/automation_compatible_utils" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/automation_consumer_benchmark" registrar21 "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/automation_registrar_wrapper2_1" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/automation_registry_wrapper_2_2" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/automation_utils_2_1" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/automation_utils_2_2" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/i_automation_registry_master_wrapper_2_2" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/i_chain_module" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/i_keeper_registry_master_wrapper_2_1" @@ -39,7 +37,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/keeper_registry_wrapper1_2" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/keeper_registry_wrapper1_3" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/keeper_registry_wrapper2_0" - registry21 "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/keeper_registry_wrapper_2_1" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/log_triggered_streams_lookup_wrapper" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/log_upkeep_counter_wrapper" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/perform_data_checker_wrapper" @@ -50,8 +47,7 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/upkeep_transcoder" ) -var utilsABI21 = cltypes.MustGetABI(automation_utils_2_1.AutomationUtilsABI) -var utilsABI22 = cltypes.MustGetABI(automation_utils_2_2.AutomationUtilsABI) +var compatibleUtils = cltypes.MustGetABI(ac.AutomationCompatibleUtilsABI) var registrarABI = cltypes.MustGetABI(registrar21.AutomationRegistrarABI) type KeeperRegistrar interface { @@ -70,6 +66,7 @@ type KeeperRegistry interface { Address() string Fund(ethAmount *big.Float) error SetConfig(config KeeperRegistrySettings, ocrConfig OCRv2Config) error + SetConfigTypeSafe(ocrConfig OCRv2Config) error SetRegistrar(registrarAddr string) error AddUpkeepFunds(id *big.Int, amount *big.Int) error GetUpkeepInfo(ctx context.Context, id *big.Int) (*UpkeepInfo, error) @@ -106,6 +103,7 @@ type UpkeepCounter interface { Fund(ethAmount *big.Float) error Counter(ctx context.Context) (*big.Int, error) SetSpread(testRange *big.Int, interval *big.Int) error + Start() error } type UpkeepPerformCounterRestrictive interface { @@ -249,54 +247,30 @@ func (v *EthereumKeeperRegistry) Fund(ethAmount *big.Float) error { return v.client.Fund(v.address.Hex(), ethAmount, gasEstimates) } -func (rcs *KeeperRegistrySettings) EncodeOnChainConfig(registrar string, registryOwnerAddress, chainModuleAddress common.Address, reorgProtectionEnabled bool) ([]byte, error) { - if rcs.RegistryVersion == ethereum.RegistryVersion_2_1 { - onchainConfigStruct := registry21.KeeperRegistryBase21OnchainConfig{ - PaymentPremiumPPB: rcs.PaymentPremiumPPB, - FlatFeeMicroLink: rcs.FlatFeeMicroLINK, - CheckGasLimit: rcs.CheckGasLimit, - StalenessSeconds: rcs.StalenessSeconds, - GasCeilingMultiplier: rcs.GasCeilingMultiplier, - MinUpkeepSpend: rcs.MinUpkeepSpend, - MaxPerformGas: rcs.MaxPerformGas, - MaxCheckDataSize: rcs.MaxCheckDataSize, - MaxPerformDataSize: rcs.MaxPerformDataSize, - MaxRevertDataSize: uint32(1000), - FallbackGasPrice: rcs.FallbackGasPrice, - FallbackLinkPrice: rcs.FallbackLinkPrice, - Transcoder: common.Address{}, - Registrars: []common.Address{common.HexToAddress(registrar)}, - UpkeepPrivilegeManager: registryOwnerAddress, - } - - encodedOnchainConfig, err := utilsABI21.Methods["_onChainConfig"].Inputs.Pack(&onchainConfigStruct) - - return encodedOnchainConfig, err - } else if rcs.RegistryVersion == ethereum.RegistryVersion_2_2 { - return rcs.encode22OnchainConfig(registrar, registryOwnerAddress, chainModuleAddress, reorgProtectionEnabled) +func (rcs *KeeperRegistrySettings) Create22OnchainConfig(registrar string, registryOwnerAddress, chainModuleAddress common.Address, reorgProtectionEnabled bool) i_automation_registry_master_wrapper_2_2.AutomationRegistryBase22OnchainConfig { + return i_automation_registry_master_wrapper_2_2.AutomationRegistryBase22OnchainConfig{ + PaymentPremiumPPB: rcs.PaymentPremiumPPB, + FlatFeeMicroLink: rcs.FlatFeeMicroLINK, + CheckGasLimit: rcs.CheckGasLimit, + StalenessSeconds: rcs.StalenessSeconds, + GasCeilingMultiplier: rcs.GasCeilingMultiplier, + MinUpkeepSpend: rcs.MinUpkeepSpend, + MaxPerformGas: rcs.MaxPerformGas, + MaxCheckDataSize: rcs.MaxCheckDataSize, + MaxPerformDataSize: rcs.MaxPerformDataSize, + MaxRevertDataSize: uint32(1000), + FallbackGasPrice: rcs.FallbackGasPrice, + FallbackLinkPrice: rcs.FallbackLinkPrice, + Transcoder: common.Address{}, + Registrars: []common.Address{common.HexToAddress(registrar)}, + UpkeepPrivilegeManager: registryOwnerAddress, + ChainModule: chainModuleAddress, + ReorgProtectionEnabled: reorgProtectionEnabled, } - configType := goabi.MustNewType("tuple(uint32 paymentPremiumPPB,uint32 flatFeeMicroLink,uint32 checkGasLimit,uint24 stalenessSeconds,uint16 gasCeilingMultiplier,uint96 minUpkeepSpend,uint32 maxPerformGas,uint32 maxCheckDataSize,uint32 maxPerformDataSize,uint256 fallbackGasPrice,uint256 fallbackLinkPrice,address transcoder,address registrar)") - onchainConfig, err := goabi.Encode(map[string]interface{}{ - "paymentPremiumPPB": rcs.PaymentPremiumPPB, - "flatFeeMicroLink": rcs.FlatFeeMicroLINK, - "checkGasLimit": rcs.CheckGasLimit, - "stalenessSeconds": rcs.StalenessSeconds, - "gasCeilingMultiplier": rcs.GasCeilingMultiplier, - "minUpkeepSpend": rcs.MinUpkeepSpend, - "maxPerformGas": rcs.MaxPerformGas, - "maxCheckDataSize": rcs.MaxCheckDataSize, - "maxPerformDataSize": rcs.MaxPerformDataSize, - "fallbackGasPrice": rcs.FallbackGasPrice, - "fallbackLinkPrice": rcs.FallbackLinkPrice, - "transcoder": common.Address{}, - "registrar": registrar, - }, configType) - return onchainConfig, err - } -func (rcs *KeeperRegistrySettings) encode22OnchainConfig(registrar string, registryOwnerAddress, chainModuleAddr common.Address, reorgProtectionEnabled bool) ([]byte, error) { - onchainConfigStruct := automation_registry_wrapper_2_2.AutomationRegistryBase22OnchainConfig{ +func (rcs *KeeperRegistrySettings) Create21OnchainConfig(registrar string, registryOwnerAddress common.Address) i_keeper_registry_master_wrapper_2_1.IAutomationV21PlusCommonOnchainConfigLegacy { + return i_keeper_registry_master_wrapper_2_1.IAutomationV21PlusCommonOnchainConfigLegacy{ PaymentPremiumPPB: rcs.PaymentPremiumPPB, FlatFeeMicroLink: rcs.FlatFeeMicroLINK, CheckGasLimit: rcs.CheckGasLimit, @@ -312,13 +286,27 @@ func (rcs *KeeperRegistrySettings) encode22OnchainConfig(registrar string, regis Transcoder: common.Address{}, Registrars: []common.Address{common.HexToAddress(registrar)}, UpkeepPrivilegeManager: registryOwnerAddress, - ChainModule: chainModuleAddr, - ReorgProtectionEnabled: reorgProtectionEnabled, } +} - encodedOnchainConfig, err := utilsABI22.Methods["_onChainConfig"].Inputs.Pack(&onchainConfigStruct) - - return encodedOnchainConfig, err +func (rcs *KeeperRegistrySettings) Encode20OnchainConfig(registrar string) []byte { + configType := goabi.MustNewType("tuple(uint32 paymentPremiumPPB,uint32 flatFeeMicroLink,uint32 checkGasLimit,uint24 stalenessSeconds,uint16 gasCeilingMultiplier,uint96 minUpkeepSpend,uint32 maxPerformGas,uint32 maxCheckDataSize,uint32 maxPerformDataSize,uint256 fallbackGasPrice,uint256 fallbackLinkPrice,address transcoder,address registrar)") + onchainConfig, _ := goabi.Encode(map[string]interface{}{ + "paymentPremiumPPB": rcs.PaymentPremiumPPB, + "flatFeeMicroLink": rcs.FlatFeeMicroLINK, + "checkGasLimit": rcs.CheckGasLimit, + "stalenessSeconds": rcs.StalenessSeconds, + "gasCeilingMultiplier": rcs.GasCeilingMultiplier, + "minUpkeepSpend": rcs.MinUpkeepSpend, + "maxPerformGas": rcs.MaxPerformGas, + "maxCheckDataSize": rcs.MaxCheckDataSize, + "maxPerformDataSize": rcs.MaxPerformDataSize, + "fallbackGasPrice": rcs.FallbackGasPrice, + "fallbackLinkPrice": rcs.FallbackLinkPrice, + "transcoder": common.Address{}, + "registrar": registrar, + }, configType) + return onchainConfig } func (v *EthereumKeeperRegistry) RegistryOwnerAddress() common.Address { @@ -344,6 +332,44 @@ func (v *EthereumKeeperRegistry) RegistryOwnerAddress() common.Address { return common.HexToAddress(v.client.GetDefaultWallet().Address()) } +func (v *EthereumKeeperRegistry) SetConfigTypeSafe(ocrConfig OCRv2Config) error { + txOpts, err := v.client.TransactionOpts(v.client.GetDefaultWallet()) + if err != nil { + return err + } + + switch v.version { + case ethereum.RegistryVersion_2_1: + tx, err := v.registry2_1.SetConfigTypeSafe(txOpts, + ocrConfig.Signers, + ocrConfig.Transmitters, + ocrConfig.F, + ocrConfig.TypedOnchainConfig21, + ocrConfig.OffchainConfigVersion, + ocrConfig.OffchainConfig, + ) + if err != nil { + return err + } + return v.client.ProcessTransaction(tx) + case ethereum.RegistryVersion_2_2: + tx, err := v.registry2_2.SetConfigTypeSafe(txOpts, + ocrConfig.Signers, + ocrConfig.Transmitters, + ocrConfig.F, + ocrConfig.TypedOnchainConfig22, + ocrConfig.OffchainConfigVersion, + ocrConfig.OffchainConfig, + ) + if err != nil { + return err + } + return v.client.ProcessTransaction(tx) + default: + return fmt.Errorf("SetConfigTypeSafe is not supported in keeper registry version %d", v.version) + } +} + func (v *EthereumKeeperRegistry) SetConfig(config KeeperRegistrySettings, ocrConfig OCRv2Config) error { txOpts, err := v.client.TransactionOpts(v.client.GetDefaultWallet()) if err != nil { @@ -433,39 +459,11 @@ func (v *EthereumKeeperRegistry) SetConfig(config KeeperRegistrySettings, ocrCon return err } return v.client.ProcessTransaction(tx) - case ethereum.RegistryVersion_2_1: - tx, err := v.registry2_1.SetConfig(txOpts, - ocrConfig.Signers, - ocrConfig.Transmitters, - ocrConfig.F, - ocrConfig.OnchainConfig, - ocrConfig.OffchainConfigVersion, - ocrConfig.OffchainConfig, - ) - if err != nil { - return err - } - return v.client.ProcessTransaction(tx) - case ethereum.RegistryVersion_2_2: - return v.setConfig22(txOpts, ocrConfig) - } - - return fmt.Errorf("keeper registry version %d is not supported", v.version) -} - -func (v *EthereumKeeperRegistry) setConfig22(txOpts *bind.TransactOpts, ocrConfig OCRv2Config) error { - tx, err := v.registry2_2.SetConfig(txOpts, - ocrConfig.Signers, - ocrConfig.Transmitters, - ocrConfig.F, - ocrConfig.OnchainConfig, - ocrConfig.OffchainConfigVersion, - ocrConfig.OffchainConfig, - ) - if err != nil { - return err + case ethereum.RegistryVersion_2_1, ethereum.RegistryVersion_2_2: + return fmt.Errorf("registry version 2.1 and 2.2 must use setConfigTypeSafe function") + default: + return fmt.Errorf("keeper registry version %d is not supported", v.version) } - return v.client.ProcessTransaction(tx) } // Pause pauses the registry. @@ -1834,6 +1832,11 @@ func (v *EthereumUpkeepCounter) SetSpread(testRange *big.Int, interval *big.Int) return v.client.ProcessTransaction(tx) } +// Just pass for non-logtrigger +func (v *EthereumUpkeepCounter) Start() error { + return nil +} + // EthereumUpkeepPerformCounterRestrictive represents keeper consumer (upkeep) counter contract type EthereumUpkeepPerformCounterRestrictive struct { client blockchain.EVMClient @@ -2236,7 +2239,7 @@ func (v *EthereumKeeperRegistrar) EncodeRegisterRequest(name string, email []byt } } - logTriggerConfigStruct := automation_utils_2_1.LogTriggerConfig{ + logTriggerConfigStruct := ac.IAutomationV21PlusCommonLogTriggerConfig{ ContractAddress: common.HexToAddress(upkeepAddr), FilterSelector: 0, Topic0: topic0InBytes, @@ -2244,7 +2247,7 @@ func (v *EthereumKeeperRegistrar) EncodeRegisterRequest(name string, email []byt Topic2: bytes0, Topic3: bytes0, } - encodedLogTriggerConfig, err := utilsABI21.Methods["_logTriggerConfig"].Inputs.Pack(&logTriggerConfigStruct) + encodedLogTriggerConfig, err := compatibleUtils.Methods["_logTriggerConfig"].Inputs.Pack(&logTriggerConfigStruct) if err != nil { return nil, err } diff --git a/integration-tests/contracts/ethereum_vrf_contracts.go b/integration-tests/contracts/ethereum_vrf_contracts.go index ea8a4f94817..a67d30bd201 100644 --- a/integration-tests/contracts/ethereum_vrf_contracts.go +++ b/integration-tests/contracts/ethereum_vrf_contracts.go @@ -13,6 +13,7 @@ import ( "github.com/rs/zerolog/log" "github.com/smartcontractkit/chainlink-testing-framework/blockchain" + "github.com/smartcontractkit/chainlink/integration-tests/wrappers" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/batch_blockhash_store" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/blockhash_store" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/solidity_vrf_consumer_interface" @@ -64,7 +65,7 @@ func (e *EthereumContractDeployer) DeployVRFContract() (VRF, error) { auth *bind.TransactOpts, backend bind.ContractBackend, ) (common.Address, *types.Transaction, interface{}, error) { - return solidity_vrf_wrapper.DeployVRF(auth, backend) + return solidity_vrf_wrapper.DeployVRF(auth, wrappers.MustNewWrappedContractBackend(e.client, nil)) }) if err != nil { return nil, err @@ -82,7 +83,7 @@ func (e *EthereumContractDeployer) DeployBlockhashStore() (BlockHashStore, error auth *bind.TransactOpts, backend bind.ContractBackend, ) (common.Address, *types.Transaction, interface{}, error) { - return blockhash_store.DeployBlockhashStore(auth, backend) + return blockhash_store.DeployBlockhashStore(auth, wrappers.MustNewWrappedContractBackend(e.client, nil)) }) if err != nil { return nil, err @@ -100,7 +101,7 @@ func (e *EthereumContractDeployer) DeployVRFCoordinator(linkAddr string, bhsAddr auth *bind.TransactOpts, backend bind.ContractBackend, ) (common.Address, *types.Transaction, interface{}, error) { - return solidity_vrf_coordinator_interface.DeployVRFCoordinator(auth, backend, common.HexToAddress(linkAddr), common.HexToAddress(bhsAddr)) + return solidity_vrf_coordinator_interface.DeployVRFCoordinator(auth, wrappers.MustNewWrappedContractBackend(e.client, nil), common.HexToAddress(linkAddr), common.HexToAddress(bhsAddr)) }) if err != nil { return nil, err @@ -118,7 +119,7 @@ func (e *EthereumContractDeployer) DeployVRFConsumer(linkAddr string, coordinato auth *bind.TransactOpts, backend bind.ContractBackend, ) (common.Address, *types.Transaction, interface{}, error) { - return solidity_vrf_consumer_interface.DeployVRFConsumer(auth, backend, common.HexToAddress(coordinatorAddr), common.HexToAddress(linkAddr)) + return solidity_vrf_consumer_interface.DeployVRFConsumer(auth, wrappers.MustNewWrappedContractBackend(e.client, nil), common.HexToAddress(coordinatorAddr), common.HexToAddress(linkAddr)) }) if err != nil { return nil, err diff --git a/integration-tests/contracts/ethereum_vrfv2_contracts.go b/integration-tests/contracts/ethereum_vrfv2_contracts.go index fc7a5a7a138..5ff12e81d57 100644 --- a/integration-tests/contracts/ethereum_vrfv2_contracts.go +++ b/integration-tests/contracts/ethereum_vrfv2_contracts.go @@ -14,6 +14,7 @@ import ( "github.com/rs/zerolog/log" "github.com/smartcontractkit/chainlink-testing-framework/blockchain" + "github.com/smartcontractkit/chainlink/integration-tests/wrappers" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/vrf_coordinator_test_v2" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/vrf_mock_ethlink_aggregator" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/vrf_owner" @@ -97,7 +98,7 @@ func (e *EthereumContractDeployer) DeployVRFCoordinatorV2(linkAddr string, bhsAd auth *bind.TransactOpts, backend bind.ContractBackend, ) (common.Address, *types.Transaction, interface{}, error) { - return vrf_coordinator_v2.DeployVRFCoordinatorV2(auth, backend, common.HexToAddress(linkAddr), common.HexToAddress(bhsAddr), common.HexToAddress(linkEthFeedAddr)) + return vrf_coordinator_v2.DeployVRFCoordinatorV2(auth, wrappers.MustNewWrappedContractBackend(e.client, nil), common.HexToAddress(linkAddr), common.HexToAddress(bhsAddr), common.HexToAddress(linkEthFeedAddr)) }) if err != nil { return nil, err @@ -114,7 +115,7 @@ func (e *EthereumContractDeployer) DeployVRFOwner(coordinatorAddr string) (VRFOw auth *bind.TransactOpts, backend bind.ContractBackend, ) (common.Address, *types.Transaction, interface{}, error) { - return vrf_owner.DeployVRFOwner(auth, backend, common.HexToAddress(coordinatorAddr)) + return vrf_owner.DeployVRFOwner(auth, wrappers.MustNewWrappedContractBackend(e.client, nil), common.HexToAddress(coordinatorAddr)) }) if err != nil { return nil, err @@ -131,7 +132,7 @@ func (e *EthereumContractDeployer) DeployVRFCoordinatorTestV2(linkAddr string, b auth *bind.TransactOpts, backend bind.ContractBackend, ) (common.Address, *types.Transaction, interface{}, error) { - return vrf_coordinator_test_v2.DeployVRFCoordinatorTestV2(auth, backend, common.HexToAddress(linkAddr), common.HexToAddress(bhsAddr), common.HexToAddress(linkEthFeedAddr)) + return vrf_coordinator_test_v2.DeployVRFCoordinatorTestV2(auth, wrappers.MustNewWrappedContractBackend(e.client, nil), common.HexToAddress(linkAddr), common.HexToAddress(bhsAddr), common.HexToAddress(linkEthFeedAddr)) }) if err != nil { return nil, err @@ -184,7 +185,7 @@ func (e *EthereumContractDeployer) DeployVRFv2LoadTestConsumer(coordinatorAddr s auth *bind.TransactOpts, backend bind.ContractBackend, ) (common.Address, *types.Transaction, interface{}, error) { - return vrf_load_test_with_metrics.DeployVRFV2LoadTestWithMetrics(auth, backend, common.HexToAddress(coordinatorAddr)) + return vrf_load_test_with_metrics.DeployVRFV2LoadTestWithMetrics(auth, wrappers.MustNewWrappedContractBackend(e.client, nil), common.HexToAddress(coordinatorAddr)) }) if err != nil { return nil, err @@ -201,7 +202,7 @@ func (e *EthereumContractDeployer) DeployVRFV2Wrapper(linkAddr string, linkEthFe auth *bind.TransactOpts, backend bind.ContractBackend, ) (common.Address, *types.Transaction, interface{}, error) { - return vrfv2_wrapper.DeployVRFV2Wrapper(auth, backend, common.HexToAddress(linkAddr), common.HexToAddress(linkEthFeedAddr), common.HexToAddress(coordinatorAddr)) + return vrfv2_wrapper.DeployVRFV2Wrapper(auth, wrappers.MustNewWrappedContractBackend(e.client, nil), common.HexToAddress(linkAddr), common.HexToAddress(linkEthFeedAddr), common.HexToAddress(coordinatorAddr)) }) if err != nil { return nil, err @@ -218,7 +219,7 @@ func (e *EthereumContractDeployer) DeployVRFV2WrapperLoadTestConsumer(linkAddr s auth *bind.TransactOpts, backend bind.ContractBackend, ) (common.Address, *types.Transaction, interface{}, error) { - return vrfv2_wrapper_load_test_consumer.DeployVRFV2WrapperLoadTestConsumer(auth, backend, common.HexToAddress(linkAddr), common.HexToAddress(vrfV2WrapperAddr)) + return vrfv2_wrapper_load_test_consumer.DeployVRFV2WrapperLoadTestConsumer(auth, wrappers.MustNewWrappedContractBackend(e.client, nil), common.HexToAddress(linkAddr), common.HexToAddress(vrfV2WrapperAddr)) }) if err != nil { return nil, err diff --git a/integration-tests/contracts/ethereum_vrfv2plus_contracts.go b/integration-tests/contracts/ethereum_vrfv2plus_contracts.go index 64afb4c466d..42e9a0382ec 100644 --- a/integration-tests/contracts/ethereum_vrfv2plus_contracts.go +++ b/integration-tests/contracts/ethereum_vrfv2plus_contracts.go @@ -12,6 +12,7 @@ import ( "github.com/ethereum/go-ethereum/core/types" "github.com/smartcontractkit/chainlink-testing-framework/blockchain" + "github.com/smartcontractkit/chainlink/integration-tests/wrappers" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/vrf_coordinator_v2_5" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/vrf_v2plus_load_test_with_metrics" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/vrf_v2plus_upgraded_version" @@ -56,13 +57,14 @@ func (v *EthereumVRFV2PlusWrapper) Address() string { func (v *EthereumVRFV2PlusWrapper) SetConfig(wrapperGasOverhead uint32, coordinatorGasOverhead uint32, - wrapperPremiumPercentage uint8, + wrapperNativePremiumPercentage uint8, + wrapperLinkPremiumPercentage uint8, keyHash [32]byte, maxNumWords uint8, stalenessSeconds uint32, fallbackWeiPerUnitLink *big.Int, - fulfillmentFlatFeeLinkPPM uint32, fulfillmentFlatFeeNativePPM uint32, + fulfillmentFlatFeeLinkDiscountPPM uint32, ) error { opts, err := v.client.TransactionOpts(v.client.GetDefaultWallet()) if err != nil { @@ -72,13 +74,14 @@ func (v *EthereumVRFV2PlusWrapper) SetConfig(wrapperGasOverhead uint32, opts, wrapperGasOverhead, coordinatorGasOverhead, - wrapperPremiumPercentage, + wrapperNativePremiumPercentage, + wrapperLinkPremiumPercentage, keyHash, maxNumWords, stalenessSeconds, fallbackWeiPerUnitLink, - fulfillmentFlatFeeLinkPPM, fulfillmentFlatFeeNativePPM, + fulfillmentFlatFeeLinkDiscountPPM, ) if err != nil { return err @@ -119,7 +122,7 @@ func (e *EthereumContractDeployer) DeployVRFCoordinatorV2_5(bhsAddr string) (VRF auth *bind.TransactOpts, backend bind.ContractBackend, ) (common.Address, *types.Transaction, interface{}, error) { - return vrf_coordinator_v2_5.DeployVRFCoordinatorV25(auth, backend, common.HexToAddress(bhsAddr)) + return vrf_coordinator_v2_5.DeployVRFCoordinatorV25(auth, wrappers.MustNewWrappedContractBackend(e.client, nil), common.HexToAddress(bhsAddr)) }) if err != nil { return nil, err @@ -935,7 +938,7 @@ func (e *EthereumContractDeployer) DeployVRFv2PlusLoadTestConsumer(coordinatorAd auth *bind.TransactOpts, backend bind.ContractBackend, ) (common.Address, *types.Transaction, interface{}, error) { - return vrf_v2plus_load_test_with_metrics.DeployVRFV2PlusLoadTestWithMetrics(auth, backend, common.HexToAddress(coordinatorAddr)) + return vrf_v2plus_load_test_with_metrics.DeployVRFV2PlusLoadTestWithMetrics(auth, wrappers.MustNewWrappedContractBackend(e.client, nil), common.HexToAddress(coordinatorAddr)) }) if err != nil { return nil, err @@ -952,7 +955,7 @@ func (e *EthereumContractDeployer) DeployVRFV2PlusWrapper(linkAddr string, linkE auth *bind.TransactOpts, backend bind.ContractBackend, ) (common.Address, *types.Transaction, interface{}, error) { - return vrfv2plus_wrapper.DeployVRFV2PlusWrapper(auth, backend, common.HexToAddress(linkAddr), common.HexToAddress(linkEthFeedAddr), common.HexToAddress(coordinatorAddr)) + return vrfv2plus_wrapper.DeployVRFV2PlusWrapper(auth, wrappers.MustNewWrappedContractBackend(e.client, nil), common.HexToAddress(linkAddr), common.HexToAddress(linkEthFeedAddr), common.HexToAddress(coordinatorAddr)) }) if err != nil { return nil, err @@ -964,12 +967,12 @@ func (e *EthereumContractDeployer) DeployVRFV2PlusWrapper(linkAddr string, linkE }, err } -func (e *EthereumContractDeployer) DeployVRFV2PlusWrapperLoadTestConsumer(linkAddr string, vrfV2PlusWrapperAddr string) (VRFv2PlusWrapperLoadTestConsumer, error) { +func (e *EthereumContractDeployer) DeployVRFV2PlusWrapperLoadTestConsumer(vrfV2PlusWrapperAddr string) (VRFv2PlusWrapperLoadTestConsumer, error) { address, _, instance, err := e.client.DeployContract("VRFV2PlusWrapperLoadTestConsumer", func( auth *bind.TransactOpts, backend bind.ContractBackend, ) (common.Address, *types.Transaction, interface{}, error) { - return vrfv2plus_wrapper_load_test_consumer.DeployVRFV2PlusWrapperLoadTestConsumer(auth, backend, common.HexToAddress(linkAddr), common.HexToAddress(vrfV2PlusWrapperAddr)) + return vrfv2plus_wrapper_load_test_consumer.DeployVRFV2PlusWrapperLoadTestConsumer(auth, wrappers.MustNewWrappedContractBackend(e.client, nil), common.HexToAddress(vrfV2PlusWrapperAddr)) }) if err != nil { return nil, err diff --git a/integration-tests/docker/README.md b/integration-tests/docker/README.md index b8ef1fc49d2..7df481832e6 100644 --- a/integration-tests/docker/README.md +++ b/integration-tests/docker/README.md @@ -1,13 +1,14 @@ -## Docker environment -This folder contains Chainlink cluster environment created with `testcontainers-go` +# Docker environment -### CLI for Local Testing Environment +This folder contains a Chainlink cluster environment created with [testcontainers-go](https://github.com/testcontainers/testcontainers-go/tree/main). + +## CLI for Local Testing Environment The command-line interface (CLI) located at `./integration-tests/docker/cmd/test_env.go` can be utilized to initiate a local testing environment. It is intended to replace Docker Compose in the near future. +Example: -Example: -``` +```sh # Set required envs export CHAINLINK_IMAGE="" export CHAINLINK_VERSION="" @@ -18,4 +19,4 @@ export LOKI_URL=https://${loki_host}/loki/api/v1/push cd ./integration-tests/docker/cmd go run test_env.go start-env cl-cluster -``` \ No newline at end of file +``` diff --git a/integration-tests/docker/test_env/cl_node.go b/integration-tests/docker/test_env/cl_node.go index 2ffd49b8776..eae3f894db3 100644 --- a/integration-tests/docker/test_env/cl_node.go +++ b/integration-tests/docker/test_env/cl_node.go @@ -43,6 +43,11 @@ var ( ErrStartCLNodeContainer = "failed to start CL node container" ) +const ( + RestartContainer = true + StartNewContainer = false +) + type ClNode struct { test_env.EnvComponent API *client.ChainlinkClient `json:"-"` @@ -158,7 +163,7 @@ func (n *ClNode) Restart(cfg *chainlink.Config) error { return err } n.NodeConfig = cfg - return n.StartContainer() + return n.RestartContainer() } // UpgradeVersion restarts the cl node with new image and version @@ -285,8 +290,13 @@ func (n *ClNode) Fund(evmClient blockchain.EVMClient, amount *big.Float) error { return evmClient.Fund(toAddress, amount, gasEstimates) } -func (n *ClNode) StartContainer() error { - err := n.PostgresDb.StartContainer() +func (n *ClNode) containerStartOrRestart(restartDb bool) error { + var err error + if restartDb { + err = n.PostgresDb.RestartContainer() + } else { + err = n.PostgresDb.StartContainer() + } if err != nil { return err } @@ -318,7 +328,7 @@ func (n *ClNode) StartContainer() error { container, err := docker.StartContainerWithRetry(n.l, tc.GenericContainerRequest{ ContainerRequest: *cReq, Started: true, - Reuse: true, + Reuse: false, Logger: l, }) if err != nil { @@ -359,6 +369,14 @@ func (n *ClNode) StartContainer() error { return nil } +func (n *ClNode) RestartContainer() error { + return n.containerStartOrRestart(RestartContainer) +} + +func (n *ClNode) StartContainer() error { + return n.containerStartOrRestart(StartNewContainer) +} + func (n *ClNode) ExecGetVersion() (string, error) { cmd := []string{"chainlink", "--version"} _, output, err := n.Container.Exec(context.Background(), cmd) diff --git a/integration-tests/docker/test_env/test_env.go b/integration-tests/docker/test_env/test_env.go index e91a3bba6ad..06417a9268e 100644 --- a/integration-tests/docker/test_env/test_env.go +++ b/integration-tests/docker/test_env/test_env.go @@ -142,6 +142,13 @@ func (te *CLClusterTestEnv) StartEthereumNetwork(cfg *test_env.EthereumNetwork) } cfg = &c } + + te.l.Info(). + Str("Execution Layer", string(*cfg.ExecutionLayer)). + Str("Ethereum Version", string(*cfg.EthereumVersion)). + Str("Custom Docker Images", fmt.Sprintf("%v", cfg.CustomDockerImages)). + Msg("Starting Ethereum network") + n, rpc, err := cfg.Start() if err != nil { diff --git a/integration-tests/docker/test_env/test_env_builder.go b/integration-tests/docker/test_env/test_env_builder.go index cfe10d1f783..fc2c12da933 100644 --- a/integration-tests/docker/test_env/test_env_builder.go +++ b/integration-tests/docker/test_env/test_env_builder.go @@ -147,7 +147,7 @@ func (b *CLTestEnvBuilder) WithFunding(eth *big.Float) *CLTestEnvBuilder { func (b *CLTestEnvBuilder) WithGeth() *CLTestEnvBuilder { ethBuilder := test_env.NewEthereumNetworkBuilder() cfg, err := ethBuilder. - WithConsensusType(test_env.ConsensusType_PoW). + WithEthereumVersion(test_env.EthereumVersion_Eth1). WithExecutionLayer(test_env.ExecutionLayer_Geth). WithTest(b.t). Build() @@ -331,6 +331,9 @@ func (b *CLTestEnvBuilder) Build() (*CLClusterTestEnv, error) { if err != nil { return nil, err } + + b.te.isSimulatedNetwork = true + return b.te, nil } @@ -388,6 +391,10 @@ func (b *CLTestEnvBuilder) Build() (*CLClusterTestEnv, error) { if b.hasSeth { readSethCfg := b.testConfig.GetSethConfig() sethCfg := utils.MergeSethAndEvmNetworkConfigs(b.l, networkConfig, *readSethCfg) + err = utils.ValidateSethNetworkConfig(sethCfg.Network) + if err != nil { + return nil, err + } seth, err := seth.NewClientWithConfig(&sethCfg) if err != nil { return nil, err @@ -395,8 +402,6 @@ func (b *CLTestEnvBuilder) Build() (*CLClusterTestEnv, error) { b.te.SethClient = seth } - - b.te.isSimulatedNetwork = true } var nodeCsaKeys []string @@ -433,8 +438,6 @@ func (b *CLTestEnvBuilder) Build() (*CLClusterTestEnv, error) { } } } - - b.te.isSimulatedNetwork = true } err := b.te.StartClCluster(cfg, b.clNodesCount, b.secretsConfig, b.testConfig, b.clNodesOpts...) @@ -462,8 +465,6 @@ func (b *CLTestEnvBuilder) Build() (*CLClusterTestEnv, error) { return nil, err } } - - b.te.isSimulatedNetwork = true } var enDesc string diff --git a/integration-tests/go.mod b/integration-tests/go.mod index 2f7ed16e3b2..fe0dbab2173 100644 --- a/integration-tests/go.mod +++ b/integration-tests/go.mod @@ -22,16 +22,16 @@ require ( github.com/scylladb/go-reflectx v1.0.1 github.com/segmentio/ksuid v1.0.4 github.com/slack-go/slack v0.12.2 - github.com/smartcontractkit/chainlink-automation v1.0.2-0.20240118014648-1ab6a88c9429 - github.com/smartcontractkit/chainlink-common v0.1.7-0.20240227191958-d13aad8b4d61 - github.com/smartcontractkit/chainlink-testing-framework v1.25.1 + github.com/smartcontractkit/chainlink-automation v1.0.2-0.20240311111125-22812a072c35 + github.com/smartcontractkit/chainlink-common v0.1.7-0.20240314172156-049609b8e1f9 + github.com/smartcontractkit/chainlink-testing-framework v1.27.0 github.com/smartcontractkit/chainlink-vrf v0.0.0-20231120191722-fef03814f868 github.com/smartcontractkit/chainlink/v2 v2.0.0-00010101000000-000000000000 github.com/smartcontractkit/libocr v0.0.0-20240229181116-bfb2432a7a66 github.com/smartcontractkit/seth v0.1.2 github.com/smartcontractkit/wasp v0.4.5 github.com/spf13/cobra v1.8.0 - github.com/stretchr/testify v1.8.4 + github.com/stretchr/testify v1.9.0 github.com/test-go/testify v1.1.4 github.com/testcontainers/testcontainers-go v0.28.0 github.com/umbracle/ethgo v0.1.3 @@ -187,7 +187,7 @@ require ( github.com/go-kit/log v0.2.1 // indirect github.com/go-ldap/ldap/v3 v3.4.6 // indirect github.com/go-logfmt/logfmt v0.6.0 // indirect - github.com/go-logr/logr v1.3.0 // indirect + github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.2.6 // indirect github.com/go-openapi/analysis v0.21.4 // indirect @@ -235,8 +235,8 @@ require ( github.com/grafana/gomemcache v0.0.0-20231023152154-6947259a0586 // indirect github.com/grafana/loki v1.6.2-0.20231215164305-b51b7d7b5503 // indirect github.com/grafana/loki/pkg/push v0.0.0-20231201111602-11ef833ed3e4 // indirect - github.com/grafana/pyroscope-go v1.0.4 // indirect - github.com/grafana/pyroscope-go/godeltaprof v0.1.4 // indirect + github.com/grafana/pyroscope-go v1.1.1 // indirect + github.com/grafana/pyroscope-go/godeltaprof v0.1.6 // indirect github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd // indirect github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect @@ -257,6 +257,7 @@ require ( github.com/hashicorp/go-msgpack v0.5.5 // indirect github.com/hashicorp/go-multierror v1.1.1 // indirect github.com/hashicorp/go-plugin v1.6.0 // indirect + github.com/hashicorp/go-retryablehttp v0.7.5 // indirect github.com/hashicorp/go-rootcerts v1.0.2 // indirect github.com/hashicorp/go-sockaddr v1.0.2 // indirect github.com/hashicorp/golang-lru v0.6.0 // indirect @@ -289,7 +290,7 @@ require ( github.com/json-iterator/go v1.1.12 // indirect github.com/julienschmidt/httprouter v1.3.0 // indirect github.com/kelseyhightower/envconfig v1.4.0 // indirect - github.com/klauspost/compress v1.17.2 // indirect + github.com/klauspost/compress v1.17.3 // indirect github.com/klauspost/cpuid/v2 v2.2.5 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect @@ -390,7 +391,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/stretchr/objx v0.5.0 // 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 github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect @@ -427,12 +428,12 @@ require ( go.opentelemetry.io/collector/semconv v0.87.0 // indirect go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.1 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0 // indirect - go.opentelemetry.io/otel v1.21.0 // indirect + go.opentelemetry.io/otel v1.24.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0 // indirect - go.opentelemetry.io/otel/metric v1.21.0 // indirect + go.opentelemetry.io/otel/metric v1.24.0 // indirect go.opentelemetry.io/otel/sdk v1.21.0 // indirect - go.opentelemetry.io/otel/trace v1.21.0 // indirect + go.opentelemetry.io/otel/trace v1.24.0 // indirect go.opentelemetry.io/proto/otlp v1.0.0 // indirect go.starlark.net v0.0.0-20220817180228-f738f5508c12 // indirect go.uber.org/atomic v1.11.0 // indirect diff --git a/integration-tests/go.sum b/integration-tests/go.sum index b5dda40ca97..c29f5da9226 100644 --- a/integration-tests/go.sum +++ b/integration-tests/go.sum @@ -582,8 +582,8 @@ github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= -github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= +github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-logr/zapr v1.2.3 h1:a9vnzlIBPQBBkeaR9IuMUfmVOrQlkoC4YfPoFkX3T7A= @@ -859,10 +859,10 @@ github.com/grafana/loki v1.6.2-0.20231215164305-b51b7d7b5503 h1:gdrsYbmk8822v6qv github.com/grafana/loki v1.6.2-0.20231215164305-b51b7d7b5503/go.mod h1:d8seWXCEXkL42mhuIJYcGi6DxfehzoIpLrMQWJojvOo= github.com/grafana/loki/pkg/push v0.0.0-20231201111602-11ef833ed3e4 h1:wQ0FnSeebhJIBkgYOD06Mxk9HV2KhtEG0hp/7R+5RUQ= github.com/grafana/loki/pkg/push v0.0.0-20231201111602-11ef833ed3e4/go.mod h1:f3JSoxBTPXX5ec4FxxeC19nTBSxoTz+cBgS3cYLMcr0= -github.com/grafana/pyroscope-go v1.0.4 h1:oyQX0BOkL+iARXzHuCdIF5TQ7/sRSel1YFViMHC7Bm0= -github.com/grafana/pyroscope-go v1.0.4/go.mod h1:0d7ftwSMBV/Awm7CCiYmHQEG8Y44Ma3YSjt+nWcWztY= -github.com/grafana/pyroscope-go/godeltaprof v0.1.4 h1:mDsJ3ngul7UfrHibGQpV66PbZ3q1T8glz/tK3bQKKEk= -github.com/grafana/pyroscope-go/godeltaprof v0.1.4/go.mod h1:1HSPtjU8vLG0jE9JrTdzjgFqdJ/VgN7fvxBNq3luJko= +github.com/grafana/pyroscope-go v1.1.1 h1:PQoUU9oWtO3ve/fgIiklYuGilvsm8qaGhlY4Vw6MAcQ= +github.com/grafana/pyroscope-go v1.1.1/go.mod h1:Mw26jU7jsL/KStNSGGuuVYdUq7Qghem5P8aXYXSXG88= +github.com/grafana/pyroscope-go/godeltaprof v0.1.6 h1:nEdZ8louGAplSvIJi1HVp7kWvFvdiiYg3COLlTwJiFo= +github.com/grafana/pyroscope-go/godeltaprof v0.1.6/go.mod h1:Tk376Nbldo4Cha9RgiU7ik8WKFkNpfds98aUzS8omLE= github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd h1:PpuIBO5P3e9hpqBD0O/HjhShYuM6XE0i/lbE6J94kww= github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd/go.mod h1:M5qHK+eWfAv8VR/265dIuEpL3fNfeC21tXXp9itM24A= github.com/graph-gophers/dataloader v5.0.0+incompatible h1:R+yjsbrNq1Mo3aPG+Z/EKYrXrXXUNJHOgbRt+U6jOug= @@ -913,6 +913,7 @@ github.com/hashicorp/go-envparse v0.1.0 h1:bE++6bhIsNCPLvgDZkYqo3nA+/PFI51pkrHdm github.com/hashicorp/go-envparse v0.1.0/go.mod h1:OHheN1GoygLlAkTlXLXvAdnXdZxy8JUweQ1rAXx1xnc= github.com/hashicorp/go-getter v1.7.1 h1:SWiSWN/42qdpR0MdhaOc/bLR48PLuP1ZQtYLRlM69uY= github.com/hashicorp/go-getter v1.7.1/go.mod h1:W7TalhMmbPmsSMdNjD0ZskARur/9GJ17cfHTRtXV744= +github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= github.com/hashicorp/go-hclog v1.5.0 h1:bI2ocEMgcVlz55Oj1xZNBsVi900c7II+fWDyV9o+13c= github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= @@ -926,8 +927,8 @@ github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+ github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= -github.com/hashicorp/go-retryablehttp v0.7.4 h1:ZQgVdpTdAL7WpMIwLzCfbalOcSUdkDZnpUv3/+BxzFA= -github.com/hashicorp/go-retryablehttp v0.7.4/go.mod h1:Jy/gPYAdjqffZ/yFGCFV2doI5wjtH1ewM9u8iYVjtX8= +github.com/hashicorp/go-retryablehttp v0.7.5 h1:bJj+Pj19UZMIweq/iie+1u5YCdGrnxCT9yvm0e+Nd5M= +github.com/hashicorp/go-retryablehttp v0.7.5/go.mod h1:Jy/gPYAdjqffZ/yFGCFV2doI5wjtH1ewM9u8iYVjtX8= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= github.com/hashicorp/go-rootcerts v1.0.2 h1:jzhAVGtqPKbwpyCPELlgNWhE1znq+qwJtW5Oi2viEzc= github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= @@ -1109,8 +1110,8 @@ github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYs github.com/klauspost/compress v1.11.4/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= -github.com/klauspost/compress v1.17.2 h1:RlWWUY/Dr4fL8qk9YG7DTZ7PDgME2V4csBXA8L/ixi4= -github.com/klauspost/compress v1.17.2/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/compress v1.17.3 h1:qkRjuerhUU1EmXLYGkSH6EZL+vPSxIrYjLNAK4slzwA= +github.com/klauspost/compress v1.17.3/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM= github.com/klauspost/cpuid v1.2.1/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.2.5 h1:0E5MSMDEoAulmXNFquVs//DdoomxaoTY1kUhbc/qbZg= @@ -1514,10 +1515,10 @@ github.com/smartcontractkit/caigo v0.0.0-20230621050857-b29a4ca8c704 h1:T3lFWumv github.com/smartcontractkit/caigo v0.0.0-20230621050857-b29a4ca8c704/go.mod h1:2QuJdEouTWjh5BDy5o/vgGXQtR4Gz8yH1IYB5eT7u4M= github.com/smartcontractkit/chain-selectors v1.0.10 h1:t9kJeE6B6G+hKD0GYR4kGJSCqR1LNS7aI3jT0V+xGrg= github.com/smartcontractkit/chain-selectors v1.0.10/go.mod h1:d4Hi+E1zqjy9HqMkjBE5q1vcG9VGgxf5VxiRHfzi2kE= -github.com/smartcontractkit/chainlink-automation v1.0.2-0.20240118014648-1ab6a88c9429 h1:xkejUBZhcBpBrTSfxc91Iwzadrb6SXw8ks69bHIQ9Ww= -github.com/smartcontractkit/chainlink-automation v1.0.2-0.20240118014648-1ab6a88c9429/go.mod h1:wJmVvDf4XSjsahWtfUq3wvIAYEAuhr7oxmxYnEL/LGQ= -github.com/smartcontractkit/chainlink-common v0.1.7-0.20240227191958-d13aad8b4d61 h1:5aer8Pkw3XlXLjcPzWozy3RAbYQjVjpruxDeQENcVMw= -github.com/smartcontractkit/chainlink-common v0.1.7-0.20240227191958-d13aad8b4d61/go.mod h1:6aXWSEQawX2oZXcPPOdxnEGufAhj7PqPKolXf6ijRGA= +github.com/smartcontractkit/chainlink-automation v1.0.2-0.20240311111125-22812a072c35 h1:GNhRKD3izyzAoGMXDvVUAwEuzz4Atdj3U3RH7eak5Is= +github.com/smartcontractkit/chainlink-automation v1.0.2-0.20240311111125-22812a072c35/go.mod h1:2I0dWdYdK6jHPnSYYy7Y7Xp7L0YTnJ3KZtkhLQflsTU= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20240314172156-049609b8e1f9 h1:rlvE17wHiSnrl2d42TWQ2VVx8ho8c9vgznysXj68sRU= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20240314172156-049609b8e1f9/go.mod h1:/bJGelrpXvCcDCuaIgt91UN4B9YxZdK1O7VX5lzbysI= github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240213120401-01a23955f9f8 h1:I326nw5GwHQHsLKHwtu5Sb9EBLylC8CfUd7BFAS0jtg= github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240213120401-01a23955f9f8/go.mod h1:a65NtrK4xZb01mf0dDNghPkN2wXgcqFQ55ADthVBgMc= github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540 h1:xFSv8561jsLtF6gYZr/zW2z5qUUAkcFkApin2mnbYTo= @@ -1528,8 +1529,8 @@ github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240216142700-c5869534c19 github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240216142700-c5869534c19e/go.mod h1:JiykN+8W5TA4UD2ClrzQCVvcH3NcyLEVv7RwY0busrw= github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240213121419-1272736c2ac0 h1:7m9PVtccb8/pvKTXMaGuyceFno1icRyC2SFH7KG7+70= github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240213121419-1272736c2ac0/go.mod h1:SZ899lZYQ0maUulWbZg+SWqabHQ1wTbyk3jT8wJfyo8= -github.com/smartcontractkit/chainlink-testing-framework v1.25.1 h1:SEpP7yvsShsAHTVhbxS2srOWi5StrslM4niAWJC9o4E= -github.com/smartcontractkit/chainlink-testing-framework v1.25.1/go.mod h1:gkmsafC85u6hIqWbxKjynKf4NuFuFJDRcgxIEFsSq6E= +github.com/smartcontractkit/chainlink-testing-framework v1.27.0 h1:fs60anZu4VMPv0E9TtGo9uQ4kJcqChClxgjC9ArvqN4= +github.com/smartcontractkit/chainlink-testing-framework v1.27.0/go.mod h1:jN+HgXbriq6fKRlIqLw9F3I81aYImV6kBJkIfz0mdIA= github.com/smartcontractkit/chainlink-vrf v0.0.0-20231120191722-fef03814f868 h1:FFdvEzlYwcuVHkdZ8YnZR/XomeMGbz5E2F2HZI3I3w8= github.com/smartcontractkit/chainlink-vrf v0.0.0-20231120191722-fef03814f868/go.mod h1:Kn1Hape05UzFZ7bOUnm3GVsHzP0TNrVmpfXYNHdqGGs= github.com/smartcontractkit/go-plugin v0.0.0-20240208201424-b3b91517de16 h1:TFe+FvzxClblt6qRfqEhUfa4kFQx5UobuoFGO2W4mMo= @@ -1588,8 +1589,9 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= @@ -1601,8 +1603,9 @@ github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1F github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8= github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= @@ -1755,14 +1758,14 @@ go.opentelemetry.io/collector/pdata v1.0.0-rcv0016/go.mod h1:OdN0alYOlYhHXu6BDlG go.opentelemetry.io/collector/semconv v0.87.0 h1:BsG1jdLLRCBRlvUujk4QA86af7r/ZXnizczQpEs/gg8= go.opentelemetry.io/collector/semconv v0.87.0/go.mod h1:j/8THcqVxFna1FpvA2zYIsUperEtOaRaqoLYIN4doWw= go.opentelemetry.io/contrib v0.20.0 h1:ubFQUn0VCZ0gPwIoJfBJVpeBlyRMxu8Mm/huKWYd9p0= -go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin v0.46.1 h1:mMv2jG58h6ZI5t5S9QCVGdzCmAsTakMa3oxVgpSD44g= -go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin v0.46.1/go.mod h1:oqRuNKG0upTaDPbLVCG8AD0G2ETrfDtmh7jViy7ox6M= +go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin v0.49.0 h1:1f31+6grJmV3X4lxcEvUy13i5/kfDw1nJZwhd8mA4tg= +go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin v0.49.0/go.mod h1:1P/02zM3OwkX9uki+Wmxw3a5GVb6KUXRsa7m7bOC9Fg= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.1 h1:SpGay3w+nEwMpfVnbqOLH5gY52/foP8RE8UzTZ1pdSE= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.1/go.mod h1:4UoMYEZOC0yN/sPGH76KPkkU7zgiEWYWL9vwmbnTJPE= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0 h1:x8Z78aZx8cOF0+Kkazoc7lwUNMGy0LrzEMxTm4BbTxg= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0/go.mod h1:62CPTSry9QZtOaSsE3tOzhx6LzDhHnXJ6xHeMNNiM6Q= -go.opentelemetry.io/otel v1.21.0 h1:hzLeKBZEL7Okw2mGzZ0cc4k/A7Fta0uoPgaJCr8fsFc= -go.opentelemetry.io/otel v1.21.0/go.mod h1:QZzNPQPm1zLX4gZK4cMi+71eaorMSGT3A4znnUvNNEo= +go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= +go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= go.opentelemetry.io/otel/exporters/otlp v0.20.0 h1:PTNgq9MRmQqqJY0REVbZFvwkYOA85vbdQU/nVfxDyqg= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0 h1:cl5P5/GIfFh4t6xyruOgJP5QiA1pw4fYYdv6nc6CBWw= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0/go.mod h1:zgBdWWAu7oEEMC06MMKc5NLbA/1YDXV1sMpSqEeLQLg= @@ -1770,14 +1773,14 @@ go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0 h1:tIqhe go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0/go.mod h1:nUeKExfxAQVbiVFn32YXpXZZHZ61Cc3s3Rn1pDBGAb0= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.19.0 h1:IeMeyr1aBvBiPVYihXIaeIZba6b8E1bYp7lbdxK8CQg= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.19.0/go.mod h1:oVdCUtjq9MK9BlS7TtucsQwUcXcymNiEDjgDD2jMtZU= -go.opentelemetry.io/otel/metric v1.21.0 h1:tlYWfeo+Bocx5kLEloTjbcDwBuELRrIFxwdQ36PlJu4= -go.opentelemetry.io/otel/metric v1.21.0/go.mod h1:o1p3CA8nNHW8j5yuQLdc1eeqEaPfzug24uvsyIEJRWM= +go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= +go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= go.opentelemetry.io/otel/sdk v1.21.0 h1:FTt8qirL1EysG6sTQRZ5TokkU8d0ugCj8htOgThZXQ8= go.opentelemetry.io/otel/sdk v1.21.0/go.mod h1:Nna6Yv7PWTdgJHVRD9hIYywQBRx7pbox6nwBnZIxl/E= go.opentelemetry.io/otel/sdk/metric v1.21.0 h1:smhI5oD714d6jHE6Tie36fPx4WDFIg+Y6RfAY4ICcR0= go.opentelemetry.io/otel/sdk/metric v1.21.0/go.mod h1:FJ8RAsoPGv/wYMgBdUJXOm+6pzFY3YdljnXtv1SBE8Q= -go.opentelemetry.io/otel/trace v1.21.0 h1:WD9i5gzvoUPuXIXH24ZNBudiarZDKuekPqi/E8fpfLc= -go.opentelemetry.io/otel/trace v1.21.0/go.mod h1:LGbsEB0f9LGjN+OZaQQ26sohbOmiMR+BaslueVtS/qQ= +go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= +go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I= go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM= diff --git a/integration-tests/load/automationv2_1/automationv2_1_test.go b/integration-tests/load/automationv2_1/automationv2_1_test.go index fc7166b2189..0b902423339 100644 --- a/integration-tests/load/automationv2_1/automationv2_1_test.go +++ b/integration-tests/load/automationv2_1/automationv2_1_test.go @@ -40,7 +40,7 @@ import ( tc "github.com/smartcontractkit/chainlink/integration-tests/testconfig" aconfig "github.com/smartcontractkit/chainlink/integration-tests/testconfig/automation" "github.com/smartcontractkit/chainlink/integration-tests/testreporters" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/automation_utils_2_1" + ac "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/automation_compatible_utils" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/log_emitter" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/simple_log_upkeep_counter_wrapper" ) @@ -181,7 +181,7 @@ Load Config: } testEnvironment := environment.New(&environment.Config{ - TTL: loadDuration + time.Hour*6, + TTL: loadDuration.Round(time.Hour) + time.Hour, NamespacePrefix: fmt.Sprintf( "automation-%s-%s", testType, @@ -320,7 +320,7 @@ Load Config: triggerContracts := make([]contracts.LogEmitter, 0) triggerAddresses := make([]common.Address, 0) - utilsABI, err := automation_utils_2_1.AutomationUtilsMetaData.GetAbi() + convenienceABI, err := ac.AutomationCompatibleUtilsMetaData.GetAbi() require.NoError(t, err, "Error getting automation utils abi") emitterABI, err := log_emitter.LogEmitterMetaData.GetAbi() require.NoError(t, err, "Error getting log emitter abi") @@ -382,7 +382,7 @@ Load Config: } for i, consumerContract := range consumerContracts { - logTriggerConfigStruct := automation_utils_2_1.LogTriggerConfig{ + logTriggerConfigStruct := ac.IAutomationV21PlusCommonLogTriggerConfig{ ContractAddress: triggerAddresses[i], FilterSelector: 1, Topic0: emitterABI.Events["Log4"].ID, @@ -390,7 +390,7 @@ Load Config: Topic2: bytes0, Topic3: bytes0, } - encodedLogTriggerConfig, err := utilsABI.Methods["_logTriggerConfig"].Inputs.Pack(&logTriggerConfigStruct) + encodedLogTriggerConfig, err := convenienceABI.Methods["_logTriggerConfig"].Inputs.Pack(&logTriggerConfigStruct) require.NoError(t, err, "Error encoding log trigger config") l.Debug().Bytes("Encoded Log Trigger Config", encodedLogTriggerConfig).Msg("Encoded Log Trigger Config") @@ -712,6 +712,16 @@ Test Duration: %s` t.Cleanup(func() { if err = actions.TeardownRemoteSuite(t, testEnvironment.Cfg.Namespace, chainlinkNodes, nil, &loadedTestConfig, chainClient); err != nil { l.Error().Err(err).Msg("Error when tearing down remote suite") + testEnvironment.Cfg.TTL = time.Hour * 48 + err := testEnvironment.Run() + if err != nil { + l.Error().Err(err).Msg("Error increasing TTL of namespace") + } + } else if chainClient.NetworkSimulated() { + err := testEnvironment.Client.RemoveNamespace(testEnvironment.Cfg.Namespace) + if err != nil { + l.Error().Err(err).Msg("Error removing namespace") + } } }) diff --git a/integration-tests/load/go.mod b/integration-tests/load/go.mod index aed5be4806d..66c81911568 100644 --- a/integration-tests/load/go.mod +++ b/integration-tests/load/go.mod @@ -14,16 +14,16 @@ require ( github.com/pelletier/go-toml/v2 v2.1.1 github.com/rs/zerolog v1.30.0 github.com/slack-go/slack v0.12.2 - github.com/smartcontractkit/chainlink-automation v1.0.2-0.20240118014648-1ab6a88c9429 - github.com/smartcontractkit/chainlink-common v0.1.7-0.20240227191958-d13aad8b4d61 - github.com/smartcontractkit/chainlink-testing-framework v1.25.1 + github.com/smartcontractkit/chainlink-automation v1.0.2-0.20240311111125-22812a072c35 + github.com/smartcontractkit/chainlink-common v0.1.7-0.20240314172156-049609b8e1f9 + github.com/smartcontractkit/chainlink-testing-framework v1.27.0 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-20240229181116-bfb2432a7a66 github.com/smartcontractkit/seth v0.1.2 github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20230906073235-9e478e5e19f1 github.com/smartcontractkit/wasp v0.4.6 - github.com/stretchr/testify v1.8.4 + github.com/stretchr/testify v1.9.0 go.uber.org/ratelimit v0.3.0 ) @@ -164,7 +164,7 @@ require ( github.com/go-kit/log v0.2.1 // indirect github.com/go-ldap/ldap/v3 v3.4.6 // indirect github.com/go-logfmt/logfmt v0.6.0 // indirect - github.com/go-logr/logr v1.3.0 // indirect + github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.2.6 // indirect github.com/go-openapi/analysis v0.21.4 // indirect @@ -217,8 +217,8 @@ require ( github.com/grafana/gomemcache v0.0.0-20231023152154-6947259a0586 // indirect github.com/grafana/loki v1.6.2-0.20231215164305-b51b7d7b5503 // indirect github.com/grafana/loki/pkg/push v0.0.0-20231201111602-11ef833ed3e4 // indirect - github.com/grafana/pyroscope-go v1.0.4 // indirect - github.com/grafana/pyroscope-go/godeltaprof v0.1.4 // indirect + github.com/grafana/pyroscope-go v1.1.1 // indirect + github.com/grafana/pyroscope-go/godeltaprof v0.1.6 // indirect github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd // indirect github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect @@ -239,6 +239,7 @@ require ( github.com/hashicorp/go-msgpack v0.5.5 // indirect github.com/hashicorp/go-multierror v1.1.1 // indirect github.com/hashicorp/go-plugin v1.6.0 // indirect + github.com/hashicorp/go-retryablehttp v0.7.5 // indirect github.com/hashicorp/go-rootcerts v1.0.2 // indirect github.com/hashicorp/go-sockaddr v1.0.2 // indirect github.com/hashicorp/golang-lru v0.6.0 // indirect @@ -272,7 +273,7 @@ require ( github.com/json-iterator/go v1.1.12 // indirect github.com/julienschmidt/httprouter v1.3.0 // indirect github.com/kelseyhightower/envconfig v1.4.0 // indirect - github.com/klauspost/compress v1.17.2 // indirect + github.com/klauspost/compress v1.17.3 // indirect github.com/klauspost/cpuid/v2 v2.2.5 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect @@ -380,7 +381,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/stretchr/objx v0.5.0 // 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 github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect @@ -421,12 +422,12 @@ require ( go.opentelemetry.io/collector/semconv v0.87.0 // indirect go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.1 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0 // indirect - go.opentelemetry.io/otel v1.21.0 // indirect + go.opentelemetry.io/otel v1.24.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0 // indirect - go.opentelemetry.io/otel/metric v1.21.0 // indirect + go.opentelemetry.io/otel/metric v1.24.0 // indirect go.opentelemetry.io/otel/sdk v1.21.0 // indirect - go.opentelemetry.io/otel/trace v1.21.0 // indirect + go.opentelemetry.io/otel/trace v1.24.0 // indirect go.opentelemetry.io/proto/otlp v1.0.0 // indirect go.starlark.net v0.0.0-20220817180228-f738f5508c12 // indirect go.uber.org/atomic v1.11.0 // indirect diff --git a/integration-tests/load/go.sum b/integration-tests/load/go.sum index bb3385b81f0..6f598b0e827 100644 --- a/integration-tests/load/go.sum +++ b/integration-tests/load/go.sum @@ -572,8 +572,8 @@ github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= -github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= +github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-logr/zapr v1.2.3 h1:a9vnzlIBPQBBkeaR9IuMUfmVOrQlkoC4YfPoFkX3T7A= @@ -850,10 +850,10 @@ github.com/grafana/loki v1.6.2-0.20231215164305-b51b7d7b5503 h1:gdrsYbmk8822v6qv github.com/grafana/loki v1.6.2-0.20231215164305-b51b7d7b5503/go.mod h1:d8seWXCEXkL42mhuIJYcGi6DxfehzoIpLrMQWJojvOo= github.com/grafana/loki/pkg/push v0.0.0-20231201111602-11ef833ed3e4 h1:wQ0FnSeebhJIBkgYOD06Mxk9HV2KhtEG0hp/7R+5RUQ= github.com/grafana/loki/pkg/push v0.0.0-20231201111602-11ef833ed3e4/go.mod h1:f3JSoxBTPXX5ec4FxxeC19nTBSxoTz+cBgS3cYLMcr0= -github.com/grafana/pyroscope-go v1.0.4 h1:oyQX0BOkL+iARXzHuCdIF5TQ7/sRSel1YFViMHC7Bm0= -github.com/grafana/pyroscope-go v1.0.4/go.mod h1:0d7ftwSMBV/Awm7CCiYmHQEG8Y44Ma3YSjt+nWcWztY= -github.com/grafana/pyroscope-go/godeltaprof v0.1.4 h1:mDsJ3ngul7UfrHibGQpV66PbZ3q1T8glz/tK3bQKKEk= -github.com/grafana/pyroscope-go/godeltaprof v0.1.4/go.mod h1:1HSPtjU8vLG0jE9JrTdzjgFqdJ/VgN7fvxBNq3luJko= +github.com/grafana/pyroscope-go v1.1.1 h1:PQoUU9oWtO3ve/fgIiklYuGilvsm8qaGhlY4Vw6MAcQ= +github.com/grafana/pyroscope-go v1.1.1/go.mod h1:Mw26jU7jsL/KStNSGGuuVYdUq7Qghem5P8aXYXSXG88= +github.com/grafana/pyroscope-go/godeltaprof v0.1.6 h1:nEdZ8louGAplSvIJi1HVp7kWvFvdiiYg3COLlTwJiFo= +github.com/grafana/pyroscope-go/godeltaprof v0.1.6/go.mod h1:Tk376Nbldo4Cha9RgiU7ik8WKFkNpfds98aUzS8omLE= github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd h1:PpuIBO5P3e9hpqBD0O/HjhShYuM6XE0i/lbE6J94kww= github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd/go.mod h1:M5qHK+eWfAv8VR/265dIuEpL3fNfeC21tXXp9itM24A= github.com/graph-gophers/dataloader v5.0.0+incompatible h1:R+yjsbrNq1Mo3aPG+Z/EKYrXrXXUNJHOgbRt+U6jOug= @@ -904,6 +904,7 @@ github.com/hashicorp/go-envparse v0.1.0 h1:bE++6bhIsNCPLvgDZkYqo3nA+/PFI51pkrHdm github.com/hashicorp/go-envparse v0.1.0/go.mod h1:OHheN1GoygLlAkTlXLXvAdnXdZxy8JUweQ1rAXx1xnc= github.com/hashicorp/go-getter v1.7.1 h1:SWiSWN/42qdpR0MdhaOc/bLR48PLuP1ZQtYLRlM69uY= github.com/hashicorp/go-getter v1.7.1/go.mod h1:W7TalhMmbPmsSMdNjD0ZskARur/9GJ17cfHTRtXV744= +github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= github.com/hashicorp/go-hclog v1.5.0 h1:bI2ocEMgcVlz55Oj1xZNBsVi900c7II+fWDyV9o+13c= github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= @@ -917,8 +918,8 @@ github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+ github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= -github.com/hashicorp/go-retryablehttp v0.7.4 h1:ZQgVdpTdAL7WpMIwLzCfbalOcSUdkDZnpUv3/+BxzFA= -github.com/hashicorp/go-retryablehttp v0.7.4/go.mod h1:Jy/gPYAdjqffZ/yFGCFV2doI5wjtH1ewM9u8iYVjtX8= +github.com/hashicorp/go-retryablehttp v0.7.5 h1:bJj+Pj19UZMIweq/iie+1u5YCdGrnxCT9yvm0e+Nd5M= +github.com/hashicorp/go-retryablehttp v0.7.5/go.mod h1:Jy/gPYAdjqffZ/yFGCFV2doI5wjtH1ewM9u8iYVjtX8= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= github.com/hashicorp/go-rootcerts v1.0.2 h1:jzhAVGtqPKbwpyCPELlgNWhE1znq+qwJtW5Oi2viEzc= github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= @@ -1098,8 +1099,8 @@ github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYs github.com/klauspost/compress v1.11.4/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= -github.com/klauspost/compress v1.17.2 h1:RlWWUY/Dr4fL8qk9YG7DTZ7PDgME2V4csBXA8L/ixi4= -github.com/klauspost/compress v1.17.2/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/compress v1.17.3 h1:qkRjuerhUU1EmXLYGkSH6EZL+vPSxIrYjLNAK4slzwA= +github.com/klauspost/compress v1.17.3/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM= github.com/klauspost/cpuid v1.2.1/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.2.5 h1:0E5MSMDEoAulmXNFquVs//DdoomxaoTY1kUhbc/qbZg= @@ -1497,10 +1498,10 @@ github.com/smartcontractkit/caigo v0.0.0-20230621050857-b29a4ca8c704 h1:T3lFWumv github.com/smartcontractkit/caigo v0.0.0-20230621050857-b29a4ca8c704/go.mod h1:2QuJdEouTWjh5BDy5o/vgGXQtR4Gz8yH1IYB5eT7u4M= github.com/smartcontractkit/chain-selectors v1.0.10 h1:t9kJeE6B6G+hKD0GYR4kGJSCqR1LNS7aI3jT0V+xGrg= github.com/smartcontractkit/chain-selectors v1.0.10/go.mod h1:d4Hi+E1zqjy9HqMkjBE5q1vcG9VGgxf5VxiRHfzi2kE= -github.com/smartcontractkit/chainlink-automation v1.0.2-0.20240118014648-1ab6a88c9429 h1:xkejUBZhcBpBrTSfxc91Iwzadrb6SXw8ks69bHIQ9Ww= -github.com/smartcontractkit/chainlink-automation v1.0.2-0.20240118014648-1ab6a88c9429/go.mod h1:wJmVvDf4XSjsahWtfUq3wvIAYEAuhr7oxmxYnEL/LGQ= -github.com/smartcontractkit/chainlink-common v0.1.7-0.20240227191958-d13aad8b4d61 h1:5aer8Pkw3XlXLjcPzWozy3RAbYQjVjpruxDeQENcVMw= -github.com/smartcontractkit/chainlink-common v0.1.7-0.20240227191958-d13aad8b4d61/go.mod h1:6aXWSEQawX2oZXcPPOdxnEGufAhj7PqPKolXf6ijRGA= +github.com/smartcontractkit/chainlink-automation v1.0.2-0.20240311111125-22812a072c35 h1:GNhRKD3izyzAoGMXDvVUAwEuzz4Atdj3U3RH7eak5Is= +github.com/smartcontractkit/chainlink-automation v1.0.2-0.20240311111125-22812a072c35/go.mod h1:2I0dWdYdK6jHPnSYYy7Y7Xp7L0YTnJ3KZtkhLQflsTU= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20240314172156-049609b8e1f9 h1:rlvE17wHiSnrl2d42TWQ2VVx8ho8c9vgznysXj68sRU= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20240314172156-049609b8e1f9/go.mod h1:/bJGelrpXvCcDCuaIgt91UN4B9YxZdK1O7VX5lzbysI= github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240213120401-01a23955f9f8 h1:I326nw5GwHQHsLKHwtu5Sb9EBLylC8CfUd7BFAS0jtg= github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240213120401-01a23955f9f8/go.mod h1:a65NtrK4xZb01mf0dDNghPkN2wXgcqFQ55ADthVBgMc= github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540 h1:xFSv8561jsLtF6gYZr/zW2z5qUUAkcFkApin2mnbYTo= @@ -1511,8 +1512,8 @@ github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240216142700-c5869534c19 github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240216142700-c5869534c19e/go.mod h1:JiykN+8W5TA4UD2ClrzQCVvcH3NcyLEVv7RwY0busrw= github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240213121419-1272736c2ac0 h1:7m9PVtccb8/pvKTXMaGuyceFno1icRyC2SFH7KG7+70= github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240213121419-1272736c2ac0/go.mod h1:SZ899lZYQ0maUulWbZg+SWqabHQ1wTbyk3jT8wJfyo8= -github.com/smartcontractkit/chainlink-testing-framework v1.25.1 h1:SEpP7yvsShsAHTVhbxS2srOWi5StrslM4niAWJC9o4E= -github.com/smartcontractkit/chainlink-testing-framework v1.25.1/go.mod h1:gkmsafC85u6hIqWbxKjynKf4NuFuFJDRcgxIEFsSq6E= +github.com/smartcontractkit/chainlink-testing-framework v1.27.0 h1:fs60anZu4VMPv0E9TtGo9uQ4kJcqChClxgjC9ArvqN4= +github.com/smartcontractkit/chainlink-testing-framework v1.27.0/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-20231120191722-fef03814f868 h1:FFdvEzlYwcuVHkdZ8YnZR/XomeMGbz5E2F2HZI3I3w8= @@ -1573,8 +1574,9 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= @@ -1586,8 +1588,9 @@ github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1F github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8= github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= @@ -1738,14 +1741,14 @@ go.opentelemetry.io/collector/pdata v1.0.0-rcv0016/go.mod h1:OdN0alYOlYhHXu6BDlG go.opentelemetry.io/collector/semconv v0.87.0 h1:BsG1jdLLRCBRlvUujk4QA86af7r/ZXnizczQpEs/gg8= go.opentelemetry.io/collector/semconv v0.87.0/go.mod h1:j/8THcqVxFna1FpvA2zYIsUperEtOaRaqoLYIN4doWw= go.opentelemetry.io/contrib v0.20.0 h1:ubFQUn0VCZ0gPwIoJfBJVpeBlyRMxu8Mm/huKWYd9p0= -go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin v0.46.1 h1:mMv2jG58h6ZI5t5S9QCVGdzCmAsTakMa3oxVgpSD44g= -go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin v0.46.1/go.mod h1:oqRuNKG0upTaDPbLVCG8AD0G2ETrfDtmh7jViy7ox6M= +go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin v0.49.0 h1:1f31+6grJmV3X4lxcEvUy13i5/kfDw1nJZwhd8mA4tg= +go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin v0.49.0/go.mod h1:1P/02zM3OwkX9uki+Wmxw3a5GVb6KUXRsa7m7bOC9Fg= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.1 h1:SpGay3w+nEwMpfVnbqOLH5gY52/foP8RE8UzTZ1pdSE= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.1/go.mod h1:4UoMYEZOC0yN/sPGH76KPkkU7zgiEWYWL9vwmbnTJPE= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0 h1:x8Z78aZx8cOF0+Kkazoc7lwUNMGy0LrzEMxTm4BbTxg= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0/go.mod h1:62CPTSry9QZtOaSsE3tOzhx6LzDhHnXJ6xHeMNNiM6Q= -go.opentelemetry.io/otel v1.21.0 h1:hzLeKBZEL7Okw2mGzZ0cc4k/A7Fta0uoPgaJCr8fsFc= -go.opentelemetry.io/otel v1.21.0/go.mod h1:QZzNPQPm1zLX4gZK4cMi+71eaorMSGT3A4znnUvNNEo= +go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= +go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= go.opentelemetry.io/otel/exporters/otlp v0.20.0 h1:PTNgq9MRmQqqJY0REVbZFvwkYOA85vbdQU/nVfxDyqg= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0 h1:cl5P5/GIfFh4t6xyruOgJP5QiA1pw4fYYdv6nc6CBWw= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0/go.mod h1:zgBdWWAu7oEEMC06MMKc5NLbA/1YDXV1sMpSqEeLQLg= @@ -1753,14 +1756,14 @@ go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0 h1:tIqhe go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0/go.mod h1:nUeKExfxAQVbiVFn32YXpXZZHZ61Cc3s3Rn1pDBGAb0= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.19.0 h1:IeMeyr1aBvBiPVYihXIaeIZba6b8E1bYp7lbdxK8CQg= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.19.0/go.mod h1:oVdCUtjq9MK9BlS7TtucsQwUcXcymNiEDjgDD2jMtZU= -go.opentelemetry.io/otel/metric v1.21.0 h1:tlYWfeo+Bocx5kLEloTjbcDwBuELRrIFxwdQ36PlJu4= -go.opentelemetry.io/otel/metric v1.21.0/go.mod h1:o1p3CA8nNHW8j5yuQLdc1eeqEaPfzug24uvsyIEJRWM= +go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= +go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= go.opentelemetry.io/otel/sdk v1.21.0 h1:FTt8qirL1EysG6sTQRZ5TokkU8d0ugCj8htOgThZXQ8= go.opentelemetry.io/otel/sdk v1.21.0/go.mod h1:Nna6Yv7PWTdgJHVRD9hIYywQBRx7pbox6nwBnZIxl/E= go.opentelemetry.io/otel/sdk/metric v1.21.0 h1:smhI5oD714d6jHE6Tie36fPx4WDFIg+Y6RfAY4ICcR0= go.opentelemetry.io/otel/sdk/metric v1.21.0/go.mod h1:FJ8RAsoPGv/wYMgBdUJXOm+6pzFY3YdljnXtv1SBE8Q= -go.opentelemetry.io/otel/trace v1.21.0 h1:WD9i5gzvoUPuXIXH24ZNBudiarZDKuekPqi/E8fpfLc= -go.opentelemetry.io/otel/trace v1.21.0/go.mod h1:LGbsEB0f9LGjN+OZaQQ26sohbOmiMR+BaslueVtS/qQ= +go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= +go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I= go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM= diff --git a/integration-tests/load/vrfv2plus/gun.go b/integration-tests/load/vrfv2plus/gun.go index bfd8ff868b5..22a56d557de 100644 --- a/integration-tests/load/vrfv2plus/gun.go +++ b/integration-tests/load/vrfv2plus/gun.go @@ -50,7 +50,8 @@ func (m *SingleHashGun) Call(_ *wasp.Generator) *wasp.Response { } //randomly increase/decrease randomness request count per TX - randomnessRequestCountPerRequest := deviateValue(*m.testConfig.GetVRFv2PlusConfig().General.RandomnessRequestCountPerRequest, *m.testConfig.GetVRFv2PlusConfig().General.RandomnessRequestCountPerRequestDeviation) + reqCount := deviateValue(*m.testConfig.GetVRFv2PlusConfig().General.RandomnessRequestCountPerRequest, *m.testConfig.GetVRFv2PlusConfig().General.RandomnessRequestCountPerRequestDeviation) + m.testConfig.GetVRFv2PlusConfig().General.RandomnessRequestCountPerRequest = &reqCount _, err = vrfv2plus.RequestRandomnessAndWaitForFulfillment( //the same consumer is used for all requests and in all subs m.contracts.VRFV2PlusConsumer[0], @@ -60,12 +61,7 @@ func (m *SingleHashGun) Call(_ *wasp.Generator) *wasp.Response { m.subIDs[randInRange(0, len(m.subIDs)-1)], //randomly pick payment type billingType, - *m.testConfig.GetVRFv2PlusConfig().General.MinimumConfirmations, - *m.testConfig.GetVRFv2PlusConfig().General.CallbackGasLimit, - *m.testConfig.GetVRFv2PlusConfig().General.NumberOfWords, - randomnessRequestCountPerRequest, - *m.testConfig.GetVRFv2PlusConfig().General.RandomnessRequestCountPerRequestDeviation, - m.testConfig.GetVRFv2PlusConfig().General.RandomWordsFulfilledEventTimeout.Duration, + m.testConfig.GetVRFv2PlusConfig().General, m.logger, ) if err != nil { diff --git a/integration-tests/reorg/automation_reorg_test.go b/integration-tests/reorg/automation_reorg_test.go index aa1cb6bcde0..fe87ac1aa3f 100644 --- a/integration-tests/reorg/automation_reorg_test.go +++ b/integration-tests/reorg/automation_reorg_test.go @@ -217,7 +217,11 @@ func TestAutomationReorg(t *testing.T) { defaultOCRRegistryConfig.RegistryVersion = registryVersion ocrConfig, err := actions.BuildAutoOCR2ConfigVars(t, nodesWithoutBootstrap, defaultOCRRegistryConfig, registrar.Address(), 5*time.Second, registry.ChainModuleAddress(), registry.ReorgProtectionEnabled()) require.NoError(t, err, "OCR2 config should be built successfully") - err = registry.SetConfig(defaultOCRRegistryConfig, ocrConfig) + if registryVersion == ethereum.RegistryVersion_2_0 { + err = registry.SetConfig(defaultOCRRegistryConfig, ocrConfig) + } else { + err = registry.SetConfigTypeSafe(ocrConfig) + } require.NoError(t, err, "Registry config should be be set successfully") require.NoError(t, chainClient.WaitForEvents(), "Waiting for config to be set") diff --git a/integration-tests/scripts/buildEvmClientTestMatrixList.sh b/integration-tests/scripts/buildEvmClientTestMatrixList.sh new file mode 100755 index 00000000000..2f0e27b7fb8 --- /dev/null +++ b/integration-tests/scripts/buildEvmClientTestMatrixList.sh @@ -0,0 +1,64 @@ +#!/usr/bin/env bash + +# requires a path to a json file with all the tests it should run +# requires a node label to be passed in, for example "ubuntu-latest" + +set -e + +# get this script's directory +SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd) + +cd "$SCRIPT_DIR"/../ || exit 1 + +JSONFILE=$1 +NODE_LABEL=$2 + +COUNTER=1 + +# Build a JSON object in the format expected by our evm-version-compatibility-tests workflow matrix +matrix_output() { + local counter=$1 + local job_name=$2 + local test_name=$3 + local node_label=$4 + local eth_client=$5 + local docker_image=$6 + local product=$7 + local counter_out=$(printf "%02d\n" $counter) + echo -n "{\"name\": \"${job_name}-${counter_out}\", \"os\": \"${node_label}\", \"product\": \"${product}\", \"eth_client\": \"${eth_client}\", \"docker_image\": \"${docker_image}\", \"run\": \"-run '^${test_name}$'\"}" +} + +# Read the JSON file and loop through 'tests' and 'run' +jq -c '.tests[]' ${JSONFILE} | while read -r test; do + testName=$(echo ${test} | jq -r '.name') + label=$(echo ${test} | jq -r '.label // empty') + effective_node_label=${label:-$NODE_LABEL} + eth_client=$(echo ${test} | jq -r '.eth_client') + docker_image=$(echo ${test} | jq -r '.docker_image') + product=$(echo ${test} | jq -r '.product') + subTests=$(echo ${test} | jq -r '.run[]?.name // empty') + output="" + + if [ $COUNTER -ne 1 ]; then + echo -n "," + fi + + # Loop through subtests, if any, and print in the desired format + if [ -n "$subTests" ]; then + subTestString="" + subTestCounter=1 + for subTest in $subTests; do + if [ $subTestCounter -ne 1 ]; then + subTestString+="|" + fi + subTestString+="${testName}\/${subTest}" + ((subTestCounter++)) + done + testName="${subTestString}" + fi + matrix_output $COUNTER "emv-node-version-compatibility-test" "${testName}" ${effective_node_label} "${eth_client}" "${docker_image}" "${product}" + ((COUNTER++)) +done > "./tmpout.json" +OUTPUT=$(cat ./tmpout.json) +echo "[${OUTPUT}]" +rm ./tmpout.json \ No newline at end of file diff --git a/integration-tests/smoke/automation_test.go b/integration-tests/smoke/automation_test.go index 29bd61b9257..14e6ca9ab2c 100644 --- a/integration-tests/smoke/automation_test.go +++ b/integration-tests/smoke/automation_test.go @@ -32,13 +32,11 @@ import ( tc "github.com/smartcontractkit/chainlink/integration-tests/testconfig" "github.com/smartcontractkit/chainlink/integration-tests/types" "github.com/smartcontractkit/chainlink/integration-tests/types/config/node" - cltypes "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/automation_utils_2_1" + ac "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/automation_compatible_utils" + "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/core" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/mercury/streams" ) -var utilsABI21 = cltypes.MustGetABI(automation_utils_2_1.AutomationUtilsABI) - const ( automationDefaultUpkeepGasLimit = uint32(2500000) automationDefaultLinkFunds = int64(9e18) @@ -313,7 +311,7 @@ func TestSetUpkeepTriggerConfig(t *testing.T) { for i := 0; i < len(consumers); i++ { upkeepAddr := consumers[i].Address() - logTriggerConfigStruct := automation_utils_2_1.LogTriggerConfig{ + logTriggerConfigStruct := ac.IAutomationV21PlusCommonLogTriggerConfig{ ContractAddress: common.HexToAddress(upkeepAddr), FilterSelector: 0, Topic0: topic0InBytesNoMatch, @@ -321,7 +319,7 @@ func TestSetUpkeepTriggerConfig(t *testing.T) { Topic2: bytes0, Topic3: bytes0, } - encodedLogTriggerConfig, err := utilsABI21.Methods["_logTriggerConfig"].Inputs.Pack(&logTriggerConfigStruct) + encodedLogTriggerConfig, err := core.CompatibleUtilsABI.Methods["_logTriggerConfig"].Inputs.Pack(&logTriggerConfigStruct) if err != nil { return } @@ -361,7 +359,7 @@ func TestSetUpkeepTriggerConfig(t *testing.T) { for i := 0; i < len(consumers); i++ { upkeepAddr := consumers[i].Address() - logTriggerConfigStruct := automation_utils_2_1.LogTriggerConfig{ + logTriggerConfigStruct := ac.IAutomationV21PlusCommonLogTriggerConfig{ ContractAddress: common.HexToAddress(upkeepAddr), FilterSelector: 0, Topic0: topic0InBytesMatch, @@ -369,7 +367,7 @@ func TestSetUpkeepTriggerConfig(t *testing.T) { Topic2: bytes0, Topic3: bytes0, } - encodedLogTriggerConfig, err := utilsABI21.Methods["_logTriggerConfig"].Inputs.Pack(&logTriggerConfigStruct) + encodedLogTriggerConfig, err := core.CompatibleUtilsABI.Methods["_logTriggerConfig"].Inputs.Pack(&logTriggerConfigStruct) if err != nil { return } @@ -1021,7 +1019,11 @@ func TestAutomationCheckPerformGasLimit(t *testing.T) { ocrConfig, err := actions.BuildAutoOCR2ConfigVarsLocal(l, nodesWithoutBootstrap, highCheckGasLimit, a.Registrar.Address(), 30*time.Second, a.Registry.RegistryOwnerAddress(), a.Registry.ChainModuleAddress(), a.Registry.ReorgProtectionEnabled()) require.NoError(t, err, "Error building OCR config") - err = a.Registry.SetConfig(highCheckGasLimit, ocrConfig) + if a.RegistrySettings.RegistryVersion == ethereum.RegistryVersion_2_0 { + err = a.Registry.SetConfig(highCheckGasLimit, ocrConfig) + } else { + err = a.Registry.SetConfigTypeSafe(ocrConfig) + } require.NoError(t, err, "Registry config should be set successfully!") err = a.ChainClient.WaitForEvents() require.NoError(t, err, "Error waiting for set config tx") @@ -1149,11 +1151,15 @@ func setupAutomationTestDocker( require.NoError(t, err) l.Debug().Msgf("Funding amount: %f", *automationTestConfig.GetCommonConfig().ChainlinkNodeFunding) clNodesCount := 5 + + privateNetwork, err := actions.EthereumNetworkConfigFromConfig(l, automationTestConfig) + require.NoError(t, err, "Error building ethereum network config") + if isMercuryV02 || isMercuryV03 { env, err = test_env.NewCLTestEnvBuilder(). WithTestInstance(t). WithTestConfig(automationTestConfig). - WithGeth(). + WithPrivateEthereumNetwork(privateNetwork). WithMockAdapter(). WithFunding(big.NewFloat(*automationTestConfig.GetCommonConfig().ChainlinkNodeFunding)). WithStandardCleanup(). @@ -1190,7 +1196,7 @@ func setupAutomationTestDocker( env, err = test_env.NewCLTestEnvBuilder(). WithTestInstance(t). WithTestConfig(automationTestConfig). - WithGeth(). + WithPrivateEthereumNetwork(privateNetwork). WithMockAdapter(). WithCLNodes(clNodesCount). WithCLNodeConfig(clNodeConfig). diff --git a/integration-tests/smoke/cron_test.go b/integration-tests/smoke/cron_test.go index b6e04612aca..15934f48922 100644 --- a/integration-tests/smoke/cron_test.go +++ b/integration-tests/smoke/cron_test.go @@ -11,6 +11,7 @@ import ( "github.com/smartcontractkit/chainlink-testing-framework/logging" + "github.com/smartcontractkit/chainlink/integration-tests/actions" "github.com/smartcontractkit/chainlink/integration-tests/client" "github.com/smartcontractkit/chainlink/integration-tests/docker/test_env" tc "github.com/smartcontractkit/chainlink/integration-tests/testconfig" @@ -25,10 +26,13 @@ func TestCronBasic(t *testing.T) { t.Fatal(err) } + privateNetwork, err := actions.EthereumNetworkConfigFromConfig(l, &config) + require.NoError(t, err, "Error building ethereum network config") + env, err := test_env.NewCLTestEnvBuilder(). WithTestInstance(t). WithTestConfig(&config). - WithGeth(). + WithPrivateEthereumNetwork(privateNetwork). WithMockAdapter(). WithCLNodes(1). WithStandardCleanup(). @@ -77,10 +81,13 @@ func TestCronJobReplacement(t *testing.T) { t.Fatal(err) } + privateNetwork, err := actions.EthereumNetworkConfigFromConfig(l, &config) + require.NoError(t, err, "Error building ethereum network config") + env, err := test_env.NewCLTestEnvBuilder(). WithTestInstance(t). WithTestConfig(&config). - WithGeth(). + WithPrivateEthereumNetwork(privateNetwork). WithMockAdapter(). WithCLNodes(1). WithStandardCleanup(). diff --git a/integration-tests/smoke/evm_node_compatibility_test_list.json b/integration-tests/smoke/evm_node_compatibility_test_list.json new file mode 100644 index 00000000000..c14a2b54a3e --- /dev/null +++ b/integration-tests/smoke/evm_node_compatibility_test_list.json @@ -0,0 +1,214 @@ +{ + "tests": [ + { + "product": "ocr", + "name": "TestOCRBasic", + "eth_client": "geth", + "docker_image": "ethereum/client-go:latest_stable", + "label": "ubuntu-latest" + }, + { + "product": "ocr", + "name": "TestOCRBasic", + "eth_client": "geth", + "docker_image": "ethereum/client-go:v1.13.0", + "label": "ubuntu-latest" + }, + { + "product": "ocr", + "name": "TestOCRBasic", + "eth_client": "geth", + "docker_image": "ethereum/client-go:v1.12.0", + "label": "ubuntu-latest" + }, + { + "product": "ocr", + "name": "TestOCRBasic", + "eth_client": "geth", + "docker_image": "ethereum/client-go:v1.11.0", + "label": "ubuntu-latest" + }, + { + "product": "ocr", + "name": "TestOCRBasic", + "eth_client": "geth", + "docker_image": "ethereum/client-go:v1.10.0", + "label": "ubuntu-latest" + }, + { + "product": "ocr2", + "name": "TestOCRv2Request", + "eth_client": "geth", + "docker_image": "ethereum/client-go:latest_stable", + "label": "ubuntu-latest" + }, + { + "product": "ocr2", + "name": "TestOCRv2Request", + "eth_client": "geth", + "docker_image": "ethereum/client-go:v1.13.0", + "label": "ubuntu-latest" + }, + { + "product": "ocr2", + "name": "TestOCRv2Request", + "eth_client": "geth", + "docker_image": "ethereum/client-go:v1.12.0", + "label": "ubuntu-latest" + }, + { + "product": "ocr2", + "name": "TestOCRv2Request", + "eth_client": "geth", + "docker_image": "ethereum/client-go:v1.11.0", + "label": "ubuntu-latest" + }, + { + "product": "ocr2", + "name": "TestOCRv2Request", + "eth_client": "geth", + "docker_image": "ethereum/client-go:v1.10.0", + "label": "ubuntu-latest" + }, + { + "product": "vrf", + "name": "TestVRFBasic", + "eth_client": "geth", + "docker_image": "ethereum/client-go:latest_stable", + "label": "ubuntu-latest" + }, + { + "product": "vrf", + "name": "TestVRFBasic", + "eth_client": "geth", + "docker_image": "ethereum/client-go:v1.13.0", + "label": "ubuntu-latest" + }, + { + "product": "vrf", + "name": "TestVRFBasic", + "eth_client": "geth", + "docker_image": "ethereum/client-go:v1.12.0", + "label": "ubuntu-latest" + }, + { + "product": "vrf", + "name": "TestVRFBasic", + "eth_client": "geth", + "docker_image": "ethereum/client-go:v1.11.0", + "label": "ubuntu-latest" + }, + { + "product": "vrf", + "name": "TestVRFBasic", + "eth_client": "geth", + "docker_image": "ethereum/client-go:v1.10.0", + "label": "ubuntu-latest" + }, + { + "product": "vrfv2", + "name": "TestVRFv2Basic/Request Randomness", + "eth_client": "geth", + "docker_image": "ethereum/client-go:latest_stable", + "label": "ubuntu-latest" + }, + { + "product": "vrfv2", + "name": "TestVRFv2Basic/Request Randomness", + "eth_client": "geth", + "docker_image": "ethereum/client-go:v1.13.0", + "label": "ubuntu-latest" + }, + { + "product": "vrfv2", + "name": "TestVRFv2Basic/Request Randomness", + "eth_client": "geth", + "docker_image": "ethereum/client-go:v1.12.0", + "label": "ubuntu-latest" + }, + { + "product": "vrfv2", + "name": "TestVRFv2Basic/Request Randomness", + "eth_client": "geth", + "docker_image": "ethereum/client-go:v1.11.0", + "label": "ubuntu-latest" + }, + { + "product": "vrfv2", + "name": "TestVRFv2Basic/Request Randomness", + "eth_client": "geth", + "docker_image": "ethereum/client-go:v1.10.0", + "label": "ubuntu-latest" + }, + { + "product": "vrfv2plus", + "name": "TestVRFv2Plus/Link Billing", + "eth_client": "geth", + "docker_image": "ethereum/client-go:latest_stable", + "label": "ubuntu-latest" + }, + { + "product": "vrfv2plus", + "name": "TestVRFv2Plus/Link Billing", + "eth_client": "geth", + "docker_image": "ethereum/client-go:v1.13.0", + "label": "ubuntu-latest" + }, + { + "product": "vrfv2plus", + "name": "TestVRFv2Plus/Link Billing", + "eth_client": "geth", + "docker_image": "ethereum/client-go:v1.12.0", + "label": "ubuntu-latest" + }, + { + "product": "vrfv2plus", + "name": "TestVRFv2Plus/Link Billing", + "eth_client": "geth", + "docker_image": "ethereum/client-go:v1.11.0", + "label": "ubuntu-latest" + }, + { + "product": "vrfv2plus", + "name": "TestVRFv2Plus/Link Billing", + "eth_client": "geth", + "docker_image": "ethereum/client-go:v1.10.0", + "label": "ubuntu-latest" + }, + { + "product": "automation", + "name": "TestSetUpkeepTriggerConfig", + "eth_client": "geth", + "docker_image": "ethereum/client-go:latest_stable", + "label": "ubuntu-latest" + }, + { + "product": "automation", + "name": "TestSetUpkeepTriggerConfig", + "eth_client": "geth", + "docker_image": "ethereum/client-go:v1.13.0", + "label": "ubuntu-latest" + }, + { + "product": "automation", + "name": "TestSetUpkeepTriggerConfig", + "eth_client": "geth", + "docker_image": "ethereum/client-go:v1.12.0", + "label": "ubuntu-latest" + }, + { + "product": "automation", + "name": "TestSetUpkeepTriggerConfig", + "eth_client": "geth", + "docker_image": "ethereum/client-go:v1.11.0", + "label": "ubuntu-latest" + }, + { + "product": "automation", + "name": "TestSetUpkeepTriggerConfig", + "eth_client": "geth", + "docker_image": "ethereum/client-go:v1.10.0", + "label": "ubuntu-latest" + } + ] +} \ No newline at end of file diff --git a/integration-tests/smoke/flux_test.go b/integration-tests/smoke/flux_test.go index c8cec4e385b..f7a0c94d0c9 100644 --- a/integration-tests/smoke/flux_test.go +++ b/integration-tests/smoke/flux_test.go @@ -31,10 +31,13 @@ func TestFluxBasic(t *testing.T) { t.Fatal(err) } + privateNetwork, err := actions.EthereumNetworkConfigFromConfig(l, &config) + require.NoError(t, err, "Error building ethereum network config") + env, err := test_env.NewCLTestEnvBuilder(). WithTestInstance(t). WithTestConfig(&config). - WithGeth(). + WithPrivateEthereumNetwork(privateNetwork). WithMockAdapter(). WithCLNodes(3). WithStandardCleanup(). diff --git a/integration-tests/smoke/forwarder_ocr_test.go b/integration-tests/smoke/forwarder_ocr_test.go index 60fe1db3c25..e3709bc8772 100644 --- a/integration-tests/smoke/forwarder_ocr_test.go +++ b/integration-tests/smoke/forwarder_ocr_test.go @@ -24,10 +24,13 @@ func TestForwarderOCRBasic(t *testing.T) { t.Fatal(err) } + privateNetwork, err := actions.EthereumNetworkConfigFromConfig(l, &config) + require.NoError(t, err, "Error building ethereum network config") + env, err := test_env.NewCLTestEnvBuilder(). WithTestInstance(t). WithTestConfig(&config). - WithGeth(). + WithPrivateEthereumNetwork(privateNetwork). WithMockAdapter(). WithForwarders(). WithCLNodes(6). diff --git a/integration-tests/smoke/forwarders_ocr2_test.go b/integration-tests/smoke/forwarders_ocr2_test.go index 7c5b988276b..27b2a4fde94 100644 --- a/integration-tests/smoke/forwarders_ocr2_test.go +++ b/integration-tests/smoke/forwarders_ocr2_test.go @@ -30,9 +30,13 @@ func TestForwarderOCR2Basic(t *testing.T) { t.Fatal(err) } + privateNetwork, err := actions.EthereumNetworkConfigFromConfig(l, &config) + require.NoError(t, err, "Error building ethereum network config") + env, err := test_env.NewCLTestEnvBuilder(). WithTestInstance(t). WithTestConfig(&config). + WithPrivateEthereumNetwork(privateNetwork). WithGeth(). WithMockAdapter(). WithCLNodeConfig(node.NewConfig(node.NewBaseConfig(), diff --git a/integration-tests/smoke/keeper_test.go b/integration-tests/smoke/keeper_test.go index 0ebbc1e083d..18f03dd3514 100644 --- a/integration-tests/smoke/keeper_test.go +++ b/integration-tests/smoke/keeper_test.go @@ -9,6 +9,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/onsi/gomega" + "github.com/rs/zerolog" "github.com/stretchr/testify/require" commonconfig "github.com/smartcontractkit/chainlink-common/pkg/config" @@ -93,7 +94,7 @@ func TestKeeperBasicSmoke(t *testing.T) { t.Fatal(err) } - chainClient, chainlinkNodes, contractDeployer, linkToken, _ := setupKeeperTest(t, &config) + chainClient, chainlinkNodes, contractDeployer, linkToken, _ := setupKeeperTest(l, t, &config) registry, _, consumers, upkeepIDs := actions.DeployKeeperContracts( t, registryVersion, @@ -174,7 +175,7 @@ func TestKeeperBlockCountPerTurn(t *testing.T) { t.Fatal(err) } - chainClient, chainlinkNodes, contractDeployer, linkToken, _ := setupKeeperTest(t, &config) + chainClient, chainlinkNodes, contractDeployer, linkToken, _ := setupKeeperTest(l, t, &config) registry, _, consumers, upkeepIDs := actions.DeployKeeperContracts( t, registryVersion, @@ -283,7 +284,7 @@ func TestKeeperSimulation(t *testing.T) { t.Fatal(err) } - chainClient, chainlinkNodes, contractDeployer, linkToken, _ := setupKeeperTest(t, &config) + chainClient, chainlinkNodes, contractDeployer, linkToken, _ := setupKeeperTest(l, t, &config) registry, _, consumersPerformance, upkeepIDs := actions.DeployPerformanceKeeperContracts( t, registryVersion, @@ -360,7 +361,7 @@ func TestKeeperCheckPerformGasLimit(t *testing.T) { if err != nil { t.Fatal(err) } - chainClient, chainlinkNodes, contractDeployer, linkToken, _ := setupKeeperTest(t, &config) + chainClient, chainlinkNodes, contractDeployer, linkToken, _ := setupKeeperTest(l, t, &config) registry, _, consumersPerformance, upkeepIDs := actions.DeployPerformanceKeeperContracts( t, registryVersion, @@ -477,7 +478,7 @@ func TestKeeperRegisterUpkeep(t *testing.T) { if err != nil { t.Fatal(err) } - chainClient, chainlinkNodes, contractDeployer, linkToken, _ := setupKeeperTest(t, &config) + chainClient, chainlinkNodes, contractDeployer, linkToken, _ := setupKeeperTest(l, t, &config) registry, registrar, consumers, upkeepIDs := actions.DeployKeeperContracts( t, registryVersion, @@ -570,7 +571,7 @@ func TestKeeperAddFunds(t *testing.T) { if err != nil { t.Fatal(err) } - chainClient, chainlinkNodes, contractDeployer, linkToken, _ := setupKeeperTest(t, &config) + chainClient, chainlinkNodes, contractDeployer, linkToken, _ := setupKeeperTest(l, t, &config) registry, _, consumers, upkeepIDs := actions.DeployKeeperContracts( t, registryVersion, @@ -637,7 +638,7 @@ func TestKeeperRemove(t *testing.T) { if err != nil { t.Fatal(err) } - chainClient, chainlinkNodes, contractDeployer, linkToken, _ := setupKeeperTest(t, &config) + chainClient, chainlinkNodes, contractDeployer, linkToken, _ := setupKeeperTest(l, t, &config) registry, _, consumers, upkeepIDs := actions.DeployKeeperContracts( t, registryVersion, @@ -719,7 +720,7 @@ func TestKeeperPauseRegistry(t *testing.T) { if err != nil { t.Fatal(err) } - chainClient, chainlinkNodes, contractDeployer, linkToken, _ := setupKeeperTest(t, &config) + chainClient, chainlinkNodes, contractDeployer, linkToken, _ := setupKeeperTest(l, t, &config) registry, _, consumers, upkeepIDs := actions.DeployKeeperContracts( t, registryVersion, @@ -784,7 +785,7 @@ func TestKeeperMigrateRegistry(t *testing.T) { if err != nil { t.Fatal(err) } - chainClient, chainlinkNodes, contractDeployer, linkToken, _ := setupKeeperTest(t, &config) + chainClient, chainlinkNodes, contractDeployer, linkToken, _ := setupKeeperTest(l, t, &config) registry, _, consumers, upkeepIDs := actions.DeployKeeperContracts( t, ethereum.RegistryVersion_1_2, @@ -880,7 +881,7 @@ func TestKeeperNodeDown(t *testing.T) { if err != nil { t.Fatal(err) } - chainClient, chainlinkNodes, contractDeployer, linkToken, _ := setupKeeperTest(t, &config) + chainClient, chainlinkNodes, contractDeployer, linkToken, _ := setupKeeperTest(l, t, &config) registry, _, consumers, upkeepIDs := actions.DeployKeeperContracts( t, registryVersion, @@ -990,7 +991,7 @@ func TestKeeperPauseUnPauseUpkeep(t *testing.T) { if err != nil { t.Fatal(err) } - chainClient, chainlinkNodes, contractDeployer, linkToken, _ := setupKeeperTest(t, &config) + chainClient, chainlinkNodes, contractDeployer, linkToken, _ := setupKeeperTest(l, t, &config) registry, _, consumers, upkeepIDs := actions.DeployKeeperContracts( t, ethereum.RegistryVersion_1_3, @@ -1084,7 +1085,7 @@ func TestKeeperUpdateCheckData(t *testing.T) { if err != nil { t.Fatal(err) } - chainClient, chainlinkNodes, contractDeployer, linkToken, _ := setupKeeperTest(t, &config) + chainClient, chainlinkNodes, contractDeployer, linkToken, _ := setupKeeperTest(l, t, &config) registry, _, performDataChecker, upkeepIDs := actions.DeployPerformDataCheckerContracts( t, ethereum.RegistryVersion_1_3, @@ -1143,7 +1144,7 @@ func TestKeeperUpdateCheckData(t *testing.T) { }, "3m", "1s").Should(gomega.Succeed()) } -func setupKeeperTest(t *testing.T, config *tc.TestConfig) ( +func setupKeeperTest(l zerolog.Logger, t *testing.T, config *tc.TestConfig) ( blockchain.EVMClient, []*client.ChainlinkClient, contracts.ContractDeployer, @@ -1158,10 +1159,13 @@ func setupKeeperTest(t *testing.T, config *tc.TestConfig) ( clNodeConfig.Keeper.Registry.SyncInterval = &syncInterval clNodeConfig.Keeper.Registry.PerformGasOverhead = &performGasOverhead + privateNetwork, err := actions.EthereumNetworkConfigFromConfig(l, config) + require.NoError(t, err, "Error building ethereum network config") + env, err := test_env.NewCLTestEnvBuilder(). WithTestInstance(t). WithTestConfig(config). - WithGeth(). + WithPrivateEthereumNetwork(privateNetwork). WithCLNodes(5). WithCLNodeConfig(clNodeConfig). WithFunding(big.NewFloat(.5)). @@ -1189,7 +1193,7 @@ func TestKeeperJobReplacement(t *testing.T) { t.Fatal(err) } - chainClient, chainlinkNodes, contractDeployer, linkToken, _ := setupKeeperTest(t, &config) + chainClient, chainlinkNodes, contractDeployer, linkToken, _ := setupKeeperTest(l, t, &config) registry, _, consumers, upkeepIDs := actions.DeployKeeperContracts( t, registryVersion, diff --git a/integration-tests/smoke/log_poller_test.go b/integration-tests/smoke/log_poller_test.go index 4b4533d3a37..f6c349581ba 100644 --- a/integration-tests/smoke/log_poller_test.go +++ b/integration-tests/smoke/log_poller_test.go @@ -1,6 +1,7 @@ package smoke import ( + "context" "fmt" "math/big" "testing" @@ -97,6 +98,8 @@ func executeBasicLogPollerTest(t *testing.T) { lpTestEnv := prepareEnvironment(l, t, &testConfig) testEnv := lpTestEnv.testEnv + ctx := testcontext.Get(t) + // Register log triggered upkeep for each combination of log emitter contract and event signature (topic) // We need to register a separate upkeep for each event signature, because log trigger doesn't support multiple topics (even if log poller does) err = logpoller.RegisterFiltersAndAssertUniquness(l, lpTestEnv.registry, lpTestEnv.upkeepIDs, lpTestEnv.logEmitters, cfg, lpTestEnv.upKeepsNeeded) @@ -108,7 +111,7 @@ func executeBasicLogPollerTest(t *testing.T) { require.NoError(t, err, "Error encountered when waiting for setting trigger config for upkeeps") expectedFilters := logpoller.GetExpectedFilters(lpTestEnv.logEmitters, cfg) - waitForAllNodesToHaveExpectedFiltersRegisteredOrFail(l, coreLogger, t, testEnv, expectedFilters) + waitForAllNodesToHaveExpectedFiltersRegisteredOrFail(ctx, l, coreLogger, t, testEnv, expectedFilters) // Save block number before starting to emit events, so that we can later use it when querying logs sb, err := testEnv.EVMClient.LatestBlockNumber(testcontext.Get(t)) @@ -176,6 +179,8 @@ func executeLogPollerReplay(t *testing.T, consistencyTimeout string) { lpTestEnv := prepareEnvironment(l, t, &testConfig) testEnv := lpTestEnv.testEnv + ctx := testcontext.Get(t) + // Save block number before starting to emit events, so that we can later use it when querying logs sb, err := testEnv.EVMClient.LatestBlockNumber(testcontext.Get(t)) require.NoError(t, err, "Error getting latest block number") @@ -213,7 +218,7 @@ func executeLogPollerReplay(t *testing.T, consistencyTimeout string) { err = testEnv.EVMClient.WaitForEvents() require.NoError(t, err, "Error encountered when waiting for setting trigger config for upkeeps") - waitForAllNodesToHaveExpectedFiltersRegisteredOrFail(l, coreLogger, t, testEnv, expectedFilters) + waitForAllNodesToHaveExpectedFiltersRegisteredOrFail(ctx, l, coreLogger, t, testEnv, expectedFilters) blockFinalisationWaitDuration := "5m" l.Warn().Str("Duration", blockFinalisationWaitDuration).Msg("Waiting for all CL nodes to have end block finalised") @@ -317,7 +322,7 @@ func prepareEnvironment(l zerolog.Logger, t *testing.T, testConfig *tc.TestConfi } // waitForAllNodesToHaveExpectedFiltersRegisteredOrFail waits until all nodes have expected filters registered until timeout -func waitForAllNodesToHaveExpectedFiltersRegisteredOrFail(l zerolog.Logger, coreLogger core_logger.SugaredLogger, t *testing.T, testEnv *test_env.CLClusterTestEnv, expectedFilters []logpoller.ExpectedFilter) { +func waitForAllNodesToHaveExpectedFiltersRegisteredOrFail(ctx context.Context, l zerolog.Logger, coreLogger core_logger.SugaredLogger, t *testing.T, testEnv *test_env.CLClusterTestEnv, expectedFilters []logpoller.ExpectedFilter) { // Make sure that all nodes have expected filters registered before starting to emit events gom := gomega.NewGomegaWithT(t) gom.Eventually(func(g gomega.Gomega) { @@ -330,7 +335,7 @@ func waitForAllNodesToHaveExpectedFiltersRegisteredOrFail(l zerolog.Logger, core var message string var err error - hasFilters, message, err = logpoller.NodeHasExpectedFilters(expectedFilters, coreLogger, testEnv.EVMClient.GetChainID(), testEnv.ClCluster.Nodes[i].PostgresDb) + hasFilters, message, err = logpoller.NodeHasExpectedFilters(ctx, expectedFilters, coreLogger, testEnv.EVMClient.GetChainID(), testEnv.ClCluster.Nodes[i].PostgresDb) if !hasFilters || err != nil { l.Warn(). Str("Details", message). diff --git a/integration-tests/smoke/ocr2_test.go b/integration-tests/smoke/ocr2_test.go index 33538c1eaa4..b70796c4ab8 100644 --- a/integration-tests/smoke/ocr2_test.go +++ b/integration-tests/smoke/ocr2_test.go @@ -129,10 +129,13 @@ func prepareORCv2SmokeTestEnv(t *testing.T, l zerolog.Logger, firstRoundResult i t.Fatal(err) } + privateNetwork, err := actions.EthereumNetworkConfigFromConfig(l, &config) + require.NoError(t, err, "Error building ethereum network config") + env, err := test_env.NewCLTestEnvBuilder(). WithTestInstance(t). WithTestConfig(&config). - WithGeth(). + WithPrivateEthereumNetwork(privateNetwork). WithMockAdapter(). WithCLNodeConfig(node.NewConfig(node.NewBaseConfig(), node.WithOCR2(), diff --git a/integration-tests/smoke/runlog_test.go b/integration-tests/smoke/runlog_test.go index f7f5c54069e..eb687e439b2 100644 --- a/integration-tests/smoke/runlog_test.go +++ b/integration-tests/smoke/runlog_test.go @@ -14,6 +14,7 @@ import ( "github.com/smartcontractkit/chainlink-testing-framework/logging" "github.com/smartcontractkit/chainlink-testing-framework/utils/testcontext" + "github.com/smartcontractkit/chainlink/integration-tests/actions" "github.com/smartcontractkit/chainlink/integration-tests/client" "github.com/smartcontractkit/chainlink/integration-tests/docker/test_env" @@ -29,10 +30,13 @@ func TestRunLogBasic(t *testing.T) { t.Fatal(err) } + privateNetwork, err := actions.EthereumNetworkConfigFromConfig(l, &config) + require.NoError(t, err, "Error building ethereum network config") + env, err := test_env.NewCLTestEnvBuilder(). WithTestInstance(t). WithTestConfig(&config). - WithGeth(). + WithPrivateEthereumNetwork(privateNetwork). WithMockAdapter(). WithCLNodes(1). WithFunding(big.NewFloat(.1)). diff --git a/integration-tests/smoke/vrf_test.go b/integration-tests/smoke/vrf_test.go index f5aeb86173b..6c27daffcca 100644 --- a/integration-tests/smoke/vrf_test.go +++ b/integration-tests/smoke/vrf_test.go @@ -12,6 +12,7 @@ import ( "github.com/smartcontractkit/chainlink-testing-framework/logging" "github.com/smartcontractkit/chainlink-testing-framework/utils/testcontext" + "github.com/smartcontractkit/chainlink/integration-tests/actions/vrf/vrfv1" "github.com/smartcontractkit/chainlink/integration-tests/actions" @@ -29,10 +30,13 @@ func TestVRFBasic(t *testing.T) { t.Fatal(err) } + privateNetwork, err := actions.EthereumNetworkConfigFromConfig(l, &config) + require.NoError(t, err, "Error building ethereum network config") + env, err := test_env.NewCLTestEnvBuilder(). WithTestInstance(t). WithTestConfig(&config). - WithGeth(). + WithPrivateEthereumNetwork(privateNetwork). WithCLNodes(1). WithFunding(big.NewFloat(.1)). WithStandardCleanup(). @@ -123,10 +127,13 @@ func TestVRFJobReplacement(t *testing.T) { t.Fatal(err) } + privateNetwork, err := actions.EthereumNetworkConfigFromConfig(l, &config) + require.NoError(t, err, "Error building ethereum network config") + env, err := test_env.NewCLTestEnvBuilder(). WithTestInstance(t). WithTestConfig(&config). - WithGeth(). + WithPrivateEthereumNetwork(privateNetwork). WithCLNodes(1). WithFunding(big.NewFloat(.1)). WithStandardCleanup(). diff --git a/integration-tests/smoke/vrfv2_test.go b/integration-tests/smoke/vrfv2_test.go index 18a28c6ecbb..57f88346614 100644 --- a/integration-tests/smoke/vrfv2_test.go +++ b/integration-tests/smoke/vrfv2_test.go @@ -296,11 +296,14 @@ func TestVRFv2Basic(t *testing.T) { subscriptionCanceledEvent, err := vrfv2Contracts.CoordinatorV2.WaitForSubscriptionCanceledEvent([]uint64{subIDForCancelling}, time.Second*30) require.NoError(t, err, "error waiting for subscription canceled event") - cancellationTxReceipt, err := env.EVMClient.GetTxReceipt(tx.Hash()) require.NoError(t, err, "error getting tx cancellation Tx Receipt") txGasUsed := new(big.Int).SetUint64(cancellationTxReceipt.GasUsed) + // we don't have that information for older Geth versions + if cancellationTxReceipt.EffectiveGasPrice == nil { + cancellationTxReceipt.EffectiveGasPrice = new(big.Int).SetUint64(0) + } cancellationTxFeeWei := new(big.Int).Mul(txGasUsed, cancellationTxReceipt.EffectiveGasPrice) l.Info(). @@ -408,6 +411,10 @@ func TestVRFv2Basic(t *testing.T) { require.NoError(t, err, "error getting tx cancellation Tx Receipt") txGasUsed := new(big.Int).SetUint64(cancellationTxReceipt.GasUsed) + // we don't have that information for older Geth versions + if cancellationTxReceipt.EffectiveGasPrice == nil { + cancellationTxReceipt.EffectiveGasPrice = new(big.Int).SetUint64(0) + } cancellationTxFeeWei := new(big.Int).Mul(txGasUsed, cancellationTxReceipt.EffectiveGasPrice) l.Info(). diff --git a/integration-tests/smoke/vrfv2plus_test.go b/integration-tests/smoke/vrfv2plus_test.go index 4241ec67d8c..f7ef5170c84 100644 --- a/integration-tests/smoke/vrfv2plus_test.go +++ b/integration-tests/smoke/vrfv2plus_test.go @@ -14,12 +14,14 @@ import ( "github.com/onsi/gomega" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-testing-framework/blockchain" "github.com/smartcontractkit/chainlink-testing-framework/logging" "github.com/smartcontractkit/chainlink-testing-framework/utils/ptr" "github.com/smartcontractkit/chainlink-testing-framework/utils/testcontext" vrfcommon "github.com/smartcontractkit/chainlink/integration-tests/actions/vrf/common" "github.com/smartcontractkit/chainlink/integration-tests/actions/vrf/vrfv2plus" "github.com/smartcontractkit/chainlink/integration-tests/client" + "github.com/smartcontractkit/chainlink/integration-tests/contracts" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/blockhash_store" "github.com/smartcontractkit/chainlink/integration-tests/actions" @@ -97,12 +99,7 @@ func TestVRFv2Plus(t *testing.T) { vrfv2PlusData, subID, isNativeBilling, - *configCopy.VRFv2Plus.General.MinimumConfirmations, - *configCopy.VRFv2Plus.General.CallbackGasLimit, - *configCopy.VRFv2Plus.General.NumberOfWords, - *configCopy.VRFv2Plus.General.RandomnessRequestCountPerRequest, - *configCopy.VRFv2Plus.General.RandomnessRequestCountPerRequestDeviation, - configCopy.VRFv2Plus.General.RandomWordsFulfilledEventTimeout.Duration, + configCopy.VRFv2Plus.General, l, ) require.NoError(t, err, "error requesting randomness and waiting for fulfilment") @@ -148,12 +145,7 @@ func TestVRFv2Plus(t *testing.T) { vrfv2PlusData, subID, isNativeBilling, - *configCopy.VRFv2Plus.General.MinimumConfirmations, - *configCopy.VRFv2Plus.General.CallbackGasLimit, - *configCopy.VRFv2Plus.General.NumberOfWords, - *configCopy.VRFv2Plus.General.RandomnessRequestCountPerRequest, - *configCopy.VRFv2Plus.General.RandomnessRequestCountPerRequestDeviation, - configCopy.VRFv2Plus.General.RandomWordsFulfilledEventTimeout.Duration, + configCopy.VRFv2Plus.General, l, ) require.NoError(t, err, "error requesting randomness and waiting for fulfilment") @@ -212,12 +204,7 @@ func TestVRFv2Plus(t *testing.T) { vrfv2PlusData, wrapperSubID, isNativeBilling, - *configCopy.VRFv2Plus.General.MinimumConfirmations, - *configCopy.VRFv2Plus.General.CallbackGasLimit, - *configCopy.VRFv2Plus.General.NumberOfWords, - *configCopy.VRFv2Plus.General.RandomnessRequestCountPerRequest, - *configCopy.VRFv2Plus.General.RandomnessRequestCountPerRequestDeviation, - configCopy.VRFv2Plus.General.RandomWordsFulfilledEventTimeout.Duration, + configCopy.VRFv2Plus.General, l, ) require.NoError(t, err, "error requesting randomness and waiting for fulfilment") @@ -266,12 +253,7 @@ func TestVRFv2Plus(t *testing.T) { vrfv2PlusData, wrapperSubID, isNativeBilling, - *configCopy.VRFv2Plus.General.MinimumConfirmations, - *configCopy.VRFv2Plus.General.CallbackGasLimit, - *configCopy.VRFv2Plus.General.NumberOfWords, - *configCopy.VRFv2Plus.General.RandomnessRequestCountPerRequest, - *configCopy.VRFv2Plus.General.RandomnessRequestCountPerRequestDeviation, - configCopy.VRFv2Plus.General.RandomWordsFulfilledEventTimeout.Duration, + configCopy.VRFv2Plus.General, l, ) require.NoError(t, err, "error requesting randomness and waiting for fulfilment") @@ -347,6 +329,10 @@ func TestVRFv2Plus(t *testing.T) { require.NoError(t, err, "error getting tx cancellation Tx Receipt") txGasUsed := new(big.Int).SetUint64(cancellationTxReceipt.GasUsed) + // we don't have that information for older Geth versions + if cancellationTxReceipt.EffectiveGasPrice == nil { + cancellationTxReceipt.EffectiveGasPrice = new(big.Int).SetUint64(0) + } cancellationTxFeeWei := new(big.Int).Mul(txGasUsed, cancellationTxReceipt.EffectiveGasPrice) l.Info(). @@ -431,19 +417,14 @@ func TestVRFv2Plus(t *testing.T) { require.NoError(t, err) require.False(t, pendingRequestsExist, "Pending requests should not exist") - randomWordsFulfilledEventTimeout := 5 * time.Second + configCopy.VRFv2Plus.General.RandomWordsFulfilledEventTimeout = ptr.Ptr(blockchain.StrDuration{Duration: 5 * time.Second}) _, err = vrfv2plus.RequestRandomnessAndWaitForFulfillment( vrfv2PlusContracts.VRFV2PlusConsumer[0], vrfv2PlusContracts.CoordinatorV2Plus, vrfv2PlusData, subIDForCancelling, false, - *configCopy.VRFv2Plus.General.MinimumConfirmations, - *configCopy.VRFv2Plus.General.CallbackGasLimit, - *configCopy.VRFv2Plus.General.NumberOfWords, - *configCopy.VRFv2Plus.General.RandomnessRequestCountPerRequest, - *configCopy.VRFv2Plus.General.RandomnessRequestCountPerRequestDeviation, - randomWordsFulfilledEventTimeout, + configCopy.VRFv2Plus.General, l, ) @@ -455,12 +436,7 @@ func TestVRFv2Plus(t *testing.T) { vrfv2PlusData, subIDForCancelling, true, - *configCopy.VRFv2Plus.General.MinimumConfirmations, - *configCopy.VRFv2Plus.General.CallbackGasLimit, - *configCopy.VRFv2Plus.General.NumberOfWords, - *configCopy.VRFv2Plus.General.RandomnessRequestCountPerRequest, - *configCopy.VRFv2Plus.General.RandomnessRequestCountPerRequestDeviation, - randomWordsFulfilledEventTimeout, + configCopy.VRFv2Plus.General, l, ) @@ -497,6 +473,10 @@ func TestVRFv2Plus(t *testing.T) { require.NoError(t, err, "error getting tx cancellation Tx Receipt") txGasUsed := new(big.Int).SetUint64(cancellationTxReceipt.GasUsed) + // we don't have that information for older Geth versions + if cancellationTxReceipt.EffectiveGasPrice == nil { + cancellationTxReceipt.EffectiveGasPrice = new(big.Int).SetUint64(0) + } cancellationTxFeeWei := new(big.Int).Mul(txGasUsed, cancellationTxReceipt.EffectiveGasPrice) l.Info(). @@ -579,12 +559,7 @@ func TestVRFv2Plus(t *testing.T) { vrfv2PlusData, subIDForWithdraw, false, - *configCopy.VRFv2Plus.General.MinimumConfirmations, - *configCopy.VRFv2Plus.General.CallbackGasLimit, - *configCopy.VRFv2Plus.General.NumberOfWords, - *configCopy.VRFv2Plus.General.RandomnessRequestCountPerRequest, - *configCopy.VRFv2Plus.General.RandomnessRequestCountPerRequestDeviation, - configCopy.VRFv2Plus.General.RandomWordsFulfilledEventTimeout.Duration, + configCopy.VRFv2Plus.General, l, ) require.NoError(t, err) @@ -595,12 +570,7 @@ func TestVRFv2Plus(t *testing.T) { vrfv2PlusData, subIDForWithdraw, true, - *configCopy.VRFv2Plus.General.MinimumConfirmations, - *configCopy.VRFv2Plus.General.CallbackGasLimit, - *configCopy.VRFv2Plus.General.NumberOfWords, - *configCopy.VRFv2Plus.General.RandomnessRequestCountPerRequest, - *configCopy.VRFv2Plus.General.RandomnessRequestCountPerRequestDeviation, - configCopy.VRFv2Plus.General.RandomWordsFulfilledEventTimeout.Duration, + configCopy.VRFv2Plus.General, l, ) require.NoError(t, err) @@ -715,12 +685,7 @@ func TestVRFv2PlusMultipleSendingKeys(t *testing.T) { vrfv2PlusData, subID, isNativeBilling, - *configCopy.VRFv2Plus.General.MinimumConfirmations, - *configCopy.VRFv2Plus.General.CallbackGasLimit, - *configCopy.VRFv2Plus.General.NumberOfWords, - *configCopy.VRFv2Plus.General.RandomnessRequestCountPerRequest, - *configCopy.VRFv2Plus.General.RandomnessRequestCountPerRequestDeviation, - configCopy.VRFv2Plus.General.RandomWordsFulfilledEventTimeout.Duration, + configCopy.VRFv2Plus.General, l, ) require.NoError(t, err, "error requesting randomness and waiting for fulfilment") @@ -903,7 +868,7 @@ func TestVRFv2PlusMigration(t *testing.T) { //Verify old and migrated subs require.Equal(t, oldSubscriptionBeforeMigration.NativeBalance, migratedSubscription.NativeBalance) require.Equal(t, oldSubscriptionBeforeMigration.Balance, migratedSubscription.Balance) - require.Equal(t, oldSubscriptionBeforeMigration.Owner, migratedSubscription.Owner) + require.Equal(t, oldSubscriptionBeforeMigration.SubOwner, migratedSubscription.SubOwner) require.Equal(t, oldSubscriptionBeforeMigration.Consumers, migratedSubscription.Consumers) //Verify that old sub was deleted from old Coordinator @@ -937,12 +902,7 @@ func TestVRFv2PlusMigration(t *testing.T) { vrfv2PlusData, subID, false, - *config.VRFv2Plus.General.MinimumConfirmations, - *config.VRFv2Plus.General.CallbackGasLimit, - *config.VRFv2Plus.General.NumberOfWords, - *config.VRFv2Plus.General.RandomnessRequestCountPerRequest, - *config.VRFv2Plus.General.RandomnessRequestCountPerRequestDeviation, - config.VRFv2Plus.General.RandomWordsFulfilledEventTimeout.Duration, + config.VRFv2Plus.General, l, ) require.NoError(t, err, "error requesting randomness and waiting for fulfilment") @@ -954,12 +914,7 @@ func TestVRFv2PlusMigration(t *testing.T) { vrfv2PlusData, subID, true, - *config.VRFv2Plus.General.MinimumConfirmations, - *config.VRFv2Plus.General.CallbackGasLimit, - *config.VRFv2Plus.General.NumberOfWords, - *config.VRFv2Plus.General.RandomnessRequestCountPerRequest, - *config.VRFv2Plus.General.RandomnessRequestCountPerRequestDeviation, - config.VRFv2Plus.General.RandomWordsFulfilledEventTimeout.Duration, + config.VRFv2Plus.General, l, ) require.NoError(t, err, "error requesting randomness and waiting for fulfilment") @@ -1094,7 +1049,7 @@ func TestVRFv2PlusMigration(t *testing.T) { //Verify old and migrated subs require.Equal(t, oldSubscriptionBeforeMigration.NativeBalance, migratedSubscription.NativeBalance) require.Equal(t, oldSubscriptionBeforeMigration.Balance, migratedSubscription.Balance) - require.Equal(t, oldSubscriptionBeforeMigration.Owner, migratedSubscription.Owner) + require.Equal(t, oldSubscriptionBeforeMigration.SubOwner, migratedSubscription.SubOwner) require.Equal(t, oldSubscriptionBeforeMigration.Consumers, migratedSubscription.Consumers) //Verify that old sub was deleted from old Coordinator @@ -1129,12 +1084,7 @@ func TestVRFv2PlusMigration(t *testing.T) { vrfv2PlusData, subID, isNativeBilling, - *configCopy.VRFv2Plus.General.MinimumConfirmations, - *configCopy.VRFv2Plus.General.CallbackGasLimit, - *configCopy.VRFv2Plus.General.NumberOfWords, - *configCopy.VRFv2Plus.General.RandomnessRequestCountPerRequest, - *configCopy.VRFv2Plus.General.RandomnessRequestCountPerRequestDeviation, - configCopy.VRFv2Plus.General.RandomWordsFulfilledEventTimeout.Duration, + configCopy.VRFv2Plus.General, l, ) require.NoError(t, err, "error requesting randomness and waiting for fulfilment") @@ -1150,12 +1100,7 @@ func TestVRFv2PlusMigration(t *testing.T) { vrfv2PlusData, subID, isNativeBilling, - *configCopy.VRFv2Plus.General.MinimumConfirmations, - *configCopy.VRFv2Plus.General.CallbackGasLimit, - *configCopy.VRFv2Plus.General.NumberOfWords, - *configCopy.VRFv2Plus.General.RandomnessRequestCountPerRequest, - *configCopy.VRFv2Plus.General.RandomnessRequestCountPerRequestDeviation, - configCopy.VRFv2Plus.General.RandomWordsFulfilledEventTimeout.Duration, + configCopy.VRFv2Plus.General, l, ) require.NoError(t, err, "error requesting randomness and waiting for fulfilment") @@ -1364,6 +1309,202 @@ func TestVRFV2PlusWithBHS(t *testing.T) { }) } +func TestVRFv2PlusReplayAfterTimeout(t *testing.T) { + t.Parallel() + l := logging.GetTestLogger(t) + + config, err := tc.GetConfig("Smoke", tc.VRFv2Plus) + if err != nil { + t.Fatal(err) + } + + network, err := actions.EthereumNetworkConfigFromConfig(l, &config) + require.NoError(t, err, "Error building ethereum network config") + + env, err := test_env.NewCLTestEnvBuilder(). + WithTestInstance(t). + WithTestConfig(&config). + WithPrivateEthereumNetwork(network). + WithCLNodes(1). + WithFunding(big.NewFloat(*config.Common.ChainlinkNodeFunding)). + WithStandardCleanup(). + Build() + require.NoError(t, err, "error creating test env") + + env.ParallelTransactions(true) + + mockETHLinkFeed, err := actions.DeployMockETHLinkFeed(env.ContractDeployer, big.NewInt(*config.VRFv2Plus.General.LinkNativeFeedResponse)) + require.NoError(t, err, "error deploying mock ETH/LINK feed") + + linkToken, err := actions.DeployLINKToken(env.ContractDeployer) + require.NoError(t, err, "error deploying LINK contract") + + // 1. Add job spec with requestTimeout = 5 seconds + timeout := time.Duration(time.Second * 5) + numberOfTxKeysToCreate := 0 + config.VRFv2Plus.General.VRFJobRequestTimeout = ptr.Ptr(blockchain.StrDuration{Duration: timeout}) + config.VRFv2Plus.General.SubscriptionFundingAmountLink = ptr.Ptr(float64(0)) + config.VRFv2Plus.General.SubscriptionFundingAmountNative = ptr.Ptr(float64(0)) + vrfv2PlusContracts, subIDs, vrfv2PlusData, nodesMap, err := vrfv2plus.SetupVRFV2_5Environment( + env, + []vrfcommon.VRFNodeType{vrfcommon.VRF}, + &config, + linkToken, + mockETHLinkFeed, + numberOfTxKeysToCreate, + 2, + 1, + l, + ) + require.NoError(t, err, "error setting up VRF v2_5 env") + + subID := subIDs[0] + + subscription, err := vrfv2PlusContracts.CoordinatorV2Plus.GetSubscription(testcontext.Get(t), subID) + require.NoError(t, err, "error getting subscription information") + + vrfv2plus.LogSubDetails(l, subscription, subID, vrfv2PlusContracts.CoordinatorV2Plus) + + t.Run("Timed out request fulfilled after node restart with replay", func(t *testing.T) { + configCopy := config.MustCopy().(tc.TestConfig) + var isNativeBilling = false + + // 2. create request but without fulfilment - e.g. simulation failure (insufficient balance in the sub, ) + vrfv2plus.LogRandRequest( + l, + vrfv2PlusContracts.VRFV2PlusConsumer[0].Address(), + vrfv2PlusContracts.CoordinatorV2Plus.Address(), + subID, + isNativeBilling, + vrfv2PlusData.KeyHash, + configCopy.VRFv2Plus.General, + ) + _, err = vrfv2PlusContracts.VRFV2PlusConsumer[0].RequestRandomness( + vrfv2PlusData.KeyHash, + subID, + *configCopy.VRFv2Plus.General.MinimumConfirmations, + *configCopy.VRFv2Plus.General.CallbackGasLimit, + isNativeBilling, + *configCopy.VRFv2Plus.General.NumberOfWords, + *configCopy.VRFv2Plus.General.RandomnessRequestCountPerRequest, + ) + require.NoError(t, err, "error requesting randomness") + initialReqRandomWordsRequestedEvent, err := vrfv2PlusContracts.CoordinatorV2Plus.WaitForRandomWordsRequestedEvent( + [][32]byte{vrfv2PlusData.KeyHash}, + []*big.Int{subID}, + []common.Address{common.HexToAddress(vrfv2PlusContracts.VRFV2PlusConsumer[0].Address())}, + time.Minute*1, + ) + require.NoError(t, err, "error waiting for initial request RandomWordsRequestedEvent") + + // 3. create new request in a subscription with balance and wait for fulfilment + // TODO: We need this to be parametrized, since these tests will be run on live testnets as well. + fundingLinkAmt := big.NewFloat(5) + fundingNativeAmt := big.NewFloat(0.1) + l.Info(). + Str("Coordinator", vrfv2PlusContracts.CoordinatorV2Plus.Address()). + Int("Number of Subs to create", 1). + Msg("Creating and funding subscriptions, adding consumers") + fundedSubIDs, err := vrfv2plus.CreateFundSubsAndAddConsumers( + env, + fundingLinkAmt, + fundingNativeAmt, + linkToken, + vrfv2PlusContracts.CoordinatorV2Plus, + []contracts.VRFv2PlusLoadTestConsumer{vrfv2PlusContracts.VRFV2PlusConsumer[1]}, + 1, + ) + require.NoError(t, err, "error creating funded sub in replay test") + randomWordsFulfilledEvent, err := vrfv2plus.RequestRandomnessAndWaitForFulfillment( + vrfv2PlusContracts.VRFV2PlusConsumer[1], + vrfv2PlusContracts.CoordinatorV2Plus, + vrfv2PlusData, + fundedSubIDs[0], + isNativeBilling, + configCopy.VRFv2Plus.General, + l, + ) + require.NoError(t, err, "error requesting randomness and waiting for fulfilment") + require.True(t, randomWordsFulfilledEvent.Success, "RandomWordsFulfilled Event's `Success` field should be true") + + // 4. wait for the request timeout (1s more) duration + time.Sleep(timeout + 1*time.Second) + + // 5. fund sub so that node can fulfill request + err = vrfv2plus.FundSubscriptions( + env, + fundingLinkAmt, + fundingNativeAmt, + linkToken, + vrfv2PlusContracts.CoordinatorV2Plus, + []*big.Int{subID}, + ) + require.NoError(t, err, "error funding subs after request timeout") + + // 6. no fulfilment should happen since timeout+1 seconds passed in the job + pendingReqExists, err := vrfv2PlusContracts.CoordinatorV2Plus.PendingRequestsExist(testcontext.Get(t), subID) + require.NoError(t, err, "error fetching PendingRequestsExist from coordinator") + require.True(t, pendingReqExists, "pendingRequest must exist since subID was underfunded till request timeout") + + // 7. remove job and add new job with requestTimeout = 1 hour + vrfNode, exists := nodesMap[vrfcommon.VRF] + require.True(t, exists, "VRF Node does not exist") + resp, err := vrfNode.CLNode.API.DeleteJob(vrfNode.Job.Data.ID) + require.NoError(t, err, "error deleting job after timeout") + require.Equal(t, resp.StatusCode, 204) + + chainID := env.EVMClient.GetChainID() + config.VRFv2Plus.General.VRFJobRequestTimeout = ptr.Ptr(blockchain.StrDuration{Duration: time.Duration(time.Hour * 1)}) + vrfJobSpecConfig := vrfcommon.VRFJobSpecConfig{ + ForwardingAllowed: *config.VRFv2Plus.General.VRFJobForwardingAllowed, + CoordinatorAddress: vrfv2PlusContracts.CoordinatorV2Plus.Address(), + FromAddresses: vrfNode.TXKeyAddressStrings, + EVMChainID: chainID.String(), + MinIncomingConfirmations: int(*config.VRFv2Plus.General.MinimumConfirmations), + PublicKey: vrfv2PlusData.PubKeyCompressed, + EstimateGasMultiplier: *config.VRFv2Plus.General.VRFJobEstimateGasMultiplier, + BatchFulfillmentEnabled: *config.VRFv2Plus.General.VRFJobBatchFulfillmentEnabled, + BatchFulfillmentGasMultiplier: *config.VRFv2Plus.General.VRFJobBatchFulfillmentGasMultiplier, + PollPeriod: config.VRFv2Plus.General.VRFJobPollPeriod.Duration, + RequestTimeout: config.VRFv2Plus.General.VRFJobRequestTimeout.Duration, + SimulationBlock: config.VRFv2Plus.General.VRFJobSimulationBlock, + VRFOwnerConfig: nil, + } + + go func() { + l.Info().Msg("Creating VRFV2 Plus Job with higher timeout (1hr)") + job, err := vrfv2plus.CreateVRFV2PlusJob( + vrfNode.CLNode.API, + vrfJobSpecConfig, + ) + require.NoError(t, err, "error creating job with higher timeout") + vrfNode.Job = job + }() + + // 8. Check if initial req in underfunded sub is fulfilled now, since it has been topped up and timeout increased + l.Info().Str("reqID", initialReqRandomWordsRequestedEvent.RequestId.String()). + Str("subID", subID.String()). + Msg("Waiting for initalReqRandomWordsFulfilledEvent") + initalReqRandomWordsFulfilledEvent, err := vrfv2PlusContracts.CoordinatorV2Plus.WaitForRandomWordsFulfilledEvent( + []*big.Int{subID}, + []*big.Int{initialReqRandomWordsRequestedEvent.RequestId}, + configCopy.VRFv2Plus.General.RandomWordsFulfilledEventTimeout.Duration, + ) + require.NoError(t, err, "error waiting for initial request RandomWordsFulfilledEvent") + + require.NoError(t, err, "error waiting for fulfilment of old req") + require.False(t, initalReqRandomWordsFulfilledEvent.OnlyPremium, "RandomWordsFulfilled Event's `OnlyPremium` field should be false") + require.Equal(t, isNativeBilling, initalReqRandomWordsFulfilledEvent.NativePayment, "RandomWordsFulfilled Event's `NativePayment` field should be false") + require.True(t, initalReqRandomWordsFulfilledEvent.Success, "RandomWordsFulfilled Event's `Success` field should be true") + + // Get request status + status, err := vrfv2PlusContracts.VRFV2PlusConsumer[0].GetRequestStatus(testcontext.Get(t), initalReqRandomWordsFulfilledEvent.RequestId) + require.NoError(t, err, "error getting rand request status") + require.True(t, status.Fulfilled) + l.Info().Bool("Fulfilment Status", status.Fulfilled).Msg("Random Words Request Fulfilment Status") + }) +} + func TestVRFv2PlusPendingBlockSimulationAndZeroConfirmationDelays(t *testing.T) { t.Parallel() l := logging.GetTestLogger(t) @@ -1433,12 +1574,7 @@ func TestVRFv2PlusPendingBlockSimulationAndZeroConfirmationDelays(t *testing.T) vrfv2PlusData, subID, isNativeBilling, - *config.VRFv2Plus.General.MinimumConfirmations, - *config.VRFv2Plus.General.CallbackGasLimit, - *config.VRFv2Plus.General.NumberOfWords, - *config.VRFv2Plus.General.RandomnessRequestCountPerRequest, - *config.VRFv2Plus.General.RandomnessRequestCountPerRequestDeviation, - config.VRFv2Plus.General.RandomWordsFulfilledEventTimeout.Duration, + config.VRFv2Plus.General, l, ) require.NoError(t, err, "error requesting randomness and waiting for fulfilment") diff --git a/integration-tests/testconfig/default.toml b/integration-tests/testconfig/default.toml index 34051aff5e8..7e518c1fbf2 100644 --- a/integration-tests/testconfig/default.toml +++ b/integration-tests/testconfig/default.toml @@ -13,7 +13,7 @@ postgres_version="15.6" selected_networks=["simulated"] [PrivateEthereumNetwork] -consensus_type="pow" +ethereum_version="eth1" execution_layer="geth" [PrivateEthereumNetwork.EthereumChainConfig] @@ -24,6 +24,9 @@ validator_count=4 chain_id=1337 addresses_to_fund=["0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266"] +[PrivateEthereumNetwork.EthereumChainConfig.HardForkEpochs] +Deneb=500 + [Seth] # enables automatic tracing of all transactions that are decoded via Decode() method tracing_enabled = false @@ -59,6 +62,7 @@ name = "Fuji" chain_id = "43113" transaction_timeout = "3m" transfer_gas_fee = 21_000 +gas_limit = 8_000_000 # legacy transactions gas_price = 30_000_000_000 # EIP-1559 transactions @@ -73,9 +77,9 @@ transaction_timeout = "3m" transfer_gas_fee = 40_000 gas_limit = 30_000_000 # legacy transactions -gas_price = 20_000_000_000 +gas_price = 50_000_000_000 # EIP-1559 transactions -# eip_1559_dynamic_fees = true2 +# eip_1559_dynamic_fees = true gas_fee_cap = 45_000_000_000 gas_tip_cap = 10_000_000_000 @@ -83,12 +87,13 @@ gas_tip_cap = 10_000_000_000 name = "Mumbai" chain_id = "80001" transaction_timeout = "3m" -transfer_gas_fee = 21_000 +transfer_gas_fee = 40_000 +gas_limit = 6_000_000 # legacy transactions #gas_price = 1_800_000_000 # EIP-1559 transactions eip_1559_dynamic_fees = true -gas_fee_cap = 1_800_000_000 +gas_fee_cap = 3_800_000_000 gas_tip_cap = 1_800_000_000 [[Seth.networks]] @@ -101,5 +106,5 @@ gas_limit = 3_000_000 gas_price = 50_000_000 # EIP-1559 transactions #eip_1559_dynamic_fees = true -gas_fee_cap = 1_800_000_000 +gas_fee_cap = 3_800_000_000 gas_tip_cap = 1_800_000_000 \ No newline at end of file diff --git a/integration-tests/testconfig/log_poller/log_poller.toml b/integration-tests/testconfig/log_poller/log_poller.toml index 89d2f07b4e3..5ead6c91e9c 100644 --- a/integration-tests/testconfig/log_poller/log_poller.toml +++ b/integration-tests/testconfig/log_poller/log_poller.toml @@ -1,3 +1,11 @@ +[PrivateEthereumNetwork] +ethereum_version="eth2" +consensus_layer="prysm" + +[PrivateEthereumNetwork.EthereumChainConfig] +seconds_per_slot=4 +slots_per_epoch=2 + # product defaults [LogPoller] [LogPoller.General] diff --git a/integration-tests/testconfig/testconfig.go b/integration-tests/testconfig/testconfig.go index 7f27ba76700..ee3ce21d3db 100644 --- a/integration-tests/testconfig/testconfig.go +++ b/integration-tests/testconfig/testconfig.go @@ -304,12 +304,7 @@ func GetConfig(configurationName string, product Product) (TestConfig, error) { case Automation: return handleAutomationConfigOverride(logger, filename, configurationName, target, content) default: - err := ctf_config.BytesToAnyTomlStruct(logger, filename, configurationName, &testConfig, content) - if err != nil { - return errors.Wrapf(err, "error reading file %s", filename) - } - - return nil + return handleDefaultConfigOverride(logger, filename, configurationName, target, content) } } @@ -570,3 +565,53 @@ func handleAutomationConfigOverride(logger zerolog.Logger, filename, configurati return nil } + +func handleDefaultConfigOverride(logger zerolog.Logger, filename, configurationName string, target *TestConfig, content []byte) error { + logger.Debug().Msgf("Handling default config override for %s", filename) + oldConfig := MustCopy(target) + newConfig := TestConfig{} + + err := ctf_config.BytesToAnyTomlStruct(logger, filename, configurationName, &target, content) + if err != nil { + return errors.Wrapf(err, "error reading file %s", filename) + } + + err = ctf_config.BytesToAnyTomlStruct(logger, filename, configurationName, &newConfig, content) + if err != nil { + return errors.Wrapf(err, "error reading file %s", filename) + } + + // temporary fix for Duration not being correctly copied + if oldConfig != nil && oldConfig.Seth != nil && oldConfig.Seth.Networks != nil { + for i, old_network := range oldConfig.Seth.Networks { + for _, target_network := range target.Seth.Networks { + if old_network.ChainID == target_network.ChainID { + oldConfig.Seth.Networks[i].TxnTimeout = target_network.TxnTimeout + } + } + } + } + + // override instead of merging + if (newConfig.Seth != nil && len(newConfig.Seth.Networks) > 0) && (oldConfig != nil && oldConfig.Seth != nil && len(oldConfig.Seth.Networks) > 0) { + networksToUse := map[string]*seth.Network{} + for i, old_network := range oldConfig.Seth.Networks { + for _, new_network := range newConfig.Seth.Networks { + if old_network.ChainID == new_network.ChainID { + oldConfig.Seth.Networks[i] = new_network + break + } + if _, ok := networksToUse[new_network.ChainID]; !ok { + networksToUse[new_network.ChainID] = new_network + } + } + networksToUse[old_network.ChainID] = oldConfig.Seth.Networks[i] + } + target.Seth.Networks = []*seth.Network{} + for _, network := range networksToUse { + target.Seth.Networks = append(target.Seth.Networks, network) + } + } + + return nil +} diff --git a/integration-tests/testsetups/keeper_benchmark.go b/integration-tests/testsetups/keeper_benchmark.go index 4be6eb9c59c..61a20ee9cd8 100644 --- a/integration-tests/testsetups/keeper_benchmark.go +++ b/integration-tests/testsetups/keeper_benchmark.go @@ -246,20 +246,26 @@ func (k *KeeperBenchmarkTest) Run() { if inputs.ForceSingleTxnKey { txKeyId = 0 } + kr := k.keeperRegistries[rIndex] ocrConfig, err := actions.BuildAutoOCR2ConfigVarsWithKeyIndex( - k.t, nodesWithoutBootstrap, *inputs.KeeperRegistrySettings, k.keeperRegistrars[rIndex].Address(), k.Inputs.DeltaStage, txKeyId, common.Address{}, k.keeperRegistries[rIndex].ChainModuleAddress(), k.keeperRegistries[rIndex].ReorgProtectionEnabled(), + k.t, nodesWithoutBootstrap, *inputs.KeeperRegistrySettings, kr.Address(), k.Inputs.DeltaStage, txKeyId, common.Address{}, kr.ChainModuleAddress(), kr.ReorgProtectionEnabled(), ) require.NoError(k.t, err, "Building OCR config shouldn't fail") + rv := inputs.RegistryVersions[rIndex] // Send keeper jobs to registry and chainlink nodes - if inputs.RegistryVersions[rIndex] == ethereum.RegistryVersion_2_0 || inputs.RegistryVersions[rIndex] == ethereum.RegistryVersion_2_1 || inputs.RegistryVersions[rIndex] == ethereum.RegistryVersion_2_2 { - actions.CreateOCRKeeperJobs(k.t, k.chainlinkNodes, k.keeperRegistries[rIndex].Address(), k.chainClient.GetChainID().Int64(), txKeyId, inputs.RegistryVersions[rIndex]) - err = k.keeperRegistries[rIndex].SetConfig(*inputs.KeeperRegistrySettings, ocrConfig) + if rv == ethereum.RegistryVersion_2_0 || rv == ethereum.RegistryVersion_2_1 || rv == ethereum.RegistryVersion_2_2 { + actions.CreateOCRKeeperJobs(k.t, k.chainlinkNodes, kr.Address(), k.chainClient.GetChainID().Int64(), txKeyId, rv) + if rv == ethereum.RegistryVersion_2_0 { + err = kr.SetConfig(*inputs.KeeperRegistrySettings, ocrConfig) + } else { + err = kr.SetConfigTypeSafe(ocrConfig) + } require.NoError(k.t, err, "Registry config should be be set successfully") // Give time for OCR nodes to bootstrap time.Sleep(1 * time.Minute) } else { - actions.CreateKeeperJobsWithKeyIndex(k.t, k.chainlinkNodes, k.keeperRegistries[rIndex], txKeyId, ocrConfig, k.chainClient.GetChainID().String()) + actions.CreateKeeperJobsWithKeyIndex(k.t, k.chainlinkNodes, kr, txKeyId, ocrConfig, k.chainClient.GetChainID().String()) } err = k.chainClient.WaitForEvents() require.NoError(k.t, err, "Error waiting for registry setConfig") @@ -657,7 +663,11 @@ func (k *KeeperBenchmarkTest) DeployBenchmarkKeeperContracts(index int) { ocrConfig, err := actions.BuildAutoOCR2ConfigVars(k.t, k.chainlinkNodes[1:], *k.Inputs.KeeperRegistrySettings, registrar.Address(), k.Inputs.DeltaStage, registry.ChainModuleAddress(), registry.ReorgProtectionEnabled()) k.log.Debug().Interface("KeeperRegistrySettings", *k.Inputs.KeeperRegistrySettings).Interface("OCRConfig", ocrConfig).Msg("Config") require.NoError(k.t, err, "Error building OCR config vars") - err = registry.SetConfig(*k.Inputs.KeeperRegistrySettings, ocrConfig) + if registryVersion == ethereum.RegistryVersion_2_0 { + err = registry.SetConfig(*k.Inputs.KeeperRegistrySettings, ocrConfig) + } else { + err = registry.SetConfigTypeSafe(ocrConfig) + } require.NoError(k.t, err, "Registry config should be be set successfully") } diff --git a/integration-tests/testsetups/ocr.go b/integration-tests/testsetups/ocr.go index f3a7a77e8cf..14e337a43b2 100644 --- a/integration-tests/testsetups/ocr.go +++ b/integration-tests/testsetups/ocr.go @@ -171,6 +171,8 @@ func (o *OCRSoakTest) Setup(ocrTestConfig tt.OcrTestConfig) { require.NotNil(o.t, readSethCfg, "Seth config shouldn't be nil") sethCfg := utils.MergeSethAndEvmNetworkConfigs(o.log, network, *readSethCfg) + err = utils.ValidateSethNetworkConfig(sethCfg.Network) + require.NoError(o.t, err, "Error validating seth network config") seth, err := seth.NewClientWithConfig(&sethCfg) require.NoError(o.t, err, "Error creating seth client") diff --git a/integration-tests/types/config/node/core.go b/integration-tests/types/config/node/core.go index 3508f77555f..23efdf13a8b 100644 --- a/integration-tests/types/config/node/core.go +++ b/integration-tests/types/config/node/core.go @@ -18,10 +18,10 @@ import ( it_utils "github.com/smartcontractkit/chainlink/integration-tests/utils" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/assets" evmcfg "github.com/smartcontractkit/chainlink/v2/core/chains/evm/config/toml" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" ubig "github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils/big" "github.com/smartcontractkit/chainlink/v2/core/config/toml" "github.com/smartcontractkit/chainlink/v2/core/services/chainlink" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ethkey" "github.com/smartcontractkit/chainlink/v2/core/utils" ) @@ -188,7 +188,7 @@ func WithPrivateEVMs(networks []blockchain.EVMNetwork) NodeConfigOpt { HistoryDepth: ptr.Ptr(uint32(100)), }, GasEstimator: evmcfg.GasEstimator{ - LimitDefault: ptr.Ptr(uint32(6000000)), + LimitDefault: ptr.Ptr(uint64(6000000)), PriceMax: assets.GWei(200), FeeCapDefault: assets.GWei(200), }, @@ -214,7 +214,7 @@ func WithVRFv2EVMEstimator(addresses []string, maxGasPriceGWei int64) NodeConfig var keySpecicifArr []evmcfg.KeySpecific for _, addr := range addresses { keySpecicifArr = append(keySpecicifArr, evmcfg.KeySpecific{ - Key: ptr.Ptr(ethkey.EIP55Address(addr)), + Key: ptr.Ptr(types.EIP55Address(addr)), GasEstimator: evmcfg.KeySpecificGasEstimator{ PriceMax: est, }, @@ -223,7 +223,7 @@ func WithVRFv2EVMEstimator(addresses []string, maxGasPriceGWei int64) NodeConfig return func(c *chainlink.Config) { c.EVM[0].KeySpecific = keySpecicifArr c.EVM[0].Chain.GasEstimator = evmcfg.GasEstimator{ - LimitDefault: ptr.Ptr[uint32](3500000), + LimitDefault: ptr.Ptr[uint64](3500000), } c.EVM[0].Chain.Transactions = evmcfg.Transactions{ MaxQueued: ptr.Ptr[uint32](10000), diff --git a/integration-tests/universal/log_poller/helpers.go b/integration-tests/universal/log_poller/helpers.go index b6e62cff2f6..976a9f40fd8 100644 --- a/integration-tests/universal/log_poller/helpers.go +++ b/integration-tests/universal/log_poller/helpers.go @@ -37,30 +37,28 @@ import ( "github.com/smartcontractkit/chainlink/integration-tests/contracts" "github.com/smartcontractkit/chainlink/integration-tests/contracts/ethereum" "github.com/smartcontractkit/chainlink/integration-tests/docker/test_env" + tc "github.com/smartcontractkit/chainlink/integration-tests/testconfig" + lp_config "github.com/smartcontractkit/chainlink/integration-tests/testconfig/log_poller" "github.com/smartcontractkit/chainlink/integration-tests/types/config/node" evmcfg "github.com/smartcontractkit/chainlink/v2/core/chains/evm/config/toml" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/logpoller" cltypes "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/automation_utils_2_1" + ac "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/automation_compatible_utils" le "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/log_emitter" core_logger "github.com/smartcontractkit/chainlink/v2/core/logger" - "github.com/smartcontractkit/chainlink/v2/core/services/pg" - - tc "github.com/smartcontractkit/chainlink/integration-tests/testconfig" - lp_config "github.com/smartcontractkit/chainlink/integration-tests/testconfig/log_poller" ) var ( - EmitterABI, _ = abi.JSON(strings.NewReader(le.LogEmitterABI)) - automationUtilsABI = cltypes.MustGetABI(automation_utils_2_1.AutomationUtilsABI) - bytes0 = [32]byte{ + EmitterABI, _ = abi.JSON(strings.NewReader(le.LogEmitterABI)) + automatoinConvABI = cltypes.MustGetABI(ac.AutomationCompatibleUtilsABI) + bytes0 = [32]byte{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, } // bytes representation of 0x0000000000000000000000000000000000000000000000000000000000000000 ) var registerSingleTopicFilter = func(registry contracts.KeeperRegistry, upkeepID *big.Int, emitterAddress common.Address, topic common.Hash) error { - logTriggerConfigStruct := automation_utils_2_1.LogTriggerConfig{ + logTriggerConfigStruct := ac.IAutomationV21PlusCommonLogTriggerConfig{ ContractAddress: emitterAddress, FilterSelector: 0, Topic0: topic, @@ -68,7 +66,7 @@ var registerSingleTopicFilter = func(registry contracts.KeeperRegistry, upkeepID Topic2: bytes0, Topic3: bytes0, } - encodedLogTriggerConfig, err := automationUtilsABI.Methods["_logTriggerConfig"].Inputs.Pack(&logTriggerConfigStruct) + encodedLogTriggerConfig, err := automatoinConvABI.Methods["_logTriggerConfig"].Inputs.Pack(&logTriggerConfigStruct) if err != nil { return err } @@ -118,7 +116,7 @@ var registerSingleTopicFilter = func(registry contracts.KeeperRegistry, upkeepID // return err // } -// logTriggerConfigStruct := automation_utils_2_1.LogTriggerConfig{ +// logTriggerConfigStruct := automation_convenience.LogTriggerConfig{ // ContractAddress: emitterAddress, // FilterSelector: filterSelector, // Topic0: getTopic(topics, 0), @@ -126,7 +124,7 @@ var registerSingleTopicFilter = func(registry contracts.KeeperRegistry, upkeepID // Topic2: getTopic(topics, 2), // Topic3: getTopic(topics, 3), // } -// encodedLogTriggerConfig, err := automationUtilsABI.Methods["_logTriggerConfig"].Inputs.Pack(&logTriggerConfigStruct) +// encodedLogTriggerConfig, err := automatoinConvABI.Methods["_logTriggerConfig"].Inputs.Pack(&logTriggerConfigStruct) // if err != nil { // return err // } @@ -139,8 +137,8 @@ var registerSingleTopicFilter = func(registry contracts.KeeperRegistry, upkeepID // return nil // } -// NewOrm returns a new logpoller.DbORM instance -func NewOrm(logger core_logger.SugaredLogger, chainID *big.Int, postgresDb *ctf_test_env.PostgresDb) (*logpoller.DbORM, *sqlx.DB, error) { +// NewORM returns a new logpoller.orm instance +func NewORM(logger core_logger.SugaredLogger, chainID *big.Int, postgresDb *ctf_test_env.PostgresDb) (logpoller.ORM, *sqlx.DB, error) { dsn := fmt.Sprintf("host=%s port=%s user=%s password=%s dbname=%s sslmode=disable", "127.0.0.1", postgresDb.ExternalPort, postgresDb.User, postgresDb.Password, postgresDb.DbName) db, err := sqlx.Open("postgres", dsn) if err != nil { @@ -148,7 +146,7 @@ func NewOrm(logger core_logger.SugaredLogger, chainID *big.Int, postgresDb *ctf_ } db.MapperFunc(reflectx.CamelToSnakeASCII) - return logpoller.NewORM(chainID, db, logger, pg.NewQConfig(false)), db, nil + return logpoller.NewORM(chainID, db, logger), db, nil } type ExpectedFilter struct { @@ -172,14 +170,14 @@ func GetExpectedFilters(logEmitters []*contracts.LogEmitter, cfg *lp_config.Conf } // NodeHasExpectedFilters returns true if the provided node has all the expected filters registered -func NodeHasExpectedFilters(expectedFilters []ExpectedFilter, logger core_logger.SugaredLogger, chainID *big.Int, postgresDb *ctf_test_env.PostgresDb) (bool, string, error) { - orm, db, err := NewOrm(logger, chainID, postgresDb) +func NodeHasExpectedFilters(ctx context.Context, expectedFilters []ExpectedFilter, logger core_logger.SugaredLogger, chainID *big.Int, postgresDb *ctf_test_env.PostgresDb) (bool, string, error) { + orm, db, err := NewORM(logger, chainID, postgresDb) if err != nil { return false, "", err } defer db.Close() - knownFilters, err := orm.LoadFilters() + knownFilters, err := orm.LoadFilters(ctx) if err != nil { return false, "", err } @@ -308,7 +306,7 @@ func LogPollerHasFinalisedEndBlock(endBlock int64, chainID *big.Int, l zerolog.L case <-ctx.Done(): return default: - orm, db, err := NewOrm(coreLogger, chainID, clNode.PostgresDb) + orm, db, err := NewORM(coreLogger, chainID, clNode.PostgresDb) if err != nil { r <- boolQueryResult{ nodeName: clNode.ContainerName, @@ -319,7 +317,7 @@ func LogPollerHasFinalisedEndBlock(endBlock int64, chainID *big.Int, l zerolog.L defer db.Close() - latestBlock, err := orm.SelectLatestBlock() + latestBlock, err := orm.SelectLatestBlock(ctx) if err != nil { r <- boolQueryResult{ nodeName: clNode.ContainerName, @@ -402,7 +400,7 @@ func ClNodesHaveExpectedLogCount(startBlock, endBlock int64, chainID *big.Int, e case <-ctx.Done(): return default: - orm, db, err := NewOrm(coreLogger, chainID, clNode.PostgresDb) + orm, db, err := NewORM(coreLogger, chainID, clNode.PostgresDb) if err != nil { resultChan <- logQueryResult{ nodeName: clNode.ContainerName, @@ -416,7 +414,7 @@ func ClNodesHaveExpectedLogCount(startBlock, endBlock int64, chainID *big.Int, e foundLogsCount := 0 for _, filter := range expectedFilters { - logs, err := orm.SelectLogs(startBlock, endBlock, filter.emitterAddress, filter.topic) + logs, err := orm.SelectLogs(ctx, startBlock, endBlock, filter.emitterAddress, filter.topic) if err != nil { resultChan <- logQueryResult{ nodeName: clNode.ContainerName, @@ -525,7 +523,7 @@ func GetMissingLogs(startBlock, endBlock int64, logEmitters []*contracts.LogEmit nodeName := clnodeCluster.Nodes[i].ContainerName l.Debug().Str("Node name", nodeName).Msg("Fetching log poller logs") - orm, db, err := NewOrm(coreLogger, evmClient.GetChainID(), clnodeCluster.Nodes[i].PostgresDb) + orm, db, err := NewORM(coreLogger, evmClient.GetChainID(), clnodeCluster.Nodes[i].PostgresDb) if err != nil { r <- dbQueryResult{ err: err, @@ -542,7 +540,7 @@ func GetMissingLogs(startBlock, endBlock int64, logEmitters []*contracts.LogEmit for _, event := range cfg.General.EventsToEmit { l.Trace().Str("Event name", event.Name).Str("Emitter address", address.String()).Msg("Fetching single emitter's logs") - result, err := orm.SelectLogs(startBlock, endBlock, address, event.ID) + result, err := orm.SelectLogs(ctx, startBlock, endBlock, address, event.ID) if err != nil { r <- dbQueryResult{ err: err, @@ -596,7 +594,7 @@ func GetMissingLogs(startBlock, endBlock int64, logEmitters []*contracts.LogEmit return nil, dbError } - allLogsInEVMNode, err := getEVMLogs(startBlock, endBlock, logEmitters, evmClient, l, cfg) + allLogsInEVMNode, err := getEVMLogs(ctx, startBlock, endBlock, logEmitters, evmClient, l, cfg) if err != nil { return nil, err } @@ -724,13 +722,13 @@ func PrintMissingLogsInfo(missingLogs map[string][]geth_types.Log, l zerolog.Log // getEVMLogs returns a slice of all logs emitted by the provided log emitters in the provided block range, // which are present in the EVM node to which the provided evm client is connected -func getEVMLogs(startBlock, endBlock int64, logEmitters []*contracts.LogEmitter, evmClient blockchain.EVMClient, l zerolog.Logger, cfg *lp_config.Config) ([]geth_types.Log, error) { +func getEVMLogs(ctx context.Context, startBlock, endBlock int64, logEmitters []*contracts.LogEmitter, evmClient blockchain.EVMClient, l zerolog.Logger, cfg *lp_config.Config) ([]geth_types.Log, error) { allLogsInEVMNode := make([]geth_types.Log, 0) for j := 0; j < len(logEmitters); j++ { address := (*logEmitters[j]).Address() for _, event := range cfg.General.EventsToEmit { l.Debug().Str("Event name", event.Name).Str("Emitter address", address.String()).Msg("Fetching logs from EVM node") - logsInEVMNode, err := evmClient.FilterLogs(context.Background(), geth.FilterQuery{ + logsInEVMNode, err := evmClient.FilterLogs(ctx, geth.FilterQuery{ Addresses: []common.Address{(address)}, Topics: [][]common.Hash{{event.ID}}, FromBlock: big.NewInt(startBlock), @@ -1055,21 +1053,6 @@ var ( MaxCheckDataSize: uint32(5000), MaxPerformDataSize: uint32(5000), } - - automationDefaultRegistryConfig = contracts.KeeperRegistrySettings{ - PaymentPremiumPPB: uint32(200000000), - FlatFeeMicroLINK: uint32(0), - BlockCountPerTurn: big.NewInt(10), - CheckGasLimit: uint32(2500000), - StalenessSeconds: big.NewInt(90000), - GasCeilingMultiplier: uint16(1), - MinUpkeepSpend: big.NewInt(0), - MaxPerformGas: uint32(5000000), - FallbackGasPrice: big.NewInt(2e11), - FallbackLinkPrice: big.NewInt(2e18), - MaxCheckDataSize: uint32(5000), - MaxPerformDataSize: uint32(5000), - } ) // SetupLogPollerTestDocker starts the DON and private Ethereum network @@ -1132,22 +1115,13 @@ func SetupLogPollerTestDocker( return network } - ethBuilder := ctf_test_env.NewEthereumNetworkBuilder() - cfg, err := ethBuilder. - WithConsensusType(ctf_test_env.ConsensusType_PoS). - WithConsensusLayer(ctf_test_env.ConsensusLayer_Prysm). - WithExecutionLayer(ctf_test_env.ExecutionLayer_Geth). - WithEthereumChainConfig(ctf_test_env.EthereumChainConfig{ - SecondsPerSlot: 4, - SlotsPerEpoch: 2, - }). - Build() + privateNetwork, err := actions.EthereumNetworkConfigFromConfig(l, testConfig) require.NoError(t, err, "Error building ethereum network config") env, err = test_env.NewCLTestEnvBuilder(). WithTestConfig(testConfig). WithTestInstance(t). - WithPrivateEthereumNetwork(cfg). + WithPrivateEthereumNetwork(privateNetwork). WithCLNodes(clNodesCount). WithCLNodeConfig(clNodeConfig). WithFunding(big.NewFloat(chainlinkNodeFunding)). @@ -1205,7 +1179,7 @@ func SetupLogPollerTestDocker( require.NoError(t, err, "Error creating OCR Keeper Jobs") ocrConfig, err := actions.BuildAutoOCR2ConfigVarsLocal(l, workerNodes, registryConfig, registrar.Address(), 30*time.Second, registry.RegistryOwnerAddress(), registry.ChainModuleAddress(), registry.ReorgProtectionEnabled()) require.NoError(t, err, "Error building OCR config vars") - err = registry.SetConfig(automationDefaultRegistryConfig, ocrConfig) + err = registry.SetConfigTypeSafe(ocrConfig) require.NoError(t, err, "Registry config should be set successfully") require.NoError(t, env.EVMClient.WaitForEvents(), "Waiting for config to be set") diff --git a/integration-tests/utils/seth.go b/integration-tests/utils/seth.go index adb63e4f9c2..c2d4f743a6b 100644 --- a/integration-tests/utils/seth.go +++ b/integration-tests/utils/seth.go @@ -2,6 +2,7 @@ package utils import ( "fmt" + "strconv" "github.com/rs/zerolog" "github.com/smartcontractkit/seth" @@ -82,3 +83,49 @@ func MustReplaceSimulatedNetworkUrlWithK8(l zerolog.Logger, network blockchain.E return network } + +// ValidateSethNetworkConfig validates the Seth network config +func ValidateSethNetworkConfig(cfg *seth.Network) error { + if cfg == nil { + return fmt.Errorf("Network cannot be nil") + } + if cfg.ChainID == "" { + return fmt.Errorf("ChainID is required") + } + _, err := strconv.Atoi(cfg.ChainID) + if err != nil { + return fmt.Errorf("ChainID needs to be a number") + } + if cfg.URLs == nil || len(cfg.URLs) == 0 { + return fmt.Errorf("URLs are required") + } + if cfg.PrivateKeys == nil || len(cfg.PrivateKeys) == 0 { + return fmt.Errorf("PrivateKeys are required") + } + if cfg.TransferGasFee == 0 { + return fmt.Errorf("TransferGasFee needs to be above 0. It's the gas fee for a simple transfer transaction") + } + if cfg.TxnTimeout.Duration() == 0 { + return fmt.Errorf("TxnTimeout needs to be above 0. It's the timeout for a transaction") + } + if cfg.GasLimit == 0 { + return fmt.Errorf("GasLimit needs to be above 0. It's the gas limit for a transaction") + } + if cfg.EIP1559DynamicFees { + if cfg.GasFeeCap == 0 { + return fmt.Errorf("GasFeeCap needs to be above 0. It's the maximum fee per gas for a transaction (including tip)") + } + if cfg.GasTipCap == 0 { + return fmt.Errorf("GasTipCap needs to be above 0. It's the maximum tip per gas for a transaction") + } + if cfg.GasFeeCap <= cfg.GasTipCap { + return fmt.Errorf("GasFeeCap needs to be above GasTipCap (as it is base fee + tip cap)") + } + } else { + if cfg.GasPrice == 0 { + return fmt.Errorf("GasPrice needs to be above 0. It's the price of gas for a transaction") + } + } + + return nil +} diff --git a/integration-tests/wrappers/contract_caller.go b/integration-tests/wrappers/contract_caller.go new file mode 100644 index 00000000000..4be76ee74a1 --- /dev/null +++ b/integration-tests/wrappers/contract_caller.go @@ -0,0 +1,130 @@ +package wrappers + +import ( + "context" + "math/big" + + "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/common/hexutil" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/ethclient" + "github.com/smartcontractkit/seth" + + evmClient "github.com/smartcontractkit/chainlink/v2/core/chains/evm/client" + + "github.com/smartcontractkit/chainlink-testing-framework/blockchain" +) + +// WrappedContractBackend is a wrapper around the go-ethereum ContractBackend interface. It's a thin wrapper +// around the go-ethereum/ethclient.Client, which replaces only CallContract and PendingCallContract calls with +// methods that send data both in "input" and "data" field for backwards compatibility with older clients. Other methods +// are passed through to the underlying client. +type WrappedContractBackend struct { + evmClient blockchain.EVMClient + sethClient *seth.Client +} + +// MustNewWrappedContractBackend creates a new WrappedContractBackend with the given clients +func MustNewWrappedContractBackend(evmClient blockchain.EVMClient, sethClient *seth.Client) *WrappedContractBackend { + if evmClient == nil && sethClient == nil { + panic("Must provide at least one client") + } + + return &WrappedContractBackend{ + evmClient: evmClient, + sethClient: sethClient, + } +} + +func (w *WrappedContractBackend) getGethClient() *ethclient.Client { + if w.sethClient != nil { + return w.sethClient.Client + } + + if w.evmClient != nil { + return w.evmClient.GetEthClient() + } + + panic("No client found") +} + +func (w *WrappedContractBackend) CodeAt(ctx context.Context, contract common.Address, blockNumber *big.Int) ([]byte, error) { + client := w.getGethClient() + return client.CodeAt(ctx, contract, blockNumber) +} + +func (w *WrappedContractBackend) PendingCodeAt(ctx context.Context, contract common.Address) ([]byte, error) { + client := w.getGethClient() + return client.PendingCodeAt(ctx, contract) +} + +func (w *WrappedContractBackend) CodeAtHash(ctx context.Context, contract common.Address, blockHash common.Hash) ([]byte, error) { + client := w.getGethClient() + return client.CodeAtHash(ctx, contract, blockHash) +} + +func (w *WrappedContractBackend) CallContractAtHash(ctx context.Context, call ethereum.CallMsg, blockHash common.Hash) ([]byte, error) { + client := w.getGethClient() + return client.CallContractAtHash(ctx, call, blockHash) +} + +func (w *WrappedContractBackend) HeaderByNumber(ctx context.Context, number *big.Int) (*types.Header, error) { + client := w.getGethClient() + return client.HeaderByNumber(ctx, number) +} + +func (w *WrappedContractBackend) PendingNonceAt(ctx context.Context, account common.Address) (uint64, error) { + client := w.getGethClient() + return client.PendingNonceAt(ctx, account) +} + +func (w *WrappedContractBackend) SuggestGasPrice(ctx context.Context) (*big.Int, error) { + client := w.getGethClient() + return client.SuggestGasPrice(ctx) +} + +func (w *WrappedContractBackend) SuggestGasTipCap(ctx context.Context) (*big.Int, error) { + client := w.getGethClient() + return client.SuggestGasTipCap(ctx) +} + +func (w *WrappedContractBackend) EstimateGas(ctx context.Context, call ethereum.CallMsg) (gas uint64, err error) { + client := w.getGethClient() + return client.EstimateGas(ctx, call) +} + +func (w *WrappedContractBackend) SendTransaction(ctx context.Context, tx *types.Transaction) error { + client := w.getGethClient() + return client.SendTransaction(ctx, tx) +} + +func (w *WrappedContractBackend) FilterLogs(ctx context.Context, query ethereum.FilterQuery) ([]types.Log, error) { + client := w.getGethClient() + return client.FilterLogs(ctx, query) +} + +func (w *WrappedContractBackend) SubscribeFilterLogs(ctx context.Context, query ethereum.FilterQuery, ch chan<- types.Log) (ethereum.Subscription, error) { + client := w.getGethClient() + return client.SubscribeFilterLogs(ctx, query, ch) +} + +func (w *WrappedContractBackend) CallContract(ctx context.Context, msg ethereum.CallMsg, blockNumber *big.Int) ([]byte, error) { + var hex hexutil.Bytes + client := w.getGethClient() + err := client.Client().CallContext(ctx, &hex, "eth_call", evmClient.ToBackwardCompatibleCallArg(msg), evmClient.ToBackwardCompatibleBlockNumArg(blockNumber)) + if err != nil { + return nil, err + } + return hex, nil +} + +func (w *WrappedContractBackend) PendingCallContract(ctx context.Context, msg ethereum.CallMsg) ([]byte, error) { + var hex hexutil.Bytes + client := w.getGethClient() + err := client.Client().CallContext(ctx, &hex, "eth_call", evmClient.ToBackwardCompatibleCallArg(msg), "pending") + if err != nil { + return nil, err + } + return hex, nil +} diff --git a/main_test.go b/main_test.go index 15b17e32654..51707f0d9fb 100644 --- a/main_test.go +++ b/main_test.go @@ -53,7 +53,7 @@ func TestScripts(t *testing.T) { Dir: path, Setup: commonEnv, ContinueOnError: true, - //UpdateScripts: true, // uncomment to update golden files + // UpdateScripts: true, // uncomment to update golden files }) }) return nil diff --git a/package.json b/package.json new file mode 100644 index 00000000000..f6efe6844d9 --- /dev/null +++ b/package.json @@ -0,0 +1,22 @@ +{ + "name": "chainlink", + "version": "2.9.0", + "description": "node of the decentralized oracle network, bridging on and off-chain computation", + "main": "index.js", + "private": true, + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/smartcontractkit/chainlink.git" + }, + "author": "smartcontractkit", + "license": "MIT", + "bugs": { + "url": "https://github.com/smartcontractkit/chainlink/issues" + }, + "homepage": "https://github.com/smartcontractkit/chainlink#readme", + "devDependencies": { + "@changesets/changelog-github": "^0.4.8", + "@changesets/cli": "~2.26.2", + "semver": "^7.5.4" + } +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml new file mode 100644 index 00000000000..20afef2e663 --- /dev/null +++ b/pnpm-lock.yaml @@ -0,0 +1,1983 @@ +lockfileVersion: '6.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: true + +devDependencies: + '@changesets/changelog-github': + specifier: ^0.4.8 + version: 0.4.8 + '@changesets/cli': + specifier: ~2.26.2 + version: 2.26.2 + semver: + specifier: ^7.5.4 + version: 7.6.0 + +packages: + + /@babel/code-frame@7.23.5: + resolution: {integrity: sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/highlight': 7.23.4 + chalk: 2.4.2 + dev: true + + /@babel/helper-validator-identifier@7.22.20: + resolution: {integrity: sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==} + engines: {node: '>=6.9.0'} + dev: true + + /@babel/highlight@7.23.4: + resolution: {integrity: sha512-acGdbYSfp2WheJoJm/EBBBLh/ID8KDc64ISZ9DYtBmC8/Q204PZJLHyzeB5qMzJ5trcOkybd78M4x2KWsUq++A==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/helper-validator-identifier': 7.22.20 + chalk: 2.4.2 + js-tokens: 4.0.0 + dev: true + + /@babel/runtime@7.23.9: + resolution: {integrity: sha512-0CX6F+BI2s9dkUqr08KFrAIZgNFj75rdBU/DjCyYLIaV/quFjkk6T+EJ2LkZHyZTbEV4L5p97mNkUsHl2wLFAw==} + engines: {node: '>=6.9.0'} + dependencies: + regenerator-runtime: 0.14.1 + dev: true + + /@changesets/apply-release-plan@6.1.4: + resolution: {integrity: sha512-FMpKF1fRlJyCZVYHr3CbinpZZ+6MwvOtWUuO8uo+svcATEoc1zRDcj23pAurJ2TZ/uVz1wFHH6K3NlACy0PLew==} + dependencies: + '@babel/runtime': 7.23.9 + '@changesets/config': 2.3.1 + '@changesets/get-version-range-type': 0.3.2 + '@changesets/git': 2.0.0 + '@changesets/types': 5.2.1 + '@manypkg/get-packages': 1.1.3 + detect-indent: 6.1.0 + fs-extra: 7.0.1 + lodash.startcase: 4.4.0 + outdent: 0.5.0 + prettier: 2.8.8 + resolve-from: 5.0.0 + semver: 7.6.0 + dev: true + + /@changesets/assemble-release-plan@5.2.4: + resolution: {integrity: sha512-xJkWX+1/CUaOUWTguXEbCDTyWJFECEhmdtbkjhn5GVBGxdP/JwaHBIU9sW3FR6gD07UwZ7ovpiPclQZs+j+mvg==} + dependencies: + '@babel/runtime': 7.23.9 + '@changesets/errors': 0.1.4 + '@changesets/get-dependents-graph': 1.3.6 + '@changesets/types': 5.2.1 + '@manypkg/get-packages': 1.1.3 + semver: 7.6.0 + dev: true + + /@changesets/changelog-git@0.1.14: + resolution: {integrity: sha512-+vRfnKtXVWsDDxGctOfzJsPhaCdXRYoe+KyWYoq5X/GqoISREiat0l3L8B0a453B2B4dfHGcZaGyowHbp9BSaA==} + dependencies: + '@changesets/types': 5.2.1 + dev: true + + /@changesets/changelog-github@0.4.8: + resolution: {integrity: sha512-jR1DHibkMAb5v/8ym77E4AMNWZKB5NPzw5a5Wtqm1JepAuIF+hrKp2u04NKM14oBZhHglkCfrla9uq8ORnK/dw==} + dependencies: + '@changesets/get-github-info': 0.5.2 + '@changesets/types': 5.2.1 + dotenv: 8.6.0 + transitivePeerDependencies: + - encoding + dev: true + + /@changesets/cli@2.26.2: + resolution: {integrity: sha512-dnWrJTmRR8bCHikJHl9b9HW3gXACCehz4OasrXpMp7sx97ECuBGGNjJhjPhdZNCvMy9mn4BWdplI323IbqsRig==} + hasBin: true + dependencies: + '@babel/runtime': 7.23.9 + '@changesets/apply-release-plan': 6.1.4 + '@changesets/assemble-release-plan': 5.2.4 + '@changesets/changelog-git': 0.1.14 + '@changesets/config': 2.3.1 + '@changesets/errors': 0.1.4 + '@changesets/get-dependents-graph': 1.3.6 + '@changesets/get-release-plan': 3.0.17 + '@changesets/git': 2.0.0 + '@changesets/logger': 0.0.5 + '@changesets/pre': 1.0.14 + '@changesets/read': 0.5.9 + '@changesets/types': 5.2.1 + '@changesets/write': 0.2.3 + '@manypkg/get-packages': 1.1.3 + '@types/is-ci': 3.0.4 + '@types/semver': 7.5.8 + ansi-colors: 4.1.3 + chalk: 2.4.2 + enquirer: 2.4.1 + external-editor: 3.1.0 + fs-extra: 7.0.1 + human-id: 1.0.2 + is-ci: 3.0.1 + meow: 6.1.1 + outdent: 0.5.0 + p-limit: 2.3.0 + preferred-pm: 3.1.3 + resolve-from: 5.0.0 + semver: 7.6.0 + spawndamnit: 2.0.0 + term-size: 2.2.1 + tty-table: 4.2.3 + dev: true + + /@changesets/config@2.3.1: + resolution: {integrity: sha512-PQXaJl82CfIXddUOppj4zWu+987GCw2M+eQcOepxN5s+kvnsZOwjEJO3DH9eVy+OP6Pg/KFEWdsECFEYTtbg6w==} + dependencies: + '@changesets/errors': 0.1.4 + '@changesets/get-dependents-graph': 1.3.6 + '@changesets/logger': 0.0.5 + '@changesets/types': 5.2.1 + '@manypkg/get-packages': 1.1.3 + fs-extra: 7.0.1 + micromatch: 4.0.5 + dev: true + + /@changesets/errors@0.1.4: + resolution: {integrity: sha512-HAcqPF7snsUJ/QzkWoKfRfXushHTu+K5KZLJWPb34s4eCZShIf8BFO3fwq6KU8+G7L5KdtN2BzQAXOSXEyiY9Q==} + dependencies: + extendable-error: 0.1.7 + dev: true + + /@changesets/get-dependents-graph@1.3.6: + resolution: {integrity: sha512-Q/sLgBANmkvUm09GgRsAvEtY3p1/5OCzgBE5vX3vgb5CvW0j7CEljocx5oPXeQSNph6FXulJlXV3Re/v3K3P3Q==} + dependencies: + '@changesets/types': 5.2.1 + '@manypkg/get-packages': 1.1.3 + chalk: 2.4.2 + fs-extra: 7.0.1 + semver: 7.6.0 + dev: true + + /@changesets/get-github-info@0.5.2: + resolution: {integrity: sha512-JppheLu7S114aEs157fOZDjFqUDpm7eHdq5E8SSR0gUBTEK0cNSHsrSR5a66xs0z3RWuo46QvA3vawp8BxDHvg==} + dependencies: + dataloader: 1.4.0 + node-fetch: 2.7.0 + transitivePeerDependencies: + - encoding + dev: true + + /@changesets/get-release-plan@3.0.17: + resolution: {integrity: sha512-6IwKTubNEgoOZwDontYc2x2cWXfr6IKxP3IhKeK+WjyD6y3M4Gl/jdQvBw+m/5zWILSOCAaGLu2ZF6Q+WiPniw==} + dependencies: + '@babel/runtime': 7.23.9 + '@changesets/assemble-release-plan': 5.2.4 + '@changesets/config': 2.3.1 + '@changesets/pre': 1.0.14 + '@changesets/read': 0.5.9 + '@changesets/types': 5.2.1 + '@manypkg/get-packages': 1.1.3 + dev: true + + /@changesets/get-version-range-type@0.3.2: + resolution: {integrity: sha512-SVqwYs5pULYjYT4op21F2pVbcrca4qA/bAA3FmFXKMN7Y+HcO8sbZUTx3TAy2VXulP2FACd1aC7f2nTuqSPbqg==} + dev: true + + /@changesets/git@2.0.0: + resolution: {integrity: sha512-enUVEWbiqUTxqSnmesyJGWfzd51PY4H7mH9yUw0hPVpZBJ6tQZFMU3F3mT/t9OJ/GjyiM4770i+sehAn6ymx6A==} + dependencies: + '@babel/runtime': 7.23.9 + '@changesets/errors': 0.1.4 + '@changesets/types': 5.2.1 + '@manypkg/get-packages': 1.1.3 + is-subdir: 1.2.0 + micromatch: 4.0.5 + spawndamnit: 2.0.0 + dev: true + + /@changesets/logger@0.0.5: + resolution: {integrity: sha512-gJyZHomu8nASHpaANzc6bkQMO9gU/ib20lqew1rVx753FOxffnCrJlGIeQVxNWCqM+o6OOleCo/ivL8UAO5iFw==} + dependencies: + chalk: 2.4.2 + dev: true + + /@changesets/parse@0.3.16: + resolution: {integrity: sha512-127JKNd167ayAuBjUggZBkmDS5fIKsthnr9jr6bdnuUljroiERW7FBTDNnNVyJ4l69PzR57pk6mXQdtJyBCJKg==} + dependencies: + '@changesets/types': 5.2.1 + js-yaml: 3.14.1 + dev: true + + /@changesets/pre@1.0.14: + resolution: {integrity: sha512-dTsHmxQWEQekHYHbg+M1mDVYFvegDh9j/kySNuDKdylwfMEevTeDouR7IfHNyVodxZXu17sXoJuf2D0vi55FHQ==} + dependencies: + '@babel/runtime': 7.23.9 + '@changesets/errors': 0.1.4 + '@changesets/types': 5.2.1 + '@manypkg/get-packages': 1.1.3 + fs-extra: 7.0.1 + dev: true + + /@changesets/read@0.5.9: + resolution: {integrity: sha512-T8BJ6JS6j1gfO1HFq50kU3qawYxa4NTbI/ASNVVCBTsKquy2HYwM9r7ZnzkiMe8IEObAJtUVGSrePCOxAK2haQ==} + dependencies: + '@babel/runtime': 7.23.9 + '@changesets/git': 2.0.0 + '@changesets/logger': 0.0.5 + '@changesets/parse': 0.3.16 + '@changesets/types': 5.2.1 + chalk: 2.4.2 + fs-extra: 7.0.1 + p-filter: 2.1.0 + dev: true + + /@changesets/types@4.1.0: + resolution: {integrity: sha512-LDQvVDv5Kb50ny2s25Fhm3d9QSZimsoUGBsUioj6MC3qbMUCuC8GPIvk/M6IvXx3lYhAs0lwWUQLb+VIEUCECw==} + dev: true + + /@changesets/types@5.2.1: + resolution: {integrity: sha512-myLfHbVOqaq9UtUKqR/nZA/OY7xFjQMdfgfqeZIBK4d0hA6pgxArvdv8M+6NUzzBsjWLOtvApv8YHr4qM+Kpfg==} + dev: true + + /@changesets/write@0.2.3: + resolution: {integrity: sha512-Dbamr7AIMvslKnNYsLFafaVORx4H0pvCA2MHqgtNCySMe1blImEyAEOzDmcgKAkgz4+uwoLz7demIrX+JBr/Xw==} + dependencies: + '@babel/runtime': 7.23.9 + '@changesets/types': 5.2.1 + fs-extra: 7.0.1 + human-id: 1.0.2 + prettier: 2.8.8 + dev: true + + /@manypkg/find-root@1.1.0: + resolution: {integrity: sha512-mki5uBvhHzO8kYYix/WRy2WX8S3B5wdVSc9D6KcU5lQNglP2yt58/VfLuAK49glRXChosY8ap2oJ1qgma3GUVA==} + dependencies: + '@babel/runtime': 7.23.9 + '@types/node': 12.20.55 + find-up: 4.1.0 + fs-extra: 8.1.0 + dev: true + + /@manypkg/get-packages@1.1.3: + resolution: {integrity: sha512-fo+QhuU3qE/2TQMQmbVMqaQ6EWbMhi4ABWP+O4AM1NqPBuy0OrApV5LO6BrrgnhtAHS2NH6RrVk9OL181tTi8A==} + dependencies: + '@babel/runtime': 7.23.9 + '@changesets/types': 4.1.0 + '@manypkg/find-root': 1.1.0 + fs-extra: 8.1.0 + globby: 11.1.0 + read-yaml-file: 1.1.0 + dev: true + + /@nodelib/fs.scandir@2.1.5: + resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} + engines: {node: '>= 8'} + dependencies: + '@nodelib/fs.stat': 2.0.5 + run-parallel: 1.2.0 + dev: true + + /@nodelib/fs.stat@2.0.5: + resolution: {integrity: sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==} + engines: {node: '>= 8'} + dev: true + + /@nodelib/fs.walk@1.2.8: + resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} + engines: {node: '>= 8'} + dependencies: + '@nodelib/fs.scandir': 2.1.5 + fastq: 1.17.1 + dev: true + + /@types/is-ci@3.0.4: + resolution: {integrity: sha512-AkCYCmwlXeuH89DagDCzvCAyltI2v9lh3U3DqSg/GrBYoReAaWwxfXCqMx9UV5MajLZ4ZFwZzV4cABGIxk2XRw==} + dependencies: + ci-info: 3.9.0 + dev: true + + /@types/minimist@1.2.5: + resolution: {integrity: sha512-hov8bUuiLiyFPGyFPE1lwWhmzYbirOXQNNo40+y3zow8aFVTeyn3VWL0VFFfdNddA8S4Vf0Tc062rzyNr7Paag==} + dev: true + + /@types/node@12.20.55: + resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==} + dev: true + + /@types/normalize-package-data@2.4.4: + resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} + dev: true + + /@types/semver@7.5.8: + resolution: {integrity: sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==} + dev: true + + /ansi-colors@4.1.3: + resolution: {integrity: sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==} + engines: {node: '>=6'} + dev: true + + /ansi-regex@5.0.1: + resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} + engines: {node: '>=8'} + dev: true + + /ansi-styles@3.2.1: + resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==} + engines: {node: '>=4'} + dependencies: + color-convert: 1.9.3 + dev: true + + /ansi-styles@4.3.0: + resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} + engines: {node: '>=8'} + dependencies: + color-convert: 2.0.1 + dev: true + + /argparse@1.0.10: + resolution: {integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==} + dependencies: + sprintf-js: 1.0.3 + dev: true + + /array-buffer-byte-length@1.0.1: + resolution: {integrity: sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.7 + is-array-buffer: 3.0.4 + dev: true + + /array-union@2.1.0: + resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==} + engines: {node: '>=8'} + dev: true + + /array.prototype.flat@1.3.2: + resolution: {integrity: sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + es-abstract: 1.22.4 + es-shim-unscopables: 1.0.2 + dev: true + + /arraybuffer.prototype.slice@1.0.3: + resolution: {integrity: sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A==} + engines: {node: '>= 0.4'} + dependencies: + array-buffer-byte-length: 1.0.1 + call-bind: 1.0.7 + define-properties: 1.2.1 + es-abstract: 1.22.4 + es-errors: 1.3.0 + get-intrinsic: 1.2.4 + is-array-buffer: 3.0.4 + is-shared-array-buffer: 1.0.3 + dev: true + + /arrify@1.0.1: + resolution: {integrity: sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==} + engines: {node: '>=0.10.0'} + dev: true + + /available-typed-arrays@1.0.7: + resolution: {integrity: sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==} + engines: {node: '>= 0.4'} + dependencies: + possible-typed-array-names: 1.0.0 + dev: true + + /better-path-resolve@1.0.0: + resolution: {integrity: sha512-pbnl5XzGBdrFU/wT4jqmJVPn2B6UHPBOhzMQkY/SPUPB6QtUXtmBHBIwCbXJol93mOpGMnQyP/+BB19q04xj7g==} + engines: {node: '>=4'} + dependencies: + is-windows: 1.0.2 + dev: true + + /braces@3.0.2: + resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==} + engines: {node: '>=8'} + dependencies: + fill-range: 7.0.1 + dev: true + + /breakword@1.0.6: + resolution: {integrity: sha512-yjxDAYyK/pBvws9H4xKYpLDpYKEH6CzrBPAuXq3x18I+c/2MkVtT3qAr7Oloi6Dss9qNhPVueAAVU1CSeNDIXw==} + dependencies: + wcwidth: 1.0.1 + dev: true + + /call-bind@1.0.7: + resolution: {integrity: sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==} + engines: {node: '>= 0.4'} + dependencies: + es-define-property: 1.0.0 + es-errors: 1.3.0 + function-bind: 1.1.2 + get-intrinsic: 1.2.4 + set-function-length: 1.2.1 + dev: true + + /camelcase-keys@6.2.2: + resolution: {integrity: sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg==} + engines: {node: '>=8'} + dependencies: + camelcase: 5.3.1 + map-obj: 4.3.0 + quick-lru: 4.0.1 + dev: true + + /camelcase@5.3.1: + resolution: {integrity: sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==} + engines: {node: '>=6'} + dev: true + + /chalk@2.4.2: + resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} + engines: {node: '>=4'} + dependencies: + ansi-styles: 3.2.1 + escape-string-regexp: 1.0.5 + supports-color: 5.5.0 + dev: true + + /chalk@4.1.2: + resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} + engines: {node: '>=10'} + dependencies: + ansi-styles: 4.3.0 + supports-color: 7.2.0 + dev: true + + /chardet@0.7.0: + resolution: {integrity: sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==} + dev: true + + /ci-info@3.9.0: + resolution: {integrity: sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==} + engines: {node: '>=8'} + dev: true + + /cliui@6.0.0: + resolution: {integrity: sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==} + dependencies: + string-width: 4.2.3 + strip-ansi: 6.0.1 + wrap-ansi: 6.2.0 + dev: true + + /cliui@8.0.1: + resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} + engines: {node: '>=12'} + dependencies: + string-width: 4.2.3 + strip-ansi: 6.0.1 + wrap-ansi: 7.0.0 + dev: true + + /clone@1.0.4: + resolution: {integrity: sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==} + engines: {node: '>=0.8'} + dev: true + + /color-convert@1.9.3: + resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} + dependencies: + color-name: 1.1.3 + dev: true + + /color-convert@2.0.1: + resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} + engines: {node: '>=7.0.0'} + dependencies: + color-name: 1.1.4 + dev: true + + /color-name@1.1.3: + resolution: {integrity: sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==} + dev: true + + /color-name@1.1.4: + resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} + dev: true + + /cross-spawn@5.1.0: + resolution: {integrity: sha512-pTgQJ5KC0d2hcY8eyL1IzlBPYjTkyH72XRZPnLyKus2mBfNjQs3klqbJU2VILqZryAZUt9JOb3h/mWMy23/f5A==} + dependencies: + lru-cache: 4.1.5 + shebang-command: 1.2.0 + which: 1.3.1 + dev: true + + /csv-generate@3.4.3: + resolution: {integrity: sha512-w/T+rqR0vwvHqWs/1ZyMDWtHHSJaN06klRqJXBEpDJaM/+dZkso0OKh1VcuuYvK3XM53KysVNq8Ko/epCK8wOw==} + dev: true + + /csv-parse@4.16.3: + resolution: {integrity: sha512-cO1I/zmz4w2dcKHVvpCr7JVRu8/FymG5OEpmvsZYlccYolPBLoVGKUHgNoc4ZGkFeFlWGEDmMyBM+TTqRdW/wg==} + dev: true + + /csv-stringify@5.6.5: + resolution: {integrity: sha512-PjiQ659aQ+fUTQqSrd1XEDnOr52jh30RBurfzkscaE2tPaFsDH5wOAHJiw8XAHphRknCwMUE9KRayc4K/NbO8A==} + dev: true + + /csv@5.5.3: + resolution: {integrity: sha512-QTaY0XjjhTQOdguARF0lGKm5/mEq9PD9/VhZZegHDIBq2tQwgNpHc3dneD4mGo2iJs+fTKv5Bp0fZ+BRuY3Z0g==} + engines: {node: '>= 0.1.90'} + dependencies: + csv-generate: 3.4.3 + csv-parse: 4.16.3 + csv-stringify: 5.6.5 + stream-transform: 2.1.3 + dev: true + + /dataloader@1.4.0: + resolution: {integrity: sha512-68s5jYdlvasItOJnCuI2Q9s4q98g0pCyL3HrcKJu8KNugUl8ahgmZYg38ysLTgQjjXX3H8CJLkAvWrclWfcalw==} + dev: true + + /decamelize-keys@1.1.1: + resolution: {integrity: sha512-WiPxgEirIV0/eIOMcnFBA3/IJZAZqKnwAwWyvvdi4lsr1WCN22nhdf/3db3DoZcUjTV2SqfzIwNyp6y2xs3nmg==} + engines: {node: '>=0.10.0'} + dependencies: + decamelize: 1.2.0 + map-obj: 1.0.1 + dev: true + + /decamelize@1.2.0: + resolution: {integrity: sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==} + engines: {node: '>=0.10.0'} + dev: true + + /defaults@1.0.4: + resolution: {integrity: sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==} + dependencies: + clone: 1.0.4 + dev: true + + /define-data-property@1.1.4: + resolution: {integrity: sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==} + engines: {node: '>= 0.4'} + dependencies: + es-define-property: 1.0.0 + es-errors: 1.3.0 + gopd: 1.0.1 + dev: true + + /define-properties@1.2.1: + resolution: {integrity: sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==} + engines: {node: '>= 0.4'} + dependencies: + define-data-property: 1.1.4 + has-property-descriptors: 1.0.2 + object-keys: 1.1.1 + dev: true + + /detect-indent@6.1.0: + resolution: {integrity: sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==} + engines: {node: '>=8'} + dev: true + + /dir-glob@3.0.1: + resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} + engines: {node: '>=8'} + dependencies: + path-type: 4.0.0 + dev: true + + /dotenv@8.6.0: + resolution: {integrity: sha512-IrPdXQsk2BbzvCBGBOTmmSH5SodmqZNt4ERAZDmW4CT+tL8VtvinqywuANaFu4bOMWki16nqf0e4oC0QIaDr/g==} + engines: {node: '>=10'} + dev: true + + /emoji-regex@8.0.0: + resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} + dev: true + + /enquirer@2.4.1: + resolution: {integrity: sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==} + engines: {node: '>=8.6'} + dependencies: + ansi-colors: 4.1.3 + strip-ansi: 6.0.1 + dev: true + + /error-ex@1.3.2: + resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==} + dependencies: + is-arrayish: 0.2.1 + dev: true + + /es-abstract@1.22.4: + resolution: {integrity: sha512-vZYJlk2u6qHYxBOTjAeg7qUxHdNfih64Uu2J8QqWgXZ2cri0ZpJAkzDUK/q593+mvKwlxyaxr6F1Q+3LKoQRgg==} + engines: {node: '>= 0.4'} + dependencies: + array-buffer-byte-length: 1.0.1 + arraybuffer.prototype.slice: 1.0.3 + available-typed-arrays: 1.0.7 + call-bind: 1.0.7 + es-define-property: 1.0.0 + es-errors: 1.3.0 + es-set-tostringtag: 2.0.3 + es-to-primitive: 1.2.1 + function.prototype.name: 1.1.6 + get-intrinsic: 1.2.4 + get-symbol-description: 1.0.2 + globalthis: 1.0.3 + gopd: 1.0.1 + has-property-descriptors: 1.0.2 + has-proto: 1.0.3 + has-symbols: 1.0.3 + hasown: 2.0.1 + internal-slot: 1.0.7 + is-array-buffer: 3.0.4 + is-callable: 1.2.7 + is-negative-zero: 2.0.3 + is-regex: 1.1.4 + is-shared-array-buffer: 1.0.3 + is-string: 1.0.7 + is-typed-array: 1.1.13 + is-weakref: 1.0.2 + object-inspect: 1.13.1 + object-keys: 1.1.1 + object.assign: 4.1.5 + regexp.prototype.flags: 1.5.2 + safe-array-concat: 1.1.0 + safe-regex-test: 1.0.3 + string.prototype.trim: 1.2.8 + string.prototype.trimend: 1.0.7 + string.prototype.trimstart: 1.0.7 + typed-array-buffer: 1.0.2 + typed-array-byte-length: 1.0.1 + typed-array-byte-offset: 1.0.2 + typed-array-length: 1.0.5 + unbox-primitive: 1.0.2 + which-typed-array: 1.1.14 + dev: true + + /es-define-property@1.0.0: + resolution: {integrity: sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==} + engines: {node: '>= 0.4'} + dependencies: + get-intrinsic: 1.2.4 + dev: true + + /es-errors@1.3.0: + resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} + engines: {node: '>= 0.4'} + dev: true + + /es-set-tostringtag@2.0.3: + resolution: {integrity: sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ==} + engines: {node: '>= 0.4'} + dependencies: + get-intrinsic: 1.2.4 + has-tostringtag: 1.0.2 + hasown: 2.0.1 + dev: true + + /es-shim-unscopables@1.0.2: + resolution: {integrity: sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw==} + dependencies: + hasown: 2.0.1 + dev: true + + /es-to-primitive@1.2.1: + resolution: {integrity: sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==} + engines: {node: '>= 0.4'} + dependencies: + is-callable: 1.2.7 + is-date-object: 1.0.5 + is-symbol: 1.0.4 + dev: true + + /escalade@3.1.2: + resolution: {integrity: sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==} + engines: {node: '>=6'} + dev: true + + /escape-string-regexp@1.0.5: + resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==} + engines: {node: '>=0.8.0'} + dev: true + + /esprima@4.0.1: + resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} + engines: {node: '>=4'} + hasBin: true + dev: true + + /extendable-error@0.1.7: + resolution: {integrity: sha512-UOiS2in6/Q0FK0R0q6UY9vYpQ21mr/Qn1KOnte7vsACuNJf514WvCCUHSRCPcgjPT2bAhNIJdlE6bVap1GKmeg==} + dev: true + + /external-editor@3.1.0: + resolution: {integrity: sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==} + engines: {node: '>=4'} + dependencies: + chardet: 0.7.0 + iconv-lite: 0.4.24 + tmp: 0.0.33 + dev: true + + /fast-glob@3.3.2: + resolution: {integrity: sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==} + engines: {node: '>=8.6.0'} + dependencies: + '@nodelib/fs.stat': 2.0.5 + '@nodelib/fs.walk': 1.2.8 + glob-parent: 5.1.2 + merge2: 1.4.1 + micromatch: 4.0.5 + dev: true + + /fastq@1.17.1: + resolution: {integrity: sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==} + dependencies: + reusify: 1.0.4 + dev: true + + /fill-range@7.0.1: + resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==} + engines: {node: '>=8'} + dependencies: + to-regex-range: 5.0.1 + dev: true + + /find-up@4.1.0: + resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==} + engines: {node: '>=8'} + dependencies: + locate-path: 5.0.0 + path-exists: 4.0.0 + dev: true + + /find-up@5.0.0: + resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} + engines: {node: '>=10'} + dependencies: + locate-path: 6.0.0 + path-exists: 4.0.0 + dev: true + + /find-yarn-workspace-root2@1.2.16: + resolution: {integrity: sha512-hr6hb1w8ePMpPVUK39S4RlwJzi+xPLuVuG8XlwXU3KD5Yn3qgBWVfy3AzNlDhWvE1EORCE65/Qm26rFQt3VLVA==} + dependencies: + micromatch: 4.0.5 + pkg-dir: 4.2.0 + dev: true + + /for-each@0.3.3: + resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==} + dependencies: + is-callable: 1.2.7 + dev: true + + /fs-extra@7.0.1: + resolution: {integrity: sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==} + engines: {node: '>=6 <7 || >=8'} + dependencies: + graceful-fs: 4.2.11 + jsonfile: 4.0.0 + universalify: 0.1.2 + dev: true + + /fs-extra@8.1.0: + resolution: {integrity: sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==} + engines: {node: '>=6 <7 || >=8'} + dependencies: + graceful-fs: 4.2.11 + jsonfile: 4.0.0 + universalify: 0.1.2 + dev: true + + /function-bind@1.1.2: + resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} + dev: true + + /function.prototype.name@1.1.6: + resolution: {integrity: sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + es-abstract: 1.22.4 + functions-have-names: 1.2.3 + dev: true + + /functions-have-names@1.2.3: + resolution: {integrity: sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==} + dev: true + + /get-caller-file@2.0.5: + resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} + engines: {node: 6.* || 8.* || >= 10.*} + dev: true + + /get-intrinsic@1.2.4: + resolution: {integrity: sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==} + engines: {node: '>= 0.4'} + dependencies: + es-errors: 1.3.0 + function-bind: 1.1.2 + has-proto: 1.0.3 + has-symbols: 1.0.3 + hasown: 2.0.1 + dev: true + + /get-symbol-description@1.0.2: + resolution: {integrity: sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.7 + es-errors: 1.3.0 + get-intrinsic: 1.2.4 + dev: true + + /glob-parent@5.1.2: + resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} + engines: {node: '>= 6'} + dependencies: + is-glob: 4.0.3 + dev: true + + /globalthis@1.0.3: + resolution: {integrity: sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==} + engines: {node: '>= 0.4'} + dependencies: + define-properties: 1.2.1 + dev: true + + /globby@11.1.0: + resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} + engines: {node: '>=10'} + dependencies: + array-union: 2.1.0 + dir-glob: 3.0.1 + fast-glob: 3.3.2 + ignore: 5.3.1 + merge2: 1.4.1 + slash: 3.0.0 + dev: true + + /gopd@1.0.1: + resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==} + dependencies: + get-intrinsic: 1.2.4 + dev: true + + /graceful-fs@4.2.11: + resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} + dev: true + + /grapheme-splitter@1.0.4: + resolution: {integrity: sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==} + dev: true + + /hard-rejection@2.1.0: + resolution: {integrity: sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA==} + engines: {node: '>=6'} + dev: true + + /has-bigints@1.0.2: + resolution: {integrity: sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==} + dev: true + + /has-flag@3.0.0: + resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==} + engines: {node: '>=4'} + dev: true + + /has-flag@4.0.0: + resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} + engines: {node: '>=8'} + dev: true + + /has-property-descriptors@1.0.2: + resolution: {integrity: sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==} + dependencies: + es-define-property: 1.0.0 + dev: true + + /has-proto@1.0.3: + resolution: {integrity: sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==} + engines: {node: '>= 0.4'} + dev: true + + /has-symbols@1.0.3: + resolution: {integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==} + engines: {node: '>= 0.4'} + dev: true + + /has-tostringtag@1.0.2: + resolution: {integrity: sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==} + engines: {node: '>= 0.4'} + dependencies: + has-symbols: 1.0.3 + dev: true + + /hasown@2.0.1: + resolution: {integrity: sha512-1/th4MHjnwncwXsIW6QMzlvYL9kG5e/CpVvLRZe4XPa8TOUNbCELqmvhDmnkNsAjwaG4+I8gJJL0JBvTTLO9qA==} + engines: {node: '>= 0.4'} + dependencies: + function-bind: 1.1.2 + dev: true + + /hosted-git-info@2.8.9: + resolution: {integrity: sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==} + dev: true + + /human-id@1.0.2: + resolution: {integrity: sha512-UNopramDEhHJD+VR+ehk8rOslwSfByxPIZyJRfV739NDhN5LF1fa1MqnzKm2lGTQRjNrjK19Q5fhkgIfjlVUKw==} + dev: true + + /iconv-lite@0.4.24: + resolution: {integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==} + engines: {node: '>=0.10.0'} + dependencies: + safer-buffer: 2.1.2 + dev: true + + /ignore@5.3.1: + resolution: {integrity: sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==} + engines: {node: '>= 4'} + dev: true + + /indent-string@4.0.0: + resolution: {integrity: sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==} + engines: {node: '>=8'} + dev: true + + /internal-slot@1.0.7: + resolution: {integrity: sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==} + engines: {node: '>= 0.4'} + dependencies: + es-errors: 1.3.0 + hasown: 2.0.1 + side-channel: 1.0.5 + dev: true + + /is-array-buffer@3.0.4: + resolution: {integrity: sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.7 + get-intrinsic: 1.2.4 + dev: true + + /is-arrayish@0.2.1: + resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==} + dev: true + + /is-bigint@1.0.4: + resolution: {integrity: sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==} + dependencies: + has-bigints: 1.0.2 + dev: true + + /is-boolean-object@1.1.2: + resolution: {integrity: sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.7 + has-tostringtag: 1.0.2 + dev: true + + /is-callable@1.2.7: + resolution: {integrity: sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==} + engines: {node: '>= 0.4'} + dev: true + + /is-ci@3.0.1: + resolution: {integrity: sha512-ZYvCgrefwqoQ6yTyYUbQu64HsITZ3NfKX1lzaEYdkTDcfKzzCI/wthRRYKkdjHKFVgNiXKAKm65Zo1pk2as/QQ==} + hasBin: true + dependencies: + ci-info: 3.9.0 + dev: true + + /is-core-module@2.13.1: + resolution: {integrity: sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==} + dependencies: + hasown: 2.0.1 + dev: true + + /is-date-object@1.0.5: + resolution: {integrity: sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==} + engines: {node: '>= 0.4'} + dependencies: + has-tostringtag: 1.0.2 + dev: true + + /is-extglob@2.1.1: + resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} + engines: {node: '>=0.10.0'} + dev: true + + /is-fullwidth-code-point@3.0.0: + resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} + engines: {node: '>=8'} + dev: true + + /is-glob@4.0.3: + resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} + engines: {node: '>=0.10.0'} + dependencies: + is-extglob: 2.1.1 + dev: true + + /is-negative-zero@2.0.3: + resolution: {integrity: sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==} + engines: {node: '>= 0.4'} + dev: true + + /is-number-object@1.0.7: + resolution: {integrity: sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==} + engines: {node: '>= 0.4'} + dependencies: + has-tostringtag: 1.0.2 + dev: true + + /is-number@7.0.0: + resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} + engines: {node: '>=0.12.0'} + dev: true + + /is-plain-obj@1.1.0: + resolution: {integrity: sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==} + engines: {node: '>=0.10.0'} + dev: true + + /is-regex@1.1.4: + resolution: {integrity: sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.7 + has-tostringtag: 1.0.2 + dev: true + + /is-shared-array-buffer@1.0.3: + resolution: {integrity: sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.7 + dev: true + + /is-string@1.0.7: + resolution: {integrity: sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==} + engines: {node: '>= 0.4'} + dependencies: + has-tostringtag: 1.0.2 + dev: true + + /is-subdir@1.2.0: + resolution: {integrity: sha512-2AT6j+gXe/1ueqbW6fLZJiIw3F8iXGJtt0yDrZaBhAZEG1raiTxKWU+IPqMCzQAXOUCKdA4UDMgacKH25XG2Cw==} + engines: {node: '>=4'} + dependencies: + better-path-resolve: 1.0.0 + dev: true + + /is-symbol@1.0.4: + resolution: {integrity: sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==} + engines: {node: '>= 0.4'} + dependencies: + has-symbols: 1.0.3 + dev: true + + /is-typed-array@1.1.13: + resolution: {integrity: sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==} + engines: {node: '>= 0.4'} + dependencies: + which-typed-array: 1.1.14 + dev: true + + /is-weakref@1.0.2: + resolution: {integrity: sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==} + dependencies: + call-bind: 1.0.7 + dev: true + + /is-windows@1.0.2: + resolution: {integrity: sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==} + engines: {node: '>=0.10.0'} + dev: true + + /isarray@2.0.5: + resolution: {integrity: sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==} + dev: true + + /isexe@2.0.0: + resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} + dev: true + + /js-tokens@4.0.0: + resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} + dev: true + + /js-yaml@3.14.1: + resolution: {integrity: sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==} + hasBin: true + dependencies: + argparse: 1.0.10 + esprima: 4.0.1 + dev: true + + /json-parse-even-better-errors@2.3.1: + resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==} + dev: true + + /jsonfile@4.0.0: + resolution: {integrity: sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==} + optionalDependencies: + graceful-fs: 4.2.11 + dev: true + + /kind-of@6.0.3: + resolution: {integrity: sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==} + engines: {node: '>=0.10.0'} + dev: true + + /kleur@4.1.5: + resolution: {integrity: sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==} + engines: {node: '>=6'} + dev: true + + /lines-and-columns@1.2.4: + resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} + dev: true + + /load-yaml-file@0.2.0: + resolution: {integrity: sha512-OfCBkGEw4nN6JLtgRidPX6QxjBQGQf72q3si2uvqyFEMbycSFFHwAZeXx6cJgFM9wmLrf9zBwCP3Ivqa+LLZPw==} + engines: {node: '>=6'} + dependencies: + graceful-fs: 4.2.11 + js-yaml: 3.14.1 + pify: 4.0.1 + strip-bom: 3.0.0 + dev: true + + /locate-path@5.0.0: + resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==} + engines: {node: '>=8'} + dependencies: + p-locate: 4.1.0 + dev: true + + /locate-path@6.0.0: + resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} + engines: {node: '>=10'} + dependencies: + p-locate: 5.0.0 + dev: true + + /lodash.startcase@4.4.0: + resolution: {integrity: sha512-+WKqsK294HMSc2jEbNgpHpd0JfIBhp7rEV4aqXWqFr6AlXov+SlcgB1Fv01y2kGe3Gc8nMW7VA0SrGuSkRfIEg==} + dev: true + + /lru-cache@4.1.5: + resolution: {integrity: sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==} + dependencies: + pseudomap: 1.0.2 + yallist: 2.1.2 + dev: true + + /lru-cache@6.0.0: + resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==} + engines: {node: '>=10'} + dependencies: + yallist: 4.0.0 + dev: true + + /map-obj@1.0.1: + resolution: {integrity: sha512-7N/q3lyZ+LVCp7PzuxrJr4KMbBE2hW7BT7YNia330OFxIf4d3r5zVpicP2650l7CPN6RM9zOJRl3NGpqSiw3Eg==} + engines: {node: '>=0.10.0'} + dev: true + + /map-obj@4.3.0: + resolution: {integrity: sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ==} + engines: {node: '>=8'} + dev: true + + /meow@6.1.1: + resolution: {integrity: sha512-3YffViIt2QWgTy6Pale5QpopX/IvU3LPL03jOTqp6pGj3VjesdO/U8CuHMKpnQr4shCNCM5fd5XFFvIIl6JBHg==} + engines: {node: '>=8'} + dependencies: + '@types/minimist': 1.2.5 + camelcase-keys: 6.2.2 + decamelize-keys: 1.1.1 + hard-rejection: 2.1.0 + minimist-options: 4.1.0 + normalize-package-data: 2.5.0 + read-pkg-up: 7.0.1 + redent: 3.0.0 + trim-newlines: 3.0.1 + type-fest: 0.13.1 + yargs-parser: 18.1.3 + dev: true + + /merge2@1.4.1: + resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} + engines: {node: '>= 8'} + dev: true + + /micromatch@4.0.5: + resolution: {integrity: sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==} + engines: {node: '>=8.6'} + dependencies: + braces: 3.0.2 + picomatch: 2.3.1 + dev: true + + /min-indent@1.0.1: + resolution: {integrity: sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==} + engines: {node: '>=4'} + dev: true + + /minimist-options@4.1.0: + resolution: {integrity: sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==} + engines: {node: '>= 6'} + dependencies: + arrify: 1.0.1 + is-plain-obj: 1.1.0 + kind-of: 6.0.3 + dev: true + + /mixme@0.5.10: + resolution: {integrity: sha512-5H76ANWinB1H3twpJ6JY8uvAtpmFvHNArpilJAjXRKXSDDLPIMoZArw5SH0q9z+lLs8IrMw7Q2VWpWimFKFT1Q==} + engines: {node: '>= 8.0.0'} + dev: true + + /node-fetch@2.7.0: + resolution: {integrity: sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==} + engines: {node: 4.x || >=6.0.0} + peerDependencies: + encoding: ^0.1.0 + peerDependenciesMeta: + encoding: + optional: true + dependencies: + whatwg-url: 5.0.0 + dev: true + + /normalize-package-data@2.5.0: + resolution: {integrity: sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==} + dependencies: + hosted-git-info: 2.8.9 + resolve: 1.22.8 + semver: 5.7.2 + validate-npm-package-license: 3.0.4 + dev: true + + /object-inspect@1.13.1: + resolution: {integrity: sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==} + dev: true + + /object-keys@1.1.1: + resolution: {integrity: sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==} + engines: {node: '>= 0.4'} + dev: true + + /object.assign@4.1.5: + resolution: {integrity: sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + has-symbols: 1.0.3 + object-keys: 1.1.1 + dev: true + + /os-tmpdir@1.0.2: + resolution: {integrity: sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==} + engines: {node: '>=0.10.0'} + dev: true + + /outdent@0.5.0: + resolution: {integrity: sha512-/jHxFIzoMXdqPzTaCpFzAAWhpkSjZPF4Vsn6jAfNpmbH/ymsmd7Qc6VE9BGn0L6YMj6uwpQLxCECpus4ukKS9Q==} + dev: true + + /p-filter@2.1.0: + resolution: {integrity: sha512-ZBxxZ5sL2HghephhpGAQdoskxplTwr7ICaehZwLIlfL6acuVgZPm8yBNuRAFBGEqtD/hmUeq9eqLg2ys9Xr/yw==} + engines: {node: '>=8'} + dependencies: + p-map: 2.1.0 + dev: true + + /p-limit@2.3.0: + resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==} + engines: {node: '>=6'} + dependencies: + p-try: 2.2.0 + dev: true + + /p-limit@3.1.0: + resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} + engines: {node: '>=10'} + dependencies: + yocto-queue: 0.1.0 + dev: true + + /p-locate@4.1.0: + resolution: {integrity: sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==} + engines: {node: '>=8'} + dependencies: + p-limit: 2.3.0 + dev: true + + /p-locate@5.0.0: + resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} + engines: {node: '>=10'} + dependencies: + p-limit: 3.1.0 + dev: true + + /p-map@2.1.0: + resolution: {integrity: sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==} + engines: {node: '>=6'} + dev: true + + /p-try@2.2.0: + resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==} + engines: {node: '>=6'} + dev: true + + /parse-json@5.2.0: + resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} + engines: {node: '>=8'} + dependencies: + '@babel/code-frame': 7.23.5 + error-ex: 1.3.2 + json-parse-even-better-errors: 2.3.1 + lines-and-columns: 1.2.4 + dev: true + + /path-exists@4.0.0: + resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} + engines: {node: '>=8'} + dev: true + + /path-parse@1.0.7: + resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} + dev: true + + /path-type@4.0.0: + resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} + engines: {node: '>=8'} + dev: true + + /picomatch@2.3.1: + resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} + engines: {node: '>=8.6'} + dev: true + + /pify@4.0.1: + resolution: {integrity: sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==} + engines: {node: '>=6'} + dev: true + + /pkg-dir@4.2.0: + resolution: {integrity: sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==} + engines: {node: '>=8'} + dependencies: + find-up: 4.1.0 + dev: true + + /possible-typed-array-names@1.0.0: + resolution: {integrity: sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==} + engines: {node: '>= 0.4'} + dev: true + + /preferred-pm@3.1.3: + resolution: {integrity: sha512-MkXsENfftWSRpzCzImcp4FRsCc3y1opwB73CfCNWyzMqArju2CrlMHlqB7VexKiPEOjGMbttv1r9fSCn5S610w==} + engines: {node: '>=10'} + dependencies: + find-up: 5.0.0 + find-yarn-workspace-root2: 1.2.16 + path-exists: 4.0.0 + which-pm: 2.0.0 + dev: true + + /prettier@2.8.8: + resolution: {integrity: sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==} + engines: {node: '>=10.13.0'} + hasBin: true + dev: true + + /pseudomap@1.0.2: + resolution: {integrity: sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==} + dev: true + + /queue-microtask@1.2.3: + resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} + dev: true + + /quick-lru@4.0.1: + resolution: {integrity: sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==} + engines: {node: '>=8'} + dev: true + + /read-pkg-up@7.0.1: + resolution: {integrity: sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==} + engines: {node: '>=8'} + dependencies: + find-up: 4.1.0 + read-pkg: 5.2.0 + type-fest: 0.8.1 + dev: true + + /read-pkg@5.2.0: + resolution: {integrity: sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==} + engines: {node: '>=8'} + dependencies: + '@types/normalize-package-data': 2.4.4 + normalize-package-data: 2.5.0 + parse-json: 5.2.0 + type-fest: 0.6.0 + dev: true + + /read-yaml-file@1.1.0: + resolution: {integrity: sha512-VIMnQi/Z4HT2Fxuwg5KrY174U1VdUIASQVWXXyqtNRtxSr9IYkn1rsI6Tb6HsrHCmB7gVpNwX6JxPTHcH6IoTA==} + engines: {node: '>=6'} + dependencies: + graceful-fs: 4.2.11 + js-yaml: 3.14.1 + pify: 4.0.1 + strip-bom: 3.0.0 + dev: true + + /redent@3.0.0: + resolution: {integrity: sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==} + engines: {node: '>=8'} + dependencies: + indent-string: 4.0.0 + strip-indent: 3.0.0 + dev: true + + /regenerator-runtime@0.14.1: + resolution: {integrity: sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==} + dev: true + + /regexp.prototype.flags@1.5.2: + resolution: {integrity: sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + es-errors: 1.3.0 + set-function-name: 2.0.2 + dev: true + + /require-directory@2.1.1: + resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} + engines: {node: '>=0.10.0'} + dev: true + + /require-main-filename@2.0.0: + resolution: {integrity: sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==} + dev: true + + /resolve-from@5.0.0: + resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==} + engines: {node: '>=8'} + dev: true + + /resolve@1.22.8: + resolution: {integrity: sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==} + hasBin: true + dependencies: + is-core-module: 2.13.1 + path-parse: 1.0.7 + supports-preserve-symlinks-flag: 1.0.0 + dev: true + + /reusify@1.0.4: + resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} + engines: {iojs: '>=1.0.0', node: '>=0.10.0'} + dev: true + + /run-parallel@1.2.0: + resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} + dependencies: + queue-microtask: 1.2.3 + dev: true + + /safe-array-concat@1.1.0: + resolution: {integrity: sha512-ZdQ0Jeb9Ofti4hbt5lX3T2JcAamT9hfzYU1MNB+z/jaEbB6wfFfPIR/zEORmZqobkCCJhSjodobH6WHNmJ97dg==} + engines: {node: '>=0.4'} + dependencies: + call-bind: 1.0.7 + get-intrinsic: 1.2.4 + has-symbols: 1.0.3 + isarray: 2.0.5 + dev: true + + /safe-regex-test@1.0.3: + resolution: {integrity: sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.7 + es-errors: 1.3.0 + is-regex: 1.1.4 + dev: true + + /safer-buffer@2.1.2: + resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} + dev: true + + /semver@5.7.2: + resolution: {integrity: sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==} + hasBin: true + dev: true + + /semver@7.6.0: + resolution: {integrity: sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==} + engines: {node: '>=10'} + hasBin: true + dependencies: + lru-cache: 6.0.0 + dev: true + + /set-blocking@2.0.0: + resolution: {integrity: sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==} + dev: true + + /set-function-length@1.2.1: + resolution: {integrity: sha512-j4t6ccc+VsKwYHso+kElc5neZpjtq9EnRICFZtWyBsLojhmeF/ZBd/elqm22WJh/BziDe/SBiOeAt0m2mfLD0g==} + engines: {node: '>= 0.4'} + dependencies: + define-data-property: 1.1.4 + es-errors: 1.3.0 + function-bind: 1.1.2 + get-intrinsic: 1.2.4 + gopd: 1.0.1 + has-property-descriptors: 1.0.2 + dev: true + + /set-function-name@2.0.2: + resolution: {integrity: sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==} + engines: {node: '>= 0.4'} + dependencies: + define-data-property: 1.1.4 + es-errors: 1.3.0 + functions-have-names: 1.2.3 + has-property-descriptors: 1.0.2 + dev: true + + /shebang-command@1.2.0: + resolution: {integrity: sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==} + engines: {node: '>=0.10.0'} + dependencies: + shebang-regex: 1.0.0 + dev: true + + /shebang-regex@1.0.0: + resolution: {integrity: sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==} + engines: {node: '>=0.10.0'} + dev: true + + /side-channel@1.0.5: + resolution: {integrity: sha512-QcgiIWV4WV7qWExbN5llt6frQB/lBven9pqliLXfGPB+K9ZYXxDozp0wLkHS24kWCm+6YXH/f0HhnObZnZOBnQ==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.7 + es-errors: 1.3.0 + get-intrinsic: 1.2.4 + object-inspect: 1.13.1 + dev: true + + /signal-exit@3.0.7: + resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} + dev: true + + /slash@3.0.0: + resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} + engines: {node: '>=8'} + dev: true + + /smartwrap@2.0.2: + resolution: {integrity: sha512-vCsKNQxb7PnCNd2wY1WClWifAc2lwqsG8OaswpJkVJsvMGcnEntdTCDajZCkk93Ay1U3t/9puJmb525Rg5MZBA==} + engines: {node: '>=6'} + hasBin: true + dependencies: + array.prototype.flat: 1.3.2 + breakword: 1.0.6 + grapheme-splitter: 1.0.4 + strip-ansi: 6.0.1 + wcwidth: 1.0.1 + yargs: 15.4.1 + dev: true + + /spawndamnit@2.0.0: + resolution: {integrity: sha512-j4JKEcncSjFlqIwU5L/rp2N5SIPsdxaRsIv678+TZxZ0SRDJTm8JrxJMjE/XuiEZNEir3S8l0Fa3Ke339WI4qA==} + dependencies: + cross-spawn: 5.1.0 + signal-exit: 3.0.7 + dev: true + + /spdx-correct@3.2.0: + resolution: {integrity: sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==} + dependencies: + spdx-expression-parse: 3.0.1 + spdx-license-ids: 3.0.17 + dev: true + + /spdx-exceptions@2.5.0: + resolution: {integrity: sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==} + dev: true + + /spdx-expression-parse@3.0.1: + resolution: {integrity: sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==} + dependencies: + spdx-exceptions: 2.5.0 + spdx-license-ids: 3.0.17 + dev: true + + /spdx-license-ids@3.0.17: + resolution: {integrity: sha512-sh8PWc/ftMqAAdFiBu6Fy6JUOYjqDJBJvIhpfDMyHrr0Rbp5liZqd4TjtQ/RgfLjKFZb+LMx5hpml5qOWy0qvg==} + dev: true + + /sprintf-js@1.0.3: + resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} + dev: true + + /stream-transform@2.1.3: + resolution: {integrity: sha512-9GHUiM5hMiCi6Y03jD2ARC1ettBXkQBoQAe7nJsPknnI0ow10aXjTnew8QtYQmLjzn974BnmWEAJgCY6ZP1DeQ==} + dependencies: + mixme: 0.5.10 + dev: true + + /string-width@4.2.3: + resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} + engines: {node: '>=8'} + dependencies: + emoji-regex: 8.0.0 + is-fullwidth-code-point: 3.0.0 + strip-ansi: 6.0.1 + dev: true + + /string.prototype.trim@1.2.8: + resolution: {integrity: sha512-lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + es-abstract: 1.22.4 + dev: true + + /string.prototype.trimend@1.0.7: + resolution: {integrity: sha512-Ni79DqeB72ZFq1uH/L6zJ+DKZTkOtPIHovb3YZHQViE+HDouuU4mBrLOLDn5Dde3RF8qw5qVETEjhu9locMLvA==} + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + es-abstract: 1.22.4 + dev: true + + /string.prototype.trimstart@1.0.7: + resolution: {integrity: sha512-NGhtDFu3jCEm7B4Fy0DpLewdJQOZcQ0rGbwQ/+stjnrp2i+rlKeCvos9hOIeCmqwratM47OBxY7uFZzjxHXmrg==} + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + es-abstract: 1.22.4 + dev: true + + /strip-ansi@6.0.1: + resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} + engines: {node: '>=8'} + dependencies: + ansi-regex: 5.0.1 + dev: true + + /strip-bom@3.0.0: + resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==} + engines: {node: '>=4'} + dev: true + + /strip-indent@3.0.0: + resolution: {integrity: sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==} + engines: {node: '>=8'} + dependencies: + min-indent: 1.0.1 + dev: true + + /supports-color@5.5.0: + resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} + engines: {node: '>=4'} + dependencies: + has-flag: 3.0.0 + dev: true + + /supports-color@7.2.0: + resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} + engines: {node: '>=8'} + dependencies: + has-flag: 4.0.0 + dev: true + + /supports-preserve-symlinks-flag@1.0.0: + resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} + engines: {node: '>= 0.4'} + dev: true + + /term-size@2.2.1: + resolution: {integrity: sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg==} + engines: {node: '>=8'} + dev: true + + /tmp@0.0.33: + resolution: {integrity: sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==} + engines: {node: '>=0.6.0'} + dependencies: + os-tmpdir: 1.0.2 + dev: true + + /to-regex-range@5.0.1: + resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} + engines: {node: '>=8.0'} + dependencies: + is-number: 7.0.0 + dev: true + + /tr46@0.0.3: + resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} + dev: true + + /trim-newlines@3.0.1: + resolution: {integrity: sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==} + engines: {node: '>=8'} + dev: true + + /tty-table@4.2.3: + resolution: {integrity: sha512-Fs15mu0vGzCrj8fmJNP7Ynxt5J7praPXqFN0leZeZBXJwkMxv9cb2D454k1ltrtUSJbZ4yH4e0CynsHLxmUfFA==} + engines: {node: '>=8.0.0'} + hasBin: true + dependencies: + chalk: 4.1.2 + csv: 5.5.3 + kleur: 4.1.5 + smartwrap: 2.0.2 + strip-ansi: 6.0.1 + wcwidth: 1.0.1 + yargs: 17.7.2 + dev: true + + /type-fest@0.13.1: + resolution: {integrity: sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==} + engines: {node: '>=10'} + dev: true + + /type-fest@0.6.0: + resolution: {integrity: sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==} + engines: {node: '>=8'} + dev: true + + /type-fest@0.8.1: + resolution: {integrity: sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==} + engines: {node: '>=8'} + dev: true + + /typed-array-buffer@1.0.2: + resolution: {integrity: sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.7 + es-errors: 1.3.0 + is-typed-array: 1.1.13 + dev: true + + /typed-array-byte-length@1.0.1: + resolution: {integrity: sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.7 + for-each: 0.3.3 + gopd: 1.0.1 + has-proto: 1.0.3 + is-typed-array: 1.1.13 + dev: true + + /typed-array-byte-offset@1.0.2: + resolution: {integrity: sha512-Ous0vodHa56FviZucS2E63zkgtgrACj7omjwd/8lTEMEPFFyjfixMZ1ZXenpgCFBBt4EC1J2XsyVS2gkG0eTFA==} + engines: {node: '>= 0.4'} + dependencies: + available-typed-arrays: 1.0.7 + call-bind: 1.0.7 + for-each: 0.3.3 + gopd: 1.0.1 + has-proto: 1.0.3 + is-typed-array: 1.1.13 + dev: true + + /typed-array-length@1.0.5: + resolution: {integrity: sha512-yMi0PlwuznKHxKmcpoOdeLwxBoVPkqZxd7q2FgMkmD3bNwvF5VW0+UlUQ1k1vmktTu4Yu13Q0RIxEP8+B+wloA==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.7 + for-each: 0.3.3 + gopd: 1.0.1 + has-proto: 1.0.3 + is-typed-array: 1.1.13 + possible-typed-array-names: 1.0.0 + dev: true + + /unbox-primitive@1.0.2: + resolution: {integrity: sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==} + dependencies: + call-bind: 1.0.7 + has-bigints: 1.0.2 + has-symbols: 1.0.3 + which-boxed-primitive: 1.0.2 + dev: true + + /universalify@0.1.2: + resolution: {integrity: sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==} + engines: {node: '>= 4.0.0'} + dev: true + + /validate-npm-package-license@3.0.4: + resolution: {integrity: sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==} + dependencies: + spdx-correct: 3.2.0 + spdx-expression-parse: 3.0.1 + dev: true + + /wcwidth@1.0.1: + resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==} + dependencies: + defaults: 1.0.4 + dev: true + + /webidl-conversions@3.0.1: + resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} + dev: true + + /whatwg-url@5.0.0: + resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==} + dependencies: + tr46: 0.0.3 + webidl-conversions: 3.0.1 + dev: true + + /which-boxed-primitive@1.0.2: + resolution: {integrity: sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==} + dependencies: + is-bigint: 1.0.4 + is-boolean-object: 1.1.2 + is-number-object: 1.0.7 + is-string: 1.0.7 + is-symbol: 1.0.4 + dev: true + + /which-module@2.0.1: + resolution: {integrity: sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==} + dev: true + + /which-pm@2.0.0: + resolution: {integrity: sha512-Lhs9Pmyph0p5n5Z3mVnN0yWcbQYUAD7rbQUiMsQxOJ3T57k7RFe35SUwWMf7dsbDZks1uOmw4AecB/JMDj3v/w==} + engines: {node: '>=8.15'} + dependencies: + load-yaml-file: 0.2.0 + path-exists: 4.0.0 + dev: true + + /which-typed-array@1.1.14: + resolution: {integrity: sha512-VnXFiIW8yNn9kIHN88xvZ4yOWchftKDsRJ8fEPacX/wl1lOvBrhsJ/OeJCXq7B0AaijRuqgzSKalJoPk+D8MPg==} + engines: {node: '>= 0.4'} + dependencies: + available-typed-arrays: 1.0.7 + call-bind: 1.0.7 + for-each: 0.3.3 + gopd: 1.0.1 + has-tostringtag: 1.0.2 + dev: true + + /which@1.3.1: + resolution: {integrity: sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==} + hasBin: true + dependencies: + isexe: 2.0.0 + dev: true + + /wrap-ansi@6.2.0: + resolution: {integrity: sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==} + engines: {node: '>=8'} + dependencies: + ansi-styles: 4.3.0 + string-width: 4.2.3 + strip-ansi: 6.0.1 + dev: true + + /wrap-ansi@7.0.0: + resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} + engines: {node: '>=10'} + dependencies: + ansi-styles: 4.3.0 + string-width: 4.2.3 + strip-ansi: 6.0.1 + dev: true + + /y18n@4.0.3: + resolution: {integrity: sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==} + dev: true + + /y18n@5.0.8: + resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} + engines: {node: '>=10'} + dev: true + + /yallist@2.1.2: + resolution: {integrity: sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==} + dev: true + + /yallist@4.0.0: + resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} + dev: true + + /yargs-parser@18.1.3: + resolution: {integrity: sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==} + engines: {node: '>=6'} + dependencies: + camelcase: 5.3.1 + decamelize: 1.2.0 + dev: true + + /yargs-parser@21.1.1: + resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} + engines: {node: '>=12'} + dev: true + + /yargs@15.4.1: + resolution: {integrity: sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==} + engines: {node: '>=8'} + dependencies: + cliui: 6.0.0 + decamelize: 1.2.0 + find-up: 4.1.0 + get-caller-file: 2.0.5 + require-directory: 2.1.1 + require-main-filename: 2.0.0 + set-blocking: 2.0.0 + string-width: 4.2.3 + which-module: 2.0.1 + y18n: 4.0.3 + yargs-parser: 18.1.3 + dev: true + + /yargs@17.7.2: + resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==} + engines: {node: '>=12'} + dependencies: + cliui: 8.0.1 + escalade: 3.1.2 + get-caller-file: 2.0.5 + require-directory: 2.1.1 + string-width: 4.2.3 + y18n: 5.0.8 + yargs-parser: 21.1.1 + dev: true + + /yocto-queue@0.1.0: + resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} + engines: {node: '>=10'} + dev: true diff --git a/sonar-project.properties b/sonar-project.properties index 80f0ae7601b..616d7883e19 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -59,6 +59,7 @@ sonar.cpd.exclusions=\ integration-tests/contracts/ethereum_contracts_seth.go,\ integration-tests/contracts/ethereum_contracts_seth.go,\ integration-tests/actions/seth/actions.go +dashboard/** # Tests' root folder, inclusions (tests to check and count) and exclusions sonar.tests=. diff --git a/test.txt b/test.txt deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/testdata/scripts/help-all/help-all.txtar b/testdata/scripts/help-all/help-all.txtar new file mode 100644 index 00000000000..eeaf0da98d1 --- /dev/null +++ b/testdata/scripts/help-all/help-all.txtar @@ -0,0 +1,155 @@ +exec chainlink help-all +cmp stdout out.txt + +-- out.txt -- +admin # Commands for remotely taking admin related actions +admin chpass # Change your API password remotely +admin login # Login to remote client by creating a session cookie +admin logout # Delete any local sessions +admin profile # Collects profile metrics from the node. +admin status # Displays the health of various services running inside the node. +admin users # Create, edit permissions, or delete API users +admin users chrole # Changes an API user's role +admin users create # Create a new API user +admin users delete # Delete an API user +admin users list # Lists all API users and their roles +attempts # Commands for managing Ethereum Transaction Attempts +attempts list # List the Transaction Attempts in descending order +blocks # Commands for managing blocks +blocks replay # Replays block data from the given number +bridges # Commands for Bridges communicating with External Adapters +bridges create # Create a new Bridge to an External Adapter +bridges destroy # Destroys the Bridge for an External Adapter +bridges list # List all Bridges to External Adapters +bridges show # Show a Bridge's details +chains # Commands for handling chain configuration +chains cosmos # Commands for handling Cosmos chains +chains cosmos list # List all existing Cosmos chains +chains evm # Commands for handling EVM chains +chains evm list # List all existing EVM chains +chains solana # Commands for handling Solana chains +chains solana list # List all existing Solana chains +chains starknet # Commands for handling StarkNet chains +chains starknet list # List all existing StarkNet chains +config # Commands for the node's configuration +config loglevel # Set log level +config logsql # Enable/disable SQL statement logging +config show # Show the application configuration +config validate # DEPRECATED. Use `chainlink node validate` +forwarders # Commands for managing forwarder addresses. +forwarders delete # Delete a forwarder address +forwarders list # List all stored forwarders addresses +forwarders track # Track a new forwarder +health # Prints a health report +help # Shows a list of commands or help for one command +help-all # Shows a list of all commands and sub-commands +initiators # Commands for managing External Initiators +initiators create # Create an authentication key for a user of External Initiators +initiators destroy # Remove an external initiator by name +initiators list # List all external initiators +jobs # Commands for managing Jobs +jobs create # Create a job +jobs delete # Delete a job +jobs list # List all jobs +jobs run # Trigger a job run +jobs show # Show a job +keys # Commands for managing various types of keys used by the Chainlink node +keys cosmos # Remote commands for administering the node's Cosmos keys +keys cosmos create # Create a Cosmos key +keys cosmos delete # Delete Cosmos key if present +keys cosmos export # Export Cosmos key to keyfile +keys cosmos import # Import Cosmos key from keyfile +keys cosmos list # List the Cosmos keys +keys csa # Remote commands for administering the node's CSA keys +keys csa create # Create a CSA key, encrypted with password from the password file, and store it in the database. +keys csa export # Exports an existing CSA key by its ID. +keys csa import # Imports a CSA key from a JSON file. +keys csa list # List available CSA keys +keys dkgencrypt # Remote commands for administering the node's DKGEncrypt keys +keys dkgencrypt create # Create a DKGEncrypt key +keys dkgencrypt delete # Delete DKGEncrypt key if present +keys dkgencrypt export # Export DKGEncrypt key to keyfile +keys dkgencrypt import # Import DKGEncrypt key from keyfile +keys dkgencrypt list # List the DKGEncrypt keys +keys dkgsign # Remote commands for administering the node's DKGSign keys +keys dkgsign create # Create a DKGSign key +keys dkgsign delete # Delete DKGSign key if present +keys dkgsign export # Export DKGSign key to keyfile +keys dkgsign import # Import DKGSign key from keyfile +keys dkgsign list # List the DKGSign keys +keys eth # Remote commands for administering the node's Ethereum keys +keys eth chain # Update an EVM key for the given chain +keys eth create # Create a key in the node's keystore alongside the existing key; to create an original key, just run the node +keys eth delete # Delete the ETH key by address (irreversible!) +keys eth export # Exports an ETH key to a JSON file +keys eth import # Import an ETH key from a JSON file +keys eth list # List available Ethereum accounts with their ETH & LINK balances and other metadata +keys ocr # Remote commands for administering the node's legacy off chain reporting keys +keys ocr create # Create an OCR key bundle, encrypted with password from the password file, and store it in the database +keys ocr delete # Deletes the encrypted OCR key bundle matching the given ID +keys ocr export # Exports an OCR key bundle to a JSON file +keys ocr import # Imports an OCR key bundle from a JSON file +keys ocr list # List available OCR key bundles +keys ocr2 # Remote commands for administering the node's off chain reporting keys +keys ocr2 create # Create an OCR2 key bundle, encrypted with password from the password file, and store it in the database +keys ocr2 delete # Deletes the encrypted OCR2 key bundle matching the given ID +keys ocr2 export # Exports an OCR2 key bundle to a JSON file +keys ocr2 import # Imports an OCR2 key bundle from a JSON file +keys ocr2 list # List available OCR2 key bundles +keys p2p # Remote commands for administering the node's p2p keys +keys p2p create # Create a p2p key, encrypted with password from the password file, and store it in the database. +keys p2p delete # Delete the encrypted P2P key by id +keys p2p export # Exports a P2P key to a JSON file +keys p2p import # Imports a P2P key from a JSON file +keys p2p list # List available P2P keys +keys solana # Remote commands for administering the node's Solana keys +keys solana create # Create a Solana key +keys solana delete # Delete Solana key if present +keys solana export # Export Solana key to keyfile +keys solana import # Import Solana key from keyfile +keys solana list # List the Solana keys +keys starknet # Remote commands for administering the node's StarkNet keys +keys starknet create # Create a StarkNet key +keys starknet delete # Delete StarkNet key if present +keys starknet export # Export StarkNet key to keyfile +keys starknet import # Import StarkNet key from keyfile +keys starknet list # List the StarkNet keys +keys vrf # Remote commands for administering the node's vrf keys +keys vrf create # Create a VRF key +keys vrf delete # Archive or delete VRF key from memory and the database, if present. Note that jobs referencing the removed key will also be removed. +keys vrf export # Export VRF key to keyfile +keys vrf import # Import VRF key from keyfile +keys vrf list # List the VRF keys +node # Commands for admin actions that must be run locally +node db # Commands for managing the database. +node db create-migration # Create a new migration. +node db delete-chain # Commands for cleaning up chain specific db tables. WARNING: This will ERASE ALL chain specific data referred to by --type and --id options for the specified database, referred to by CL_DATABASE_URL env variable or by the Database.URL field in a secrets TOML config. +node db migrate # Migrate the database to the latest version. +node db preparetest # Reset database and load fixtures. +node db reset # Drop, create and migrate database. Useful for setting up the database in order to run tests or resetting the dev database. WARNING: This will ERASE ALL DATA for the specified database, referred to by CL_DATABASE_URL env variable or by the Database.URL field in a secrets TOML config. +node db rollback # Roll back the database to a previous . Rolls back a single migration if no version specified. +node db status # Display the current database migration status. +node db version # Display the current database version. +node profile # Collects profile metrics from the node. +node rebroadcast-transactions # Manually rebroadcast txs matching nonce range with the specified gas price. This is useful in emergencies e.g. high gas prices and/or network congestion to forcibly clear out the pending TX queue +node start # Run the Chainlink node +node status # Displays the health of various services running inside the node. +node validate # Validate the TOML configuration and secrets that are passed as flags to the `node` command. Prints the full effective configuration, with defaults included +nodes # Commands for handling node configuration +nodes cosmos # Commands for handling Cosmos node configuration +nodes cosmos list # List all existing Cosmos nodes +nodes evm # Commands for handling EVM node configuration +nodes evm list # List all existing EVM nodes +nodes solana # Commands for handling Solana node configuration +nodes solana list # List all existing Solana nodes +nodes starknet # Commands for handling StarkNet node configuration +nodes starknet list # List all existing StarkNet nodes +txs # Commands for handling transactions +txs cosmos # Commands for handling Cosmos transactions +txs cosmos create # Send of from node Cosmos account to destination . +txs evm # Commands for handling EVM transactions +txs evm create # Send ETH (or wei) from node ETH account to destination . +txs evm list # List the Ethereum Transactions in descending order +txs evm show # get information on a specific Ethereum Transaction +txs solana # Commands for handling Solana transactions +txs solana create # Send lamports from node Solana account to destination . diff --git a/testdata/scripts/help.txtar b/testdata/scripts/help.txtar index e4c19f3987d..7420ed7210c 100644 --- a/testdata/scripts/help.txtar +++ b/testdata/scripts/help.txtar @@ -26,6 +26,7 @@ COMMANDS: chains Commands for handling chain configuration nodes Commands for handling node configuration forwarders Commands for managing forwarder addresses. + help-all Shows a list of all commands and sub-commands help, h Shows a list of commands or help for one command GLOBAL OPTIONS: diff --git a/testdata/scripts/node/validate/default.txtar b/testdata/scripts/node/validate/default.txtar index 8a3c99ee8da..6a1d0497c73 100644 --- a/testdata/scripts/node/validate/default.txtar +++ b/testdata/scripts/node/validate/default.txtar @@ -128,6 +128,7 @@ MaxSuccessfulRuns = 10000 ReaperInterval = '1h0m0s' ReaperThreshold = '24h0m0s' ResultWriteQueueDepth = 100 +VerboseLogging = false [JobPipeline.HTTPRequest] DefaultTimeout = '15s' @@ -241,6 +242,21 @@ LatestReportDeadline = '5s' [Mercury.TLS] CertFile = '' +[Capabilities] +[Capabilities.Peering] +IncomingMessageBufferSize = 10 +OutgoingMessageBufferSize = 10 +PeerID = '' +TraceLogging = false + +[Capabilities.Peering.V2] +Enabled = false +AnnounceAddresses = [] +DefaultBootstrappers = [] +DeltaDial = '15s' +DeltaReconcile = '1m0s' +ListenAddresses = [] + Invalid configuration: invalid secrets: 2 errors: - Database.URL: empty: must be provided and non-empty - Password.Keystore: empty: must be provided and non-empty diff --git a/testdata/scripts/node/validate/disk-based-logging-disabled.txtar b/testdata/scripts/node/validate/disk-based-logging-disabled.txtar index 873b9e91bc1..6f251d2ab65 100644 --- a/testdata/scripts/node/validate/disk-based-logging-disabled.txtar +++ b/testdata/scripts/node/validate/disk-based-logging-disabled.txtar @@ -172,6 +172,7 @@ MaxSuccessfulRuns = 10000 ReaperInterval = '1h0m0s' ReaperThreshold = '24h0m0s' ResultWriteQueueDepth = 100 +VerboseLogging = false [JobPipeline.HTTPRequest] DefaultTimeout = '15s' @@ -285,6 +286,21 @@ LatestReportDeadline = '5s' [Mercury.TLS] CertFile = '' +[Capabilities] +[Capabilities.Peering] +IncomingMessageBufferSize = 10 +OutgoingMessageBufferSize = 10 +PeerID = '' +TraceLogging = false + +[Capabilities.Peering.V2] +Enabled = false +AnnounceAddresses = [] +DefaultBootstrappers = [] +DeltaDial = '15s' +DeltaReconcile = '1m0s' +ListenAddresses = [] + [[EVM]] ChainID = '1' AutoCreateKey = true diff --git a/testdata/scripts/node/validate/disk-based-logging-no-dir.txtar b/testdata/scripts/node/validate/disk-based-logging-no-dir.txtar index 0c00fbb7adc..50c72afb781 100644 --- a/testdata/scripts/node/validate/disk-based-logging-no-dir.txtar +++ b/testdata/scripts/node/validate/disk-based-logging-no-dir.txtar @@ -172,6 +172,7 @@ MaxSuccessfulRuns = 10000 ReaperInterval = '1h0m0s' ReaperThreshold = '24h0m0s' ResultWriteQueueDepth = 100 +VerboseLogging = false [JobPipeline.HTTPRequest] DefaultTimeout = '15s' @@ -285,6 +286,21 @@ LatestReportDeadline = '5s' [Mercury.TLS] CertFile = '' +[Capabilities] +[Capabilities.Peering] +IncomingMessageBufferSize = 10 +OutgoingMessageBufferSize = 10 +PeerID = '' +TraceLogging = false + +[Capabilities.Peering.V2] +Enabled = false +AnnounceAddresses = [] +DefaultBootstrappers = [] +DeltaDial = '15s' +DeltaReconcile = '1m0s' +ListenAddresses = [] + [[EVM]] ChainID = '1' AutoCreateKey = true diff --git a/testdata/scripts/node/validate/disk-based-logging.txtar b/testdata/scripts/node/validate/disk-based-logging.txtar index 0bbddd6f40f..9ffa7e29a84 100644 --- a/testdata/scripts/node/validate/disk-based-logging.txtar +++ b/testdata/scripts/node/validate/disk-based-logging.txtar @@ -172,6 +172,7 @@ MaxSuccessfulRuns = 10000 ReaperInterval = '1h0m0s' ReaperThreshold = '24h0m0s' ResultWriteQueueDepth = 100 +VerboseLogging = false [JobPipeline.HTTPRequest] DefaultTimeout = '15s' @@ -285,6 +286,21 @@ LatestReportDeadline = '5s' [Mercury.TLS] CertFile = '' +[Capabilities] +[Capabilities.Peering] +IncomingMessageBufferSize = 10 +OutgoingMessageBufferSize = 10 +PeerID = '' +TraceLogging = false + +[Capabilities.Peering.V2] +Enabled = false +AnnounceAddresses = [] +DefaultBootstrappers = [] +DeltaDial = '15s' +DeltaReconcile = '1m0s' +ListenAddresses = [] + [[EVM]] ChainID = '1' AutoCreateKey = true diff --git a/testdata/scripts/node/validate/invalid-ocr-p2p.txtar b/testdata/scripts/node/validate/invalid-ocr-p2p.txtar index 7f109b654d9..5e88bfbcb1a 100644 --- a/testdata/scripts/node/validate/invalid-ocr-p2p.txtar +++ b/testdata/scripts/node/validate/invalid-ocr-p2p.txtar @@ -157,6 +157,7 @@ MaxSuccessfulRuns = 10000 ReaperInterval = '1h0m0s' ReaperThreshold = '24h0m0s' ResultWriteQueueDepth = 100 +VerboseLogging = false [JobPipeline.HTTPRequest] DefaultTimeout = '15s' @@ -270,7 +271,22 @@ LatestReportDeadline = '5s' [Mercury.TLS] CertFile = '' +[Capabilities] +[Capabilities.Peering] +IncomingMessageBufferSize = 10 +OutgoingMessageBufferSize = 10 +PeerID = '' +TraceLogging = false + +[Capabilities.Peering.V2] +Enabled = false +AnnounceAddresses = [] +DefaultBootstrappers = [] +DeltaDial = '15s' +DeltaReconcile = '1m0s' +ListenAddresses = [] + Invalid configuration: invalid configuration: P2P.V2.Enabled: invalid value (false): P2P required for OCR or OCR2. Please enable P2P or disable OCR/OCR2. -- err.txt -- -invalid configuration \ No newline at end of file +invalid configuration diff --git a/testdata/scripts/node/validate/invalid.txtar b/testdata/scripts/node/validate/invalid.txtar index 011298fcde7..7255bbcb6fc 100644 --- a/testdata/scripts/node/validate/invalid.txtar +++ b/testdata/scripts/node/validate/invalid.txtar @@ -162,6 +162,7 @@ MaxSuccessfulRuns = 10000 ReaperInterval = '1h0m0s' ReaperThreshold = '24h0m0s' ResultWriteQueueDepth = 100 +VerboseLogging = false [JobPipeline.HTTPRequest] DefaultTimeout = '15s' @@ -275,6 +276,21 @@ LatestReportDeadline = '5s' [Mercury.TLS] CertFile = '' +[Capabilities] +[Capabilities.Peering] +IncomingMessageBufferSize = 10 +OutgoingMessageBufferSize = 10 +PeerID = '' +TraceLogging = false + +[Capabilities.Peering.V2] +Enabled = false +AnnounceAddresses = [] +DefaultBootstrappers = [] +DeltaDial = '15s' +DeltaReconcile = '1m0s' +ListenAddresses = [] + [[EVM]] ChainID = '1' AutoCreateKey = true diff --git a/testdata/scripts/node/validate/valid.txtar b/testdata/scripts/node/validate/valid.txtar index e0bd015a184..e0a4d813db0 100644 --- a/testdata/scripts/node/validate/valid.txtar +++ b/testdata/scripts/node/validate/valid.txtar @@ -169,6 +169,7 @@ MaxSuccessfulRuns = 10000 ReaperInterval = '1h0m0s' ReaperThreshold = '24h0m0s' ResultWriteQueueDepth = 100 +VerboseLogging = false [JobPipeline.HTTPRequest] DefaultTimeout = '15s' @@ -282,6 +283,21 @@ LatestReportDeadline = '5s' [Mercury.TLS] CertFile = '' +[Capabilities] +[Capabilities.Peering] +IncomingMessageBufferSize = 10 +OutgoingMessageBufferSize = 10 +PeerID = '' +TraceLogging = false + +[Capabilities.Peering.V2] +Enabled = false +AnnounceAddresses = [] +DefaultBootstrappers = [] +DeltaDial = '15s' +DeltaReconcile = '1m0s' +ListenAddresses = [] + [[EVM]] ChainID = '1' AutoCreateKey = true diff --git a/testdata/scripts/node/validate/warnings.txtar b/testdata/scripts/node/validate/warnings.txtar index 01968ffd65d..10881c080cb 100644 --- a/testdata/scripts/node/validate/warnings.txtar +++ b/testdata/scripts/node/validate/warnings.txtar @@ -151,6 +151,7 @@ MaxSuccessfulRuns = 10000 ReaperInterval = '1h0m0s' ReaperThreshold = '24h0m0s' ResultWriteQueueDepth = 100 +VerboseLogging = false [JobPipeline.HTTPRequest] DefaultTimeout = '15s' @@ -264,6 +265,21 @@ LatestReportDeadline = '5s' [Mercury.TLS] CertFile = '' +[Capabilities] +[Capabilities.Peering] +IncomingMessageBufferSize = 10 +OutgoingMessageBufferSize = 10 +PeerID = '' +TraceLogging = false + +[Capabilities.Peering.V2] +Enabled = false +AnnounceAddresses = [] +DefaultBootstrappers = [] +DeltaDial = '15s' +DeltaReconcile = '1m0s' +ListenAddresses = [] + # Configuration warning: Tracing.TLSCertPath: invalid value (something): must be empty when Tracing.Mode is 'unencrypted' Valid configuration. diff --git a/tools/bin/goreleaser_utils b/tools/bin/goreleaser_utils index 4eb8e1acd07..99eaddb35b9 100755 --- a/tools/bin/goreleaser_utils +++ b/tools/bin/goreleaser_utils @@ -1,4 +1,6 @@ #!/usr/bin/env bash +set -x + # get machine / kernel name _get_platform() { @@ -58,19 +60,76 @@ before_hook() { cp -f "$wasmvm_lib_path_darwin_amd64" "$lib_path/darwin_amd64/libs" mkdir -p "$lib_path/darwin_arm64/libs" cp -f "$wasmvm_lib_path_darwin_arm64" "$lib_path/darwin_arm64/libs" + + # MOVE PLUGINS HERE + gobin=$(go env GOPATH)/bin + + install_local_plugins "linux" "amd64" "$gobin"/linux_amd64 + install_remote_plugins "linux" "amd64" "$gobin"/linux_amd64 + mkdir -p "$lib_path/linux_amd64/plugins" + cp "$gobin"/linux_amd64/chainlink* "$lib_path/linux_amd64/plugins" + + install_local_plugins "linux" "arm64" "$gobin"/linux_arm64 + install_remote_plugins "linux" "arm64" "$gobin"/linux_arm64 + mkdir -p "$lib_path/linux_arm64/plugins" + cp "$gobin"/linux_arm64/chainlink* "$lib_path/linux_arm64/plugins" +} + +install_local_plugins() { + local -r goos=$1 + local -r goarch=$2 + local -r gobin=$3 + + GOBIN=$gobin GOARCH=$goarch GOOS=$goos make install-medianpoc + GOBIN=$gobin GOARCH=$goarch GOOS=$goos make install-install-ocr3-capability +} + +get_remote_plugin_paths() { + plugins=( + "github.com/smartcontractkit/chainlink-solana|/pkg/solana/cmd/chainlink-solana" + "github.com/smartcontractkit/chainlink-starknet/relayer|/pkg/chainlink/cmd/chainlink-starknet" + "github.com/smartcontractkit/chainlink-feeds|/cmd/chainlink-feeds" + "github.com/smartcontractkit/chainlink-data-streams|/mercury/cmd/chainlink-mercury" + ) + + for plugin in "${plugins[@]}"; do + plugin_dep_name=$(echo "$plugin" | cut -d"|" -f1) + plugin_main=$(echo "$plugin" | cut -d"|" -f2) + + full_plugin_path=$(go list -m -f "{{.Dir}}" "$plugin_dep_name")"$plugin_main" + echo "$full_plugin_path" + done +} + +install_remote_plugins() { + local -r goos=$1 + local -r goarch=$2 + local -r gobin=$(go env GOPATH)/bin + + for plugin in $(get_remote_plugin_paths); do + GOBIN=$gobin GOARCH=$goarch GOOS=$goos go install "$plugin" + done + } # binary build post hook # moves native libraries to binary libs directory build_post_hook() { local -r dist_path=$1 - local -r lib_path=$dist_path/libs + local -r lib_dest_path=$dist_path/libs local -r platform=$2 local -r arch=$3 + local -r plugin_src_path=./tmp/${platform}_${arch}/plugins + local -r plugin_dest_path=$dist_path/plugins + # COPY NATIVE LIBRARIES HERE local -r wasmvm_lib_path=$(_get_wasmvm_lib_path "$platform" "$arch") - mkdir -p "$lib_path" - cp "$wasmvm_lib_path" "$lib_path" + mkdir -p "$lib_dest_path" + cp "$wasmvm_lib_path" "$lib_dest_path" + + # COPY PLUGINS HERE + mkdir -p "$plugin_dest_path" + cp -r "$plugin_src_path/." "$plugin_dest_path" } "$@" diff --git a/tools/flakeytests/cmd/runner/main.go b/tools/flakeytests/cmd/runner/main.go index 0f36ab25ef9..2a1c5633577 100644 --- a/tools/flakeytests/cmd/runner/main.go +++ b/tools/flakeytests/cmd/runner/main.go @@ -24,6 +24,7 @@ func main() { grafanaHost := flag.String("grafana_host", "", "grafana host URL") grafanaAuth := flag.String("grafana_auth", "", "grafana basic auth for Loki API") + grafanaOrgID := flag.String("grafana_org_id", "", "grafana org ID") command := flag.String("command", "", "test command being rerun; used to tag metrics") ghSHA := flag.String("gh_sha", "", "commit sha for which we're rerunning tests") ghEventPath := flag.String("gh_event_path", "", "path to associated gh event") @@ -40,6 +41,10 @@ func main() { log.Fatal("Error re-running flakey tests: `grafana_auth` is required") } + if *grafanaOrgID == "" { + log.Fatal("Error re-running flakey tests: `grafana_org_id` is required") + } + if *command == "" { log.Fatal("Error re-running flakey tests: `command` is required") } @@ -58,7 +63,7 @@ func main() { } meta := flakeytests.GetGithubMetadata(*ghRepo, *ghEventName, *ghSHA, *ghEventPath, *ghRunID) - rep := flakeytests.NewLokiReporter(*grafanaHost, *grafanaAuth, *command, meta) + rep := flakeytests.NewLokiReporter(*grafanaHost, *grafanaAuth, *grafanaOrgID, *command, meta) r := flakeytests.NewRunner(readers, rep, numReruns) err := r.Run(ctx) if err != nil { diff --git a/tools/flakeytests/reporter.go b/tools/flakeytests/reporter.go index b7c7f66698f..b3c8ad6da00 100644 --- a/tools/flakeytests/reporter.go +++ b/tools/flakeytests/reporter.go @@ -62,6 +62,7 @@ type Context struct { type LokiReporter struct { host string auth string + orgId string command string now func() time.Time ctx Context @@ -155,6 +156,7 @@ func (l *LokiReporter) makeRequest(ctx context.Context, pushReq pushRequest) err fmt.Sprintf("Basic %s", base64.StdEncoding.EncodeToString([]byte(l.auth))), ) req.Header.Add("Content-Type", "application/json") + req.Header.Add("X-Scope-OrgID", l.orgId) resp, err := http.DefaultClient.Do(req) if err != nil { return err @@ -177,6 +179,6 @@ func (l *LokiReporter) Report(ctx context.Context, report *Report) error { return l.makeRequest(ctx, pushReq) } -func NewLokiReporter(host, auth, command string, ctx Context) *LokiReporter { - return &LokiReporter{host: host, auth: auth, command: command, now: time.Now, ctx: ctx} +func NewLokiReporter(host, auth, orgId, command string, ctx Context) *LokiReporter { + return &LokiReporter{host: host, auth: auth, orgId: orgId, command: command, now: time.Now, ctx: ctx} } diff --git a/tools/flakeytests/reporter_test.go b/tools/flakeytests/reporter_test.go index 15650fc7bd1..c2b03e26dc3 100644 --- a/tools/flakeytests/reporter_test.go +++ b/tools/flakeytests/reporter_test.go @@ -19,7 +19,7 @@ func TestMakeRequest_SingleTest(t *testing.T) { }, }, } - lr := &LokiReporter{auth: "bla", host: "bla", command: "go_core_tests", now: func() time.Time { return now }} + lr := &LokiReporter{auth: "bla", host: "bla", orgId: "bla", command: "go_core_tests", now: func() time.Time { return now }} pr, err := lr.createRequest(r) require.NoError(t, err) assert.Len(t, pr.Streams, 1) @@ -41,7 +41,7 @@ func TestMakeRequest_MultipleTests(t *testing.T) { }, }, } - lr := &LokiReporter{auth: "bla", host: "bla", command: "go_core_tests", now: func() time.Time { return now }} + lr := &LokiReporter{auth: "bla", host: "bla", orgId: "bla", command: "go_core_tests", now: func() time.Time { return now }} pr, err := lr.createRequest(r) require.NoError(t, err) assert.Len(t, pr.Streams, 1) @@ -58,7 +58,7 @@ func TestMakeRequest_NoTests(t *testing.T) { now := time.Now() ts := fmt.Sprintf("%d", now.UnixNano()) r := NewReport() - lr := &LokiReporter{auth: "bla", host: "bla", command: "go_core_tests", now: func() time.Time { return now }} + lr := &LokiReporter{auth: "bla", host: "bla", orgId: "bla", command: "go_core_tests", now: func() time.Time { return now }} pr, err := lr.createRequest(r) require.NoError(t, err) assert.Len(t, pr.Streams, 1) @@ -72,7 +72,7 @@ func TestMakeRequest_WithContext(t *testing.T) { now := time.Now() ts := fmt.Sprintf("%d", now.UnixNano()) r := NewReport() - lr := &LokiReporter{auth: "bla", host: "bla", command: "go_core_tests", now: func() time.Time { return now }, ctx: Context{CommitSHA: "42"}} + lr := &LokiReporter{auth: "bla", host: "bla", orgId: "bla", command: "go_core_tests", now: func() time.Time { return now }, ctx: Context{CommitSHA: "42"}} pr, err := lr.createRequest(r) require.NoError(t, err) assert.Len(t, pr.Streams, 1) @@ -95,7 +95,7 @@ func TestMakeRequest_Panics(t *testing.T) { "core/assets": 1, }, } - lr := &LokiReporter{auth: "bla", host: "bla", command: "go_core_tests", now: func() time.Time { return now }} + lr := &LokiReporter{auth: "bla", host: "bla", orgId: "bla", command: "go_core_tests", now: func() time.Time { return now }} pr, err := lr.createRequest(r) require.NoError(t, err) assert.Len(t, pr.Streams, 1)